@arcgis/core 4.34.0-next.16 → 4.34.0-next.18

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 (171) hide show
  1. package/analysis/Analysis.js +1 -1
  2. package/analysis/AreaMeasurementAnalysis.js +1 -1
  3. package/analysis/DimensionAnalysis.js +1 -1
  4. package/analysis/DimensionSimpleStyle.js +1 -1
  5. package/analysis/DirectLineMeasurementAnalysis.js +1 -1
  6. package/analysis/LengthDimension.js +1 -1
  7. package/analysis/LineOfSightAnalysis.js +1 -1
  8. package/analysis/SliceAnalysis.js +1 -1
  9. package/analysis/SlicePlane.js +1 -1
  10. package/analysis/ViewshedAnalysis.js +1 -1
  11. package/assets/esri/core/workers/RemoteClient.js +1 -1
  12. package/assets/esri/core/workers/chunks/{400a4c9fa62964f8fa1d.js → 1f48d6c76f0014064eca.js} +1 -1
  13. package/assets/esri/core/workers/chunks/3cf31e51266f40072f71.js +1 -0
  14. package/assets/esri/core/workers/chunks/{58f403f956b7b3467344.js → 42da01bd3f401a017c0f.js} +1 -1
  15. package/assets/esri/core/workers/chunks/4325fdd96d9ea344132e.js +1 -0
  16. package/assets/esri/core/workers/chunks/{a6bcae413e62cd879b46.js → 5859e425c9bca96b6c80.js} +1 -1
  17. package/assets/esri/core/workers/chunks/5bfccd5dffda74740aa4.js +1 -0
  18. package/assets/esri/core/workers/chunks/68374cf42a069436830d.js +1 -0
  19. package/assets/esri/core/workers/chunks/6f8de923519bb16af8ba.js +1 -0
  20. package/assets/esri/core/workers/chunks/85753105268aeff84e69.js +1 -0
  21. package/assets/esri/core/workers/chunks/{2990145d7ac3af0d68be.js → 8599df135928d73da4a3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/8637b9cb30170ac4eae2.js +1 -0
  23. package/assets/esri/core/workers/chunks/872f151a3a2bc9052be0.js +1 -0
  24. package/assets/esri/core/workers/chunks/8b4a35e3ed39d8be3394.js +1 -0
  25. package/assets/esri/core/workers/chunks/974c6b0e3a1f1dd523fa.js +1 -0
  26. package/assets/esri/core/workers/chunks/{d33a5d79f2163ad62b1d.js → 9965961bad09910f577b.js} +1 -1
  27. package/assets/esri/core/workers/chunks/9d499a37b960273c3f84.js +1 -0
  28. package/assets/esri/core/workers/chunks/a507192771e5f4f82973.js +1 -0
  29. package/assets/esri/core/workers/chunks/a9e1caf05c81055ae194.js +1 -0
  30. package/assets/esri/core/workers/chunks/{1415d4e2f5f3193be004.js → aa4ae0e54a0507e8dd0f.js} +1 -1
  31. package/assets/esri/core/workers/chunks/aeabe203da7bcdd580cf.js +1 -0
  32. package/assets/esri/core/workers/chunks/d3bfd0c382c2f39a787b.js +1 -0
  33. package/assets/esri/core/workers/chunks/d6df12bed626d56cd6b2.js +1 -0
  34. package/assets/esri/core/workers/chunks/e0146db608959ead9c97.js +1 -0
  35. package/assets/esri/core/workers/chunks/{243eb8a317333ec2715b.js → f3e179b48bca50c94538.js} +1 -1
  36. package/assets/esri/core/workers/chunks/f4442a2b40e44f90b461.js +1 -0
  37. package/assets/esri/core/workers/chunks/{fa5715ca3ce95d005b0a.js → faa892ad4cc8a90b6c79.js} +1 -1
  38. package/assets/esri/themes/base/widgets/_Legend.scss +2 -0
  39. package/assets/esri/themes/dark/main.css +1 -1
  40. package/assets/esri/themes/light/main.css +1 -1
  41. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  42. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  43. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  44. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  45. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  46. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  47. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  48. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  49. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  50. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  51. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  52. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  53. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  54. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  55. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  58. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  59. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  60. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  61. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  62. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  63. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  64. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  67. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  68. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  69. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  70. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  71. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  72. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  73. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  74. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  75. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  76. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  77. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  78. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  79. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  80. package/chunks/sphere.js +1 -1
  81. package/config.js +1 -1
  82. package/core/accessorSupport/trackingUtils.js +1 -1
  83. package/core/arrayUtils.js +1 -1
  84. package/core/sql.js +1 -1
  85. package/geometry/spatialReferenceEllipsoidUtils.js +1 -1
  86. package/geometry/support/sphere.js +1 -1
  87. package/interfaces.d.ts +60 -43
  88. package/kernel.js +1 -1
  89. package/layers/FeatureLayer.js +1 -1
  90. package/layers/SubtypeGroupLayer.js +1 -1
  91. package/layers/VectorTileLayer.js +1 -1
  92. package/layers/VideoLayer.js +1 -1
  93. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  94. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  95. package/layers/orientedImagery/core/utils.js +1 -1
  96. package/layers/orientedImagery/transformations/updateElevation.js +1 -1
  97. package/layers/orientedImagery/transformations/updateElevationUtils.js +1 -1
  98. package/layers/orientedImagery/transformations/utils.js +1 -1
  99. package/layers/support/SubtypeSublayer.js +1 -1
  100. package/layers/support/TitleCreator.js +1 -1
  101. package/layers/support/fieldUtils.js +1 -1
  102. package/layers/video/VideoCameraSensorModel.js +1 -1
  103. package/layers/video/VideoController.js +1 -1
  104. package/networks/UtilityNetwork.js +1 -1
  105. package/package.json +1 -1
  106. package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
  107. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelFactories.js +1 -1
  108. package/rest/knowledgeGraphService.js +1 -1
  109. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  110. package/support/revision.js +1 -1
  111. package/symbols/support/jsonUtils.js +1 -1
  112. package/symbols/support/previewCIMSymbol.js +1 -1
  113. package/symbols/support/previewSymbol2D.js +1 -1
  114. package/symbols/support/svgUtils.js +1 -1
  115. package/views/2d/engine/vectorTiles/style/StyleRepository.js +1 -1
  116. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartShader.js +1 -1
  117. package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
  118. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  119. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  120. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  121. package/views/3d/FocusAreasView.js +1 -1
  122. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  123. package/views/3d/analysis/Slice/SliceController.js +1 -1
  124. package/views/3d/camera/constraintUtils/tilt.js +1 -1
  125. package/views/3d/camera/intersectionUtils.js +1 -1
  126. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  127. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  128. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  129. package/views/3d/state/ViewState.js +1 -1
  130. package/views/3d/state/ViewStateManager.js +1 -1
  131. package/views/3d/state/controllers/GamepadKeyboardController.js +1 -1
  132. package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
  133. package/views/3d/state/utils/navigationUtils.js +1 -1
  134. package/views/3d/terrain/OverlayManager.js +1 -1
  135. package/views/3d/terrain/TerrainSurface.js +1 -1
  136. package/views/3d/terrain/TileRenderer.js +1 -1
  137. package/views/3d/webgl-engine/lib/Octree.js +1 -1
  138. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  139. package/views/3d/webgl-engine/lib/edgeRendering/edgePreprocessing.js +1 -1
  140. package/views/SceneView.js +1 -1
  141. package/views/analysis/analysisViewUtils.js +1 -1
  142. package/views/support/drapedUtils.js +1 -1
  143. package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
  144. package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
  145. package/widgets/Expand.js +1 -1
  146. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  147. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  148. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  149. package/widgets/LineOfSight/LineOfSightTarget.js +1 -1
  150. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  151. package/widgets/OrientedImageryViewer.js +1 -1
  152. package/widgets/support/GridControls.js +1 -1
  153. package/widgets/support/SelectionList/LayerItem.js +1 -1
  154. package/assets/esri/core/workers/chunks/254c4f7e277ae9915dce.js +0 -1
  155. package/assets/esri/core/workers/chunks/273beed633cc37416ad7.js +0 -1
  156. package/assets/esri/core/workers/chunks/49a57dc1e6d1048fa949.js +0 -1
  157. package/assets/esri/core/workers/chunks/500fb5f615f0c1db1b66.js +0 -1
  158. package/assets/esri/core/workers/chunks/52239e958a82ebcd2e7a.js +0 -1
  159. package/assets/esri/core/workers/chunks/54814a269d44855f0673.js +0 -1
  160. package/assets/esri/core/workers/chunks/632d1a1287dde980479e.js +0 -1
  161. package/assets/esri/core/workers/chunks/802c6b1a6cb9264b8e4f.js +0 -1
  162. package/assets/esri/core/workers/chunks/88b1214c284c2ec7d51b.js +0 -1
  163. package/assets/esri/core/workers/chunks/932808e485f305b6a26a.js +0 -1
  164. package/assets/esri/core/workers/chunks/948c5454881e661c3bdc.js +0 -1
  165. package/assets/esri/core/workers/chunks/95507ff0a243e451b99e.js +0 -1
  166. package/assets/esri/core/workers/chunks/9959a91c8de6fef499c2.js +0 -1
  167. package/assets/esri/core/workers/chunks/cfc5e0ec9b0290407383.js +0 -1
  168. package/assets/esri/core/workers/chunks/d2139307f62ea8bf999a.js +0 -1
  169. package/assets/esri/core/workers/chunks/ddb66fe6fcd0764daa7a.js +0 -1
  170. package/assets/esri/core/workers/chunks/eac7af86166c09c6a9be.js +0 -1
  171. package/assets/esri/core/workers/chunks/ec49e2849766402ad5c7.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3600],{8947:(e,t,i)=>{i.d(t,{L:()=>n});var r=i(60999),s=i(74887),o=i(67076);async function n(e,t,i){const n=e&&e.getAtOrigin&&e.getAtOrigin("renderer",t.origin);if(n&&"unique-value"===n.type&&n.styleOrigin){const a=await(0,r.Ke)(n.populateFromStyle());if((0,s.Te)(i),!1===a.ok){const i=a.error;t?.messages&&t.messages.push(new o.A("renderer:style-reference",`Failed to create unique value renderer from style reference: ${i.message}`,{error:i,context:t})),e.clear("renderer",t?.origin)}}}},13600:(e,t,i)=>{i.r(t),i.d(t,{default:()=>xe});var r=i(90237),s=i(13874),o=i(78888),n=i(69540),a=i(5503),l=i(49186),u=i(4718),d=i(53966),p=i(97768),y=i(92071),c=i(93637),h=i(74887),f=i(39516),m=i(84952),b=i(10107),g=i(79901),_=i(36005),w=i(40608),v=i(43937),T=i(89317),F=i(38141),M=i(16930),S=i(4146),I=i(52106),E=i(44208),A=i(92474),Z=i(61893),j=i(29953),C=i(56507),D=(i(87811),i(7695)),O=i(5443),q=i(39829),x=i(50498),L=i(96520),P=i(58501),R=i(22671);let G=0,k=class extends(A.A.LoadableMixin(Z.A.EsriPromiseMixin(a.A))){constructor(e){super(e),this._idToClientGeometry=null,this.type="memory"}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}get _workerGeometryType(){const e=this.layer?.geometryType;return e?this._geometryTypeRequiresClientGraphicMapping(e)?"polygon":e:null}applyEdits(e){return this.load().then((()=>this._applyEdits(e)))}openPorts(){return this.load().then((()=>this._connection.openPorts()))}async queryFeatures(e,t={}){await this.load(t);const i=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);(0,P.q)(e,this.layer.spatialReference,i);const r=R.A.fromJSON(i);if(!this._requiresClientGraphicMapping()||!this._idToClientGeometry)return r;const s=this.layer.objectIdField;for(const e of r.features){const t=e.attributes[s],i=this._idToClientGeometry.get(t);void 0!==i&&(e.geometry=i)}return r.geometryType=this.layer.geometryType,r}async queryFeaturesJSON(e,t={}){if(this._requiresClientGraphicMapping())throw new l.A("query-features-json:unsupported","Cannot query in JSON format for client only geometry types (mesh and extent)");await this.load(t);const i=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return(0,P.q)(e,this.layer.spatialReference,i),i}queryFeatureCount(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)))}queryObjectIds(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)))}queryExtent(e,t={}){return this.load(t).then((()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t))).then((e=>({count:e.count,extent:O.A.fromJSON(e.extent)})))}querySnapping(e,t={}){return this.load(t).then((()=>this._connection.invoke("querySnapping",e,t)))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}async _applyEdits(e){if(!this._connection)throw new l.A("feature-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField;let i=null;const r=[],s=[];await Promise.all([this._prepareClientMapping(e.addFeatures,null),this._prepareClientMapping(e.updateFeatures,null)]);const o=e=>"objectId"in e&&null!=e.objectId?e.objectId:"attributes"in e&&null!=e.attributes[t]?e.attributes[t]:null;if(e.addFeatures&&(i=this._prepareAddFeatures(e.addFeatures)),e.deleteFeatures)for(const t of e.deleteFeatures){const e=o(t);null!=e&&r.push(e)}const n=e.updateFeatures&&this._idToClientGeometry?new Map:null;if(e.updateFeatures)for(const t of e.updateFeatures)if(s.push(this._serializeFeature(t)),n&&null!=t.geometry){const e=o(t);null!=e&&n.set(e,t)}(0,L.u)(i?i.features:null,s,this.layer.spatialReference);const{fullExtent:a,featureEditResults:u}=await this._connection.invoke("applyEdits",{adds:i?i.features:[],updates:s,deletes:r});return this.fullExtent=a,i&&i.finish(u.uidToObjectId),this._updateIdToClientGeometries(n,u),this._createEditsResult(u)}async _prepareClientMapping(e,t){if("mesh"!==this._layerOrSourceGeometryType||null==e)return;const i=[];for(const{geometry:r}of e)null==r||"mesh"!==r.type||r.hasExtent||r.loaded||i.push(r.load({signal:t}));i.length&&await Promise.all(i)}_updateIdToClientGeometries(e,t){if(this._idToClientGeometry){if(e)for(const i of t.updateResults){if(!i.success)continue;const t=e.get(i.objectId);null!=t&&this._addIdToClientGeometry(t)}for(const e of t.deleteResults)e.success&&this._idToClientGeometry.delete(e.objectId)}}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}_prepareAddFeatures(e){const t=new Map,i=new Array(e.length);let r=null;for(let s=0;s<e.length;s++){const o=e[s],n=this._serializeFeature(o);r||null==o.geometry||(r=o.geometry.type),i[s]=n,t.set(`${n.uid}`,o)}const s=this;return{features:i,inferredGeometryType:r,finish(e){const i=s.sourceJSON.objectIdField;for(const r in e){const o=e[r],n=t.get(r);n&&(n.attributes||(n.attributes={}),-1===o?delete n.attributes[i]:n.attributes[i]=o,s._addIdToClientGeometry(n))}}}}_addIdToClientGeometry(e){if(!this._idToClientGeometry)return;const t=this.sourceJSON.objectIdField,i=e.attributes?.[t];null!=i&&this._idToClientGeometry.set(i,e.geometry??null)}get _layerOrSourceGeometryType(){return this.layer?.geometryType??this.sourceJSON?.geometryType}_requiresClientGraphicMapping(){return this._geometryTypeRequiresClientGraphicMapping(this._layerOrSourceGeometryType)}_geometryRequiresClientGraphicMapping(e){return this._geometryTypeRequiresClientGraphicMapping(e.type)}_geometryTypeRequiresClientGraphicMapping(e){return"mesh"===e||"multipatch"===e||"extent"===e}_serializeFeature(e){const{attributes:t}=e,i=this._geometryForSerialization(e),r=(G++).toString();return i?{uid:r,geometry:i.toJSON(),attributes:t}:{uid:r,attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:this._geometryRequiresClientGraphicMapping(t)?t.extent?q.A.fromExtent(t.extent):null:t}async _startWorker(e){this._connection=await(0,j.ho)("MemorySourceWorker",{strategy:(0,E.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:i,objectIdField:r,hasM:s,hasZ:o,timeInfo:n,dateFieldsTimeZone:a}=this.layer,l="defaults"===this.layer.originOf("spatialReference");await this._prepareClientMapping(this.items,e);const u=this._prepareAddFeatures(this.items);this.addHandles(this.on("before-changes",(e=>{d.A.getLogger(this).error("Source modifications will not propagate after layer has been loaded. Please use .applyEdits() instead"),e.preventDefault()})));const p={features:u.features,fields:t?.map((e=>e.toJSON())),geometryType:x.Ye.toJSON(this._workerGeometryType),hasM:"mesh"!==this._layerOrSourceGeometryType&&s,hasZ:"mesh"===this._layerOrSourceGeometryType||o,objectIdField:r,spatialReference:l?null:i&&i.toJSON(),timeInfo:n?.toJSON()??null,dateFieldsTimeZone:a},y=await this._connection.invoke("load",p,{signal:e});for(const e of y.warnings)d.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});y.featureErrors.length&&d.A.getLogger(this.layer).warn("#load()",`Encountered ${y.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:y.featureErrors});const c=y.layerDefinition;this._geometryTypeRequiresClientGraphicMapping(u.inferredGeometryType)&&(c.geometryType=x.Ye.toJSON(u.inferredGeometryType)),this.sourceJSON=c,this._requiresClientGraphicMapping()&&(this._idToClientGeometry=new Map),u.finish(y.assignedObjectIds)}};(0,r._)([(0,D.u)({Type:I.A,ensureType:(0,C.dp)(I.A)})],k.prototype,"itemType",void 0),(0,r._)([(0,b.MZ)()],k.prototype,"type",void 0),(0,r._)([(0,b.MZ)({constructOnly:!0})],k.prototype,"layer",void 0),(0,r._)([(0,b.MZ)({readOnly:!0})],k.prototype,"_workerGeometryType",null),(0,r._)([(0,b.MZ)()],k.prototype,"sourceJSON",void 0),k=(0,r._)([(0,w.$)("esri.layers.graphics.sources.MemorySource")],k);var J=i(52136),N=i(18768),V=i(63074),$=i(69208),K=i(6455),Q=i(47685),z=i(87718),B=i(87796),W=i(76294),H=i(16131),X=i(32756),U=i(8303),Y=i(69622);let ee=class extends Y.A{constructor(){super(...arguments),this.updating=!1,this.status="unknown"}};(0,r._)([(0,b.MZ)()],ee.prototype,"updating",void 0),(0,r._)([(0,b.MZ)()],ee.prototype,"status",void 0),ee=(0,r._)([(0,w.$)("esri.layers.support.PublishingInfo")],ee);const te=Symbol(),ie=e=>{var t;let i=class extends e{constructor(){super(...arguments),this[t]=!0}static{t=te}get publishingInfo(){if(this.destroyed)return null;const e=this._get("publishingInfo");if(e)return e;const t=new ee;return this._checkPublishingStatus(t),t}_checkPublishingStatus(e){let t=0;const i=async s=>{let o;e.updating=!0;try{o=await this.fetchPublishingStatus()}catch(e){o="unavailable"}"published"!==o&&"unavailable"!==o||("publishing"===e.status&&this.refresh(),r.remove()),e.status=o,e.updating=!1,r.removed||(t=setTimeout(i,s,s+125))},r={removed:!1,remove(){this.removed=!0,clearTimeout(t)}};this.when().catch((()=>r.remove())),i(250),this.addHandles(r)}};return(0,r._)([(0,b.MZ)({readOnly:!0,clonable:!1})],i.prototype,"publishingInfo",null),i=(0,r._)([(0,w.$)("esri.layers.mixins.PublishableLayer")],i),i};var re=i(54310),se=i(25036),oe=i(82935),ne=i(68109),ae=i(60694),le=i(10873),ue=i(15426),de=i(29005),pe=i(33143),ye=i(17036),ce=i(30524),he=i(46499),fe=i(39383),me=i(22453),be=i(96184),ge=i(17311),_e=i(91908),we=i(27733),ve=i(65494),Te=i(8947),Fe=i(41214),Me=i(61956),Se=i(54218),Ie=i(30291),Ee=i(33910),Ae=i(92935),Ze=i(78553);const je="FeatureLayer";function Ce(e,t){return new l.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function De(e){return e&&e instanceof a.A}const Oe=(0,ye.p)();function qe(e,t,i){const r=!!i?.writeLayerSchema;return{enabled:r,ignoreOrigin:r}}let xe=class extends((0,B.j)((0,W.J)((0,z.F)(ie((0,Q.w6)((0,K.FJ)((0,V.dM)((0,X.fY)((0,oe.e)((0,ne.d)((0,se.j)((0,re.J)((0,N.b)((0,H.q)((0,U.A)((0,y.P)((0,$.d)((0,J.p)(n.A.ClonableMixin(S.A)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=M.A.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=(0,h.sg)((async(e,t,r)=>{const{save:s,saveAs:o}=await i.e(3359).then(i.bind(i,33359));switch(e){case Ae.X.SAVE:return s(this,t);case Ae.X.SAVE_AS:return o(this,r,t)}}))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const i=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(h.QP).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new l.A("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>(0,ue.VA)(this,"load",e)));return this.addResolvingPromise(i),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,p.pR)(e),new ge.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,(0,me.S)(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),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&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,i){return this._readEditingEnabled(t,!0,i)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,i,r){this._writeEditingEnabled(e,t,!0,r)}get effectiveEditingEnabled(){return(0,ue.C$)(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,i,r){r?.writeLayerSchema&&(0,c.sM)(i,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return(0,ue.jD)(t.layerDefinition||t)}readObjectIdField(e,t){return(0,ue.Zm)(t.layerDefinition||t)}get parsedUrl(){const e=(0,m.An)(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=(0,m.fj)(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=(0,m.fj)(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){(0,ce.yp)(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,i){t=t.layerDefinition||t;const r=t.drawingInfo?.renderer;if(r){const e=(0,ve.L)(r,t,i)??void 0;return e||d.A.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:i}),e}return(0,ue.PD)(t,i)}set source(e){const t=this._get("source");t!==e&&(De(t)&&this._resetMemorySource(t),De(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof a.A?new k({layer:this,items:e}):e:null}readSource(e,t){const i=R.A.fromJSON(t.featureSet);return new k({layer:this,items:i?.features??[]})}readTemplates(e,t){const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e=e?.map((e=>de.A.fromJSON(e))),this._fixTemplates(e,r),this._fixTemplates(e,s),e}readTitle(e,t){const i=t.layerDefinition?.name??t.name,r=t.title||t.layerDefinition?.title;if(i){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,ae.yG)(this.url,i):i;let t=i;if(!t&&this.url){const e=(0,ae.qg)(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),(0,ae.cr)(t)}if("item-title"===this.sublayerTitleMode&&r)return r}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let i=(t=t.layerDefinition||t).typeIdField;if(i&&t.fields){i=i.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===i));e&&(i=e.name)}return i}readTypes(e,t){e=(t=t.layerDefinition||t).types;const i=t.editFieldsInfo,r=i?.creatorField,s=i?.editorField;return e?.map((e=>(e=pe.A.fromJSON(e),this._fixTemplates(e.templates,r),this._fixTemplates(e.templates,s),e)))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const i=await(0,ue.Xl)(this,e,t,je);return this.lastEditsEventDate=new Date,i}async updateAttachment(e,t,i){const r=await(0,ue.bt)(this,e,t,i,je);return this.lastEditsEventDate=new Date,r}async applyEdits(e,t){return(0,ue.ct)(this,e,t)}async uploadAssets(e,t){return(0,ue.rn)(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,Ie.tn)(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await(0,h.qr)(Promise.all([i.e(708),i.e(364),i.e(8628),i.e(2593)]).then(i.bind(i,72593)),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=(0,ue.VZ)(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,i=(0,f.mA)(this.definitionExpression,t);return e.where=i||"1=1",e}async deleteAttachments(e,t){const i=await(0,ue.mm)(this,e,t,je);return this.lastEditsEventDate=new Date,i}async fetchRecomputedExtents(e){return(0,ue.WP)(this,e,je)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return(0,ue.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){return(0,ue.Vq)(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return(0,ue.lV)(this,e,t,je)}async queryFeatures(e,t){const i=await this.load(),r=await i.source.queryFeatures(Me.A.from(e)??i.createQuery(),t);if(r?.features)for(const e of r.features)e.layer=e.sourceLayer=i;return r}async queryObjectIds(e,t){return await(0,ue.sg)(this,e,t,je)}async queryFeatureCount(e,t){return(0,ue.Ye)(this,e,t,je)}async queryExtent(e,t){return(0,ue.B5)(this,e,t,je)}async queryRelatedFeatures(e,t){return(0,ue.hM)(this,e,t,je)}async queryRelatedFeaturesCount(e,t){return(0,ue.S2)(this,e,t,je)}async queryTopFeatures(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopFeatures||!s?.query?.supportsTopFeaturesQuery)throw new l.A(je,"Layer source does not support queryTopFeatures capability");const o=await i.e(7561).then(i.bind(i,57561)),n=await r.queryTopFeatures(o.default.from(e),t);if(n?.features)for(const e of n.features)e.layer=e.sourceLayer=this;return n}async queryAttributeBins(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryAttributeBins)throw new l.A(je,"Layer source does not support queryAttributeBins capability");(0,ue.ZJ)(e,s,je);const o=await Promise.all([i.e(4575),i.e(7136)]).then(i.bind(i,14575)),n=await r.queryAttributeBins(o.default.from(e),t);if(n.features)for(const e of n.features)e.layer=e.sourceLayer=this;return n}async queryTopObjectIds(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopObjectIds||!s?.query.supportsTopFeaturesQuery)throw new l.A(je,"Layer source does not support queryTopObjectIds capability");const o=await i.e(7561).then(i.bind(i,57561));return(await r.queryTopObjectIds(o.default.from(e),t)).filter(Se.Et)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopExtents||!s?.query?.supportsTopFeaturesQuery)throw new l.A(je,"Layer source does not support queryTopExtents capability");const o=await i.e(7561).then(i.bind(i,57561));return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:s}=await this.load();if(!r.queryTopCount||!s?.query?.supportsTopFeaturesQuery)throw new l.A(je,"Layer source does not support queryFeatureCount capability");const o=await i.e(7561).then(i.bind(i,57561));return r.queryTopCount(o.default.from(e),t)}read(e,t){const i=e.featureCollection;if((i||"Feature Collection"===e.type)&&(this.resourceInfo=e),i){const{layers:e,showLegend:r}=i;1===e?.length&&(super.read(e[0],t),null!=r&&super.read({showLegend:r},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:i,layerContainerType:r,messages:s}=t;if(this.dynamicDataSource)return s?.push(Ce(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===i||"web-scene"===i)&&"tables"!==r)return s?.push(Ce(this,`a table source can only be written to tables, not ${r}`)),null;if(this._hasMemorySource())return s?.push(Ce(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===i||"web-scene"===i)&&"tables"===r)return s?.push(Ce(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new l.A(je,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||(0,_e.D)(this,e))}async save(e){return this._debouncedSaveOperations(Ae.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ae.X.SAVE_AS,t,e)}_readEditingEnabled(e,t,i){let r=e.layerDefinition?.capabilities;return r?this._hasEditingCapability(r):(r=e.capabilities,t&&"web-map"===i?.origin&&!this._hasMemorySource()&&r?this._hasEditingCapability(r):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,i,r){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";(0,c.sM)("layerDefinition.capabilities",e,t),i&&!r?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return(0,o.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return this.applyPreferredHost(t),this.findFirstValidLayerId(t)}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),(0,ce.yp)(this.renderer,this.fieldsIndex),(0,ce.sv)(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),(0,Te.L)(this,{origin:"service"})}async hasDataChanged(){return(0,ue.jp)(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: 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+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const i=e.prototype?.attributes;i&&t&&delete i[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new l.A("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new l.A("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this.addHandles([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};(0,r._)([(0,b.MZ)({clonable:!1,readOnly:!0})],xe.prototype,"_titleCreator",null),(0,r._)([(0,b.MZ)(le.zQ)],xe.prototype,"attributeTableTemplate",void 0),(0,r._)([(0,_.w)("service","capabilities")],xe.prototype,"readCapabilities",null),(0,r._)([(0,b.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],xe.prototype,"charts",void 0),(0,r._)([(0,b.MZ)({readOnly:!0})],xe.prototype,"createQueryVersion",null),(0,r._)([(0,b.MZ)({json:{read:{source:"layerDefinition.copyrightText"}}})],xe.prototype,"copyright",void 0),(0,r._)([(0,b.MZ)({json:{read:{source:"layerDefinition.displayField"}}})],xe.prototype,"displayField",void 0),(0,r._)([(0,b.MZ)({types:Ee.Es,readOnly:!0})],xe.prototype,"defaultSymbol",void 0),(0,r._)([(0,b.MZ)({type:we.L})],xe.prototype,"dynamicDataSource",void 0),(0,r._)([(0,b.MZ)({type:Boolean})],xe.prototype,"editingEnabled",null),(0,r._)([(0,_.w)(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],xe.prototype,"readEditingEnabled",null),(0,r._)([(0,_.w)("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],xe.prototype,"readEditingEnabledFromWebMap",null),(0,r._)([(0,v.K)(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],xe.prototype,"writeEditingEnabled",null),(0,r._)([(0,v.K)("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],xe.prototype,"writeEditingEnabledToWebMap",null),(0,r._)([(0,b.MZ)({readOnly:!0})],xe.prototype,"effectiveEditingEnabled",null),(0,r._)([(0,b.MZ)({clonable:!1,readOnly:!0})],xe.prototype,"featureTitleFields",null),(0,r._)([(0,b.MZ)({...Oe.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:qe}}}}})],xe.prototype,"fields",void 0),(0,r._)([(0,b.MZ)(Oe.fieldsIndex)],xe.prototype,"fieldsIndex",void 0),(0,r._)([(0,b.MZ)({type:F.A,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],xe.prototype,"formTemplate",void 0),(0,r._)([(0,b.MZ)({json:{read:{source:"layerDefinition.extent"}}})],xe.prototype,"fullExtent",void 0),(0,r._)([(0,b.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:qe,writer(e,t,i){const r=e?ue.iX.toJSON(e):null;r&&(0,c.sM)(i,r,t)}}}},read:{source:"layerDefinition.geometryType",reader:ue.iX.read}}})],xe.prototype,"geometryType",void 0),(0,r._)([(0,b.MZ)({json:{read:{source:"layerDefinition.hasM"}}})],xe.prototype,"hasM",void 0),(0,r._)([(0,b.MZ)({json:{read:{source:"layerDefinition.hasZ"}}})],xe.prototype,"hasZ",void 0),(0,r._)([(0,b.MZ)(le.id)],xe.prototype,"id",void 0),(0,r._)([(0,b.MZ)({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],xe.prototype,"infoFor3D",void 0),(0,r._)([(0,b.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],xe.prototype,"isTable",void 0),(0,r._)([(0,_.w)("service","isTable",["type","geometryType"]),(0,_.w)("isTable",["layerDefinition.type","layerDefinition.geometryType"])],xe.prototype,"readIsTable",null),(0,r._)([(0,v.K)("web-map","isTable")],xe.prototype,"writeIsTable",null),(0,r._)([(0,b.MZ)(le.kF)],xe.prototype,"labelsVisible",void 0),(0,r._)([(0,b.MZ)({type:[he.A],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:fe.w,write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:fe.w,write:{layerContainerTypes:T.K}}})],xe.prototype,"labelingInfo",void 0),(0,r._)([(0,b.MZ)((()=>{const e=(0,u.o8)(le.Ih);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,i){(0,c.sM)(i,(0,Ze.p)(e),t)}}},e})())],xe.prototype,"opacity",void 0),(0,r._)([(0,b.MZ)(le.fV)],xe.prototype,"legendEnabled",void 0),(0,r._)([(0,b.MZ)({type:["show","hide"],json:(()=>{const e=(0,u.o8)(le.C1.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],xe.prototype,"listMode",void 0),(0,r._)([(0,_.w)("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],xe.prototype,"readGlobalIdField",null),(0,r._)([(0,b.MZ)({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:qe}}}}})],xe.prototype,"objectIdField",void 0),(0,r._)([(0,_.w)("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],xe.prototype,"readObjectIdField",null),(0,r._)([(0,b.MZ)({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:T.K}}})],xe.prototype,"operationalLayerType",void 0),(0,r._)([(0,b.MZ)(Oe.outFields)],xe.prototype,"outFields",void 0),(0,r._)([(0,b.MZ)({readOnly:!0})],xe.prototype,"parsedUrl",null),(0,r._)([(0,b.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],xe.prototype,"path",void 0),(0,r._)([(0,b.MZ)(le.M6)],xe.prototype,"popupEnabled",void 0),(0,r._)([(0,b.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],xe.prototype,"popupTemplate",void 0),(0,r._)([(0,b.MZ)({readOnly:!0})],xe.prototype,"defaultPopupTemplate",null),(0,r._)([(0,b.MZ)({types:Fe.Hg,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Fe.XJ,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:T.K,overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema,layerContainerTypes:T.K})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,i)=>({ignoreOrigin:i?.writeLayerSchema,layerContainerTypes:T.K})}}})],xe.prototype,"renderer",null),(0,r._)([(0,_.w)("service","renderer",["drawingInfo.renderer","defaultSymbol"]),(0,_.w)("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],xe.prototype,"readRenderer",null),(0,r._)([(0,b.MZ)()],xe.prototype,"resourceInfo",void 0),(0,r._)([(0,b.MZ)((()=>{const e=(0,u.o8)(le.PY);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],xe.prototype,"screenSizePerspectiveEnabled",void 0),(0,r._)([(0,b.MZ)({clonable:!1})],xe.prototype,"source",null),(0,r._)([(0,g.w)("source")],xe.prototype,"castSource",null),(0,r._)([(0,_.w)("portal-item","source",["featureSet"]),(0,_.w)("web-map","source",["featureSet"])],xe.prototype,"readSource",null),(0,r._)([(0,b.MZ)({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],xe.prototype,"spatialReference",void 0),(0,r._)([(0,b.MZ)({type:Number})],xe.prototype,"subtypeCode",void 0),(0,r._)([(0,b.MZ)({type:[de.A]})],xe.prototype,"templates",void 0),(0,r._)([(0,_.w)("templates",["editFieldsInfo","creatorField","editorField","templates"])],xe.prototype,"readTemplates",null),(0,r._)([(0,b.MZ)({type:be.A})],xe.prototype,"timeInfo",void 0),(0,r._)([(0,b.MZ)()],xe.prototype,"title",void 0),(0,r._)([(0,_.w)("service","title",["name"]),(0,_.w)("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],xe.prototype,"readTitle",null),(0,r._)([(0,_.w)("web-map","title",["layerDefinition.name","title"])],xe.prototype,"readTitleFromWebMap",null),(0,r._)([(0,b.MZ)({type:String})],xe.prototype,"sublayerTitleMode",void 0),(0,r._)([(0,b.MZ)({json:{read:!1}})],xe.prototype,"type",void 0),(0,r._)([(0,b.MZ)({type:String})],xe.prototype,"typeIdField",void 0),(0,r._)([(0,_.w)("service","typeIdField"),(0,_.w)("typeIdField",["layerDefinition.typeIdField"])],xe.prototype,"readTypeIdField",null),(0,r._)([(0,b.MZ)({type:[pe.A]})],xe.prototype,"types",void 0),(0,r._)([(0,_.w)("service","types",["types"]),(0,_.w)("types",["layerDefinition.types"])],xe.prototype,"readTypes",null),(0,r._)([(0,b.MZ)({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility",layerContainerTypes:T.K}}}}})],xe.prototype,"visible",void 0),(0,r._)([(0,_.w)("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],xe.prototype,"readVisible",null),xe=(0,r._)([(0,w.$)("esri.layers.FeatureLayer")],xe)},68109:(e,t,i)=>{i.d(t,{d:()=>w});var r=i(90237),s=i(10107),o=(i(44208),i(53966),i(87811),i(40608)),n=i(13874),a=i(69540),l=i(25482),u=i(93637),d=i(43937),p=i(50820),y=i(10873),c=i(46499),h=i(41214);let f=class extends(a.A.ClonableMixin(l.A)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,r._)([(0,s.MZ)({type:[c.A],json:{write:!0}})],f.prototype,"labelingInfo",void 0),(0,r._)([(0,s.MZ)(y.kF)],f.prototype,"labelsVisible",void 0),(0,r._)([(0,s.MZ)({types:h.Hg,json:{write:!0}})],f.prototype,"renderer",void 0),(0,r._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"visible",void 0),f=(0,r._)([(0,o.$)("esri.layers.support.TrackPartInfo")],f);var m=i(96576),b=i(59868),g=i(26253);let _=class extends(a.A.ClonableMixin(l.A)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new f({renderer:new m.A({symbol:b.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new f({renderer:new m.A({symbol:b.UK.clone()})}),this.trackLines=new f({renderer:new m.A({symbol:b.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,i){const r=e.filter((e=>"avg_angle"!==e.statisticType)).map((e=>e.toJSON()));(0,u.sM)(i,r,t)}};(0,r._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],_.prototype,"enabled",void 0),(0,r._)([(0,s.MZ)({type:[p.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,r._)([(0,d.K)("fields")],_.prototype,"writeFields",null),(0,r._)([(0,s.MZ)({type:f,json:{write:!0}})],_.prototype,"latestObservations",void 0),(0,r._)([(0,s.MZ)({type:g.T,json:{write:!0}})],_.prototype,"maxDisplayDuration",void 0),(0,r._)([(0,s.MZ)({type:Number,json:{write:!0}})],_.prototype,"maxDisplayObservationsPerTrack",void 0),(0,r._)([(0,s.MZ)(y.M6)],_.prototype,"popupEnabled",void 0),(0,r._)([(0,s.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],_.prototype,"popupTemplate",void 0),(0,r._)([(0,s.MZ)({type:f,json:{write:!0}})],_.prototype,"previousObservations",void 0),(0,r._)([(0,s.MZ)({type:f,json:{write:!0}})],_.prototype,"trackLines",void 0),(0,r._)([(0,s.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],_.prototype,"timeField",void 0),_=(0,r._)([(0,o.$)("esri.layers.support.TrackInfo")],_);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.trackInfo=null}};return(0,r._)([(0,s.MZ)({type:_})],t.prototype,"trackInfo",void 0),t=(0,r._)([(0,o.$)("esri.layers.mixins.TrackableLayer")],t),t}},96520:(e,t,i)=>{i.d(t,{u:()=>n});var r=i(83047),s=i(21325);function o(e,t,i){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=i)}function n(e,t,i){if(!e&&!t||!i)return;const s=(0,r.G9)(i);a(e,i,s),a(t,i,s)}function a(e,t,i){if(e)for(const r of e)l(r.geometry,t,i)}function l(e,t,i){if(!e?.spatialReference||(0,s.aI)(e.spatialReference,t))return;const n=(0,r.G9)(e.spatialReference)/i;if(1!==n)if("x"in e)null!=e.z&&(e.z*=n);else if("rings"in e)o(e,e.rings,n);else if("paths"in e)o(e,e.paths,n);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=n)}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2765,3186,5011,9141],{4197:(e,t,r)=>{r.d(t,{jh:()=>i,l5:()=>s,xm:()=>o});var n=r(34275);function i(e,t=!1){return e<=n.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function o(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function s(e,t,r){return Array.isArray(e)?e.slice(t,t+r):e.subarray(t,t+r)}},6797:(e,t,r)=>{r.d(t,{Mj:()=>d,Ui:()=>y,w2:()=>h});var n=r(69622),i=r(5503),o=r(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof i.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof i.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const n=l(e),i=l(t);if(0===n.length&&0===i.length)return;if(!n.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter((e=>!n.includes(e))),d=n.filter((e=>!i.includes(e))),h=n.filter((r=>i.includes(r)&&u(e,r)!==u(t,r))).concat(o,d).sort(),y=c(e);if(y&&s.has(y)&&h.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const n of h){const i=u(e,n),o=u(t,n);let s;if((m||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[n]&&"function"==typeof r[n])s=r[n]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;s={type:"complete",oldValue:i,newValue:o}}else s="object"==typeof i&&"object"==typeof o&&c(i)===c(o)?p(i,o):{type:"complete",oldValue:i,newValue:o};null!=s&&(null!=f?f.diff[n]=s:f={type:"partial",diff:{[n]:s}})}}return f}function d(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let n=e;for(const e of r){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}(e,t)}function h(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},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}},17311:(e,t,r)=>{r.d(t,{A:()=>d});var n=r(90237),i=r(69622),o=r(4576),s=r(60999),a=r(5503),l=r(10107),u=(r(44208),r(53966),r(40608)),c=r(30524),p=r(43668);let d=class extends i.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,s.UT)((()=>(0,p.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([r.e(4560),r.e(9926)]).then(r.bind(r,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const r=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(r.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:r,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(r,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const r=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of r){const r=t.split("."),n=this.fieldsIndex.get(r.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const r of t){const t=this.fieldsIndex.get(r);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,r){return(await this.getTitles(e,[t],r)).get(t)??""}async getTitles(e,t,r){const n=new Map,i=r?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:o}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);r?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:s,workingTitle:a}=this,l=a&&s;t.forEach((t=>{const r=l?o({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:s,globalAttributes:this._createFormattedAttributes(e,t,i).global,layer:e,text:a}):"";n.set(t,r)}))}catch{}return n}async _checkAndReQueryGraphics(e,t){const r=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(o.Ru);if(r.length!==t.length)return t;if(t.some((e=>!(0,c.Kl)(e,this.requiredFields)))){const n=e.createQuery();n.where="1=1",n.outFields=[...this.requiredFields],n.objectIds=r;const i=await e.queryFeatures(n);if(i?.features.length===t.length)return i.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const r of e){if(!r.fieldName)continue;const e=this.fieldsIndex.get(r.fieldName),n=e?.name??r.fieldName;r.fieldName=n,t.set(n.toLowerCase(),r)}return t}_createFormattedAttributes(e,t,r="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],i={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const r=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{i[`expression/${e.name}`]=e.func({vars:{$feature:r}})}catch{}}const o={...t.attributes,...i};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:o,graphic:t,timeZone:r,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"_arcadeTask",null),(0,n._)([(0,l.MZ)()],d.prototype,"_featureUtils",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"featureUtilsPromise",null),(0,n._)([(0,l.MZ)({readOnly:!0})],d.prototype,"calculatedExpressions",null),(0,n._)([(0,l.MZ)()],d.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,l.MZ)()],d.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"fieldInfoMap",null),(0,n._)([(0,l.MZ)()],d.prototype,"fields",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"objectIdField",void 0),(0,n._)([(0,l.MZ)()],d.prototype,"requiredFields",null),d=(0,n._)([(0,u.$)("esri.layers.support.TitleCreator")],d)},27865:(e,t,r)=>{r.d(t,{O9:()=>o,dw:()=>s,mj:()=>i});var n=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function o(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,n.sK)(r[e]))}function s(e){const t=e[0];return!!t&&"type"in t}},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>y,XJ:()=>f,lc:()=>h,mX:()=>b,rU:()=>g,tH:()=>F});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 h(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function y(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=h(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function b(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,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,_=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,v=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=M.exec(e)||_.exec(e);return t?t[1]||t[3]:(t=v.exec(e),t?t[2]:null)}},37531:(e,t,r)=>{r.d(t,{dt:()=>d,GG:()=>g,UQ:()=>m,Sx:()=>c});var n=r(68197),i=r(60999),o=(r(44208),r(51850)),s=(r(76369),r(62046)),a=(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 a.q(1e3),new n.A([128,128,128]);var l=r(28975),u=r(33910);function c(e,t){if(!e)return null;let r=null;return(0,u.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,u.$y)(e)&&(r="cim"===e.type?(0,s.Nk)(e):e.color?new n.A(e.color):null),r?p(r,t):null}function p(e,t){if(null==t||null==e)return e;const r=e.toRgba();return r[3]=r[3]*t,new n.A(r)}function d(e,t,r){e&&(t||null!=r)&&(t&&(t=new n.A(t)),(0,u.wk)(e)?function(e,t,r){const i=e.symbolLayers;if(!i)return;const o=(e,i=!1)=>{let o=t??e??null;return null!=r?.override&&(!o&&i&&(o=new n.A([255,255,255])),o&&(o.a=r.override)),p(o,r?.add)};i.forEach((e=>{if("water"===e.type)return void(e.color=p(e.color,r?.add));const t=null!=e.material?e.material.color:null,n=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:n}):e.material.color=n,"outline"in e&&e.outline?.color&&null!=r?.add&&(e.outline.color=p(e.outline.color,r.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))}))}(e,t,r):(0,u.$y)(e)&&function(e,t,r){t=t??e.color,null!=r?.override&&t&&(t.a=r.override),t&&(e.color=p(t,r?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,r?.add))}(e,t,r))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(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 null}function f(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,u.wk)(e)?async function(e,t){const n=e.symbolLayers;n&&await(0,i.jJ)(n,(async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const r=t[2];"number"==typeof r&&(e.size=r)}(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=y(t,o.Un,[e.width,void 0,e.height]);null!=r&&(e.width=f(t[0],e.width,1,r),e.height=f(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=y(t,n,i);null!=o&&(e.width=f(t[0],i[0],n[0],o),e.depth=f(t[1],i[1],n[1],o),e.height=f(t[2],i[2],n[2],o))}(e,t)}}(e,t)))}(e,t):void((0,u.$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,u.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,u.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},39516:(e,t,r)=>{let n;async function i(){return null==n&&(n=Promise.all([r.e(8368),r.e(4123)]).then(r.bind(r,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function o(e,t){const r=await i(),n=r.get(e,t);if(null==n)throw r.getError(e,t);return n}function s(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}r.d(t,{GP:()=>o,IW:()=>a,mA:()=>s})},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var n=r(90237),i=r(66552),o=r(53966),s=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&c||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,s.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,s.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,r)=>{r.d(t,{Ch:()=>s,mW:()=>o});var n=r(34727),i=r(39516);function o(e,t){return{...t,filterMode:e.mode}}function s(e,t,r){const o=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(r)),t[1]=Math.min(t[1],p(n));return t}(e);if(o&&((0,n.gg)(t,o[0])||(0,n.ZH)(r,o[1])))return"";const s=Array.from(a(e,t,r)),l=function(e,t,r){if(0===e.length)return!0;const i=c(e.at(0)?.minScale),o=p(e.at(-1)?.maxScale);if((0,n.ZH)(i,t)||(0,n.gg)(o,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],i=e[t+1];if((0,n.ZH)(c(i.minScale),p(r.maxScale)))return!0}return!1}(s,t,r)?"1=1":s.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,i.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,r){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,r)&&(yield n)}}function l(e,t,r,i){return e=c(e),r=c(r),t=p(t),!(!(0,n.Sp)(r,e)&&(i??r)>e||(0,n.Hx)(t,r)||void 0!==i&&(0,n.Sp)(i,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function p(e){return e||0}},50498:(e,t,r)=>{r.d(t,{Ye:()=>p,gy:()=>c,yR:()=>d});var n=r(66552),i=r(5443),o=r(91075),s=r(48526),a=r(86738),l=r(39829),u=r(82799);const c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),p=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:o.A,key:"type",typeMap:{extent:i.A,multipoint:s.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,r)=>{r.d(t,{A:()=>M});var n,i=r(90237),o=r(13874),s=r(69540),a=r(51447),l=r(25482),u=r(53966),c=r(36708),p=r(24326),d=r(10107),h=(r(44208),r(87811),r(40608)),y=r(12195),f=r(65864),m=r(50498),g=r(54339),b=r(33910);function w(e){if(null==e)return null;const t={};for(const r in e){const n=e[r];n&&(t[r]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends(s.A.ClonableMixin(l.A)){static{n=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:w(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,y.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=n),"attributes"===e&&(i.attributeName=n),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,c.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,i._)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const n=(0,f.rS)(e[r]);n&&(t[r]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,i._)([(0,d.MZ)({value:null})],M.prototype,"attributes",null),(0,i._)([(0,d.MZ)({value:null,types:m.yR,json:{read:f.rS}})],M.prototype,"geometry",null),(0,i._)([(0,d.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,i._)([(0,d.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,i._)([(0,d.MZ)({type:o.A,value:null})],M.prototype,"popupTemplate",null),(0,i._)([(0,d.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,i._)([(0,d.MZ)({value:null,types:b.Es})],M.prototype,"symbol",null),(0,i._)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,i._)([(0,d.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,i._)([(0,h.$)("esri.Graphic")],M)},54339:(e,t,r)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const n of t.fieldNames)r.push(e.attributes[n]??null);return JSON.stringify(r)}}}function i(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>n,r:()=>i})},59247:(e,t,r)=>{r.d(t,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>p,Nd:()=>d,jm:()=>h,sK:()=>m});var n=r(40876),i=r(90629);function o(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const s=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:o,fromValues:function(e,t,r,n,i,o,s,a,l,u,c,p,d,h,y,f){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=n,m[4]=i,m[5]=o,m[6]=s,m[7]=a,m[8]=l,m[9]=u,m[10]=c,m[11]=p,m[12]=d,m[13]=h,m[14]=y,m[15]=f,m}},Symbol.toStringTag,{value:"Module"}));var a=r(58083);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=y(e.strength,t.strength,r),this.radius=y(e.radius,t.radius,r),this.threshold=y(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:f(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(y(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:f(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,n=(0,a.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,a.mg)(n,n)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(r,r)})(e)}}}class p{constructor(e,t,r,n){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=n,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=y(e.offsetX,t.offsetX,r),this.offsetY=y(e.offsetY,t.offsetY,r),this.blurRadius=y(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(y(e.color[0],t.color[0],r)),this.color[1]=Math.round(y(e.color[1],t.color[1],r)),this.color[2]=Math.round(y(e.color[2],t.color[2],r)),this.color[3]=y(e.color[3],t.color[3],r)}clone(){return new p(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:f(this.offsetX),yoffset:f(this.offsetY),blurRadius:f(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=y(e.angle,t.angle,r),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||o();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),n=Math.cos(t*Math.PI/180),i=(0,a.hZ)(e,.213+.787*n-.213*r,.715-.715*n-.715*r,.072-.072*n+.928*r,0,.213-.213*n+.143*r,.715+.285*n+.14*r,.072-.072*n-.283*r,0,.213-.213*n-.787*r,.715-.715*n+.715*r,.072+.928*n+.072*r,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.angle)}}class h{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=y(e.amount,t.amount,r)}clone(){return new h(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function y(e,t,r){return e+(t-e)*r}function f(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new h(1);case"hue-rotate":return new d(0);case"blur":return new u(0);case"drop-shadow":return new p(0,0,0,[...(0,n.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},59929:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Oe});var n=r(90237),i=r(69540),o=r(5503),s=r(49186),a=r(81583),l=r(91869),u=r(92071),c=r(74887),p=r(36708),d=r(39516),h=r(84952),y=r(10107),f=(r(44208),r(53966)),m=(r(87811),r(36005)),g=r(40608),b=r(4146),w=r(52136),M=r(18768),_=r(63074),v=r(69208),F=r(6455),I=r(47685),T=r(87796),x=r(16131),A=r(8303),S=r(54310),C=r(25036),Z=r(82935),O=r(60694),k=r(10873),E=r(15426),j=r(17036),L=r(30524),N=r(85334),P=r(90360),R=r(86162),q=r(92438),G=r(96576),$=r(93618),z=r(62046),V=r(37531);const D={key:"type",base:q.A,errorContext:"renderer",typeMap:{simple:G.A,"unique-value":$.A,"class-breaks":R.A}},U=(0,P.C)({types:D}),J=["#ed5151","#149ece","#a7c636","#9e559c","#fc921f","#ffde3e","#f789d8","#b7814a","#3caf99","#6b6bd6","#b54779","#7f7f7f"];var B=r(13874),H=r(4902),Y=r(4718),X=r(92474),Q=r(97768),W=r(93637),K=r(43937),ee=r(89317),te=r(38141),re=r(16930),ne=r(29005),ie=r(46499),oe=r(39383),se=r(17311),ae=r(61956),le=r(30291),ue=r(59868),ce=r(43440);const pe=(0,j.p)();let de=0;function he(e,t){let r=e.json.write;return"object"!=typeof r&&(r=e.json.write={}),r.ignoreOrigin=!0,t?.spatialOnly&&(r.layerContainerTypes=ee.K),e}function ye(e){const t={write:{ignoreOrigin:!0}};return e?.name&&(t.name=e.name),"object"==typeof t.write&&(e?.spatialOnly&&(t.write.layerContainerTypes=ee.K),e?.target&&(t.write.target=e.target)),t}function fe(e){switch(e){case"point":case"multipoint":return ue.UK.clone();case"polyline":return ue.A7.clone();case"polygon":case"multipatch":return ue.Cx.clone();default:return null}}function me(e,t){return null==e?null:t.subtypes?.find((t=>t.code===e))}function ge(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=me(e,t);if(null!=i){const{defaultValues:e}=i;for(const t in e)n[t]=e[t]}return n[t.subtypeField]=e,new ne.A({name:"New Feature",drawingTool:r,prototype:{attributes:n}})}let be=class extends((0,u.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-${de++}`,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,L.yp)(this.renderer,this.fieldsIndex),Promise.resolve(this)}get _titleCreator(){const e=this._get("_titleCreator");return(0,Q.pR)(e),new se.A({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,displayField:this.parent?.displayField??"",fields:this.fields,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}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}get featureTitleFields(){return[...this._titleCreator.requiredFields]}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,Y.o8)(e);o?.length&&(0,W.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?.length||!!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 isTable(){return!!this.parent?.isTable}get geometryType(){return this.parent?.geometryType}get globalIdField(){return this.parent?this.parent.globalIdField:(f.A.getLogger(this).error(_e("globalIdField")),null)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}get objectIdField(){return this.parent||f.A.getLogger(this).error(_e("objectIdField")),this.parent?.objectIdField}get defaultPopupTemplate(){return this.createPopupTemplate()}get relationships(){return this.parent?.relationships}set renderer(e){(0,L.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 G.A({symbol:fe(e)})}(e.geometryType):null}readRendererFromService(e,t,r){if("Table"===t.type)return null;const n=t.drawingInfo?.renderer,i=U(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 G.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:U(n,t,r)||void 0}get spatialReference(){return this.parent?.spatialReference??re.A.WGS84}get subtypeField(){return this.parent?.subtypeField}readTemplatesFromService(e,t){return[ge(this.subtypeCode,t)]}readTitleFromService(e,t){const r=me(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 _e("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 _e("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 _e("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 _e("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,le.tn)(t,e)}createQuery(){if(!this.parent)throw _e("createQuery");const e=(0,E.VZ)(this.parent),t=`${this.parent.subtypeField}=${this.subtypeCode}`;return e.where=(0,d.mA)(t,this.parent.definitionExpression),e}getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){if(!t?.excludeImpliedDomains&&this.parent){const t=(0,E.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 _e("queryAttachments");const n=e.clone();return n.where=Me(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 _e("queryFeatureCount");return r.parent.queryFeatureCount(we(r.parent,r,e),t)}async queryFeatures(e,t){const r=await this.load();if(!r.parent)throw _e("queryFeatures");return r.parent.queryFeatures(we(r.parent,r,e),t)}async queryObjectIds(e,t){const r=await this.load();if(!r.parent)throw _e("queryObjectIds");return r.parent.queryObjectIds(we(r.parent,r,e),t)}async queryRelatedFeatures(e,t){const r=await this.load();if(!r.parent)throw _e("queryRelatedFeatures");return r.parent.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){const r=await this.load();if(!r.parent)throw _e("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)({clonable:!1,readOnly:!0})],be.prototype,"_titleCreator",null),(0,n._)([(0,y.MZ)({type:ce.A,json:ye({name:"attributeTableInfo"})})],be.prototype,"attributeTableTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"capabilities",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"effectiveCapabilities",null),(0,n._)([(0,y.MZ)({json:ye()})],be.prototype,"charts",void 0),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:ye({name:"enableEditing"})})],be.prototype,"editingEnabled",void 0),(0,n._)([(0,y.MZ)({type:Boolean,readOnly:!0})],be.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"elevationInfo",null),(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],be.prototype,"featureTitleFields",null),(0,n._)([(0,y.MZ)({json:{name:"layerDefinition.fieldOverrides",origins:{service:{read:!1}},write:{ignoreOrigin:!0,allowNull:!0}}})],be.prototype,"fieldOverrides",void 0),(0,n._)([(0,K.K)("fieldOverrides")],be.prototype,"writeFieldOverrides",null),(0,n._)([(0,y.MZ)({...pe.fields,readOnly:!0,json:{read:!1}})],be.prototype,"fields",null),(0,n._)([(0,y.MZ)(pe.fieldsIndex)],be.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"floorInfo",null),(0,n._)([(0,y.MZ)({type:te.A,json:ye({name:"formInfo"})})],be.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}}})],be.prototype,"id",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"isTable",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"geometryType",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"globalIdField",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"type",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.kF)))],be.prototype,"labelsVisible",void 0),(0,n._)([(0,y.MZ)({type:[ie.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",origins:{service:{read:!1}},read:{reader:oe.w},write:{ignoreOrigin:!0,layerContainerTypes:ee.K}}})],be.prototype,"labelingInfo",void 0),(0,n._)([(0,y.MZ)({type:["ArcGISFeatureLayer"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,layerContainerTypes:ee.K}}})],be.prototype,"layerType",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.fV)))],be.prototype,"legendEnabled",void 0),(0,n._)([(0,y.MZ)({type:["show","hide"]})],be.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Y.o8)(k.hn);return e.json.origins.service.read=!1,he(e,{spatialOnly:!0})})())],be.prototype,"minScale",void 0),(0,n._)([(0,y.MZ)((()=>{const e=(0,Y.o8)(k.hG);return e.json.origins.service.read=!1,he(e,{spatialOnly:!0})})())],be.prototype,"maxScale",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"effectiveScaleRange",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"objectIdField",null),(0,n._)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0,json:ye({spatialOnly:!0})})],be.prototype,"opacity",void 0),(0,n._)([(0,y.MZ)({clonable:!1})],be.prototype,"parent",void 0),(0,n._)([(0,y.MZ)(he((0,Y.o8)(k.M6)))],be.prototype,"popupEnabled",void 0),(0,n._)([(0,y.MZ)({type:B.A,json:ye({name:"popupInfo"})})],be.prototype,"popupTemplate",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"defaultPopupTemplate",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"relationships",null),(0,n._)([(0,y.MZ)({types:D,json:ye({target:"layerDefinition.drawingInfo.renderer",spatialOnly:!0})})],be.prototype,"renderer",null),(0,n._)([(0,m.w)("service","renderer",["drawingInfo.renderer","subtypeField","type"])],be.prototype,"readRendererFromService",null),(0,n._)([(0,m.w)("renderer",["layerDefinition.drawingInfo.renderer"])],be.prototype,"readRenderer",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"spatialReference",null),(0,n._)([(0,y.MZ)({type:Number,json:{origins:{service:{read:!1}},write:{ignoreOrigin:!0}}})],be.prototype,"subtypeCode",void 0),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"subtypeField",null),(0,n._)([(0,y.MZ)({type:[ne.A],json:ye({name:"layerDefinition.templates"})})],be.prototype,"templates",void 0),(0,n._)([(0,m.w)("service","templates",["geometryType","subtypeField","subtypes","type"])],be.prototype,"readTemplatesFromService",null),(0,n._)([(0,y.MZ)({type:String,json:ye()})],be.prototype,"title",void 0),(0,n._)([(0,m.w)("service","title",["subtypes"])],be.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],be.prototype,"url",null),(0,n._)([(0,y.MZ)({readOnly:!0})],be.prototype,"userHasUpdateItemPrivileges",null),(0,n._)([(0,y.MZ)({type:Boolean,nonNullable:!0,json:ye({name:"visibility",spatialOnly:!0})})],be.prototype,"visible",void 0),be=(0,n._)([(0,g.$)("esri.layers.support.SubtypeSublayer")],be);const we=(e,t,r)=>{if(!r)return t.createQuery();const n=ae.A.from(r);return n.where=Me(n.where,e.subtypeField,t.subtypeCode),n},Me=(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,d.mA)(i,o)},_e=e=>new s.A("subtype-sublayer:parent-missing",`This sublayer must have a parent SubtypeGroupLayer in order to use ${e}`);var ve=r(96184),Fe=r(91908),Ie=r(54218),Te=r(92935);const xe="SubtypeGroupLayer";function Ae(e,t){return new s.A("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function Se(e,t){const r=[];for(const n of e){const e=new be;e.read(n,t),r.push(e)}return r}const Ce=(0,j.p)();let Ze=class extends((0,T.j)((0,F.FJ)((0,I.w6)((0,_.dM)((0,Z.e)((0,C.j)((0,S.J)((0,M.b)((0,x.q)((0,A.A)((0,u.P)((0,v.d)((0,w.p)(i.A.ClonableMixin(b.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","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=(0,c.sg)((async(e,t,n)=>{const{save:i,saveAs:o}=await r.e(5740).then(r.bind(r,33359));switch(e){case Te.X.SAVE:return i(this,t);case Te.X.SAVE_AS:return o(this,n,t)}})),this.addHandles((0,p.wB)((()=>this.sublayers),((e,t)=>this._handleSublayersChange(e,t)),p.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(c.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,E.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,E.C$)(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}get parsedUrl(){const e=(0,h.An)(this.url);return null!=e&&null!=this.layerId&&(e.path=(0,h.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,O.yG)(this.url,t):t}async addAttachment(e,t){const r=await(0,E.Xl)(this,e,t,xe);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const n=await(0,E.bt)(this,e,t,r,xe);return this.lastEditsEventDate=new Date,n}async applyEdits(e,t){return(0,E.ct)(this,e,t)}on(e,t){return super.on(e,t)}async createGraphicsSource(e){const{default:t}=await(0,c.qr)(Promise.all([r.e(708),r.e(364),r.e(8628),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,E.VZ)(this),t=this.sublayers.map((e=>e.subtypeCode));return e.where=(0,d.mA)(`${this.subtypeField} IN (${t.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,t){const r=await(0,E.mm)(this,e,t,xe);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return(0,E.WP)(this,e,xe)}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,E.pc)(this,e);if(t)return t}const r=(0,E.Nv)(this,t?.feature);if(r){const t=r.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}return this._getLayerDomain(e)}loadAll(){return(0,a.g)(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,t){return(0,E.lV)(this,e,t,xe)}async queryFeatures(e,t){const r=await this.load(),n=ae.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(await(0,E.sg)(this,e,t,xe)).filter(Ie.Et)}async queryFeatureCount(e,t){return(0,E.Ye)(this,e,t,xe)}async queryExtent(e,t){return(0,E.B5)(this,e,t,xe)}async queryRelatedFeatures(e,t){return(0,E.hM)(this,e,t,xe)}async queryRelatedFeaturesCount(e,t){return(0,E.S2)(this,e,t,xe)}async save(e){return this._debouncedSaveOperations(Te.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Te.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(Ae(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(Ae(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,Fe.D)(this,e)}async getFeatureTitle(e,t){const r=this.findSublayerForFeature(e);return r?await r.getFeatureTitle(e,t):this._getFeatureTitleForUnknownSublayer(e)}async getFeatureTitles(e,t){const r=new Map,n=new Map,i=[n];e.forEach((e=>{const t=this.findSublayerForFeature(e);t?(0,l.tE)(r,t,(()=>[])).push(e):n.set(e,this._getFeatureTitleForUnknownSublayer(e))}));const o=await Promise.all(Array.from(r).map((([e,r])=>e.getFeatureTitles(r,t))));return o.forEach((e=>i.push(e))),new Map(i.flatMap((e=>[...e])))}get featureTitleFields(){const e=new Set;for(const t of this.sublayers){const r=t.featureTitleFields;for(const t of r)e.add(t)}return[...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,L.sv)(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return(0,E.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"))}_getFeatureTitleForUnknownSublayer(e){const{displayField:t,fieldsIndex:r,objectIdField:n}=this;if(t&&r.has(t))return e.attributes[r.get(t).name]??"";const i=e.getObjectId();return null!=i?i.toString():n&&r.has(n)?e.attributes[r.get(n).name]??"":""}};(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"createQueryVersion",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"editingEnabled",null),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"effectiveEditingEnabled",null),(0,n._)([(0,y.MZ)({...Ce.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Ze.prototype,"fields",void 0),(0,n._)([(0,y.MZ)(Ce.fieldsIndex)],Ze.prototype,"fieldsIndex",void 0),(0,n._)([(0,y.MZ)(k.id)],Ze.prototype,"id",void 0),(0,n._)([(0,y.MZ)({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Ze.prototype,"listMode",void 0),(0,n._)([(0,y.MZ)({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{"web-document":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}},"portal-item":{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],Ze.prototype,"operationalLayerType",null),(0,n._)([(0,y.MZ)(Ce.outFields)],Ze.prototype,"outFields",void 0),(0,n._)([(0,y.MZ)({readOnly:!0})],Ze.prototype,"parsedUrl",null),(0,n._)([(0,y.MZ)({clonable:!1})],Ze.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?U(r,e,t):null;if("simple"===n?.type)return(0,V.Sx)(n.symbol,null)?n.symbol.clone():null}(t,r);n=i?function(e,t){return(0,N.Iy)(J,e,{offset:!0,shuffle:!0}).reverse().map((e=>{const r=t.clone();return"cim"===r.type?(0,z.Fe)(r,e):(0,V.dt)(r,e),new G.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)}}}},read:{source:["layers","tables"],reader(e,t,r){let n;return"SubtypeGroupLayer"===t.layerType&&t.layers?.length?n=Se(t.layers,r):"SubtypeGroupTable"===t.layerType&&t.tables?.length&&(n=Se(t.tables,r)),new(o.A.ofType(be))(n)}},write:{ignoreOrigin:!0,writer(e,t,r,n){const i=[];for(const t of e){const e=t.write({},n);i.push(e)}this.isTable?t.tables=i:t.layers=i}}}})],Ze.prototype,"sublayers",void 0),(0,n._)([(0,y.MZ)()],Ze.prototype,"useUniqueColorsForSublayers",void 0),(0,n._)([(0,y.MZ)({type:ve.A})],Ze.prototype,"timeInfo",void 0),(0,n._)([(0,y.MZ)({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],Ze.prototype,"title",void 0),(0,n._)([(0,m.w)("service","title",["name"])],Ze.prototype,"readTitleFromService",null),(0,n._)([(0,y.MZ)({json:{read:!1}})],Ze.prototype,"type",void 0),(0,n._)([(0,y.MZ)({clonable:!1,readOnly:!0})],Ze.prototype,"featureTitleFields",null),Ze=(0,n._)([(0,g.$)("esri.layers.SubtypeGroupLayer")],Ze);const Oe=Ze},62046:(e,t,r)=>{r.d(t,{Fe:()=>c,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"CIMGradientFill":l(t,e);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){const r=t.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach((t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function c(e,t,r){t instanceof n.A||(t=new n.A(t));const o=(0,i.lW)(e);o&&p(o,t,r)}function p(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=>{p(e.symbol,t,r)}));break;case"CIMSolidStroke":case"CIMSolidFill":e.color=n;break;case"CIMGradientFill":d(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,r)}}}function d(e,t){const r=e.colorRamp?.type;switch(r){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach((e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)}));break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const r=t.clone();r.a=0,e.toColor=r.toArray()}}},70328:(e,t,r)=>{r.d(t,{BI:()=>b,Ej:()=>d,Ie:()=>m,Jt:()=>g,Ne:()=>h,RF:()=>c,aI:()=>M,fA:()=>s,gE:()=>l,hZ:()=>f,iT:()=>p,is:()=>w,qv:()=>_,vI:()=>y,vY:()=>a,v_:()=>v,vt:()=>o,w1:()=>u});var n=r(5443),i=(r(19419),r(4197));function o(e=v){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,n,i,s,a=o()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=s,a}function a(e,t=o()){return function(e,t,r,n=o()){return f(n,_),function(e,t,r=0,n=t.length/3){let i=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)i=Math.min(i,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=i,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(n,e,t,r),n}(e,0,e.length/3,t)}function l(e,t=(0,i.jh)(24)){const[r,n,o,s,a,l]=e;return t[0]=r,t[1]=n,t[2]=o,t[3]=r,t[4]=n,t[5]=l,t[6]=r,t[7]=a,t[8]=o,t[9]=r,t[10]=a,t[11]=l,t[12]=s,t[13]=n,t[14]=o,t[15]=s,t[16]=n,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function d(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function h(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?f(e,_):o(_)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function b(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=i,e[5]=Number.POSITIVE_INFINITY,e}function w(e){return 6===e.length}function M(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],v=[0,0,0,0,0,0];o()},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}},85334:(e,t,r)=>{r.d(t,{$:()=>g,IB:()=>s,Iy:()=>F,N2:()=>b,RH:()=>M,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(34727),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 h(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 y(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 m(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 g(e){return s(e)?e:u(e)?function(e){return y(m(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 y(m(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?y(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 b(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}}(g(e))}function w(e){return l(e)?e:function(e){return f(h(e))}(g(e))}function M(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(h(e)))}(g(e))}var _,v;function F(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(T(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)}(v=_||(_={}))[v.Low=160]="Low",v[v.High=225]="High";const I=(e,t)=>{const r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function T(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),h=Math.round(a+(c-a)*r),y=Math.round(l+(p-l)*r);if(!o.offset)return new n.A([d,h,y]);const f=(0,i.Mo)(o.seed);return new n.A([I(d,f),I(h,f),I(y,f)])}},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={}))},95466:(e,t,r)=>{r.d(t,{A:()=>h});var n=r(49186),i=r(53966),o=r(91869),s=r(3330),a=r(12195),l=r(30524),u=r(98623),c=r(56400),p=r(96285);const d=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],g(e))}static fromLayerJSON(e){return new h(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,n=f(t);if(t&&n){const i=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(i,e),this._normalizedFieldsMap.set(n,e),r.push(`${i}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(f(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(i.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?s.GB.instance:t===u.n$?p.mQ.utcInstance:(0,o.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function f(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:i}=e,o=(n?"startField"in n?n.startField:n.startTimeField:"")??"",s=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.dateFieldsTimeReference?(0,c.ZS)(i.dateFieldsTimeReference):a??u.n$:null,p=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,c.ZS)(n.timeReference):a:null,d=new Map([[y(i?.creationDateField??""),l],[y(i?.editDateField??""),l],[y(o),p],[y(s),p]]);for(const{name:n,type:i}of e.fields)if(m.has(i))t.set(n,u.L5);else if("date"!==i&&"esriFieldTypeDate"!==i)t.set(n,null);else if(r)t.set(n,u.L5);else{const e=d.get(y(n??""))??a;t.set(n,e)}return t}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9468],{240:(t,e,n)=>{n.d(e,{C:()=>u,vt:()=>a,lU:()=>d,fA:()=>h,mR:()=>A,Qj:()=>l,T7:()=>g,gv:()=>p,Ui:()=>I,Tj:()=>S,_I:()=>R,mP:()=>N,LV:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=P){return[t[0],t[1],t[2],t[3]]}function c(t=P[0],e=P[1],n=P[2],o=P[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(T,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(T,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(O,c),c++,(0,r.d)(E,T,_),(0,r.n)(E,E),(0,r.d)(m,_,O),(0,r.n)(m,m),u=!(0,r.q)(T,O)&&!(0,r.q)(_,O)&&Math.abs((0,r.e)(E,m))<f;return u?(function(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2])}(T,_,O,t),!0):(0!==o||1!==i||2!==s)&&d(t,e,n,0,1,2)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const f=.99619469809,T=(0,i.vt)(),_=(0,i.vt)(),O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)();function N(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function A(t,e,n,o){return(0,r.h)(O,e,t),function(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}(n,O,o)}function I(t,e,n){return null!=e&&F(L(t,e.origin,e.direction,D,n))}function g(t,e,n){return F(L(t,e.origin,e.vector,C.NONE,n))}function p(t,e,n){return F(L(t,e.origin,e.vector,C.CLAMP,n))}function S(t,e){return b(t,e)>=0}function R(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function b(t,e){return(0,r.e)(t,e)+t[3]}var M,v;function F(t){return t===M.INTERSECTS_INSIDE_OUT||t===M.INTERSECTS_OUTSIDE_IN}function L(t,e,n,i,s){const a=(0,r.e)(t,n),c=b(t,e);if(0===a)return c>=0?M.INSIDE:M.OUTSIDE;let u=-c/a;return i&C.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&C.INFINITE_MIN)&&u<0||!(i&C.INFINITE_MAX)&&u>1?c>=0?M.INSIDE:M.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?M.INTERSECTS_INSIDE_OUT:M.INTERSECTS_OUTSIDE_IN)}(v=M||(M={}))[v.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",v[v.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",v[v.INSIDE=2]="INSIDE",v[v.OUTSIDE=3]="OUTSIDE";const P=[0,0,1,0];var C;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(C||(C={})),C.INFINITE_MIN,C.INFINITE_MAX;const D=C.INFINITE_MAX},431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>B,hx:()=>F,Jb:()=>D});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:N}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function N(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function A(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(R,n.faceNormal0,n.faceNormal1),(0,u.n)(R,R);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,R[0],R[1],R[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class S{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const R=(0,l.vt)(),b=new c.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new S,D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const N=!!_&&!!f,A=N?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let S=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):A,R=1,b=_?_[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[R-1];t<_[R];t++)g[t]=I[f[t]];b=_[++R]}const n=N?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(N){for(let t=_[R-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const M=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<A;t++)I[t]===m&&(a(h,(N?f[t]:t)*e,M,m*e,e),m++);if(f&&!N){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>h,kb:()=>l,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function l(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function h(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>c()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),a=n(74887),c=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),l=n(51850),h=n(11964),d=n(97937),f=n(93687),T=n(3694),_=n(4341),O=(n(58083),n(87317),n(91829)),E=n(71351);function m(t){return t?{ray:(0,E.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,E.vt)(),c0:0,c1:Number.MAX_VALUE}}function N(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new _.I((()=>m())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,O.fA)(-1,-1,-1,1),(0,O.fA)(1,-1,-1,1),(0,O.fA)(1,1,-1,1),(0,O.fA)(-1,1,-1,1),(0,O.fA)(-1,-1,1,1),(0,O.fA)(1,-1,1,1),(0,O.fA)(1,1,1,1),(0,O.fA)(-1,1,1,1),new _.I(m),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)();var I,g,p=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new R,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),R.clearPool(),V[0]=null,X.prune(),$.prune()}add(t){const e=Array.from(t);this._grow(e);const n=R.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));R.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=R.acquire();for(const o of t){const t=e??(0,d.e)(this.objectToBoundingSphere(o),K);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}R.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),(0,p.O_)(t.origin,t.direction,q,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(q,k),(0,p.O_)(t.origin,t.direction,q,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const c=x(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!N(n,u))return;const l=w(t,e,(0,d.a)(u)),h=l-u[3],f=l+u[3];h<i&&(i=h,s=f,a=c)};return M(this._root,(o=>{if(r<=0||!N(n,o.bounds))return!1;if((0,u.g)(G,c,o.halfSize),(0,u.f)(G,G,(0,d.a)(o.bounds)),w(t,e,G)>s)return!1;const i=o.node;return i.terminals.forAll((t=>l(t))),null!==i.residents&&i.residents.forAll((t=>l(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,c=1/0;const l={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),c=Math.min(c,t.far)):(a=Math.max(a,-t.far),c=Math.min(c,-t.near))}};l.setRange(o);const h=w(e,n,t),f=x(e,n),T=x(e,-n),_=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=w(e,n,u)-h,T=f-o[3],_=f+o[3];T>c||_<a||!N(i,o)||r(t,l)};M(this._root,(t=>{if(!N(i,t.bounds))return!1;if((0,u.g)(G,f,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h>c)return!1;if((0,u.g)(G,T,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h<a)return!1;const o=t.node;return o.terminals.forAll((t=>_(t))),null!==o.residents&&o.residents.forAll((t=>_(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=R.acquire().init(t);this._add(e.at(n),o),R.release(o)}}_grow(t){if(B(t,(t=>this.objectToBoundingSphere(t)),W),y(W[3])&&!this._fitsInsideTree(W))if(L(this._root.node))(0,d.e)(W,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(W);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(W,t):this._growRootAsSubNode(t),R.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,B([t,Y],(t=>t),J);const n=R.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0))),R.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),Z[t].min=c,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;H[t]=a+(n+e)*i}const s=o*i;return H[3]=s*z,R.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(W),(0,d.a)(this._root.bounds)),W[3]=this._root.halfSize,this._root.init(t),t.advanceTo(W,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class R{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:R.createEmptyNode(),e&&(0,d.e)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=R.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=U[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new T.A({shrink:!0}),residents:new T.A({shrink:!0})}}static{this._pool=new f.A(R)}static acquire(){return R._pool.acquire()}static release(t){R._pool.release(t)}static clearPool(){R._pool.prune()}}function b(t,e){let n=R.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(R.acquire().init(n).advance(t));R.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=R.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=U[n];$.data[n].index=n,$.data[n].distance=w(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(R.acquire().init(r).advance(e))}R.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!L(t)&&(null===t.residents&&(t.residents=new T.A({shrink:!0})),!0)}function L(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function P(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function D(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function B(t,e,n){q[0]=1/0,q[1]=1/0,q[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(const n of t){const t=e(n);y(t[3])&&(P(q,t),C(k,t))}(0,u.m)((0,d.a)(n),q,k,.5),n[3]=Math.max(k[0]-q[0],k[1]-q[1],k[2]-q[2])/2}function x(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,j[r]);i<o&&(o=i,n=j[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}I=S||(S={}),(g=I.DepthOrder||(I.DepthOrder={}))[g.FRONT_TO_BACK=1]="FRONT_TO_BACK",g[g.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const U=[(0,l.fA)(-1,-1,-1),(0,l.fA)(1,-1,-1),(0,l.fA)(-1,1,-1),(0,l.fA)(1,1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(1,-1,1),(0,l.fA)(-1,1,1),(0,l.fA)(1,1,1)],j=[(0,l.fA)(-1,-1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(-1,1,-1),(0,l.fA)(-1,1,1),(0,l.fA)(1,-1,-1),(0,l.fA)(1,-1,1),(0,l.fA)(1,1,-1),(0,l.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),G=(0,l.vt)(),q=(0,l.vt)(),k=(0,l.vt)(),X=new T.A,K=(0,d.c)(),W=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new T.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.f)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,l.vt)(),this._tmpP2=(0,l.vt)(),this._tmpP3=(0,l.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,l.vt)(),i=(0,l.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=et(r,i,t.origin),c=new st(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),c=s.position1.getVec(e.index,this._tmpP2);(0,u.f)(a,a,r),(0,u.f)(c,c,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,c,n),rt(t,l,a,n),rt(t,l,c,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,h.Cr)(n,o,this._tmpLineSegment),a=(0,h._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,l.o8)(a),distance:(0,u.j)(i,a),start:(0,l.o8)(n),end:(0,l.o8)(o)})}};nt=(0,s._)([(0,c.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,l.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>S,pF:()=>b,pq:()=>R,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),N=A(1);function A(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=N){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-R,Math.min(t,R)))}function p(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const R=p(34028234663852886e22);function b(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let N=0;const A=E,p=n?.allocate(A);let R=0,b=0,M=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],A=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*A;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*A;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}b+=t,M++,P||function(t,e){return t.cosAngle<e}(_,S)?(e.write(m,N++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,R++,_),F.push(t))}));const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,R),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,N),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,N),r.getVec(d,A),(0,i.d)(N,N,m),(0,i.d)(A,A,m),(0,i.h)(m,N,A),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),N=(0,s.vt)(),A=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),S=Math.cos(p)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9468],{240:(t,e,n)=>{n.d(e,{C:()=>u,vt:()=>a,lU:()=>d,fA:()=>h,mR:()=>A,Qj:()=>l,T7:()=>g,gv:()=>p,Ui:()=>I,Tj:()=>S,_I:()=>R,mP:()=>N,LV:()=>c});var o=n(34727),r=n(38954),i=n(51850),s=(n(87317),n(44280),n(32114));function a(t=P){return[t[0],t[1],t[2],t[3]]}function c(t=P[0],e=P[1],n=P[2],o=P[3]){return h(t,e,n,o,s.Km.get())}function u(t,e){return h(e[0],e[1],e[2],e[3],t)}function l(t){return t}function h(t,e,n,o,r=a()){return r[0]=t,r[1]=e,r[2]=n,r[3]=o,r}function d(t,e,n,o=0,i=Math.floor(n*(1/3)),s=Math.floor(n*(2/3))){if(n<3)return!1;e(T,o);let c=i,u=!1;for(;c<n-1&&!u;)e(_,c),c++,u=!(0,r.q)(T,_);if(!u)return!1;for(c=Math.max(c,s),u=!1;c<n&&!u;)e(O,c),c++,(0,r.d)(E,T,_),(0,r.n)(E,E),(0,r.d)(m,_,O),(0,r.n)(m,m),u=!(0,r.q)(T,O)&&!(0,r.q)(_,O)&&Math.abs((0,r.e)(E,m))<f;return u?(function(t,e,n,o=a()){const r=n[0]-e[0],i=n[1]-e[1],s=n[2]-e[2],c=t[0]-e[0],u=t[1]-e[1],l=t[2]-e[2],h=i*l-s*u,d=s*c-r*l,f=r*u-i*c,T=h*h+d*d+f*f,_=Math.abs(T-1)>1e-5&&T>1e-12?1/Math.sqrt(T):1;o[0]=h*_,o[1]=d*_,o[2]=f*_,o[3]=-(o[0]*t[0]+o[1]*t[1]+o[2]*t[2])}(T,_,O,t),!0):(0!==o||1!==i||2!==s)&&d(t,e,n,0,1,2)}(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)(),(0,i.vt)();const f=.99619469809,T=(0,i.vt)(),_=(0,i.vt)(),O=(0,i.vt)(),E=(0,i.vt)(),m=(0,i.vt)();function N(t,e,n){return e!==t&&u(t,e),t[3]=-(0,r.e)(t,n),t}function A(t,e,n,o){return(0,r.h)(O,e,t),function(t,e,n){const o=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],r=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=-(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]),n}(n,O,o)}function I(t,e,n){return null!=e&&F(L(t,e.origin,e.direction,D,n))}function g(t,e,n){return F(L(t,e.origin,e.vector,C.NONE,n))}function p(t,e,n){return F(L(t,e.origin,e.vector,C.CLAMP,n))}function S(t,e){return b(t,e)>=0}function R(t,e,n){const o=(0,r.g)(s.rq.get(),t,-t[3]),i=function(t,e,n){const o=(0,r.g)(s.rq.get(),t,(0,r.e)(t,e));return(0,r.d)(n,e,o),n}(t,(0,r.d)(s.rq.get(),e,o),s.rq.get());return(0,r.f)(n,i,o),n}function b(t,e){return(0,r.e)(t,e)+t[3]}var M,v;function F(t){return t===M.INTERSECTS_INSIDE_OUT||t===M.INTERSECTS_OUTSIDE_IN}function L(t,e,n,i,s){const a=(0,r.e)(t,n),c=b(t,e);if(0===a)return c>=0?M.INSIDE:M.OUTSIDE;let u=-c/a;return i&C.CLAMP&&(u=(0,o.qE)(u,0,1)),!(i&C.INFINITE_MIN)&&u<0||!(i&C.INFINITE_MAX)&&u>1?c>=0?M.INSIDE:M.OUTSIDE:((0,r.f)(s,e,(0,r.g)(s,n,u)),c>=0?M.INTERSECTS_INSIDE_OUT:M.INTERSECTS_OUTSIDE_IN)}(v=M||(M={}))[v.INTERSECTS_INSIDE_OUT=0]="INTERSECTS_INSIDE_OUT",v[v.INTERSECTS_OUTSIDE_IN=1]="INTERSECTS_OUTSIDE_IN",v[v.INSIDE=2]="INSIDE",v[v.OUTSIDE=3]="OUTSIDE";const P=[0,0,1,0];var C;!function(t){t[t.NONE=0]="NONE",t[t.CLAMP=1]="CLAMP",t[t.INFINITE_MIN=4]="INFINITE_MIN",t[t.INFINITE_MAX=8]="INFINITE_MAX"}(C||(C={})),C.INFINITE_MIN,C.INFINITE_MAX;const D=C.INFINITE_MAX},431:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>B,hx:()=>F,Jb:()=>D});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let a=0,c=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=a,i[t+1]=c,a+=e,c+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},O=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(O(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),a=n(3055),c=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),a=n*s,c=o*s,u=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,l=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868),n(34275);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:N}write(t,e,n){b.seed=this._edgeHashFunction(n);const o=b.getIntRange(0,255),r=b.getIntRange(0,this.settings.variants-1),i=b.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const O=new Float32Array(6),E=new Uint32Array(O.buffer),m=new Uint32Array(1);function N(t){return O[0]=t.position0[0],O[1]=t.position0[1],O[2]=t.position0[2],O[3]=t.position1[0],O[4]=t.position1[1],O[5]=t.position1[2],m[0]=31*(31*(31*(31*(31*(166811+E[0])+E[1])+E[2])+E[3])+E[4])+E[5],m[0]}function A(t){const e=O;e[0]=g(t.position0[0]),e[1]=g(t.position0[1]),e[2]=g(t.position0[2]),e[3]=g(t.position1[0]),e[4]=g(t.position1[1]),e[5]=g(t.position1[2]),m[0]=5381;for(let t=0;t<E.length;t++)m[0]=31*m[0]+E[t];return m[0]}const I=1e4;function g(t){return Math.round(t*I)/I}class p{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.f)(R,n.faceNormal0,n.faceNormal1),(0,u.n)(R,R);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,R[0],R[1],R[2],r)}static{this.Layout=a.gr}static{this.glLayout=(0,h.U)(a.gr,1)}}class S{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return a.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}static{this.Layout=a.In}static{this.glLayout=(0,h.U)(a.In,1)}}const R=(0,l.vt)(),b=new c.A;var M=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return P.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,M.K)(e,P,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new L(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n}),c=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:c,vertices:a.I$.createView(s.buffer)}}class L{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const P=new p,C=new S,D=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>c});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),a=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),c=((0,o.U)(a),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),a=i.constructor.ElementCount,c=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,a,c,u,n,l,e)}))}function s(t){const e=a[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const a={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f16:o.pe.HALF_FLOAT,f32:o.pe.FLOAT}},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let O=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>O&&(O=e)}else O=l;const E=Math.floor(1.1*O)+1;(null==u||u.length<2*E)&&(u=new Uint32Array((0,o.cU)(2*E)));for(let t=0;t<2*E;t++)u[t]=0;let m=0;const N=!!_&&!!f,A=N?T:l;let I=(0,r.my)(l);const g=new Uint32Array(T),p=1.96;let S=0!==d?Math.ceil(4*p*p/(d*d)*d*(1-d)):A,R=1,b=_?_[1]:A;for(let t=0;t<A;t++){if(t===S){const e=1-m/t;if(e+p*Math.sqrt(e*(1-e)/t)<d)return null;S*=2}if(t===b){for(let t=0;t<2*E;t++)u[t]=0;if(f)for(let t=_[R-1];t<_[R];t++)g[t]=I[f[t]];b=_[++R]}const n=N?f[t]:t,o=n*e,r=c(h,o,e);let i=r%E,a=m;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){a=I[t];break}}i++,i>=E&&(i-=E)}a===m&&(u[2*i]=r,u[2*i+1]=n+1,m++),I[n]=a}if(0!==d&&1-m/l<d)return null;if(N){for(let t=_[R-1];t<g.length;t++)g[t]=I[f[t]];I=(0,r.uW)(g)}const M=i?new Array(m):new Uint32Array(m*e);m=0;for(let t=0;t<A;t++)I[t]===m&&(a(h,(N?f[t]:t)*e,M,m*e,e),m++);if(f&&!N){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=I[f[e]];I=(0,r.uW)(t)}return{buffer:Array.isArray(M)?M:M.buffer,indices:I,uniqueCount:m}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function a(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function c(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>h,kb:()=>l,vt:()=>c});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),a=n(32114);function c(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=c()){return(0,i.c)(n.origin,t),(0,i.d)(n.vector,e,t),n}function l(t,e){const n=(0,i.d)(a.rq.get(),e,t.origin),r=(0,i.e)(t.vector,n),s=(0,i.e)(t.vector,t.vector),c=(0,o.qE)(r/s,0,1),u=(0,i.d)(a.rq.get(),(0,i.g)(a.rq.get(),t.vector,c),n);return(0,i.e)(u,u)}function h(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:c,origin:u}=t,l=(0,i.d)(a.rq.get(),e,u),h=(0,i.e)(c,l)/(0,i.k)(c);return(0,i.g)(s,c,(0,o.qE)(h,n,r)),(0,i.f)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>c()))},24587:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ot});var o,r,i,s=n(90237),a=n(74887),c=(n(53966),n(44208),n(87811),n(49186),n(40608)),u=n(38954),l=n(51850),h=n(11964),d=n(97937),f=n(93687),T=n(3694),_=n(4341),O=(n(58083),n(87317),n(91829)),E=n(71351);function m(t){return t?{ray:(0,E.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,E.vt)(),c0:0,c1:Number.MAX_VALUE}}function N(t,e){for(let n=0;n<A;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}new _.I((()=>m())),n(240),n(32114),(i=o||(o={}))[i.LEFT=0]="LEFT",i[i.RIGHT=1]="RIGHT",i[i.BOTTOM=2]="BOTTOM",i[i.TOP=3]="TOP",i[i.NEAR=4]="NEAR",i[i.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(r||(r={})),r.FAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_RIGHT,r.NEAR_BOTTOM_LEFT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_BOTTOM_RIGHT,r.NEAR_TOP_RIGHT,r.NEAR_TOP_LEFT,r.FAR_BOTTOM_RIGHT,r.FAR_BOTTOM_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_RIGHT,r.NEAR_BOTTOM_RIGHT,r.FAR_BOTTOM_RIGHT,r.FAR_TOP_RIGHT,r.NEAR_TOP_RIGHT,r.FAR_BOTTOM_LEFT,r.NEAR_BOTTOM_LEFT,r.NEAR_TOP_LEFT,r.FAR_TOP_LEFT,r.FAR_TOP_LEFT,r.NEAR_TOP_LEFT,r.NEAR_TOP_RIGHT,r.FAR_TOP_RIGHT;const A=6;(0,O.fA)(-1,-1,-1,1),(0,O.fA)(1,-1,-1,1),(0,O.fA)(1,1,-1,1),(0,O.fA)(-1,1,-1,1),(0,O.fA)(-1,-1,1,1),(0,O.fA)(1,-1,1,1),(0,O.fA)(1,1,1,1),(0,O.fA)(-1,1,1,1),new _.I(m),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)(),(0,l.vt)();var I,g,p=n(620);class S{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new R,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),R.clearPool(),V[0]=null,X.prune(),$.prune()}add(t){const e=Array.from(t);this._grow(e);const n=R.acquire();for(const t of e)++this._objectCount,this._isDegenerate(t)?this._degenerateObjects.add(t):(n.init(this._root),this._add(t,n));R.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=R.acquire();for(const o of t){const t=e??(0,d.h)(this.objectToBoundingSphere(o),K);y(t[3])?(n.init(this._root),v(o,t,n)):this._degenerateObjects.delete(o)}R.release(n),this._shrink()}update(t,e){if(!y(e[3])&&this._isDegenerate(t))return;const n=function(t){return V[0]=t,V}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),(0,p.O_)(t.origin,t.direction,q,k)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,E.LV)(t,e);b(this._root,(t=>{if(!function(t,e,n){return D((0,d.a)(e.bounds),2*-e.halfSize,q),D((0,d.a)(e.bounds),2*e.halfSize,k),n.applyToMinMax(q,k),(0,p.O_)(t.origin,t.direction,q,k)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){b(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const c=x(t,e),l=c=>{if(--r,!o(c))return;const u=this.objectToBoundingSphere(c);if(!N(n,u))return;const l=w(t,e,(0,d.a)(u)),h=l-u[3],f=l+u[3];h<i&&(i=h,s=f,a=c)};return M(this._root,(o=>{if(r<=0||!N(n,o.bounds))return!1;if((0,u.g)(G,c,o.halfSize),(0,u.f)(G,G,(0,d.a)(o.bounds)),w(t,e,G)>s)return!1;const i=o.node;return i.terminals.forAll((t=>l(t))),null!==i.residents&&i.residents.forAll((t=>l(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,c=1/0;const l={setRange:t=>{n===S.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),c=Math.min(c,t.far)):(a=Math.max(a,-t.far),c=Math.min(c,-t.near))}};l.setRange(o);const h=w(e,n,t),f=x(e,n),T=x(e,-n),_=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),u=(0,d.a)(o),f=w(e,n,u)-h,T=f-o[3],_=f+o[3];T>c||_<a||!N(i,o)||r(t,l)};M(this._root,(t=>{if(!N(i,t.bounds))return!1;if((0,u.g)(G,f,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h>c)return!1;if((0,u.g)(G,T,t.halfSize),(0,u.f)(G,G,(0,d.a)(t.bounds)),w(e,n,G)-h<a)return!1;const o=t.node;return o.terminals.forAll((t=>_(t))),null!==o.residents&&o.residents.forAll((t=>_(t))),!0}),e,n)}forEachNode(t){b(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,d.g)(e),o=(0,d.a)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,d.g)(r),s=n+i;return!((0,u.s)((0,d.a)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};b(this._root,(t=>{const e=(0,d.g)(t.bounds),r=n+e;if((0,u.s)((0,d.a)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,d.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,d.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=R.acquire().init(t);this._add(e.at(n),o),R.release(o)}}_grow(t){if(B(t,(t=>this.objectToBoundingSphere(t)),W),y(W[3])&&!this._fitsInsideTree(W))if(L(this._root.node))(0,d.h)(W,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(W);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(W,t):this._growRootAsSubNode(t),R.release(t)}}_rebuildTree(t,e){(0,u.c)((0,d.a)(Y),(0,d.a)(e.bounds)),Y[3]=e.halfSize,B([t,Y],(t=>t),J);const n=R.acquire().init(this._root);this._root.initFrom(null,J,J[3]),this._root.increaseHalfSize(1.25),b(n,(t=>(this.add(t.node.terminals.data),null!==t.node.residents&&this.add(t.node.residents.data),!0))),R.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return b(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),a=n[t]+e-(r[t]+i),c=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(a/(2*i)))+1,l=2**Math.ceil(Math.log(c+u)*Math.LOG2E);o=Math.max(o,l),Z[t].min=c,Z[t].max=u}for(let t=0;t<3;t++){let e=Z[t].min,n=Z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const a=r[t]-i-e*i*2;H[t]=a+(n+e)*i}const s=o*i;return H[3]=s*z,R.acquire().initFrom(null,H,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,u.c)((0,d.a)(W),(0,d.a)(this._root.bounds)),W[3]=this._root.halfSize,this._root.init(t),t.advanceTo(W,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!y(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new S((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class R{constructor(){this.bounds=(0,d.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:R.createEmptyNode(),e&&(0,d.h)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*z}advance(t){let e=this.node.children[t];e||(e=R.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=U[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new T.A({shrink:!0}),residents:new T.A({shrink:!0})}}static{this._pool=new f.A(R)}static acquire(){return R._pool.acquire()}static release(t){R._pool.release(t)}static clearPool(){R._pool.prune()}}function b(t,e){let n=R.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(R.acquire().init(n).advance(t));R.release(n)}}function M(t,e,n,o=S.DepthOrder.FRONT_TO_BACK){let r=R.acquire().init(t);const i=[r];for(function(t,e,n){if(!$.length)for(let t=0;t<8;++t)$.push({index:0,distance:0});for(let n=0;n<8;++n){const o=U[n];$.data[n].index=n,$.data[n].distance=w(t,e,o)}$.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=$.data[t].index}(n,o,Q);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=Q[t];r.node.children[e]&&i.push(R.acquire().init(r).advance(e))}R.release(r)}}function v(t,e,n){X.clear();const o=n.advanceTo(e,((t,e)=>{X.push(t.node),X.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=X.length-2;t>=0&&F(X.data[t],X.data[t+1]);t-=2);}function F(t,e){return e>=0&&(t.children[e]=null),!!L(t)&&(null===t.residents&&(t.residents=new T.A({shrink:!0})),!0)}function L(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function P(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function C(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function D(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function B(t,e,n){q[0]=1/0,q[1]=1/0,q[2]=1/0,k[0]=-1/0,k[1]=-1/0,k[2]=-1/0;for(const n of t){const t=e(n);y(t[3])&&(P(q,t),C(k,t))}(0,u.m)((0,d.a)(n),q,k,.5),n[3]=Math.max(k[0]-q[0],k[1]-q[1],k[2]-q[2])/2}function x(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=w(t,e,j[r]);i<o&&(o=i,n=j[r])}return n}function w(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function y(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}I=S||(S={}),(g=I.DepthOrder||(I.DepthOrder={}))[g.FRONT_TO_BACK=1]="FRONT_TO_BACK",g[g.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const U=[(0,l.fA)(-1,-1,-1),(0,l.fA)(1,-1,-1),(0,l.fA)(-1,1,-1),(0,l.fA)(1,1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(1,-1,1),(0,l.fA)(-1,1,1),(0,l.fA)(1,1,1)],j=[(0,l.fA)(-1,-1,-1),(0,l.fA)(-1,-1,1),(0,l.fA)(-1,1,-1),(0,l.fA)(-1,1,1),(0,l.fA)(1,-1,-1),(0,l.fA)(1,-1,1),(0,l.fA)(1,1,-1),(0,l.fA)(1,1,1)],z=Math.sqrt(3),V=[null],H=(0,d.c)(),G=(0,l.vt)(),q=(0,l.vt)(),k=(0,l.vt)(),X=new T.A,K=(0,d.c)(),W=(0,d.c)(),Y=(0,d.c)(),J=(0,d.c)(),Z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],$=new T.A,Q=[0,0,0,0,0,0,0,0];var tt=n(431);function et(t,e,n){const o=(0,d.c)(),r=(0,d.a)(o);return(0,u.b)(r,r,t,.5),(0,u.b)(r,r,e,.5),o[3]=(0,u.j)(r,t),(0,u.f)(r,r,n),o}let nt=class{constructor(){this._idToComponent=new Map,this._components=new S((t=>t.bounds)),this._edges=new S((t=>t.bounds)),this._tmpLineSegment=(0,h.vt)(),this._tmpP1=(0,l.vt)(),this._tmpP2=(0,l.vt)(),this._tmpP3=(0,l.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,a.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new it(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=tt.HY.createView(t.locations),o=new Array(n.count),r=(0,l.vt)(),i=(0,l.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const a=et(r,i,t.origin),c=new st(e,s,a);o[s]=c}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,s=o.locations,a=s.position0.getVec(e.index,this._tmpP1),c=s.position1.getVec(e.index,this._tmpP2);(0,u.f)(a,a,r),(0,u.f)(c,c,r);const l=i[s.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,c,n),rt(t,l,a,n),rt(t,l,c,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,d.a)(t.bounds),s=(0,h.Cr)(n,o,this._tmpLineSegment),a=(0,h._I)(s,i,this._tmpP3);(0,d.o)(t.bounds,a)&&r.push({type:"edge",objectId:e,target:(0,l.o8)(a),distance:(0,u.j)(i,a),start:(0,l.o8)(n),end:(0,l.o8)(o)})}};nt=(0,s._)([(0,c.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],nt);const ot=nt;function rt(t,e,n,o){if(!t.returnVertex||!(0,d.o)(t.bounds,n))return;const r=(0,d.a)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,l.o8)(n),distance:(0,u.j)(r,n)})}class it{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++it.uid}static{this.uid=0}}class st{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},34727:(t,e,n)=>{n.d(e,{$8:()=>g,Cc:()=>s,Hx:()=>_,Io:()=>I,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,ZH:()=>T,cU:()=>r,gg:()=>f,hs:()=>a,kU:()=>c,or:()=>S,pF:()=>b,pq:()=>R,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function a(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function c(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function f(t,e,n=1e-6){return!d(t,e,n)&&t>e}function T(t,e,n=1e-6){return!d(t,e,n)&&t<e}function _(t,e,n=1e-6){return d(t,e,n)||t>e}const O=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function E(t){return O.setFloat64(0,t),O.getBigInt64(0)}const m=BigInt("1000000"),N=A(1);function A(t){const e=E(t=Math.abs(t)),n=function(t){return O.setBigInt64(0,t),O.getFloat64(0)}(e<=m?m:e-m);return Math.abs(t-n)}function I(t,e,n=N){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&A(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=E(t),r=E(e);return o<0==r<0&&!((o<r?r-o:o-r)>m)}function g(t){return p(Math.max(-R,Math.min(t,R)))}function p(t){return o[0]=t,o[0]}function S(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const R=p(34028234663852886e22);function b(t,e,n){if(void 0===n||0===+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let o=e.toString().split("e");return o=(e=Math[t](+(o[0]+"e"+(o[1]?+o[1]-n:-n)))).toString().split("e"),+(o[0]+"e"+(o[1]?+o[1]+n:n))}},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.UVI="uvi",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.NEXTDELTA="nextDelta",t.PREVIOUSDELTA="previousDelta",t.U0="u0",t.LINEPARAMETERS="lineParameters",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.PROFILEAUXDATA="profileAuxData",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OLIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},91869:(t,e,n)=>{function o(t,e){for(const n of t.values())if(e(n))return!0;return!1}function r(t,e,n){const o=t.get(e);if(void 0!==o)return o;const r=n();return t.set(e,r),r}function i(t){const e=new Map;return n=>(e.has(n)||e.set(n,t(n)),e.get(n))}n.d(e,{Bj:()=>i,Bs:()=>o,tE:()=>r})},93406:(t,e,n)=>{n.d(e,{K:()=>c});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const a=-1;function c(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,c=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:O}=l(t),E=T.length/4,m=e.allocate(E);let N=0;const A=E,p=n?.allocate(A);let R=0,b=0,M=0;d.length=0;for(let t=0;t<E;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],c);const n=d.pushNew();n.index=4*t,n.length=(0,i.j)(s,c)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:l})=>{const d=T.data[l],E=T.data[l+1],A=T.data[l+2],L=T.data[l+3],P=L===a;if(o.getVec(d,s),o.getVec(E,c),P){const t=3*A;(0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f)}else{let t=3*A;if((0,i.i)(h,O.data[t],O.data[t+1],O.data[t+2]),t=3*L,(0,i.i)(f,O.data[t],O.data[t+1],O.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.e)(h,f),function(t,e){return t.cosAngle>e}(_,g))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}b+=t,M++,P||function(t,e){return t.cosAngle<e}(_,S)?(e.write(m,N++,_),v.push(t)):u(_,I)&&(p&&n&&n.write(p,R++,_),F.push(t))}));const L=new Float32Array(v.reverse()),P=new Float32Array(F.reverse()),C=p&&n?{instancesData:p.slice(0,R),lodInfo:{lengths:P}}:void 0;return{regular:{instancesData:m.slice(0,N),lodInfo:{lengths:L}},silhouette:C,averageEdgeLength:b/M}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(E,t.position1,t.position0),n*((0,i.e)((0,i.h)(O,t.faceNormal0,t.faceNormal1),E)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],c=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,m),r.getVec(h,N),r.getVec(d,A),(0,i.d)(N,N,m),(0,i.d)(A,A,m),(0,i.h)(m,N,A),(0,i.n)(m,m),T.pushArray(m),(s===a||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(c===a||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(c)),(u===a||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},O=(0,s.vt)(),E=(0,s.vt)(),m=(0,s.vt)(),N=(0,s.vt)(),A=(0,s.vt)(),I=(0,o.kU)(4),g=Math.cos(I),p=(0,o.kU)(35),S=Math.cos(p)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9695],{13069:(t,e,n)=>{n.d(e,{AG:()=>a,lk:()=>o,vD:()=>i,yS:()=>s});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function s(){return`{${o().toUpperCase()}}`}function i(){return`{${o()}}`}function a(t){const e=t.toUpperCase();return"{"!==t[0]?`{${e}}`:e}},24212:(t,e,n)=>{function r(t,e){return function(t,e){return e?.mode?e.mode:function(t){return t?l:u}(t).mode}(null==t||(t.hasZ??!1),e)}function o(t,e,n){return n&&n.mode!==e?`${t} only support ${e} elevation mode`:null}function s(t,e,n){return n?.mode===e?`${t} do not support ${e} elevation mode`:null}function i(t,e){return null!=e?.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function a(t,e){e&&t.warn(".elevationInfo=",e)}n.d(e,{$7:()=>s,B:()=>o,XF:()=>a,tW:()=>i,w7:()=>r}),n(83047),n(16271);const l={mode:"absolute-height",offset:0},u={mode:"on-the-ground",offset:null}},49695:(t,e,n)=>{n.r(e),n.d(e,{default:()=>C});var r=n(90237),o=n(79608),s=n(59693),i=n(69622),a=n(69540),l=n(25482),u=n(97768),p=n(10107),c=(n(44208),n(53966),n(87811),n(40608)),d=n(87024),f=n(86738),y=n(88625);let h=class extends(l.A.JSONSupportMixin(a.A.ClonableMixin(i.A))){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r._)([(0,p.MZ)({type:f.A,json:{write:{isRequired:!0}}})],h.prototype,"position",void 0),(0,r._)([(0,p.MZ)({type:y.A}),(0,d.P)()],h.prototype,"elevationInfo",void 0),(0,r._)([(0,p.MZ)(s.N1)],h.prototype,"feature",void 0),h=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysisObserver")],h);const g=h;let v=class extends(l.A.JSONSupportMixin(a.A)){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r._)([(0,p.MZ)({type:f.A,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,d.P)()],v.prototype,"position",void 0),(0,r._)([(0,p.MZ)({type:y.A}),(0,d.P)()],v.prototype,"elevationInfo",void 0),(0,r._)([(0,p.MZ)(s.N1)],v.prototype,"feature",void 0),v=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysisTarget")],v);var m=n(4576),w=n(5503),x=n(62885),b=n(36708),A=n(98988),j=n(70328),M=n(24212);const _=w.A.ofType(v);let I=class extends o.A{constructor(t){super(t),this.type="line-of-sight",this.observer=null,this.extent=null}initialize(){this.addHandles((0,b.wB)((()=>this._computeExtent()),(t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)}),b.pc))}get targets(){return this._get("targets")||new _}set targets(t){this._set("targets",(0,x.V)(t,this.targets,_))}get spatialReference(){return null!=this.observer?.position?this.observer.position.spatialReference:null}get valid(){return null!=this.observer?.position}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==this.observer?.position||null==t)return null;const e=t=>"absolute-height"===(0,M.w7)(t.position,t.elevationInfo),n=this.observer.position,r=(0,j.fA)(n.x,n.y,n.z,n.x,n.y,n.z);for(const e of this.targets)if(null!=e.position){const n=(0,A.projectOrLoad)(e.position,t);if(null!=n.pending)return{pending:n.pending,extent:null};if(null!=n.geometry){const{x:t,y:e,z:o}=n.geometry;(0,j.iT)(r,[t,e,o])}}const o=(0,j.w1)(r,t);return e(this.observer)&&this.targets.every(e)||(o.zmin=void 0,o.zmax=void 0),{pending:null,extent:o}}clear(){this.observer=null,this.targets.removeAll()}equals(t){return this===t||super.equals(t)&&(0,u.CM)(this.observer,t.observer)&&(0,m.aI)(this.targets.toArray(),t.targets.toArray(),((t,e)=>t.equals(e)))}};(0,r._)([(0,p.MZ)({type:["line-of-sight"]})],I.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:g,json:{read:!0,write:!0}})],I.prototype,"observer",void 0),(0,r._)([(0,p.MZ)({cast:x.H,type:_,nonNullable:!0,json:{read:!0,write:!0}})],I.prototype,"targets",null),(0,r._)([(0,p.MZ)({value:null,readOnly:!0})],I.prototype,"extent",void 0),(0,r._)([(0,p.MZ)()],I.prototype,"spatialReference",null),(0,r._)([(0,p.MZ)({readOnly:!0})],I.prototype,"valid",null),I=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysis")],I);var O=n(92071),R=n(4146),Z=n(16131);const S=w.A.ofType(v);let U=class extends((0,Z.q)((0,O.P)(R.A))){constructor(t){super(t),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new I,this.opacity=1}initialize(){this.addHandles((0,b.wB)((()=>this.analysis),((t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)}),b.pc))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return this.analysis?.observer}set observer(t){const{analysis:e}=this;e&&(e.observer=t)}get targets(){return null!=this.analysis?this.analysis.targets:new w.A}set targets(t){(0,x.V)(t,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(t){this.analysis===t&&(this.analysis=new I)}};(0,r._)([(0,p.MZ)({json:{read:!1},readOnly:!0})],U.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:["LineOfSightLayer"]})],U.prototype,"operationalLayerType",void 0),(0,r._)([(0,p.MZ)({type:g,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],U.prototype,"observer",null),(0,r._)([(0,p.MZ)({type:S,json:{read:!0,write:{ignoreOrigin:!0,isRequired:!0}}})],U.prototype,"targets",null),(0,r._)([(0,p.MZ)({type:I,nonNullable:!0,json:{read:!1,write:!1}})],U.prototype,"analysis",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],U.prototype,"fullExtent",null),(0,r._)([(0,p.MZ)({readOnly:!0})],U.prototype,"spatialReference",null),(0,r._)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],U.prototype,"opacity",void 0),(0,r._)([(0,p.MZ)({type:["show","hide"]})],U.prototype,"listMode",void 0),U=(0,r._)([(0,c.$)("esri.layers.LineOfSightLayer")],U);const C=U},76553:(t,e,n)=>{function r(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{H:()=>r})},80200:(t,e,n)=>{n.d(e,{T:()=>r,d:()=>h});const r={Base64:0,Hex:1,String:2,Raw:3},o=8,s=(1<<o)-1;function i(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function a(t){const e=[];for(let n=0,r=t.length*o;n<r;n+=o)e[n>>5]|=(t.charCodeAt(n/o)&s)<<n%32;return e}function l(t){const e=[];for(let n=0,r=32*t.length;n<r;n+=o)e.push(String.fromCharCode(t[n>>5]>>>n%32&s));return e.join("")}function u(t,e,n,r,o,s){return i(function(t,e){return t<<e|t>>>32-e}(i(i(e,t),i(r,s)),o),n)}function p(t,e,n,r,o,s,i){return u(e&n|~e&r,t,e,o,s,i)}function c(t,e,n,r,o,s,i){return u(e&r|n&~r,t,e,o,s,i)}function d(t,e,n,r,o,s,i){return u(e^n^r,t,e,o,s,i)}function f(t,e,n,r,o,s,i){return u(n^(e|~r),t,e,o,s,i)}function y(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;let n=1732584193,r=-271733879,o=-1732584194,s=271733878;for(let e=0;e<t.length;e+=16){const a=n,l=r,u=o,y=s;n=p(n,r,o,s,t[e],7,-680876936),s=p(s,n,r,o,t[e+1],12,-389564586),o=p(o,s,n,r,t[e+2],17,606105819),r=p(r,o,s,n,t[e+3],22,-1044525330),n=p(n,r,o,s,t[e+4],7,-176418897),s=p(s,n,r,o,t[e+5],12,1200080426),o=p(o,s,n,r,t[e+6],17,-1473231341),r=p(r,o,s,n,t[e+7],22,-45705983),n=p(n,r,o,s,t[e+8],7,1770035416),s=p(s,n,r,o,t[e+9],12,-1958414417),o=p(o,s,n,r,t[e+10],17,-42063),r=p(r,o,s,n,t[e+11],22,-1990404162),n=p(n,r,o,s,t[e+12],7,1804603682),s=p(s,n,r,o,t[e+13],12,-40341101),o=p(o,s,n,r,t[e+14],17,-1502002290),r=p(r,o,s,n,t[e+15],22,1236535329),n=c(n,r,o,s,t[e+1],5,-165796510),s=c(s,n,r,o,t[e+6],9,-1069501632),o=c(o,s,n,r,t[e+11],14,643717713),r=c(r,o,s,n,t[e],20,-373897302),n=c(n,r,o,s,t[e+5],5,-701558691),s=c(s,n,r,o,t[e+10],9,38016083),o=c(o,s,n,r,t[e+15],14,-660478335),r=c(r,o,s,n,t[e+4],20,-405537848),n=c(n,r,o,s,t[e+9],5,568446438),s=c(s,n,r,o,t[e+14],9,-1019803690),o=c(o,s,n,r,t[e+3],14,-187363961),r=c(r,o,s,n,t[e+8],20,1163531501),n=c(n,r,o,s,t[e+13],5,-1444681467),s=c(s,n,r,o,t[e+2],9,-51403784),o=c(o,s,n,r,t[e+7],14,1735328473),r=c(r,o,s,n,t[e+12],20,-1926607734),n=d(n,r,o,s,t[e+5],4,-378558),s=d(s,n,r,o,t[e+8],11,-2022574463),o=d(o,s,n,r,t[e+11],16,1839030562),r=d(r,o,s,n,t[e+14],23,-35309556),n=d(n,r,o,s,t[e+1],4,-1530992060),s=d(s,n,r,o,t[e+4],11,1272893353),o=d(o,s,n,r,t[e+7],16,-155497632),r=d(r,o,s,n,t[e+10],23,-1094730640),n=d(n,r,o,s,t[e+13],4,681279174),s=d(s,n,r,o,t[e],11,-358537222),o=d(o,s,n,r,t[e+3],16,-722521979),r=d(r,o,s,n,t[e+6],23,76029189),n=d(n,r,o,s,t[e+9],4,-640364487),s=d(s,n,r,o,t[e+12],11,-421815835),o=d(o,s,n,r,t[e+15],16,530742520),r=d(r,o,s,n,t[e+2],23,-995338651),n=f(n,r,o,s,t[e],6,-198630844),s=f(s,n,r,o,t[e+7],10,1126891415),o=f(o,s,n,r,t[e+14],15,-1416354905),r=f(r,o,s,n,t[e+5],21,-57434055),n=f(n,r,o,s,t[e+12],6,1700485571),s=f(s,n,r,o,t[e+3],10,-1894986606),o=f(o,s,n,r,t[e+10],15,-1051523),r=f(r,o,s,n,t[e+1],21,-2054922799),n=f(n,r,o,s,t[e+8],6,1873313359),s=f(s,n,r,o,t[e+15],10,-30611744),o=f(o,s,n,r,t[e+6],15,-1560198380),r=f(r,o,s,n,t[e+13],21,1309151649),n=f(n,r,o,s,t[e+4],6,-145523070),s=f(s,n,r,o,t[e+11],10,-1120210379),o=f(o,s,n,r,t[e+2],15,718787259),r=f(r,o,s,n,t[e+9],21,-343485551),n=i(n,a),r=i(r,l),o=i(o,u),s=i(s,y)}return[n,r,o,s]}function h(t,e=r.Hex){const n=e||r.Base64,s=y(a(t),t.length*o);switch(n){case r.Raw:return s;case r.Hex:return function(t){const e="0123456789abcdef",n=[];for(let r=0,o=4*t.length;r<o;r++)n.push(e.charAt(t[r>>2]>>r%4*8+4&15)+e.charAt(t[r>>2]>>r%4*8&15));return n.join("")}(s);case r.String:return l(s);case r.Base64:return function(t){const e=[];for(let n=0,r=4*t.length;n<r;n+=3){const r=(t[n>>2]>>n%4*8&255)<<16|(t[n+1>>2]>>(n+1)%4*8&255)<<8|t[n+2>>2]>>(n+2)%4*8&255;for(let o=0;o<4;o++)8*n+6*o>32*t.length?e.push("="):e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-o)&63))}return e.join("")}(s)}}},85648:(t,e,n)=>{n.d(e,{n:()=>o});var r=n(84952);function o(t){return s[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,r.Zo)(t);return l[e]||i}(t.url)}(t)]||a}const s={},i="text/plain",a=s[i],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)s[l[t]]=t},87024:(t,e,n)=>{n.d(e,{P:()=>f});var r=n(49186),o=n(80200),s=n(76553),i=n(84952),a=n(13069),l=n(96156),u=n(35666),p=n(10107),c=n(85648),d=n(97159);function f(t){const e=t?.origins??[void 0];return(n,r)=>{const o=function(t,e,n){if("resource"===t?.type)return function(t,e,n){const r=(0,l.z4)(e,n);return{type:String,read:(t,e,n)=>{const o=(0,d.r)(t,e,n);return r.type===String?o:"function"==typeof r.type?new r.type({url:o}):void 0},write:{isRequired:r.json?.write?.isRequired,writer(e,o,a,l){if(!l?.resources)return"string"==typeof e?void(o[a]=(0,d.t)(e,l)):void(o[a]=e.write({},l));const p=function(t){return null==t?null:"string"==typeof t?t:t.url}(e),f=(0,d.t)(p,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),v=r.type!==String&&(!(0,s.H)(this)||l?.origin&&this.originIdOf(n)>(0,u.aB)(l.origin)),m={object:this,propertyName:n,value:e,targetUrl:f,dest:o,targetPropertyName:a,context:l,params:t};l?.portalItem&&f&&!(0,i.oP)(f)?v&&t?.contentAddressed?y(m):v?function(t){const{context:e,targetUrl:n,params:r,value:o,dest:s,targetPropertyName:a}=t;if(!e.portalItem)return;const l=e.portalItem.resourceFromPath(n),u=g(o,n,e),p=(0,c.n)(u),d=(0,i.Zo)(l.path),f=r?.compress??!1;p===d?(e.resources&&h({...t,resource:l,content:u,compress:f,updates:e.resources.toUpdate}),s[a]=n):y(t)}(m):function({context:t,targetUrl:e,dest:n,targetPropertyName:r}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(e),compress:!1}),n[r]=e)}(m):l?.portalItem&&(null==f||null!=(0,d.i)(f)||(0,i.w8)(f)||v)?y(m):o[a]=f}}}}(t,e,n);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:t,write:e}=d.b;return{read:t,write:e}}}}(t,n,r);for(const t of e){const e=(0,p.rM)(n,t,r);for(const t in o)e[t]=o[t]}}}function y(t){const{targetUrl:e,params:n,value:s,context:l,dest:u,targetPropertyName:p}=t;if(!l.portalItem)return;const f=(0,d.p)(e),y=g(s,e,l);if(n?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new r.A("persistable:contentAddressingUnsupported",`Property "${p}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const v=n?.contentAddressed&&"json"===y.type?(0,o.d)(y.jsonString):f?.filename??(0,a.lk)(),m=(0,i.fj)(n?.prefix??f?.prefix,v),w=`${m}.${(0,c.n)(y)}`;if(n?.contentAddressed&&l.resources&&"json"===y.type){const t=l.resources.toKeep.find((({resource:t})=>t.path===w))??l.resources.toAdd.find((({resource:t})=>t.path===w));if(t)return void(u[p]=t.resource.itemRelativeUrl)}const x=l.portalItem.resourceFromPath(w);(0,i.w8)(e)&&l.resources&&l.resources.pendingOperations.push((0,i.tk)(e).then((t=>{x.path=`${m}.${(0,c.n)({type:"blob",blob:t})}`,u[p]=x.itemRelativeUrl})).catch((()=>{})));const b=n?.compress??!1;l.resources&&h({...t,resource:x,content:y,compress:b,updates:l.resources.toAdd}),u[p]=x.itemRelativeUrl}function h({object:t,propertyName:e,updates:n,resource:r,content:o,compress:s}){n.push({resource:r,content:o,compress:s,finish:n=>{!function(t,e,n){"string"==typeof t[e]?t[e]=n.url:t[e].url=n.url}(t,e,n)}})}function g(t,e,n){return"string"==typeof t?{type:"url",url:e}:{type:"json",jsonString:JSON.stringify(t.toJSON(n))}}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186,5011,9141],{4197:(e,t,i)=>{i.d(t,{jh:()=>r,l5:()=>o,xm:()=>s});var n=i(34275);function r(e,t=!1){return e<=n.y9?t?new Array(e).fill(0):new Array(e):new Float64Array(e)}function s(e){return((0,n.iu)(e)?e.byteLength/8:e.length)<=n.y9?Array.from(e):new Float64Array(e)}function o(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}},6797:(e,t,i)=>{i.d(t,{Mj:()=>p,Ui:()=>d,w2:()=>f});var n=i(69622),r=i(5503),s=i(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof n.A}function l(e){return e instanceof r.A?Object.keys(e.items):a(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof r.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function h(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const n=l(e),r=l(t);if(0===n.length&&0===r.length)return;if(!n.length||!r.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=r.filter((e=>!n.includes(e))),p=n.filter((e=>!r.includes(e))),f=n.filter((i=>r.includes(i)&&u(e,i)!==u(t,i))).concat(s,p).sort(),d=c(e);if(d&&o.has(d)&&f.length)return{type:"complete",oldValue:e,newValue:t};let m;const y=a(e)&&a(t);for(const n of f){const r=u(e,n),s=u(t,n);let o;if((y||"function"!=typeof r&&"function"!=typeof s)&&r!==s&&(null!=r||null!=s)){if(i&&i[n]&&"function"==typeof i[n])o=i[n]?.(r,s);else if(r instanceof Date&&s instanceof Date){if(r.getTime()===s.getTime())continue;o={type:"complete",oldValue:r,newValue:s}}else o="object"==typeof r&&"object"==typeof s&&c(r)===c(s)?h(r,s):{type:"complete",oldValue:r,newValue:s};null!=o&&(null!=m?m.diff[n]=o:m={type:"partial",diff:{[n]:o}})}}return m}function p(e,t){return function(e,t){if(null==e)return!1;const i=t.split(".");let n=e;for(const e of i){if("complete"===n.type)return!0;if("partial"!==n.type)return!1;{const t=n.diff[e];if(!t)return!1;n=t}}return!0}(e,t)}function f(e,t){if(!e)return!1;if("partial"===e.type){const i=Object.keys(e.diff);return 1===i.length&&i[0]===t}return!1}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:h(e,t)}},13069:(e,t,i)=>{i.d(t,{AG:()=>a,lk:()=>r,vD:()=>o,yS:()=>s});const n="randomUUID"in crypto;function r(){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 s(){return`{${r().toUpperCase()}}`}function o(){return`{${r()}}`}function a(e){const t=e.toUpperCase();return"{"!==e[0]?`{${t}}`:t}},17311:(e,t,i)=>{i.d(t,{A:()=>p});var n=i(90237),r=i(69622),s=i(4576),o=i(60999),a=i(5503),l=i(10107),u=(i(44208),i(53966),i(40608)),c=i(30524),h=i(43668);let p=class extends r.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,o.UT)((()=>(0,h.l)())):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([i.e(4560),i.e(9926)]).then(i.bind(i,29926)).then((e=>this._featureUtils=e))}get calculatedExpressions(){const e=new a.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const i=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(i.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:i,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(i,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter((t=>e.includes(`{expression/${t.name.toLowerCase()}}`)))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some((e=>!0===e.invalid))}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const i=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of i){const i=t.split("."),n=this.fieldsIndex.get(i.at(-1)??"");n&&e.add(n.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const i of t){const t=this.fieldsIndex.get(i);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,i){return(await this.getTitles(e,[t],i)).get(t)??""}async getTitles(e,t,i){const n=new Map,r=i?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:s}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);i?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:o,workingTitle:a}=this,l=a&&o;t.forEach((t=>{const i=l?s({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:o,globalAttributes:this._createFormattedAttributes(e,t,r).global,layer:e,text:a}):"";n.set(t,i)}))}catch{}return n}async _checkAndReQueryGraphics(e,t){const i=t.map((t=>t.getObjectId()??t.attributes[e.objectIdField])).filter(s.Ru);if(i.length!==t.length)return t;if(t.some((e=>!(0,c.Kl)(e,this.requiredFields)))){const n=e.createQuery();n.where="1=1",n.outFields=[...this.requiredFields],n.objectIds=i;const r=await e.queryFeatures(n);if(r?.features.length===t.length)return r.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const i of e){if(!i.fieldName)continue;const e=this.fieldsIndex.get(i.fieldName),n=e?.name??i.fieldName;i.fieldName=n,t.set(n.toLowerCase(),i)}return t}_createFormattedAttributes(e,t,i="system"){const n=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const i=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:i}})}catch{}}const s={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:n,attributes:s,graphic:t,timeZone:i,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,c.nw)(e).filter((e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/"))))}};(0,n._)([(0,l.MZ)({readOnly:!0})],p.prototype,"_arcadeTask",null),(0,n._)([(0,l.MZ)()],p.prototype,"_featureUtils",void 0),(0,n._)([(0,l.MZ)({readOnly:!0})],p.prototype,"featureUtilsPromise",null),(0,n._)([(0,l.MZ)({readOnly:!0})],p.prototype,"calculatedExpressions",null),(0,n._)([(0,l.MZ)()],p.prototype,"displayField",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"effectivePopupTemplate",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"expressionsUsedInTitle",null),(0,n._)([(0,l.MZ)()],p.prototype,"fieldsIndex",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"fieldInfoMap",null),(0,n._)([(0,l.MZ)()],p.prototype,"fields",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"objectIdField",void 0),(0,n._)([(0,l.MZ)()],p.prototype,"requiredFields",null),p=(0,n._)([(0,u.$)("esri.layers.support.TitleCreator")],p)},27865:(e,t,i)=>{i.d(t,{O9:()=>s,dw:()=>o,mj:()=>r});var n=i(59247);function r(e,t){const i=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===i[t].type))}function s(e,t){const i=e.length>t.length?e:t,r=e.length>t.length?t:e;for(let e=r.length;e<i.length;e++)r.push((0,n.sK)(i[e]))}function o(e){const t=e[0];return!!t&&"type"in t}},32730:(e,t,i)=>{i.d(t,{BI:()=>y,D3:()=>d,XJ:()=>m,lc:()=>f,mX:()=>_,rU:()=>g,tH:()=>F});var n=i(799);const r="__begin__",s="__end__",o=new RegExp(r,"ig"),a=new RegExp(s,"ig"),l=new RegExp("^"+r,"i"),u=new RegExp(s+"$","i"),c='"',h=c+" + ",p=" + "+c;function f(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function d(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function m(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=f(e.labelExpression),t.type="conventional"),t}function y(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return _(t.expression);case"arcade":return t.expression}return null}function g(e){const t=m(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(b);return t?.[1].trim()||null}(t.expression);case"arcade":return F(t.expression)}return null}function _(e){let t;return e?(t=(0,n.HC)(e,(e=>r+'$feature["'+e+'"]'+s)),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,h).replaceAll(a,p)):t='""',t}const b=/^\s*\{([^}]+)\}\s*$/i,M=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,x=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,T=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function F(e){if(!e)return null;let t=M.exec(e)||x.exec(e);return t?t[1]||t[3]:(t=T.exec(e),t?t[2]:null)}},39516:(e,t,i)=>{let n;async function r(){return null==n&&(n=Promise.all([i.e(8368),i.e(4123)]).then(i.bind(i,44123)).then((e=>new e.WhereClauseCache(500,500)))),n}async function s(e,t){const i=await r(),n=i.get(e,t);if(null==n)throw i.getError(e,t);return n}function o(e,t){return e||=null,t||=null,"1=1"===e?t??e:"1=1"===t?e??t:e&&t?`(${e}) AND (${t})`:e??t}function a(e,t){return e||=null,t||=null,"1=1"===e||"1=1"===t||e===t?"1=1"===e?e:t:e&&t?`(${e}) OR (${t})`:e??t}i.d(t,{GP:()=>s,IW:()=>a,mA:()=>o})},41366:(e,t,i)=>{i.d(t,{K:()=>p,Q:()=>u});var n=i(90237),r=i(66552),s=i(53966),o=i(10107),a=(i(44208),i(87811),i(93223)),l=i(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",p=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&h||i&&c||null,t&&i&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,n._)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,n._)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,n._)([(0,a.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,n._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},41560:(e,t,i)=>{i.d(t,{Ch:()=>o,mW:()=>s});var n=i(34727),r=i(39516);function s(e,t){return{...t,filterMode:e.mode}}function o(e,t,i){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:i,maxScale:n}of e.filters)t[0]=Math.max(t[0],c(i)),t[1]=Math.min(t[1],h(n));return t}(e);if(s&&((0,n.gg)(t,s[0])||(0,n.ZH)(i,s[1])))return"";const o=Array.from(a(e,t,i)),l=function(e,t,i){if(0===e.length)return!0;const r=c(e.at(0)?.minScale),s=h(e.at(-1)?.maxScale);if((0,n.ZH)(r,t)||(0,n.gg)(s,i))return!0;for(let t=0;t<e.length-1;t++){const i=e[t],r=e[t+1];if((0,n.ZH)(c(r.minScale),h(i.maxScale)))return!0}return!1}(o,t,i)?"1=1":o.map((e=>e.where||"1=1")).reduce(((e,t)=>(0,r.IW)(e,t)),"");return l&&"1=1"!==l?l:""}function*a(e,t,i){if("manual"===u(e)){const t=e.filters.find((t=>t.id===e.activeFilterId));t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const n of e.filters)l(n.minScale,n.maxScale,t,i)&&(yield n)}}function l(e,t,i,r){return e=c(e),i=c(i),t=h(t),!(!(0,n.Sp)(i,e)&&(r??i)>e||(0,n.Hx)(t,i)||void 0!==r&&(0,n.Sp)(r,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function c(e){return e||Number.POSITIVE_INFINITY}function h(e){return e||0}},50498:(e,t,i)=>{i.d(t,{Ye:()=>h,gy:()=>c,yR:()=>p});var n=i(66552),r=i(5443),s=i(91075),o=i(48526),a=i(86738),l=i(39829),u=i(82799);const c=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),h=(0,n.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),p={base:s.A,key:"type",typeMap:{extent:r.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}}},52106:(e,t,i)=>{i.d(t,{A:()=>M});var n,r=i(90237),s=i(13874),o=i(69540),a=i(51447),l=i(25482),u=i(53966),c=i(36708),h=i(24326),p=i(10107),f=(i(44208),i(87811),i(40608)),d=i(12195),m=i(65864),y=i(50498),g=i(54339),_=i(33910);function b(e){if(null==e)return null;const t={};for(const i in e){const n=e[i];n&&(t[i]=n.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends(o.A.ClonableMixin(l.A)){static{n=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,h.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const i of[t,this.sourceLayer,this.layer])if(i){if("popupTemplate"in i&&i.popupTemplate)return i.popupTemplate;if(e&&"defaultPopupTemplate"in i&&null!=i.defaultPopupTemplate)return i.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=this.sourceLayer??this.layer;return e?(0,g.r)(this,e):null}getGlobalId(){const e=this.sourceLayer??this.layer;return e&&"globalIdField"in e&&e.globalIdField?this.getAttribute(e.globalIdField):null}toJSON(){return{aggregateGeometries:b(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,d.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,n){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const r={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(r.action=n),"attributes"===e&&(r.attributeName=n),this.layer.graphicChanged(r)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,c.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,r._)([(0,p.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const n=(0,m.rS)(e[i]);n&&(t[i]=n)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,r._)([(0,p.MZ)({value:null})],M.prototype,"attributes",null),(0,r._)([(0,p.MZ)({value:null,types:y.yR,json:{read:m.rS}})],M.prototype,"geometry",null),(0,r._)([(0,p.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,r._)([(0,p.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,r._)([(0,p.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,r._)([(0,p.MZ)({type:s.A,value:null})],M.prototype,"popupTemplate",null),(0,r._)([(0,p.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,r._)([(0,p.MZ)({value:null,types:_.Es})],M.prototype,"symbol",null),(0,r._)([(0,p.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,r._)([(0,p.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=n=(0,r._)([(0,f.$)("esri.Graphic")],M)},54339:(e,t,i)=>{function n(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const n of t.fieldNames)i.push(e.attributes[n]??null);return JSON.stringify(i)}}}function r(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map((t=>e.attributes?.[t]));return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>n,r:()=>r})},59247:(e,t,i)=>{i.d(t,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>h,Nd:()=>p,jm:()=>f,sK:()=>y});var n=i(40876),r=i(90629);function s(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const o=s();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:s,fromValues:function(e,t,i,n,r,s,o,a,l,u,c,h,p,f,d,m){const y=new Float32Array(16);return y[0]=e,y[1]=t,y[2]=i,y[3]=n,y[4]=r,y[5]=s,y[6]=o,y[7]=a,y[8]=l,y[9]=u,y[10]=c,y[11]=h,y[12]=p,y[13]=f,y[14]=d,y[15]=m,y}},Symbol.toStringTag,{value:"Module"}));var a=i(58083);class l{constructor(e,t,i){this.strength=e,this.radius=t,this.threshold=i,this.type="bloom"}interpolate(e,t,i){this.strength=d(e.strength,t.strength,i),this.radius=d(e.radius,t.radius,i),this.threshold=d(e.threshold,t.threshold,i)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:m(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,i){this.radius=Math.round(d(e.radius,t.radius,i))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:m(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.amount=d(e.amount,t.amount,i),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||s();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const i=(0,a.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const i=(0,a.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,a.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,a.mg)(i,i)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const i=1-2*t,n=(0,a.hZ)(e,i,0,0,t,0,i,0,t,0,0,i,t,0,0,0,1);return(0,a.mg)(n,n)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const i=(0,a.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,a.mg)(i,i)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,i=(0,a.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,a.mg)(i,i)})(e)}}}class h{constructor(e,t,i,n){this.offsetX=e,this.offsetY=t,this.blurRadius=i,this.color=n,this.type="drop-shadow"}interpolate(e,t,i){this.offsetX=d(e.offsetX,t.offsetX,i),this.offsetY=d(e.offsetY,t.offsetY,i),this.blurRadius=d(e.blurRadius,t.blurRadius,i),this.color[0]=Math.round(d(e.color[0],t.color[0],i)),this.color[1]=Math.round(d(e.color[1],t.color[1],i)),this.color[2]=Math.round(d(e.color[2],t.color[2],i)),this.color[3]=d(e.color[3],t.color[3],i)}clone(){return new h(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:m(this.offsetX),yoffset:m(this.offsetY),blurRadius:m(this.blurRadius),color:e}}}class p{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,i){this.angle=d(e.angle,t.angle,i),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||s();this._colorMatrix=((e,t)=>{const i=Math.sin(t*Math.PI/180),n=Math.cos(t*Math.PI/180),r=(0,a.hZ)(e,.213+.787*n-.213*i,.715-.715*n-.715*i,.072-.072*n+.928*i,0,.213-.213*n+.143*i,.715+.285*n+.14*i,.072-.072*n-.283*i,0,.213-.213*n-.787*i,.715-.715*n+.715*i,.072+.928*n+.072*i,0,0,0,0,1);return(0,a.mg)(r,r)})(e,this.angle)}}class f{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,i){this.amount=d(e.amount,t.amount,i)}clone(){return new f(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function d(e,t,i){return e+(t-e)*i}function m(e){return Math.round(1e3*(0,r.PN)(e))/1e3}function y(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new f(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new h(0,0,0,[...(0,n.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},70328:(e,t,i)=>{i.d(t,{BI:()=>_,Ej:()=>p,Ie:()=>y,Jt:()=>g,Ne:()=>f,RF:()=>c,aI:()=>M,fA:()=>o,gE:()=>l,hZ:()=>m,iT:()=>h,is:()=>b,qv:()=>x,vI:()=>d,vY:()=>a,v_:()=>T,vt:()=>s,w1:()=>u});var n=i(5443),r=(i(19419),i(4197));function s(e=T){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,i,n,r,o,a=s()){return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function a(e,t=s()){return function(e,t,i,n=s()){return m(n,x),function(e,t,i=0,n=t.length/3){let r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)r=Math.min(r,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(n,e,t,i),n}(e,0,e.length/3,t)}function l(e,t=(0,r.jh)(24)){const[i,n,s,o,a,l]=e;return t[0]=i,t[1]=n,t[2]=s,t[3]=i,t[4]=n,t[5]=l,t[6]=i,t[7]=a,t[8]=s,t[9]=i,t[10]=a,t[11]=l,t[12]=o,t[13]=n,t[14]=s,t[15]=o,t[16]=n,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new n.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function h(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function f(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function d(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function m(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function y(e){return e?m(e,x):s(x)}function g(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function _(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=r,e[5]=Number.POSITIVE_INFINITY,e}function b(e){return 6===e.length}function M(e,t,i){if(null==e||null==t)return e===t;if(!b(e)||!b(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const x=[1/0,1/0,1/0,-1/0,-1/0,-1/0],T=[0,0,0,0,0,0];s()},92935:(e,t,i)=>{var n;i.d(t,{X:()=>n}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(n||(n={}))},95466:(e,t,i)=>{i.d(t,{A:()=>f});var n=i(49186),r=i(53966),s=i(91869),o=i(3330),a=i(12195),l=i(30524),u=i(98623),c=i(56400),h=i(96285);const p=new Map;class f{static fromJSON(e){return new f(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new f(e.fields??[],g(e))}static fromLayerJSON(e){return new f(e.fields??[],g(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const i=[];for(const e of this.fields){const t=e?.name,n=m(t);if(t&&n){const r=d(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(d(e))??this._normalizedFieldsMap.get(m(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):y.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?o.GB.instance:t===u.n$?h.mQ.utcInstance:(0,s.tE)(p,t,(()=>h.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,a.W)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function d(e){return e.trim().toLowerCase()}function m(e){return(0,l.rS)(e)?.toLowerCase()??""}const y=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function g(e){const t=new Map;if(!e.fields)return t;const i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,s=(n?"startField"in n?n.startField:n.startTimeField:"")??"",o=(n?"endField"in n?n.endField:n.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,c.ZS)(e.dateFieldsTimeReference):null,l=r?function(e){return"timeZone"in e}(r)?r.timeZone??a:r.dateFieldsTimeReference?(0,c.ZS)(r.dateFieldsTimeReference):a??u.n$:null,h=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.timeReference?(0,c.ZS)(n.timeReference):a:null,p=new Map([[d(r?.creationDateField??""),l],[d(r?.editDateField??""),l],[d(s),h],[d(o),h]]);for(const{name:n,type:r}of e.fields)if(y.has(r))t.set(n,u.L5);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,u.L5);else{const e=p.get(d(n??""))??a;t.set(n,e)}return t}}}]);