@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.4

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 (192) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
  3. package/assets/esri/core/workers/chunks/09e677ca7532a281d262.js +1 -0
  4. package/assets/esri/core/workers/chunks/0f7ddb063ee0664f2fca.js +1 -0
  5. package/assets/esri/core/workers/chunks/17ab08f60764244b2cf8.js +1 -0
  6. package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
  7. package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
  8. package/assets/esri/core/workers/chunks/{2446e336b1f7256d4fde.js → 2c587ed66e2586cccb8d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
  10. package/assets/esri/core/workers/chunks/{00c7b9fb375c9a934158.js → 38c6452dc9cf18e8bca8.js} +1 -1
  11. package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
  12. package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
  13. package/assets/esri/core/workers/chunks/{16db0bc87d87a7313dc4.js → 4806df402845c717c842.js} +1 -1
  14. package/assets/esri/core/workers/chunks/4884432d80e9af947449.js +1 -0
  15. package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
  16. package/assets/esri/core/workers/chunks/588cd91d08cec5207be1.js +1 -0
  17. package/assets/esri/core/workers/chunks/{83e3d104886b48f00397.js → 633c00c02a81397fc8df.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{efb96aefe979a0f5c632.js → 640e8ac3498be30c6614.js} +1 -1
  19. package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
  20. package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{33901eb1574e46abd9af.js → 6c213768715c52625855.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{5e6471dd2a08e66b47d0.js → 6e4940fe3bba014c921b.js} +57 -58
  23. package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 6f724f75f85dc3989d60.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
  27. package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
  28. package/assets/esri/core/workers/chunks/8b05fb365336cc42fecc.js +1 -0
  29. package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
  30. package/assets/esri/core/workers/chunks/8eec6da5e862cc33ea2b.js +1 -0
  31. package/assets/esri/core/workers/chunks/90d8f297d9cb359e071d.js +1 -0
  32. package/assets/esri/core/workers/chunks/91785144901dfe56c5e2.js +1 -0
  33. package/assets/esri/core/workers/chunks/{471f6eba213412b82840.js → 927417abea79c955b216.js} +1 -1
  34. package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
  35. package/assets/esri/core/workers/chunks/{adaa9d4239f4e905d011.js → 9d4bd73dd50400e9d328.js} +1 -1
  36. package/assets/esri/core/workers/chunks/a324cc07d486061d0d8e.js +1 -0
  37. package/assets/esri/core/workers/chunks/a40130579791293cefa2.js +1 -0
  38. package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → a49718c74053314ed741.js} +1 -1
  39. package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
  40. package/assets/esri/core/workers/chunks/ad2891985e0fe45aa8d2.js +1 -0
  41. package/assets/esri/core/workers/chunks/afcba35eea836aea98ca.js +1 -0
  42. package/assets/esri/core/workers/chunks/b3d2e397ea74ebef4423.js +1 -0
  43. package/assets/esri/core/workers/chunks/b5fb9da45cc9dee286f8.js +1 -0
  44. package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
  45. package/assets/esri/core/workers/chunks/b846d4215210aac9f6ef.js +1 -0
  46. package/assets/esri/core/workers/chunks/c7dc821db8c14fec24a7.js +1 -0
  47. package/assets/esri/core/workers/chunks/c9df9a0a4a45f9a53ce9.js +1 -0
  48. package/assets/esri/core/workers/chunks/{45a4041881e6235d73a2.js → d0a9711f48dfa5fee68a.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
  50. package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
  51. package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
  52. package/assets/esri/core/workers/chunks/e23ec4f867c4735eec20.js +1 -0
  53. package/assets/esri/core/workers/chunks/ea16230a0edfc9f756bd.js +1 -0
  54. package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
  55. package/assets/esri/core/workers/chunks/ef900614353505afb210.js +1 -0
  56. package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
  57. package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
  58. package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
  59. package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
  60. package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
  61. package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
  62. package/assets/esri/themes/base/_View.scss +2 -5
  63. package/assets/esri/themes/base/widgets/_Feature.scss +12 -4
  64. package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
  65. package/assets/esri/themes/dark/main.css +1 -1
  66. package/assets/esri/themes/light/main.css +1 -1
  67. package/assets/esri/themes/light/view.css +1 -1
  68. package/chunks/DefaultMaterial.glsl.js +42 -42
  69. package/chunks/Terrain.glsl.js +7 -7
  70. package/copyright.txt +1 -1
  71. package/geometry/Mesh.js +1 -1
  72. package/geometry/support/DoubleArray.js +1 -1
  73. package/geometry/support/meshUtils/bounds.js +1 -1
  74. package/geometry/support/meshUtils/georeference.js +1 -1
  75. package/interfaces.d.ts +87 -3
  76. package/kernel.js +1 -1
  77. package/layers/OrientedImageryLayer.js +1 -1
  78. package/layers/SceneLayer.js +1 -1
  79. package/layers/VideoLayer.js +1 -1
  80. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  81. package/layers/graphics/editingSupport.js +1 -1
  82. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  83. package/layers/graphics/sources/OGCFeatureSource.js +1 -1
  84. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  85. package/layers/graphics/sources/support/uploadAssets.js +1 -1
  86. package/layers/mixins/ArcGISImageService.js +1 -1
  87. package/layers/mixins/ImageryTileMixin.js +1 -1
  88. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  89. package/layers/orientedImagery/core/bestImageUtils.js +1 -1
  90. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  91. package/layers/orientedImagery/transformations/groundToImageUtils.js +1 -1
  92. package/layers/orientedImagery/transformations/imageToGroundUtils.js +1 -1
  93. package/layers/support/SubtypeSublayer.js +1 -1
  94. package/layers/support/capabilities.js +1 -1
  95. package/layers/support/editableLayers.js +1 -1
  96. package/layers/support/layerUtils.js +1 -1
  97. package/layers/support/serviceCapabilitiesUtils.js +1 -1
  98. package/layers/video/VideoCameraSensorModel.js +5 -0
  99. package/layers/video/VideoController.js +1 -1
  100. package/layers/video/videoUtils.js +1 -1
  101. package/package.json +1 -1
  102. package/portal/PortalItem.js +1 -1
  103. package/renderers/support/colorRampUtils.js +1 -1
  104. package/request.js +1 -1
  105. package/rest/support/meshFeatureSet.js +1 -1
  106. package/smartMapping/labels/bins.js +5 -0
  107. package/smartMapping/labels/clusters.js +1 -1
  108. package/smartMapping/labels/support/utils.js +5 -0
  109. package/smartMapping/support/binningUtils.js +1 -1
  110. package/support/requestUtils.js +1 -1
  111. package/support/revision.js +1 -1
  112. package/views/2d/layers/features/schemaUtils.js +1 -1
  113. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  114. package/views/3d/layers/I3SMeshView3D.js +1 -1
  115. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  116. package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
  117. package/views/3d/layers/SceneLayerWorker.js +1 -1
  118. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  119. package/views/3d/layers/i3s/I3SClientMaterialUtil.js +5 -0
  120. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  121. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  122. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  123. package/views/3d/terrain/TerrainRenderer.js +1 -1
  124. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +19 -20
  125. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
  126. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  127. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  128. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  129. package/views/DOMContainer.js +1 -1
  130. package/views/PopupView.js +1 -1
  131. package/views/ui/DefaultUI.js +1 -1
  132. package/views/ui/UI.js +1 -1
  133. package/webmap/initialViewPropertiesUtils.js +1 -1
  134. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  135. package/widgets/Editor/CreateWorkflow.js +1 -1
  136. package/widgets/Editor/EditorViewModel.js +1 -1
  137. package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
  138. package/widgets/Editor/UpdateWorkflow.js +1 -1
  139. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  140. package/widgets/Editor/workflowUtils.js +1 -1
  141. package/widgets/Feature/support/featureUtils.js +1 -1
  142. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  143. package/widgets/FeatureForm/FormExpressionsManager.js +1 -1
  144. package/widgets/FeatureForm/RelationshipInput.js +1 -1
  145. package/widgets/FeatureForm/css.js +1 -1
  146. package/widgets/FeatureForm.js +1 -1
  147. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  148. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  149. package/widgets/OrientedImageryViewer.js +1 -1
  150. package/widgets/Popup.js +1 -1
  151. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
  152. package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.js +1 -1
  153. package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
  154. package/widgets/support/geolocationUtils.js +1 -1
  155. package/assets/esri/core/workers/chunks/0610691a0c0d9fbbd6d2.js +0 -1
  156. package/assets/esri/core/workers/chunks/0618fb0058f39ecd363f.js +0 -1
  157. package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
  158. package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
  159. package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
  160. package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
  161. package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
  162. package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
  163. package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
  164. package/assets/esri/core/workers/chunks/624521961fe1f2c4f2c5.js +0 -1
  165. package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
  166. package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
  167. package/assets/esri/core/workers/chunks/6f510f28526c73ab453c.js +0 -1
  168. package/assets/esri/core/workers/chunks/7479dc0c790337af7597.js +0 -1
  169. package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
  170. package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
  171. package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
  172. package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
  173. package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
  174. package/assets/esri/core/workers/chunks/a7fd2a95fde197c06828.js +0 -1
  175. package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
  176. package/assets/esri/core/workers/chunks/b8e6c64792a512df4c4d.js +0 -1
  177. package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
  178. package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
  179. package/assets/esri/core/workers/chunks/c96db6b7ce47bd343fdb.js +0 -1
  180. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
  181. package/assets/esri/core/workers/chunks/d95ca50ca7af4c222036.js +0 -1
  182. package/assets/esri/core/workers/chunks/da57eba2fe25495ea217.js +0 -1
  183. package/assets/esri/core/workers/chunks/ee5ee03dd2c7dc940272.js +0 -1
  184. package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
  185. package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
  186. package/assets/esri/core/workers/chunks/f720967ba8c5486a26a2.js +0 -1
  187. package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
  188. package/layers/orientedImagery/core/Affixes.js +0 -5
  189. package/layers/orientedImagery/core/CameraProperties.js +0 -5
  190. package/layers/orientedImagery/core/ImageProperties.js +0 -5
  191. package/layers/orientedImagery/core/ImageryTypes.js +0 -5
  192. package/layers/orientedImagery/core/imageryUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4209],{28924:(e,t,i)=>{i.d(t,{Z:()=>r});class r{constructor(){this.declaredRootClass="esri.arcade.featureSetCollection",this._layerById={},this._layerByName={}}add(e,t,i){this._layerById[t]=i,this._layerByName[e]=i}async featureSetByName(e,t=!0,i=["*"]){return void 0===this._layerByName[e]?null:this._layerByName[e]}async featureSetById(e,t=!0,i=["*"]){return void 0===this._layerById[e]?null:this._layerById[e]}castToText(e=!1){return"object, FeatureSetCollection"}}},67651:(e,t,i)=>{i.r(t),i.d(t,{constructAssociationMetaDataFeatureSetFromUrl:()=>re,constructFeatureSet:()=>te,constructFeatureSetFromPortalItem:()=>de,constructFeatureSetFromRelationship:()=>se,constructFeatureSetFromUrl:()=>ee,convertToFeatureSet:()=>ue,createFeatureSetCollectionFromMap:()=>le,createFeatureSetCollectionFromService:()=>oe,initialiseMetaDataCache:()=>X});var r=i(3172),s=i(28924),n=i(61363),a=i(84328),l=i(38171),o=i(70409),u=i(85065),d=i(91136),c=i(90961),h=i(3823),f=i(90658),p=i(36515),y=i(95002),_=i(59987),g=i(41534);class m{constructor(){this.field="",this.tofieldname="",this.typeofstat="MIN",this.workingexpr=null}clone(){const e=new m;return e.field=this.field,e.tofieldname=this.tofieldname,e.typeofstat=this.typeofstat,e.workingexpr=this.workingexpr,e}static parseStatField(e,t,i){const r=new m;r.field=e;const s=g.WhereClause.create(t,i),n=function(e){if("function"===e.parseTree.type){if(0===e.parseTree.args.value.length)return{name:e.parseTree.name,expr:null};if(e.parseTree.args.value.length>1)throw new _.eS(_.f.MissingStatisticParameters);const t=g.WhereClause.create((0,p.XF)(e.parseTree.args.value[0],f.Bj.Standardised,e.parameters),e.fieldsIndex);return{name:e.parseTree.name,expr:t}}return null}(s);if(null===n)throw new _.eS(_.f.UnsupportedSqlFunction,{function:""});const a=n.name.toUpperCase().trim();if("MIN"===a){if(r.typeofstat="MIN",r.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"min"})}else if("MAX"===a){if(r.typeofstat="MAX",r.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"max"})}else if("COUNT"===a)r.typeofstat="COUNT",r.workingexpr=n.expr;else if("STDEV"===a){if(r.typeofstat="STDDEV",r.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"stdev"})}else if("SUM"===a){if(r.typeofstat="SUM",r.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"sum"})}else if("MEAN"===a){if(r.typeofstat="AVG",r.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:a})}else if("AVG"===a){if(r.typeofstat="AVG",r.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"avg"})}else{if("VAR"!==a)throw new _.eS(_.f.UnsupportedSqlFunction,{function:a});if(r.typeofstat="VAR",r.workingexpr=n.expr,null===s)throw new _.eS(_.f.InvalidFunctionParameters,{function:"var"})}return r}toStatisticsName(){switch(this.typeofstat.toUpperCase()){case"MIN":return"min";case"MAX":return"max";case"SUM":return"sum";case"COUNT":default:return"count";case"VAR":return"var";case"STDDEV":return"stddev";case"AVG":return"avg"}}}var w=i(44543),b=i(82971),S=i(1231),F=i(99514);function I(e){if(!e)return"COUNT";switch(e.toLowerCase()){case"max":return"MAX";case"var":case"variance":return"VAR";case"avg":case"average":case"mean":return"AVG";case"min":return"MIN";case"sum":return"SUM";case"stdev":case"stddev":return"STDDEV";case"count":return"COUNT"}return"COUNT"}class C extends d.Z{constructor(e){super(e),this._decodedStatsfield=[],this._decodedGroupbyfield=[],this._candosimplegroupby=!0,this.phsyicalgroupbyfields=[],this.objectIdField="ROW__ID",this._internalObjectIdField="ROW__ID",this._adaptedFields=[],this.declaredClass="esri.arcade.featureset.actions.Aggregate",this._uniqueIds=1,this._maxQuery=10,this._maxProcessing=10,this._parent=e.parentfeatureset,this._config=e}isTable(){return!0}async _getSet(e){if(null===this._wset){const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,this._wset}return this._wset}_isInFeatureSet(){return f.dj.InFeatureSet}_nextUniqueName(e){for(;1===e["T"+this._uniqueIds.toString()];)this._uniqueIds++;const t="T"+this._uniqueIds.toString();return e[t]=1,t}_convertToEsriFieldType(e){return e}_initialiseFeatureSet(){const e={};let t=!1,i=1;const r=this._parent?this._parent.getFieldsIndex():new F.Z([]);for(this.objectIdField="ROW__ID",this.globalIdField="";!1===t;){let e=!1;for(let t=0;t<this._config.groupbyfields.length;t++)if(this._config.groupbyfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}if(!1===e)for(let t=0;t<this._config.statsfields.length;t++)if(this._config.statsfields[t].name.toLowerCase()===this.objectIdField.toLowerCase()){e=!0;break}!1===e?t=!0:(this.objectIdField="ROW__ID"+i.toString(),i++)}for(const e of this._config.statsfields){const t=new m;t.field=e.name,t.tofieldname=e.name,t.workingexpr=e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,r),t.typeofstat=I(e.statistic),this._decodedStatsfield.push(t)}this._decodedGroupbyfield=[];for(const e of this._config.groupbyfields){const t={name:e.name,singlefield:null,tofieldname:e.name,expression:e.expression instanceof g.WhereClause?e.expression:g.WhereClause.create(e.expression,r)};this._decodedGroupbyfield.push(t)}if(null!==this._parent){this.geometryType=this._parent.geometryType,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField="";for(const t of this._parent.fields)e[t.name.toUpperCase()]=1;this.types=null}else this.geometryType=f.Qk.point,this.typeIdField="",this.types=null,this.spatialReference=new b.Z({wkid:4326});this.fields=[];const s=new m;s.field=this._nextUniqueName(e),s.tofieldname=this.objectIdField,s.workingexpr=g.WhereClause.create(this._parent.objectIdField,this._parent.getFieldsIndex()),s.typeofstat="MIN",this._decodedStatsfield.push(s);for(const t of this._decodedGroupbyfield){const i=new S.Z;if(t.name=this._nextUniqueName(e),i.name=t.tofieldname,i.alias=i.name,(0,p.y5)(t.expression)){const e=this._parent.getField((0,p.zR)(t.expression,f.Bj.Standardised));if(!e)throw new _.EN(_.H9.AggregationFieldNotFound);t.name=e.name,t.singlefield=e.name,this.phsyicalgroupbyfields.push(e.name),i.type=e.type}else{i.type=this._convertToEsriFieldType((0,p.DT)(t.expression,this._parent.fields));const e=new S.Z;e.name=t.name,e.alias=e.name,this.phsyicalgroupbyfields.push(t.name),this._adaptedFields.push(new o.yN(e,t.expression)),this._candosimplegroupby=!1}this.fields.push(i)}if(this._adaptedFields.length>0)for(const e of this._parent.fields)this._adaptedFields.push(new o.$X(e));for(let t=0;t<this._decodedStatsfield.length;t++){const i=new S.Z;let r=null;const s=this._decodedStatsfield[t];s.field=this._nextUniqueName(e),s.tofieldname===this.objectIdField&&(this._internalObjectIdField=s.field),i.name=s.tofieldname,i.alias=i.name;const n=null!==s.workingexpr&&(0,p.y5)(s.workingexpr)?(0,p.zR)(s.workingexpr,f.Bj.Standardised):"";switch(this._decodedStatsfield[t].typeofstat){case"SUM":if(""!==n){if(r=this._parent.getField(n),!r)throw new _.EN(_.H9.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"MIN":case"MAX":if(""!==n){if(r=this._parent.getField(n),!r)throw new _.EN(_.H9.AggregationFieldNotFound);i.type=r.type}else i.type="double";break;case"COUNT":i.type="integer";break;case"STDDEV":case"VAR":case"AVG":if(""!==n&&(r=this._parent.getField(n),!r))throw new _.EN(_.H9.AggregationFieldNotFound);i.type="double"}this.fields.push(i)}}async _canDoAggregates(){return!1}async _getFeatures(e,t,i,r){-1!==t&&this._featureCache[t];const s=this._maxQuery;return!0===this._checkIfNeedToExpandKnownPage(e,s)?(await this._expandPagedSet(e,s,0,0,r),this._getFeatures(e,t,i,r)):"success"}async _getFilteredSet(e,t,i,r,s){if(""!==e)return new c.Z([],[],!0,null);let n=null;const l={ordered:!1,nowhereclause:!1};if(await this._ensureLoaded(),null!==i)for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===(0,p.hq)(i,this._decodedStatsfield[e].tofieldname)){l.nowhereclause=!0,i=null;break}if(null!==r){l.ordered=!0;for(let e=0;e<this._decodedStatsfield.length;e++)if(!0===r.scanForField(this._decodedStatsfield[e].tofieldname)){r=null,l.ordered=!1;break}if(null!==r)for(const e of this._decodedGroupbyfield)if(null===e.singlefield&&!0===r.scanForField(e.tofieldname)){r=null,l.ordered=!1;break}}if(!1!==this._candosimplegroupby&&await this._parent._canDoAggregates(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,null)){let e=null;i&&(e=this._reformulateWhereClauseWithoutGroupByFields(i));let t=null;r&&(t=this._reformulateOrderClauseWithoutGroupByFields(r));const a=await this._parent._getAggregatePagesDataSourceDefinition(this.phsyicalgroupbyfields,this._decodedStatsfield,"",null,e,t,this._internalObjectIdField);return this._checkCancelled(s),n=!0===l.nowhereclause?new c.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)):new c.Z(a._candidates.slice(0),a._known.slice(0),!0===l.ordered&&a._ordered,this._clonePageDefinition(a.pagesDefinition)),n}let d=this._parent;if(this._adaptedFields.length>0&&(d=new o.Xx({parentfeatureset:this._parent,adaptedFields:this._adaptedFields,extraFilter:null})),!0===l.nowhereclause)n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:d,orderbyclause:new h.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}});else{let e=d;if(null!==i){let t=null;i&&(t=this._reformulateWhereClauseWithoutGroupByFields(i)),e=new a.Z({parentfeatureset:e,whereclause:t})}n=new c.Z(["GETPAGES"],[],!1,{aggregatefeaturesetpagedefinition:!0,resultOffset:0,resultRecordCount:this._maxQuery,internal:{fullyResolved:!1,workingItem:null,type:"manual",iterator:null,set:[],subfeatureset:new u.Z({parentfeatureset:e,orderbyclause:new h.Z(this.phsyicalgroupbyfields.join(",")+","+this._parent.objectIdField+" ASC")})}})}return n}_reformulateWhereClauseWithoutStatsFields(e){for(const t of this._decodedStatsfield)e=(0,p.bB)(e,t.tofieldname,(0,p.zR)(t.workingexpr,f.Bj.Standardised),this._parent.getFieldsIndex());return e}_reformulateWhereClauseWithoutGroupByFields(e){for(const t of this._decodedGroupbyfield)t.tofieldname!==t.name&&(e=(0,p.bB)(e,t.tofieldname,(0,p.zR)(t.expression,f.Bj.Standardised),this._parent.getFieldsIndex()));return e}_reformulateOrderClauseWithoutGroupByFields(e){const t=[];for(const e of this._decodedGroupbyfield)e.tofieldname!==e.name&&t.push({field:e.tofieldname,newfield:e.name});return t.length>0?e.replaceFields(t):e}_clonePageDefinition(e){return null===e?null:!0===e.aggregatefeaturesetpagedefinition?{aggregatefeaturesetpagedefinition:!0,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,internal:e.internal}:this._parent._clonePageDefinition(e)}async _refineSetBlock(e,t,i){return!0===this._checkIfNeedToExpandCandidatePage(e,this._maxQuery)?(await this._expandPagedSet(e,this._maxQuery,0,0,i),this._refineSetBlock(e,t,i)):(this._checkCancelled(i),e._candidates.length,this._refineKnowns(e,t),e._candidates.length,e._candidates.length,e)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getPhysicalPage(e,t,i){if(!0===e.pagesDefinition.aggregatefeaturesetpagedefinition)return this._sequentialGetPhysicalItem(e,e.pagesDefinition.resultRecordCount,i,[]);const r=await this._getAgregagtePhysicalPage(e,t,i);for(const e of r){const t={geometry:e.geometry,attributes:{}},i={};for(const t in e.attributes)i[t.toLowerCase()]=e.attributes[t];for(const e of this._decodedGroupbyfield)t.attributes[e.tofieldname]=i[e.name.toLowerCase()];for(const e of this._decodedStatsfield)t.attributes[e.tofieldname]=i[e.field.toLowerCase()];this._featureCache[t.attributes[this.objectIdField]]=new l.Z(t)}return r.length}_sequentialGetPhysicalItem(e,t,i,r){return new Promise(((s,n)=>{null===e.pagesDefinition.internal.iterator&&(e.pagesDefinition.internal.iterator=e.pagesDefinition.internal.subfeatureset.iterator(i)),!0===e.pagesDefinition.internal.fullyResolved||0===t?s(r.length):this._nextAggregateItem(e,t,i,r,(n=>{null===n?s(r.length):(t-=1,s(this._sequentialGetPhysicalItem(e,t,i,r)))}),n)}))}_nextAggregateItem(e,t,i,r,s,a){try{(0,n.$)(e.pagesDefinition.internal.iterator.next()).then((n=>{if(null===n)if(null!==e.pagesDefinition.internal.workingItem){const t=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);r.push(t),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(t.attributes[this.objectIdField]),e.pagesDefinition.internal.fullyResolved=!0,s(null)}else e.pagesDefinition.internal.fullyResolved=!0,s(null);else{const l=this._generateAggregateHash(n);if(null===e.pagesDefinition.internal.workingItem)e.pagesDefinition.internal.workingItem={features:[n],id:l};else{if(l!==e.pagesDefinition.internal.workingItem.id){const i=this._calculateAndAppendAggregateItem(e.pagesDefinition.internal.workingItem);return r.push(i),e.pagesDefinition.internal.workingItem=null,e.pagesDefinition.internal.set.push(i.attributes[this.objectIdField]),t-=1,e.pagesDefinition.internal.workingItem={features:[n],id:l},void s(i)}e.pagesDefinition.internal.workingItem.features.push(n)}this._nextAggregateItem(e,t,i,r,s,a)}}),a)}catch(e){a(e)}}_calculateFieldStat(e,t,i){const r=[];for(let i=0;i<e.features.length;i++)if(null!==t.workingexpr){const s=t.workingexpr.calculateValue(e.features[i]);null!==s&&r.push(s)}else r.push(null);switch(t.typeofstat){case"MIN":i.attributes[t.tofieldname]=(0,y.tj)("min",r,-1);break;case"MAX":i.attributes[t.tofieldname]=(0,y.tj)("max",r,-1);break;case"SUM":i.attributes[t.tofieldname]=(0,y.tj)("sum",r,-1);break;case"COUNT":i.attributes[t.tofieldname]=r.length;break;case"VAR":i.attributes[t.tofieldname]=(0,y.tj)("var",r,-1);break;case"STDDEV":i.attributes[t.tofieldname]=(0,y.tj)("stddev",r,-1);break;case"AVG":i.attributes[t.tofieldname]=(0,y.tj)("avg",r,-1)}return!0}_calculateAndAppendAggregateItem(e){const t={attributes:{},geometry:null};for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.features[0].attributes[i.singlefield]:i.expression.calculateValue(e.features[0]);t.attributes[i.tofieldname]=r}for(const i of this._decodedStatsfield)this._calculateFieldStat(e,i,t);const i=[];for(let r=0;r<this._decodedStatsfield.length;r++)i.push(this._calculateFieldStat(e,this._decodedStatsfield[r],t));return this._featureCache[t.attributes[this.objectIdField]]=new l.Z({attributes:t.attributes,geometry:t.geometry}),t}_generateAggregateHash(e){let t="";for(const i of this._decodedGroupbyfield){const r=i.singlefield?e.attributes[i.singlefield]:i.expression.calculateValue(e);t+=null==r?":":":"+r.toString()}return(0,w.F)(t,w.M.String)}async _stat(){return{calculated:!1}}async getFeatureByObjectId(){return null}static registerAction(){d.Z._featuresetFunctions.groupby=function(e,t){return new C({parentfeatureset:this,groupbyfields:e,statsfields:t})}}}var v=i(53073),R=i(63991),D=i(80692),T=i(40330),x=i(33955),k=i(19238),N=i(20102),E=i(80442),A=i(95330),P=i(2981),L=i(10158),O=i(4967),j=i(53261),Z=i(74889),G=i(14165);function q(e,t){return null!=t&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}i(68773),i(67676),i(81271),i(98326),i(56545);var B=i(41818),M=(i(66577),i(16306),i(45091),i(67900),i(8744),i(5396)),U=(i(98732),i(75935)),W=(i(28141),i(58539)),z=i(33586),Q=i(30359);class V extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerDynamic",this._removeGeometry=!1,this._overrideFields=null,this.formulaCredential=null,this._pageJustIds=!1,this._requestStandardised=!1,this._useDefinitionExpression=!0,this._cachedDateMetaData={},e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(e){this._pageJustIds=e}get urlQueryPath(){return this._layer.parsedUrl.path||""}convertQueryToLruCacheKey(e){const t=this.urlQueryPath+","+(0,f.hd)(e.toJSON());return(0,w.F)(t,w.M.String)}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}if(this._layer.source&&this._layer.source.sourceJSON){const e=this._layer.source.sourceJSON.currentVersion;!0===this._layer.source.sourceJSON.useStandardizedQueries?(this._databaseType=f.Bj.StandardisedNoInterval,null!=e&&e>=10.61&&(this._databaseType=f.Bj.Standardised)):null!=e&&(e>=10.5&&(this._databaseType=f.Bj.StandardisedNoInterval,this._requestStandardised=!0),e>=10.61&&(this._databaseType=f.Bj.Standardised))}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._layer instanceof Q.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}_isInFeatureSet(){return f.dj.InFeatureSet}async _refineSetBlock(e){return e}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}async _runDatabaseProbe(e){await this._ensureLoaded();const t=new G.Z;this.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t.where=e.replace("OBJECTID",this._layer.objectIdField);try{return await this._layer.queryObjectIds(t),!0}catch(e){return!1}}_canUsePagination(){return!(!this._layer.capabilities||!this._layer.capabilities.query||!0!==this._layer.capabilities.query.supportsPagination)}_cacheableFeatureSetSourceKey(){return this._layer.url}pbfSupportedForQuery(e){const t=this._layer?.capabilities?.query;return!e.outStatistics&&!0===t?.supportsFormatPBF&&!0===t?.supportsQuantizationEditMode}async queryPBF(e){return e.quantizationParameters={mode:"edit"},(await async function(e,t,r,s){return async function(e,t,r,s){const n=r?.infoFor3D;if(!(q(e,n)&&null!=n&&t.assetMaps&&t.features&&t.features.length))return Z.Z.fromJSON(t);const{meshFeatureSetFromJSON:a}=await(0,A.Hl)(Promise.all([i.e(6481),i.e(6459),i.e(2097)]).then(i.bind(i,91681)),s);return a(e,n,t)}(t,await async function(e,t,i,r){const s={...r},n=function(e,t){let i=G.Z.from(e);i.sourceSpatialReference=i.sourceSpatialReference??t?.sourceSpatialReference??null,(t?.gdbVersion||t?.dynamicDataSource)&&(i=i===e?i.clone():i,i.gdbVersion=e.gdbVersion||t.gdbVersion,i.dynamicDataSource=e.dynamicDataSource?L.n.from(e.dynamicDataSource):t.dynamicDataSource);const r=t?.infoFor3D;if(null!=r&&q(e,r)){i=i===e?i.clone():i,i.formatOf3DObjects=null;const{supportedFormats:t,queryFormats:s}=r,n=(0,P.S0)("model/gltf-binary",t)??(0,P.Ow)("glb",t),a=(0,P.S0)("model/gltf+json",t)??(0,P.Ow)("gtlf",t);for(const e of s){if(e===n){i.formatOf3DObjects=e;break}e!==a||i.formatOf3DObjects||(i.formatOf3DObjects=e)}if(!i.formatOf3DObjects)throw new N.Z("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(null==i.outFields||!i.outFields.includes("*")){i=i===e?i.clone():i,null==i.outFields&&(i.outFields=[]);const{originX:t,originY:s,originZ:n,translationX:a,translationY:l,translationZ:o,scaleX:u,scaleY:d,scaleZ:c,rotationX:h,rotationY:f,rotationZ:p,rotationDeg:y}=r.transformFieldRoles;i.outFields.push(t,s,n,a,l,o,u,d,c,h,f,p,y)}}return i}(t,i),a=null!=t.outStatistics?.[0],l=(0,E.Z)("featurelayer-pbf-statistics"),o=!a||l;let u;if("pbf"===i?.format&&o)try{u=await(0,j.t)(e,n,s)}catch(e){if("query:parsing-pbf"!==e.name)throw e;i.format="json"}return"json"!==i?.format&&o||(u=await(0,O.F)(e,n,s)),function(e,t){if(null!=e&&null!=t)for(const i of t){const t=e.get(i.name);t&&Object.assign(i,t.toJSON())}}(i?.fieldsIndex,u.fields),u}(e,t,r,s),r,s)}(this._layer.parsedUrl,e,{format:"pbf"},{})).unquantize()}get gdbVersion(){return this._layer&&this._layer.capabilities&&this._layer.capabilities.data&&this._layer.capabilities.data.isVersioned?this._layer.gdbVersion||"SDE.DEFAULT":""}nativeCapabilities(){return{title:this._layer.title??"",source:this,canQueryRelated:!0,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:this._requestStandardised}}executeQuery(e,t){e.returnZ=this.hasZ,e.returnM=this.hasM;const i="execute"===t?O.e:"executeForCount"===t?B.P:M.G,r="execute"===t&&this.pbfSupportedForQuery(e);let s=null;if(this.recentlyUsedQueries){const t=this.convertQueryToLruCacheKey(e);s=this.recentlyUsedQueries.getFromCache(t),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e),this.recentlyUsedQueries.addToCache(t,s),s=s.catch((e=>{throw this.recentlyUsedQueries?.removeFromCache(t),e})))}return this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:e,method:t}),null===s&&(s=!0!==r?i(this._layer.parsedUrl.path,e):this.queryPBF(e)),s}async _getFilteredSet(e,t,i,r,s){const n=await this.databaseType();if(this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);if(this._canUsePagination())return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new G.Z;this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.where=null===i?null===t?"1=1":"":(0,p.zR)(i,n),this._requestStandardised&&(o.sqlFormat="standard"),o.spatialRelationship=this._makeRelationshipEnum(e),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null,o.geometry=null===t?null:t,o.relationParameter=this._makeRelationshipParam(e);let u=await this.executeQuery(o,"executeForIds");return null===u&&(u=[]),this._checkCancelled(s),new c.Z([],u,l,null)}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;null!==r&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(n=r.constructClause(),a=!0);const l=await this.databaseType();let o=null===i?null===t?"1=1":"":(0,p.zR)(i,l);this._layer.definitionExpression&&this._useDefinitionExpression&&(o=""!==o?"(("+this._layer.definitionExpression+") AND ("+o+"))":this._layer.definitionExpression);let u=this._maxQueryRate();const d=this._layer.capabilities?.query.maxRecordCount;null!=d&&d<u&&(u=d);let h=null;if(!0===this._pageJustIds)h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:this._layer.objectIdField,resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:!1,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}});else{let i=!0;!0===this._removeGeometry&&(i=!1);const r=this._overrideFields??this._fieldsIncludingObjectId(["*"]);h=new c.Z([],["GETPAGES"],a,{spatialRel:this._makeRelationshipEnum(e),relationParam:this._makeRelationshipParam(e),outFields:r.join(","),resultRecordCount:u,resultOffset:0,geometry:null===t?null:t,where:o,orderByFields:n,returnGeometry:i,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}return await this._expandPagedSet(h,u,0,1,s),h}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,spatialRel:e.spatialRel,relationParam:e.relationParam,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=new G.Z;this._requestStandardised&&(a.sqlFormat="standard"),this.datesInUnknownTimezone&&(a.timeReferenceUnknownClient=!0),a.spatialRelationship=e.pagesDefinition.spatialRel,a.relationParameter=e.pagesDefinition.relationParam,a.outFields=e.pagesDefinition.outFields.split(","),a.num=e.pagesDefinition.resultRecordCount,a.start=e.pagesDefinition.internal.lastPage,a.geometry=e.pagesDefinition.geometry,a.where=e.pagesDefinition.where,a.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,a.returnGeometry=e.pagesDefinition.returnGeometry,a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return"done";const o=this._layer.objectIdField;for(let t=0;t<l.features.length;t++)e.pagesDefinition.internal.set[s+t]=l.features[t].attributes[o];if(!1===this._pageJustIds)for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return(void 0===l.exceededTransferLimit&&l.features.length!==e.pagesDefinition.resultRecordCount||!1===l.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+l.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,"done"}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFeatures(e,t,i,r){const s=[];if(-1!==t&&void 0===this._featureCache[t]&&s.push(t),!0===this._checkIfNeedToExpandKnownPage(e,this._maxProcessingRate()))return await this._expandPagedSet(e,this._maxProcessingRate(),0,0,r),this._getFeatures(e,t,i,r);let n=0;for(let r=e._lastFetchedIndex;r<e._known.length;r++){if(e._lastFetchedIndex+=1,n++,void 0===this._featureCache[e._known[r]]){let i=!1;if(null!==this._layer._mode&&void 0!==this._layer._mode){const t=this._layer._mode;if(void 0!==t._featureMap[e._known[r]]){const s=t._featureMap[e._known[r]];null!==s&&(i=!0,this._featureCache[e._known[r]]=s)}}if(!1===i&&(e._known[r]!==t&&s.push(e._known[r]),s.length>=this._maxProcessingRate()-1))break}if(n>=i&&0===s.length)break}if(0===s.length)return"success";const a=new G.Z;this._requestStandardised&&(a.sqlFormat="standard"),this.datesInUnknownTimezone&&(a.timeReferenceUnknownClient=!0),a.objectIds=s,a.outFields=this._overrideFields??this._fieldsIncludingObjectId(["*"]),a.returnGeometry=!0,!0===this._removeGeometry&&(a.returnGeometry=!1),a.outSpatialReference=this.spatialReference;const l=await this.executeQuery(a,"execute");if(this._checkCancelled(r),void 0!==l.error)throw new _.EN(_.H9.RequestFailed,{reason:l.error});const o=this._layer.objectIdField;for(let e=0;e<l.features.length;e++)this._featureCache[l.features[e].attributes[o]]=l.features[e];return"success"}async _getDistinctPages(e,t,i,r,s,n,a,l,o){await this._ensureLoaded();const u=await this.databaseType();let d=i.parseTree.column;const c=this._layer.fields??[];for(let e=0;e<c.length;e++)if(c[e].name.toLowerCase()===d.toLowerCase()){d=c[e].name;break}const h=new G.Z;this._requestStandardised&&(h.sqlFormat="standard"),this.datesInUnknownTimezone&&(h.timeReferenceUnknownClient=!0);let f=null===n?null===s?"1=1":"":(0,p.zR)(n,u);this._layer.definitionExpression&&this._useDefinitionExpression&&(f=""!==f?"(("+this._layer.definitionExpression+") AND ("+f+"))":this._layer.definitionExpression),h.where=f,h.spatialRelationship=this._makeRelationshipEnum(r),h.relationParameter=this._makeRelationshipParam(r),h.geometry=null===s?null:s,h.returnDistinctValues=!0,h.returnGeometry=!1,h.outFields=[d];const y=await this.executeQuery(h,"execute");if(this._checkCancelled(o),!y.hasOwnProperty("features"))throw new _.EN(_.H9.InvalidStatResponse);let g=!1;for(let e=0;e<c.length;e++)if(c[e].name===d){"date"===c[e].type&&(g=!0);break}for(let e=0;e<y.features.length;e++){if(g){const t=y.features[e].attributes[d];null!==t?l.push(new Date(t)):l.push(t)}else l.push(y.features[e].attributes[d]);if(l.length>=a)break}return 0===y.features.length?l:y.features.length===this._layer.capabilities?.query.maxRecordCount&&l.length<a?{calculated:!0,result:await this._getDistinctPages(e+y.features.length,t,i,r,s,n,a,l,o)}:l}async _distinctStat(e,t,i,r,s,n,a){return{calculated:!0,result:await this._getDistinctPages(0,e,t,i,r,s,n,[],a)}}isTable(){return this._layer.isTable||null===this._layer.geometryType||"table"===this._layer.type||""===this._layer.geometryType||"esriGeometryNull"===this._layer.geometryType}async _countstat(e,t,i,r){const s=await this.databaseType(),n=new G.Z;if(this._requestStandardised&&(n.sqlFormat="standard"),this.isTable()&&i&&null!==t&&""!==t)return{calculated:!0,result:0};let a=null===r?null===i?"1=1":"":(0,p.zR)(r,s);return this._layer.definitionExpression&&this._useDefinitionExpression&&(a=""!==a?"(("+this._layer.definitionExpression+") AND ("+a+"))":this._layer.definitionExpression),n.where=a,this.datesInUnknownTimezone&&(n.timeReferenceUnknownClient=!0),n.where=a,n.spatialRelationship=this._makeRelationshipEnum(t),n.relationParameter=this._makeRelationshipParam(t),n.geometry=null===i?null:i,n.returnGeometry=!1,{calculated:!0,result:await this.executeQuery(n,"executeForCount")}}async _stats(e,t,i,r,s,n,a){await this._ensureLoaded();const l=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsSqlExpression,o=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsStatistics,u=this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsDistinct;if("count"===e)return u?this._countstat(e,i,r,s):{calculated:!1};if(!1===o||!1===(0,p.y5)(t)&&!1===l||!1===t.isStandardized)return""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a);if("distinct"===e)return!1===u?""!==i||null!==s?{calculated:!1}:this._manualStat(e,t,n,a):this._distinctStat(e,t,i,r,s,n,a);const d=await this.databaseType();if(this.isTable()&&r&&null!==i&&""!==i)return{calculated:!0,result:null};const c=new G.Z;this._requestStandardised&&(c.sqlFormat="standard");let h=null===s?null===r?"1=1":"":(0,p.zR)(s,d);this._layer.definitionExpression&&this._useDefinitionExpression&&(h=""!==h?"(("+this._layer.definitionExpression+") AND ("+h+"))":this._layer.definitionExpression),c.where=h,c.spatialRelationship=this._makeRelationshipEnum(i),c.relationParameter=this._makeRelationshipParam(i),c.geometry=null===r?null:r,this.datesInUnknownTimezone&&(c.timeReferenceUnknownClient=!0);const f=new W.Z;f.statisticType=(0,y.g3)(e),f.onStatisticField=(0,p.zR)(t,d),f.outStatisticFieldName="ARCADE_STAT_RESULT",c.returnGeometry=!1;let g="ARCADE_STAT_RESULT";c.outStatistics=[f];const m=await this.executeQuery(c,"execute");if(!m.hasOwnProperty("features")||0===m.features.length)throw new _.EN(_.H9.InvalidStatResponse);let w=!1;const b=m.fields??[];for(let e=0;e<b.length;e++)if("ARCADE_STAT_RESULT"===b[e].name.toUpperCase()){g=b[e].name,"date"===b[e].type&&(w=!0);break}if(w){let e=m.features[0].attributes[g];return null!==e&&(e=new Date(m.features[0].attributes[g])),{calculated:!0,result:e}}return{calculated:!0,result:m.features[0].attributes[g]}}_stat(e,t,i,r,s,n,a){return this._stats(e,t,i,r,s,n,a)}async _canDoAggregates(e,t){await this._ensureLoaded();let i=!1;const r=this._layer.capabilities?.query,s=!0===r?.supportsSqlExpression;if(null!=r&&!0===r.supportsStatistics&&!0===r.supportsOrderBy&&(i=!0),i)for(let e=0;e<t.length-1;e++)(!1===t[e].workingexpr?.isStandardized||!1===(0,p.y5)(t[e].workingexpr)&&!1===s)&&(i=!1);return!1!==i}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,a){await this._ensureLoaded();const l=await this.databaseType();let o="",u=!1,d=!1;null!==n&&this._layer.capabilities&&this._layer.capabilities.query&&!0===this._layer.capabilities.query.supportsOrderBy&&(o=n.constructClause(),d=!0),this._layer.capabilities&&this._layer.capabilities.query&&!1===this._layer.capabilities.query.supportsPagination&&(d=!1,u=!0,o=this._layer.objectIdField);const h=[];for(let e=0;e<t.length;e++){const i=new W.Z;i.onStatisticField=null!==t[e].workingexpr?(0,p.zR)(t[e].workingexpr,l):"",i.outStatisticFieldName=t[e].field,i.statisticType=t[e].toStatisticsName(),h.push(i)}""===o&&(o=e.join(","));let f=this._maxQueryRate();const y=this._layer.capabilities?.query.maxRecordCount;null!=y&&y<f&&(f=y);let _=null===s?null===r?"1=1":"":(0,p.zR)(s,l);return this._layer.definitionExpression&&this._useDefinitionExpression&&(_=""!==_?"(("+this._layer.definitionExpression+") AND ("+_+"))":this._layer.definitionExpression),new c.Z([],["GETPAGES"],d,{groupbypage:!0,spatialRel:this._makeRelationshipEnum(i),relationParam:this._makeRelationshipParam(i),outFields:["*"],useOIDpagination:u,generatedOid:a,resultRecordCount:f,resultOffset:0,groupByFieldsForStatistics:e,outStatistics:h,geometry:null===r?null:r,where:_,orderByFields:o,returnGeometry:!1,returnIdsOnly:!1,internal:{lastMaxId:-1,set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}})}async _getAgregagtePhysicalPage(e,t,i){let r=e.pagesDefinition.where;!0===e.pagesDefinition.useOIDpagination&&(r=""!==r?"("+r+") AND ("+e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString()+")":e.pagesDefinition.generatedOid+">"+e.pagesDefinition.internal.lastMaxId.toString());const s=e.pagesDefinition.internal.lastRetrieved,n=s,a=e.pagesDefinition.internal.lastPage,o=new G.Z;if(this._requestStandardised&&(o.sqlFormat="standard"),o.where=r,o.spatialRelationship=e.pagesDefinition.spatialRel,o.relationParameter=e.pagesDefinition.relationParam,o.outFields=e.pagesDefinition.outFields,o.outStatistics=e.pagesDefinition.outStatistics,o.geometry=e.pagesDefinition.geometry,o.groupByFieldsForStatistics=e.pagesDefinition.groupByFieldsForStatistics,o.num=e.pagesDefinition.resultRecordCount,o.start=e.pagesDefinition.internal.lastPage,o.returnGeometry=e.pagesDefinition.returnGeometry,this.datesInUnknownTimezone&&(o.timeReferenceUnknownClient=!0),o.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,this.isTable()&&o.geometry&&o.spatialRelationship)return[];const u=await this.executeQuery(o,"execute");if(this._checkCancelled(i),!u.hasOwnProperty("features"))throw new _.EN(_.H9.InvalidStatResponse);const d=[];if(e.pagesDefinition.internal.lastPage!==a)return[];u.features.length>0&&void 0===u.features[0].attributes[e.pagesDefinition.generatedOid]&&(e.pagesDefinition.generatedOid=e.pagesDefinition.generatedOid.toLowerCase());for(let t=0;t<u.features.length;t++)e.pagesDefinition.internal.set[n+t]=u.features[t].attributes[e.pagesDefinition.generatedOid];for(let e=0;e<u.features.length;e++)d.push(new l.Z({attributes:u.features[e].attributes,geometry:null}));return!0===e.pagesDefinition.useOIDpagination?0===u.features.length?e.pagesDefinition.internal.fullyResolved=!0:e.pagesDefinition.internal.lastMaxId=u.features[u.features.length-1].attributes[e.pagesDefinition.generatedOid]:(void 0===u.exceededTransferLimit&&u.features.length!==e.pagesDefinition.resultRecordCount||!1===u.exceededTransferLimit)&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=s+u.features.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,d}static create(e,t,i,r,s){const n=new k.default({url:e,outFields:null===t?["*"]:t});return new V({layer:n,spatialReference:i,lrucache:r,interceptor:s})}relationshipMetaData(){return this._layer&&this._layer.source&&this._layer.source.sourceJSON&&this._layer.source.sourceJSON.relationships?this._layer.source.sourceJSON.relationships:[]}serviceUrl(){return(0,f.US)(this._layer.parsedUrl.path)}async queryAttachments(e,t,i,r,s){const n=this._layer.capabilities;if(n?.data.supportsAttachment&&n?.operations.supportsQueryAttachments){const n={objectIds:[e],returnMetadata:s};(t&&t>0||i&&i>0)&&(n.size=[t&&t>0?t:0,i&&i>0?i:t+1]),r&&r.length>0&&(n.attachmentTypes=r),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:n,method:"attachments"});const a=await this._layer.queryAttachments(n),l=[];return a&&a[e]&&a[e].forEach((t=>{const i=this._layer.parsedUrl.path+"/"+e.toString()+"/attachments/"+t.id.toString();let r=null;s&&t.exifInfo&&(r=z.Z.convertJsonToArcade(t.exifInfo,"system",!0)),l.push(new D.Z(t.id,t.name,t.contentType,t.size,i,r,t.keywords??null))})),l}return[]}async queryRelatedFeatures(e){const t={f:"json",relationshipId:e.relationshipId.toString(),definitionExpression:e.where,outFields:e.outFields?.join(","),returnGeometry:e.returnGeometry.toString()};void 0!==e.resultOffset&&null!==e.resultOffset&&(t.resultOffset=e.resultOffset.toString()),void 0!==e.resultRecordCount&&null!==e.resultRecordCount&&(t.resultRecordCount=e.resultRecordCount.toString()),e.orderByFields&&(t.orderByFields=e.orderByFields.join(",")),e.objectIds&&e.objectIds.length>0&&(t.objectIds=e.objectIds.join(",")),e.outSpatialReference&&(t.outSR=JSON.stringify(e.outSpatialReference.toJSON())),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preRequestCallback({layer:this._layer,queryPayload:t,method:"relatedrecords",url:this._layer.parsedUrl.path+"/queryRelatedRecords"});const i=await(0,r.default)(this._layer.parsedUrl.path+"/queryRelatedRecords",{responseType:"json",query:t});if(i.data){const e={},t=i.data;if(t&&t.relatedRecordGroups){const i=t.spatialReference;for(const r of t.relatedRecordGroups){const s=r.objectId,n=[];for(const e of r.relatedRecords){e.geometry&&(e.geometry.spatialReference=i);const t=new l.Z({geometry:e.geometry?(0,x.im)(e.geometry):null,attributes:e.attributes});n.push(t)}e[s]={features:n,exceededTransferLimit:!0===t.exceededTransferLimit}}}return e}throw new _.EN(_.H9.InvalidRequest)}async getFeatureByObjectId(e,t){const i=new G.Z;i.outFields=t,i.returnGeometry=!1,i.outSpatialReference=this.spatialReference,i.where=this.objectIdField+"="+e.toString(),this.datesInUnknownTimezone&&(i.timeReferenceUnknownClient=!0),this.featureSetQueryInterceptor&&this.featureSetQueryInterceptor.preLayerQueryCallback({layer:this._layer,query:i,method:"execute"});const r=await(0,O.e)(this._layer.parsedUrl.path,i);return 1===r.features.length?r.features[0]:null}async getIdentityUser(){await this.load();const e=T.id?.findCredential(this._layer.url);return e?e.userId:null}async getOwningSystemUrl(){await this.load();const e=T.id?.findServerInfo(this._layer.url);if(e)return e.owningSystemUrl;let t=this._layer.url;const i=t.toLowerCase().indexOf("/rest/services");if(t=i>-1?t.substring(0,i):t,t){t+="/rest/info";try{const e=await(0,r.default)(t,{query:{f:"json"}});let i="";return e.data&&e.data.owningSystemUrl&&(i=e.data.owningSystemUrl),i}catch(e){return""}}return""}getDataSourceFeatureSet(){const e=new V({layer:this._layer,spatialReference:this.spatialReference??void 0,outFields:this._overrideFields??void 0,includeGeometry:!this._removeGeometry,lrucache:this.recentlyUsedQueries??void 0,interceptor:this.featureSetQueryInterceptor??void 0});return e._useDefinitionExpression=!1,e}get preferredTimeReference(){return void 0===this._cachedDateMetaData.preferredTimeReference&&(this._cachedDateMetaData.preferredTimeReference=this._layer?.preferredTimeReference?.toJSON()??null),this._cachedDateMetaData.preferredTimeReference}get dateFieldsTimeReference(){return void 0===this._cachedDateMetaData.dateFieldsTimeReference&&(this._cachedDateMetaData.dateFieldsTimeReference=this._layer?.dateFieldsTimeReference?.toJSON()??null),this._cachedDateMetaData.dateFieldsTimeReference}get datesInUnknownTimezone(){return this._layer.datesInUnknownTimezone}get editFieldsInfo(){return void 0===this._cachedDateMetaData.editFieldsInfo&&(this._cachedDateMetaData.editFieldsInfo=this._layer?.editFieldsInfo?.toJSON()??null),this._cachedDateMetaData.editFieldsInfo}get timeInfo(){return void 0===this._cachedDateMetaData.timeInfo&&(this._cachedDateMetaData.timeInfo=this._layer?.timeInfo?.toJSON()??null),this._cachedDateMetaData.timeInfo}}var J=i(17805);class H extends d.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerRelated",this._findObjectId=-1,this._requestStandardised=!1,this._removeGeometry=!1,this._overrideFields=null,this.featureObjectId=null,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,this._findObjectId=e.objectId,this.featureObjectId=e.objectId,this.relationship=e.relationship,this._relatedLayer=e.relatedLayer,void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return f.tI}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return await Promise.all([this._layer.load(),this._relatedLayer?.load()]),this._initialiseFeatureSet(),this}nativeCapabilities(){return this._relatedLayer.nativeCapabilities()}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._relatedLayer.geometryType,this.fields=this._relatedLayer.fields.slice(0),this.hasZ=this._relatedLayer.hasZ,this.hasM=this._relatedLayer.hasM,null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}const e=this._layer.nativeCapabilities();e&&(this._databaseType=e.databaseType,this._requestStandardised=e.requestStandardised),this.objectIdField=this._relatedLayer.objectIdField,this.globalIdField=this._relatedLayer.globalIdField,this.hasM=this._relatedLayer.supportsM,this.hasZ=this._relatedLayer.supportsZ,this.typeIdField=this._relatedLayer.typeIdField,this.types=this._relatedLayer.types}async databaseType(){return await this._relatedLayer.databaseType(),this._databaseType=this._relatedLayer._databaseType,this._databaseType}isTable(){return this._relatedLayer.isTable()}_isInFeatureSet(){return f.dj.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new l.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){if(await this.databaseType(),this.isTable()&&t&&null!==e&&""!==e)return new c.Z([],[],!0,null);const n=this._layer.nativeCapabilities();if(!1===n.canQueryRelated)return new c.Z([],[],!0,null);if(n.capabilities?.queryRelated&&n.capabilities.queryRelated.supportsPagination)return this._getFilteredSetUsingPaging(e,t,i,r,s);let a="",l=!1;null!==r&&n.capabilities&&n.capabilities.queryRelated&&!0===n.capabilities.queryRelated.supportsOrderBy&&(a=r.constructClause(),l=!0);const o=new U.default;o.objectIds=[this._findObjectId];const u=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);o.outFields=u,o.relationshipId=this.relationship.id,o.where="1=1";let d=!0;!0===this._removeGeometry&&(d=!1),o.returnGeometry=d,this._requestStandardised&&(o.sqlFormat="standard"),o.outSpatialReference=this.spatialReference,o.orderByFields=""!==a?a.split(","):null;const h=await n.source.queryRelatedFeatures(o);this._checkCancelled(s);const f=h[this._findObjectId]?h[this._findObjectId].features:[],p=[];for(let e=0;e<f.length;e++)this._featureCache[f[e].attributes[this._relatedLayer.objectIdField]]=f[e],p.push(f[e].attributes[this._relatedLayer.objectIdField]);const y=t&&null!==e&&""!==e,_=null!=i;return new c.Z(y||_?p:[],y||_?[]:p,l,null)}_fieldsIncludingObjectId(e){if(null===e)return[this.objectIdField];const t=e.slice(0);if(t.includes("*"))return t;let i=!1;for(const e of t)if(e.toUpperCase()===this.objectIdField.toUpperCase()){i=!0;break}return!1===i&&t.push(this.objectIdField),t}async _getFilteredSetUsingPaging(e,t,i,r,s){let n="",a=!1;const l=this._layer.nativeCapabilities();null!==r&&l&&l.capabilities?.queryRelated&&!0===l.capabilities.queryRelated.supportsOrderBy&&(n=r.constructClause(),a=!0),await this.databaseType();let o=this._maxQueryRate();const u=l.capabilities?.query.maxRecordCount;null!=u&&u<o&&(o=u);const d=t&&null!==e&&""!==e,h=null!=i;let f=null,p=!0;!0===this._removeGeometry&&(p=!1);const y=null!==this._overrideFields?this._overrideFields:this._fieldsIncludingObjectId(this._relatedLayer.fields?this._relatedLayer.fields.map((e=>e.name)):["*"]);return f=new c.Z(d||h?["GETPAGES"]:[],d||h?[]:["GETPAGES"],a,{outFields:y.join(","),resultRecordCount:o,resultOffset:0,objectIds:[this._findObjectId],where:"1=1",orderByFields:n,returnGeometry:p,returnIdsOnly:"false",internal:{set:[],lastRetrieved:0,lastPage:0,fullyResolved:!1}}),await this._expandPagedSet(f,o,0,0,s),f}_expandPagedSet(e,t,i,r,s){return this._expandPagedSetFeatureSet(e,t,i,r,s)}_clonePageDefinition(e){return null===e?null:!0!==e.groupbypage?{groupbypage:!1,outFields:e.outFields,resultRecordCount:e.resultRecordCount,resultOffset:e.resultOffset,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}:{groupbypage:!0,outFields:e.outFields,resultRecordCount:e.resultRecordCount,useOIDpagination:e.useOIDpagination,generatedOid:e.generatedOid,groupByFieldsForStatistics:e.groupByFieldsForStatistics,resultOffset:e.resultOffset,outStatistics:e.outStatistics,geometry:e.geometry,where:e.where,objectIds:e.objectIds,orderByFields:e.orderByFields,returnGeometry:e.returnGeometry,returnIdsOnly:e.returnIdsOnly,internal:e.internal}}async _getPhysicalPage(e,t,i){const r=e.pagesDefinition.internal.lastRetrieved,s=r,n=e.pagesDefinition.internal.lastPage,a=this._layer.nativeCapabilities(),l=new U.default;!0===this._requestStandardised&&(l.sqlFormat="standard"),l.relationshipId=this.relationship.id,l.objectIds=e.pagesDefinition.objectIds,l.resultOffset=e.pagesDefinition.internal.lastPage,l.resultRecordCount=e.pagesDefinition.resultRecordCount,l.outFields=e.pagesDefinition.outFields.split(","),l.where=e.pagesDefinition.where,l.orderByFields=""!==e.pagesDefinition.orderByFields?e.pagesDefinition.orderByFields.split(","):null,l.returnGeometry=e.pagesDefinition.returnGeometry,l.outSpatialReference=this.spatialReference;const o=await a.source.queryRelatedFeatures(l);if(this._checkCancelled(i),e.pagesDefinition.internal.lastPage!==n)return 0;const u=o[this._findObjectId]?o[this._findObjectId].features:[];for(let t=0;t<u.length;t++)e.pagesDefinition.internal.set[s+t]=u[t].attributes[this._relatedLayer.objectIdField];for(let e=0;e<u.length;e++)this._featureCache[u[e].attributes[this._relatedLayer.objectIdField]]=u[e];const d=!o[this._findObjectId]||!1===o[this._findObjectId].exceededTransferLimit;return u.length!==e.pagesDefinition.resultRecordCount&&d&&(e.pagesDefinition.internal.fullyResolved=!0),e.pagesDefinition.internal.lastRetrieved=r+u.length,e.pagesDefinition.internal.lastPage+=e.pagesDefinition.resultRecordCount,u.length}async _getFeatures(e,t,i,r){const s=[];-1!==t&&void 0===this._featureCache[t]&&s.push(t);const n=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,n))return await this._expandPagedSet(e,n,0,0,r),this._getFeatures(e,t,i,r);let a=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(a++,a<=i&&(e._lastFetchedIndex+=1),!("GETPAGES"!==e._known[r]&&void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>i)))&&!(a>=i&&0===s.length);r++);if(0===s.length)return"success";throw new _.EN(_.H9.MissingFeatures)}async _refineSetBlock(e,t,i){return e}async _stat(e,t,i,r,s,n,a){return{calculated:!1}}get gdbVersion(){return this._relatedLayer.gdbVersion}async _canDoAggregates(e,t,i,r,s){return!1}relationshipMetaData(){return this._relatedLayer.relationshipMetaData()}serviceUrl(){return this._relatedLayer.serviceUrl()}queryAttachments(e,t,i,r,s){return this._relatedLayer.queryAttachments(e,t,i,r,s)}getFeatureByObjectId(e,t){return this._relatedLayer.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._relatedLayer.getOwningSystemUrl()}getIdentityUser(){return this._relatedLayer.getIdentityUser()}getDataSourceFeatureSet(){return this._relatedLayer}get preferredTimeReference(){return this._relatedLayer?.preferredTimeReference??null}get dateFieldsTimeReference(){return this._relatedLayer?.dateFieldsTimeReference??null}get datesInUnknownTimezone(){return this._relatedLayer?.datesInUnknownTimezone}get editFieldsInfo(){return this._relatedLayer?.editFieldsInfo??null}get timeInfo(){return this._relatedLayer?.timeInfo??null}}var K=i(48039),$=i(15235);function X(){null===K.Z.applicationCache&&(K.Z.applicationCache=new K.Z)}async function Y(e,t){if(K.Z.applicationCache){const i=K.Z.applicationCache.getLayerInfo(e);if(i){const r=await i;return new k.default({url:e,outFields:t,sourceJSON:r})}const r=new k.default({url:e,outFields:t}),s=(async()=>(await r.load(),r.sourceJSON))();if(K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,s);try{return await s,r}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return await s,r}return new k.default({url:e,outFields:t})}async function ee(e,t,i,r,s,n=null){return te(await Y(e,["*"]),t,i,r,s,n)}function te(e,t=null,i=null,r=!0,s=null,a=null){if(e instanceof k.default||(0,n.Z)(e)){const n={layer:e,spatialReference:t,outFields:i,includeGeometry:r,lrucache:s,interceptor:a};return 1==!(e.url||!e.source)?new J.Z(n):new V(n)}return te(e.parent,t,i,r,s,a).filter(g.WhereClause.create(e.parent.subtypeField+"="+e.subtypeCode.toString(),e.parent?.fieldsIndex))}async function ie(e){if(null!==K.Z.applicationCache){const t=K.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.default)(e,{responseType:"json",query:{f:"json"}});if(t.data){const e=t.data;return e.layers||(e.layers=[]),e.tables||(e.tables=[]),e}return{layers:[],tables:[]}})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return t}async function re(e,t){const i={metadata:null,networkId:-1,unVersion:3,terminals:[],queryelem:null,layerNameLkp:{},lkp:null},s=await ie(e);if(i.metadata=s,s.controllerDatasetLayers&&void 0!==s.controllerDatasetLayers.utilityNetworkLayerId&&null!==s.controllerDatasetLayers.utilityNetworkLayerId){if(s.layers)for(const e of s.layers)i.layerNameLkp[e.id]=e.name;if(s.tables)for(const e of s.tables)i.layerNameLkp[e.id]=e.name;const n=s.controllerDatasetLayers.utilityNetworkLayerId;i.networkId=n;const a=await async function(e,t){const i="QUERYDATAELEMTS:"+t.toString()+":"+e;if(null!==K.Z.applicationCache){const e=K.Z.applicationCache.getLayerInfo(i);if(null!==e)return e}const s=(async()=>{const i=await(0,r.default)(e+"/queryDataElements",{method:"post",responseType:"json",query:{layers:JSON.stringify([t.toString()]),f:"json"}});if(i.data){const e=i.data;if(e.layerDataElements&&e.layerDataElements[0])return e.layerDataElements[0]}throw new _.EN(_.H9.DataElementsNotFound)})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(i,s);try{return await s}catch(e){throw K.Z.applicationCache.clearLayerInfo(i),e}}return s}(e,n);if(a){i.queryelem=a,i.queryelem&&i.queryelem.dataElement&&void 0!==i.queryelem.dataElement.schemaGeneration&&(i.unVersion=i.queryelem.dataElement.schemaGeneration),i.lkp={},i.queryelem.dataElement.domainNetworks||(i.queryelem.dataElement.domainNetworks=[]);for(const e of i.queryelem.dataElement.domainNetworks){for(const t of e.edgeSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};e.className&&(i.lkp[e.className]=e)}for(const t of e.junctionSources??[]){const e={layerId:t.layerId,sourceId:t.sourceId,className:i.layerNameLkp[t.layerId]??null};e.className&&(i.lkp[e.className]=e)}}if(i.queryelem.dataElement.terminalConfigurations)for(const e of i.queryelem.dataElement.terminalConfigurations)for(const t of e.terminals)i.terminals.push({terminalId:t.terminalId,terminalName:t.terminalName});const s=await async function(e){if(null!==K.Z.applicationCache){const t=K.Z.applicationCache.getLayerInfo(e);if(null!==t)return t}const t=(async()=>{const t=await(0,r.default)(e,{responseType:"json",query:{f:"json"}});return t.data?t.data:null})();if(null!==K.Z.applicationCache){K.Z.applicationCache.setLayerInfo(e,t);try{return await t}catch(t){throw K.Z.applicationCache.clearLayerInfo(e),t}}return t}(e+"/"+n);if(s.systemLayers&&void 0!==s.systemLayers.associationsTableId&&null!==s.systemLayers.associationsTableId){const r=[];i.unVersion>=4&&(r.push("STATUS"),r.push("PERCENTALONG"));let n=await ee(e+"/"+s.systemLayers.associationsTableId.toString(),t,["OBJECTID","FROMNETWORKSOURCEID","TONETWORKSOURCEID","FROMGLOBALID","TOGLOBALID","TOTERMINALID","FROMTERMINALID","ASSOCIATIONTYPE","ISCONTENTVISIBLE","GLOBALID",...r],!1,null,null);return await n.load(),i.unVersion>=4&&(n=n.filter(g.WhereClause.create("STATUS NOT IN (1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 28, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 54, 55, 57, 58, 59, 60, 61, 62,63)",n.getFieldsIndex())),await n.load()),{lkp:i.lkp,associations:n,unVersion:i.unVersion,terminals:i.terminals}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}return{associations:null,unVersion:i.unVersion,lkp:null,terminals:[]}}async function se(e,t,i,r=null,s=null,n=!0,a=null,l=null){let o=e.serviceUrl();if(!o)return null;o="/"===o.charAt(o.length-1)?o+t.relatedTableId.toString():o+"/"+t.relatedTableId.toString();const u=await ee(o,r,s,n,a,l);return new H({layer:e,relatedLayer:u,relationship:t,objectId:i,spatialReference:r,outFields:s,includeGeometry:n,lrucache:a,interceptor:l})}a.Z.registerAction(),C.registerAction(),u.Z.registerAction(),v.Z.registerAction(),R.Z.registerAction();class ne extends s.Z{constructor(e,t=null,i=null,r=null){super(),this._map=e,this._overridespref=t,this._lrucache=i,this._interceptor=r,this._instantLayers=[]}_makeAndAddFeatureSet(e,t=!0,i=null){const r=te(e,this._overridespref,null===i?["*"]:i,t,this._lrucache,this._interceptor);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async featureSetByName(e,t=!0,i=null){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetByName(e,t,i);null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=[],a=this._map.allLayers.find((t=>{if(t instanceof k.default){if(t.title===e)return!0}else if((0,n.Z)(t)){if(t.title===e)return!0;s.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const r=this._map.tables.find((t=>!!(t.title&&t.title===e||t.title&&t.title===e)));if(r){if(r instanceof k.default)return this._makeAndAddFeatureSet(r,t,i);if(r._materializedTable);else{const e=r.outFields?r:{...r,outFields:["*"]};r._materializedTable=new k.default(e)}return await r._materializedTable.load(),this._makeAndAddFeatureSet(r._materializedTable,t,i)}}for(const r of s){if("not-loaded"===r.loadStatus||"loading"===r.loadStatus)try{await r.load()}catch(e){}const s=r.sublayers.find((t=>t.title===e));if(s)return this._makeAndAddFeatureSet(s,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){if(void 0!==this._map.loaded&&void 0!==this._map.load&&!1===this._map.loaded)return await this._map.load(),this.featureSetById(e,t,i);null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=[],a=this._map.allLayers.find((t=>{if(t instanceof k.default){if(t.id===e)return!0}else if((0,n.Z)(t)){if(t.id===e)return!0;s.push(t)}return!1}));if(a)return this._makeAndAddFeatureSet(a,t,i);if(this._map.tables){const r=this._map.tables.find((t=>t.id===e));if(r){if(r instanceof k.default)return this._makeAndAddFeatureSet(r,t,i);if(r._materializedTable);else{const e={...r,outFields:["*"]};r._materializedTable=new k.default(e)}return await r._materializedTable.load(),this._makeAndAddFeatureSet(r._materializedTable,t,i)}}for(const r of s){if("not-loaded"===r.loadStatus||"loading"===r.loadStatus)try{await r.load()}catch(e){}const s=r.sublayers.find((t=>t.id===e));if(s)return this._makeAndAddFeatureSet(s,t,i)}return null}}class ae extends s.Z{constructor(e,t=null,i=null,r=null){super(),this._url=e,this._overridespref=t,this._lrucache=i,this._interceptor=r,this.metadata=null,this._instantLayers=[]}get url(){return this._url}_makeAndAddFeatureSet(e,t=!0,i=null){const r=te(e,this._overridespref,null===i?["*"]:i,t,this._lrucache);return this._instantLayers.push({featureset:r,opitem:e,includeGeometry:t,outFields:JSON.stringify(i)}),r}async _loadMetaData(){const e=await ie(this._url);return this.metadata=e,e}load(){return this._loadMetaData()}clone(){return new ae(this._url,this._overridespref,this._lrucache,this._interceptor)}async featureSetByName(e,t=!0,i=null){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.title===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])t.name===e&&(n=t);if(!n)for(const t of s.tables??[])t.name===e&&(n=t);if(n){const e=await Y(this._url+"/"+n.id,["*"]);return this._makeAndAddFeatureSet(e,t,i)}return null}async featureSetById(e,t=!0,i=["*"]){null===i&&(i=["*"]),i=(i=i.slice(0)).sort();const r=JSON.stringify(i);e=null!=e?e.toString():"";for(let i=0;i<this._instantLayers.length;i++){const s=this._instantLayers[i];if(s.opitem.id===e&&s.includeGeometry===t&&s.outFields===r)return this._instantLayers[i].featureset}const s=await this._loadMetaData();let n=null;for(const t of s.layers??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(!n)for(const t of s.tables??[])null!==t.id&&void 0!==t.id&&t.id.toString()===e&&(n=t);if(n){const e=await Y(this._url+"/"+n.id,["*"]);return this._makeAndAddFeatureSet(e,t,i)}return null}}function le(e,t,i=null,r=null){return new ne(e,t,i,r)}function oe(e,t,i=null,r=null){return new ae(e,t,i,r)}function ue(e,t,i,r,s){if(null===e)return null;if(e instanceof k.default){switch(t){case"datasource":return te(e,s,e.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return te(e,s,e.outFields,!0,i,r)}return null}if((0,n.Z)(e)){switch(t){case"datasource":return te(e,s,e.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return te(e,s,e.outFields,!0,i,r)}return null}if((0,n._)(e)){switch(t){case"datasource":return te(e.parent,s,e.parent.outFields,!0,i,r).getDataSourceFeatureSet();case"parent":case"root":return te(e,s,e.parent.outFields,!0,i,r)}return null}if(e instanceof d.Z)switch(t){case"datasource":return e.getDataSourceFeatureSet();case"parent":return e;case"root":return e.getRootFeatureSet()}return null}async function de(e,t,i,r,s,n,a,l=null){if(K.Z.applicationCache){const o=K.Z.applicationCache.getLayerInfo(e+":"+n.url);if(o){const e=await o;return te(new k.default({url:(0,f.US)(e.url)+"/"+t,outFields:["*"]}),i,r,s,a,l)}}const o=new $.default({id:e,portal:n}).load();K.Z.applicationCache&&K.Z.applicationCache.setLayerInfo(e+":"+n.url,o);try{const e=await o;return te(new k.default({url:(0,f.US)(e.url??"")+"/"+t,outFields:["*"]}),i,r,s,a,l)}catch(t){throw K.Z.applicationCache&&K.Z.applicationCache.clearLayerInfo(e+":"+n.url),t}}},70409:(e,t,i)=>{i.d(t,{$X:()=>y,QP:()=>_,TO:()=>g,Xx:()=>w,yN:()=>m});var r=i(38171),s=i(48853),n=i(77286),a=i(59987),l=i(91136),o=i(90961),u=i(90658),d=i(36515),c=i(70586),h=i(41534),f=i(82971);class p{constructor(e){this.field=e,this.sqlRewritable=!1}postInitialization(e,t){}}class y extends p{constructor(e){super(e),this.sqlRewritable=!0}extractValue(e){return e.attributes[this.field.name]}rewriteSql(e){return{rewritten:this.sqlRewritable,where:e}}}class _ extends p{constructor(e,t,i){super((0,u.JW)(e)),this.originalField=e,this.sqlRewritable=!0,this.field.name=t,this.field.alias=i}rewriteSql(e,t){return{rewritten:this.sqlRewritable,where:(0,d.bB)(e,this.field.name,this.originalField.name,t.getFieldsIndex())}}extractValue(e){return e.attributes[this.originalField.name]}}class g extends p{constructor(e,t,i){super(e),this.codefield=t,this.lkp=i,this.reverseLkp={};for(const e in i)this.reverseLkp[i[e]]=e;this.sqlRewritable=!0}rewriteSql(e,t){const i=this.evaluateNodeToWhereClause(e.parseTree,u.Bj.Standardised,this.field.name,this.codefield instanceof h.WhereClause?(0,d.zR)(this.codefield,u.Bj.Standardised):this.codefield,e.parameters);return i.includes(g.BADNESS)?{rewritten:!1,where:e}:{rewritten:this.sqlRewritable,where:h.WhereClause.create(i,(0,c.s3)(t._parent).getFieldsIndex())}}evaluateNodeToWhereClause(e,t,i=null,r=null,n){let l,o,u,c;switch(e.type){case"interval":return(0,d.TE)(this.evaluateNodeToWhereClause(e.value,t,i,r,n),e.qualifier,e.op);case"case-expression":{let r=" CASE ";"simple"===e.format&&(r+=this.evaluateNodeToWhereClause(e.operand,t,i,g.BADNESS,n));for(let s=0;s<e.clauses.length;s++)r+=" WHEN "+this.evaluateNodeToWhereClause(e.clauses[s].operand,t,i,g.BADNESS,n)+" THEN "+this.evaluateNodeToWhereClause(e.clauses[s].value,t,i,g.BADNESS,n);return null!==e.else&&(r+=" ELSE "+this.evaluateNodeToWhereClause(e.else,t,i,g.BADNESS,n)),r+=" END ",r}case"parameter":{const i=n[e.value.toLowerCase()];if("string"==typeof i)return"'"+i.toString().replaceAll("'","''")+"'";if(i instanceof Date)return(0,d.oX)(i,t,null);if(i instanceof s.iG)return(0,d.mA)(i,t,null);if(i instanceof Array){const e=[];for(let r=0;r<i.length;r++)"string"==typeof i[r]?e.push("'"+i[r].toString().replaceAll("'","''")+"'"):i[r]instanceof Date?e.push((0,d.oX)(i[r],t,null)):i[r]instanceof s.iG?e.push((0,d.mA)(i[r],t,null)):e.push(i[r].toString());return e}return i.toString()}case"expression-list":o=[];for(const s of e.value)o.push(this.evaluateNodeToWhereClause(s,t,i,r,n));return o;case"unary-expression":return" ( NOT "+this.evaluateNodeToWhereClause(e.expr,t,i,g.BADNESS,n)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" AND "+this.evaluateNodeToWhereClause(e.right,t,i,r,n)+") ";case"OR":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" OR "+this.evaluateNodeToWhereClause(e.right,t,i,r,n)+") ";case"IS":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new a.eS(a.f.UnsupportedIsRhs);return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IS NOT NULL )";case"IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+s.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,i,r,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,n),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" IN ("+c+")) ";case"NOT IN":if(l=[],"expression-list"===e.right.type){if("column-reference"===e.left.type&&e.left.column.toUpperCase()===this.field.name.toUpperCase()){const s=[];let a=!0;for(const t of e.right.value){if("string"!==t.type){a=!1;break}if(void 0===this.lkp[t.value]){a=!1;break}s.push(this.lkp[t.value].toString())}if(a)return" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+s.join(",")+")) "}return l=this.evaluateNodeToWhereClause(e.right,t,i,r,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+l.join(",")+")) "}return c=this.evaluateNodeToWhereClause(e.right,t,i,r,n),c instanceof Array?" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+c.join(",")+")) ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,r,n)+" NOT IN ("+c+")) ";case"BETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"NOTBETWEEN":return u=this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)," ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" NOT BETWEEN "+u[0]+" AND "+u[1]+" ) ";case"LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") ";case"NOT LIKE":return""!==e.escape?" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+" ESCAPE '"+e.escape+"') ":" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" NOT LIKE "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") ";case"<>":case"=":if("column-reference"===e.left.type&&"string"===e.right.type){if(e.left.column.toUpperCase()===this.field.name.toUpperCase()&&void 0!==this.lkp[e.right.value.toString()])return" ("+r+" "+e.operator+" "+this.lkp[e.right.value.toString()].toString()+") "}else if("column-reference"===e.right.type&&"string"===e.left.type&&e.right.column.toUpperCase()===this.field.name.toUpperCase())return" ("+this.lkp[e.right.value.toString()].toString()+" "+e.operator+" "+r+") ";return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") ";case"<":case">":case">=":case"<=":case"*":case"-":case"+":case"/":case"||":return" ("+this.evaluateNodeToWhereClause(e.left,t,i,g.BADNESS,n)+" "+e.operator+" "+this.evaluateNodeToWhereClause(e.right,t,i,g.BADNESS,n)+") "}case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":case"date":return(0,d.oX)(e.value,t,null);case"number":return e.value.toString();case"current-time":return(0,d.vR)("date"===e.mode,t);case"column-reference":return i&&i.toLowerCase()===e.column.toLowerCase()?"("+r+")":e.column;case"data-type":return e.value;case"function":{const r=this.evaluateNodeToWhereClause(e.args,t,i,g.BADNESS,n);return(0,d.fz)(e.name,r,t)}}throw new a.eS(a.f.UnsupportedSyntax,{node:e.type})}extractValue(e){return this.codefield instanceof h.WhereClause?this.reverseLkp[this.codefield.calculateValueCompiled(e)]:this.reverseLkp[e.attributes[this.codefield]]}}g.BADNESS="_!!!_BAD_LKP_!!!!";class m extends p{constructor(e,t){super(e),this._sql=t}rewriteSql(e,t){return{rewritten:!0,where:(0,d.bB)(e,this.field.name,(0,d.zR)(this._sql,u.Bj.Standardised),t.getFieldsIndex())}}extractValue(e){return this._sql.calculateValueCompiled(e)}}class w extends l.Z{static findField(e,t){for(const i of e)if(i.name.toLowerCase()===t.toString().toLowerCase())return i;return null}constructor(e){super(e),this._calcFunc=null,this.declaredClass="esri.arcade.featureset.actions.Adapted",this.adaptedFields=[],this._extraFilter=null,this._extraFilter=e.extraFilter,this._parent=e.parentfeatureset,this._maxProcessing=30,this.adaptedFields=e.adaptedFields}_initialiseFeatureSet(){null!==this._parent?(this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.spatialReference=new f.Z({wkid:4326}),this.objectIdField="",this.globalIdField="",this.geometryType=u.Qk.point,this.typeIdField="",this.types=null),this.fields=[];for(const e of this.adaptedFields)e.postInitialization(this,this._parent),this.fields.push(e.field)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();let t=null;return t=this._extraFilter?await this._getFilteredSet("",null,null,null,e):await(this._parent?._getSet(e)),this._checkCancelled(e),(0,c.O3)(t),this._wset=new o.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){return(0,c.s3)(this._parent)._isInFeatureSet(e)}async _getFeatures(e,t,i,s){const a=[];-1!==t&&void 0===this._featureCache[t]&&a.push(t);const l=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,l))return await this._expandPagedSet(e,l,0,0,s),this._getFeatures(e,t,i,s);let u=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(u++,u<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&a.push(e._known[r]),a.length>=l)));r++);if(0===a.length)return"success";e=new o.Z([],a,e._ordered,null);const d=Math.min(a.length,i);await(this._parent?._getFeatures(e,-1,d,s)),this._checkCancelled(s);const c=[];for(let e=0;e<d;e++){const t=this._parent?._featureFromCache(a[e]);void 0!==t&&c.push({geometry:t.geometry,attributes:t.attributes,id:a[e]})}for(const e of c){const t=[];for(const i of this.adaptedFields)t[i.field.name]=i.extractValue(e);this._featureCache[e.id]=new r.Z({attributes:t,geometry:(0,n.r1)(e.geometry)})}return"success"}async _fetchAndRefineFeatures(){throw new a.EN(a.H9.NeverReach)}async _getFilteredSet(e,t,i,r,s){let n=!1;const a=this._reformulateWithoutAdaptions(i);n=a.cannot,i=a.where;let l=!1;if(null!==r){l=!0;const e=[];for(const t of this.adaptedFields)if(!(t instanceof y)&&!0===r.scanForField(t.field.name)){if(!(t instanceof _)){r=null,l=!1;break}e.push({field:t.field.name,newfield:t.originalField.name})}r&&e.length>0&&(r=r.replaceFields(e))}null!==i?null!==this._extraFilter&&(i=(0,d.$e)(this._extraFilter,i)):i=this._extraFilter,await this._ensureLoaded();const u=await(0,c.s3)(this._parent)._getFilteredSet(e,t,i,r,s);let h;return this._checkCancelled(s),h=!0===n?new o.Z(u._candidates.slice(0).concat(u._known.slice(0)),[],!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)):new o.Z(u._candidates.slice(0),u._known.slice(0),!0===l&&u._ordered,this._clonePageDefinition(u.pagesDefinition)),h}_reformulateWithoutAdaptions(e){const t={cannot:!1,where:e};if(null!==e)for(const i of this.adaptedFields)if(!0===(0,d.hq)(e,i.field.name)){const r=i.rewriteSql(e,this);if(!0!==r.rewritten){t.cannot=!0,t.where=null;break}t.where=r.where}return t}async _stat(e,t,i,r,s,n,a){let l=!1,o=this._reformulateWithoutAdaptions(t);if(l=o.cannot,t=o.where,o=this._reformulateWithoutAdaptions(s),l=l||o.cannot,null!==(s=o.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,!0===l)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};const u=await(0,c.s3)(this._parent)._stat(e,t,i,r,s,n,a);return!1===u.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,s){if(null===this._parent)return!1;for(let t=0;t<e.length;t++)for(const i of this.adaptedFields)if(e[t].toLowerCase()===i.field.name.toLowerCase()&&!(i instanceof y))return!1;const n=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)return!1;const t=i.clone();t.workingexpr=e.where,n.push(t)}else n.push(i)}const a=this._reformulateWithoutAdaptions(s);return!a.cannot&&(null!==(s=a.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._canDoAggregates(e,n,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,r,s,n,l){if(null===this._parent)throw new a.EN(a.H9.NeverReach);const o=[];for(let e=0;e<t.length;e++){const i=t[e];if(null!==i.workingexpr){const e=this._reformulateWithoutAdaptions(i.workingexpr);if(e.cannot)throw new a.EN(a.H9.NeverReach);const t=i.clone();t.workingexpr=e.where,o.push(t)}else o.push(i)}const u=this._reformulateWithoutAdaptions(s);if(u.cannot)throw new a.EN(a.H9.NeverReach);return null!==(s=u.where)?null!==this._extraFilter&&(s=(0,d.$e)(this._extraFilter,s)):s=this._extraFilter,this._parent._getAggregatePagesDataSourceDefinition(e,o,i,r,s,n,l)}}},84328:(e,t,i)=>{i.d(t,{Z:()=>c});var r=i(59987),s=i(91136),n=i(90961),a=i(90658),l=i(36515),o=i(95330),u=i(41534),d=i(82971);class c extends s.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.actions.AttributeFilter",this._maxProcessing=1e3,this._parent=e.parentfeatureset,e.whereclause instanceof u.WhereClause?(this._whereclause=e.whereclause,this._whereClauseFunction=null):(this._whereClauseFunction=e.whereclause,this._whereclause=null)}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(0),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types):(this.fields=[],this.typeIdField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new d.Z({wkid:4326}),this.geometryType=a.Qk.point)}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getFilteredSet("",null,this._whereclause,null,e);return this._checkCancelled(e),null!==this._whereClauseFunction?this._wset=new n.Z(t._candidates.slice(0).concat(t._known.slice(0)),[],t._ordered,this._clonePageDefinition(t.pagesDefinition)):this._wset=new n.Z(t._candidates.slice(0),t._known.slice(0),t._ordered,this._clonePageDefinition(t.pagesDefinition)),this._wset}return this._wset}_isInFeatureSet(e){let t=this._parent?._isInFeatureSet(e);return t===a.dj.NotInFeatureSet?t:(t=this._idstates[e],void 0===t?a.dj.Unknown:t)}_getFeature(e,t,i){return this._parent._getFeature(e,t,i)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){return this._parent._featureFromCache(e)}executeWhereClause(e){return this._whereclause?.testFeature(e)??!1}async executeWhereClauseDeferred(e){if(null!==this._whereClauseFunction){const t=this._whereClauseFunction(e);return(0,o.y8)(t),t}return this.executeWhereClause(e)}async _fetchAndRefineFeatures(e,t,i){const r=new n.Z([],e,!1,null),s=Math.min(t,e.length);if(await(this._parent?._getFeatures(r,-1,s,i)),this._checkCancelled(i),null==this._whereClauseFunction){for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);!0===this.executeWhereClause(i)?this._idstates[e[t]]=a.dj.InFeatureSet:this._idstates[e[t]]=a.dj.NotInFeatureSet}return"success"}const l=[];for(let t=0;t<s;t++){const i=this._parent?._featureFromCache(e[t]);l.push(await this.executeWhereClauseDeferred(i))}for(let i=0;i<t;i++)!0===l[i]?this._idstates[e[i]]=a.dj.InFeatureSet:this._idstates[e[i]]=a.dj.NotInFeatureSet;return"success"}async _getFilteredSet(e,t,i,r,s){null!==this._whereClauseFunction||(null!==i?null!==this._whereclause&&(i=(0,l.$e)(this._whereclause,i)):i=this._whereclause),await this._ensureLoaded();const a=await this._parent._getFilteredSet(e,t,i,r,s);let o;return this._checkCancelled(s),o=null!==this._whereClauseFunction?new n.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],a._ordered,this._clonePageDefinition(a.pagesDefinition)):new n.Z(a._candidates.slice(0),a._known.slice(0),a._ordered,this._clonePageDefinition(a.pagesDefinition)),o}async _stat(e,t,i,r,s,n,a){if(null!==this._whereClauseFunction)return null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1};let o=this._whereclause;null!==s&&null!==this._whereclause&&(o=(0,l.$e)(this._whereclause,s));const u=await this._parent._stat(e,t,i,r,o,n,a);return!1===u.calculated?null===s&&""===i&&null===r?this._manualStat(e,t,n,a):{calculated:!1}:u}async _canDoAggregates(e,t,i,r,s){return null===this._whereClauseFunction&&(null!==s?null!==this._whereclause&&(s=(0,l.$e)(this._whereclause,s)):s=this._whereclause,null!==this._parent&&this._parent._canDoAggregates(e,t,i,r,s))}async _getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o){if(null===this._parent)throw new r.EN(r.H9.NeverReach);return null!==n?null!==this._whereclause&&(n=(0,l.$e)(this._whereclause,n)):n=this._whereclause,this._parent._getAggregatePagesDataSourceDefinition(e,t,i,s,n,a,o)}static registerAction(){s.Z._featuresetFunctions.filter=function(e){if("function"==typeof e)return new c({parentfeatureset:this,whereclause:e});let t=null;return e instanceof u.WhereClause&&(t=e),new c({parentfeatureset:this,whereclause:t})}}}},85065:(e,t,i)=>{i.d(t,{Z:()=>o});var r=i(61363),s=i(59987),n=i(91136),a=i(90961),l=i(3823);class o extends n.Z{constructor(e){super(e),this._orderbyclause=null,this.declaredClass="esri.arcade.featureset.actions.OrderBy",this._maxProcessing=100,this._orderbyclause=e.orderbyclause,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,this._orderbyclause,e);return this._checkCancelled(e),this._wset=t,this._wset}return this._wset}async manualOrderSet(e,t){const i=await this.getIdColumnDictionary(e,[],-1,t);this._orderbyclause?.order(i);const r=new a.Z([],[],!0,null);for(let e=0;e<i.length;e++)r._known.push(i[e].id);return r}async getIdColumnDictionary(e,t,i,s){if(i<e._known.length-1){const n=this._maxQueryRate();if("GETPAGES"===e._known[i+1])return await(0,r.$)(this._parent._expandPagedSet(e,n,0,0,s)),this.getIdColumnDictionary(e,t,i,s);let a=i+1;const l=[];for(;a<e._known.length&&"GETPAGES"!==e._known[a];)l.push(e._known[a]),a++;i+=l.length;const o=await(0,r.$)(this._parent._getFeatureBatch(l,s));this._checkCancelled(s);for(const e of o)t.push({id:e.attributes[this.objectIdField],feature:e});return this.getIdColumnDictionary(e,t,i,s)}return e._candidates.length>0?(await(0,r.$)(this._refineSetBlock(e,this._maxProcessingRate(),s)),this._checkCancelled(s),this.getIdColumnDictionary(e,t,i,s)):t}_isInFeatureSet(e){return this._parent._isInFeatureSet(e)}_getFeatures(e,t,i,r){return this._parent._getFeatures(e,t,i,r)}_featureFromCache(e){if(void 0===this._featureCache[e]){const t=this._parent._featureFromCache(e);if(void 0===t)return;return null===t?null:(this._featureCache[e]=t,t)}return this._featureCache[e]}async _fetchAndRefineFeatures(){throw new s.EN(s.H9.NeverReach)}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const n=await this._parent._getFilteredSet(e,t,i,null===r?this._orderbyclause:r,s);this._checkCancelled(s);const l=new a.Z(n._candidates.slice(0),n._known.slice(0),n._ordered,this._clonePageDefinition(n.pagesDefinition));let o=!0;if(n._candidates.length>0&&(o=!1),!1===l._ordered){let e=await this.manualOrderSet(l,s);return!1===o&&(null===t&&null===i||(e=new a.Z(e._candidates.slice(0).concat(e._known.slice(0)),[],e._ordered,this._clonePageDefinition(e.pagesDefinition)))),e}return l}static registerAction(){n.Z._featuresetFunctions.orderBy=function(e){return""===e?this:new o({parentfeatureset:this,orderbyclause:new l.Z(e)})}}}},63991:(e,t,i)=>{i.d(t,{Z:()=>l});var r=i(59987),s=i(91136),n=i(90961),a=i(90658);class l extends s.Z{constructor(e){super(e),this._topnum=0,this.declaredClass="esri.arcade.featureset.actions.Top",this._countedin=0,this._maxProcessing=100,this._topnum=e.topnum,this._parent=e.parentfeatureset}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._parent._getSet(e);return this._wset=new n.Z(t._candidates.slice(0),t._known.slice(0),!1,this._clonePageDefinition(t.pagesDefinition)),this._setKnownLength(this._wset)>this._topnum&&(this._wset._known=this._wset._known.slice(0,this._topnum)),this._setKnownLength(this._wset)>=this._topnum&&(this._wset._candidates=[]),this._wset}return this._wset}_setKnownLength(e){return e._known.length>0&&"GETPAGES"===e._known[e._known.length-1]?e._known.length-1:e._known.length}_isInFeatureSet(e){const t=this._parent._isInFeatureSet(e);if(t===a.dj.NotInFeatureSet)return t;const i=this._idstates[e];return i===a.dj.InFeatureSet||i===a.dj.NotInFeatureSet?i:t===a.dj.InFeatureSet&&void 0===i?this._countedin<this._topnum?(this._idstates[e]=a.dj.InFeatureSet,this._countedin++,a.dj.InFeatureSet):(this._idstates[e]=a.dj.NotInFeatureSet,a.dj.NotInFeatureSet):a.dj.Unknown}async _expandPagedSet(e,t,i,s,n){if(null===this._parent)throw new r.EN(r.H9.NotImplemented);if(t>this._topnum&&(t=this._topnum),this._countedin>=this._topnum&&e.pagesDefinition.internal.set.length<=e.pagesDefinition.resultOffset){let t=e._known.length;return t>0&&"GETPAGES"===e._known[t-1]&&(e._known.length=t-1),t=e._candidates.length,t>0&&"GETPAGES"===e._candidates[t-1]&&(e._candidates.length=t-1),"success"}const a=await this._parent._expandPagedSet(e,t,i,s,n);return this._setKnownLength(e)>this._topnum&&(e._known.length=this._topnum),this._setKnownLength(e)>=this._topnum&&(e._candidates.length=0),a}async _getFeatures(e,t,i,r){const s=[],a=this._maxQueryRate();if(!0===this._checkIfNeedToExpandKnownPage(e,a))return await this._expandPagedSet(e,a,0,0,r),this._getFeatures(e,t,i,r);-1!==t&&void 0===this._featureCache[t]&&s.push(t);let l=0;for(let r=e._lastFetchedIndex;r<e._known.length&&(l++,l<=i&&(e._lastFetchedIndex+=1),!(void 0===this._featureCache[e._known[r]]&&(e._known[r]!==t&&s.push(e._known[r]),s.length>a)));r++);if(0===s.length)return"success";const o=new n.Z([],s,!1,null),u=Math.min(s.length,i);await this._parent._getFeatures(o,-1,u,r);for(let e=0;e<u;e++){const t=this._parent._featureFromCache(s[e]);void 0!==t&&(this._featureCache[s[e]]=t)}return"success"}async _getFilteredSet(e,t,i,r,s){await this._ensureLoaded();const a=await this._getSet(s);return new n.Z(a._candidates.slice(0).concat(a._known.slice(0)),[],!1,this._clonePageDefinition(a.pagesDefinition))}_refineKnowns(e,t){let i=0,r=null;const s=[];for(let n=0;n<e._candidates.length;n++){const l=this._isInFeatureSet(e._candidates[n]);if(l===a.dj.InFeatureSet){if(e._known.push(e._candidates[n]),i+=1,null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),e._known.length>=this._topnum)break}else if(l===a.dj.NotInFeatureSet)null===r?r={start:n,end:n}:r.end===n-1?r.end=n:(s.push(r),r={start:n,end:n}),i+=1;else if(l===a.dj.Unknown)break;if(i>=t)break}null!==r&&s.push(r);for(let t=s.length-1;t>=0;t--)e._candidates.splice(s[t].start,s[t].end-s[t].start+1);this._setKnownLength(e)>this._topnum&&(e._known=e._known.slice(0,this._topnum)),this._setKnownLength(e)>=this._topnum&&(e._candidates=[])}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}static registerAction(){s.Z._featuresetFunctions.top=function(e){return new l({parentfeatureset:this,topnum:e})}}}},17805:(e,t,i)=>{i.d(t,{Z:()=>y});var r=i(38171),s=i(59987),n=i(91136),a=i(90961),l=i(90658),o=i(36515),u=i(9361),d=i(19238),c=i(30359),h=i(16451),f=i(1231),p=i(14165);class y extends n.Z{constructor(e){super(e),this.declaredClass="esri.arcade.featureset.sources.FeatureLayerMemory",this._removeGeometry=!1,this._overrideFields=null,this._forceIsTable=!1,e.spatialReference&&(this.spatialReference=e.spatialReference),this._transparent=!0,this._maxProcessing=1e3,this._layer=e.layer,this._wset=null,!0===e.isTable&&(this._forceIsTable=!0),void 0!==e.outFields&&(this._overrideFields=e.outFields),void 0!==e.includeGeometry&&(this._removeGeometry=!1===e.includeGeometry)}_maxQueryRate(){return l.tI}end(){return this._layer}optimisePagingFeatureQueries(){}async loadImpl(){return!0===this._layer.loaded?(this._initialiseFeatureSet(),this):(await this._layer.load(),this._initialiseFeatureSet(),this)}get gdbVersion(){return""}_initialiseFeatureSet(){if(null==this.spatialReference&&(this.spatialReference=this._layer.spatialReference),this.geometryType=this._layer.geometryType,this.fields=this._layer.fields.slice(0),null!==this._overrideFields)if(1===this._overrideFields.length&&"*"===this._overrideFields[0])this._overrideFields=null;else{const e=[],t=[];for(const i of this.fields)if("oid"===i.type)e.push(i),t.push(i.name);else for(const r of this._overrideFields)if(r.toLowerCase()===i.name.toLowerCase()){e.push(i),t.push(i.name);break}this.fields=e,this._overrideFields=t}this.objectIdField=this._layer.objectIdField;for(const e of this.fields)"global-id"===e.type&&(this.globalIdField=e.name);this._databaseType=l.Bj.Standardised,this.hasZ=!0===this._layer?.capabilities?.data?.supportsZ,this.hasM=!0===this._layer?.capabilities?.data?.supportsM,this._layer instanceof c.default?(this.typeIdField=this._layer.subtypeField??"",this.types=this._layer.subtypes):(this.typeIdField=this._layer.typeIdField??"",this.types=this._layer.types)}isTable(){return this._forceIsTable||this._layer.isTable||"table"===this._layer.type||!this._layer.geometryType}_isInFeatureSet(){return l.dj.InFeatureSet}_candidateIdTransform(e){return e}async _getSet(e){if(null===this._wset){await this._ensureLoaded();const t=await this._getFilteredSet("",null,null,null,e);return this._wset=t,t}return this._wset}_changeFeature(e){const t={};for(const i of this.fields)t[i.name]=e.attributes[i.name];return new r.Z({geometry:!0===this._removeGeometry?null:e.geometry,attributes:t})}async _getFilteredSet(e,t,i,r,s){let n="",u=!1;if(null!==r&&(n=r.constructClause(),u=!0),this.isTable()&&t&&null!==e&&""!==e)return new a.Z([],[],!0,null);const d=new p.Z;d.returnZ=this.hasZ,d.returnM=this.hasM,d.where=null===i?null===t?"1=1":"":(0,o.zR)(i,l.Bj.Standardised),d.spatialRelationship=this._makeRelationshipEnum(e),d.outSpatialReference=this.spatialReference,d.orderByFields=""!==n?n.split(","):null,d.geometry=null===t?null:t,d.returnGeometry=!0,d.relationParameter=this._makeRelationshipParam(e);const c=await this._layer.queryFeatures(d);if(null===c)return new a.Z([],[],u,null);this._checkCancelled(s);const h=[];return c.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];h.push(t),this._featureCache[t]=this._changeFeature(e)})),new a.Z([],h,u,null)}_makeRelationshipEnum(e){if(e.includes("esriSpatialRelRelation"))return"relation";switch(e){case"esriSpatialRelRelation":return"relation";case"esriSpatialRelIntersects":return"intersects";case"esriSpatialRelContains":return"contains";case"esriSpatialRelOverlaps":return"overlaps";case"esriSpatialRelWithin":return"within";case"esriSpatialRelTouches":return"touches";case"esriSpatialRelCrosses":return"crosses";case"esriSpatialRelEnvelopeIntersects":return"envelope-intersects"}return e}_makeRelationshipParam(e){return e.includes("esriSpatialRelRelation")?e.split(":")[1]:""}async _queryAllFeatures(){if(this._wset)return this._wset;const e=new p.Z;if(e.where="1=1",await this._ensureLoaded(),this._layer.source&&this._layer.source.items){const e=[];return this._layer.source.items.forEach((t=>{const i=t.attributes[this._layer.objectIdField];e.push(i),this._featureCache[i]=this._changeFeature(t)})),this._wset=new a.Z([],e,!1,null),this._wset}e.returnZ=this.hasZ,e.returnM=this.hasM;const t=await this._layer.queryFeatures(e),i=[];return t.features.forEach((e=>{const t=e.attributes[this._layer.objectIdField];i.push(t),this._featureCache[t]=this._changeFeature(e)})),this._wset=new a.Z([],i,!1,null),this._wset}async _getFeatures(e,t,i){const r=[];-1!==t&&void 0===this._featureCache[t]&&r.push(t);for(let s=e._lastFetchedIndex;s<e._known.length&&(e._lastFetchedIndex+=1,!(void 0===this._featureCache[e._known[s]]&&(e._known[s]!==t&&r.push(e._known[s]),r.length>i)));s++);if(0===r.length)return"success";throw new s.EN(s.H9.MissingFeatures)}async _refineSetBlock(e){return e}async _stat(){return{calculated:!1}}async _canDoAggregates(){return!1}relationshipMetaData(){return[]}static _cloneAttr(e){const t={};for(const i in e)t[i]=e[i];return t}nativeCapabilities(){return{title:this._layer.title??"",canQueryRelated:!1,source:this,capabilities:this._layer.capabilities,databaseType:this._databaseType,requestStandardised:!0}}static create(e,t){let i=e.layerDefinition.objectIdField;const r=e.layerDefinition.typeIdField??"",s=[];if(e.layerDefinition.types)for(const t of e.layerDefinition.types)s.push(h.Z.fromJSON(t));let n=e.layerDefinition.geometryType;void 0===n&&(n=e.featureSet.geometryType||"");let a=e.featureSet.features;const l=t.toJSON();if(!i){let t=!1;for(const r of e.layerDefinition.fields)if("oid"===r.type||"esriFieldTypeOID"===r.type){i=r.name,t=!0;break}if(!1===t){let t="FID",r=!0,s=0;for(;r;){let i=!0;for(const r of e.layerDefinition.fields)if(r.name===t){i=!1;break}!0===i?r=!1:(s++,t="FID"+s.toString())}e.layerDefinition.fields.push({type:"esriFieldTypeOID",name:t,alias:t});const n=[];for(let i=0;i<a.length;i++)n.push({geometry:e.featureSet.features[i].geometry,attributes:e.featureSet.features[i].attributes?this._cloneAttr(e.featureSet.features[i].attributes):{}}),n[i].attributes[t]=i;a=n,i=t}}const o=[];for(const t of e.layerDefinition.fields)t instanceof f.Z?o.push(t):o.push(f.Z.fromJSON(t));let c=n;switch(c||(c=""),c){case"esriGeometryPoint":c="point";break;case"esriGeometryPolyline":c="polyline";break;case"esriGeometryPolygon":c="polygon";break;case"esriGeometryEnvelope":c="extent";break;case"esriGeometryMultipoint":c="multipoint";break;case"":case"esriGeometryNull":c="esriGeometryNull"}if("esriGeometryNull"!==c)for(const e of a)e.geometry&&e.geometry instanceof u.Z==0&&(e.geometry.type=c,void 0===e.geometry.spatialReference&&(e.geometry.spatialReference=l));else for(const e of a)e.geometry&&(e.geometry=null);const p={outFields:["*"],source:a,fields:o,hasZ:!0===e?.layerDefinition?.hasZ||!0===e?.featureSet?.hasZ,hasM:!0===e?.layerDefinition?.hasM||!0===e?.featureSet?.hasM,types:s,typeIdField:r,objectIdField:i,spatialReference:t},_="esriGeometryNull"===c||null===c;_||(p.geometryType=c);const g=new d.default(p);return new y({layer:g,spatialReference:t,isTable:_})}async queryAttachments(){return[]}async getFeatureByObjectId(e){const t=new p.Z;t.where=this.objectIdField+"="+e.toString(),t.returnZ=this.hasZ,t.returnM=this.hasM;const i=await this._layer.queryFeatures(t);return 1===i.features.length?i.features[0]:null}async getOwningSystemUrl(){return""}async getIdentityUser(){return""}get preferredTimeReference(){return this._layer?.preferredTimeReference?.toJSON()??null}get dateFieldsTimeReference(){return this._layer?.dateFieldsTimeReference?.toJSON()??null}get datesInUnknownTimezone(){return this._layer?.datesInUnknownTimezone}get editFieldsInfo(){return this._layer?.editFieldsInfo?.toJSON()??null}get timeInfo(){return this._layer?.timeInfo?.toJSON()??null}}},3823:(e,t,i)=>{function r(e,t){return e===t?0:null===e?-1:null===t?1:e<t?-1:1}i.d(t,{Z:()=>s});class s{constructor(e){const t=e.split(",");this._fields=[],this._directions=[];for(let e=0;e<t.length;e++){const i=t[e].match(/\S+/g);this._fields.push(i[0]),2===i.length?"asc"===i[1].toLowerCase()?this._directions.push(1):this._directions.push(0):this._directions.push(1)}}constructClause(){let e="";for(let t=0;t<this._fields.length;t++)0!==t&&(e+=","),e+=this._fields[t],1===this._directions[t]?e+=" ASC":e+=" DESC";return e}order(e){e.sort(((e,t)=>{for(let i=0;i<this._fields.length;i++){const s=this.featureValue(e.feature,this._fields[i],i),n=this.featureValue(t.feature,this._fields[i],i);let a=0;if(a=1===this._directions[i]?r(s,n):-1*r(s,n),0!==a)return a}return 0}))}scanForField(e){for(let t=0;t<this._fields.length;t++)if(this._fields[t].toLowerCase().trim()===e.toLowerCase().trim())return!0;return!1}replaceFields(e){let t="";for(let i=0;i<this._fields.length;i++){0!==i&&(t+=",");let r=this._fields[i];for(const t of e)if(r.toLowerCase()===t.field.toLowerCase()){r=t.newfield;break}t+=r,1===this._directions[i]?t+=" ASC":t+=" DESC"}return new s(t)}featureValue(e,t,i){const r=e.attributes[t];if(void 0!==r)return r;for(const r in e.attributes)if(t.toLowerCase()===r.toLowerCase())return this._fields[i]=r,e.attributes[r];return null}}},32448:(e,t,i)=>{i.d(t,{Z:()=>o});var r=i(43697),s=i(92036),n=i(50758),a=i(52011);class l{constructor(){this._emitter=new l.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const i=this._listenersMap&&this._listenersMap.get(e);if(!i)return!1;const r=this._target||this;return[...i].forEach((e=>{e.call(r,t)})),i.length>0}on(e,t){if(Array.isArray(e)){const i=e.map((e=>this.on(e,t)));return(0,n.AL)(i)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const i=this._listenersMap.get(e)||[];return i.push(t),this._listenersMap.set(e,i),{remove:()=>{const i=this._listenersMap&&this._listenersMap.get(e)||[],r=i.indexOf(t);r>=0&&i.splice(r,1)}}}once(e,t){const i=this.on(e,(e=>{i.remove(),t.call(null,e)}));return i}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let i=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return i=(0,r._)([(0,a.j)("esri.core.Evented")],i),i};let i=class extends s.Z{constructor(){super(...arguments),this._emitter=new l.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};i=(0,r._)([(0,a.j)("esri.core.Evented")],i),e.EventedAccessor=i}(l||(l={}));const o=l},10699:(e,t,i)=>{i.d(t,{IG:()=>a,iv:()=>l});var r=i(43697),s=i(52011);let n=0;const a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,r._)([(0,s.j)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,r._)([(0,s.j)("esri.core.NumericIdentifiable")],t),t};let o=class extends(a(class{})){};o=(0,r._)([(0,s.j)("esri.core.Identifiable")],o)},66643:(e,t,i)=>{i.d(t,{Ed:()=>u,UI:()=>d,mt:()=>p,q6:()=>f,vr:()=>y});var r=i(43697),s=i(92036),n=i(70586),a=i(95330),l=i(5600),o=i(52011);function u(e,t,i){return(0,a.as)(e.map(((e,r)=>t.apply(i,[e,r]))))}async function d(e,t,i){return(await(0,a.as)(e.map(((e,r)=>t.apply(i,[e,r]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function h(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return h(e)}}async function p(e){try{return c(await e)}catch(e){return(0,a.r9)(e),h(e)}}function y(e,t){return new _(e,t)}let _=class extends s.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then((e=>{this._result=c(e),this._cleanup()}),(e=>{this._result=h(e),this._cleanup()})),this._abortHandle=(0,a.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.hw)(this._abortHandle),this._abortController=null}};(0,r._)([(0,l.Cb)()],_.prototype,"value",null),(0,r._)([(0,l.Cb)()],_.prototype,"error",null),(0,r._)([(0,l.Cb)()],_.prototype,"finished",null),(0,r._)([(0,l.Cb)()],_.prototype,"promise",void 0),(0,r._)([(0,l.Cb)()],_.prototype,"_result",void 0),_=(0,r._)([(0,o.j)("esri.core.asyncUtils.ReactiveTask")],_)},87085:(e,t,i)=>{i.d(t,{Z:()=>w});var r=i(43697),s=(i(66577),i(3172)),n=i(20102),a=i(32448),l=i(10699),o=i(83379),u=i(92604),d=i(95330),c=i(81271),h=i(5600),f=(i(75215),i(67676),i(80442),i(52011)),p=i(68773),y=i(6570),_=i(82971);let g=0,m=class extends(a.Z.EventedMixin((0,l.IG)(o.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.Z(-180,-90,180,90,_.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=_.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:r}=await i.e(8008).then(i.bind(i,28008));try{return await r(t)}catch(e){const i=t&&t.portalItem,r=i&&i.id||"unset",s=i&&i.portal&&i.portal.url||p.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,d.D_)(e)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.Cb)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.Cb)({type:y.Z})],m.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,r._)([(0,h.Cb)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,r._)([(0,h.Cb)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,r._)([(0,h.Cb)({clonable:!1})],m.prototype,"parent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,r._)([(0,h.Cb)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,r._)([(0,h.Cb)({type:_.Z})],m.prototype,"spatialReference",void 0),(0,r._)([(0,h.Cb)({type:String})],m.prototype,"title",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,r._)([(0,h.Cb)()],m.prototype,"url",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,r._)([(0,f.j)("esri.layers.Layer")],m);const w=m},16451:(e,t,i)=>{i.d(t,{Z:()=>f});var r=i(43697),s=i(2368),n=i(96674),a=i(5600),l=(i(75215),i(67676),i(80442),i(71715)),o=i(52011),u=i(30556),d=i(72729),c=i(70082);let h=class extends((0,s.J)(n.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const i of Object.keys(e))t[i]=(0,d.im)(e[i]);return t}writeDomains(e,t){const i={};for(const t of Object.keys(e))e[t]&&(i[t]=e[t]?.toJSON());t.domains=i}};(0,r._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"id",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"name",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],h.prototype,"domains",void 0),(0,r._)([(0,l.r)("domains")],h.prototype,"readDomains",null),(0,r._)([(0,u.c)("domains")],h.prototype,"writeDomains",null),(0,r._)([(0,a.Cb)({type:[c.Z],json:{write:!0}})],h.prototype,"templates",void 0),h=(0,r._)([(0,o.j)("esri.layers.support.FeatureType")],h);const f=h},2981:(e,t,i)=>{i.d(t,{$6:()=>d,Ow:()=>n,S0:()=>s,d1:()=>a});const r=[["binary","application/octet-stream","bin",""]];function s(e,t){return o(function(e,t){return l(t).find((t=>u(t)===e))}(e,t))}function n(e,t){return o(function(e,t){const i=e.toLowerCase();return l(t).find((e=>function(e){return e?.[2].split(",")??[]}(e).some((e=>i.endsWith(e)))))}(e,t))}function a(e,t){return u(function(e,t){return l(t).find((t=>o(t)===e))}(e,t))}function l(e){return[...r,...e]}function o(e){return e?.[0]}function u(e){return e?.[1]}function d(e){return e.tables?.find((e=>"assetMaps"===e.role))}},84230:(e,t,i)=>{i.d(t,{A2:()=>a,S1:()=>d,fb:()=>n,ln:()=>c,oP:()=>u,rQ:()=>l,y2:()=>o});var r=i(40330),s=i(3172);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function a(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function o(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}async function u(e,t){const i=r.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const a=`${e.substring(0,n)}/rest/info`,l=null!=t?t.signal:null,{data:o}=await(0,s.default)(a,{query:{f:"json"},responseType:"json",signal:l});return o?.owningSystemUrl||null}function d(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function c(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},14661:(e,t,i)=>{i.d(t,{$o:()=>d,Fj:()=>o,Kz:()=>c,Ss:()=>h,_$:()=>l,ck:()=>u,qj:()=>a});var r=i(44547),s=i(82971),n=i(40488);function a(e,t){if(!l(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return l(e,c.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}async function d(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.Sx)(e);const i=s.Z.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.iV)(e,i)}(i)}const c={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function h(e){const{portal:t,isOrgItem:i,itemControl:r}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),a=!!i&&!!s?.includes("features:user:fullEdit");const l="update"===r||"admin"===r;return l?a=n=!0:a&&(n=!0),{features:{edit:n,fullEdit:a},content:{updateItem:l}}}},41818:(e,t,i)=>{i.d(t,{P:()=>a});var r=i(11282),s=i(34599),n=i(14165);async function a(e,t,i){const a=(0,r.en)(e);return(0,s.hH)(a,n.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>a});var r=i(11282),s=i(34599),n=i(14165);async function a(e,t,i){const a=(0,r.en)(e);return(0,s.Ev)(a,n.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>o,e:()=>l});var r=i(11282),s=i(34599),n=i(74889),a=i(14165);async function l(e,t,i){const r=await o(e,t,i);return n.Z.fromJSON(r)}async function o(e,t,i){const n=(0,r.en)(e),l={...i},o=a.Z.from(t),{data:u}=await(0,s.JT)(n,o,o.sourceSpatialReference,l);return u}},53261:(e,t,i)=>{i.d(t,{t:()=>_});var r=i(11282),s=i(70586),n=i(69285),a=i(98732);function l(e,t){return t}function o(e,t,i,r){switch(i){case 0:return h(e,t+r,0);case 1:return"lowerLeft"===e.originPosition?h(e,t+r,1):function({translate:e,scale:t},i,r){return e[r]-i*t[r]}(e,t+r,1)}}function u(e,t,i,r){return 2===i?h(e,t,2):o(e,t,i,r)}function d(e,t,i,r){return 2===i?h(e,t,3):o(e,t,i,r)}function c(e,t,i,r){return 3===i?h(e,t,3):u(e,t,i,r)}function h({translate:e,scale:t},i,r){return e[r]+i*t[r]}class f{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=l,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,n.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const i of e.features)t(i.geometry)}createSpatialReference(){return{}}addField(e,t){const i=e.fields;(0,s.O3)(i),i.push(t);const r=i.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,i)=>this.addCoordinatePoint(e,t,i),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,i)=>this._addCoordinatePolygon(e,t,i),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,i)=>this._addCoordinatePolyline(e,t,i),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,i)=>this._addCoordinateMultipoint(e,t,i),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,i){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:i,queryGeometryType:r}=t,s=(0,a.$g)(i.clone(),i,!1,!1,this._transform),n=(0,a.di)(s,r,!1,!1);e.queryGeometryType=r,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,i){const r=(0,s.s3)(this._transform,"transform");switch(t=this._applyTransform(r,t,i,0),i){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let i=0;t<=1&&(i=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const r=(0,s.s3)(this._transform,"transform");return this._applyTransform(r,e,t,i)}_addCoordinatePolyline(e,t,i){this._dehydratedAddPointsCoordinate(e.paths,t,i)}_addCoordinatePolygon(e,t,i){this._dehydratedAddPointsCoordinate(e.rings,t,i)}_addCoordinateMultipoint(e,t,i){0===i&&e.points.push([]);const r=this._transformPathLikeValue(t,i);e.points[e.points.length-1].push(r)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,i){0===i&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const r=this._transformPathLikeValue(t,i),s=e[e.length-1];0===i&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=r}_deriveApplyTransform(e){const{hasZ:t,hasM:i}=e;return t&&i?c:t?u:i?d:o}}var p=i(34599),y=(i(74889),i(14165));async function _(e,t,i){const s=(0,r.en)(e),n={...i},a=y.Z.from(t),l=!a.quantizationParameters,{data:o}=await(0,p.qp)(s,a,new f({sourceSpatialReference:a.sourceSpatialReference,applyTransform:l}),n);return o}},28694:(e,t,i)=>{i.d(t,{p:()=>s});var r=i(69285);function s(e,t,i){if(!i||!i.features||!i.hasZ)return;const s=(0,r.k)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,s=i(43697),n=i(96674),a=i(5600),l=i(75215),o=(i(67676),i(80442),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let d=r=class extends n.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r&&r.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,a.Cb)({type:String})],d.prototype,"contentType",void 0),(0,s._)([(0,a.Cb)()],d.prototype,"exifInfo",void 0),(0,s._)([(0,a.Cb)({readOnly:!0})],d.prototype,"orientationInfo",null),(0,s._)([(0,a.Cb)({type:l.z8})],d.prototype,"id",void 0),(0,s._)([(0,a.Cb)({type:String})],d.prototype,"globalId",void 0),(0,s._)([(0,a.Cb)({type:String})],d.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:String})],d.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"parentGlobalId",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"parentObjectId",void 0),(0,s._)([(0,a.Cb)({type:l.z8})],d.prototype,"size",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],d.prototype,"url",void 0),d=r=(0,s._)([(0,o.j)("esri.layers.support.AttachmentInfo")],d);const c=d},74889:(e,t,i)=>{i.d(t,{Z:()=>w});var r,s=i(43697),n=i(66577),a=i(38171),l=i(35454),o=i(96674),u=i(22974),d=i(5600),c=(i(75215),i(71715)),h=i(52011),f=i(30556),p=i(82971),y=i(33955),_=i(1231);const g=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let m=r=class extends o.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const i=p.Z.fromJSON(t.spatialReference),r=[];for(let t=0;t<e.length;t++){const s=e[t],n=a.Z.fromJSON(s),l=s.geometry&&s.geometry.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const o=s.aggregateGeometries,u=n.aggregateGeometries;if(o&&null!=u)for(const e in u){const t=u[e],r=o[e],s=r?.spatialReference;null==t||s||(t.spatialReference=i)}r.push(n)}return r}writeGeometryType(e,t,i,r){if(e)return void g.write(e,t,i,r);const{features:s}=this;if(s)for(const e of s)if(e&&null!=e.geometry)return void g.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,y.im)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=p.Z.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e&&e[i];r.geometry=t&&t.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-r)/t)),(e=>Math.round((s-e)/i)));for(let e=0,t=n.length;e<t;e++)a?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,s],scale:[n,a]}=i;let l=null,o=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;l=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;o=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,(e=>e*n+r),(e=>s-e*a),l,o);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,i){let r,s;const n=[];for(let a=0,l=e.length;a<l;a++){const l=e[a];if(a>0){const e=t(l[0]),a=i(l[1]);e===r&&a===s||(n.push([e-r,a-s]),r=e,s=a)}else r=t(l[0]),s=i(l[1]),n.push([r,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,y.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=r.length;e<n;e++){const n=r[e],a=this._quantizePoints(n,t,i);a&&s.push(a)}return s.length>0?((0,y.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,s){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,y.oU)(e)?e.rings:e.paths;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];for(let e=0,s=r.length;e<s;e++){const s=r[e];e>0?(a+=s[0],l+=s[1]):(a=s[0],l=s[1]),s[0]=t(a),s[1]=i(l)}}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=s(i[3])}}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=s(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),s&&null!=e.mmax&&null!=e.mmin&&(e.mmax=s(e.mmax),e.mmin=s(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let a,l;for(let e=0,r=n.length;e<r;e++){const r=n[e];e>0?(a+=r[0],l+=r[1]):(a=r[0],l=r[1]),r[0]=t(a),r[1]=i(l)}if(r&&s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2]),t[3]=s(t[3])}else if(r)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=r(t[2])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}}:null}};(0,s._)([(0,d.Cb)({type:String,json:{write:!0}})],m.prototype,"displayFieldName",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,d.Cb)({type:[a.Z],json:{write:!0}})],m.prototype,"features",void 0),(0,s._)([(0,c.r)("features")],m.prototype,"readFeatures",null),(0,s._)([(0,d.Cb)({type:[_.Z],json:{write:!0}})],m.prototype,"fields",void 0),(0,s._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],m.prototype,"geometryType",void 0),(0,s._)([(0,f.c)("geometryType")],m.prototype,"writeGeometryType",null),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasM",void 0),(0,s._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"hasZ",void 0),(0,s._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],m.prototype,"queryGeometry",void 0),(0,s._)([(0,c.r)("queryGeometry")],m.prototype,"readQueryGeometry",null),(0,s._)([(0,d.Cb)({type:p.Z,json:{write:!0}})],m.prototype,"spatialReference",void 0),(0,s._)([(0,f.c)("spatialReference")],m.prototype,"writeSpatialReference",null),(0,s._)([(0,d.Cb)({json:{write:!0}})],m.prototype,"transform",void 0),m=r=(0,s._)([(0,h.j)("esri.rest.support.FeatureSet")],m),m.prototype.toJSON.isDefaultToJSON=!0;const w=m}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7476],{28576:(e,t,r)=>{r.d(t,{B:()=>u});var i=r(81153),s=r(81271),o=r(41123),n=r(7628),a=r(31263),l=r(5600),p=r(66094),d=r(25929);function u(e){const t=e?.origins??[void 0];return(r,o)=>{const u=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const o=(0,n.Oe)(t,r);return{type:String,read:(e,t,r)=>{const i=(0,d.r)(e,t,r);return o.type===String?i:"function"==typeof o.type?new o.type({url:i}):void 0},write:{writer(t,n,l,u){if(!u||!u.resources)return"string"==typeof t?void(n[l]=(0,d.t)(t,u)):void(n[l]=t.write({},u));const f=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),g=(0,d.t)(f,{...u,verifyItemRelativeUrls:u&&u.verifyItemRelativeUrls?{writtenUrls:u.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),m=o.type!==String&&(!(0,i.l)(this)||u&&u.origin&&this.originIdOf(r)>(0,a.M9)(u.origin)),b={object:this,propertyName:r,value:t,targetUrl:g,dest:n,targetPropertyName:l,context:u,params:e};u&&u.portalItem&&g&&!(0,s.YP)(g)?m?function(e){const{context:t,targetUrl:r,params:i,value:o,dest:n,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),d=h(o,r,t),u=(0,p.B)(d),f=(0,s.Ml)(l.path),g=i?.compress??!1;u===f?(t.resources&&y({...e,resource:l,content:d,compress:g,updates:t.resources.toUpdate}),n[a]=r):c(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):u&&u.portalItem&&(null==g||null!=(0,d.i)(g)||(0,s.jc)(g)||m)?c(b):n[l]=g}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=d.a;return{read:e,write:t}}}}(e,r,o);for(const e of t){const t=(0,l.CJ)(r,e,o);for(const e in u)t[e]=u[e]}}}function c(e){const{targetUrl:t,params:i,value:n,context:a,dest:l,targetPropertyName:u}=e;if(!a.portalItem)return;const c=(0,d.p)(t),f=c?.filename??(0,o.D)(),g=i?.prefix??c?.prefix,m=h(n,t,a),b=(0,s.v_)(g,f),v=`${b}.${(0,p.B)(m)}`,w=a.portalItem.resourceFromPath(v);(0,s.jc)(t)&&a.resources&&a.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{w.path=`${b}.${(0,p.B)(e)}`,l[u]=w.itemRelativeUrl})).catch((()=>{})));const _=i?.compress??!1;a.resources&&y({...e,resource:w,content:m,compress:_,updates:a.resources.toAdd}),l[u]=w.itemRelativeUrl}function y({object:e,propertyName:t,updates:r,resource:i,content:s,compress:o}){r.push({resource:i,content:s,compress:o,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function h(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},57476:(e,t,r)=>{r.r(t),r.d(t,{default:()=>he});var i=r(43697),s=r(38171),o=r(51773),n=(r(16050),r(12501),r(28756),r(92271),r(72529),r(5499),r(84382),r(81571),r(91423),r(32400)),a=r(3172),l=r(2368),p=r(46791),d=r(20102),u=r(92604),c=r(16453),y=r(95330),h=r(17445),f=r(81271),g=r(5600),m=(r(75215),r(67676),r(80442),r(1153)),b=r(71715),v=r(52011),w=r(31263),_=r(87085),I=r(54295),S=r(17287),L=r(66361),C=r(38009),F=r(16859),j=r(72965),x=r(20559),O=r(15506),P=r(21506),R=r(61960),A=r(85857),E=r(14147),T=r(53518),N=r(99514),Z=r(35671),D=r(51161),U=r(54306),q=r(30707),Q=r(56765),G=r(96674);let k=class extends G.wq{constructor(){super(...arguments),this.name=null,this.field=null,this.currentRangeExtent=null,this.fullRangeExtent=null,this.type="rangeInfo"}};(0,i._)([(0,g.Cb)({type:String,json:{read:!0,write:!0}})],k.prototype,"name",void 0),(0,i._)([(0,g.Cb)({type:String,json:{read:!0,write:!0}})],k.prototype,"field",void 0),(0,i._)([(0,g.Cb)({type:[Number],json:{read:!0,write:!0}})],k.prototype,"currentRangeExtent",void 0),(0,i._)([(0,g.Cb)({type:[Number],json:{read:!0,write:!0}})],k.prototype,"fullRangeExtent",void 0),(0,i._)([(0,g.Cb)({type:["rangeInfo"],readOnly:!0,json:{read:!1,write:!0}})],k.prototype,"type",void 0),k=(0,i._)([(0,v.j)("esri.layers.support.RangeInfo")],k);var V,J=r(61247),M=r(22974),B=r(28576),$=r(20941),z=r(38913),K=r(44547);let W=V=class extends((0,G.eC)(p.Z.ofType(z.Z))){constructor(e){super(e)}clone(){return new V(this.items.map((e=>e.clone())))}write(e,t){return this.toJSON(t)}toJSON(e){const t=e?.layer?.spatialReference;return t?this.toArray().map((r=>{if(!t.equals(r.spatialReference)){if(!(0,K.Up)(r.spatialReference,t))return e&&e.messages&&e.messages.push(new $.Z("scenefilter:unsupported","Scene filters with incompatible spatial references are not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),null;const i=new z.Z;(0,K.Wt)(r,i,t),r=i}const i=r.toJSON(e);return delete i.spatialReference,i})).filter((e=>null!=e)):(e?.messages&&e.messages.push(new $.Z("scenefilter:unsupported","Writing Scene filters without context layer is not supported",{modification:this,spatialReference:e.layer.spatialReference,context:e})),this.toArray().map((t=>t.toJSON(e))))}static fromJSON(e,t){const r=new V;return e.forEach((e=>r.add(z.Z.fromJSON(e,t)))),r}};W=V=(0,i._)([(0,v.j)("esri.layers.support.PolygonCollection")],W);const Y=W;var H,X=r(25929);let ee=H=class extends G.wq{constructor(e){super(e),this.spatialRelationship="disjoint",this.geometries=new Y,this._geometriesSource=null,this._handles=new J.Z}initialize(){this._handles.add((0,h.on)((()=>this.geometries),"after-changes",(()=>this.geometries=this.geometries),h.Z_))}destroy(){this._handles.destroy()}readGeometries(e,t,r){Array.isArray(e)?this.geometries=Y.fromJSON(e,r):this._geometriesSource={url:(0,X.f)(e,r),context:r}}async loadGeometries(e,t){if(null==this._geometriesSource)return;const{url:r,context:i}=this._geometriesSource,s=await(0,a.default)(r,{responseType:"json",signal:t?.signal}),o=e.toJSON(),n=s.data.map((e=>({...e,spatialReference:o})));this.geometries=Y.fromJSON(n,i),this._geometriesSource=null}clone(){const e=new H({geometries:(0,M.d9)(this.geometries),spatialRelationship:this.spatialRelationship});return e._geometriesSource=this._geometriesSource,e}};(0,i._)([(0,g.Cb)({type:["disjoint","contains"],nonNullable:!0,json:{write:!0}})],ee.prototype,"spatialRelationship",void 0),(0,i._)([(0,g.Cb)({type:Y,nonNullable:!0,json:{write:!0}}),(0,B.B)({origins:["web-scene","portal-item"],type:"resource",prefix:"geometries"})],ee.prototype,"geometries",void 0),(0,i._)([(0,b.r)(["web-scene","portal-item"],"geometries")],ee.prototype,"readGeometries",null),ee=H=(0,i._)([(0,v.j)("esri.layers.support.SceneFilter")],ee);const te=ee;var re=r(40555),ie=r(14165),se=r(72245),oe=r(32163),ne=r(77397),ae=r(19833),le=r(65242);const pe=["3DObject","Point"],de=(0,T.v)();let ue=class extends((0,L.o1)((0,x.Vt)((0,S.Y)((0,C.q)((0,F.I)((0,j.M)((0,c.R)((0,I.V)((0,l.J)(_.Z)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType="ArcGISSceneServiceLayer",this.type="scene",this.fields=null,this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new p.Z,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._set("renderer",null)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){const r=this.getFeatureType(t?.feature)?.domains?.[e];return r&&"inherited"!==r.type?r:this.getField(e)?.domain??null}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new N.Z(this.fields)}readNodePages(e,t,r){return"Point"===t.layerType&&(e=t.pointNodePages),null==e||"object"!=typeof e?null:D.U4.fromJSON(e,r)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get geometryType(){return ye[this.profile]||"mesh"}set renderer(e){(0,Z.YN)(e,this.fieldsIndex),this._set("renderer",e)}readCachedDrawingInfo(e){return null!=e&&"object"==typeof e||(e={}),null==e.color&&(e.color=!1),e}get capabilities(){const e=this.associatedLayer?.capabilities??O.C,{query:t,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:s,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:n},data:{supportsZ:a,supportsM:l,isVersioned:p,supportsAttachment:d},operations:{supportsEditing:u,supportsAdd:c,supportsUpdate:y,supportsDelete:h,supportsQuery:f,supportsQueryAttachments:g,supportsAsyncConvert3D:m}}=e,b=e.operations.supportsChangeTracking,v=!!this.associatedLayer?.infoFor3D&&(0,se.Rx)();return{query:t,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:n,supportsRollbackOnFailure:i,supportsGeometryUpdate:v&&o,supportsUploadWithItemId:s},data:{supportsAttachment:d,supportsZ:a,supportsM:l,isVersioned:p},operations:{supportsQuery:f,supportsQueryAttachments:g,supportsEditing:u&&b,supportsAdd:v&&c&&b,supportsDelete:v&&h&&b,supportsUpdate:y&&b,supportsAsyncConvert3D:m}}}get editingEnabled(){return this._isOverridden("editingEnabled")?this._get("editingEnabled"):this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeOID"===t.type&&(e=t.name),!!e))),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some((t=>("esriFieldTypeGlobalID"===t.type&&(e=t.name),!!e))),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){const r=t.store.profile;return null!=r&&ce[r]?ce[r]:(u.Z.getLogger(this).error("Unknown or missing profile",{profile:r,layer:this}),"mesh-pyramids")}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(y.r9).then((()=>this._fetchService(t))).then((()=>Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]))).then((()=>this._validateElevationInfo())).then((()=>this._applyAssociatedLayerOverrides())).then((()=>this._populateFieldUsageInfo())).then((()=>(0,re.y)(this,{origin:"service"},t))).then((()=>(0,Z.YN)(this.renderer,this.fieldsIndex))).then((()=>this.finishLoadEditablePortalLayer(e)));return this.addResolvingPromise(r),Promise.resolve(this)}async beforeSave(){null!=this.filter&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){u.Z.getLogger(this).error("#_loadFilterGeometries()",this,"Failed to load filter geometries. Geometry filter will not be applied for this layer.",{error:e}),this.filter=null}}createQuery(){const e=new ie.Z;return"mesh"!==this.geometryType&&(e.returnGeometry=!0,e.returnZ=!0),e.where=this.definitionExpression||"1=1",e.sqlFormat="standard",e.outFields=["*"],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryExtent(e||this.createQuery(),t)))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatureCount(e||this.createQuery(),t)))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryFeatures(e||this.createQuery(),t))).then((e=>{if(e?.features)for(const t of e.features)t.layer=this,t.sourceLayer=this;return e}))}async queryCachedAttributes(e,t){const r=(0,Z.Lk)(this.fieldsIndex,await(0,ae.e7)(this,(0,ae.V5)(this)));return(0,ne.xe)(this.parsedUrl.path,this.attributeStorageInfo??[],e,t,r)}async queryCachedFeature(e,t){const r=await this.queryCachedAttributes(e,[t]);if(!r||0===r.length)throw new d.Z("scenelayer:feature-not-in-cached-data","Feature not found in cached data");const i=new s.Z;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryObjectIds(e||this.createQuery(),t)))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then((r=>r.queryAttachments(e,t)))}getFieldUsageInfo(e){const t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(u.Z.getLogger(this).error("#getFieldUsageInfo()","Unavailable until layer is loaded"),t)}createPopupTemplate(e){return(0,oe.eZ)(this,e)}_getAssociatedLayerForQuery(){const e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new d.Z("scenelayer:query-not-available","SceneLayer queries are not available without an associated feature layer",{layer:this});try{await this.associatedLayer.load()}catch(e){throw new d.Z("scenelayer:query-not-available","SceneLayer associated feature layer could not be loaded",{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return null!=this.statisticsInfo&&this.statisticsInfo.some((t=>t.name===e))}async queryCachedStatistics(e,t){if(await this.load(t),!this.statisticsInfo)throw new d.Z("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new d.Z("scenelayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.statisticsInfo)if(e.name===r.name){const r=(0,f.v_)(this.parsedUrl.path,e.href);return(0,a.default)(r,{query:{f:"json",token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then((e=>e.data))}throw new d.Z("scenelayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(x.xp.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"scene"};return this._debouncedSaveOperations(x.xp.SAVE,e)}async applyEdits(e,t){const{applyEdits:i}=await r.e(1444).then(r.bind(r,14720));if(await this.load(),!this.associatedLayer)throw new d.Z(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),i(this,this.associatedLayer.source,e,t)}async uploadAssets(e,t){if(await this.load(),null==this.associatedLayer)throw new d.Z(`${this.type}-layer:not-editable`,"Service is not editable");return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}on(e,t){return super.on(e,t)}validateLayer(e){if(e.layerType&&!pe.includes(e.layerType))throw new d.Z("scenelayer:layer-type-not-supported","SceneLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new d.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});if(this.version.major>2)throw new d.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x, 2.x"});!function(e,t){let r=!1,i=!1;if(null==e)r=!0,i=!0;else{const s=t&&t.isGeographic;switch(e){case"east-north-up":case"earth-centered":r=!0,i=s;break;case"vertex-reference-frame":r=!0,i=!s;break;default:r=!1}}if(!r)throw new d.Z("scenelayer:unsupported-normal-reference-frame","Normal reference frame is invalid.");if(!i)throw new d.Z("scenelayer:incompatible-normal-reference-frame","Normal reference frame is incompatible with layer spatial reference.")}(this.normalReferenceFrame,this.spatialReference)}_getTypeKeywords(){const e=[];if("points"===this.profile)e.push("Point");else{if("mesh-pyramids"!==this.profile)throw new d.Z("scenelayer:unknown-profile","SceneLayer:save() encountered an unknown SceneLayer profile: "+this.profile);e.push("3DObject")}return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(const e of this.fields){const t=!(!this.attributeStorageInfo||!this.attributeStorageInfo.some((t=>t.name===e.name))),r=!!this.associatedLayer?.fields?.some((t=>t&&e.name===t.name)),i={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||r,supportsLayerQuery:r};this._fieldUsageInfo[e.name]=i}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPopupOverrides()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(const t of this.associatedLayer.fields){const r=this.getField(t.name);r?(!r.domain&&t.domain&&(r.domain=t.domain.clone()),r.editable=t.editable,r.nullable=t.nullable,r.length=t.length):(e||(e=this.fields?this.fields.slice():[]),e.push(t.clone()))}e&&this._set("fields",e)}_applyAssociatedLayerPopupOverrides(){if(!this.associatedLayer)return;const e=["popupTemplate","popupEnabled"],t=(0,m.vw)(this);for(let r=0;r<e.length;r++){const i=e[r],s=this.originIdOf(i),o=this.associatedLayer.originIdOf(i);s<o&&(o===w.s3.SERVICE||o===w.s3.PORTAL_ITEM)&&t.setAtOrigin(i,this.associatedLayer[i],o)}}async _setAssociatedFeatureLayer(e){if(!["mesh-pyramids","points"].includes(this.profile))return;const t=new E.W(this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedLayer=await t.fetch()}catch(e){(0,y.D_)(e)||this._logWarningOnPopupEnabled()}}async _logWarningOnPopupEnabled(){await(0,h.N1)((()=>this.popupEnabled&&null!=this.popupTemplate));const e=`this SceneLayer: ${this.title}`;null==this.attributeStorageInfo?u.Z.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${e}`):u.Z.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${e}`)}_validateElevationInfo(){const e=this.elevationInfo;e&&("mesh-pyramids"===this.profile&&"relative-to-scene"===e.mode&&u.Z.getLogger(this).warn(".elevationInfo=","Mesh scene layers don't support relative-to-scene elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&u.Z.getLogger(this).warn(".elevationInfo=","Scene layers do not support featureExpressionInfo"))}};(0,i._)([(0,g.Cb)({types:{key:"type",base:R.B,typeMap:{selection:A.Z}},json:{origins:{"web-scene":{name:"layerDefinition.featureReduction",write:!0},"portal-item":{name:"layerDefinition.featureReduction",write:!0}}}})],ue.prototype,"featureReduction",void 0),(0,i._)([(0,g.Cb)({type:[k],json:{read:!1,origins:{"web-scene":{name:"layerDefinition.rangeInfos",write:!0},"portal-item":{name:"layerDefinition.rangeInfos",write:!0}}}})],ue.prototype,"rangeInfos",void 0),(0,i._)([(0,g.Cb)({json:{read:!1}})],ue.prototype,"associatedLayer",void 0),(0,i._)([(0,g.Cb)({type:["show","hide"]})],ue.prototype,"listMode",void 0),(0,i._)([(0,g.Cb)({type:["ArcGISSceneServiceLayer"]})],ue.prototype,"operationalLayerType",void 0),(0,i._)([(0,g.Cb)({json:{read:!1},readOnly:!0})],ue.prototype,"type",void 0),(0,i._)([(0,g.Cb)({...de.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"fields",void 0),(0,i._)([(0,g.Cb)()],ue.prototype,"types",null),(0,i._)([(0,g.Cb)()],ue.prototype,"typeIdField",null),(0,i._)([(0,g.Cb)()],ue.prototype,"templates",null),(0,i._)([(0,g.Cb)()],ue.prototype,"formTemplate",null),(0,i._)([(0,g.Cb)({readOnly:!0})],ue.prototype,"fieldsIndex",null),(0,i._)([(0,g.Cb)({type:Q.Z,json:{read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo"}}})],ue.prototype,"floorInfo",void 0),(0,i._)([(0,g.Cb)(de.outFields)],ue.prototype,"outFields",void 0),(0,i._)([(0,g.Cb)({type:D.U4,readOnly:!0,json:{read:!1}})],ue.prototype,"nodePages",void 0),(0,i._)([(0,b.r)("service","nodePages",["nodePages","pointNodePages"])],ue.prototype,"readNodePages",null),(0,i._)([(0,g.Cb)({type:[D.QI],readOnly:!0})],ue.prototype,"materialDefinitions",void 0),(0,i._)([(0,g.Cb)({type:[D.Yh],readOnly:!0})],ue.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,g.Cb)({type:[D.H3],readOnly:!0})],ue.prototype,"geometryDefinitions",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ue.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ue.prototype,"attributeStorageInfo",void 0),(0,i._)([(0,g.Cb)({readOnly:!0})],ue.prototype,"statisticsInfo",void 0),(0,i._)([(0,g.Cb)({type:p.Z.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.excludeObjectIds",write:{enabled:!0}}})],ue.prototype,"excludeObjectIds",void 0),(0,i._)([(0,g.Cb)({type:String,json:{origins:{service:{read:!1,write:!1}},name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],ue.prototype,"definitionExpression",void 0),(0,i._)([(0,g.Cb)({type:te,json:{name:"layerDefinition.polygonFilter",write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],ue.prototype,"filter",void 0),(0,i._)([(0,g.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],ue.prototype,"path",void 0),(0,i._)([(0,g.Cb)(P.PV)],ue.prototype,"elevationInfo",null),(0,i._)([(0,g.Cb)({type:String})],ue.prototype,"geometryType",null),(0,i._)([(0,g.Cb)(P.iR)],ue.prototype,"labelsVisible",void 0),(0,i._)([(0,g.Cb)({type:[U.Z],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:{reader:q.r},write:!1}},name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:q.r},write:!0}})],ue.prototype,"labelingInfo",void 0),(0,i._)([(0,g.Cb)(P.rn)],ue.prototype,"legendEnabled",void 0),(0,i._)([(0,g.Cb)({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:["opacity","layerDefinition.drawingInfo.transparency"],reader(e,t){if("number"==typeof e&&e>=0&&e<=1)return e;const r=t.layerDefinition?.drawingInfo?.transparency;return void 0!==r?(0,le.b)(r):void 0}}},"portal-item":{write:!0},service:{read:!1}}}})],ue.prototype,"opacity",void 0),(0,i._)([(0,g.Cb)({type:["Low","High"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"priority",void 0),(0,i._)([(0,g.Cb)({type:["Labels"],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],ue.prototype,"semantic",void 0),(0,i._)([(0,g.Cb)({types:n.o,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:!0},value:null})],ue.prototype,"renderer",null),(0,i._)([(0,g.Cb)({json:{read:!1}})],ue.prototype,"cachedDrawingInfo",void 0),(0,i._)([(0,b.r)("service","cachedDrawingInfo")],ue.prototype,"readCachedDrawingInfo",null),(0,i._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ue.prototype,"capabilities",null),(0,i._)([(0,g.Cb)({type:Boolean,json:{read:!1}})],ue.prototype,"editingEnabled",null),(0,i._)([(0,g.Cb)({readOnly:!0,json:{write:!1,read:!1}})],ue.prototype,"infoFor3D",null),(0,i._)([(0,g.Cb)(P.C_)],ue.prototype,"popupEnabled",void 0),(0,i._)([(0,g.Cb)({type:o.Z,json:{name:"popupInfo",write:!0}})],ue.prototype,"popupTemplate",void 0),(0,i._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],ue.prototype,"defaultPopupTemplate",null),(0,i._)([(0,g.Cb)({type:String,json:{read:!1}})],ue.prototype,"objectIdField",void 0),(0,i._)([(0,b.r)("service","objectIdField",["objectIdField","fields"])],ue.prototype,"readObjectIdField",null),(0,i._)([(0,g.Cb)({type:String,json:{read:!1}})],ue.prototype,"globalIdField",void 0),(0,i._)([(0,b.r)("service","globalIdField",["globalIdField","fields"])],ue.prototype,"readGlobalIdField",null),(0,i._)([(0,g.Cb)({readOnly:!0,type:String,json:{read:!1}})],ue.prototype,"displayField",null),(0,i._)([(0,g.Cb)({type:String,json:{read:!1}})],ue.prototype,"profile",void 0),(0,i._)([(0,b.r)("service","profile",["store.profile"])],ue.prototype,"readProfile",null),(0,i._)([(0,g.Cb)({readOnly:!0,type:String,json:{origins:{service:{read:{source:"store.normalReferenceFrame"}}},read:!1}})],ue.prototype,"normalReferenceFrame",void 0),(0,i._)([(0,g.Cb)(P.YI)],ue.prototype,"screenSizePerspectiveEnabled",void 0),ue=(0,i._)([(0,v.j)("esri.layers.SceneLayer")],ue);const ce={"mesh-pyramids":"mesh-pyramids",meshpyramids:"mesh-pyramids","features-meshes":"mesh-pyramids",points:"points","features-points":"points",lines:"lines","features-lines":"lines",polygons:"polygons","features-polygons":"polygons"},ye={"mesh-pyramids":"mesh",points:"point",lines:"polyline",polygons:"polygon"},he=ue},66094:(e,t,r)=>{r.d(t,{B:()=>s});var i=r(81271);function s(e){return o[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return l[t]||n}(e.url)}(e)]||a}const o={},n="text/plain",a=o[n],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 e in l)o[l[e]]=e}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3566,3172,661,5234,9880],{99880:(t,e,r)=>{r.d(e,{V:()=>u});var n=r(68773),o=(r(3172),r(20102)),a=r(92604),s=r(81271);const i=a.Z.getLogger("esri.assets");function u(t){if(!n.default.assetsPath)throw i.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new o.Z("assets:path-not-set","config.assetsPath is not set");return(0,s.v_)(n.default.assetsPath,t)}},46521:(t,e,r)=>{function n(){return[1,0,0,0,1,0,0,0,1]}function o(t,e,r,n,o,a,s,i,u){return[t,e,r,n,o,a,s,i,u]}function a(t,e){return new Float64Array(t,e,9)}r.d(e,{a:()=>a,c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:n,createView:a,fromValues:o},Symbol.toStringTag,{value:"Module"}))},52138:(t,e,r)=>{r.d(e,{A:()=>p,a:()=>u,d:()=>b,e:()=>d,f:()=>h,g:()=>y,h:()=>M,i:()=>s,j:()=>O,k:()=>f,m:()=>c,s:()=>a,t:()=>i,w:()=>l,y:()=>A,z:()=>T});var n=r(65617),o=r(46851);function a(t,e,r,n,o,a,s,i,u,c,l,f,d,h,b,p,m){return t[0]=e,t[1]=r,t[2]=n,t[3]=o,t[4]=a,t[5]=s,t[6]=i,t[7]=u,t[8]=c,t[9]=l,t[10]=f,t[11]=d,t[12]=h,t[13]=b,t[14]=p,t[15]=m,t}function s(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function i(t,e){if(t===e){const r=e[1],n=e[2],o=e[3],a=e[6],s=e[7],i=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=a,t[11]=e[14],t[12]=o,t[13]=s,t[14]=i}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function u(t,e){const r=e[0],n=e[1],o=e[2],a=e[3],s=e[4],i=e[5],u=e[6],c=e[7],l=e[8],f=e[9],d=e[10],h=e[11],b=e[12],p=e[13],m=e[14],g=e[15],y=r*i-n*s,w=r*u-o*s,M=r*c-a*s,O=n*u-o*i,T=n*c-a*i,A=o*c-a*u,v=l*p-f*b,C=l*m-d*b,I=l*g-h*b,E=f*m-d*p,S=f*g-h*p,U=d*g-h*m;let L=y*U-w*S+M*E+O*I-T*C+A*v;return L?(L=1/L,t[0]=(i*U-u*S+c*E)*L,t[1]=(o*S-n*U-a*E)*L,t[2]=(p*A-m*T+g*O)*L,t[3]=(d*T-f*A-h*O)*L,t[4]=(u*I-s*U-c*C)*L,t[5]=(r*U-o*I+a*C)*L,t[6]=(m*M-b*A-g*w)*L,t[7]=(l*A-d*M+h*w)*L,t[8]=(s*S-i*I+c*v)*L,t[9]=(n*I-r*S-a*v)*L,t[10]=(b*T-p*M+g*y)*L,t[11]=(f*M-l*T-h*y)*L,t[12]=(i*C-s*E-u*v)*L,t[13]=(r*E-n*C+o*v)*L,t[14]=(p*w-b*O-m*y)*L,t[15]=(l*O-f*w+d*y)*L,t):null}function c(t,e,r){const n=e[0],o=e[1],a=e[2],s=e[3],i=e[4],u=e[5],c=e[6],l=e[7],f=e[8],d=e[9],h=e[10],b=e[11],p=e[12],m=e[13],g=e[14],y=e[15];let w=r[0],M=r[1],O=r[2],T=r[3];return t[0]=w*n+M*i+O*f+T*p,t[1]=w*o+M*u+O*d+T*m,t[2]=w*a+M*c+O*h+T*g,t[3]=w*s+M*l+O*b+T*y,w=r[4],M=r[5],O=r[6],T=r[7],t[4]=w*n+M*i+O*f+T*p,t[5]=w*o+M*u+O*d+T*m,t[6]=w*a+M*c+O*h+T*g,t[7]=w*s+M*l+O*b+T*y,w=r[8],M=r[9],O=r[10],T=r[11],t[8]=w*n+M*i+O*f+T*p,t[9]=w*o+M*u+O*d+T*m,t[10]=w*a+M*c+O*h+T*g,t[11]=w*s+M*l+O*b+T*y,w=r[12],M=r[13],O=r[14],T=r[15],t[12]=w*n+M*i+O*f+T*p,t[13]=w*o+M*u+O*d+T*m,t[14]=w*a+M*c+O*h+T*g,t[15]=w*s+M*l+O*b+T*y,t}function l(t,e,r){const n=r[0],o=r[1],a=r[2];if(e===t)t[12]=e[0]*n+e[4]*o+e[8]*a+e[12],t[13]=e[1]*n+e[5]*o+e[9]*a+e[13],t[14]=e[2]*n+e[6]*o+e[10]*a+e[14],t[15]=e[3]*n+e[7]*o+e[11]*a+e[15];else{const r=e[0],s=e[1],i=e[2],u=e[3],c=e[4],l=e[5],f=e[6],d=e[7],h=e[8],b=e[9],p=e[10],m=e[11];t[0]=r,t[1]=s,t[2]=i,t[3]=u,t[4]=c,t[5]=l,t[6]=f,t[7]=d,t[8]=h,t[9]=b,t[10]=p,t[11]=m,t[12]=r*n+c*o+h*a+e[12],t[13]=s*n+l*o+b*a+e[13],t[14]=i*n+f*o+p*a+e[14],t[15]=u*n+d*o+m*a+e[15]}return t}function f(t,e,r){const n=r[0],o=r[1],a=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function d(t,e,r,n){let a,s,i,u,c,l,f,d,h,b,p,m,g,y,w,M,O,T,A,v,C,I,E,S,U=n[0],L=n[1],R=n[2],q=Math.sqrt(U*U+L*L+R*R);return q<(0,o.g)()?null:(q=1/q,U*=q,L*=q,R*=q,a=Math.sin(r),s=Math.cos(r),i=1-s,u=e[0],c=e[1],l=e[2],f=e[3],d=e[4],h=e[5],b=e[6],p=e[7],m=e[8],g=e[9],y=e[10],w=e[11],M=U*U*i+s,O=L*U*i+R*a,T=R*U*i-L*a,A=U*L*i-R*a,v=L*L*i+s,C=R*L*i+U*a,I=U*R*i+L*a,E=L*R*i-U*a,S=R*R*i+s,t[0]=u*M+d*O+m*T,t[1]=c*M+h*O+g*T,t[2]=l*M+b*O+y*T,t[3]=f*M+p*O+w*T,t[4]=u*A+d*v+m*C,t[5]=c*A+h*v+g*C,t[6]=l*A+b*v+y*C,t[7]=f*A+p*v+w*C,t[8]=u*I+d*E+m*S,t[9]=c*I+h*E+g*S,t[10]=l*I+b*E+y*S,t[11]=f*I+p*E+w*S,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function h(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function b(t,e,r){if(0===e)return s(t);let n,a,i,u=r[0],c=r[1],l=r[2],f=Math.sqrt(u*u+c*c+l*l);return f<(0,o.g)()?null:(f=1/f,u*=f,c*=f,l*=f,n=Math.sin(e),a=Math.cos(e),i=1-a,t[0]=u*u*i+a,t[1]=c*u*i+l*n,t[2]=l*u*i-c*n,t[3]=0,t[4]=u*c*i-l*n,t[5]=c*c*i+a,t[6]=l*c*i+u*n,t[7]=0,t[8]=u*l*i+c*n,t[9]=c*l*i-u*n,t[10]=l*l*i+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function p(t,e){const r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function m(t,e,r){const n=e[0],o=e[1],a=e[2],s=e[3],i=n+n,u=o+o,c=a+a,l=n*i,f=n*u,d=n*c,h=o*u,b=o*c,p=a*c,m=s*i,g=s*u,y=s*c;return t[0]=1-(h+p),t[1]=f+y,t[2]=d-g,t[3]=0,t[4]=f-y,t[5]=1-(l+p),t[6]=b+m,t[7]=0,t[8]=d+g,t[9]=b-m,t[10]=1-(l+h),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}const g=(0,n.c)();function y(t,e,r,n){const o=e[0],a=e[1],s=e[2],i=e[3],u=o+o,c=a+a,l=s+s,f=o*u,d=o*c,h=o*l,b=a*c,p=a*l,m=s*l,g=i*u,y=i*c,w=i*l,M=n[0],O=n[1],T=n[2];return t[0]=(1-(b+m))*M,t[1]=(d+w)*M,t[2]=(h-y)*M,t[3]=0,t[4]=(d-w)*O,t[5]=(1-(f+m))*O,t[6]=(p+g)*O,t[7]=0,t[8]=(h+y)*T,t[9]=(p-g)*T,t[10]=(1-(f+b))*T,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function w(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function M(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[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]}function O(t,e){if(t===e)return!0;const r=t[0],n=t[1],a=t[2],s=t[3],i=t[4],u=t[5],c=t[6],l=t[7],f=t[8],d=t[9],h=t[10],b=t[11],p=t[12],m=t[13],g=t[14],y=t[15],w=e[0],M=e[1],O=e[2],T=e[3],A=e[4],v=e[5],C=e[6],I=e[7],E=e[8],S=e[9],U=e[10],L=e[11],R=e[12],q=e[13],P=e[14],x=e[15],F=(0,o.g)();return Math.abs(r-w)<=F*Math.max(1,Math.abs(r),Math.abs(w))&&Math.abs(n-M)<=F*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(a-O)<=F*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(s-T)<=F*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(i-A)<=F*Math.max(1,Math.abs(i),Math.abs(A))&&Math.abs(u-v)<=F*Math.max(1,Math.abs(u),Math.abs(v))&&Math.abs(c-C)<=F*Math.max(1,Math.abs(c),Math.abs(C))&&Math.abs(l-I)<=F*Math.max(1,Math.abs(l),Math.abs(I))&&Math.abs(f-E)<=F*Math.max(1,Math.abs(f),Math.abs(E))&&Math.abs(d-S)<=F*Math.max(1,Math.abs(d),Math.abs(S))&&Math.abs(h-U)<=F*Math.max(1,Math.abs(h),Math.abs(U))&&Math.abs(b-L)<=F*Math.max(1,Math.abs(b),Math.abs(L))&&Math.abs(p-R)<=F*Math.max(1,Math.abs(p),Math.abs(R))&&Math.abs(m-q)<=F*Math.max(1,Math.abs(m),Math.abs(q))&&Math.abs(g-P)<=F*Math.max(1,Math.abs(g),Math.abs(P))&&Math.abs(y-x)<=F*Math.max(1,Math.abs(y),Math.abs(x))}function T(t){const e=(0,o.g)(),r=t[0],n=t[1],a=t[2],s=t[4],i=t[5],u=t[6],c=t[8],l=t[9],f=t[10];return Math.abs(1-(r*r+s*s+c*c))<=e&&Math.abs(1-(n*n+i*i+l*l))<=e&&Math.abs(1-(a*a+u*u+f*f))<=e}function A(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const v=c,C=w;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t},adjoint:function(t,e){const r=e[0],n=e[1],o=e[2],a=e[3],s=e[4],i=e[5],u=e[6],c=e[7],l=e[8],f=e[9],d=e[10],h=e[11],b=e[12],p=e[13],m=e[14],g=e[15];return t[0]=i*(d*g-h*m)-f*(u*g-c*m)+p*(u*h-c*d),t[1]=-(n*(d*g-h*m)-f*(o*g-a*m)+p*(o*h-a*d)),t[2]=n*(u*g-c*m)-i*(o*g-a*m)+p*(o*c-a*u),t[3]=-(n*(u*h-c*d)-i*(o*h-a*d)+f*(o*c-a*u)),t[4]=-(s*(d*g-h*m)-l*(u*g-c*m)+b*(u*h-c*d)),t[5]=r*(d*g-h*m)-l*(o*g-a*m)+b*(o*h-a*d),t[6]=-(r*(u*g-c*m)-s*(o*g-a*m)+b*(o*c-a*u)),t[7]=r*(u*h-c*d)-s*(o*h-a*d)+l*(o*c-a*u),t[8]=s*(f*g-h*p)-l*(i*g-c*p)+b*(i*h-c*f),t[9]=-(r*(f*g-h*p)-l*(n*g-a*p)+b*(n*h-a*f)),t[10]=r*(i*g-c*p)-s*(n*g-a*p)+b*(n*c-a*i),t[11]=-(r*(i*h-c*f)-s*(n*h-a*f)+l*(n*c-a*i)),t[12]=-(s*(f*m-d*p)-l*(i*m-u*p)+b*(i*d-u*f)),t[13]=r*(f*m-d*p)-l*(n*m-o*p)+b*(n*d-o*f),t[14]=-(r*(i*m-u*p)-s*(n*m-o*p)+b*(n*u-o*i)),t[15]=r*(i*d-u*f)-s*(n*d-o*f)+l*(n*u-o*i),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[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},determinant:function(t){const e=t[0],r=t[1],n=t[2],o=t[3],a=t[4],s=t[5],i=t[6],u=t[7],c=t[8],l=t[9],f=t[10],d=t[11],h=t[12],b=t[13],p=t[14],m=t[15];return(e*s-r*a)*(f*m-d*p)-(e*i-n*a)*(l*m-d*b)+(e*u-o*a)*(l*p-f*b)+(r*i-n*s)*(c*m-d*h)-(r*u-o*s)*(c*p-f*h)+(n*u-o*i)*(c*b-l*h)},equals:O,exactEquals:M,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const r=e[0],n=e[1],o=e[2],a=e[3],s=r+r,i=n+n,u=o+o,c=r*s,l=n*s,f=n*i,d=o*s,h=o*i,b=o*u,p=a*s,m=a*i,g=a*u;return t[0]=1-f-b,t[1]=l+g,t[2]=d-m,t[3]=0,t[4]=l-g,t[5]=1-c-b,t[6]=h+p,t[7]=0,t[8]=d+m,t[9]=h-p,t[10]=1-c-f,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const r=g,n=-e[0],o=-e[1],a=-e[2],s=e[3],i=e[4],u=e[5],c=e[6],l=e[7],f=n*n+o*o+a*a+s*s;return f>0?(r[0]=2*(i*s+l*n+u*a-c*o)/f,r[1]=2*(u*s+l*o+c*n-i*a)/f,r[2]=2*(c*s+l*a+i*o-u*n)/f):(r[0]=2*(i*s+l*n+u*a-c*o),r[1]=2*(u*s+l*o+c*n-i*a),r[2]=2*(c*s+l*a+i*o-u*n)),m(t,e,r),t},fromRotation:b,fromRotationTranslation:m,fromRotationTranslationScale:y,fromRotationTranslationScaleOrigin:function(t,e,r,n,o){const a=e[0],s=e[1],i=e[2],u=e[3],c=a+a,l=s+s,f=i+i,d=a*c,h=a*l,b=a*f,p=s*l,m=s*f,g=i*f,y=u*c,w=u*l,M=u*f,O=n[0],T=n[1],A=n[2],v=o[0],C=o[1],I=o[2],E=(1-(p+g))*O,S=(h+M)*O,U=(b-w)*O,L=(h-M)*T,R=(1-(d+g))*T,q=(m+y)*T,P=(b+w)*A,x=(m-y)*A,F=(1-(d+p))*A;return t[0]=E,t[1]=S,t[2]=U,t[3]=0,t[4]=L,t[5]=R,t[6]=q,t[7]=0,t[8]=P,t[9]=x,t[10]=F,t[11]=0,t[12]=r[0]+v-(E*v+L*C+P*I),t[13]=r[1]+C-(S*v+R*C+x*I),t[14]=r[2]+I-(U*v+q*C+F*I),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:h,fromXRotation:p,fromYRotation:function(t,e){const r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,r,n,o,a,s){const i=1/(r-e),u=1/(o-n),c=1/(a-s);return t[0]=2*a*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*u,t[6]=0,t[7]=0,t[8]=(r+e)*i,t[9]=(o+n)*u,t[10]=(s+a)*c,t[11]=-1,t[12]=0,t[13]=0,t[14]=s*a*2*c,t[15]=0,t},getRotation:function(t,e){const r=e[0]+e[5]+e[10];let n=0;return r>0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},getScaling:function(t,e){const r=e[0],n=e[1],o=e[2],a=e[4],s=e[5],i=e[6],u=e[8],c=e[9],l=e[10];return t[0]=Math.sqrt(r*r+n*n+o*o),t[1]=Math.sqrt(a*a+s*s+i*i),t[2]=Math.sqrt(u*u+c*c+l*l),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:A,identity:s,invert:u,invertOrIdentity:function(t,e){return u(t,e)||s(t),t},isOrthoNormal:T,lookAt:function(t,e,r,n){const a=e[0],i=e[1],u=e[2];let c=a-r[0],l=i-r[1],f=u-r[2];const d=(0,o.g)();if(Math.abs(c)<d&&Math.abs(l)<d&&Math.abs(f)<d)return void s(t);let h=1/Math.sqrt(c*c+l*l+f*f);c*=h,l*=h,f*=h;const b=n[0],p=n[1],m=n[2];let g=p*f-m*l,y=m*c-b*f,w=b*l-p*c;h=Math.sqrt(g*g+y*y+w*w),h?(h=1/h,g*=h,y*=h,w*=h):(g=0,y=0,w=0);let M=l*w-f*y,O=f*g-c*w,T=c*y-l*g;h=Math.sqrt(M*M+O*O+T*T),h?(h=1/h,M*=h,O*=h,T*=h):(M=0,O=0,T=0),t[0]=g,t[1]=M,t[2]=c,t[3]=0,t[4]=y,t[5]=O,t[6]=l,t[7]=0,t[8]=w,t[9]=T,t[10]=f,t[11]=0,t[12]=-(g*a+y*i+w*u),t[13]=-(M*a+O*i+T*u),t[14]=-(c*a+l*i+f*u),t[15]=1},mul:v,multiply:c,multiplyScalar:function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t},multiplyScalarAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t},ortho:function(t,e,r,n,o,a,s){const i=1/(e-r),u=1/(n-o),c=1/(a-s);return t[0]=-2*i,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*u,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*c,t[11]=0,t[12]=(e+r)*i,t[13]=(o+n)*u,t[14]=(s+a)*c,t[15]=1,t},perspective:function(t,e,r,n,o){const a=1/Math.tan(e/2);let s;return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(s=1/(n-o),t[10]=(o+n)*s,t[14]=2*o*n*s):(t[10]=-1,t[14]=-2*n),t},perspectiveFromFieldOfView:function(t,e,r,n){const o=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),i=Math.tan(e.rightDegrees*Math.PI/180),u=2/(s+i),c=2/(o+a);return t[0]=u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=c,t[6]=0,t[7]=0,t[8]=-(s-i)*u*.5,t[9]=(o-a)*c*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},rotate:d,rotateX:function(t,e,r){const n=Math.sin(r),o=Math.cos(r),a=e[4],s=e[5],i=e[6],u=e[7],c=e[8],l=e[9],f=e[10],d=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*o+c*n,t[5]=s*o+l*n,t[6]=i*o+f*n,t[7]=u*o+d*n,t[8]=c*o-a*n,t[9]=l*o-s*n,t[10]=f*o-i*n,t[11]=d*o-u*n,t},rotateY:function(t,e,r){const n=Math.sin(r),o=Math.cos(r),a=e[0],s=e[1],i=e[2],u=e[3],c=e[8],l=e[9],f=e[10],d=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*o-c*n,t[1]=s*o-l*n,t[2]=i*o-f*n,t[3]=u*o-d*n,t[8]=a*n+c*o,t[9]=s*n+l*o,t[10]=i*n+f*o,t[11]=u*n+d*o,t},rotateZ:function(t,e,r){const n=Math.sin(r),o=Math.cos(r),a=e[0],s=e[1],i=e[2],u=e[3],c=e[4],l=e[5],f=e[6],d=e[7];return e!==t&&(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[0]=a*o+c*n,t[1]=s*o+l*n,t[2]=i*o+f*n,t[3]=u*o+d*n,t[4]=c*o-a*n,t[5]=l*o-s*n,t[6]=f*o-i*n,t[7]=d*o-u*n,t},scale:f,set:a,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:C,subtract:w,targetTo:function(t,e,r,n){const o=e[0],a=e[1],s=e[2],i=n[0],u=n[1],c=n[2];let l=o-r[0],f=a-r[1],d=s-r[2],h=l*l+f*f+d*d;h>0&&(h=1/Math.sqrt(h),l*=h,f*=h,d*=h);let b=u*d-c*f,p=c*l-i*d,m=i*f-u*l;return h=b*b+p*p+m*m,h>0&&(h=1/Math.sqrt(h),b*=h,p*=h,m*=h),t[0]=b,t[1]=p,t[2]=m,t[3]=0,t[4]=f*m-d*p,t[5]=d*b-l*m,t[6]=l*p-f*b,t[7]=0,t[8]=l,t[9]=f,t[10]=d,t[11]=0,t[12]=o,t[13]=a,t[14]=s,t[15]=1,t},translate:l,transpose:i},Symbol.toStringTag,{value:"Module"}))},51305:(t,e,r)=>{r.d(e,{c:()=>h,g:()=>l,j:()=>S,k:()=>p,m:()=>f,s:()=>c});var n=r(46521),o=r(94961),a=r(65617),s=r(46851),i=r(17896),u=r(98766);function c(t,e,r){r*=.5;const n=Math.sin(r);return t[0]=n*e[0],t[1]=n*e[1],t[2]=n*e[2],t[3]=Math.cos(r),t}function l(t,e){const r=2*Math.acos(e[3]),n=Math.sin(r/2);return n>(0,s.g)()?(t[0]=e[0]/n,t[1]=e[1]/n,t[2]=e[2]/n):(t[0]=1,t[1]=0,t[2]=0),r}function f(t,e,r){const n=e[0],o=e[1],a=e[2],s=e[3],i=r[0],u=r[1],c=r[2],l=r[3];return t[0]=n*l+s*i+o*c-a*u,t[1]=o*l+s*u+a*i-n*c,t[2]=a*l+s*c+n*u-o*i,t[3]=s*l-n*i-o*u-a*c,t}function d(t,e,r,n){const o=e[0],a=e[1],i=e[2],u=e[3];let c,l,f,d,h,b=r[0],p=r[1],m=r[2],g=r[3];return l=o*b+a*p+i*m+u*g,l<0&&(l=-l,b=-b,p=-p,m=-m,g=-g),1-l>(0,s.g)()?(c=Math.acos(l),f=Math.sin(c),d=Math.sin((1-n)*c)/f,h=Math.sin(n*c)/f):(d=1-n,h=n),t[0]=d*o+h*b,t[1]=d*a+h*p,t[2]=d*i+h*m,t[3]=d*u+h*g,t}function h(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function b(t,e){const r=e[0]+e[4]+e[8];let n;if(r>0)n=Math.sqrt(r+1),t[3]=.5*n,n=.5/n,t[0]=(e[5]-e[7])*n,t[1]=(e[6]-e[2])*n,t[2]=(e[1]-e[3])*n;else{let r=0;e[4]>e[0]&&(r=1),e[8]>e[3*r+r]&&(r=2);const o=(r+1)%3,a=(r+2)%3;n=Math.sqrt(e[3*r+r]-e[3*o+o]-e[3*a+a]+1),t[r]=.5*n,n=.5/n,t[3]=(e[3*o+a]-e[3*a+o])*n,t[o]=(e[3*o+r]+e[3*r+o])*n,t[a]=(e[3*a+r]+e[3*r+a])*n}return t}function p(t,e,r,n){const o=.5*Math.PI/180;e*=o,r*=o,n*=o;const a=Math.sin(e),s=Math.cos(e),i=Math.sin(r),u=Math.cos(r),c=Math.sin(n),l=Math.cos(n);return t[0]=a*u*l-s*i*c,t[1]=s*i*l+a*u*c,t[2]=s*u*c-a*i*l,t[3]=s*u*l+a*i*c,t}const m=u.c,g=u.s,y=u.a,w=f,M=u.b,O=u.d,T=u.l,A=u.e,v=A,C=u.f,I=C,E=u.n,S=u.g,U=u.h,L=(0,a.c)(),R=(0,a.f)(1,0,0),q=(0,a.f)(0,1,0),P=(0,o.a)(),x=(0,o.a)(),F=(0,n.c)();Object.freeze(Object.defineProperty({__proto__:null,add:y,calculateW:function(t,e){const r=e[0],n=e[1],o=e[2];return t[0]=r,t[1]=n,t[2]=o,t[3]=Math.sqrt(Math.abs(1-r*r-n*n-o*o)),t},conjugate:h,copy:m,dot:O,equals:U,exactEquals:S,fromEuler:p,fromMat3:b,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const r=e[0],n=e[1],o=e[2],a=e[3],s=r*r+n*n+o*o+a*a,i=s?1/s:0;return t[0]=-r*i,t[1]=-n*i,t[2]=-o*i,t[3]=a*i,t},len:v,length:A,lerp:T,mul:w,multiply:f,normalize:E,random:function(t){const e=s.R,r=e(),n=e(),o=e(),a=Math.sqrt(1-r),i=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*n),t[1]=a*Math.cos(2*Math.PI*n),t[2]=i*Math.sin(2*Math.PI*o),t[3]=i*Math.cos(2*Math.PI*o),t},rotateX:function(t,e,r){r*=.5;const n=e[0],o=e[1],a=e[2],s=e[3],i=Math.sin(r),u=Math.cos(r);return t[0]=n*u+s*i,t[1]=o*u+a*i,t[2]=a*u-o*i,t[3]=s*u-n*i,t},rotateY:function(t,e,r){r*=.5;const n=e[0],o=e[1],a=e[2],s=e[3],i=Math.sin(r),u=Math.cos(r);return t[0]=n*u-a*i,t[1]=o*u+s*i,t[2]=a*u+n*i,t[3]=s*u-o*i,t},rotateZ:function(t,e,r){r*=.5;const n=e[0],o=e[1],a=e[2],s=e[3],i=Math.sin(r),u=Math.cos(r);return t[0]=n*u+o*i,t[1]=o*u-n*i,t[2]=a*u+s*i,t[3]=s*u-a*i,t},rotationTo:function(t,e,r){const n=(0,i.e)(e,r);return n<-.999999?((0,i.f)(L,R,e),(0,i.u)(L)<1e-6&&(0,i.f)(L,q,e),(0,i.n)(L,L),c(t,L,Math.PI),t):n>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,i.f)(L,e,r),t[0]=L[0],t[1]=L[1],t[2]=L[2],t[3]=1+n,E(t,t))},scale:M,set:g,setAxes:function(t,e,r,n){const o=F;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=n[0],o[4]=n[1],o[7]=n[2],o[2]=-e[0],o[5]=-e[1],o[8]=-e[2],E(t,b(t,o))},setAxisAngle:c,slerp:d,sqlerp:function(t,e,r,n,o,a){return d(P,e,o,a),d(x,r,n,a),d(t,P,x,2*a*(1-a)),t},sqrLen:I,squaredLength:C,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},37140:(t,e,r)=>{function n(){const t=new Float32Array(4);return t[3]=1,t}function o(t){const e=new Float32Array(4);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}r.d(e,{b:()=>o,c:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,clone:o,create:n,createView:function(t,e){return new Float32Array(t,e,4)},fromValues:function(t,e,r,n){const o=new Float32Array(4);return o[0]=t,o[1]=e,o[2]=r,o[3]=n,o}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,r)=>{function n(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,e){return new Float64Array(t,e,4)}r.d(e,{I:()=>s,a:()=>n,b:()=>o,c:()=>a});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:n,createView:a,fromValues:function(t,e,r,n){return[t,e,r,n]}},Symbol.toStringTag,{value:"Module"}))},72119:(t,e,r)=>{function n(){return new Float32Array(3)}function o(t){const e=new Float32Array(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(t,e,r){const n=new Float32Array(3);return n[0]=t,n[1]=e,n[2]=r,n}function s(){return n()}function i(){return a(1,1,1)}function u(){return a(1,0,0)}function c(){return a(0,1,0)}function l(){return a(0,0,1)}r.d(e,{b:()=>o,c:()=>n,f:()=>a});const f=s(),d=i(),h=u(),b=c(),p=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:h,UNIT_Y:b,UNIT_Z:p,ZEROS:f,clone:o,create:n,createView:function(t,e){return new Float32Array(t,e,3)},fromValues:a,ones:i,unitX:u,unitY:c,unitZ:l,zeros:s},Symbol.toStringTag,{value:"Module"}))},10661:(t,e,r)=>{r.d(e,{s:()=>o});var n=r(42100);class o extends n.s{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},3172:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var n=r(68773),o=r(40330),a=r(20102),s=r(80442),i=r(22974),u=r(95330),c=r(81271),l=r(19745),f=r(71058),d=r(85958);async function h(t,e){t instanceof URL&&(t=t.toString()),e?.query instanceof URLSearchParams&&(e.query=(0,c.u0)(e.query.toString().replaceAll("+"," ")));const i=(0,c.HK)(t),l=(0,c.jc)(t);l||i||(t=(0,c.Fv)(t));const g={url:t,requestOptions:{...e}};let y=(0,c.oh)(t);if(y){const t=await async function(t,e){if(null!=t.responseData)return t.responseData;if(t.headers&&(e.requestOptions.headers={...e.requestOptions.headers,...t.headers}),t.query&&(e.requestOptions.query={...e.requestOptions.query,...t.query}),t.before){let r,n;try{n=await t.before(e)}catch(t){r=A("request:interceptor",t,e)}if((n instanceof Error||n instanceof a.Z)&&(r=A("request:interceptor",n,e)),r)throw t.error&&t.error(r),r;return n}}(y,g);if(null!=t)return{data:t,getHeader:M,httpStatus:200,requestOptions:g.requestOptions,url:g.url};y.after||y.error||(y=null)}if(t=g.url,"image"===(e=g.requestOptions).responseType&&((0,s.Z)("host-webworker")||(0,s.Z)("host-node")))throw A("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),g);if("head"===e.method){if(e.body)throw A("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),g);if(i||l)throw A("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),g)}if(await async function(){(0,s.Z)("host-webworker")?b||(b=await r.e(9884).then(r.bind(r,29884))):h._abortableFetch||(h._abortableFetch=globalThis.fetch.bind(globalThis))}(),b)return b.execute(t,e);const w=new AbortController;(0,u.fu)(e,(()=>w.abort()));const O={controller:w,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:y,params:g,redoRequest:!1,useIdentity:p.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},T=await async function(t){let e,r;await async function(t){const e=t.params.url,r=t.params.requestOptions,a=t.controller.signal,s=r.body;let i=null,c=null;if(m&&"HTMLFormElement"in globalThis&&(s instanceof FormData?i=s:s instanceof HTMLFormElement&&(i=new FormData(s))),"string"==typeof s&&(c=s),t.fetchOptions={cache:r.cacheBust&&!("polyfill"in h._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:p.priority,redirect:"follow",signal:a},(i||c)&&(t.fetchOptions.body=i||c),"anonymous"===r.authMode&&(t.useIdentity=!1),t.hasToken=!!(/token=/i.test(e)||r.query?.token||i?.get("token")),!t.hasToken&&n.default.apiKey&&(0,f.r)(e)&&(r.query||(r.query={}),r.query.token=n.default.apiKey,t.hasToken=!0),t.useIdentity&&!t.hasToken&&!t.credentialToken&&!C(e)&&!(0,u.Hc)(a)){let n;"immediate"===r.authMode?(await v(),n=await o.id.getCredential(e,{signal:a}),t.credential=n):"no-prompt"===r.authMode?(await v(),n=await o.id.getCredential(e,{prompt:!1,signal:a}).catch((()=>{})),t.credential=n):o.id&&(n=o.id.findCredential(e)),n&&(t.credentialToken=n.token,t.useSSL=!!n.ssl)}}(t);try{do{[e,r]=await I(t)}while(!await S(t,e,r))}catch(r){const n=A("request:server",r,t.params,e);throw n.details.ssl=t.useSSL,t.interceptor?.error&&t.interceptor.error(n),n}const a=t.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!t.hasToken&&!t.credentialToken&&r.user?.username&&!(0,c.kl)(a)){const t=(0,c.P$)(a,!0);t&&p.trustedServers.push(t)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,d.Hu)(r.authorizedCrossOriginNoCorsDomains)}const s=t.credential;if(s&&o.id){const t=o.id.findServerInfo(s.server);let e=t?.owningSystemUrl;if(e){e=e.replace(/\/?$/,"/sharing");const t=o.id.findCredential(e,s.userId);t&&-1===o.id._getIdenticalSvcIdx(e,t)&&t.resources.unshift(e)}}return{data:r,getHeader:e?t=>e?.headers.get(t):M,httpStatus:e?.status??200,requestOptions:t.params.requestOptions,ssl:t.useSSL,url:t.params.url}}(O);return y?.after?.(T),T}let b;const p=n.default.request,m="FormData"in globalThis,g=[499,498,403,401],y=["COM_0056","COM_0057","SB_0008"],w=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],M=()=>null,O=Symbol();function T(t){const e=(0,c.P$)(t);return!e||e.endsWith(".arcgis.com")||h._corsServers.includes(e)||(0,c.kl)(e)}function A(t,e,r,n){let o="Error";const s={url:r.url,requestOptions:r.requestOptions,getHeader:M,ssl:!1};if(e instanceof a.Z)return e.details?(e.details=(0,i.d9)(e.details),e.details.url=r.url,e.details.requestOptions=r.requestOptions):e.details=s,e;if(e){const t=n&&(t=>n.headers.get(t)),r=n?.status,a=e.message;a&&(o=a),t&&(s.getHeader=t),s.httpStatus=(null!=e.httpCode?e.httpCode:e.code)||r||0,s.subCode=e.subcode,s.messageCode=e.messageCode,"string"==typeof e.details?s.messages=[e.details]:s.messages=e.details,s.raw=O in e?e[O]:e}return(0,u.D_)(e)?(0,u.zE)():new a.Z(t,o,s)}async function v(){o.id||await Promise.all([r.e(7126),r.e(6261),r.e(9255),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function C(t){return w.some((e=>e.test(t)))}async function I(t){let e=t.params.url;const r=t.params.requestOptions,n=t.fetchOptions??{},a=(0,c.jc)(e)||(0,c.HK)(e),i=r.responseType||"json",f=a?0:null!=r.timeout?r.timeout:p.timeout;let b=!1;if(!a){t.useSSL&&(e=(0,c.hO)(e)),r.cacheBust&&"default"===n.cache&&(e=(0,c.ZN)(e,"request.preventCache",Date.now()));let a={...r.query};t.credentialToken&&(a.token=t.credentialToken);let i=(0,c.B7)(a);(0,s.Z)("esri-url-encodes-apostrophe")&&(i=i.replaceAll("'","%27"));const u=e.length+1+i.length;let f;b="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||u>p.maxUrlLength;const h=r.useProxy||!!(0,c.ed)(e);if(h){const t=(0,c.b7)(e);f=t.path,!b&&f.length+1+u>p.maxUrlLength&&(b=!0),t.query&&(a={...t.query,...a})}if("HEAD"===n.method&&(b||h)){if(b){if(u>p.maxUrlLength)throw A("request:invalid-parameters",new Error("URL exceeds maximum length"),t.params);throw A("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),t.params)}if(h)throw A("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),t.params)}if(b?(n.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?e=(0,c.fl)(e,a):(n.body=(0,c.B7)(a),n.headers||(n.headers={}),n.headers["Content-Type"]="application/x-www-form-urlencoded")):e=(0,c.fl)(e,a),h&&(t.useProxy=!0,e=`${f}?${e}`),a.token&&m&&n.body instanceof FormData&&!(0,l.P)(e)&&n.body.set("token",a.token),r.hasOwnProperty("withCredentials"))t.withCredentials=r.withCredentials;else if(!(0,c.D6)(e,(0,c.TI)()))if((0,c.kl)(e))t.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(e);r?.webTierAuth&&(t.withCredentials=!0)}t.withCredentials&&(n.credentials="include",(0,d.jH)(e)&&await(0,d.jz)(b?(0,c.fl)(e,a):e))}let g,y,w=0,M=!1;f>0&&(w=setTimeout((()=>{M=!0,t.controller.abort()}),f));try{if("native-request-init"===r.responseType)y=n,y.url=e;else if("image"!==r.responseType||"default"!==n.cache||"GET"!==n.method||b||function(t){if(t)for(const e of Object.getOwnPropertyNames(t))if(t[e])return!0;return!1}(r.headers)||!a&&!t.useProxy&&p.proxyUrl&&!T(e)){if(g=await h._abortableFetch(e,n),t.useProxy||function(t){const e=(0,c.P$)(t);e&&!h._corsServers.includes(e)&&h._corsServers.push(e)}(e),"native"===r.responseType)y=g;else if("HEAD"!==n.method)if(g.ok){switch(i){case"array-buffer":y=await g.arrayBuffer();break;case"blob":case"image":y=await g.blob();break;default:y=await g.text()}if(w&&(clearTimeout(w),w=0),"json"===i||"xml"===i||"document"===i)if(y)switch(i){case"json":y=JSON.parse(y);break;case"xml":y=E(y,"application/xml");break;case"document":y=E(y,"text/html")}else y=null;if(y){if("array-buffer"===i||"blob"===i){const t=g.headers.get("Content-Type");if(t&&/application\/json|text\/plain/i.test(t)&&y["blob"===i?"size":"byteLength"]<=750)try{const t=await new Response(y).json();t.error&&(y=t)}catch{}}"image"===i&&y instanceof Blob&&(y=await U(URL.createObjectURL(y),t,!0))}}else{y=await g.text();try{y=JSON.parse(y)}catch{}}}else y=await U(e,t)}catch(n){if("AbortError"===n.name){if(M)throw(0,d.Tf)();throw(0,u.zE)("Request canceled")}if(!(!g&&n instanceof TypeError&&p.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||t.useProxy||T(e))throw n;t.redoRequest=!0,(0,c.tD)({proxyUrl:p.proxyUrl,urlPrefix:(0,c.P$)(e)??""})}finally{w&&clearTimeout(w)}return[g,y]}function E(t,e){let r;try{r=(new DOMParser).parseFromString(t,e)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function S(t,e,r){if(t.redoRequest)return t.redoRequest=!1,!1;const n=t.params.requestOptions;if(!e||"native"===n.responseType||"native-request-init"===n.responseType)return!0;let a,s;if(r&&(r.error?a=r.error:"error"===r.status&&Array.isArray(r.messages)&&(a={...r},a[O]=r,a.details=r.messages)),!a&&!e.ok)throw a=new Error(`Unable to load ${e.url} status: ${e.status}`),a[O]=r,a;let i,u=null;a&&(s=Number(a.code),u=a.hasOwnProperty("subcode")?Number(a.subcode):null,i=a.messageCode,i=i?.toUpperCase());const c=n.authMode;if(403===s&&(4===u||a.message?.toLowerCase().includes("ssl")&&!a.message.toLowerCase().includes("permission"))){if(!t.useSSL)return t.useSSL=!0,!1}else if(!t.hasToken&&t.useIdentity&&("no-prompt"!==c||498===s)&&void 0!==s&&g.includes(s)&&!C(t.params.url)&&(403!==s||i&&!y.includes(i)&&(null==u||2===u&&t.credentialToken))){await v();try{const e=await o.id.getCredential(t.params.url,{error:A("request:server",a,t.params),prompt:"no-prompt"!==c,signal:t.controller.signal,token:t.credentialToken});return t.credential=e,t.credentialToken=e.token,t.useSSL=t.useSSL||e.ssl,!1}catch(e){if("no-prompt"===c)return t.credential=void 0,t.credentialToken=void 0,!1;a=e}}if(a)throw a;return!0}function U(t,e,r=!1){const n=e.controller.signal,o=new Image;return e.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=p.priority,o.src=t,(0,d.fY)(o,t,r,n)}h._abortableFetch=null,h._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(t,e,r)=>{r.d(e,{r:()=>a});var n=r(81271);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function a(t){const e=(0,n.P$)(t,!0);return!!e&&e.endsWith(".arcgis.com")&&!o.includes(e)&&!t.endsWith("/sharing/rest/generateToken")}},85958:(t,e,r)=>{r.d(e,{Hu:()=>f,Tf:()=>l,fY:()=>i,jH:()=>d,jz:()=>h});var n=r(68773),o=r(80442),a=r(95330),s=r(81271);function i(t,e,r=!1,n){return new Promise(((s,i)=>{if((0,a.Hc)(n))return void i(u());let c=()=>{d(),i(new Error(`Unable to load ${e}`))},l=()=>{const e=t;d(),s(e)},f=()=>{if(!t)return;const e=t;d(),e.src="",i(u())};const d=()=>{(0,o.Z)("esri-image-decode")||(t.removeEventListener("error",c),t.removeEventListener("load",l)),c=null,l=null,t=null,null!=n&&n.removeEventListener("abort",f),f=null,r&&URL.revokeObjectURL(e)};null!=n&&n.addEventListener("abort",f),(0,o.Z)("esri-image-decode")?t.decode().then(l,c):(t.addEventListener("error",c),t.addEventListener("load",l))}))}function u(){try{return new DOMException("Aborted","AbortError")}catch{const t=new Error;return t.name="AbortError",t}}const c="Timeout exceeded";function l(){return new Error(c)}function f(t){n.default.request.crossOriginNoCorsDomains||(n.default.request.crossOriginNoCorsDomains={});const e=n.default.request.crossOriginNoCorsDomains;for(let r of t)r=r.toLowerCase(),/^https?:\/\//.test(r)?e[(0,s.P$)(r)??""]=0:(e[(0,s.P$)("http://"+r)??""]=0,e[(0,s.P$)("https://"+r)??""]=0)}function d(t){const e=n.default.request.crossOriginNoCorsDomains;if(e){let r=(0,s.P$)(t);if(r)return r=r.toLowerCase(),!(0,s.D6)(r,(0,s.TI)())&&e[r]<Date.now()-36e5}return!1}async function h(t){const e=n.default.request.crossOriginNoCorsDomains,r=(0,s.P$)(t);e&&r&&(e[r.toLowerCase()]=Date.now());const o=(0,s.mN)(t);t=o.path,"json"===o.query?.f&&(t+="?f=json");try{await fetch(t,{mode:"no-cors",credentials:"include"})}catch{}}},90447:(t,e,r)=>{r.r(e),r.d(e,{default:()=>T});var n=r(67676),o=r(1533),a=r(51305),s=r(37140),i=r(17896),u=r(72119),c=r(44547),l=r(82971),f=(r(80442),r(23030)),d=r(14008),h=r(46329),b=r(91891),p=r(25683);function m(t,e,r){return null!=t&&t.attributeInfo.useElevation?e?function(t,e){const r=new Float64Array(e);for(let n=0;n<e;n++)r[n]=t[3*n+2];return r}(e,r):null:null!=t&&t.attributeInfo.storageInfo?(0,b.qM)(t.attributeInfo.storageInfo,t.buffer,r):null}function g(t,e,r,n,o){const a=t.length/3;let s=0;for(let i=0;i<a;i++){let a=!0;for(let t=0;t<n.length&&a;t++){const{filterJSON:e}=n[t],r=o[t].values[i];switch(e.type){case"pointCloudValueFilter":{const t="exclude"===e.mode;e.values.includes(r)===t&&(a=!1);break}case"pointCloudBitfieldFilter":{const t=w(e.requiredSetBits),n=w(e.requiredClearBits);(r&t)===t&&0==(r&n)||(a=!1);break}case"pointCloudReturnFilter":{const t=15&r,n=r>>>4&15,o=n>1,s=1===t,i=t===n;let u=!1;for(const t of e.includedReturns)if("last"===t&&i||"firstOfMany"===t&&s&&o||"lastOfMany"===t&&i&&o||"single"===t&&!o){u=!0;break}u||(a=!1);break}}}a&&(r[s]=i,t[3*s]=t[3*i],t[3*s+1]=t[3*i+1],t[3*s+2]=t[3*i+2],e[3*s]=e[3*i],e[3*s+1]=e[3*i+1],e[3*s+2]=e[3*i+2],s++)}return s}function y(t){switch(t){default:case null:case"none":return t=>t;case"low-four-bit":return t=>15&t;case"high-four-bit":return t=>(240&t)>>4;case"absolute-value":return t=>Math.abs(t);case"modulo-ten":return t=>t%10}}function w(t){let e=0;for(const r of t||[])e|=1<<r;return e}class M{transform(t){const e=this._transform(t),r=[e.points.buffer,e.rgb.buffer];null!=e.pointIdFilterMap&&r.push(e.pointIdFilterMap.buffer);for(const t of e.attributes)"buffer"in t.values&&(0,o.eP)(t.values.buffer)&&t.values.buffer!==e.rgb.buffer&&r.push(t.values.buffer);return Promise.resolve({result:e,transferList:r})}_transform(t){const e=function(t,e){if(null==t.encoding||""===t.encoding){const r=(0,b.W7)(e,t);if(null==r.vertexAttributes.position)return;const n=(0,b.I_)(e,r.vertexAttributes.position),o=r.header.fields,a=[o.offsetX,o.offsetY,o.offsetZ],s=[o.scaleX,o.scaleY,o.scaleZ],i=n.length/3,u=new Float64Array(3*i);for(let t=0;t<i;t++)u[3*t]=n[3*t]*s[0]+a[0],u[3*t+1]=n[3*t+1]*s[1]+a[1],u[3*t+2]=n[3*t+2]*s[2]+a[2];return u}if("lepcc-xyz"===t.encoding)return(0,p.Gi)(e).result}(t.schema,t.geometryBuffer);let r=e.length/3,o=null;const a=new Array,s=m(t.primaryAttributeData,e,r);null!=t.primaryAttributeData&&s&&a.push({attributeInfo:t.primaryAttributeData.attributeInfo,values:s});const i=m(t.modulationAttributeData,e,r);null!=t.modulationAttributeData&&i&&a.push({attributeInfo:t.modulationAttributeData.attributeInfo,values:i});let u=function(t,e,r,n){const{rendererJSON:o,isRGBRenderer:a}=t;let s=null,i=null;if(e&&a)s=e;else if(e&&"pointCloudUniqueValueRenderer"===o?.type){i=h.Z.fromJSON(o);const t=i.colorUniqueValueInfos;s=new Uint8Array(3*n);const r=y(i.fieldTransformType);for(let o=0;o<n;o++){const n=(r?r(e[o]):e[o])+"";for(let e=0;e<t.length;e++)if(t[e].values.includes(n)){s[3*o]=t[e].color.r,s[3*o+1]=t[e].color.g,s[3*o+2]=t[e].color.b;break}}}else if(e&&"pointCloudStretchRenderer"===o?.type){i=d.Z.fromJSON(o);const t=i.stops;s=new Uint8Array(3*n);const r=y(i.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(e[o]):e[o],a=t.length-1;if(n<t[0].value)s[3*o]=t[0].color.r,s[3*o+1]=t[0].color.g,s[3*o+2]=t[0].color.b;else if(n>=t[a].value)s[3*o]=t[a].color.r,s[3*o+1]=t[a].color.g,s[3*o+2]=t[a].color.b;else for(let e=1;e<t.length;e++)if(n<t[e].value){const r=(n-t[e-1].value)/(t[e].value-t[e-1].value);s[3*o]=t[e].color.r*r+t[e-1].color.r*(1-r),s[3*o+1]=t[e].color.g*r+t[e-1].color.g*(1-r),s[3*o+2]=t[e].color.b*r+t[e-1].color.b*(1-r);break}}}else if(e&&"pointCloudClassBreaksRenderer"===o?.type){i=f.Z.fromJSON(o);const t=i.colorClassBreakInfos;s=new Uint8Array(3*n);const r=y(i.fieldTransformType);for(let o=0;o<n;o++){const n=r?r(e[o]):e[o];for(let e=0;e<t.length;e++)if(n>=t[e].minValue&&n<=t[e].maxValue){s[3*o]=t[e].color.r,s[3*o+1]=t[e].color.g,s[3*o+2]=t[e].color.b;break}}}else s=new Uint8Array(3*n).fill(255);if(r&&i&&i.colorModulation){const t=i.colorModulation.minValue,e=i.colorModulation.maxValue,o=.3;for(let a=0;a<n;a++){const n=r[a],i=n>=e?1:n<=t?o:o+(1-o)*(n-t)/(e-t);s[3*a]=i*s[3*a],s[3*a+1]=i*s[3*a+1],s[3*a+2]=i*s[3*a+2]}}return s}(t.rendererInfo,s,i,r);if(t.filterInfo&&t.filterInfo.length>0&&null!=t.filterAttributesData){const s=t.filterAttributesData.filter(n.pC).map((t=>{const n=m(t,e,r),o={attributeInfo:t.attributeInfo,values:n};return a.push(o),o}));o=new Uint32Array(r),r=g(e,u,o,t.filterInfo,s)}for(const n of t.userAttributesData){const t=m(n,e,r);a.push({attributeInfo:n.attributeInfo,values:t})}3*r<u.length&&(u=new Uint8Array(u.buffer.slice(0,3*r))),this._applyElevationOffsetInPlace(e,r,t.elevationOffset);const c=this._transformCoordinates(e,r,t.obb,l.Z.fromJSON(t.inSR),l.Z.fromJSON(t.outSR));return{obb:t.obb,points:c,rgb:u,attributes:a,pointIdFilterMap:o}}_transformCoordinates(t,e,r,n,o){if(!(0,c.projectBuffer)(t,n,0,t,o,0,e))throw new Error("Can't reproject");const s=(0,u.f)(r.center[0],r.center[1],r.center[2]),l=(0,u.c)(),f=(0,u.c)();(0,a.c)(O,r.quaternion);const d=new Float32Array(3*e);for(let n=0;n<e;n++)l[0]=t[3*n]-s[0],l[1]=t[3*n+1]-s[1],l[2]=t[3*n+2]-s[2],(0,i.q)(f,l,O),r.halfSize[0]=Math.max(r.halfSize[0],Math.abs(f[0])),r.halfSize[1]=Math.max(r.halfSize[1],Math.abs(f[1])),r.halfSize[2]=Math.max(r.halfSize[2],Math.abs(f[2])),d[3*n]=l[0],d[3*n+1]=l[1],d[3*n+2]=l[2];return d}_applyElevationOffsetInPlace(t,e,r){if(0!==r)for(let n=0;n<e;n++)t[3*n+2]+=r}}const O=(0,s.c)();function T(){return new M}},91891:(t,e,r)=>{r.d(e,{I_:()=>d,W7:()=>p,qM:()=>g});var n=r(20102),o=r(22974),a=r(92604),s=r(25683),i=r(35065);const u=a.Z.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(t,e,r){let o="",a=0;for(;a<r;){const s=t[e+a];if(s<128)o+=String.fromCharCode(s),a++;else if(s>=192&&s<224){if(a+1>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const i=(31&s)<<6|63&t[e+a+1];o+=String.fromCharCode(i),a+=2}else if(s>=224&&s<240){if(a+2>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const i=(15&s)<<12|(63&t[e+a+1])<<6|63&t[e+a+2];o+=String.fromCharCode(i),a+=3}else{if(!(s>=240&&s<248))throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(a+3>=r)throw new n.Z("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const i=(7&s)<<18|(63&t[e+a+1])<<12|(63&t[e+a+2])<<6|63&t[e+a+3];if(i>=65536){const t=55296+(i-65536>>10),e=56320+(1023&i);o+=String.fromCharCode(t,e)}else o+=String.fromCharCode(i);a+=4}}}return o}function l(t,e){const r={byteOffset:0,byteCount:0,fields:Object.create(null)};let n=0;for(let o=0;o<e.length;o++){const a=e[o],s=a.valueType||a.type,i=w[s];r.fields[a.property]=i(t,n),n+=y[s].BYTES_PER_ELEMENT}return r.byteCount=n,r}function f(t,e,r){const o=[];let a,s,i=0;for(s=0;s<t;s+=1){if(a=e[s],a>0){if(o.push(c(r,i,a-1)),0!==r[i+a-1])throw new n.Z("string-array-error","Invalid string array: missing null termination.")}else o.push(null);i+=a}return o}function d(t,e){return new(0,y[e.valueType])(t,e.byteOffset,e.count*e.valuesPerElement)}function h(t,e,r){const a=null!=e.header?l(t,e.header):{byteOffset:0,byteCount:0,fields:{count:r}},s={header:a,byteOffset:a.byteCount,byteCount:0,entries:Object.create(null)};let i=a.byteCount;for(let t=0;t<e.ordering.length;t++){const r=e.ordering[t],u=(0,o.d9)(e[r]);if(u.count=a.fields.count??0,"String"===u.valueType){if(u.byteOffset=i,u.byteCount=a.fields[r+"ByteCount"],"UTF-8"!==u.encoding)throw new n.Z("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new n.Z("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!M(u.valueType))throw new n.Z("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const t=O(u.valueType);i+=i%t!=0?t-i%t:0,u.byteOffset=i,u.byteCount=t*u.valuesPerElement*u.count}}i+=u.byteCount??0,s.entries[r]=u}return s.byteCount=i-s.byteOffset,s}function b(t,e,r){if(e!==t&&u.error(`Invalid ${r} buffer size\n expected: ${t}, actual: ${e})`),e<t)throw new n.Z("buffer-too-small","Binary buffer is too small",{expectedSize:t,actualSize:e})}function p(t,e){const r=l(t,e&&e.header);let n=r.byteCount;const o={isDraco:!1,header:r,byteOffset:r.byteCount,byteCount:0,vertexAttributes:{}},a=r.fields,s=null!=a.vertexCount?a.vertexCount:a.count;for(const t of e.ordering){if(!e.vertexAttributes[t])continue;const r={...e.vertexAttributes[t],byteOffset:n,count:s},a=m[t]||"_"+t;o.vertexAttributes[a]=r,n+=O(r.valueType)*r.valuesPerElement*s}const i=a.faceCount;if(e.faces&&i){o.faces={};for(const t of e.ordering){if(!e.faces[t])continue;const r={...e.faces[t],byteOffset:n,count:i};o.faces[t]=r,n+=O(r.valueType)*r.valuesPerElement*i}}const u=a.featureCount;if(e.featureAttributes&&e.featureAttributeOrder&&u){o.featureAttributes={};for(const t of e.featureAttributeOrder){if(!e.featureAttributes[t])continue;const r={...e.featureAttributes[t],byteOffset:n,count:u};o.featureAttributes[t]=r,n+=("UInt64"===r.valueType?8:O(r.valueType))*r.valuesPerElement*u}}return b(n,t.byteLength,"geometry"),o.byteCount=n-o.byteOffset,o}const m={position:i.T.POSITION,normal:i.T.NORMAL,color:i.T.COLOR,uv0:i.T.UV0,region:i.T.UVREGION};function g(t,e,r){if("lepcc-rgb"===t.encoding)return(0,s.IT)(e);if("lepcc-intensity"===t.encoding)return(0,s.ti)(e);if(null!=t.encoding&&""!==t.encoding)throw new n.Z("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");t["attributeByteCounts "]&&!t.attributeByteCounts&&(u.warn("Warning: Trailing space in 'attributeByteCounts '."),t.attributeByteCounts=t["attributeByteCounts "]),"ObjectIds"===t.ordering[0]&&t.hasOwnProperty("objectIds")&&(u.warn("Warning: Case error in objectIds"),t.ordering[0]="objectIds");const o=h(e,t,r);b(o.byteOffset+o.byteCount,e.byteLength,"attribute");const a=o.entries.attributeValues||o.entries.objectIds;if(a){if("String"===a.valueType){const t=o.entries.attributeByteCounts,r=d(e,t),n=function(t,e){return new Uint8Array(t,e.byteOffset,e.byteCount)}(e,a);return a.timeEncoding?function(t,e,r){return f(t,e,r).map((t=>{const e=t?Date.parse(t):null;return e&&!Number.isNaN(e)?e:null}))}(t.count,r,n):f(t.count,r,n)}return d(e,a)}throw new n.Z("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const y={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},w={Float32:(t,e)=>new DataView(t,0).getFloat32(e,!0),Float64:(t,e)=>new DataView(t,0).getFloat64(e,!0),UInt8:(t,e)=>new DataView(t,0).getUint8(e),Int8:(t,e)=>new DataView(t,0).getInt8(e),UInt16:(t,e)=>new DataView(t,0).getUint16(e,!0),Int16:(t,e)=>new DataView(t,0).getInt16(e,!0),UInt32:(t,e)=>new DataView(t,0).getUint32(e,!0),Int32:(t,e)=>new DataView(t,0).getInt32(e,!0)};function M(t){return y.hasOwnProperty(t)}function O(t){return M(t)?y[t].BYTES_PER_ELEMENT:0}},25683:(t,e,r)=>{r.d(e,{Gi:()=>c,IT:()=>b,ti:()=>g});var n=r(20102);const o=!0,a={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function s(t,e,r){return{identifier:String.fromCharCode.apply(null,new Uint8Array(t,r+a.identifierOffset,a.identifierLength)),version:e.getUint16(r+a.versionOffset,o),checksum:e.getUint32(r+a.checksumOffset,o)}}const i={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(t,e){return{sizeLo:t.getUint32(e+i.sizeLo,o),sizeHi:t.getUint32(e+i.sizeHi,o),minX:t.getFloat64(e+i.minX,o),minY:t.getFloat64(e+i.minY,o),minZ:t.getFloat64(e+i.minZ,o),maxX:t.getFloat64(e+i.maxX,o),maxY:t.getFloat64(e+i.maxY,o),maxZ:t.getFloat64(e+i.maxZ,o),errorX:t.getFloat64(e+i.errorX,o),errorY:t.getFloat64(e+i.errorY,o),errorZ:t.getFloat64(e+i.errorZ,o),count:t.getUint32(e+i.count,o),reserved:t.getUint32(e+i.reserved,o)}}function c(t){const e=new DataView(t,0);let r=0;const{identifier:o,version:c}=s(t,e,r);if(r+=a.byteCount,"LEPCC "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(c>1)throw new n.Z("lepcc-decode-error","Unknown version");const f=u(e,r);if(r+=i.byteCount,f.sizeHi*2**32+f.sizeLo!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),h=[],b=[],p=[],m=[];if(r=l(t,r,h),r=l(t,r,b),r=l(t,r,p),r=l(t,r,m),r!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad length");let g=0,y=0;for(let t=0;t<h.length;t++){y+=h[t];let e=0;for(let r=0;r<b[t];r++){e+=p[g];const t=m[g];d[3*g]=Math.min(f.maxX,f.minX+2*f.errorX*e),d[3*g+1]=Math.min(f.maxY,f.minY+2*f.errorY*y),d[3*g+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*t),g++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function l(t,e,r){const n=[];e=f(t,e,n);const o=[];for(let a=0;a<n.length;a++){o.length=0,e=f(t,e,o);for(let t=0;t<o.length;t++)r.push(o[t]+n[a])}return e}function f(t,e,r){const a=new DataView(t,e),s=a.getUint8(0),i=31&s,u=!!(32&s),c=(192&s)>>6;let l=0;if(0===c)l=a.getUint32(1,o),e+=5;else if(1===c)l=a.getUint16(1,o),e+=3;else{if(2!==c)throw new n.Z("lepcc-decode-error","Bad count type");l=a.getUint8(1),e+=2}if(u)throw new n.Z("lepcc-decode-error","LUT not implemented");const f=Math.ceil(l*i/8),d=new Uint8Array(t,e,f);let h=0,b=0,p=0;const m=-1>>>32-i;for(let t=0;t<l;t++){for(;b<i;)h|=d[p]<<b,b+=8,p+=1;r[t]=h&m,h>>>=i,b-=i,b+i>32&&(h|=d[p-1]>>8-b)}return e+p}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function h(t,e){return{sizeLo:t.getUint32(e+d.sizeLo,o),sizeHi:t.getUint32(e+d.sizeHi,o),count:t.getUint32(e+d.count,o),colorMapCount:t.getUint16(e+d.colorMapCount,o),lookupMethod:t.getUint8(e+d.lookupMethod),compressionMethod:t.getUint8(e+d.compressionMethod)}}function b(t){const e=new DataView(t,0);let r=0;const{identifier:o,version:i}=s(t,e,r);if(r+=a.byteCount,"ClusterRGB"!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(i>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=h(e,r);if(r+=d.byteCount,u.sizeHi*2**32+u.sizeLo!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+r!==t.byteLength||u.colorMapCount>256)throw new n.Z("lepcc-decode-error","Bad count");const e=new Uint8Array(t,r,3*u.colorMapCount),o=new Uint8Array(t,r+3*u.colorMapCount,u.count),a=new Uint8Array(3*u.count);for(let t=0;t<u.count;t++){const r=o[t];a[3*t]=e[3*r],a[3*t+1]=e[3*r+1],a[3*t+2]=e[3*r+2]}return a}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+r!==t.byteLength||0!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");return new Uint8Array(t,r).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(r+3!==t.byteLength||1!==u.colorMapCount)throw new n.Z("lepcc-decode-error","Bad count");const o=e.getUint8(r),a=e.getUint8(r+1),s=e.getUint8(r+2),i=new Uint8Array(3*u.count);for(let t=0;t<u.count;t++)i[3*t]=o,i[3*t+1]=a,i[3*t+2]=s;return i}throw new n.Z("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const p={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function m(t,e){return{sizeLo:t.getUint32(e+p.sizeLo,o),sizeHi:t.getUint32(e+p.sizeHi,o),count:t.getUint32(e+p.count,o),scaleFactor:t.getUint16(e+p.scaleFactor,o),bitsPerPoint:t.getUint8(e+p.bitsPerPoint),reserved:t.getUint8(e+p.reserved)}}function g(t){const e=new DataView(t,0);let r=0;const{identifier:o,version:i}=s(t,e,r);if(r+=a.byteCount,"Intensity "!==o)throw new n.Z("lepcc-decode-error","Bad identifier");if(i>1)throw new n.Z("lepcc-decode-error","Unknown version");const u=m(e,r);if(r+=p.byteCount,u.sizeHi*2**32+u.sizeLo!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const c=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+r!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const e=new Uint8Array(t,r,u.count);for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+r!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");const e=new Uint16Array(t,r,u.count);for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}else{const e=[];if(f(t,r,e)!==t.byteLength)throw new n.Z("lepcc-decode-error","Bad size");for(let t=0;t<u.count;t++)c[t]=e[t]*u.scaleFactor}return c}},35065:(t,e,r)=>{var n;r.d(e,{T:()=>n}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.AUXPOS1="auxpos1",t.AUXPOS2="auxpos2",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.SUBDIVISIONFACTOR="subdivisionFactor",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.FEATUREVALUE="featureValue",t.MODELORIGINHI="modelOriginHi",t.MODELORIGINLO="modelOriginLo",t.MODEL="model",t.MODELNORMAL="modelNormal",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.NORMALA="normalA",t.NORMALB="normalB",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.U8PADDING="u8padding",t.U16PADDING="u16padding",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(n||(n={}))}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4565],{52138:(t,e,r)=>{r.d(e,{A:()=>b,a:()=>l,d:()=>m,e:()=>f,f:()=>M,g:()=>v,h:()=>y,i:()=>o,j:()=>I,k:()=>h,m:()=>i,s:()=>s,t:()=>u,w:()=>c,y:()=>S,z:()=>x});var n=r(65617),a=r(46851);function s(t,e,r,n,a,s,o,u,l,i,c,h,f,M,m,b,p){return t[0]=e,t[1]=r,t[2]=n,t[3]=a,t[4]=s,t[5]=o,t[6]=u,t[7]=l,t[8]=i,t[9]=c,t[10]=h,t[11]=f,t[12]=M,t[13]=m,t[14]=b,t[15]=p,t}function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function u(t,e){if(t===e){const r=e[1],n=e[2],a=e[3],s=e[6],o=e[7],u=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=n,t[9]=s,t[11]=e[14],t[12]=a,t[13]=o,t[14]=u}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t}function l(t,e){const r=e[0],n=e[1],a=e[2],s=e[3],o=e[4],u=e[5],l=e[6],i=e[7],c=e[8],h=e[9],f=e[10],M=e[11],m=e[12],b=e[13],p=e[14],d=e[15],v=r*u-n*o,g=r*l-a*o,y=r*i-s*o,I=n*l-a*u,x=n*i-s*u,S=a*i-s*l,R=c*b-h*m,w=c*p-f*m,P=c*d-M*m,U=h*p-f*b,q=h*d-M*b,O=f*d-M*p;let F=v*O-g*q+y*U+I*P-x*w+S*R;return F?(F=1/F,t[0]=(u*O-l*q+i*U)*F,t[1]=(a*q-n*O-s*U)*F,t[2]=(b*S-p*x+d*I)*F,t[3]=(f*x-h*S-M*I)*F,t[4]=(l*P-o*O-i*w)*F,t[5]=(r*O-a*P+s*w)*F,t[6]=(p*y-m*S-d*g)*F,t[7]=(c*S-f*y+M*g)*F,t[8]=(o*q-u*P+i*R)*F,t[9]=(n*P-r*q-s*R)*F,t[10]=(m*x-b*y+d*v)*F,t[11]=(h*y-c*x-M*v)*F,t[12]=(u*w-o*U-l*R)*F,t[13]=(r*U-n*w+a*R)*F,t[14]=(b*g-m*I-p*v)*F,t[15]=(c*I-h*g+f*v)*F,t):null}function i(t,e,r){const n=e[0],a=e[1],s=e[2],o=e[3],u=e[4],l=e[5],i=e[6],c=e[7],h=e[8],f=e[9],M=e[10],m=e[11],b=e[12],p=e[13],d=e[14],v=e[15];let g=r[0],y=r[1],I=r[2],x=r[3];return t[0]=g*n+y*u+I*h+x*b,t[1]=g*a+y*l+I*f+x*p,t[2]=g*s+y*i+I*M+x*d,t[3]=g*o+y*c+I*m+x*v,g=r[4],y=r[5],I=r[6],x=r[7],t[4]=g*n+y*u+I*h+x*b,t[5]=g*a+y*l+I*f+x*p,t[6]=g*s+y*i+I*M+x*d,t[7]=g*o+y*c+I*m+x*v,g=r[8],y=r[9],I=r[10],x=r[11],t[8]=g*n+y*u+I*h+x*b,t[9]=g*a+y*l+I*f+x*p,t[10]=g*s+y*i+I*M+x*d,t[11]=g*o+y*c+I*m+x*v,g=r[12],y=r[13],I=r[14],x=r[15],t[12]=g*n+y*u+I*h+x*b,t[13]=g*a+y*l+I*f+x*p,t[14]=g*s+y*i+I*M+x*d,t[15]=g*o+y*c+I*m+x*v,t}function c(t,e,r){const n=r[0],a=r[1],s=r[2];if(e===t)t[12]=e[0]*n+e[4]*a+e[8]*s+e[12],t[13]=e[1]*n+e[5]*a+e[9]*s+e[13],t[14]=e[2]*n+e[6]*a+e[10]*s+e[14],t[15]=e[3]*n+e[7]*a+e[11]*s+e[15];else{const r=e[0],o=e[1],u=e[2],l=e[3],i=e[4],c=e[5],h=e[6],f=e[7],M=e[8],m=e[9],b=e[10],p=e[11];t[0]=r,t[1]=o,t[2]=u,t[3]=l,t[4]=i,t[5]=c,t[6]=h,t[7]=f,t[8]=M,t[9]=m,t[10]=b,t[11]=p,t[12]=r*n+i*a+M*s+e[12],t[13]=o*n+c*a+m*s+e[13],t[14]=u*n+h*a+b*s+e[14],t[15]=l*n+f*a+p*s+e[15]}return t}function h(t,e,r){const n=r[0],a=r[1],s=r[2];return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*a,t[5]=e[5]*a,t[6]=e[6]*a,t[7]=e[7]*a,t[8]=e[8]*s,t[9]=e[9]*s,t[10]=e[10]*s,t[11]=e[11]*s,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function f(t,e,r,n){let s,o,u,l,i,c,h,f,M,m,b,p,d,v,g,y,I,x,S,R,w,P,U,q,O=n[0],F=n[1],j=n[2],C=Math.sqrt(O*O+F*F+j*j);return C<(0,a.g)()?null:(C=1/C,O*=C,F*=C,j*=C,s=Math.sin(r),o=Math.cos(r),u=1-o,l=e[0],i=e[1],c=e[2],h=e[3],f=e[4],M=e[5],m=e[6],b=e[7],p=e[8],d=e[9],v=e[10],g=e[11],y=O*O*u+o,I=F*O*u+j*s,x=j*O*u-F*s,S=O*F*u-j*s,R=F*F*u+o,w=j*F*u+O*s,P=O*j*u+F*s,U=F*j*u-O*s,q=j*j*u+o,t[0]=l*y+f*I+p*x,t[1]=i*y+M*I+d*x,t[2]=c*y+m*I+v*x,t[3]=h*y+b*I+g*x,t[4]=l*S+f*R+p*w,t[5]=i*S+M*R+d*w,t[6]=c*S+m*R+v*w,t[7]=h*S+b*R+g*w,t[8]=l*P+f*U+p*q,t[9]=i*P+M*U+d*q,t[10]=c*P+m*U+v*q,t[11]=h*P+b*U+g*q,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)}function M(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t}function m(t,e,r){if(0===e)return o(t);let n,s,u,l=r[0],i=r[1],c=r[2],h=Math.sqrt(l*l+i*i+c*c);return h<(0,a.g)()?null:(h=1/h,l*=h,i*=h,c*=h,n=Math.sin(e),s=Math.cos(e),u=1-s,t[0]=l*l*u+s,t[1]=i*l*u+c*n,t[2]=c*l*u-i*n,t[3]=0,t[4]=l*i*u-c*n,t[5]=i*i*u+s,t[6]=c*i*u+l*n,t[7]=0,t[8]=l*c*u+i*n,t[9]=i*c*u-l*n,t[10]=c*c*u+s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)}function b(t,e){const r=Math.sin(e),n=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=n,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function p(t,e,r){const n=e[0],a=e[1],s=e[2],o=e[3],u=n+n,l=a+a,i=s+s,c=n*u,h=n*l,f=n*i,M=a*l,m=a*i,b=s*i,p=o*u,d=o*l,v=o*i;return t[0]=1-(M+b),t[1]=h+v,t[2]=f-d,t[3]=0,t[4]=h-v,t[5]=1-(c+b),t[6]=m+p,t[7]=0,t[8]=f+d,t[9]=m-p,t[10]=1-(c+M),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}const d=(0,n.c)();function v(t,e,r,n){const a=e[0],s=e[1],o=e[2],u=e[3],l=a+a,i=s+s,c=o+o,h=a*l,f=a*i,M=a*c,m=s*i,b=s*c,p=o*c,d=u*l,v=u*i,g=u*c,y=n[0],I=n[1],x=n[2];return t[0]=(1-(m+p))*y,t[1]=(f+g)*y,t[2]=(M-v)*y,t[3]=0,t[4]=(f-g)*I,t[5]=(1-(h+p))*I,t[6]=(b+d)*I,t[7]=0,t[8]=(M+v)*x,t[9]=(b-d)*x,t[10]=(1-(h+m))*x,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}function g(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}function y(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[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]}function I(t,e){if(t===e)return!0;const r=t[0],n=t[1],s=t[2],o=t[3],u=t[4],l=t[5],i=t[6],c=t[7],h=t[8],f=t[9],M=t[10],m=t[11],b=t[12],p=t[13],d=t[14],v=t[15],g=e[0],y=e[1],I=e[2],x=e[3],S=e[4],R=e[5],w=e[6],P=e[7],U=e[8],q=e[9],O=e[10],F=e[11],j=e[12],C=e[13],T=e[14],N=e[15],_=(0,a.g)();return Math.abs(r-g)<=_*Math.max(1,Math.abs(r),Math.abs(g))&&Math.abs(n-y)<=_*Math.max(1,Math.abs(n),Math.abs(y))&&Math.abs(s-I)<=_*Math.max(1,Math.abs(s),Math.abs(I))&&Math.abs(o-x)<=_*Math.max(1,Math.abs(o),Math.abs(x))&&Math.abs(u-S)<=_*Math.max(1,Math.abs(u),Math.abs(S))&&Math.abs(l-R)<=_*Math.max(1,Math.abs(l),Math.abs(R))&&Math.abs(i-w)<=_*Math.max(1,Math.abs(i),Math.abs(w))&&Math.abs(c-P)<=_*Math.max(1,Math.abs(c),Math.abs(P))&&Math.abs(h-U)<=_*Math.max(1,Math.abs(h),Math.abs(U))&&Math.abs(f-q)<=_*Math.max(1,Math.abs(f),Math.abs(q))&&Math.abs(M-O)<=_*Math.max(1,Math.abs(M),Math.abs(O))&&Math.abs(m-F)<=_*Math.max(1,Math.abs(m),Math.abs(F))&&Math.abs(b-j)<=_*Math.max(1,Math.abs(b),Math.abs(j))&&Math.abs(p-C)<=_*Math.max(1,Math.abs(p),Math.abs(C))&&Math.abs(d-T)<=_*Math.max(1,Math.abs(d),Math.abs(T))&&Math.abs(v-N)<=_*Math.max(1,Math.abs(v),Math.abs(N))}function x(t){const e=(0,a.g)(),r=t[0],n=t[1],s=t[2],o=t[4],u=t[5],l=t[6],i=t[8],c=t[9],h=t[10];return Math.abs(1-(r*r+o*o+i*i))<=e&&Math.abs(1-(n*n+u*u+c*c))<=e&&Math.abs(1-(s*s+l*l+h*h))<=e}function S(t){return 1===t[0]&&0===t[1]&&0===t[2]&&0===t[4]&&1===t[5]&&0===t[6]&&0===t[8]&&0===t[9]&&1===t[10]}const R=i,w=g;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t},adjoint:function(t,e){const r=e[0],n=e[1],a=e[2],s=e[3],o=e[4],u=e[5],l=e[6],i=e[7],c=e[8],h=e[9],f=e[10],M=e[11],m=e[12],b=e[13],p=e[14],d=e[15];return t[0]=u*(f*d-M*p)-h*(l*d-i*p)+b*(l*M-i*f),t[1]=-(n*(f*d-M*p)-h*(a*d-s*p)+b*(a*M-s*f)),t[2]=n*(l*d-i*p)-u*(a*d-s*p)+b*(a*i-s*l),t[3]=-(n*(l*M-i*f)-u*(a*M-s*f)+h*(a*i-s*l)),t[4]=-(o*(f*d-M*p)-c*(l*d-i*p)+m*(l*M-i*f)),t[5]=r*(f*d-M*p)-c*(a*d-s*p)+m*(a*M-s*f),t[6]=-(r*(l*d-i*p)-o*(a*d-s*p)+m*(a*i-s*l)),t[7]=r*(l*M-i*f)-o*(a*M-s*f)+c*(a*i-s*l),t[8]=o*(h*d-M*b)-c*(u*d-i*b)+m*(u*M-i*h),t[9]=-(r*(h*d-M*b)-c*(n*d-s*b)+m*(n*M-s*h)),t[10]=r*(u*d-i*b)-o*(n*d-s*b)+m*(n*i-s*u),t[11]=-(r*(u*M-i*h)-o*(n*M-s*h)+c*(n*i-s*u)),t[12]=-(o*(h*p-f*b)-c*(u*p-l*b)+m*(u*f-l*h)),t[13]=r*(h*p-f*b)-c*(n*p-a*b)+m*(n*f-a*h),t[14]=-(r*(u*p-l*b)-o*(n*p-a*b)+m*(n*l-a*u)),t[15]=r*(u*f-l*h)-o*(n*f-a*h)+c*(n*l-a*u),t},copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[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},determinant:function(t){const e=t[0],r=t[1],n=t[2],a=t[3],s=t[4],o=t[5],u=t[6],l=t[7],i=t[8],c=t[9],h=t[10],f=t[11],M=t[12],m=t[13],b=t[14],p=t[15];return(e*o-r*s)*(h*p-f*b)-(e*u-n*s)*(c*p-f*m)+(e*l-a*s)*(c*b-h*m)+(r*u-n*o)*(i*p-f*M)-(r*l-a*o)*(i*b-h*M)+(n*l-a*u)*(i*m-c*M)},equals:I,exactEquals:y,frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2+t[9]**2+t[10]**2+t[11]**2+t[12]**2+t[13]**2+t[14]**2+t[15]**2)},fromQuat:function(t,e){const r=e[0],n=e[1],a=e[2],s=e[3],o=r+r,u=n+n,l=a+a,i=r*o,c=n*o,h=n*u,f=a*o,M=a*u,m=a*l,b=s*o,p=s*u,d=s*l;return t[0]=1-h-m,t[1]=c+d,t[2]=f-p,t[3]=0,t[4]=c-d,t[5]=1-i-m,t[6]=M+b,t[7]=0,t[8]=f+p,t[9]=M-b,t[10]=1-i-h,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromQuat2:function(t,e){const r=d,n=-e[0],a=-e[1],s=-e[2],o=e[3],u=e[4],l=e[5],i=e[6],c=e[7],h=n*n+a*a+s*s+o*o;return h>0?(r[0]=2*(u*o+c*n+l*s-i*a)/h,r[1]=2*(l*o+c*a+i*n-u*s)/h,r[2]=2*(i*o+c*s+u*a-l*n)/h):(r[0]=2*(u*o+c*n+l*s-i*a),r[1]=2*(l*o+c*a+i*n-u*s),r[2]=2*(i*o+c*s+u*a-l*n)),p(t,e,r),t},fromRotation:m,fromRotationTranslation:p,fromRotationTranslationScale:v,fromRotationTranslationScaleOrigin:function(t,e,r,n,a){const s=e[0],o=e[1],u=e[2],l=e[3],i=s+s,c=o+o,h=u+u,f=s*i,M=s*c,m=s*h,b=o*c,p=o*h,d=u*h,v=l*i,g=l*c,y=l*h,I=n[0],x=n[1],S=n[2],R=a[0],w=a[1],P=a[2],U=(1-(b+d))*I,q=(M+y)*I,O=(m-g)*I,F=(M-y)*x,j=(1-(f+d))*x,C=(p+v)*x,T=(m+g)*S,N=(p-v)*S,_=(1-(f+b))*S;return t[0]=U,t[1]=q,t[2]=O,t[3]=0,t[4]=F,t[5]=j,t[6]=C,t[7]=0,t[8]=T,t[9]=N,t[10]=_,t[11]=0,t[12]=r[0]+R-(U*R+F*w+T*P),t[13]=r[1]+w-(q*R+j*w+N*P),t[14]=r[2]+P-(O*R+C*w+_*P),t[15]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromTranslation:M,fromXRotation:b,fromYRotation:function(t,e){const r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=n,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},fromZRotation:function(t,e){const r=Math.sin(e),n=Math.cos(e);return t[0]=n,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=n,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},frustum:function(t,e,r,n,a,s,o){const u=1/(r-e),l=1/(a-n),i=1/(s-o);return t[0]=2*s*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*s*l,t[6]=0,t[7]=0,t[8]=(r+e)*u,t[9]=(a+n)*l,t[10]=(o+s)*i,t[11]=-1,t[12]=0,t[13]=0,t[14]=o*s*2*i,t[15]=0,t},getRotation:function(t,e){const r=e[0]+e[5]+e[10];let n=0;return r>0?(n=2*Math.sqrt(r+1),t[3]=.25*n,t[0]=(e[6]-e[9])/n,t[1]=(e[8]-e[2])/n,t[2]=(e[1]-e[4])/n):e[0]>e[5]&&e[0]>e[10]?(n=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/n,t[0]=.25*n,t[1]=(e[1]+e[4])/n,t[2]=(e[8]+e[2])/n):e[5]>e[10]?(n=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/n,t[0]=(e[1]+e[4])/n,t[1]=.25*n,t[2]=(e[6]+e[9])/n):(n=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/n,t[0]=(e[8]+e[2])/n,t[1]=(e[6]+e[9])/n,t[2]=.25*n),t},getScaling:function(t,e){const r=e[0],n=e[1],a=e[2],s=e[4],o=e[5],u=e[6],l=e[8],i=e[9],c=e[10];return t[0]=Math.sqrt(r*r+n*n+a*a),t[1]=Math.sqrt(s*s+o*o+u*u),t[2]=Math.sqrt(l*l+i*i+c*c),t},getTranslation:function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},hasIdentityRotation:S,identity:o,invert:l,invertOrIdentity:function(t,e){return l(t,e)||o(t),t},isOrthoNormal:x,lookAt:function(t,e,r,n){const s=e[0],u=e[1],l=e[2];let i=s-r[0],c=u-r[1],h=l-r[2];const f=(0,a.g)();if(Math.abs(i)<f&&Math.abs(c)<f&&Math.abs(h)<f)return void o(t);let M=1/Math.sqrt(i*i+c*c+h*h);i*=M,c*=M,h*=M;const m=n[0],b=n[1],p=n[2];let d=b*h-p*c,v=p*i-m*h,g=m*c-b*i;M=Math.sqrt(d*d+v*v+g*g),M?(M=1/M,d*=M,v*=M,g*=M):(d=0,v=0,g=0);let y=c*g-h*v,I=h*d-i*g,x=i*v-c*d;M=Math.sqrt(y*y+I*I+x*x),M?(M=1/M,y*=M,I*=M,x*=M):(y=0,I=0,x=0),t[0]=d,t[1]=y,t[2]=i,t[3]=0,t[4]=v,t[5]=I,t[6]=c,t[7]=0,t[8]=g,t[9]=x,t[10]=h,t[11]=0,t[12]=-(d*s+v*u+g*l),t[13]=-(y*s+I*u+x*l),t[14]=-(i*s+c*u+h*l),t[15]=1},mul:R,multiply:i,multiplyScalar:function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t},multiplyScalarAndAdd:function(t,e,r,n){return t[0]=e[0]+r[0]*n,t[1]=e[1]+r[1]*n,t[2]=e[2]+r[2]*n,t[3]=e[3]+r[3]*n,t[4]=e[4]+r[4]*n,t[5]=e[5]+r[5]*n,t[6]=e[6]+r[6]*n,t[7]=e[7]+r[7]*n,t[8]=e[8]+r[8]*n,t[9]=e[9]+r[9]*n,t[10]=e[10]+r[10]*n,t[11]=e[11]+r[11]*n,t[12]=e[12]+r[12]*n,t[13]=e[13]+r[13]*n,t[14]=e[14]+r[14]*n,t[15]=e[15]+r[15]*n,t},ortho:function(t,e,r,n,a,s,o){const u=1/(e-r),l=1/(n-a),i=1/(s-o);return t[0]=-2*u,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*i,t[11]=0,t[12]=(e+r)*u,t[13]=(a+n)*l,t[14]=(o+s)*i,t[15]=1,t},perspective:function(t,e,r,n,a){const s=1/Math.tan(e/2);let o;return t[0]=s/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=s,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=a&&a!==1/0?(o=1/(n-a),t[10]=(a+n)*o,t[14]=2*a*n*o):(t[10]=-1,t[14]=-2*n),t},perspectiveFromFieldOfView:function(t,e,r,n){const a=Math.tan(e.upDegrees*Math.PI/180),s=Math.tan(e.downDegrees*Math.PI/180),o=Math.tan(e.leftDegrees*Math.PI/180),u=Math.tan(e.rightDegrees*Math.PI/180),l=2/(o+u),i=2/(a+s);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=0,t[7]=0,t[8]=-(o-u)*l*.5,t[9]=(a-s)*i*.5,t[10]=n/(r-n),t[11]=-1,t[12]=0,t[13]=0,t[14]=n*r/(r-n),t[15]=0,t},rotate:f,rotateX:function(t,e,r){const n=Math.sin(r),a=Math.cos(r),s=e[4],o=e[5],u=e[6],l=e[7],i=e[8],c=e[9],h=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=s*a+i*n,t[5]=o*a+c*n,t[6]=u*a+h*n,t[7]=l*a+f*n,t[8]=i*a-s*n,t[9]=c*a-o*n,t[10]=h*a-u*n,t[11]=f*a-l*n,t},rotateY:function(t,e,r){const n=Math.sin(r),a=Math.cos(r),s=e[0],o=e[1],u=e[2],l=e[3],i=e[8],c=e[9],h=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=s*a-i*n,t[1]=o*a-c*n,t[2]=u*a-h*n,t[3]=l*a-f*n,t[8]=s*n+i*a,t[9]=o*n+c*a,t[10]=u*n+h*a,t[11]=l*n+f*a,t},rotateZ:function(t,e,r){const n=Math.sin(r),a=Math.cos(r),s=e[0],o=e[1],u=e[2],l=e[3],i=e[4],c=e[5],h=e[6],f=e[7];return e!==t&&(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[0]=s*a+i*n,t[1]=o*a+c*n,t[2]=u*a+h*n,t[3]=l*a+f*n,t[4]=i*a-s*n,t[5]=c*a-o*n,t[6]=h*a-u*n,t[7]=f*a-l*n,t},scale:h,set:s,str:function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},sub:w,subtract:g,targetTo:function(t,e,r,n){const a=e[0],s=e[1],o=e[2],u=n[0],l=n[1],i=n[2];let c=a-r[0],h=s-r[1],f=o-r[2],M=c*c+h*h+f*f;M>0&&(M=1/Math.sqrt(M),c*=M,h*=M,f*=M);let m=l*f-i*h,b=i*c-u*f,p=u*h-l*c;return M=m*m+b*b+p*p,M>0&&(M=1/Math.sqrt(M),m*=M,b*=M,p*=M),t[0]=m,t[1]=b,t[2]=p,t[3]=0,t[4]=h*p-f*b,t[5]=f*m-c*p,t[6]=c*b-h*m,t[7]=0,t[8]=c,t[9]=h,t[10]=f,t[11]=0,t[12]=a,t[13]=s,t[14]=o,t[15]=1,t},translate:c,transpose:u},Symbol.toStringTag,{value:"Module"}))},25929:(t,e,r)=>{r.d(e,{M:()=>m,a:()=>p,e:()=>f,f:()=>a,i:()=>c,p:()=>h,r:()=>o,t:()=>s,w:()=>u});var n=r(81271);function a(t,e){const r=e&&e.url&&e.url.path;if(t&&r&&(t=(0,n.hF)(t,r,{preserveProtocolRelative:!0}),e.portalItem&&e.readResourcePaths)){const r=(0,n.PF)(t,e.portalItem.itemUrl);null!=r&&i.test(r)&&e.readResourcePaths.push(e.portalItem.resourceFromPath(r).path)}return M(t,e&&e.portal)}function s(t,e,r=m.YES){if(null==t)return t;!(0,n.YP)(t)&&e&&e.blockedRelativeUrls&&e.blockedRelativeUrls.push(t);let a=(0,n.hF)(t);if(e){const r=e.verifyItemRelativeUrls&&e.verifyItemRelativeUrls.rootPath||e.url&&e.url.path;if(r){const s=M(r,e.portal),o=M(a,e.portal);a=(0,n.PF)(o,s,s),null!=a&&a!==o&&a!==t&&e.verifyItemRelativeUrls&&e.verifyItemRelativeUrls.writtenUrls.push(a)}}return a=f(a,e?.portal),(0,n.YP)(a)&&(a=(0,n.Fv)(a)),e?.resources&&e?.portalItem&&!(0,n.YP)(a)&&!(0,n.HK)(a)&&r===m.YES&&e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(a),compress:!1}),a}function o(t,e,r){return a(t,r)}function u(t,e,r,n){const a=s(t,n);void 0!==a&&(e[r]=a)}const l=/\/items\/([^\/]+)\/resources\/(.*)/,i=/^\.\/resources\//;function c(t){const e=t?.match(l)??null;return e?.[1]??null}function h(t){const e=t?.match(l)??null;if(null==e)return null;const r=e[2],a=r.lastIndexOf("/");if(-1===a){const{path:t,extension:e}=(0,n.fZ)(r);return{prefix:null,filename:t,extension:e}}const{path:s,extension:o}=(0,n.fZ)(r.slice(a+1));return{prefix:r.slice(0,a),filename:s,extension:o}}function f(t,e){return e&&!e.isPortal&&e.urlKey&&e.customBaseUrl?(0,n.Ie)(t,`${e.urlKey}.${e.customBaseUrl}`,e.portalHostname):t}function M(t,e){if(!e||e.isPortal||!e.urlKey||!e.customBaseUrl)return t;const r=`${e.urlKey}.${e.customBaseUrl}`,a=(0,n.TI)();return(0,n.D6)(a,`${a.scheme}://${r}`)?(0,n.Ie)(t,e.portalHostname,r):(0,n.Ie)(t,r,e.portalHostname)}var m,b;(b=m||(m={}))[b.YES=0]="YES",b[b.NO=1]="NO";const p=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return m},ensureMainOnlineDomain:f,fromJSON:a,itemIdFromResourceUrl:c,prefixAndFilenameFromResourceUrl:h,read:o,toJSON:s,write:u},Symbol.toStringTag,{value:"Module"}))},66677:(t,e,r)=>{r.d(e,{B5:()=>c,DR:()=>f,G:()=>g,M8:()=>b,Nm:()=>p,Qc:()=>h,XG:()=>d,a7:()=>m,ld:()=>M,wH:()=>v});var n=r(81271),a=r(25929);const s={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(s),u=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),i=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function c(t){return!!u.test(t)}function h(t){if(null==t)return null;const e=(0,n.mN)(t),r=e.path.match(u)||e.path.match(l);if(!r)return null;const[,a,o,i,c]=r,h=o.indexOf("/");return{title:M(-1!==h?o.slice(h+1):o),serverType:s[i.toLowerCase()],sublayer:null!=c&&""!==c?parseInt(c,10):null,url:{path:a}}}function f(t){const e=(0,n.mN)(t).path.match(i);return e?{serviceUrl:e[1],sublayerId:Number(e[2])}:null}function M(t){return(t=t.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+t.slice(1)}function m(t,e){const r=[];if(t){const e=h(t);null!=e&&e.title&&r.push(e.title)}if(e){const t=M(e);r.push(t)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function b(t){if(!t)return!1;const e=(t=t.toLowerCase()).includes(".arcgis.com/"),r=t.includes("//services")||t.includes("//tiles")||t.includes("//features");return e&&r}function p(t,e){return t?(0,n.Qj)((0,n.Hu)(t,e)):t}function d(t){let{url:e}=t;if(!e)return{url:e};e=(0,n.Hu)(e,t.logger);const r=(0,n.mN)(e),a=h(r.path);let s;if(null!=a)null!=a.sublayer&&null==t.layer.layerId&&(s=a.sublayer),e=a.url.path;else if(t.nonStandardUrlAllowed){const t=f(r.path);null!=t&&(e=t.serviceUrl,s=t.sublayerId)}return{url:(0,n.Qj)(e),layerId:s}}function v(t,e,r,s,o){(0,a.w)(e,s,"url",o),s.url&&null!=t.layerId&&(s.url=(0,n.v_)(s.url,r,t.layerId.toString()))}function g(t){if(!t)return!1;const e=t.toLowerCase(),r=e.includes("/services/"),n=e.includes("/mapserver/wmsserver"),a=e.includes("/imageserver/wmsserver"),s=e.includes("/wmsserver");return r&&(n||a||s)}}}]);