@arcgis/core 5.2.0-next.88 → 5.2.0-next.89

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 (129) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/Dictionary.js +1 -1
  3. package/arcade/Pixel.js +1 -1
  4. package/arcade/Voxel.js +1 -1
  5. package/arcade/debug.js +1 -1
  6. package/arcade/functions/featuresetstats.js +1 -1
  7. package/arcade/functions/stats.js +1 -1
  8. package/assets/esri/core/workers/RemoteClient.js +1 -1
  9. package/assets/esri/core/workers/chunks/07613ecf13c38ad58b79.js +1 -0
  10. package/assets/esri/core/workers/chunks/090ea7a131f8f60203ed.js +1 -0
  11. package/assets/esri/core/workers/chunks/159b16f47665f94a0305.js +1 -0
  12. package/assets/esri/core/workers/chunks/15f4f7e34e14e3cf52e6.js +1 -0
  13. package/assets/esri/core/workers/chunks/1bf967c68d0c795d3fb4.js +1 -0
  14. package/assets/esri/core/workers/chunks/{304a36e862947fdb05c0.js → 20f6e681ccd8bf884b77.js} +1 -1
  15. package/assets/esri/core/workers/chunks/23addf8b11938e0c96e9.js +1 -0
  16. package/assets/esri/core/workers/chunks/30d816bdeea00f6fa1ca.js +1 -0
  17. package/assets/esri/core/workers/chunks/{b6f67302d0d5d57add66.js → 31a0620a6028e94c7532.js} +2 -2
  18. package/assets/esri/core/workers/chunks/39b6a5222f45cb8dbc94.js +1 -0
  19. package/assets/esri/core/workers/chunks/3aceedec9abfb2fdfa18.js +1 -0
  20. package/assets/esri/core/workers/chunks/3f82410d9f701e7ad8eb.js +1 -0
  21. package/assets/esri/core/workers/chunks/45858d1c6487f4a98e40.js +1 -0
  22. package/assets/esri/core/workers/chunks/45c1c90ac6c14657f3ff.js +1 -0
  23. package/assets/esri/core/workers/chunks/46f8c7ae7fb356c3410d.js +1 -0
  24. package/assets/esri/core/workers/chunks/486f1a3b7269ce6c3911.js +1 -0
  25. package/assets/esri/core/workers/chunks/4c7264e3f4156f92d613.js +1 -0
  26. package/assets/esri/core/workers/chunks/{a7727a2377470d586ff9.js → 51c9bd7c03d780fadebc.js} +1 -1
  27. package/assets/esri/core/workers/chunks/5bf65dbfd9c7a5ea187d.js +1 -0
  28. package/assets/esri/core/workers/chunks/607acd9f615f87e14075.js +1 -0
  29. package/assets/esri/core/workers/chunks/62ee6c247f783acabb74.js +1 -0
  30. package/assets/esri/core/workers/chunks/680557b8832fbdab7f46.js +1 -0
  31. package/assets/esri/core/workers/chunks/6b84982dfaf084a61b93.js +1 -0
  32. package/assets/esri/core/workers/chunks/777f2fdf1f4b9f243893.js +1 -0
  33. package/assets/esri/core/workers/chunks/{4d4ebb4e4d83c1123b63.js → 7e41cee4a0ae75e1490d.js} +1 -1
  34. package/assets/esri/core/workers/chunks/86c3d3c7015f1cd55fac.js +1 -0
  35. package/assets/esri/core/workers/chunks/87e0ceb1a64ab08e679a.js +1 -0
  36. package/assets/esri/core/workers/chunks/{dceaa6b68eee090073b1.js → 94453d075ce02eff4844.js} +1 -1
  37. package/assets/esri/core/workers/chunks/a176727a1148ca4fb432.js +1 -0
  38. package/assets/esri/core/workers/chunks/a6d4132a16c51323a38a.js +1 -0
  39. package/assets/esri/core/workers/chunks/a7e6382ecc91c876117f.js +1 -0
  40. package/assets/esri/core/workers/chunks/a88bf8ae93077e1b48cf.js +1 -0
  41. package/assets/esri/core/workers/chunks/bd1a7e95a797e1ed4a7b.js +1 -0
  42. package/assets/esri/core/workers/chunks/{70dc25f721c0ac5f3660.js → bdfffa5f88b559a4b42d.js} +1 -1
  43. package/assets/esri/core/workers/chunks/bf11319138facf44752c.js +1 -0
  44. package/assets/esri/core/workers/chunks/{0b7860a3f18d252b774a.js → c23943e51734254d31e8.js} +1 -1
  45. package/assets/esri/core/workers/chunks/c88bfa51d2a8a024fc24.js +1 -0
  46. package/assets/esri/core/workers/chunks/{fc4a5996fc03f6c32030.js → d58d6b55b2749a535eb3.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{60f490afdbe299f89669.js → d871572997600930e017.js} +1 -1
  48. package/assets/esri/core/workers/chunks/e50adcfb392adfb3f79c.js +1 -0
  49. package/assets/esri/core/workers/chunks/eda04911553cf99fb99b.js +1 -0
  50. package/assets/esri/core/workers/chunks/f3716ce04d09af31cfb1.js +1 -0
  51. package/assets/esri/core/workers/chunks/f3e53be08ab9dbdf17ae.js +1 -0
  52. package/assets/esri/core/workers/chunks/{9eb3e6800f5034f1593f.js → f83c3597e9332bd991eb.js} +1 -1
  53. package/assets/esri/core/workers/chunks/f8a6d8cdcabcd1d511b6.js +1 -0
  54. package/chunks/array.js +1 -1
  55. package/chunks/boundedPlane.js +1 -1
  56. package/chunks/cameraUtilsSpherical.js +1 -1
  57. package/config.js +1 -1
  58. package/core/accessorSupport/Property.js +1 -1
  59. package/geometry/operators/support/projectionTransformation.js +1 -1
  60. package/geometry/support/convexPolyhedron.js +1 -1
  61. package/geometry/support/frustum.js +1 -1
  62. package/geometry/support/plane.js +1 -1
  63. package/kernel.js +1 -1
  64. package/layers/graphics/data/FlatFeatureStore.js +1 -1
  65. package/layers/graphics/data/QueryEngine.js +1 -1
  66. package/package.json +3 -3
  67. package/support/revision.js +1 -1
  68. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  69. package/views/2d/engine/webgl/util/Fader.js +1 -1
  70. package/views/3d/layers/I3SMeshView3D.js +1 -1
  71. package/views/3d/layers/IntegratedMeshNormals.js +1 -1
  72. package/views/3d/layers/i3s/SweptSphereVolume.js +1 -1
  73. package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
  74. package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
  75. package/views/3d/state/Frustum.js +1 -1
  76. package/views/3d/support/sphericalTileUtils.js +1 -1
  77. package/views/3d/webgl-engine/lib/Geometry.js +1 -1
  78. package/views/3d/webgl-engine/lib/LineMaterial.js +2 -0
  79. package/views/3d/webgl-engine/lib/Material.js +1 -1
  80. package/views/3d/webgl-engine/lib/PointMaterial.js +2 -0
  81. package/views/3d/webgl-engine/lib/RenderGeometry.js +1 -1
  82. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  83. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  84. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  85. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  86. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  87. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  88. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  89. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  90. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  91. package/views/interactive/sketch/constraints.js +1 -1
  92. package/views/popupAdapter.js +1 -1
  93. package/views/support/geometry3dUtils.js +1 -1
  94. package/widgets/FeatureTable/support/types.d.ts +3 -1
  95. package/assets/esri/core/workers/chunks/0439d4f4dfd6e78be97e.js +0 -1
  96. package/assets/esri/core/workers/chunks/12a3b55195ce3244259d.js +0 -1
  97. package/assets/esri/core/workers/chunks/19aa4072764937743bd8.js +0 -1
  98. package/assets/esri/core/workers/chunks/2724900f7992a79fc442.js +0 -1
  99. package/assets/esri/core/workers/chunks/35d3e60d15294f268992.js +0 -1
  100. package/assets/esri/core/workers/chunks/37a2be4380796f14fe4e.js +0 -1
  101. package/assets/esri/core/workers/chunks/414093fa4957d17bf551.js +0 -1
  102. package/assets/esri/core/workers/chunks/466bb1b69aabaeabad6a.js +0 -1
  103. package/assets/esri/core/workers/chunks/47e60b2acec18ef37b6c.js +0 -1
  104. package/assets/esri/core/workers/chunks/4849849fc8330d05a8e6.js +0 -1
  105. package/assets/esri/core/workers/chunks/4f0804429d8989aa4c51.js +0 -1
  106. package/assets/esri/core/workers/chunks/55572cefc752b755cf0a.js +0 -1
  107. package/assets/esri/core/workers/chunks/59cf23cc8f91b5bea31a.js +0 -1
  108. package/assets/esri/core/workers/chunks/6a4f007f87d9f2a6fbc4.js +0 -1
  109. package/assets/esri/core/workers/chunks/7c1f989ee3d13dfe7ebd.js +0 -1
  110. package/assets/esri/core/workers/chunks/7ce9c84f90e9dd1deb38.js +0 -1
  111. package/assets/esri/core/workers/chunks/7fc3231768ce79e375ae.js +0 -1
  112. package/assets/esri/core/workers/chunks/7febb434f2de2436435f.js +0 -1
  113. package/assets/esri/core/workers/chunks/909a85cb6e0e9a3c8567.js +0 -1
  114. package/assets/esri/core/workers/chunks/922c24b9bb68f4201b03.js +0 -1
  115. package/assets/esri/core/workers/chunks/9407db0584c730591161.js +0 -1
  116. package/assets/esri/core/workers/chunks/a0300fac6a06e7d89a52.js +0 -1
  117. package/assets/esri/core/workers/chunks/ab9927a32350063cb5f0.js +0 -1
  118. package/assets/esri/core/workers/chunks/adc2620cbe735532004d.js +0 -1
  119. package/assets/esri/core/workers/chunks/c4f582dec07895d3bb93.js +0 -1
  120. package/assets/esri/core/workers/chunks/cd8b3c2fc27c239f9954.js +0 -1
  121. package/assets/esri/core/workers/chunks/d04a01dc1b4947478264.js +0 -1
  122. package/assets/esri/core/workers/chunks/d6b87134e0d120c68d2f.js +0 -1
  123. package/assets/esri/core/workers/chunks/db4c9a9103e979292948.js +0 -1
  124. package/assets/esri/core/workers/chunks/e32a14770e036fce79d9.js +0 -1
  125. package/assets/esri/core/workers/chunks/eacf216dcd6397c7bd7f.js +0 -1
  126. package/assets/esri/core/workers/chunks/eff359210893239ecec3.js +0 -1
  127. package/assets/esri/core/workers/chunks/f210cd8afb86b6eaf7a2.js +0 -1
  128. package/assets/esri/core/workers/chunks/f250a7aa571889c5ad4b.js +0 -1
  129. package/assets/esri/core/workers/chunks/f31330d628d7e741bf5b.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[903,1560],{52106(e,t,r){r.d(t,{A:()=>M});var i,o,s=r(32198),n=r(37838),l=r(69540),a=r(51447),u=r(25482),p=r(53966),c=r(36708),d=r(24326),y=r(91429),h=r(12195),g=r(65864),m=r(50498),f=r(55156),v=r(60950),b=r(54339),w=r(94128),C=r(33910);const S=Symbol("meshGeometryHandles");function x(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends((0,l.OU)(u.o)){static{i=w.Z}static{o=this}constructor(e){super(e),this[i]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(p.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new o({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,v.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,f.I)(this.origin);if(e)return(0,b.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){const e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){const e={aggregateGeometries:x(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const o={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(o.action=i),"attributes"===e&&(o.attributeName=i),this.layer.graphicChanged(o)}_watchMeshGeometryChanges(){this.removeHandles(S);const e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],S)}};(0,s.Cg)([(0,y.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,g.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,s.Cg)([(0,y.MZ)({value:null})],M.prototype,"attributes",null),(0,s.Cg)([(0,y.MZ)({value:null,types:m.yR,json:{read:g.rS}})],M.prototype,"geometry",null),(0,s.Cg)([(0,y.MZ)()],M.prototype,"distance",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,s.Cg)([(0,y.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,s.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,s.Cg)([(0,y.MZ)({type:n.A,value:null})],M.prototype,"popupTemplate",null),(0,s.Cg)([(0,y.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,s.Cg)([(0,y.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],M.prototype,"statisticsAggregatedIds",void 0),(0,s.Cg)([(0,y.MZ)({value:null,types:C.Es})],M.prototype,"symbol",null),(0,s.Cg)([(0,y.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,s.Cg)([(0,y.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=o=(0,s.Cg)([(0,y.$K)("esri.Graphic")],M)},19334(e,t,r){r.d(t,{e:()=>n});var i=r(54639),o=r(14112);class s{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function n(e){if(null==e)return null;switch(e.type){case"point":if((0,o.e6)(e))return null;break;case"polygon":if((0,o.Wq)(e))return null;break;case"polyline":if((0,o.IY)(e))return null;break;case"multipoint":if((0,o.DG)(e))return null;break;case"extent":if((0,o.As)(e))return null;break;default:return null}const t=i.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new s(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>u,p:()=>p});var i=r(54639),o=r(14112),s=r(16930),n=r(60408),l=r(65864);class a{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){const t=(0,l.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function u(e,t){if(null==e||"object"!=typeof e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof s.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new s.A,r.read(e.spatialReference))),null==r)throw new Error("Spatial reference required");return(0,n.fT)(e)?p("point",e,r):(0,n.Rg)(e)?p("polyline",e,r):(0,n.Bi)(e)?p("polygon",e,r):(0,n.U9)(e)?p("multipoint",e,r):(0,n.ZC)(e)?p("extent",e,r):null}function p(e,t,r){if(null==t)return null;let s=!1,n=!1;switch(e){case"point":if((0,o.e6)(t))return null;s=void 0!==t.z,n=void 0!==t.m;break;case"polygon":if((0,o.Wq)(t))return null;s=!0===t.hasZ,n=!0===t.hasM;break;case"polyline":if((0,o.IY)(t))return null;s=!0===t.hasZ,n=!0===t.hasM;break;case"multipoint":if((0,o.DG)(t))return null;s=!0===t.hasZ,n=!0===t.hasM;break;case"extent":if((0,o.As)(t))return null;s=null!=t.zmin&&null!=t.zmax,n=null!=t.mmin&&null!=t.mmax;break;default:throw new Error("Unsupported geometry type: "+t.type)}return i.R.of(e,r,s,n,new a(t))}},14112(e,t,r){function i(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function o(e){if(0===(e.curveRings??e.rings).length)return!0;for(const t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function s(e){if(0===(e.curvePaths??e.paths).length)return!0;for(const t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function n(e){return 0===e.points.length}function l(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>l,DG:()=>n,IY:()=>s,Wq:()=>o,e6:()=>i})},6797(e,t,r){r.d(t,{Ui:()=>d});var i=r(69622),o=r(7762),s=r(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof i.A}function a(e){return e instanceof o.A?Object.keys(e.items):l(e)?(0,s.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof o.A?e.items[t]:e[t]}function p(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=a(e),o=a(t);if(0===i.length&&0===o.length)return;if(!i.length||!o.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const s=o.filter(e=>!i.includes(e)),d=i.filter(e=>!o.includes(e)),y=i.filter(r=>o.includes(r)&&u(e,r)!==u(t,r)).concat(s,d).sort(),h=p(e);if(h&&n.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let g;const m=l(e)&&l(t);for(const i of y){const o=u(e,i),s=u(t,i);let n;if((m||"function"!=typeof o&&"function"!=typeof s)&&o!==s&&(null!=o||null!=s)){if(r&&r[i]&&"function"==typeof r[i])n=r[i]?.(o,s);else if(o instanceof Date&&s instanceof Date){if(o.getTime()===s.getTime())continue;n={type:"complete",oldValue:o,newValue:s}}else n="object"==typeof o&&"object"==typeof s&&p(o)===p(s)?c(o,s):{type:"complete",oldValue:o,newValue:s};null!=n&&(null!=g?g.diff[i]=n:g={type:"partial",diff:{[i]:n}})}}return g}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&p(e)!==p(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},83027(e,t,r){const i=r(29953).ho;r.d(t,["h",0,i])},55156(e,t,r){r.d(t,{I:()=>o});const i=Symbol("idFieldsProviderSymbol");function o(e){return(t=e)&&i in t?e[i]:void 0;var t}r.d(t,["e",0,i])},15481(e,t,r){r.r(t),r.d(t,{default:()=>ie});var i=r(32198),o=r(37838),s=r(25728),n=r(17676),l=r(84952),a=r(91429),u=r(5443),p=r(16930),c=r(50498),d=r(55156),y=r(60950),h=r(89808),g=r(99959);const m=Symbol("isGeoJSONGraphicOrigin");var f;class v extends g.A{get[(f=m,y.ym)](){return this.layer}get[d.e](){return this.layer}get[h.Q](){return this.layer}constructor(e){super(),this[f]=!0,this.type="geojson",this.layer=e}get id(){return this.layer.id}}var b=r(4146),w=r(49186),C=r(44208),S=r(92474),x=r(53966),M=r(83027),I=r(39829),A=r(64714),E=r(22671);let T=class extends S.x_{constructor(){super(...arguments),this.type="geojson",this.refresh=(0,n.sg)(async e=>{await this.load();const{extent:t,timeExtent:r}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,r&&(this.sourceJSON.timeInfo.timeExtent=[r.start,r.end]),{dataChanged:!0,updates:{extent:this.sourceJSON.extent,timeInfo:this.sourceJSON.timeInfo}}})}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this._startWorker(t)),Promise.resolve(this)}destroy(){this._connection?.close(),this._connection=null}applyEdits(e){return this.load().then(()=>this._applyEdits(e))}openPorts(){return this.load().then(()=>this._connection.openPorts())}queryFeatures(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t)).then(e=>E.A.fromJSON(e))}queryFeaturesJSON(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatures",e?e.toJSON():null,t))}queryFeatureCount(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t))}queryObjectIds(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryObjectIds",e?e.toJSON():null,t))}queryExtent(e,t={}){return this.load(t).then(()=>this._connection.invoke("queryExtent",e?e.toJSON():null,t)).then(e=>({count:e.count,extent:u.A.fromJSON(e.extent)}))}querySnapping(e,t={}){return this.load(t).then(()=>this._connection.invoke("querySnapping",e,t))}async queryAttributeBins(e,t={}){return await this.load(),this._connection.invoke("queryAttributeBins",e?.toJSON(),t)}_applyEdits(e){if(!this._connection)throw new w.A("geojson-layer-source:edit-failure","Memory source not loaded");const t=this.layer.objectIdField,r=[],i=[],o=[];if(e.addFeatures)for(const t of e.addFeatures)r.push(this._serializeFeature(t));if(e.deleteFeatures)for(const r of e.deleteFeatures)"objectId"in r&&null!=r.objectId?i.push(r.objectId):"attributes"in r&&null!=r.attributes[t]&&i.push(r.attributes[t]);if(e.updateFeatures)for(const t of e.updateFeatures)o.push(this._serializeFeature(t));return this._connection.invoke("applyEdits",{adds:r,updates:o,deletes:i}).then(({extent:e,timeExtent:t,featureEditResults:r})=>(this.sourceJSON.extent=e,t&&(this.sourceJSON.timeInfo.timeExtent=[t.start,t.end]),this._createEditsResult(r)))}_createEditsResult(e){return{addFeatureResults:e.addResults?e.addResults.map(this._createFeatureEditResult,this):[],updateFeatureResults:e.updateResults?e.updateResults.map(this._createFeatureEditResult,this):[],deleteFeatureResults:e.deleteResults?e.deleteResults.map(this._createFeatureEditResult,this):[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}_createFeatureEditResult(e){const t=!0===e.success?null:e.error||{code:void 0,description:""};return{objectId:e.objectId,globalId:e.globalId,error:t?new w.A("geojson-layer-source:edit-failure",t.description,{code:t.code}):null}}_serializeFeature(e){const{attributes:t}=e,r=this._geometryForSerialization(e);return r?{geometry:r.toJSON(),attributes:t}:{attributes:t}}_geometryForSerialization(e){const{geometry:t}=e;return null==t?null:"mesh"===t.type||"extent"===t.type?I.A.fromExtent(t.extent):t}async _startWorker(e){this._connection=await(0,M.h)("GeoJSONSourceWorker",{strategy:(0,C.A)("feature-layers-workers")?"dedicated":"local",signal:e,registryTarget:this});const{fields:t,spatialReference:r,hasZ:i,geometryType:o,objectIdField:s,url:n,timeInfo:l,customParameters:a}=this.layer,u="defaults"===this.layer.originOf("spatialReference"),p={url:n,customParameters:a,fields:t&&t.map(e=>e.toJSON()),geometryType:c.gy.toJSON(o),hasZ:i,objectIdField:s,timeInfo:l?l.toJSON():null,spatialReference:u?null:r&&r.toJSON()},d=await this._connection.invoke("load",p,{signal:e});for(const e of d.warnings)x.A.getLogger(this.layer).warn("#load()",`${e.message} (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{warning:e});d.featureErrors.length&&x.A.getLogger(this.layer).warn("#load()",`Encountered ${d.featureErrors.length} validation errors while loading features. (title: '${this.layer.title||"no title"}', id: '${this.layer.id??"no id"}')`,{errors:d.featureErrors}),this.sourceJSON=d.layerDefinition,this.capabilities=(0,A.f)(this.sourceJSON.hasZ,!0)}};(0,i.Cg)([(0,a.MZ)()],T.prototype,"capabilities",void 0),(0,i.Cg)([(0,a.MZ)()],T.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)({constructOnly:!0})],T.prototype,"layer",void 0),(0,i.Cg)([(0,a.MZ)()],T.prototype,"sourceJSON",void 0),T=(0,i.Cg)([(0,a.$K)("esri.layers.graphics.sources.GeoJSONSource")],T);var P=r(63074),F=r(69208),O=r(6455),Z=r(87718),L=r(56658),_=r(34287),j=r(32756),N=r(8303),R=r(54310),G=r(25036),D=r(82935),J=r(63396),z=r(10873),B=r(15426),k=r(29005),U=r(20437),$=r(17036),q=r(30524),V=r(46499),K=r(39383),H=r(41214),Q=r(97552),W=r(30291),Y=r(79677),X=r(10184),ee=r(56400);const te=(0,$.p)();let re=class extends((0,j.fY)((0,O.FJ)((0,F.d)((0,L.J)((0,Z.F)((0,P.dM)((0,D.e)((0,J.d)((0,G.j)((0,R.J)((0,_.q)((0,N.A)((0,s.M)(b.A)))))))))))))){constructor(e){super(e),this.attributeTableTemplate=null,this.copyright=null,this.dateFieldsTimeZone=null,this.definitionExpression=null,this.displayField=null,this.editingEnabled=!1,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.graphicOrigin=new v(this),this.hasZ=void 0,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="GeoJSON",this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new T({layer:this}),this.spatialReference=p.A.WGS84,this.templates=null,this.title="GeoJSON",this.type="geojson"}destroy(){this.source?.destroy()}load(e){const t=this.loadFromPortal({supportedTypes:["GeoJson"],supportsData:!1},e).catch(n.QP).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),["objectIdField","fields","timeInfo"].forEach(e=>this.revertToOrigin(e,"service")),(0,q.yp)(this.renderer,this.fieldsIndex),(0,q.sv)(this.timeInfo,this.fieldsIndex)});return this.addResolvingPromise(t),Promise.resolve(this)}get portalItem(){return super.portalItem}set portalItem(e){super.portalItem=e}get timeInfo(){return super.timeInfo}set timeInfo(e){super.timeInfo=e}get capabilities(){return this.source?this.source.capabilities:null}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}get isTable(){return this.loaded&&null==this.geometryType}get parsedUrl(){return(0,l.An)(this.url)}set renderer(e){(0,q.yp)(e,this.fieldsIndex),this._set("renderer",e)}set url(e){if(!e)return void this._set("url",e);const t=(0,l.An)(e);this._set("url",t.path),t.query&&(this.customParameters={...this.customParameters,...t.query})}async applyEdits(e,t){const{applyEdits:i}=await r.e(8628).then(r.bind(r,78628));await this.load();const o=await i(this,this.source,e,t);return this.read({extent:this.source.sourceJSON.extent,timeInfo:this.source.sourceJSON.timeInfo},{origin:"service",ignoreDefaults:!0}),o}createPopupTemplate(e){return(0,W.tn)(this,e)}createQuery(){const e=new Q.A,t=this.capabilities?.data;e.returnGeometry=!0,t&&t.supportsZ&&(e.returnZ=!0),e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:r,timeExtent:i}=this;return e.timeExtent=null!=r&&null!=i?i.offset(-r.value,r.unit):i||null,e}getFieldDomain(e,t){return this.getField(e)?.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(Q.A.from(e)||this.createQuery(),t)).then(e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(Q.A.from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(Q.A.from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(Q.A.from(e)||this.createQuery(),t))}async queryAttributeBins(e,t){const{source:i,capabilities:o}=await this.load();(0,B.ZJ)(e,o,"GeoJSONLayer");const s=await r.e(4575).then(r.bind(r,14575)),n=await i.queryAttributeBins(s.default.from(e),t);if(n.features)for(const e of n.features)e.layer=e.sourceLayer=this;return n}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return null!=t&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};(0,i.Cg)([(0,a.MZ)({type:Y.A})],re.prototype,"timeExtent",void 0),(0,i.Cg)([(0,a.MZ)({type:X.A})],re.prototype,"timeOffset",void 0),(0,i.Cg)([(0,a.MZ)(z.zQ)],re.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1,write:!1}})],re.prototype,"capabilities",null),(0,i.Cg)([(0,a.MZ)({type:String})],re.prototype,"copyright",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],re.prototype,"createQueryVersion",null),(0,i.Cg)([(0,a.MZ)((0,ee.P6)("dateFieldsTimeReference"))],re.prototype,"dateFieldsTimeZone",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],re.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],re.prototype,"definitionExpression",void 0),(0,i.Cg)([(0,a.MZ)({type:String})],re.prototype,"displayField",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],re.prototype,"editingEnabled",void 0),(0,i.Cg)([(0,a.MZ)(z.Yj)],re.prototype,"elevationInfo",void 0),(0,i.Cg)([(0,a.MZ)({type:[U.A],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],re.prototype,"fields",void 0),(0,i.Cg)([(0,a.MZ)(te.fieldsIndex)],re.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,a.MZ)({type:u.A,json:{name:"extent"}})],re.prototype,"fullExtent",void 0),(0,i.Cg)([(0,a.MZ)({type:["point","polygon","polyline","multipoint"],json:{read:{reader:c.gy.read}}})],re.prototype,"geometryType",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0,clonable:!1})],re.prototype,"graphicOrigin",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],re.prototype,"hasZ",void 0),(0,i.Cg)([(0,a.MZ)(z.id)],re.prototype,"id",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean,readOnly:!0})],re.prototype,"isTable",null),(0,i.Cg)([(0,a.MZ)(z.kF)],re.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,a.MZ)({type:[V.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:K.w},write:!0}})],re.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,a.MZ)(z.fV)],re.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:["show","hide"]})],re.prototype,"listMode",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.objectIdField",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"objectIdField"}}}})],re.prototype,"objectIdField",void 0),(0,i.Cg)([(0,a.MZ)(z.ke)],re.prototype,"opacity",void 0),(0,i.Cg)([(0,a.MZ)({type:["GeoJSON"]})],re.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,a.MZ)(te.outFields)],re.prototype,"outFields",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],re.prototype,"parsedUrl",null),(0,i.Cg)([(0,a.MZ)(z.M6)],re.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,a.MZ)({type:o.A,json:{name:"popupInfo",write:!0}})],re.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,a.MZ)({types:H.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:!0,origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:H.XJ}}}})],re.prototype,"renderer",null),(0,i.Cg)([(0,a.MZ)(z.PY)],re.prototype,"screenSizePerspectiveEnabled",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],re.prototype,"source",void 0),(0,i.Cg)([(0,a.MZ)({type:p.A})],re.prototype,"spatialReference",void 0),(0,i.Cg)([(0,a.MZ)({type:[k.A]})],re.prototype,"templates",void 0),(0,i.Cg)([(0,a.MZ)()],re.prototype,"title",void 0),(0,i.Cg)([(0,a.MZ)({json:{read:!1},readOnly:!0})],re.prototype,"type",void 0),(0,i.Cg)([(0,a.MZ)(z.OZ)],re.prototype,"url",null),re=(0,i.Cg)([(0,a.$K)("esri.layers.GeoJSONLayer")],re);const ie=re},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},64714(e,t,r){r.d(t,{F0:()=>l,Vx:()=>p,e2:()=>d,f:()=>y});var i=r(44208),o=r(4718),s=r(99352),n=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.Cb:"esriGeometryPolyline"===e?n.yM:n.WR}}}const a=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function p(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${c(t)} = null;`);for(const t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new i}catch(r){return()=>t?{[t]:null,...e}:{...e}}}function c(e){return a.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function d(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,o.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:s.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},69208(e,t,r){var i=r(32198),o=r(91429);r.d(t,["d",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,o.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.CustomParametersMixin")],r),r}])},6455(e,t,r){r.d(t,{FJ:()=>f,Dp:()=>v,KV:()=>b});var i=r(32198),o=r(93637),s=r(91429),n=r(89317),l=r(69540),a=r(7762),u=r(25482),p=r(83960),c=r(13069);const d={write:{overridePolicy:(e,t,r)=>({enabled:!r||"scale"===r.filterMode})}};let y=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.id=(0,c.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"id",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:d})],y.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,json:d})],y.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"title",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],y.prototype,"where",void 0),y=(0,i.Cg)([(0,s.$K)("esri.layers.support.DisplayFilter")],y);var h=r(41560),g=r(43937);let m=class extends((0,l.OU)(u.o)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(a.A.ofType(y)),this.mode="manual"}writeFilters(e,t,r,i){const o=e.toArray();"scale"===this.mode&&o.sort((e,t)=>{const r=(0,p.oW)(t.minScale,e.minScale),i=e.maxScale-t.maxScale;return 0===r?i:r}),t[r]=o.map(e=>e.toJSON(i))}write(e,t){return super.write(e,(0,h.mW)(this,t))}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{overridePolicy:(e,t,r)=>({enabled:"manual"===r.filterMode,isRequired:!0})}}})],m.prototype,"activeFilterId",void 0),(0,i.Cg)([(0,s.MZ)({type:a.A.ofType(y),nonNullable:!0,json:{write:!0}})],m.prototype,"filters",void 0),(0,i.Cg)([(0,g.K)("filters")],m.prototype,"writeFilters",null),(0,i.Cg)([(0,s.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],m.prototype,"mode",void 0),m=(0,i.Cg)([(0,s.$K)("esri.layers.support.DisplayFilterInfo")],m);const f=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,i.Cg)([(0,s.MZ)(v)],r.prototype,"displayFilterEnabled",void 0),(0,i.Cg)([(0,s.MZ)(b)],r.prototype,"displayFilterInfo",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.DisplayFilteredLayer")],r),r},v={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:n.K,writer(e,t,r){(0,o.sM)(r,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},b={type:m,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:n.K},origins:{"web-scene":{write:!1,read:!1}}}}},32756(e,t,r){r.d(t,{Rr:()=>l});var i=r(32198),o=r(93637),s=r(91429),n=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const o=new n.A;return o.read(i,r),[o]}const a={type:[n.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const s=e.find(e=>!!e.field);s&&(0,o.sM)(r,[s.toJSON()],t)}}}};r.d(t,["fY",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,s.MZ)(a)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.OrderedLayer")],r),r},"ne",0,a])},8303(e,t,r){var i=r(32198),o=r(92602),s=r(70333),n=r(11254),l=r(60999),a=r(49186),u=r(36563),p=r(53966),c=r(97768),d=r(17676),y=r(84952),h=r(91429),g=r(77548),m=r(20655),f=r(80812),v=r(41318),b=r(10407),w=r(36005),C=r(43937);const S={credential:null,user:null};r.d(t,["A",0,e=>{const t=e;let x=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){super.destroy(),this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new f.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await r.e(1204).then(r.bind(r,41204));return(0,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async reloadFromPortal(e){if(!this.loaded||!this.portalItem?.id)return!1;try{const{reload:t}=await r.e(1204).then(r.bind(r,41204)),i=new AbortController,o=(0,u.rE)(i);return this.addHandles(o,"reloadFromPortal"),await t({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},{signal:i.signal})}catch(e){throw(0,d.zf)(e)||p.A.getLogger(this).warn(`Failed to reload layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}finally{this.removeHandles("reloadFromPortal")}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,d.QP)(e),!0)))}async setUserPrivileges(e,t){if(!o.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:o}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",o)}catch(e){(0,d.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),o=e===r.id;if(o&&r.portal.user)return this._getUserPrivileges(r,i);let n,l;if(o)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,y.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;l=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,u=!1,p=!1;if(!l)return{features:{edit:a,fullEdit:u},content:{updateItem:p}};try{if(o?await r.reload():(r=new f.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:p}}}_getUserPrivileges(e,t){const r=(0,b.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,o=m.A.getDefault();if(o&&o.loaded&&(0,y.S8)(o.restUrl)===(0,y.S8)(i))return o.user;const a=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,l.Ke)((0,n.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?v.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return r&&i&&!(0,y.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i.Cg)([(0,h.MZ)({type:f.default})],x.prototype,"portalItem",null),(0,i.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],x.prototype,"readPortalItem",null),(0,i.Cg)([(0,C.K)("web-document","portalItem",{itemId:{type:String}})],x.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],x.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],x.prototype,"userHasUpdateItemPrivileges",void 0),x=(0,i.Cg)([(0,h.$K)("esri.layers.mixins.PortalLayer")],x),x}])},82935(e,t,r){var i=r(32198),o=r(91429),s=r(89317),n=r(30524),l=r(96184),a=r(73133),u=r(79677),p=r(10184),c=r(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:s.K}}};r.d(t,["B",0,d,"e",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,o=a.j.fromJSON(r.timeOffsetUnits);return i&&o?new p.A({value:i,unit:o}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,n.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i.Cg)([(0,o.MZ)({type:u.A,json:{write:!1}})],r.prototype,"timeExtent",void 0),(0,i.Cg)([(0,o.MZ)({type:p.A})],r.prototype,"timeOffset",void 0),(0,i.Cg)([(0,c.w)("service","timeOffset",["timeInfo.exportOptions"])],r.prototype,"readOffset",null),(0,i.Cg)([(0,o.MZ)({value:null,type:l.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],r.prototype,"timeInfo",null),(0,i.Cg)([(0,o.MZ)(d)],r.prototype,"useViewTime",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.TemporalLayer")],r),r}])},63396(e,t,r){r.d(t,{d:()=>S});var i=r(32198),o=r(91429),s=r(60950),n=r(99959);class l extends n.A{constructor(e){super(),this.type="track",this.trackInfoProvider=e}get id(){return this.trackInfoProvider.id}get[s.ym](){return this.trackInfoProvider.trackInfo}}var a=r(37838),u=r(69540),p=r(25482),c=r(93637),d=r(50820),y=r(10873),h=r(46499),g=r(41214);let m=class extends((0,u.OU)(p.o)){constructor(e){super(e),this.labelingInfo=null,this.labelsVisible=!0,this.renderer=null,this.visible=!0}};(0,i.Cg)([(0,o.MZ)({type:[h.A],json:{write:!0}})],m.prototype,"labelingInfo",void 0),(0,i.Cg)([(0,o.MZ)(y.kF)],m.prototype,"labelsVisible",void 0),(0,i.Cg)([(0,o.MZ)({types:g.Hg,json:{write:!0}})],m.prototype,"renderer",void 0),(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"visible",void 0),m=(0,i.Cg)([(0,o.$K)("esri.layers.support.TrackPartInfo")],m);var f=r(96576),v=r(59868),b=r(10184),w=r(43937);let C=class extends((0,u.OU)(p.o)){constructor(e){super(e),this.enabled=!0,this.fields=[],this.latestObservations=new m({renderer:new f.A({symbol:v.UK.clone()})}),this.maxDisplayDuration=null,this.maxDisplayObservationsPerTrack=0,this.popupEnabled=!0,this.popupTemplate=null,this.previousObservations=new m({renderer:new f.A({symbol:v.UK.clone()})}),this.trackLines=new m({renderer:new f.A({symbol:v.A7.clone()})}),this.timeField="startTimeField"}writeFields(e,t,r){const i=e.filter(e=>"avg_angle"!==e.statisticType).map(e=>e.toJSON());(0,c.sM)(r,i,t)}};(0,i.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"enabled",void 0),(0,i.Cg)([(0,o.MZ)({type:[d.A],json:{write:!0}})],C.prototype,"fields",void 0),(0,i.Cg)([(0,w.K)("fields")],C.prototype,"writeFields",null),(0,i.Cg)([(0,o.MZ)({type:m,json:{write:!0}})],C.prototype,"latestObservations",void 0),(0,i.Cg)([(0,o.MZ)({type:b.A,json:{write:!0}})],C.prototype,"maxDisplayDuration",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],C.prototype,"maxDisplayObservationsPerTrack",void 0),(0,i.Cg)([(0,o.MZ)(y.M6)],C.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,o.MZ)({type:a.A,json:{name:"popupInfo",write:!0}})],C.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,o.MZ)({type:m,json:{write:!0}})],C.prototype,"previousObservations",void 0),(0,i.Cg)([(0,o.MZ)({type:m,json:{write:!0}})],C.prototype,"trackLines",void 0),(0,i.Cg)([(0,o.MZ)({type:["timeReceived","startTimeField","endTimeField"],json:{read:!0,write:!0}})],C.prototype,"timeField",void 0),C=(0,i.Cg)([(0,o.$K)("esri.layers.support.TrackInfo")],C);const S=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.trackGraphicOrigin=new l(this),this.trackInfo=null}};return(0,i.Cg)([(0,o.MZ)({readOnly:!0,clonable:!1})],r.prototype,"trackGraphicOrigin",void 0),(0,i.Cg)([(0,o.MZ)({type:C})],r.prototype,"trackInfo",void 0),r=(0,i.Cg)([(0,o.$K)("esri.layers.mixins.TrackableLayer")],r),r}},29005(e,t,r){r.d(t,{A:()=>u});var i=r(32198),o=r(69540),s=r(66552),n=r(25482),l=r(91429);const a=new s.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let u=class extends((0,o.OU)(n.o)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"name",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"description",void 0),(0,i.Cg)([(0,l.MZ)({json:{read:a.read,write:a.write}})],u.prototype,"drawingTool",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"prototype",void 0),(0,i.Cg)([(0,l.MZ)({json:{write:!0}})],u.prototype,"thumbnail",void 0),u=(0,i.Cg)([(0,l.$K)("esri.layers.support.FeatureTemplate")],u)},46499(e,t,r){r.d(t,{A:()=>x});var i,o,s=r(32198),n=(r(44208),r(66552)),l=r(25482),a=r(4718),u=r(90629),p=r(91429),c=r(73913),d=r(32730),y=r(77548),h=r(59868),g=r(73838),m=r(33910),f=r(36005),v=r(43937);const b=new n.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function w(e,t,r){return{enabled:!(0,y.TU)(r?.layer)}}function C(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function S(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let x=class extends l.o{static{i=d.vK}static{o=this}static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const i=e.split(" ");if(3===i.length)return r(t[i[0]],i[1],i[2]);if(7===i.length){const e=r(t[i[0]],i[1],i[2]),o=i[3],s=r(t[i[4]],i[5],i[6]);switch(o){case"AND":return e&&s;case"OR":return e||s}}return!1}catch(e){}}constructor(e){super(e),this[i]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,d.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,d.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,i){if(null==e&&null!=this.labelExpression&&C(i))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;const o=e.toJSON(i);o.expression&&(t[r]=o)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,d.XJ)(this)}getLabelExpressionArcade(){return(0,d.BI)(this)}getLabelExpressionSingleField(){return(0,d.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new o({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],x.prototype,"name",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:w}}}}})],x.prototype,"allowOverrun",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:w}}}}})],x.prototype,"deconflictionStrategy",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&S(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],x.prototype,"labelExpression",void 0),(0,s.Cg)([(0,f.w)("labelExpression")],x.prototype,"readLabelExpression",null),(0,s.Cg)([(0,v.K)("labelExpression")],x.prototype,"writeLabelExpression",null),(0,s.Cg)([(0,p.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return C(e)||S(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],x.prototype,"labelExpressionInfo",void 0),(0,s.Cg)([(0,v.K)("labelExpressionInfo")],x.prototype,"writeLabelExpressionInfo",null),(0,s.Cg)([(0,p.MZ)({type:b.apiValues,json:{type:b.jsonValues,read:b.read,write:b.write}})],x.prototype,"labelPlacement",void 0),(0,s.Cg)([(0,p.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],x.prototype,"labelPosition",void 0),(0,s.Cg)([(0,p.MZ)({type:Number})],x.prototype,"maxScale",void 0),(0,s.Cg)([(0,v.K)("maxScale")],x.prototype,"writeMaxScale",null),(0,s.Cg)([(0,p.MZ)({type:Number})],x.prototype,"minScale",void 0),(0,s.Cg)([(0,v.K)("minScale")],x.prototype,"writeMinScale",null),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:w}}}}})],x.prototype,"repeatLabel",void 0),(0,s.Cg)([(0,p.MZ)({type:Number,cast:u.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:w}}}}})],x.prototype,"repeatLabelDistance",null),(0,s.Cg)([(0,p.MZ)({types:m.em,json:{origins:{"web-scene":{types:m.Rv,write:g.oO,default:null}},write:g.oO,default:null}})],x.prototype,"symbol",void 0),(0,s.Cg)([(0,p.MZ)({type:Boolean,json:{write:!0}})],x.prototype,"useCodedValues",void 0),(0,s.Cg)([(0,p.MZ)({type:String,json:{write:!0}})],x.prototype,"where",void 0),x=o=(0,s.Cg)([(0,p.$K)("esri.layers.support.LabelClass")],x)},73913(e,t,r){r.d(t,{A:()=>p});var i,o=r(32198),s=r(25482),n=r(91429),l=r(32730),a=r(36005),u=r(43937);let p=class extends s.o{static{i=this}constructor(e){super(e),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new i({expression:this.expression,title:this.title,value:this.value})}};(0,o.Cg)([(0,n.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"expression",void 0),(0,o.Cg)([(0,a.w)("expression",["expression","value"])],p.prototype,"readExpression",null),(0,o.Cg)([(0,u.K)("expression")],p.prototype,"writeExpression",null),(0,o.Cg)([(0,n.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],p.prototype,"title",void 0),(0,o.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],p.prototype,"value",void 0),p=i=(0,o.Cg)([(0,n.$K)("esri.layers.support.LabelExpressionInfo")],p)},91880(e,t,r){r.d(t,{A:()=>u});var i,o=r(32198),s=r(66552),n=r(25482),l=r(91429);const a=new s.J({asc:"ascending",desc:"descending"});let u=class extends n.o{static{i=this}constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],u.prototype,"field",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],u.prototype,"valueExpression",void 0),(0,o.Cg)([(0,l.MZ)({type:a.apiValues,json:{type:a.jsonValues,read:a.read,write:a.write}})],u.prototype,"order",void 0),u=i=(0,o.Cg)([(0,l.$K)("esri.layers.support.OrderByInfo")],u)},96184(e,t,r){r.d(t,{A:()=>y});var i=r(32198),o=r(69540),s=r(25482),n=r(91429),l=r(79677),a=r(10184),u=r(56400),p=r(36005),c=r(43937);function d(e,t){return a.A.fromJSON({value:e,unit:t})}let y=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?l.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,i.Cg)([(0,n.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,i.Cg)([(0,p.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,i.Cg)([(0,c.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,i.Cg)([(0,n.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,i.Cg)([(0,p.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,i.Cg)([(0,c.K)("interval")],y.prototype,"writeInterval",null),(0,i.Cg)([(0,n.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,i.Cg)([(0,n.MZ)((0,u.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,i.Cg)([(0,n.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,i.Cg)([(0,n.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,i.Cg)([(0,n.$K)("esri.layers.support.TimeInfo")],y)},41560(e,t,r){r.d(t,{Ch:()=>n,mW:()=>s});var i=r(34727),o=r(39516);function s(e,t){return{...t,filterMode:e.mode}}function n(e,t,r){const s=function(e){if("manual"===u(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:r,maxScale:i}of e.filters)t[0]=Math.max(t[0],p(r)),t[1]=Math.min(t[1],c(i));return t}(e);if(s&&((0,i.gg)(t,s[0])||(0,i.ZH)(r,s[1])))return"";const n=Array.from(l(e,t,r)),a=function(e,t,r){if(0===e.length)return!0;const o=p(e.at(0)?.minScale),s=c(e.at(-1)?.maxScale);if((0,i.ZH)(o,t)||(0,i.gg)(s,r))return!0;for(let t=0;t<e.length-1;t++){const r=e[t],o=e[t+1];if((0,i.ZH)(p(o.minScale),c(r.maxScale)))return!0}return!1}(n,t,r)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,o.IW)(e,t),"");return a&&"1=1"!==a?a:""}function*l(e,t,r){if("manual"===u(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)a(i.minScale,i.maxScale,t,r)&&(yield i)}}function a(e,t,r,o){return e=p(e),r=p(r),t=c(t),!(!(0,i.Sp)(r,e)&&(o??r)>e||(0,i.Hx)(t,r)||void 0!==o&&(0,i.Sp)(o,e))}function u(e){return"mode"in e?e.mode:e.filterMode}function p(e){return e||Number.POSITIVE_INFINITY}function c(e){return e||0}},17036(e,t,r){r.d(t,{p:()=>a});var i=r(44208),o=r(53966),s=r(20437),n=r(95466),l=r(30524);function a(){return{fields:{type:[s.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");o.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return n.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||o.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,l.DB)(this.fieldsIndex,e)}}}}},39383(e,t,r){r.d(t,{w:()=>a,z:()=>c});var i=r(49186),o=r(53966),s=r(46499);const n=()=>o.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{const i=new s.A;if(i.read(e,r),i.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;i.labelExpression=i.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const i=t[e].name;if(i.toLowerCase()===r)return i}return e}(r,e)}]`)}return i}):null}const u=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],p={esriGeometryPoint:u,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:u,esriGeometryEnvelope:null};function c(e,t){const r=[];for(const o of e){const e=o.labelPlacement,s=p[t];if(!o.symbol)return n().warn("No ILabelClass symbol specified."),[];if(!s)return n().error(new i.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(s.includes(e))r.push(o);else{const i=s[0];e&&n().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${i}`);const l=o.clone();l.labelPlacement=i,r.push(l)}}return r}},10407(e,t,r){r.d(t,{It:()=>y,LG:()=>n,OM:()=>u,Sm:()=>p,Y:()=>l,bK:()=>a,sQ:()=>c});var i=r(99917),o=r(16930),s=r(28735);function n(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,d.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}function p(e,t,r){r?n(e,t):u(e,t)}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const r=o.A.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.project)(e,r)}(r)}const d={CHARTS:"Charts",CATALOG_LAYER:"CatalogLayer",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",PARCEL_FABRIC:"ParcelFabric",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery",UTILITY_NETWORK:"UtilityNetwork"};function y(e){const{portal:t,isOrgItem:r,itemControl:i}=e,o=t.user?.privileges;let s=!o||o.includes("features:user:edit"),n=!!r&&!!o?.includes("features:user:fullEdit");const l="update"===i||"admin"===i;return l?n=s=!0:n&&(s=!0),{features:{edit:s,fullEdit:n},content:{updateItem:l}}}r.d(t,["mm",0,d])},98205(e,t,r){r.d(t,{KZ:()=>l,eh:()=>n,gf:()=>s,of:()=>o});const i=Symbol("SizeVariableInstance");function o(e){return null!=e&&"object"==typeof e&&i in e}function s(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function l(e,t){const r=t||n(e),i=e.valueUnit||"unknown";return"unknown"===r?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===i?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}r.d(t,["uY",0,i])},22671(e,t,r){r.d(t,{A:()=>v});var i,o=r(32198),s=r(52106),n=r(66552),l=r(25482),a=r(4718),u=r(91429),p=r(16930),c=r(60408),d=r(65864),y=r(50498),h=r(20437),g=r(36005),m=r(43937);const f=new n.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,r,i){if(e)return void f.write(e,t,r,i);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void f.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,d.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=p.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,a.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,o]}=e,s=this.features,n=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-i)/t),e=>Math.round((o-e)/r));for(let e=0,t=s.length;e<t;e++)n?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,o],scale:[s,n]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,e=>e*s+i,e=>o-e*n,l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const i=p.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],n=r.fromJSON(s),l=s.geometry?.spatialReference;null==n.geometry||l||(n.geometry.spatialReference=i);const a=s.aggregateGeometries,u=n.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],r=a[e],o=r?.spatialReference;null==t||o||(t.spatialReference=i)}o.push(n)}return o}_quantizePoints(e,t,r){let i,o;const s=[];for(let n=0,l=e.length;n<l;n++){const l=e[n];if(n>0){const e=t(l[0]),n=r(l[1]);e===i&&n===o||(s.push([e-i,n-o]),i=e,o=n)}else i=t(l[0]),o=r(l[1]),s.push([i,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,c.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e],n=this._quantizePoints(s,t,r);n&&o.push(n)}return o.length>0?((0,c.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,c.Bi)(e)?e.rings:e.paths;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];for(let e=0,o=i.length;e<o;e++){const o=i[e];e>0?(n+=o[0],l+=o[1]):(n=o[0],l=o[1]),o[0]=t(n),o[1]=r(l)}}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=o(r[3])}}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let n,l;for(let e=0,i=s.length;e<i;e++){const i=s[e];e>0?(n+=i[0],l+=i[1]):(n=i[0],l=i[1]),i[0]=t(n),i[1]=r(l)}if(i&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2]),t[3]=o(t[3])}else if(i)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=i(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,o.Cg)([(0,g.w)("features")],v.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[h.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:f.read}}})],v.prototype,"geometryType",void 0),(0,o.Cg)([(0,m.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:y.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,g.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:p.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,o.Cg)([(0,m.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0},41366(e,t,r){var i=r(32198),o=r(66552),s=r(53966),n=r(91429),l=r(93223);const a=(0,o.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),u="percent-of-total",p="field";r.d(t,["K",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&p||r&&u||null,t&&r&&s.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==u||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,l.e)(a,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,n.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,a])},93470(e,t,r){const i=[252,146,31,255],o={type:"esriSMS",style:"esriSMSCircle",size:6,color:i,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:i};r.d(t,["Cb",0,o,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,i,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,s])}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1150,2994,4294,5223,5360,6742,9397,9447,9716],{32198(t,e,n){function r(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function o(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>s,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function s(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function o(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(t){return e(t),o()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},57694(t,e,n){n.d(e,{a:()=>s,c:()=>i});var r=n(55537),o=n(83661);function i(t,e){if(!t.isEmpty())switch(t.getGeometryType()){case r.G.enumPolygon:return a(t);case r.G.enumPolyline:return h(t.getImpl());case r.G.enumLine:case r.G.enumBezier:case r.G.enumEllipticArc:return function(t){const e=t.calculateLength2D();return 0===e?t.getStartXY():t.calculateWeightedCentroid2D().mul(1/e)}(t);case r.G.enumMultiPoint:return function(t){const e=new o.K(0),n=new o.K(0),r=t.getImpl(),i=r.getAttributeStreamRef(0),s=r.getPointCount(),a=new o.P;for(let t=0;t<s;t++)i.queryPoint2D(2*t,a),e.add(a.x),n.add(a.y);const u=new o.P;return u.setCoords(e.getResult(),n.getResult()),u.divThis(s)}(t);case r.G.enumEnvelope:return t.getCenterXY();case r.G.enumPoint:return t.getXY();default:return o.P.construct(Number.NaN,Number.NaN)}return o.P.construct(Number.NaN,Number.NaN)}function s(t,e){return a(t,e)}function a(t,e=-1){const n=new o.K(0),r=new o.K(0),i=t.getImpl();let s;const a=i.hasNonLinearSegments();let h;const m=i.getXY(0);if(-1===e){if(h=i.calculateArea2D(),0===h)return l(t);a&&(s=i.querySegmentIterator());for(let t=0,e=i.getPathCount();t<e;t++)u(m,i,t,n,r),a&&c(m,s,n,r)}else{if(h=i.calculateRingArea2D(e),0===h)return l(t,e);a&&(s=i.querySegmentIterator(),s.resetToPath(e)),u(m,i,e,n,r),a&&c(m,s,n,r)}const f=new o.P,p=new o.P;return f.setCoords(n.getResult(),r.getResult()),p.assign(f.mul(1/h).add(m)),p}function u(t,e,n,r,i){const s=e.getPathStart(n),a=e.getPathEnd(n);if(a-s<3)return;const u=e.getAttributeStreamRef(0),c=u.readPoint2D(2*s),l=u.readPoint2D(2*(s+1));l.subThis(c);const h=new o.K(0),m=e.hasNonLinearSegments(),f=1/3,p=new o.P;for(let t=s+2;t<a;t++){u.queryPoint2D(2*t,p),p.subThis(c);const e=.5*p.crossProduct(l);m&&h.add(e);const n=f*e;r.add((l.x+p.x)*n),i.add((l.y+p.y)*n),l.setCoordsPoint2D(p)}const g=m?h.getResult():e.calculateRingArea2D(n),y=c.sub(t).mul(g);r.add(y.x),i.add(y.y)}function c(t,e,n,o){let i;for(e.nextPath()||(0,r.d)("centroid");null!==(i=e.nextCurve());){const e=i.calculateWeightedAreaCentroid2D(t);n.add(e.x),o.add(e.y)}}function l(t,e=-1){return h(t.getImpl(),e)}function h(t,e=-1){const n=-1===e?t.calculateLength2D():t.calculatePathLength2D(e);if(0===n)return function(t,e=-1){if(-1!==e)return t.getXY(t.getPathStart(e));const n=new o.K(0),r=new o.K(0);for(let e=0;e<t.getPathCount();++e){const o=t.getXY(t.getPathStart(e));n.add(o.x),r.add(o.y)}return o.P.construct(n.getResult(),r.getResult()).mul(1/t.getPathCount())}(t,e);const r=new o.K(0),i=new o.K(0),s=t.querySegmentIterator();for(-1!==e&&s.resetToPath(e);s.nextPath();){const n=s.getPathIndex(),o=t.getXY(t.getPathStart(n));for(;s.hasNextSegment();){const t=s.nextSegment(),e=t.calculateLength2D();if(0===e)continue;const n=t.calculateWeightedCentroid2D().sub(o.mul(e));r.add(n.x),i.add(n.y)}const a=o.mul(t.calculatePathLength2D(n));if(r.add(a.x),i.add(a.y),-1!==e)break}const a=new o.P;return a.setCoords(r.getResult(),i.getResult()),a.mul(1/n)}},30921(t,e,n){n.d(e,{D:()=>N,m:()=>l,s:()=>d,w:()=>y});var r=n(32198),o=n(55537),i=n(88885),s=n(39117),a=n(83661),u=n(79187),c=n(95213);function l(){return{outPoint:new a.P,index:-1,t:Number.NaN}}function h(t,e,n){return{outPoint:t.clone(),index:e,t:n}}function m(t,e,n,r){t.outPoint.assign(e),t.index=n,t.t=r}function f(t,e){t.outPoint.assign(e.outPoint),t.index=e.index,t.t=e.t}function p(t,e,n,r){t.index=n,t.t=r,e.queryCoord2D(t.t,t.outPoint)}function g(t,e){const n=l();f(n,t),f(t,e),f(e,n)}function y(t,e,n,r,i,a){if(t.getGeometryType()===o.G.enumPolygon){for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment();if(0!==(0,s.K)(t,e.getEndXY(),0))return m(i,e.getEndXY(),-1,Number.NaN),m(a,e.getEndXY(),-1,Number.NaN),!0}r.resetToFirstPath()}if(e.getGeometryType()===o.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const t=n.nextSegment();if(0!==(0,s.K)(e,t.getEndXY(),0))return m(i,t.getEndXY(),-1,Number.NaN),m(a,t.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}return!1}function d(t){const e=t.getPathCount(),n=(0,a.d)(t.getSegmentCount(),0);let r=0;for(let o=0;o<e;++o){const e=r+t.getSegmentCountPath(o);for(let i=r,s=t.getPathStart(o);i<e;++i,++s)n[i]=s;r=e}return(0,i.s)(t.getPointCount(),n),n}function v(t,e){return!!Number.isNaN(e)||t<=e}function P(t){const e=new i.P;return e.addEnvelope(t,!1),e}class N{m_progressTracker;m_env2DgeometryA=null;m_env2DgeometryB=null;m_maxSqrDistance;m_maxDistance;m_progressCounter=0;m_bIsNearCalc;constructor(t,e){if(this.m_progressTracker=e,this.m_maxSqrDistance=t*t,this.m_maxDistance=t,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=t,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let t=Math.sqrt(this.m_maxSqrDistance);for(;t<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,t=Math.sqrt(this.m_maxSqrDistance)}}calculate(t,e,n,r){if((t.getGeometryType()!==c.P.type||e.getGeometryType()!==c.P.type)&&(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!v(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const o=h(new a.P,(0,a.j)(),Number.NaN),i=h(new a.P,(0,a.j)(),Number.NaN),s=this._ExecuteBruteForce(t,e,o,i);return v(s,this.m_maxDistance)?(null!==n&&f(n,o),null!==r&&f(r,i),s):Number.POSITIVE_INFINITY}isNear(t,e){if(this.m_bIsNearCalc=!0,t.isEmpty()||e.isEmpty())return!1;if(t===e)return!0;let n=!0;if(t.getGeometryType()!==c.P.type&&t.getGeometryType()!==c.E.type||e.getGeometryType()!==c.P.type&&e.getGeometryType()!==c.E.type||(n=!1),n){if(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const r=h(new a.P,(0,a.j)(),Number.NaN),o=h(new a.P,(0,a.j)(),Number.NaN);return this._ExecuteBruteForce(t,e,r,o)<=this.m_maxDistance}progress_(t=!1){}_ExecuteBruteForce(t,e,n,r){switch(t.getGeometryType()){case o.G.enumPoint:return this.distancePointGeometry(t,e,n,r);case o.G.enumMultiPoint:return this.distanceMultipointGeometry(t,e,n,r);case o.G.enumEnvelope:return this.distanceEnvelopeGeometry(t,e,n,r);case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipathGeometry(t,e,n,r);default:return Number.NaN}}distancePointGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:return this.distancePointPoint(t,e,n,r);case o.G.enumMultiPoint:return this.distancePointMultipoint(t,e,n,r);case o.G.enumPolyline:case o.G.enumPolygon:return this.distancePointMultipath(t,e,n,r);case o.G.enumEnvelope:return this.distancePointEnvelope(t,e,n,r);default:return Number.NaN}}distancePointPoint(t,e,n,r){const o=t.getXY(),i=e.getXY();return m(n,o,0,0),m(r,i,0,0),Math.sqrt(a.P.sqrDistance(o,i))}distancePointMultipoint(t,e,n,r){const o=t.getXY();let i=this.m_maxSqrDistance,s=i,u=!1;const c=e.getPointCount(),l=new a.P;for(let t=0;t<c;++t)if(e.queryXY(t,l),s=a.P.sqrDistance(o,l),this.m_bIsNearCalc){if(s<=i)return 0}else if(!(s>i)&&(!u&&s===i||s<i)&&(i=s,m(n,o,0,0),m(r,l,t,0),u=!0,0===i))return 0;return u?Math.sqrt(i):Number.POSITIVE_INFINITY}distancePointMultipath(t,e,n,r){const i=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),c=t.getXY();if(!i&&e.getGeometryType()===o.G.enumPolygon&&0!==(0,s.K)(e,c,0))return m(n,c,0,0),m(r,c,-1,Number.NaN),0;e.getImpl().getAccelerators();let l=this.m_maxSqrDistance,h=l,f=-1;const p=new u.Envelope2D,g=e.querySegmentIterator();let y=!1;for(;g.nextPath();)for(;g.hasNextSegment();){const t=g.nextSegment();t.queryEnvelope(p);const e=p.sqrDistance(c);if(e>l)continue;if(!this.m_bIsNearCalc&&y&&e===l)continue;f=t.getClosestCoordinate(c,!1);const o=t.getCoord2D(f);if(h=a.P.sqrDistance(c,o),this.m_bIsNearCalc){if(h<=l)return 0}else if(!(h>l)&&(!y||h<l)&&(l=h,m(n,c,0,0),m(r,o,g.getStartPointIndex(),f),y=!0,0===l))return 0}return y?Math.sqrt(l):Number.POSITIVE_INFINITY}distancePointEnvelope(t,e,n,r){const o=t.getXY();m(n,o,0,0),m(r,o,-1,Number.NaN);const i=e.asEnvelope2D();return i.contains(o)?0:Math.sqrt(i.sqrDistance(o,r.outPoint))}distanceMultipointGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distancePointMultipoint(e,t,r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumMultiPoint:return this.distanceMultipointMultipoint(t,e,n,r,1,1);case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipointMultipath(t,e,n,r);case o.G.enumEnvelope:return this.distanceMultipointMultipath(t,P(e),n,r);default:return Number.NaN}}distanceMultipointMultipoint(t,e,n,o,i,s){const u={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===i&&1===s){const r=Math.trunc((0,a.s)(Math.sqrt(t.getPointCount())+1,1,(0,a.i)())),i=Math.trunc((0,a.s)(Math.sqrt(e.getPointCount())+1,1,(0,a.i)()));if((r>=4||i>=4)&&this.distanceMultipointMultipoint(t,e,n,o,r,i)<=this.m_maxSqrDistance)return 0}let c=this.m_maxSqrDistance;const l=[t],h=[e],f=this.swapGeometriesIfBGtA(l,h);f&&(this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s=(0,a.c)(i,i=s),g(n,o)),(0,r.mS)(u,(0,a.h)(()=>{g(n,o),this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!f),!1);const p=l[0].getImpl(),y=h[0].getImpl(),d=p.getPointCount(),v=y.getPointCount(),P=v>1;let N=!1;const D=new a.P,M=new a.P;for(let t=0;t<d;t+=i){if(p.queryXY(t,D),P){const t=this.m_env2DgeometryB.sqrDistance(D);if(this.m_bIsNearCalc){if(t>c)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(D)<=c)return 0}else if(t>=c)continue}for(let e=0;e<v;e+=s){y.queryXY(e,M);const r=a.P.sqrDistance(D,M);if(this.m_bIsNearCalc){if(r<=c)return 0}else if(!(r>c||N&&r===c)&&(!N||r<c)&&(m(n,D,t,0),m(o,M,e,0),N=!0,c=r,0===c))return N?Math.sqrt(c):Number.POSITIVE_INFINITY}}return N?Math.sqrt(c):Number.POSITIVE_INFINITY}catch(t){u.error=t,u.hasError=!0}finally{(0,r.hk)(u)}}distanceMultipointMultipath(t,e,n,r){let i=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&e.getGeometryType()===o.G.enumPolygon;const c=e.querySegmentIterator();c.stripAttributes();const l=new u.Envelope2D,h=new a.P;let f=this.m_maxSqrDistance;const p=t.getImpl(),g=p.getPointCount(),y=g>1;let d=!1;for(;c.nextPath();)for(;c.hasNextSegment();){const t=c.nextSegment();if(t.queryLooseEnvelope(l),y){const t=l.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(t>f)continue}else if(t>f||d&&t===f)continue}for(let o=0;o<g;o++){if(p.queryXY(o,h),i&&0!==(0,s.K)(e,h,0))return m(n,h,-1,Number.NaN),m(r,h,o,0),0;{const t=l.sqrDistance(h);if(this.m_bIsNearCalc){if(t>f)continue}else if(t>f)continue}const a=t.getClosestCoordinate(h,!1),u=t.getCoord2D(a);h.subThis(u);const g=h.sqrLength();if(this.m_bIsNearCalc){if(g<=f)return 0}else if(!(g>f)&&(!d||g<f)&&(f=g,m(n,p.getXY(o),o,0),m(r,u,c.getStartPointIndex(),a),d=!0,0===f))return 0}i=!1}return d?Math.sqrt(f):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:return this.distancePointEnvelope(e,t,r,n);case o.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distanceMultipointMultipath(e,P(t),r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipathMultipath(P(t),e,n,r);case o.G.enumEnvelope:return this.distanceEnvelopeEnvelope(t,e,n,r);default:return Number.NaN}}distanceEnvelopeEnvelope(t,e,n,r){n.t=Number.NaN,n.index=-1,r.t=Number.NaN,r.index=-1;const o=t.asEnvelope2D(),i=e.asEnvelope2D();return Math.sqrt(o.sqrDistanceEnvelope(i,n.outPoint,r.outPoint))}distanceMultipathGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distancePointMultipath(e,t,r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distanceMultipointMultipath(e,t,r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipathMultipath(t,e,n,r);case o.G.enumEnvelope:return this.distanceMultipathMultipath(t,P(e),n,r);default:return Number.NaN}}distanceMultipathMultipath(t,e,n,o){const s={stack:[],error:void 0,hasError:!1};try{const c=[t],h=[e],m=this.swapGeometriesIfAGtB(c,h);m&&(this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),g(n,o)),(0,r.mS)(s,(0,a.h)(()=>{g(n,o),this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!m),!1);const v=c[0],P=h[0],N=v.querySegmentIterator();N.stripAttributes();const D=P.querySegmentIterator();if(D.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const t=Math.trunc((0,a.s)(Math.sqrt(v.getPointCount())+1,1,(0,a.i)())),e=Math.trunc((0,a.s)(Math.sqrt(v.getPointCount())+1,1,(0,a.i)()));if(this.distanceMultipointMultipoint(v,P,n,o,t,e)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const t=l(),e=l();if(y(v,P,N,D,t,e))return f(n,t),f(o,e),0}const M=d(v),_=[],S=new i.S,b=new u.Envelope2D,w=new u.Envelope2D,x=new u.Envelope2D;let A=this.m_maxSqrDistance,I=!0,E=!1;for(let t=0,e=M.length;t<e;++t){v.querySegment(M[t],S,!0);const e=S.get();if(e.queryEnvelope(b),!(b.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>A)){if(this.m_bIsNearCalc&&b.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=A)return 0;for(;D.nextPath();){if(this.progress_(),I)P.queryPathEnvelope(D.getPathIndex(),x),_[D.getPathIndex()]=x.clone();else if(b.sqrDistanceEnvelope(_[D.getPathIndex()],null,null)>A)continue;for(;D.hasNextSegment();){const r=D.nextSegment();if(r.queryEnvelope(w),b.sqrDistanceEnvelope(w,null,null)<=A){const i=!b.isIntersecting(w),s=[0],a=[0];let u=e.distance(r,i,s,a);if(u*=u,this.m_bIsNearCalc&&u<=this.m_maxSqrDistance)return 0;if(u<A||u===A&&M[t]<n.index){if(E=!0,p(n,e,M[t],s[0]),p(o,r,D.getStartPointIndex(),a[0]),0===u)return 0;A=u}}}}D.resetToFirstPath(),I=!1}}return E?Math.sqrt(A):Number.POSITIVE_INFINITY}catch(t){s.error=t,s.hasError=!0}finally{(0,r.hk)(s)}}swapGeometriesIfAGtB(t,e){return(0,o.v)(t[0])>(0,o.v)(e[0])&&(e[0]=(0,a.c)(t[0],t[0]=e[0]),!0)}swapGeometriesIfBGtA(t,e){return this.swapGeometriesIfAGtB(e,t)}}},9447(t,e,n){n.d(e,{OperatorCentroid2D:()=>o});var r=n(57694);class o{getOperatorType(){return 10205}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}execute(t,e){return(0,r.c)(t)}}},22994(t,e,n){n.d(e,{OperatorDistance:()=>i});var r=n(55537),o=n(30921);class i{getOperatorType(){return 10100}supportsCurves(){return!0}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}execute(t,e,n){return this.executeEx(t,e,n,null,null,Number.NaN)}executeEx(t,e,n,i,s,a){if(t.isEmpty()||e.isEmpty())return Number.NaN;(0,r.c)(t),(0,r.c)(e);const u=t,c=e;Number.isNaN(a)&&(a=Number.POSITIVE_INFINITY);const l=new o.D(a,n).calculate(u,c,i,s);return Number.isFinite(l)?l:Number.NaN}}},69540(t,e,n){var r=n(32198),o=n(69622),i=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(88620),u=n(64108);const c=Symbol("ClonableMixin"),l=t=>{var e;const n=t;let o=class extends n{constructor(){super(...arguments),this[e]=!0}static{e=c}clone(t){const e=(0,a.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const n=e.metadata,r=e.store,o={},u=new Map;for(const e in n){const s=n[e],a=r?.originOf(e),c=s.clonable;if(s.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const l=this[e];let h=null;if("function"==typeof c)h=c(l,t);else if("reference"===c)h=l;else if(h=(0,i.TU)(l,t),null!=l&&null==h)continue;0===a?u.set(e,h):o[e]=h}const c=new(0,Object.getPrototypeOf(this).constructor)(o);if(u.size){const t=(0,a.oY)(c)?.store;if(t)for(const[e,n]of u)t.set(e,n,0)}return c}};return o=(0,r.Cg)([(0,u.$)("esri.core.Clonable")],o),o},h=l(o.A);n.d(e,["OU",0,l,"Pw",0,h])},95488(t,e,n){n.d(e,{I:()=>o});var r=n(11406);class o extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},51850(t,e,n){function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,e,n){return[t,e,n]}function s(t,e,n){return[t,e,n]}function a(t,e=[0,0,0]){const n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function u(){return i(1,1,1)}function c(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}n.d(e,{CN:()=>s,ci:()=>a,fA:()=>i,o8:()=>o,vt:()=>r});const m=[0,0,0],f=u(),p=c(),g=l(),y=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_X:p,UNIT_Y:g,UNIT_Z:y,ZEROS:m,clone:o,create:r,freeze:s,fromArray:a,fromValues:i,ones:u,unitX:c,unitY:l,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,y,"Cw",0,p,"JP",0,g,"Un",0,f,"uY",0,m])},35522(t,e,n){n.d(e,{$A:()=>b,Bw:()=>i,C:()=>s,Cc:()=>w,DI:()=>M,Io:()=>v,Ln:()=>d,Om:()=>S,Qr:()=>h,Re:()=>c,S8:()=>_,T9:()=>g,WQ:()=>u,Z0:()=>x,_S:()=>f,aI:()=>q,ei:()=>A,fw:()=>E,gL:()=>I,hG:()=>P,hZ:()=>a,hs:()=>y,jk:()=>p,lw:()=>l,m3:()=>N,oW:()=>R,t2:()=>C,tn:()=>m,ze:()=>D});var r=n(51850),o=n(34304);function i(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function m(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function f(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function g(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function y(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function d(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function v(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return Math.sqrt(n*n+r*r+o*o)}function P(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return n*n+r*r+o*o}function N(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function D(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function M(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function _(t,e){const n=e[0],r=e[1],o=e[2];let i=n*n+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function b(t,e,n){const r=e[0],o=e[1],i=e[2],s=n[0],a=n[1],u=n[2];return t[0]=o*u-i*a,t[1]=i*s-r*u,t[2]=r*a-o*s,t}function w(t,e,n,r){const o=e[0],i=e[1],s=e[2];return t[0]=o+r*(n[0]-o),t[1]=i+r*(n[1]-i),t[2]=s+r*(n[2]-s),t}function x(t,e,n){const r=e[0],o=e[1],i=e[2];return t[0]=n[0]*r+n[4]*o+n[8]*i+n[12],t[1]=n[1]*r+n[5]*o+n[9]*i+n[13],t[2]=n[2]*r+n[6]*o+n[10]*i+n[14],t}function A(t,e,n){const r=e[0],o=e[1],i=e[2];return t[0]=r*n[0]+o*n[3]+i*n[6],t[1]=r*n[1]+o*n[4]+i*n[7],t[2]=r*n[2]+o*n[5]+i*n[8],t}function I(t,e,n){return E(t,e,n[0],n[1],n[2],n[3])}function E(t,e,n,r,o,i){const s=e[0],a=e[1],u=e[2],c=r*u-o*a,l=o*s-n*u,h=n*a-r*s,m=r*h-o*l,f=o*c-n*h,p=n*l-r*c,g=2*i;return t[0]=s+c*g+2*m,t[1]=a+l*g+2*f,t[2]=u+h*g+2*p,t}const O=(0,r.vt)(),G=(0,r.vt)();function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function q(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],s=e[0],a=e[1],u=e[2],c=(0,o.FD)();return Math.abs(n-s)<=c*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-a)<=c*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=c*Math.max(1,Math.abs(i),Math.abs(u))}function R(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=n[2]-e[2];let s=r*r+o*o+i*i;return s>0?(s=1/Math.sqrt(s),t[0]=r*s,t[1]=o*s,t[2]=i*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const T=c,B=l,J=h,Y=v,Z=P,j=i,L=N;Object.freeze(Object.defineProperty({__proto__:null,abs:m,add:u,angle:function(t,e){_(O,t),_(G,e);const n=S(O,G);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,o,i){const s=1-i,a=s*s,u=i*i,c=a*s,l=3*i*a,h=3*u*s,m=u*i;return t[0]=e[0]*c+n[0]*l+r[0]*h+o[0]*m,t[1]=e[1]*c+n[1]*l+r[1]*h+o[1]*m,t[2]=e[2]*c+n[2]*l+r[2]*h+o[2]*m,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:s,cross:b,crossAndNormalize:function(t,e,n){const r=e[0],o=e[1],i=e[2],s=n[0],a=n[1],u=n[2],c=o*u-i*a,l=i*s-r*u,h=r*a-o*s,m=Math.sqrt(c*c+l*l+h*h);return t[0]=c/m,t[1]=l/m,t[2]=h/m,t},direction:R,dist:Y,distance:v,div:J,divide:h,dot:S,equals:q,exactEquals:C,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,o,i){const s=i*i,a=s*(2*i-3)+1,u=s*(i-2)+i,c=s*(i-1),l=s*(3-2*i);return t[0]=e[0]*a+n[0]*u+r[0]*c+o[0]*l,t[1]=e[1]*a+n[1]*u+r[1]*c+o[1]*l,t[2]=e[2]*a+n[2]*u+r[2]*c+o[2]*l,t},inverse:M,len:j,length:i,lerp:w,max:g,min:p,mul:B,multiply:l,negate:D,normalize:_,random:function(t,e=1){const n=o.Ov,r=2*n()*Math.PI,i=2*n()-1,s=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*s,t[1]=Math.sin(r)*s,t[2]=i*e,t},rotateX:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateY:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateZ:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:y,scaleAndAdd:d,scaleTo:function(t,e){return y(t,t,e/j(t))},set:a,sign:f,sqrDist:Z,sqrLen:L,squaredDistance:P,squaredLength:N,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:T,subtract:c,transformMat3:A,transformMat4:x,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:I,transformQuatValues:E},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,j,"jb",0,T,"lo",0,Z,"uE",0,L,"xg",0,Y])},69397(t,e,n){n.d(e,{Qf:()=>a,Qh:()=>i,lM:()=>o});var r=n(34275);function o(t){if(!t)return 0;let e=c;for(const n in t)t.hasOwnProperty(n)&&(e+=s(t[n],!1));return e}function i(t){if(!t)return 0;if("number"==typeof t[0])return a(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let n=l;for(let r=0;r<e;r++)n+=s(t[r]);return n}(t);let e=c;for(const n in t)t.hasOwnProperty(n)&&(e+=s(t[n]));return e}function s(t,e=!0){switch(typeof t){case"object":return e?i(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+h:Array.isArray(e)?u(e,16):0:0),0)}function u(t,e){return l+t.length*e}const c=32,l=16,h=145},17799(t,e,n){n.d(e,{T9:()=>a,d_:()=>o,gT:()=>i});var r=n(86211);function o(t,e){return{type:(0,r.t$)(e),value:t,unit:e}}function i(t,e){return{type:(0,r.t$)(e),value:t,unit:e}}function s(t,e,n="arithmetic"){return{type:(0,r.t$)(e),value:t,unit:e,rotationType:n}}function a(t,e){return null==t?e:null==e||t.value>(0,r.oU)(e.value,e.unit,t.unit)?t:e}o(0,"meters"),i(0,"square-meters"),s(0,"radians"),s(0,"degrees"),s(0,"degrees","geographic")},48526(t,e,n){n.d(e,{A:()=>y});var r,o=n(32198),i=n(4576),s=n(4718),a=n(91429),u=n(5443),c=n(91075),l=n(86738),h=n(16930),m=n(90634),f=n(47610),p=n(56993),g=n(43937);let y=r=class extends c.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:n,hasZ:r,spatialReference:o}=t;switch(e??=[],e?.at(0)?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return o??=h.A.WGS84,{...t,hasM:n,hasZ:r,points:e,spatialReference:o}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=(0,m.ge)(this);return t?new u.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,s.o8)(this.points)}clone(){const{points:t,spatialReference:e,hasM:n,hasZ:o}=this;return new r({points:(0,s.o8)(t),spatialReference:e.clone(),hasM:n,hasZ:o})}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return null!=e==(null!=n)&&!(null!=e&&null!=n&&!e.equals(n))&&(0,i.aI)(this.points,t.points,f.v6)}addPoint(t){return(0,p.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;const e=this.points[t],n={x:e[0],y:e[1],spatialReference:this.spatialReference};let r=2;return this.hasZ&&(n.z=e[2],r=3),this.hasM&&(n.m=e[r]),new l.A(n)}removePoint(t){if(!this._validateInputs(t))return null;const e=new l.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?((0,p.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,o.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,o.Cg)([(0,g.K)("points")],y.prototype,"writePoints",null),y=r=(0,o.Cg)([(0,a.$K)("esri.geometry.Multipoint")],y),y.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,n){n.d(e,{A:()=>p});var r,o=n(32198),i=n(4718),s=n(91429),a=n(5443),u=n(91075),c=n(86738),l=n(16930),h=n(90634),m=n(56993),f=n(43937);let p=r=class extends u.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:n,hasZ:r,spatialReference:o}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return o??=l.A.WGS84,{...t,hasM:n,hasZ:r,paths:e,spatialReference:o}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,i.o8)(t)}get extent(){const t=(0,h.Z3)(this),{spatialReference:e}=this;return t?new a.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,i.o8)(this.paths)}addPath(t){if(!t)return;const e=this.paths,n=e.length;if(function(t){return!Array.isArray(t[0])}(t)){const r=[];for(let e=0,n=t.length;e<n;e++)r[e]=t[e].toArray();e[n]=r}else e[n]=t.slice();return this.notifyChange("paths"),this}clone(){const t=new r;return t.spatialReference=this.spatialReference,t.paths=(0,i.o8)(this.paths),t.curvePaths=(0,i.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;const n=this.paths[t][e],r=this.hasZ,o=this.hasM;return r&&!o?new c.A(n[0],n[1],n[2],void 0,this.spatialReference):o&&!r?new c.A(n[0],n[1],void 0,n[2],this.spatialReference):r&&o?new c.A(n[0],n[1],n[2],n[3],this.spatialReference):new c.A(n[0],n[1],this.spatialReference)}insertPoint(t,e,n){return this._validateInputs(t,e,!0)?((0,m.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t].splice(e,0,n),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const e=this.paths.splice(t,1)[0],n=this.spatialReference,r=e.map(t=>new c.A(t,n));return this.notifyChange("paths"),r}removePoint(t,e){if(!this._validateInputs(t,e))return null;const n=new c.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),n}setPoint(t,e,n){return this._validateInputs(t,e)?((0,m.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t][e]=n,this.notifyChange("paths"),this):this}_validateInputs(t,e,n=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){const r=this.paths[t];if(n&&(e<0||e>r.length))return!1;if(!n&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,o.Cg)([(0,s.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,o.Cg)([(0,s.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],p.prototype,"curvePaths",void 0),(0,o.Cg)([(0,f.K)("curvePaths")],p.prototype,"writeCurvePaths",null),(0,o.Cg)([(0,s.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,o.Cg)([(0,s.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],p.prototype,"paths",void 0),(0,o.Cg)([(0,f.K)("paths")],p.prototype,"writePaths",null),p=r=(0,o.Cg)([(0,s.$K)("esri.geometry.Polyline")],p),p.prototype.toJSON.isDefaultToJSON=!0},95624(t,e,n){n.d(e,{g:()=>i});var r=n(86211),o=n(78125);function i(t,e={}){const{unit:n}=e;let i=(0,o.fromGeometry)(t).calculateArea2D();if(i&&n){const e=(0,o.getSpatialReference)(t);if(e.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const s=(0,r.B5)(e);s!==n&&(s?i=(0,r.oU)(i,s,n):(i=Math.sqrt(i),i*=(0,r.GA)(e),i**=2,i=(0,r.oU)(i,"square-meters",n)))}return i}},89506(t,e,n){n.d(e,{Hh:()=>l,g7:()=>h});var r=n(86211),o=n(86742),i=n(5808);let s,a,u,c;async function l(){if(!s||!(0,o.s)()){const[t]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),(0,o.load)()]);s=t.fromGeometry,a=t.fromSpatialReference,u=t.getSpatialReference,c=(0,o.f)()}}function h(t,e={}){const{curveType:n="geodesic",unit:c}=e,l=u(t);let h=(0,o.execute)(s(t),a(l),i.O[n]);return h&&c&&(h=(0,r.oU)(h,"square-meters",c)),h}},95360(t,e,n){n.r(e),n.d(e,{execute:()=>m,isLoaded:()=>l,load:()=>h,supportsCurves:()=>c});var r=n(86211),o=n(29716),i=n(5808);let s,a,u,c;function l(){return!!s&&(0,o.s)()}async function h(){if(!l()){const[t]=await Promise.all([Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(n.bind(n,78125)),(0,o.load)()]);s=t.fromGeometry,a=t.fromSpatialReference,u=t.getSpatialReference,c=(0,o.f)()}}function m(t,e,n={}){const{curveType:c="geodesic",unit:l}=n,h=u(t);let m=(0,o.execute)(s(t),s(e),a(h),i.O[c]);return m&&l&&(m=(0,r.oU)(m,"meters",l)),m}},40427(t,e,n){n.d(e,{Hh:()=>l,g7:()=>h});var r=n(86211),o=n(35223),i=n(5808);let s,a,u,c;async function l(){if(!s||!(0,o.s)()){const[t]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),(0,o.load)()]);s=t.fromGeometry,a=t.fromSpatialReference,u=t.getSpatialReference,c=(0,o.f)()}}function h(t,e={}){const{curveType:n="geodesic",unit:c}=e,l=u(t);let h=(0,o.execute)(s(t),a(l),i.O[n]);return h&&c&&(h=(0,r.oU)(h,"meters",c)),h}},86742(t,e,n){n.d(e,{execute:()=>a,f:()=>u,load:()=>s,s:()=>i});var r=n(83290);let o;function i(){return!!o&&(0,r.i)()}async function s(){if(!i()){const[t,e]=await Promise.all([Promise.all([n.e(2024),n.e(6558)]).then(n.bind(n,6558)),n.e(3375).then(n.bind(n,15756)).then(({injectPe:t})=>t),(0,r.l)()]);o=new t.OperatorGeodeticArea,e(r.p)}}function a(t,e,n){return o.execute(t,e,n,null)}function u(){return o.supportsCurves()}},29716(t,e,n){n.d(e,{execute:()=>a,f:()=>u,load:()=>s,s:()=>i});var r=n(83290);let o;function i(){return!!o&&(0,r.i)()}async function s(){if(!i()){const[t,e]=await Promise.all([Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(2024),n.e(3394)]).then(n.bind(n,12764)),Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(8344)]).then(n.bind(n,15756)).then(({injectPe:t})=>t),(0,r.l)()]);o=new t.OperatorGeodeticDistance,e(r.p)}}function a(t,e,n,r){return o.execute(t,e,n,r,null)}function u(){return o.supportsCurves()}},35223(t,e,n){n.d(e,{execute:()=>a,f:()=>u,load:()=>s,s:()=>i});var r=n(83290);let o;function i(){return!!o&&(0,r.i)()}async function s(){if(!i()){const[t,e]=await Promise.all([n.e(8879).then(n.bind(n,28879)),n.e(3375).then(n.bind(n,15756)).then(({injectPe:t})=>t),(0,r.l)()]);o=new t.OperatorGeodeticLength,e(r.p)}}function a(t,e,n){return o.execute(t,e,n,null)}function u(){return o.supportsCurves()}},81150(t,e,n){n.d(e,{execute:()=>s,f:()=>c,isSimpleAsFeature:()=>u,z:()=>a});var r=n(76061),o=(n(55537),n(88885),n(39117));n(95213);const i=new o.J;function s(t,e,n){return i.execute(t,e,n,null)}function a(t,e,n){const o=i.executeMany(new r.S(t),e,n,null);return Array.from(o)}function u(t,e,n){return i.isSimpleAsFeature(t,e,n,null,null)}function c(){return i.supportsCurves()}},23914(t,e,n){n.d(e,{g7:()=>i});var r=n(81150),o=n(78125);function i(t){const e=(0,o.getSpatialReference)(t);return(0,o.toGeometry)((0,r.execute)((0,o.fromGeometry)(t),(0,o.fromSpatialReference)(e),!1),e)}(0,r.f)()},5808(t,e,n){n.d(e,["O",0,{geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}])},65806(t,e,n){n.d(e,{g:()=>s});var r=n(51850),o=n(99917),i=n(9762);function s(t,e,n,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,n))return a[0]=t.x,a[1]=t.y,a[2]=t.z??0,(0,i.projectBuffer)(a,t.spatialReference,0,e,n,0);const s=(0,o.tryProject)(t,n,r);return!!s&&(e[0]=s.x,e[1]=s.y,e[2]=s.z??0,!0)}const a=(0,r.vt)()},27993(t,e,n){n.d(e,{F:()=>a});var r=n(99917),o=n(16930),i=n(9762),s=n(65806);function a(t,e,n,o){return!(null==e||null==o||t.length<2)&&((0,r.canProjectWithoutEngine)(e,o)?(0,i.projectBuffer)(t,e,0,n,o,0,1):(u.x=t[0],u.y=t[1],u.z=t[2],u.spatialReference=e,(0,s.g)(u,n,o)))}const u={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},60408(t,e,n){function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function o(t){return void 0!==t.points}function i(t){return void 0!==t.x&&void 0!==t.y}function s(t){return void 0!==t.paths||void 0!==t.curvePaths}function a(t){return void 0!==t.rings||void 0!==t.curveRings}function u(t){return"object"==typeof t&&"vertexAttributes"in t}function c(t){return t?i(t)?"esriGeometryPoint":s(t)?"esriGeometryPolyline":a(t)?"esriGeometryPolygon":r(t)?"esriGeometryEnvelope":o(t)?"esriGeometryMultipoint":null:null}function l(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function h(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}n.d(e,{$B:()=>c,Bi:()=>a,Pv:()=>l,Rg:()=>s,U9:()=>o,W0:()=>h,ZC:()=>r,fT:()=>i,uW:()=>u})},65864(t,e,n){n.d(e,{rS:()=>l,xD:()=>m});var r=n(5443),o=n(91075),i=n(48526),s=n(86738),a=n(39829),u=n(82799),c=n(60408);function l(t){return null==t?null:t instanceof o.A?t:(0,c.fT)(t)?s.A.fromJSON(t):(0,c.Rg)(t)?u.A.fromJSON(t):(0,c.Bi)(t)?a.A.fromJSON(t):(0,c.U9)(t)?i.A.fromJSON(t):(0,c.ZC)(t)?r.A.fromJSON(t):null}const h={esriGeometryPoint:s.A,esriGeometryPolyline:u.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:i.A,esriGeometryMultiPatch:a.A};function m(t){return t&&h[t]||null}},32728(t,e,n){n.d(e,{YH:()=>s,nu:()=>a,wp:()=>i}),n(34727);var r=n(35522),o=n(51850);function i(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),o=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,o,i),t}function s(t,e,n){n=n||t;const o=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-o*e[0],t[1]-o*e[1],t[2]-o*e[2]),(0,r.S8)(n,n)}function a(t,e,n,i=(0,o.vt)()){const s=(0,r.Bw)(t),a=(0,r.Bw)(e),l=(0,r.Om)(t,e)/(s*a);if(l<.9999999999999999){const o=Math.acos(l),h=((1-n)*s+n*a)/Math.sin(o),m=h/s*Math.sin((1-n)*o),f=h/a*Math.sin(n*o);return(0,r.hs)(u,t,m),(0,r.hs)(c,e,f),(0,r.WQ)(i,u,c)}return(0,r.Cc)(i,t,e,n)}(0,o.vt)(),(0,o.vt)(),(0,o.vt)();const u=(0,o.vt)(),c=(0,o.vt)()},15554(t,e,n){n.r(e),n.d(e,{area2D:()=>Z,areaHorizontal:()=>V,autoArea2D:()=>k,autoDistance2DBetweenPoints:()=>K,autoLength2D:()=>z,autoSize2D:()=>W,distance2DBetweenPoints:()=>F,geodeticArea:()=>G,geodeticDistanceBetweenPoints:()=>J,geodeticDistanceBetweenPointsMany:()=>Y,geodeticLength:()=>B,length2D:()=>X,preloadGeodetic:()=>C,simplify:()=>Q});var r=n(17799),o=n(86211),i=n(35522),s=n(51850),a=n(73941),u=n(48526),c=n(86738),l=n(39829),h=n(82799),m=n(99917),f=n(16930),p=n(98764),g=n(95624),y=n(9447),d=n(78125);const v=new y.OperatorCentroid2D;v.supportsCurves();const P=new(n(22994).OperatorDistance);P.supportsCurves();var N=n(89506),D=n(95360),M=n(40427),_=n(965),S=n(23914),b=n(27993);function w(t,e,n,r,o){(0,i.C)(x,t),(0,i.WQ)(A,t,e),(0,b.F)(x,n,x,o),(0,b.F)(A,n,A,o),(0,i.Re)(r,A,x),(0,i.S8)(r,r)}const x=(0,s.vt)(),A=(0,s.vt)();var I=n(65864),E=n(21325),O=n(32728);async function G({geometryJSON:t,options:e}){await Promise.allSettled([(0,N.Hh)(),e?.returnLength?(0,M.Hh)():void 0]);const n=q(t,e),i=e?.unit??"square-meters",s=(0,S.g7)(n)??n,a=(0,N.g7)(s,{unit:i,...e}),u=(0,r.gT)(a,i),c=e?.lengthUnit??(0,o.Bd)(i);return{area:u,centroid:e?.returnCentroid?R(s).toJSON():void 0,length:e?.returnLength?await T(s,{unit:c}):void 0}}function C(){(0,N.Hh)(),(0,M.Hh)(),(0,D.load)()}function q(t,e){const n="rings"in t?l.A.fromJSON(t):h.A.fromJSON(t);if(e?.stagedPoint){const t=c.A.fromJSON(e.stagedPoint),r=("rings"in n?n.rings:n.paths).at(-1);if(r){const{x:e,y:o,z:i,m:s}=t,a=n.hasZ&&n.hasM?[e,o,i??0,s??0]:n.hasZ?[e,o,i??0]:n.hasM?[e,o,s??0]:[e,o];r.push(a)}}return n}function R(t){return function(t){const e=v.execute((0,d.fromGeometry)(t),null);return(0,d.toPoint)(e,(0,d.getSpatialReference)(t))}(t)}async function T(t,e){await(0,M.Hh)();const n=e?.unit??"meters";return(0,r.d_)((0,M.g7)(t,{...e,unit:n}),n)}function B({geometryJSON:t,options:e}){return T(q(t,e),e)}async function J({geometry1JSON:t,geometry2JSON:e,options:n}){await(0,D.load)();const o=c.A.fromJSON(t),i=c.A.fromJSON(e),s=n?.unit??"meters";return(0,r.d_)((0,D.execute)(o,i,{...n,unit:s}),s)}async function Y({geometry1JSON:t,geometry2JSON:e,options:n}){await(0,D.load)();const o=u.A.fromJSON(t),i=u.A.fromJSON(e);if(o.points.length!==i.points.length)throw new Error("Input multipoints must have the same number of points.");const s=o.points.length,a=n?.unit??"meters",c=[],l={...n,unit:a};for(let t=0;t<s;t++){const e=o.getPoint(t),n=i.getPoint(t);c.push(null!=e&&null!=n?(0,r.d_)((0,D.execute)(e,n,l),a):null)}return c}function Z({geometryJSON:t,options:e}){return j(q(t,e),e)}function j(t,e){const n=e?.unit??"square-meters",i=e?.lengthUnit??(0,o.Bd)(n),s=(0,S.g7)(t)??t,a=(0,g.g)(s,{unit:n,...e});return{area:(0,r.gT)(a,n),centroid:e?.returnCentroid?R(s).toJSON():void 0,length:e?.returnLength?L(s,{unit:i}):void 0}}function L(t,e){const n=e?.unit??"meters";return(0,r.d_)((0,_.execute)(t,{...e,unit:n}),n)}function X({geometryJSON:t,options:e}){return L(q(t,e),e)}function F({geometry1JSON:t,geometry2JSON:e,options:n}){const i=c.A.fromJSON(t),s=c.A.fromJSON(e),a=n?.unit??"meters";return(0,r.d_)(function(t,e,n={}){const{unit:r}=n;let i=P.execute((0,d.fromGeometry)(t),(0,d.fromGeometry)(e),null);if(i&&r){const e=(0,d.getSpatialReference)(t);i=(0,o.PQ)(i,e,r)}return i}(i,s,{...n,unit:a}),a)}async function k(t){return U(t.geometryJSON.spatialReference,G,Z)(t)}async function z(t){return U(t.geometryJSON.spatialReference,B,X)(t)}async function K(t){return U(t.geometry1JSON.spatialReference,J,F)(t)}async function W(t){const e=U(t.topLeftJSON.spatialReference,J,F),{topLeftJSON:n,topRightJSON:o,bottomRightJSON:i,bottomLeftJSON:s,options:a}=t,[u,c,l,h]=await Promise.all([e({geometry1JSON:s,geometry2JSON:i,options:a}),e({geometry1JSON:n,geometry2JSON:o,options:a}),e({geometry1JSON:i,geometry2JSON:o,options:a}),e({geometry1JSON:s,geometry2JSON:n,options:a})]);return{width:(0,r.T9)(u,c),height:(0,r.T9)(h,l)}}function U(t,e,n){switch(r=t,(0,E.EA)(r)||(0,E.K8)(r)?0:1){case 0:return e;case 1:return n}var r}function V(t){const{geometryJSON:e}=t,n=function(t){return t?(0,a.B3)(t)?(0,E.oT)(t)||(0,E.K8)(t)||(0,E.x1)(t)||(0,a.jA)(t)||(0,E.aI)(t,p.Y0)?{mode:1,spatialReference:p.Y0}:{mode:0,spatialReference:t}:{mode:1,spatialReference:(0,p.lO)(t)}:null}(e.spatialReference);if(!n)throw new Error("Cannot compute horizontal area without a valid spatial reference.");switch(n.mode){case 0:return Z(t);case 1:return function(t,{geometryJSON:e,options:n}){const r=q(e,n),o=nt,i=tt,s=et,a=(0,E.aI)(r.spatialReference,t.spatialReference)?r.clone():(0,m.projectWithoutEngine)(r,r.spatialReference,t.spatialReference);if(!a)throw new Error(`Cannot project geometry from ${r.spatialReference?.wkid??"unknown"} to ${t.spatialReference.wkid}.`);H(a,o,i,s);const{area:u,centroid:c,length:l}=j(a,n);return{area:u,centroid:$(c,o,i,s,t.spatialReference,r.spatialReference),length:l}}(n,t)}}function Q({geometryJSON:t}){const e=(0,I.rS)(t);if(!e)return null;const n=(0,S.g7)(e);return n?n.toJSON():null}function $(t,e,n,r,o,s){if(!t)return t;(0,i.hs)(n,n,t.x),(0,i.hs)(r,r,t.y);const a=rt;return(0,i.WQ)(a,n,r),(0,i.WQ)(a,a,e),t.x=a[0],t.y=a[1],t.z=a[2],t.spatialReference=o,(0,m.projectWithoutEngine)(t,t.spatialReference,s)?.toJSON()??void 0}function H(t,e,n,r){let o=0;(0,i.hZ)(e,0,0,0);for(const n of t.rings)for(const t of n)e[0]+=t[0],e[1]+=t[1],e[2]+=t[2],o++;(0,i.hs)(e,e,1/o);const s=ot;(0,i.S8)(s,e);const a=it,u=Math.atan2(s[1],s[0]);(0,i.hZ)(a,-Math.sin(u),Math.cos(u),0),(0,E.aI)(t.spatialReference,p.Y0)&&(w(e,s,p.GD,s,t.spatialReference),w(e,a,p.GD,a,t.spatialReference)),(0,O.YH)(a,s,n),(0,i.$A)(r,n,s);const c=rt;for(const o of t.rings)for(const t of o){(0,i.hZ)(c,t[0],t[1],t[2]),(0,i.Re)(c,c,e);const o=(0,i.Om)(n,c),s=(0,i.Om)(r,c);t[0]=o,t[1]=s}t.hasZ=!1,t.spatialReference=f.A.WebMercator}const tt=(0,s.vt)(),et=(0,s.vt)(),nt=(0,s.vt)(),rt=(0,s.vt)(),ot=(0,s.vt)(),it=(0,s.vt)()}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1150,2994,4294,5223,5360,6742,9397,9447,9716],{32198(t,e,n){function r(t,e,n,r){var o,i=arguments.length,s=i<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(s=(i<3?o(s):i>3?o(e,n,s):o(e,n))||s);return i>3&&s&&Object.defineProperty(e,n,s),s}function o(t,e,n){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=e[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=e[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(t){return Promise.reject(t)}}),t.stack.push({value:e,dispose:r,async:n})}else n&&t.stack.push({async:!0});return e}n.d(e,{Cg:()=>r,hk:()=>s,mS:()=>o}),Object.create,Object.create;var i="function"==typeof SuppressedError?SuppressedError:function(t,e,n){var r=new Error(n);return r.name="SuppressedError",r.error=t,r.suppressed=e,r};function s(t){function e(e){t.error=t.hasError?new i(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}var n,r=0;return function o(){for(;n=t.stack.pop();)try{if(!n.async&&1===r)return r=0,t.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(t){return e(t),o()})}else r|=1}catch(t){e(t)}if(1===r)return t.hasError?Promise.reject(t.error):Promise.resolve();if(t.hasError)throw t.error}()}},57694(t,e,n){n.d(e,{a:()=>s,c:()=>i});var r=n(55537),o=n(83661);function i(t,e){if(!t.isEmpty())switch(t.getGeometryType()){case r.G.enumPolygon:return a(t);case r.G.enumPolyline:return h(t.getImpl());case r.G.enumLine:case r.G.enumBezier:case r.G.enumEllipticArc:return function(t){const e=t.calculateLength2D();return 0===e?t.getStartXY():t.calculateWeightedCentroid2D().mul(1/e)}(t);case r.G.enumMultiPoint:return function(t){const e=new o.K(0),n=new o.K(0),r=t.getImpl(),i=r.getAttributeStreamRef(0),s=r.getPointCount(),a=new o.P;for(let t=0;t<s;t++)i.queryPoint2D(2*t,a),e.add(a.x),n.add(a.y);const u=new o.P;return u.setCoords(e.getResult(),n.getResult()),u.divThis(s)}(t);case r.G.enumEnvelope:return t.getCenterXY();case r.G.enumPoint:return t.getXY();default:return o.P.construct(Number.NaN,Number.NaN)}return o.P.construct(Number.NaN,Number.NaN)}function s(t,e){return a(t,e)}function a(t,e=-1){const n=new o.K(0),r=new o.K(0),i=t.getImpl();let s;const a=i.hasNonLinearSegments();let h;const m=i.getXY(0);if(-1===e){if(h=i.calculateArea2D(),0===h)return l(t);a&&(s=i.querySegmentIterator());for(let t=0,e=i.getPathCount();t<e;t++)u(m,i,t,n,r),a&&c(m,s,n,r)}else{if(h=i.calculateRingArea2D(e),0===h)return l(t,e);a&&(s=i.querySegmentIterator(),s.resetToPath(e)),u(m,i,e,n,r),a&&c(m,s,n,r)}const f=new o.P,p=new o.P;return f.setCoords(n.getResult(),r.getResult()),p.assign(f.mul(1/h).add(m)),p}function u(t,e,n,r,i){const s=e.getPathStart(n),a=e.getPathEnd(n);if(a-s<3)return;const u=e.getAttributeStreamRef(0),c=u.readPoint2D(2*s),l=u.readPoint2D(2*(s+1));l.subThis(c);const h=new o.K(0),m=e.hasNonLinearSegments(),f=1/3,p=new o.P;for(let t=s+2;t<a;t++){u.queryPoint2D(2*t,p),p.subThis(c);const e=.5*p.crossProduct(l);m&&h.add(e);const n=f*e;r.add((l.x+p.x)*n),i.add((l.y+p.y)*n),l.setCoordsPoint2D(p)}const g=m?h.getResult():e.calculateRingArea2D(n),y=c.sub(t).mul(g);r.add(y.x),i.add(y.y)}function c(t,e,n,o){let i;for(e.nextPath()||(0,r.d)("centroid");null!==(i=e.nextCurve());){const e=i.calculateWeightedAreaCentroid2D(t);n.add(e.x),o.add(e.y)}}function l(t,e=-1){return h(t.getImpl(),e)}function h(t,e=-1){const n=-1===e?t.calculateLength2D():t.calculatePathLength2D(e);if(0===n)return function(t,e=-1){if(-1!==e)return t.getXY(t.getPathStart(e));const n=new o.K(0),r=new o.K(0);for(let e=0;e<t.getPathCount();++e){const o=t.getXY(t.getPathStart(e));n.add(o.x),r.add(o.y)}return o.P.construct(n.getResult(),r.getResult()).mul(1/t.getPathCount())}(t,e);const r=new o.K(0),i=new o.K(0),s=t.querySegmentIterator();for(-1!==e&&s.resetToPath(e);s.nextPath();){const n=s.getPathIndex(),o=t.getXY(t.getPathStart(n));for(;s.hasNextSegment();){const t=s.nextSegment(),e=t.calculateLength2D();if(0===e)continue;const n=t.calculateWeightedCentroid2D().sub(o.mul(e));r.add(n.x),i.add(n.y)}const a=o.mul(t.calculatePathLength2D(n));if(r.add(a.x),i.add(a.y),-1!==e)break}const a=new o.P;return a.setCoords(r.getResult(),i.getResult()),a.mul(1/n)}},30921(t,e,n){n.d(e,{D:()=>N,m:()=>l,s:()=>d,w:()=>y});var r=n(32198),o=n(55537),i=n(88885),s=n(39117),a=n(83661),u=n(79187),c=n(95213);function l(){return{outPoint:new a.P,index:-1,t:Number.NaN}}function h(t,e,n){return{outPoint:t.clone(),index:e,t:n}}function m(t,e,n,r){t.outPoint.assign(e),t.index=n,t.t=r}function f(t,e){t.outPoint.assign(e.outPoint),t.index=e.index,t.t=e.t}function p(t,e,n,r){t.index=n,t.t=r,e.queryCoord2D(t.t,t.outPoint)}function g(t,e){const n=l();f(n,t),f(t,e),f(e,n)}function y(t,e,n,r,i,a){if(t.getGeometryType()===o.G.enumPolygon){for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment();if(0!==(0,s.K)(t,e.getEndXY(),0))return m(i,e.getEndXY(),-1,Number.NaN),m(a,e.getEndXY(),-1,Number.NaN),!0}r.resetToFirstPath()}if(e.getGeometryType()===o.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const t=n.nextSegment();if(0!==(0,s.K)(e,t.getEndXY(),0))return m(i,t.getEndXY(),-1,Number.NaN),m(a,t.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}return!1}function d(t){const e=t.getPathCount(),n=(0,a.d)(t.getSegmentCount(),0);let r=0;for(let o=0;o<e;++o){const e=r+t.getSegmentCountPath(o);for(let i=r,s=t.getPathStart(o);i<e;++i,++s)n[i]=s;r=e}return(0,i.s)(t.getPointCount(),n),n}function v(t,e){return!!Number.isNaN(e)||t<=e}function P(t){const e=new i.P;return e.addEnvelope(t,!1),e}class N{m_progressTracker;m_env2DgeometryA=null;m_env2DgeometryB=null;m_maxSqrDistance;m_maxDistance;m_progressCounter=0;m_bIsNearCalc;constructor(t,e){if(this.m_progressTracker=e,this.m_maxSqrDistance=t*t,this.m_maxDistance=t,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=t,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let t=Math.sqrt(this.m_maxSqrDistance);for(;t<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,t=Math.sqrt(this.m_maxSqrDistance)}}calculate(t,e,n,r){if((t.getGeometryType()!==c.P.type||e.getGeometryType()!==c.P.type)&&(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!v(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const o=h(new a.P,(0,a.j)(),Number.NaN),i=h(new a.P,(0,a.j)(),Number.NaN),s=this._ExecuteBruteForce(t,e,o,i);return v(s,this.m_maxDistance)?(null!==n&&f(n,o),null!==r&&f(r,i),s):Number.POSITIVE_INFINITY}isNear(t,e){if(this.m_bIsNearCalc=!0,t.isEmpty()||e.isEmpty())return!1;if(t===e)return!0;let n=!0;if(t.getGeometryType()!==c.P.type&&t.getGeometryType()!==c.E.type||e.getGeometryType()!==c.P.type&&e.getGeometryType()!==c.E.type||(n=!1),n){if(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,t.queryEnvelope(this.m_env2DgeometryA),e.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const r=h(new a.P,(0,a.j)(),Number.NaN),o=h(new a.P,(0,a.j)(),Number.NaN);return this._ExecuteBruteForce(t,e,r,o)<=this.m_maxDistance}progress_(t=!1){}_ExecuteBruteForce(t,e,n,r){switch(t.getGeometryType()){case o.G.enumPoint:return this.distancePointGeometry(t,e,n,r);case o.G.enumMultiPoint:return this.distanceMultipointGeometry(t,e,n,r);case o.G.enumEnvelope:return this.distanceEnvelopeGeometry(t,e,n,r);case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipathGeometry(t,e,n,r);default:return Number.NaN}}distancePointGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:return this.distancePointPoint(t,e,n,r);case o.G.enumMultiPoint:return this.distancePointMultipoint(t,e,n,r);case o.G.enumPolyline:case o.G.enumPolygon:return this.distancePointMultipath(t,e,n,r);case o.G.enumEnvelope:return this.distancePointEnvelope(t,e,n,r);default:return Number.NaN}}distancePointPoint(t,e,n,r){const o=t.getXY(),i=e.getXY();return m(n,o,0,0),m(r,i,0,0),Math.sqrt(a.P.sqrDistance(o,i))}distancePointMultipoint(t,e,n,r){const o=t.getXY();let i=this.m_maxSqrDistance,s=i,u=!1;const c=e.getPointCount(),l=new a.P;for(let t=0;t<c;++t)if(e.queryXY(t,l),s=a.P.sqrDistance(o,l),this.m_bIsNearCalc){if(s<=i)return 0}else if(!(s>i)&&(!u&&s===i||s<i)&&(i=s,m(n,o,0,0),m(r,l,t,0),u=!0,0===i))return 0;return u?Math.sqrt(i):Number.POSITIVE_INFINITY}distancePointMultipath(t,e,n,r){const i=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),c=t.getXY();if(!i&&e.getGeometryType()===o.G.enumPolygon&&0!==(0,s.K)(e,c,0))return m(n,c,0,0),m(r,c,-1,Number.NaN),0;e.getImpl().getAccelerators();let l=this.m_maxSqrDistance,h=l,f=-1;const p=new u.Envelope2D,g=e.querySegmentIterator();let y=!1;for(;g.nextPath();)for(;g.hasNextSegment();){const t=g.nextSegment();t.queryEnvelope(p);const e=p.sqrDistance(c);if(e>l)continue;if(!this.m_bIsNearCalc&&y&&e===l)continue;f=t.getClosestCoordinate(c,!1);const o=t.getCoord2D(f);if(h=a.P.sqrDistance(c,o),this.m_bIsNearCalc){if(h<=l)return 0}else if(!(h>l)&&(!y||h<l)&&(l=h,m(n,c,0,0),m(r,o,g.getStartPointIndex(),f),y=!0,0===l))return 0}return y?Math.sqrt(l):Number.POSITIVE_INFINITY}distancePointEnvelope(t,e,n,r){const o=t.getXY();m(n,o,0,0),m(r,o,-1,Number.NaN);const i=e.asEnvelope2D();return i.contains(o)?0:Math.sqrt(i.sqrDistance(o,r.outPoint))}distanceMultipointGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distancePointMultipoint(e,t,r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumMultiPoint:return this.distanceMultipointMultipoint(t,e,n,r,1,1);case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipointMultipath(t,e,n,r);case o.G.enumEnvelope:return this.distanceMultipointMultipath(t,P(e),n,r);default:return Number.NaN}}distanceMultipointMultipoint(t,e,n,o,i,s){const u={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===i&&1===s){const r=Math.trunc((0,a.s)(Math.sqrt(t.getPointCount())+1,1,(0,a.i)())),i=Math.trunc((0,a.s)(Math.sqrt(e.getPointCount())+1,1,(0,a.i)()));if((r>=4||i>=4)&&this.distanceMultipointMultipoint(t,e,n,o,r,i)<=this.m_maxSqrDistance)return 0}let c=this.m_maxSqrDistance;const l=[t],h=[e],f=this.swapGeometriesIfBGtA(l,h);f&&(this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),s=(0,a.c)(i,i=s),g(n,o)),(0,r.mS)(u,(0,a.h)(()=>{g(n,o),this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!f),!1);const p=l[0].getImpl(),y=h[0].getImpl(),d=p.getPointCount(),v=y.getPointCount(),P=v>1;let N=!1;const D=new a.P,M=new a.P;for(let t=0;t<d;t+=i){if(p.queryXY(t,D),P){const t=this.m_env2DgeometryB.sqrDistance(D);if(this.m_bIsNearCalc){if(t>c)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(D)<=c)return 0}else if(t>=c)continue}for(let e=0;e<v;e+=s){y.queryXY(e,M);const r=a.P.sqrDistance(D,M);if(this.m_bIsNearCalc){if(r<=c)return 0}else if(!(r>c||N&&r===c)&&(!N||r<c)&&(m(n,D,t,0),m(o,M,e,0),N=!0,c=r,0===c))return N?Math.sqrt(c):Number.POSITIVE_INFINITY}}return N?Math.sqrt(c):Number.POSITIVE_INFINITY}catch(t){u.error=t,u.hasError=!0}finally{(0,r.hk)(u)}}distanceMultipointMultipath(t,e,n,r){let i=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&e.getGeometryType()===o.G.enumPolygon;const c=e.querySegmentIterator();c.stripAttributes();const l=new u.Envelope2D,h=new a.P;let f=this.m_maxSqrDistance;const p=t.getImpl(),g=p.getPointCount(),y=g>1;let d=!1;for(;c.nextPath();)for(;c.hasNextSegment();){const t=c.nextSegment();if(t.queryLooseEnvelope(l),y){const t=l.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(t>f)continue}else if(t>f||d&&t===f)continue}for(let o=0;o<g;o++){if(p.queryXY(o,h),i&&0!==(0,s.K)(e,h,0))return m(n,h,-1,Number.NaN),m(r,h,o,0),0;{const t=l.sqrDistance(h);if(this.m_bIsNearCalc){if(t>f)continue}else if(t>f)continue}const a=t.getClosestCoordinate(h,!1),u=t.getCoord2D(a);h.subThis(u);const g=h.sqrLength();if(this.m_bIsNearCalc){if(g<=f)return 0}else if(!(g>f)&&(!d||g<f)&&(f=g,m(n,p.getXY(o),o,0),m(r,u,c.getStartPointIndex(),a),d=!0,0===f))return 0}i=!1}return d?Math.sqrt(f):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:return this.distancePointEnvelope(e,t,r,n);case o.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distanceMultipointMultipath(e,P(t),r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipathMultipath(P(t),e,n,r);case o.G.enumEnvelope:return this.distanceEnvelopeEnvelope(t,e,n,r);default:return Number.NaN}}distanceEnvelopeEnvelope(t,e,n,r){n.t=Number.NaN,n.index=-1,r.t=Number.NaN,r.index=-1;const o=t.asEnvelope2D(),i=e.asEnvelope2D();return Math.sqrt(o.sqrDistanceEnvelope(i,n.outPoint,r.outPoint))}distanceMultipathGeometry(t,e,n,r){switch(e.getGeometryType()){case o.G.enumPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distancePointMultipath(e,t,r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumMultiPoint:{this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const o=this.distanceMultipointMultipath(e,t,r,n);return this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),o}case o.G.enumPolyline:case o.G.enumPolygon:return this.distanceMultipathMultipath(t,e,n,r);case o.G.enumEnvelope:return this.distanceMultipathMultipath(t,P(e),n,r);default:return Number.NaN}}distanceMultipathMultipath(t,e,n,o){const s={stack:[],error:void 0,hasError:!1};try{const c=[t],h=[e],m=this.swapGeometriesIfAGtB(c,h);m&&(this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),g(n,o)),(0,r.mS)(s,(0,a.h)(()=>{g(n,o),this.m_env2DgeometryB=(0,a.c)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)},!m),!1);const v=c[0],P=h[0],N=v.querySegmentIterator();N.stripAttributes();const D=P.querySegmentIterator();if(D.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const t=Math.trunc((0,a.s)(Math.sqrt(v.getPointCount())+1,1,(0,a.i)())),e=Math.trunc((0,a.s)(Math.sqrt(v.getPointCount())+1,1,(0,a.i)()));if(this.distanceMultipointMultipoint(v,P,n,o,t,e)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const t=l(),e=l();if(y(v,P,N,D,t,e))return f(n,t),f(o,e),0}const M=d(v),_=[],S=new i.S,b=new u.Envelope2D,w=new u.Envelope2D,x=new u.Envelope2D;let A=this.m_maxSqrDistance,I=!0,E=!1;for(let t=0,e=M.length;t<e;++t){v.querySegment(M[t],S,!0);const e=S.get();if(e.queryEnvelope(b),!(b.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>A)){if(this.m_bIsNearCalc&&b.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=A)return 0;for(;D.nextPath();){if(this.progress_(),I)P.queryPathEnvelope(D.getPathIndex(),x),_[D.getPathIndex()]=x.clone();else if(b.sqrDistanceEnvelope(_[D.getPathIndex()],null,null)>A)continue;for(;D.hasNextSegment();){const r=D.nextSegment();if(r.queryEnvelope(w),b.sqrDistanceEnvelope(w,null,null)<=A){const i=!b.isIntersecting(w),s=[0],a=[0];let u=e.distance(r,i,s,a);if(u*=u,this.m_bIsNearCalc&&u<=this.m_maxSqrDistance)return 0;if(u<A||u===A&&M[t]<n.index){if(E=!0,p(n,e,M[t],s[0]),p(o,r,D.getStartPointIndex(),a[0]),0===u)return 0;A=u}}}}D.resetToFirstPath(),I=!1}}return E?Math.sqrt(A):Number.POSITIVE_INFINITY}catch(t){s.error=t,s.hasError=!0}finally{(0,r.hk)(s)}}swapGeometriesIfAGtB(t,e){return(0,o.v)(t[0])>(0,o.v)(e[0])&&(e[0]=(0,a.c)(t[0],t[0]=e[0]),!0)}swapGeometriesIfBGtA(t,e){return this.swapGeometriesIfAGtB(e,t)}}},9447(t,e,n){n.d(e,{OperatorCentroid2D:()=>o});var r=n(57694);class o{getOperatorType(){return 10205}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}execute(t,e){return(0,r.c)(t)}}},22994(t,e,n){n.d(e,{OperatorDistance:()=>i});var r=n(55537),o=n(30921);class i{getOperatorType(){return 10100}supportsCurves(){return!0}accelerateGeometry(t,e,n){return!1}canAccelerateGeometry(t){return!1}execute(t,e,n){return this.executeEx(t,e,n,null,null,Number.NaN)}executeEx(t,e,n,i,s,a){if(t.isEmpty()||e.isEmpty())return Number.NaN;(0,r.c)(t),(0,r.c)(e);const u=t,c=e;Number.isNaN(a)&&(a=Number.POSITIVE_INFINITY);const l=new o.D(a,n).calculate(u,c,i,s);return Number.isFinite(l)?l:Number.NaN}}},69540(t,e,n){var r=n(32198),o=n(69622),i=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(88620),u=n(64108);const c=Symbol("ClonableMixin"),l=t=>{var e;const n=t;let o=class extends n{constructor(){super(...arguments),this[e]=!0}static{e=c}clone(t){const e=(0,a.oY)(this);(0,s.Lw)(e,"unable to clone instance of non-accessor class");const n=e.metadata,r=e.store,o={},u=new Map;for(const e in n){const s=n[e],a=r?.originOf(e),c=s.clonable;if(s.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const l=this[e];let h=null;if("function"==typeof c)h=c(l,t);else if("reference"===c)h=l;else if(h=(0,i.TU)(l,t),null!=l&&null==h)continue;0===a?u.set(e,h):o[e]=h}const c=new(0,Object.getPrototypeOf(this).constructor)(o);if(u.size){const t=(0,a.oY)(c)?.store;if(t)for(const[e,n]of u)t.set(e,n,0)}return c}};return o=(0,r.Cg)([(0,u.$)("esri.core.Clonable")],o),o},h=l(o.A);n.d(e,["OU",0,l,"Pw",0,h])},95488(t,e,n){n.d(e,{I:()=>o});var r=n(11406);class o extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},51850(t,e,n){function r(){return[0,0,0]}function o(t){return[t[0],t[1],t[2]]}function i(t,e,n){return[t,e,n]}function s(t,e,n){return[t,e,n]}function a(t,e=[0,0,0]){const n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function u(){return i(1,1,1)}function c(){return i(1,0,0)}function l(){return i(0,1,0)}function h(){return i(0,0,1)}n.d(e,{CN:()=>s,ci:()=>a,fA:()=>i,o8:()=>o,vt:()=>r});const m=[0,0,0],f=u(),p=c(),g=l(),y=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_X:p,UNIT_Y:g,UNIT_Z:y,ZEROS:m,clone:o,create:r,freeze:s,fromArray:a,fromValues:i,ones:u,unitX:c,unitY:l,unitZ:h,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,y,"Cw",0,p,"JP",0,g,"Un",0,f,"uY",0,m])},35522(t,e,n){n.d(e,{$A:()=>b,Bw:()=>i,C:()=>s,Cc:()=>w,DI:()=>M,Io:()=>v,Ln:()=>d,Om:()=>S,Qr:()=>h,Re:()=>c,S8:()=>_,T9:()=>g,WQ:()=>u,Z0:()=>x,_S:()=>f,aI:()=>q,ei:()=>A,fw:()=>E,gL:()=>I,hG:()=>P,hZ:()=>a,hs:()=>y,jk:()=>p,lw:()=>l,m3:()=>N,oW:()=>R,t2:()=>C,tn:()=>m,ze:()=>D});var r=n(51850),o=n(34304);function i(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function c(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function m(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function f(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function p(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function g(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function y(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function d(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function v(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return Math.sqrt(n*n+r*r+o*o)}function P(t,e){const n=e[0]-t[0],r=e[1]-t[1],o=e[2]-t[2];return n*n+r*r+o*o}function N(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function D(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function M(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function _(t,e){const n=e[0],r=e[1],o=e[2];let i=n*n+r*r+o*o;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function b(t,e,n){const r=e[0],o=e[1],i=e[2],s=n[0],a=n[1],u=n[2];return t[0]=o*u-i*a,t[1]=i*s-r*u,t[2]=r*a-o*s,t}function w(t,e,n,r){const o=e[0],i=e[1],s=e[2];return t[0]=o+r*(n[0]-o),t[1]=i+r*(n[1]-i),t[2]=s+r*(n[2]-s),t}function x(t,e,n){const r=e[0],o=e[1],i=e[2];return t[0]=n[0]*r+n[4]*o+n[8]*i+n[12],t[1]=n[1]*r+n[5]*o+n[9]*i+n[13],t[2]=n[2]*r+n[6]*o+n[10]*i+n[14],t}function A(t,e,n){const r=e[0],o=e[1],i=e[2];return t[0]=r*n[0]+o*n[3]+i*n[6],t[1]=r*n[1]+o*n[4]+i*n[7],t[2]=r*n[2]+o*n[5]+i*n[8],t}function I(t,e,n){return E(t,e,n[0],n[1],n[2],n[3])}function E(t,e,n,r,o,i){const s=e[0],a=e[1],u=e[2],c=r*u-o*a,l=o*s-n*u,h=n*a-r*s,m=r*h-o*l,f=o*c-n*h,p=n*l-r*c,g=2*i;return t[0]=s+c*g+2*m,t[1]=a+l*g+2*f,t[2]=u+h*g+2*p,t}const O=(0,r.vt)(),G=(0,r.vt)();function C(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function q(t,e){if(t===e)return!0;const n=t[0],r=t[1],i=t[2],s=e[0],a=e[1],u=e[2],c=(0,o.FD)();return Math.abs(n-s)<=c*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-a)<=c*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(i-u)<=c*Math.max(1,Math.abs(i),Math.abs(u))}function R(t,e,n){const r=n[0]-e[0],o=n[1]-e[1],i=n[2]-e[2];let s=r*r+o*o+i*i;return s>0?(s=1/Math.sqrt(s),t[0]=r*s,t[1]=o*s,t[2]=i*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const T=c,B=l,J=h,Y=v,Z=P,j=i,L=N;Object.freeze(Object.defineProperty({__proto__:null,abs:m,add:u,angle:function(t,e){_(O,t),_(G,e);const n=S(O,G);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,o,i){const s=1-i,a=s*s,u=i*i,c=a*s,l=3*i*a,h=3*u*s,m=u*i;return t[0]=e[0]*c+n[0]*l+r[0]*h+o[0]*m,t[1]=e[1]*c+n[1]*l+r[1]*h+o[1]*m,t[2]=e[2]*c+n[2]*l+r[2]*h+o[2]*m,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:s,cross:b,crossAndNormalize:function(t,e,n){const r=e[0],o=e[1],i=e[2],s=n[0],a=n[1],u=n[2],c=o*u-i*a,l=i*s-r*u,h=r*a-o*s,m=Math.sqrt(c*c+l*l+h*h);return t[0]=c/m,t[1]=l/m,t[2]=h/m,t},direction:R,dist:Y,distance:v,div:J,divide:h,dot:S,equals:q,exactEquals:C,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,o,i){const s=i*i,a=s*(2*i-3)+1,u=s*(i-2)+i,c=s*(i-1),l=s*(3-2*i);return t[0]=e[0]*a+n[0]*u+r[0]*c+o[0]*l,t[1]=e[1]*a+n[1]*u+r[1]*c+o[1]*l,t[2]=e[2]*a+n[2]*u+r[2]*c+o[2]*l,t},inverse:M,len:j,length:i,lerp:w,max:g,min:p,mul:B,multiply:l,negate:D,normalize:_,random:function(t,e=1){const n=o.Ov,r=2*n()*Math.PI,i=2*n()-1,s=Math.sqrt(1-i*i)*e;return t[0]=Math.cos(r)*s,t[1]=Math.sin(r)*s,t[2]=i*e,t},rotateX:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0],i[1]=o[1]*Math.cos(r)-o[2]*Math.sin(r),i[2]=o[1]*Math.sin(r)+o[2]*Math.cos(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateY:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[2]*Math.sin(r)+o[0]*Math.cos(r),i[1]=o[1],i[2]=o[2]*Math.cos(r)-o[0]*Math.sin(r),t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},rotateZ:function(t,e,n,r){const o=[],i=[];return o[0]=e[0]-n[0],o[1]=e[1]-n[1],o[2]=e[2]-n[2],i[0]=o[0]*Math.cos(r)-o[1]*Math.sin(r),i[1]=o[0]*Math.sin(r)+o[1]*Math.cos(r),i[2]=o[2],t[0]=i[0]+n[0],t[1]=i[1]+n[1],t[2]=i[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:y,scaleAndAdd:d,scaleTo:function(t,e){return y(t,t,e/j(t))},set:a,sign:f,sqrDist:Z,sqrLen:L,squaredDistance:P,squaredLength:N,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:T,subtract:c,transformMat3:A,transformMat4:x,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:I,transformQuatValues:E},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,j,"jb",0,T,"lo",0,Z,"uE",0,L])},69397(t,e,n){n.d(e,{Qf:()=>a,Qh:()=>i,lM:()=>o});var r=n(34275);function o(t){if(!t)return 0;let e=c;for(const n in t)t.hasOwnProperty(n)&&(e+=s(t[n],!1));return e}function i(t){if(!t)return 0;if("number"==typeof t[0])return a(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return u(t,8);let n=l;for(let r=0;r<e;r++)n+=s(t[r]);return n}(t);let e=c;for(const n in t)t.hasOwnProperty(n)&&(e+=s(t[n]));return e}function s(t,e=!0){switch(typeof t){case"object":return e?i(t):c;case"string":return function(t){return 32+t.length}(t);case"number":return 16;case"boolean":return 4;default:return 8}}function a(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+h:Array.isArray(e)?u(e,16):0:0),0)}function u(t,e){return l+t.length*e}const c=32,l=16,h=145},17799(t,e,n){n.d(e,{T9:()=>a,d_:()=>o,gT:()=>i});var r=n(86211);function o(t,e){return{type:(0,r.t$)(e),value:t,unit:e}}function i(t,e){return{type:(0,r.t$)(e),value:t,unit:e}}function s(t,e,n="arithmetic"){return{type:(0,r.t$)(e),value:t,unit:e,rotationType:n}}function a(t,e){return null==t?e:null==e||t.value>(0,r.oU)(e.value,e.unit,t.unit)?t:e}o(0,"meters"),i(0,"square-meters"),s(0,"radians"),s(0,"degrees"),s(0,"degrees","geographic")},48526(t,e,n){n.d(e,{A:()=>y});var r,o=n(32198),i=n(4576),s=n(4718),a=n(91429),u=n(5443),c=n(91075),l=n(86738),h=n(16930),m=n(90634),f=n(47610),p=n(56993),g=n(43937);let y=r=class extends c.A{constructor(t){super(function(t){if(!t)return;let{points:e,hasM:n,hasZ:r,spatialReference:o}=t;switch(e??=[],e?.at(0)?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return o??=h.A.WGS84,{...t,hasM:n,hasZ:r,points:e,spatialReference:o}}(t)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){const t=(0,m.ge)(this);return t?new u.A({...t,spatialReference:this.spatialReference}):null}writePoints(t,e){e.points=(0,s.o8)(this.points)}clone(){const{points:t,spatialReference:e,hasM:n,hasZ:o}=this;return new r({points:(0,s.o8)(t),spatialReference:e.clone(),hasM:n,hasZ:o})}equals(t){if(this===t)return!0;if(null==t)return!1;const e=this.spatialReference,n=t.spatialReference;return null!=e==(null!=n)&&!(null!=e&&null!=n&&!e.equals(n))&&(0,i.aI)(this.points,t.points,f.v6)}addPoint(t){return(0,p.h)(this,t),Array.isArray(t)?this.points.push(t):this.points.push(t.toArray()),this.notifyChange("points"),this}getPoint(t){if(!this._validateInputs(t))return null;const e=this.points[t],n={x:e[0],y:e[1],spatialReference:this.spatialReference};let r=2;return this.hasZ&&(n.z=e[2],r=3),this.hasM&&(n.m=e[r]),new l.A(n)}removePoint(t){if(!this._validateInputs(t))return null;const e=new l.A(this.points.splice(t,1)[0],this.spatialReference);return this.notifyChange("points"),e}setPoint(t,e){return this._validateInputs(t)?((0,p.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.points[t]=e,this.notifyChange("points"),this):this}toJSON(t){return this.write({},t)}_validateInputs(t){return null!=t&&t>=0&&t<this.points.length}};(0,o.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,o.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,o.Cg)([(0,a.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,o.Cg)([(0,g.K)("points")],y.prototype,"writePoints",null),y=r=(0,o.Cg)([(0,a.$K)("esri.geometry.Multipoint")],y),y.prototype.toJSON.isDefaultToJSON=!0},82799(t,e,n){n.d(e,{A:()=>p});var r,o=n(32198),i=n(4718),s=n(91429),a=n(5443),u=n(91075),c=n(86738),l=n(16930),h=n(90634),m=n(56993),f=n(43937);let p=r=class extends u.A{constructor(t){super(function(t){if(!t)return;let{paths:e,hasM:n,hasZ:r,spatialReference:o}=t;switch(e??=[],function(t){return"number"==typeof t[0]?.[0]}(e)&&(e=[e]),e[0]?.[0]?.length){case 4:r??=!0,n??=!0;break;case 3:r??=!0!==n,n??=!r;break;default:r??=!1,n??=!1}return o??=l.A.WGS84,{...t,hasM:n,hasZ:r,paths:e,spatialReference:o}}(t)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(t,e){e.curvePaths=(0,i.o8)(t)}get extent(){const t=(0,h.Z3)(this),{spatialReference:e}=this;return t?new a.A({...t,spatialReference:e}):null}writePaths(t,e){e.paths=(0,i.o8)(this.paths)}addPath(t){if(!t)return;const e=this.paths,n=e.length;if(function(t){return!Array.isArray(t[0])}(t)){const r=[];for(let e=0,n=t.length;e<n;e++)r[e]=t[e].toArray();e[n]=r}else e[n]=t.slice();return this.notifyChange("paths"),this}clone(){const t=new r;return t.spatialReference=this.spatialReference,t.paths=(0,i.o8)(this.paths),t.curvePaths=(0,i.o8)(this.curvePaths),t.hasZ=this.hasZ,t.hasM=this.hasM,t}getPoint(t,e){if(!this._validateInputs(t,e))return null;const n=this.paths[t][e],r=this.hasZ,o=this.hasM;return r&&!o?new c.A(n[0],n[1],n[2],void 0,this.spatialReference):o&&!r?new c.A(n[0],n[1],void 0,n[2],this.spatialReference):r&&o?new c.A(n[0],n[1],n[2],n[3],this.spatialReference):new c.A(n[0],n[1],this.spatialReference)}insertPoint(t,e,n){return this._validateInputs(t,e,!0)?((0,m.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t].splice(e,0,n),this.notifyChange("paths"),this):this}removePath(t){if(!this._validateInputs(t,null))return null;const e=this.paths.splice(t,1)[0],n=this.spatialReference,r=e.map(t=>new c.A(t,n));return this.notifyChange("paths"),r}removePoint(t,e){if(!this._validateInputs(t,e))return null;const n=new c.A(this.paths[t].splice(e,1)[0],this.spatialReference);return this.notifyChange("paths"),n}setPoint(t,e,n){return this._validateInputs(t,e)?((0,m.h)(this,n),Array.isArray(n)||(n=n.toArray()),this.paths[t][e]=n,this.notifyChange("paths"),this):this}_validateInputs(t,e,n=!1){if(null==t||t<0||t>=this.paths.length)return!1;if(null!=e){const r=this.paths[t];if(n&&(e<0||e>r.length))return!1;if(!n&&(e<0||e>=r.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,o.Cg)([(0,s.MZ)({readOnly:!0})],p.prototype,"cache",null),(0,o.Cg)([(0,s.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],p.prototype,"curvePaths",void 0),(0,o.Cg)([(0,f.K)("curvePaths")],p.prototype,"writeCurvePaths",null),(0,o.Cg)([(0,s.MZ)({readOnly:!0})],p.prototype,"extent",null),(0,o.Cg)([(0,s.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],p.prototype,"paths",void 0),(0,o.Cg)([(0,f.K)("paths")],p.prototype,"writePaths",null),p=r=(0,o.Cg)([(0,s.$K)("esri.geometry.Polyline")],p),p.prototype.toJSON.isDefaultToJSON=!0},95624(t,e,n){n.d(e,{g:()=>i});var r=n(86211),o=n(78125);function i(t,e={}){const{unit:n}=e;let i=(0,o.fromGeometry)(t).calculateArea2D();if(i&&n){const e=(0,o.getSpatialReference)(t);if(e.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const s=(0,r.B5)(e);s!==n&&(s?i=(0,r.oU)(i,s,n):(i=Math.sqrt(i),i*=(0,r.GA)(e),i**=2,i=(0,r.oU)(i,"square-meters",n)))}return i}},89506(t,e,n){n.d(e,{Hh:()=>l,g7:()=>h});var r=n(86211),o=n(86742),i=n(5808);let s,a,u,c;async function l(){if(!s||!(0,o.s)()){const[t]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),(0,o.load)()]);s=t.fromGeometry,a=t.fromSpatialReference,u=t.getSpatialReference,c=(0,o.f)()}}function h(t,e={}){const{curveType:n="geodesic",unit:c}=e,l=u(t);let h=(0,o.execute)(s(t),a(l),i.O[n]);return h&&c&&(h=(0,r.oU)(h,"square-meters",c)),h}},95360(t,e,n){n.r(e),n.d(e,{execute:()=>m,isLoaded:()=>l,load:()=>h,supportsCurves:()=>c});var r=n(86211),o=n(29716),i=n(5808);let s,a,u,c;function l(){return!!s&&(0,o.s)()}async function h(){if(!l()){const[t]=await Promise.all([Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(3299),n.e(1550)]).then(n.bind(n,78125)),(0,o.load)()]);s=t.fromGeometry,a=t.fromSpatialReference,u=t.getSpatialReference,c=(0,o.f)()}}function m(t,e,n={}){const{curveType:c="geodesic",unit:l}=n,h=u(t);let m=(0,o.execute)(s(t),s(e),a(h),i.O[c]);return m&&l&&(m=(0,r.oU)(m,"meters",l)),m}},40427(t,e,n){n.d(e,{Hh:()=>l,g7:()=>h});var r=n(86211),o=n(35223),i=n(5808);let s,a,u,c;async function l(){if(!s||!(0,o.s)()){const[t]=await Promise.all([Promise.resolve().then(n.bind(n,78125)),(0,o.load)()]);s=t.fromGeometry,a=t.fromSpatialReference,u=t.getSpatialReference,c=(0,o.f)()}}function h(t,e={}){const{curveType:n="geodesic",unit:c}=e,l=u(t);let h=(0,o.execute)(s(t),a(l),i.O[n]);return h&&c&&(h=(0,r.oU)(h,"meters",c)),h}},86742(t,e,n){n.d(e,{execute:()=>a,f:()=>u,load:()=>s,s:()=>i});var r=n(83290);let o;function i(){return!!o&&(0,r.i)()}async function s(){if(!i()){const[t,e]=await Promise.all([Promise.all([n.e(2024),n.e(6558)]).then(n.bind(n,6558)),n.e(3375).then(n.bind(n,15756)).then(({injectPe:t})=>t),(0,r.l)()]);o=new t.OperatorGeodeticArea,e(r.p)}}function a(t,e,n){return o.execute(t,e,n,null)}function u(){return o.supportsCurves()}},29716(t,e,n){n.d(e,{execute:()=>a,f:()=>u,load:()=>s,s:()=>i});var r=n(83290);let o;function i(){return!!o&&(0,r.i)()}async function s(){if(!i()){const[t,e]=await Promise.all([Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(2024),n.e(3394)]).then(n.bind(n,12764)),Promise.all([n.e(9187),n.e(8885),n.e(9117),n.e(8344)]).then(n.bind(n,15756)).then(({injectPe:t})=>t),(0,r.l)()]);o=new t.OperatorGeodeticDistance,e(r.p)}}function a(t,e,n,r){return o.execute(t,e,n,r,null)}function u(){return o.supportsCurves()}},35223(t,e,n){n.d(e,{execute:()=>a,f:()=>u,load:()=>s,s:()=>i});var r=n(83290);let o;function i(){return!!o&&(0,r.i)()}async function s(){if(!i()){const[t,e]=await Promise.all([n.e(8879).then(n.bind(n,28879)),n.e(3375).then(n.bind(n,15756)).then(({injectPe:t})=>t),(0,r.l)()]);o=new t.OperatorGeodeticLength,e(r.p)}}function a(t,e,n){return o.execute(t,e,n,null)}function u(){return o.supportsCurves()}},81150(t,e,n){n.d(e,{execute:()=>s,f:()=>c,isSimpleAsFeature:()=>u,z:()=>a});var r=n(76061),o=(n(55537),n(88885),n(39117));n(95213);const i=new o.J;function s(t,e,n){return i.execute(t,e,n,null)}function a(t,e,n){const o=i.executeMany(new r.S(t),e,n,null);return Array.from(o)}function u(t,e,n){return i.isSimpleAsFeature(t,e,n,null,null)}function c(){return i.supportsCurves()}},23914(t,e,n){n.d(e,{g7:()=>i});var r=n(81150),o=n(78125);function i(t){const e=(0,o.getSpatialReference)(t);return(0,o.toGeometry)((0,r.execute)((0,o.fromGeometry)(t),(0,o.fromSpatialReference)(e),!1),e)}(0,r.f)()},5808(t,e,n){n.d(e,["O",0,{geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}])},65806(t,e,n){n.d(e,{g:()=>s});var r=n(51850),o=n(99917),i=n(9762);function s(t,e,n,r){if((0,o.canProjectWithoutEngine)(t.spatialReference,n))return a[0]=t.x,a[1]=t.y,a[2]=t.z??0,(0,i.projectBuffer)(a,t.spatialReference,0,e,n,0);const s=(0,o.tryProject)(t,n,r);return!!s&&(e[0]=s.x,e[1]=s.y,e[2]=s.z??0,!0)}const a=(0,r.vt)()},27993(t,e,n){n.d(e,{F:()=>a});var r=n(99917),o=n(16930),i=n(9762),s=n(65806);function a(t,e,n,o){return!(null==e||null==o||t.length<2)&&((0,r.canProjectWithoutEngine)(e,o)?(0,i.projectBuffer)(t,e,0,n,o,0,1):(u.x=t[0],u.y=t[1],u.z=t[2],u.spatialReference=e,(0,s.g)(u,n,o)))}const u={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},60408(t,e,n){function r(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function o(t){return void 0!==t.points}function i(t){return void 0!==t.x&&void 0!==t.y}function s(t){return void 0!==t.paths||void 0!==t.curvePaths}function a(t){return void 0!==t.rings||void 0!==t.curveRings}function u(t){return"object"==typeof t&&"vertexAttributes"in t}function c(t){return t?i(t)?"esriGeometryPoint":s(t)?"esriGeometryPolyline":a(t)?"esriGeometryPolygon":r(t)?"esriGeometryEnvelope":o(t)?"esriGeometryMultipoint":null:null}function l(t){return null!=t&&("hasZ"in t&&t.hasZ||"z"in t&&null!=t.z)}function h(t){return null!=t&&("hasM"in t&&t.hasM||"m"in t&&null!=t.m)}n.d(e,{$B:()=>c,Bi:()=>a,Pv:()=>l,Rg:()=>s,U9:()=>o,W0:()=>h,ZC:()=>r,fT:()=>i,uW:()=>u})},65864(t,e,n){n.d(e,{rS:()=>l,xD:()=>m});var r=n(5443),o=n(91075),i=n(48526),s=n(86738),a=n(39829),u=n(82799),c=n(60408);function l(t){return null==t?null:t instanceof o.A?t:(0,c.fT)(t)?s.A.fromJSON(t):(0,c.Rg)(t)?u.A.fromJSON(t):(0,c.Bi)(t)?a.A.fromJSON(t):(0,c.U9)(t)?i.A.fromJSON(t):(0,c.ZC)(t)?r.A.fromJSON(t):null}const h={esriGeometryPoint:s.A,esriGeometryPolyline:u.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:r.A,esriGeometryMultipoint:i.A,esriGeometryMultiPatch:a.A};function m(t){return t&&h[t]||null}},32728(t,e,n){n.d(e,{YH:()=>s,nu:()=>a,wp:()=>i}),n(34727);var r=n(35522),o=n(51850);function i(t,e){const n=Math.sqrt(e[0]*e[0]+e[4]*e[4]+e[8]*e[8]),o=Math.sqrt(e[1]*e[1]+e[5]*e[5]+e[9]*e[9]),i=Math.sqrt(e[2]*e[2]+e[6]*e[6]+e[10]*e[10]);return(0,r.hZ)(t,n,o,i),t}function s(t,e,n){n=n||t;const o=(0,r.Om)(t,e);(0,r.hZ)(n,t[0]-o*e[0],t[1]-o*e[1],t[2]-o*e[2]),(0,r.S8)(n,n)}function a(t,e,n,i=(0,o.vt)()){const s=(0,r.Bw)(t),a=(0,r.Bw)(e),l=(0,r.Om)(t,e)/(s*a);if(l<.9999999999999999){const o=Math.acos(l),h=((1-n)*s+n*a)/Math.sin(o),m=h/s*Math.sin((1-n)*o),f=h/a*Math.sin(n*o);return(0,r.hs)(u,t,m),(0,r.hs)(c,e,f),(0,r.WQ)(i,u,c)}return(0,r.Cc)(i,t,e,n)}(0,o.vt)(),(0,o.vt)(),(0,o.vt)();const u=(0,o.vt)(),c=(0,o.vt)()},15554(t,e,n){n.r(e),n.d(e,{area2D:()=>Z,areaHorizontal:()=>V,autoArea2D:()=>k,autoDistance2DBetweenPoints:()=>K,autoLength2D:()=>z,autoSize2D:()=>W,distance2DBetweenPoints:()=>F,geodeticArea:()=>G,geodeticDistanceBetweenPoints:()=>J,geodeticDistanceBetweenPointsMany:()=>Y,geodeticLength:()=>B,length2D:()=>X,preloadGeodetic:()=>C,simplify:()=>Q});var r=n(17799),o=n(86211),i=n(35522),s=n(51850),a=n(73941),u=n(48526),c=n(86738),l=n(39829),h=n(82799),m=n(99917),f=n(16930),p=n(98764),g=n(95624),y=n(9447),d=n(78125);const v=new y.OperatorCentroid2D;v.supportsCurves();const P=new(n(22994).OperatorDistance);P.supportsCurves();var N=n(89506),D=n(95360),M=n(40427),_=n(965),S=n(23914),b=n(27993);function w(t,e,n,r,o){(0,i.C)(x,t),(0,i.WQ)(A,t,e),(0,b.F)(x,n,x,o),(0,b.F)(A,n,A,o),(0,i.Re)(r,A,x),(0,i.S8)(r,r)}const x=(0,s.vt)(),A=(0,s.vt)();var I=n(65864),E=n(21325),O=n(32728);async function G({geometryJSON:t,options:e}){await Promise.allSettled([(0,N.Hh)(),e?.returnLength?(0,M.Hh)():void 0]);const n=q(t,e),i=e?.unit??"square-meters",s=(0,S.g7)(n)??n,a=(0,N.g7)(s,{unit:i,...e}),u=(0,r.gT)(a,i),c=e?.lengthUnit??(0,o.Bd)(i);return{area:u,centroid:e?.returnCentroid?R(s).toJSON():void 0,length:e?.returnLength?await T(s,{unit:c}):void 0}}function C(){(0,N.Hh)(),(0,M.Hh)(),(0,D.load)()}function q(t,e){const n="rings"in t?l.A.fromJSON(t):h.A.fromJSON(t);if(e?.stagedPoint){const t=c.A.fromJSON(e.stagedPoint),r=("rings"in n?n.rings:n.paths).at(-1);if(r){const{x:e,y:o,z:i,m:s}=t,a=n.hasZ&&n.hasM?[e,o,i??0,s??0]:n.hasZ?[e,o,i??0]:n.hasM?[e,o,s??0]:[e,o];r.push(a)}}return n}function R(t){return function(t){const e=v.execute((0,d.fromGeometry)(t),null);return(0,d.toPoint)(e,(0,d.getSpatialReference)(t))}(t)}async function T(t,e){await(0,M.Hh)();const n=e?.unit??"meters";return(0,r.d_)((0,M.g7)(t,{...e,unit:n}),n)}function B({geometryJSON:t,options:e}){return T(q(t,e),e)}async function J({geometry1JSON:t,geometry2JSON:e,options:n}){await(0,D.load)();const o=c.A.fromJSON(t),i=c.A.fromJSON(e),s=n?.unit??"meters";return(0,r.d_)((0,D.execute)(o,i,{...n,unit:s}),s)}async function Y({geometry1JSON:t,geometry2JSON:e,options:n}){await(0,D.load)();const o=u.A.fromJSON(t),i=u.A.fromJSON(e);if(o.points.length!==i.points.length)throw new Error("Input multipoints must have the same number of points.");const s=o.points.length,a=n?.unit??"meters",c=[],l={...n,unit:a};for(let t=0;t<s;t++){const e=o.getPoint(t),n=i.getPoint(t);c.push(null!=e&&null!=n?(0,r.d_)((0,D.execute)(e,n,l),a):null)}return c}function Z({geometryJSON:t,options:e}){return j(q(t,e),e)}function j(t,e){const n=e?.unit??"square-meters",i=e?.lengthUnit??(0,o.Bd)(n),s=(0,S.g7)(t)??t,a=(0,g.g)(s,{unit:n,...e});return{area:(0,r.gT)(a,n),centroid:e?.returnCentroid?R(s).toJSON():void 0,length:e?.returnLength?L(s,{unit:i}):void 0}}function L(t,e){const n=e?.unit??"meters";return(0,r.d_)((0,_.execute)(t,{...e,unit:n}),n)}function X({geometryJSON:t,options:e}){return L(q(t,e),e)}function F({geometry1JSON:t,geometry2JSON:e,options:n}){const i=c.A.fromJSON(t),s=c.A.fromJSON(e),a=n?.unit??"meters";return(0,r.d_)(function(t,e,n={}){const{unit:r}=n;let i=P.execute((0,d.fromGeometry)(t),(0,d.fromGeometry)(e),null);if(i&&r){const e=(0,d.getSpatialReference)(t);i=(0,o.PQ)(i,e,r)}return i}(i,s,{...n,unit:a}),a)}async function k(t){return U(t.geometryJSON.spatialReference,G,Z)(t)}async function z(t){return U(t.geometryJSON.spatialReference,B,X)(t)}async function K(t){return U(t.geometry1JSON.spatialReference,J,F)(t)}async function W(t){const e=U(t.topLeftJSON.spatialReference,J,F),{topLeftJSON:n,topRightJSON:o,bottomRightJSON:i,bottomLeftJSON:s,options:a}=t,[u,c,l,h]=await Promise.all([e({geometry1JSON:s,geometry2JSON:i,options:a}),e({geometry1JSON:n,geometry2JSON:o,options:a}),e({geometry1JSON:i,geometry2JSON:o,options:a}),e({geometry1JSON:s,geometry2JSON:n,options:a})]);return{width:(0,r.T9)(u,c),height:(0,r.T9)(h,l)}}function U(t,e,n){switch(r=t,(0,E.EA)(r)||(0,E.K8)(r)?0:1){case 0:return e;case 1:return n}var r}function V(t){const{geometryJSON:e}=t,n=function(t){return t?(0,a.B3)(t)?(0,E.oT)(t)||(0,E.K8)(t)||(0,E.x1)(t)||(0,a.jA)(t)||(0,E.aI)(t,p.Y0)?{mode:1,spatialReference:p.Y0}:{mode:0,spatialReference:t}:{mode:1,spatialReference:(0,p.lO)(t)}:null}(e.spatialReference);if(!n)throw new Error("Cannot compute horizontal area without a valid spatial reference.");switch(n.mode){case 0:return Z(t);case 1:return function(t,{geometryJSON:e,options:n}){const r=q(e,n),o=nt,i=tt,s=et,a=(0,E.aI)(r.spatialReference,t.spatialReference)?r.clone():(0,m.projectWithoutEngine)(r,r.spatialReference,t.spatialReference);if(!a)throw new Error(`Cannot project geometry from ${r.spatialReference?.wkid??"unknown"} to ${t.spatialReference.wkid}.`);H(a,o,i,s);const{area:u,centroid:c,length:l}=j(a,n);return{area:u,centroid:$(c,o,i,s,t.spatialReference,r.spatialReference),length:l}}(n,t)}}function Q({geometryJSON:t}){const e=(0,I.rS)(t);if(!e)return null;const n=(0,S.g7)(e);return n?n.toJSON():null}function $(t,e,n,r,o,s){if(!t)return t;(0,i.hs)(n,n,t.x),(0,i.hs)(r,r,t.y);const a=rt;return(0,i.WQ)(a,n,r),(0,i.WQ)(a,a,e),t.x=a[0],t.y=a[1],t.z=a[2],t.spatialReference=o,(0,m.projectWithoutEngine)(t,t.spatialReference,s)?.toJSON()??void 0}function H(t,e,n,r){let o=0;(0,i.hZ)(e,0,0,0);for(const n of t.rings)for(const t of n)e[0]+=t[0],e[1]+=t[1],e[2]+=t[2],o++;(0,i.hs)(e,e,1/o);const s=ot;(0,i.S8)(s,e);const a=it,u=Math.atan2(s[1],s[0]);(0,i.hZ)(a,-Math.sin(u),Math.cos(u),0),(0,E.aI)(t.spatialReference,p.Y0)&&(w(e,s,p.GD,s,t.spatialReference),w(e,a,p.GD,a,t.spatialReference)),(0,O.YH)(a,s,n),(0,i.$A)(r,n,s);const c=rt;for(const o of t.rings)for(const t of o){(0,i.hZ)(c,t[0],t[1],t[2]),(0,i.Re)(c,c,e);const o=(0,i.Om)(n,c),s=(0,i.Om)(r,c);t[0]=o,t[1]=s}t.hasZ=!1,t.spatialReference=f.A.WebMercator}const tt=(0,s.vt)(),et=(0,s.vt)(),nt=(0,s.vt)(),rt=(0,s.vt)(),ot=(0,s.vt)(),it=(0,s.vt)()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9918],{52106(e,t,r){r.d(t,{A:()=>M});var s,i,o=r(32198),n=r(37838),l=r(69540),a=r(51447),p=r(25482),u=r(53966),c=r(36708),y=r(24326),g=r(91429),h=r(12195),m=r(65864),d=r(50498),f=r(55156),b=r(60950),v=r(54339),S=r(94128),w=r(33910);const x=Symbol("meshGeometryHandles");function C(e){if(null==e)return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let M=class extends((0,l.OU)(p.o)){static{s=S.Z}static{i=this}constructor(e){super(e),this[s]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,y.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,b.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,f.I)(this.origin);if(e)return(0,v.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,v.r)(this,t):null}getGlobalId(){const e=(0,f.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){const e={aggregateGeometries:C(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,h.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const i={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(i.action=s),"attributes"===e&&(i.attributeName=s),this.layer.graphicChanged(i)}_watchMeshGeometryChanges(){this.removeHandles(x);const e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,c.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],x)}};(0,o.Cg)([(0,g.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,m.rS)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],M.prototype,"aggregateGeometries",null),(0,o.Cg)([(0,g.MZ)({value:null})],M.prototype,"attributes",null),(0,o.Cg)([(0,g.MZ)({value:null,types:d.yR,json:{read:m.rS}})],M.prototype,"geometry",null),(0,o.Cg)([(0,g.MZ)()],M.prototype,"distance",void 0),(0,o.Cg)([(0,g.MZ)({type:Boolean})],M.prototype,"isAggregate",void 0),(0,o.Cg)([(0,g.MZ)({clonable:!1})],M.prototype,"layer",void 0),(0,o.Cg)([(0,g.MZ)({clonable:"reference"})],M.prototype,"origin",void 0),(0,o.Cg)([(0,g.MZ)({type:n.A,value:null})],M.prototype,"popupTemplate",null),(0,o.Cg)([(0,g.MZ)({clonable:"reference"})],M.prototype,"sourceLayer",void 0),(0,o.Cg)([(0,g.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],M.prototype,"statisticsAggregatedIds",void 0),(0,o.Cg)([(0,g.MZ)({value:null,types:w.Es})],M.prototype,"symbol",null),(0,o.Cg)([(0,g.MZ)({clonable:!1,json:{read:!1,write:!1}})],M.prototype,"_version",void 0),(0,o.Cg)([(0,g.MZ)({type:Boolean,value:!0})],M.prototype,"visible",null),M=i=(0,o.Cg)([(0,g.$K)("esri.Graphic")],M)},19334(e,t,r){r.d(t,{e:()=>n});var s=r(54639),i=r(14112);class o{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry.toJSON()}toAccessorGeometry(e){return this._geometry}toGxGeometry(e){return e.fromAccessorGeometry(this._geometry)}}function n(e){if(null==e)return null;switch(e.type){case"point":if((0,i.e6)(e))return null;break;case"polygon":if((0,i.Wq)(e))return null;break;case"polyline":if((0,i.IY)(e))return null;break;case"multipoint":if((0,i.DG)(e))return null;break;case"extent":if((0,i.As)(e))return null;break;default:return null}const t=s.R.of(e.type,e.spatialReference,e.hasZ,e.hasM,new o(e));return t.asAccessorGeometry(),t}},36983(e,t,r){r.d(t,{R:()=>p,p:()=>u});var s=r(54639),i=r(14112),o=r(16930),n=r(60408),l=r(65864);class a{constructor(e){this._geometry=e}toJsonGeometry(){return this._geometry}toAccessorGeometry(e){const t=(0,l.rS)(this._geometry);return t.spatialReference=e,t}toGxGeometry(e){return e.fromJsonGeometry(this._geometry)}}function p(e,t){if(null==e||"object"!=typeof e)return null;let r=t;if("spatialReference"in e&&(e.spatialReference instanceof o.A?r=e.spatialReference:"object"==typeof e.spatialReference&&null!=e.spatialReference&&(r=new o.A,r.read(e.spatialReference))),null==r)throw new Error("Spatial reference required");return(0,n.fT)(e)?u("point",e,r):(0,n.Rg)(e)?u("polyline",e,r):(0,n.Bi)(e)?u("polygon",e,r):(0,n.U9)(e)?u("multipoint",e,r):(0,n.ZC)(e)?u("extent",e,r):null}function u(e,t,r){if(null==t)return null;let o=!1,n=!1;switch(e){case"point":if((0,i.e6)(t))return null;o=void 0!==t.z,n=void 0!==t.m;break;case"polygon":if((0,i.Wq)(t))return null;o=!0===t.hasZ,n=!0===t.hasM;break;case"polyline":if((0,i.IY)(t))return null;o=!0===t.hasZ,n=!0===t.hasM;break;case"multipoint":if((0,i.DG)(t))return null;o=!0===t.hasZ,n=!0===t.hasM;break;case"extent":if((0,i.As)(t))return null;o=null!=t.zmin&&null!=t.zmax,n=null!=t.mmin&&null!=t.mmax;break;default:throw new Error("Unsupported geometry type: "+t.type)}return s.R.of(e,r,o,n,new a(t))}},14112(e,t,r){function s(e){return"NaN"===e.x||null===e.x||isNaN(e.x)}function i(e){if(0===(e.curveRings??e.rings).length)return!0;for(const t of e.curveRings??e.rings)if(t.length>0)return!1;return!0}function o(e){if(0===(e.curvePaths??e.paths).length)return!0;for(const t of e.curvePaths??e.paths)if(t.length>0)return!1;return!0}function n(e){return 0===e.points.length}function l(e){return"NaN"===e.xmin||null===e.xmin||isNaN(e.xmin)}r.d(t,{As:()=>l,DG:()=>n,IY:()=>o,Wq:()=>i,e6:()=>s})},6797(e,t,r){r.d(t,{Ui:()=>y});var s=r(69622),i=r(7762),o=r(88620);const n=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function l(e){return e instanceof s.A}function a(e){return e instanceof i.A?Object.keys(e.items):l(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function p(e,t){return e instanceof i.A?e.items[t]:e[t]}function u(e){return e?e.declaredClass:null}function c(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const s=a(e),i=a(t);if(0===s.length&&0===i.length)return;if(!s.length||!i.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=i.filter(e=>!s.includes(e)),y=s.filter(e=>!i.includes(e)),g=s.filter(r=>i.includes(r)&&p(e,r)!==p(t,r)).concat(o,y).sort(),h=u(e);if(h&&n.has(h)&&g.length)return{type:"complete",oldValue:e,newValue:t};let m;const d=l(e)&&l(t);for(const s of g){const i=p(e,s),o=p(t,s);let n;if((d||"function"!=typeof i&&"function"!=typeof o)&&i!==o&&(null!=i||null!=o)){if(r&&r[s]&&"function"==typeof r[s])n=r[s]?.(i,o);else if(i instanceof Date&&o instanceof Date){if(i.getTime()===o.getTime())continue;n={type:"complete",oldValue:i,newValue:o}}else n="object"==typeof i&&"object"==typeof o&&u(i)===u(o)?c(i,o):{type:"complete",oldValue:i,newValue:o};null!=n&&(null!=m?m.diff[s]=n:m={type:"partial",diff:{[s]:n}})}}return m}function y(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&u(e)!==u(t)?{type:"complete",oldValue:e,newValue:t}:c(e,t)}},55156(e,t,r){r.d(t,{I:()=>i});const s=Symbol("idFieldsProviderSymbol");function i(e){return(t=e)&&s in t?e[s]:void 0;var t}r.d(t,["e",0,s])},52136(e,t,r){var s=r(32198),i=r(91429);r.d(t,["p",0,e=>{const t=e;let r=class extends t{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,s.Cg)([(0,i.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,s.Cg)([(0,i.$K)("esri.layers.mixins.APIKeyMixin")],r),r}])},46499(e,t,r){r.d(t,{A:()=>C});var s,i,o=r(32198),n=(r(44208),r(66552)),l=r(25482),a=r(4718),p=r(90629),u=r(91429),c=r(73913),y=r(32730),g=r(77548),h=r(59868),m=r(73838),d=r(33910),f=r(36005),b=r(43937);const v=new n.J({esriServerPointLabelPlacementAboveCenter:"above-center",esriServerPointLabelPlacementAboveLeft:"above-left",esriServerPointLabelPlacementAboveRight:"above-right",esriServerPointLabelPlacementBelowCenter:"below-center",esriServerPointLabelPlacementBelowLeft:"below-left",esriServerPointLabelPlacementBelowRight:"below-right",esriServerPointLabelPlacementCenterCenter:"center-center",esriServerPointLabelPlacementCenterLeft:"center-left",esriServerPointLabelPlacementCenterRight:"center-right",esriServerLinePlacementAboveAfter:"above-after",esriServerLinePlacementAboveAlong:"above-along",esriServerLinePlacementAboveBefore:"above-before",esriServerLinePlacementAboveStart:"above-start",esriServerLinePlacementAboveEnd:"above-end",esriServerLinePlacementBelowAfter:"below-after",esriServerLinePlacementBelowAlong:"below-along",esriServerLinePlacementBelowBefore:"below-before",esriServerLinePlacementBelowStart:"below-start",esriServerLinePlacementBelowEnd:"below-end",esriServerLinePlacementCenterAfter:"center-after",esriServerLinePlacementCenterAlong:"center-along",esriServerLinePlacementCenterBefore:"center-before",esriServerLinePlacementCenterStart:"center-start",esriServerLinePlacementCenterEnd:"center-end",esriServerPolygonPlacementAlwaysHorizontal:"always-horizontal"},{ignoreUnknown:!0});function S(e,t,r){return{enabled:!(0,g.TU)(r?.layer)}}function w(e){return!e||"service"!==e.origin&&!("map-image"===e.layer?.type)}function x(e){return!!function(e){return"map-image"===e?.type}(e)&&!!e.capabilities?.exportMap?.supportsArcadeExpressionForLabeling}let C=class extends l.o{static{s=y.vK}static{i=this}static evaluateWhere(e,t){const r=(e,t,r)=>{switch(t){case"=":return e==r;case"<>":return e!=r;case">":return e>r;case">=":return e>=r;case"<":return e<r;case"<=":return e<=r}return!1};try{if(null==e)return!0;const s=e.split(" ");if(3===s.length)return r(t[s[0]],s[1],s[2]);if(7===s.length){const e=r(t[s[0]],s[1],s[2]),i=s[3],o=r(t[s[4]],s[5],s[6]);switch(i){case"AND":return e&&o;case"OR":return e||o}}return!1}catch(e){}}constructor(e){super(e),this[s]=!0,this.type="label",this.name=null,this.allowOverrun=!1,this.deconflictionStrategy="static",this.labelExpression=null,this.labelExpressionInfo=null,this.labelPlacement=null,this.labelPosition="curved",this.maxScale=0,this.minScale=0,this.repeatLabel=!0,this.symbol=h.Hk,this.useCodedValues=void 0,this.where=null}readLabelExpression(e,t){const r=t.labelExpressionInfo;if(!r||!r.value&&!r.expression)return e}writeLabelExpression(e,t,r){if(this.labelExpressionInfo)if(null!=this.labelExpressionInfo.value)e=(0,y.D3)(this.labelExpressionInfo.value);else if(null!=this.labelExpressionInfo.expression){const t=(0,y.tH)(this.labelExpressionInfo.expression);t&&(e="["+t+"]")}null!=e&&(t[r]=e)}writeLabelExpressionInfo(e,t,r,s){if(null==e&&null!=this.labelExpression&&w(s))e=new c.A({expression:this.getLabelExpressionArcade()});else if(!e)return;const i=e.toJSON(s);i.expression&&(t[r]=i)}writeMaxScale(e,t){(e||this.minScale)&&(t.maxScale=e)}writeMinScale(e,t){(e||this.maxScale)&&(t.minScale=e)}get repeatLabelDistance(){return this._get("repeatLabelDistance")}set repeatLabelDistance(e){this._set("repeatLabelDistance",e)}getLabelExpression(){return(0,y.XJ)(this)}getLabelExpressionArcade(){return(0,y.BI)(this)}getLabelExpressionSingleField(){return(0,y.rU)(this)}hash(){return JSON.stringify(this)}clone(){return new i({allowOverrun:this.allowOverrun,deconflictionStrategy:this.deconflictionStrategy,labelExpression:this.labelExpression,labelExpressionInfo:(0,a.o8)(this.labelExpressionInfo),labelPosition:this.labelPosition,labelPlacement:this.labelPlacement,maxScale:this.maxScale,minScale:this.minScale,name:this.name,repeatLabel:this.repeatLabel,repeatLabelDistance:this.repeatLabelDistance,symbol:(0,a.o8)(this.symbol),where:this.where,useCodedValues:this.useCodedValues})}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],C.prototype,"name",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1},"portal-item":{default:!1,write:{overridePolicy:S}}}}})],C.prototype,"allowOverrun",void 0),(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0,default:"static",origins:{"web-scene":{write:!1},"portal-item":{default:"static",write:{overridePolicy:S}}}}})],C.prototype,"deconflictionStrategy",void 0),(0,o.Cg)([(0,u.MZ)({type:String,json:{write:{overridePolicy(e,t,r){return this.labelExpressionInfo&&"service"===r?.origin&&x(r.layer)?{enabled:!1}:{allowNull:!0}}}}})],C.prototype,"labelExpression",void 0),(0,o.Cg)([(0,f.w)("labelExpression")],C.prototype,"readLabelExpression",null),(0,o.Cg)([(0,b.K)("labelExpression")],C.prototype,"writeLabelExpression",null),(0,o.Cg)([(0,u.MZ)({type:c.A,json:{write:{overridePolicy:(e,t,r)=>function(e){return w(e)||x(e?.layer)}(r)?{allowNull:!0}:{enabled:!1}}}})],C.prototype,"labelExpressionInfo",void 0),(0,o.Cg)([(0,b.K)("labelExpressionInfo")],C.prototype,"writeLabelExpressionInfo",null),(0,o.Cg)([(0,u.MZ)({type:v.apiValues,json:{type:v.jsonValues,read:v.read,write:v.write}})],C.prototype,"labelPlacement",void 0),(0,o.Cg)([(0,u.MZ)({type:["curved","parallel"],json:{write:!0,origins:{"web-map":{write:!1},"web-scene":{write:!1},"portal-item":{write:!1}}}})],C.prototype,"labelPosition",void 0),(0,o.Cg)([(0,u.MZ)({type:Number})],C.prototype,"maxScale",void 0),(0,o.Cg)([(0,b.K)("maxScale")],C.prototype,"writeMaxScale",null),(0,o.Cg)([(0,u.MZ)({type:Number})],C.prototype,"minScale",void 0),(0,o.Cg)([(0,b.K)("minScale")],C.prototype,"writeMinScale",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],C.prototype,"repeatLabel",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,cast:p.cr,json:{write:!0,origins:{"web-scene":{write:!1},"portal-item":{write:{overridePolicy:S}}}}})],C.prototype,"repeatLabelDistance",null),(0,o.Cg)([(0,u.MZ)({types:d.em,json:{origins:{"web-scene":{types:d.Rv,write:m.oO,default:null}},write:m.oO,default:null}})],C.prototype,"symbol",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"useCodedValues",void 0),(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],C.prototype,"where",void 0),C=i=(0,o.Cg)([(0,u.$K)("esri.layers.support.LabelClass")],C)},73913(e,t,r){r.d(t,{A:()=>u});var s,i=r(32198),o=r(25482),n=r(91429),l=r(32730),a=r(36005),p=r(43937);let u=class extends o.o{static{s=this}constructor(e){super(e),this.expression=null,this.title=null,this.value=null}readExpression(e,t){return t.value?(0,l.mX)(t.value):e}writeExpression(e,t,r){null!=this.value&&(e=(0,l.mX)(this.value)),null!=e&&(t[r]=e)}clone(){return new s({expression:this.expression,title:this.title,value:this.value})}};(0,i.Cg)([(0,n.MZ)({type:String,json:{write:{writerEnsuresNonNull:!0}}})],u.prototype,"expression",void 0),(0,i.Cg)([(0,a.w)("expression",["expression","value"])],u.prototype,"readExpression",null),(0,i.Cg)([(0,p.K)("expression")],u.prototype,"writeExpression",null),(0,i.Cg)([(0,n.MZ)({type:String,json:{write:!0,origins:{"web-scene":{write:!1}}}})],u.prototype,"title",void 0),(0,i.Cg)([(0,n.MZ)({json:{read:!1,write:!1}})],u.prototype,"value",void 0),u=s=(0,i.Cg)([(0,n.$K)("esri.layers.support.LabelExpressionInfo")],u)},4071(e,t,r){const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},i={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1,supportsCountOnly:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,relativeTimeBinWindow:0,standardMaxRecordCount:0,standardMaxRecordCountNoGeometry:0,supportsStatisticsAggregatedIds:!1,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsOutDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};r.d(t,["$",0,s,"P",0,i])},39383(e,t,r){r.d(t,{w:()=>a,z:()=>c});var s=r(49186),i=r(53966),o=r(46499);const n=()=>i.A.getLogger("esri.layers.support.labelingInfo"),l=/\[([^[\]]+)\]/gi;function a(e,t,r){return e?e.map(e=>{const s=new o.A;if(s.read(e,r),s.labelExpression){const e=t.fields||t.layerDefinition?.fields||this.fields;s.labelExpression=s.labelExpression.replaceAll(l,(t,r)=>`[${function(e,t){if(!t)return e;const r=e.toLowerCase();for(let e=0;e<t.length;e++){const s=t[e].name;if(s.toLowerCase()===r)return s}return e}(r,e)}]`)}return s}):null}const p=["above-right","above-center","above-left","center-center","center-left","center-right","below-center","below-left","below-right"],u={esriGeometryPoint:p,esriGeometryMultiPatch:["always-horizontal"],esriGeometryPolygon:["always-horizontal"],esriGeometryPolyline:["center-along","above-along","below-along"],esriGeometryMultipoint:p,esriGeometryEnvelope:null};function c(e,t){const r=[];for(const i of e){const e=i.labelPlacement,o=u[t];if(!i.symbol)return n().warn("No ILabelClass symbol specified."),[];if(!o)return n().error(new s.A("labeling:unsupported-geometry-type",`Unable to create labels for layer, geometry type '${t}' is not supported`)),[];if(o.includes(e))r.push(i);else{const s=o[0];e&&n().warn(`Found invalid label placement type ${e} for ${t}. Defaulting to ${s}`);const l=i.clone();l.labelPlacement=s,r.push(l)}}return r}},98205(e,t,r){r.d(t,{KZ:()=>l,eh:()=>n,gf:()=>o,of:()=>i});const s=Symbol("SizeVariableInstance");function i(e){return null!=e&&"object"==typeof e&&s in e}function o(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function l(e,t){const r=t||n(e),s=e.valueUnit||"unknown";return"unknown"===r?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}r.d(t,["uY",0,s])},41366(e,t,r){var s=r(32198),i=r(66552),o=r(53966),n=r(91429),l=r(93223);const a=(0,i.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),p="percent-of-total",u="field";r.d(t,["K",0,e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,r=null!=this.normalizationTotal;return t||r?(e=t&&u||r&&p||null,t&&r&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==u&&e!==p||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,s.Cg)([(0,n.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,s.Cg)([(0,l.e)(a,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,s.Cg)([(0,n.$K)("esri.rest.support.NormalizationBinParametersMixin")],r),r},"Q",0,a])},93470(e,t,r){const s=[252,146,31,255],i={type:"esriSMS",style:"esriSMSCircle",size:6,color:s,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},o={type:"esriSLS",style:"esriSLSSolid",width:.75,color:s};r.d(t,["Cb",0,i,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,s,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,o])}}]);
package/chunks/array.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{deepClone as n}from"../arcade/deepClone.js";import{ArcadeExecutionError as t}from"../arcade/executionError.js";import r from"../arcade/ImmutableArray.js";import{E as e,N as o,g as i,v as u,x as a,l as c,w as s,z as l,i as f,u as d,Q as h}from"./languageUtils.js";import{isPromiseLike as w}from"../core/promiseUtils.js";import{isArray as g,isBoolean as m,isInteger as F}from"../support/guards.js";function v(v){function p(n,e){if(n instanceof r)return n.toArray();if(g(n))return n;throw new t("InvalidParameter",e)}function y(n){const t=u(n);return Number.isNaN(t)||t<=0}function N(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return P(N(n.slice(0,e),t),N(n.slice(e,r),t),t)}function P(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?y(r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}async function I(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return O(await I(n.slice(0,e),t),await I(n.slice(e,r),t),t)}async function O(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?y(await r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}function A(n){if(n.length<=1)return n.slice();let t;for(t=0;t<n.length;t++){const r=n[t];if(null!=r&&!d(r))break}if(t>=n.length)return n.slice();let r=0!==t;const e=h(n[t]);let o=!0;for(t+=1;t<n.length;t++){const i=h(n[t]);if(""!==i){switch(i!==e&&(o=!1),i){case"String":case"Number":case"Boolean":case"Date":case"DateOnly":case"Time":continue}return n.slice()}r=!0}let i=function(n,t){const r=s(n),e=s(t);return r<e?-1:r===e?0:1};if(o&&("String"===e?i=function(n,t){return n<t?-1:n===t?0:1}:"Number"===e?i=function(n,t){return n<t?-1:n>t?1:Object.is(n,t)?0:Number.isNaN(n)?1:Number.isNaN(t)||Object.is(n,-0)?-1:1}:"Boolean"===e?i=function(n,t){return n===t?0:t?-1:1}:"Date"===e&&(i=function(n,t){return n.toNumber()-t.toNumber()})),r){const n=i;i=function(t,r){return null==t||d(t)?null==r||d(r)?0:1:null==r||d(r)?-1:n(t,r)}}return n.toSorted(i)}v.functions.array=function(r,a){return v.standardFunction(r,a,(r,c,s)=>{if(e(s,0,2,a),0===s.length)return[];if(1===s.length&&null===s[0])return[];if(g(s[0])){if(2===s.length&&!1===m(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].slice()}if(i(s[0])){if(2===s.length&&!1===m(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].toArray().slice()}const l=u(s[0]);if(isNaN(l)||!1===F(l))throw new t("InvalidParameter",a);const f=o(s[1],null),d=new Array(l);return d.fill(f),d})},v.functions.front=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(0)}if(g(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][0]}throw new t("InvalidParameter",r)})},v.functions.back=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(u[0].length()-1)}if(g(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][u[0].length-1]}throw new t("InvalidParameter",r)})},v.functions.push=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,1,2,r),g(i[0]))return i[0][i[0].length]=i[1],i[0].length;throw new t("InvalidParameter",r)})},v.functions.pop=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,1,1,r),g(i[0])){if(i[0].length<=0)throw new t("OutOfBounds",r);const n=i[0][i[0].length-1];return i[0].length=i[0].length-1,n}throw new t("InvalidParameter",r)})},v.functions.erase=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,2,2,r),g(i[0])){let n=u(i[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);const e=i[0];if(e.length<=0)throw new t("OutOfBounds",r);if(n<0&&(n=e.length+n),n<0)throw new t("OutOfBounds",r);if(n>=e.length)throw new t("OutOfBounds",r);return e.splice(n,1),a}if(c(i[0]))return i[0].eraseField(s(i[1])),a;throw new t("InvalidParameter",r)})},v.functions.insert=function(n,r){return v.standardFunction(n,r,(n,o,i)=>{if(e(i,3,3,r),g(i[0])){const n=u(i[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);const e=i[2],o=i[0];if(n>o.length)throw new t("OutOfBounds",r);if(n<0&&n<-1*o.length)throw new t("OutOfBounds",r);return n===o.length?(o[n]=e,a):(o.splice(n,0,e),a)}if(c(i[0]))return i[0].setField(s(i[1]),i[2]),a;throw new t("InvalidParameter",r)})},v.functions.getkeys=function(n,r){return v.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0]))return o[0].keys();throw new t("InvalidParameter",r)})},v.functions.getvalues=function(n,r){return v.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0]))return o[0].values();throw new t("InvalidParameter",r)})},v.functions.resize=function(n,r){return v.standardFunction(n,r,(n,i,c)=>{if(e(c,2,3,r),g(c[0])){const n=u(c[1]);if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);if(n<0)throw new t("InvalidParameter",r);const e=o(c[2],null),i=c[0];if(i.length>=n)return i.length=n,a;const s=i.length;i.length=n;for(let t=s;t<i.length;t++)i[t]=e;return a}throw new t("InvalidParameter",r)})},v.functions.includes=function(n,r){return v.standardFunction(n,r,(n,o,u)=>{if(e(u,2,2,r),g(u[0])){const n=u[1];return!!u[0].some(t=>l(t,n))}if(i(u[0])){const n=u[1];return!!u[0].toArray().some(t=>l(t,n))}throw new t("InvalidParameter",r)})},v.functions.slice=function(n,r){return v.standardFunction(n,r,(n,a,c)=>{if(e(c,1,3,r),g(c[0])){const n=u(o(c[1],0)),e=u(o(c[2],c[0].length));if(isNaN(n)||!1===F(n))throw new t("InvalidParameter",r);if(isNaN(e)||!1===F(e))throw new t("InvalidParameter",r);return c[0].slice(n,e)}if(i(c[0])){const n=c[0],e=u(o(c[1],0)),i=u(o(c[2],n.length()));if(isNaN(e)||!1===F(e))throw new t("InvalidParameter",r);if(isNaN(i)||!1===F(i))throw new t("InvalidParameter",r);return n.toArray().slice(e,i)}throw new t("InvalidParameter",r)})},v.functions.splice=function(n,t){return v.standardFunction(n,t,(n,t,r)=>{const e=[];for(const o of r)g(o)?e.push(...o):i(o)?e.push(...o.toArray()):e.push(o);return e})},v.functions.top=function(n,r){return v.standardFunction(n,r,(n,o,a)=>{if(e(a,2,2,r),g(a[0]))return u(a[1])>=a[0].length?a[0].slice():a[0].slice(0,u(a[1]));if(i(a[0]))return u(a[1])>=a[0].length()?a[0].slice():a[0].slice(0,u(a[1]));throw new t("InvalidParameter",r)})},v.functions.first=function(n,t){return v.standardFunction(n,t,(n,r,o)=>(e(o,1,1,t),g(o[0])?0===o[0].length?null:o[0][0]:i(o[0])?0===o[0].length()?null:o[0].get(0):null))},"sync"===v.mode&&(v.functions.sort=function(n,r){return v.standardFunction(n,r,(r,o,u)=>{let a;if(e(u,1,2,o),g(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!f(u[1]))throw new t("InvalidParameter",o);return N(a,u[1].createFunction(n))}return A(a)})},v.functions.any=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=i(n);if(m(t)&&!0===t)return!0}return!1})},v.functions.all=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){if(!0!==i(n))return!1}return!0})},v.functions.none=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){if(!0===i(n))return!1}return!0})},v.functions.reduce=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,3,r);const i=o[1].createFunction(n),u=p(o[0],r);return 2===o.length?0===u.length?null:u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null}):u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null},o[2])})},v.functions.map=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),c=[];for(const n of u){const t=i(n);void 0!==t&&t!==a?c.push(t):c.push(null)}return c})},v.functions.filter=function(n,t){return v.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),a=[];for(const n of u){!0===i(n)&&a.push(n)}return a})}),"async"===v.mode&&(v.functions.sort=function(n,r){return v.standardFunctionAsync(n,r,async(r,o,u)=>{let a;if(e(u,1,2,o),g(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!f(u[1]))throw new t("InvalidParameter",o);return I(a,u[1].createFunction(n))}return A(a)})},v.functions.any=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,m(r)&&!0===r)return!0}return!1})},v.functions.all=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,!0!==r)return!1}return!0})},v.functions.none=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=w(r)?await t:t,!0===r)return!1}return!0})},v.functions.filter=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),a=[];for(const n of u){const t=await i(n);let r=null;r=w(r)?await t:t,!0===r&&a.push(n)}return a})},v.functions.reduce=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,i)=>{e(i,2,3,r);const u=i[1].createFunction(n),c=p(i[0],r);let s;if(i.length>2){const n=o(i[2],null);s=c.reduce(async(n,t)=>{let r=await n;return void 0!==r&&r!==a||(r=null),u(r,t)},Promise.resolve(n))}else{if(0===c.length)return null;s=c.reduce(async(n,t,r)=>{if(r<=1)return u(n,t);let e=await n;return void 0!==e&&e!==a||(e=null),u(e,t)})}return s.then(n=>void 0!==n&&n!==a?n:null)})},v.functions.map=function(n,t){return v.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=p(o[0],r),c=[];for(const n of u){const t=await i(n);let r=null;r=w(r)?await t:t,void 0!==r&&r!==a?c.push(r):c.push(null)}return c})})}const p=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:v},Symbol.toStringTag,{value:"Module"}));export{p as A,v as r};
2
+ import{deepClone as n}from"../arcade/deepClone.js";import{ArcadeExecutionError as t}from"../arcade/executionError.js";import r from"../arcade/ImmutableArray.js";import{E as e,N as o,g as i,v as u,x as a,l as c,w as s,F as l,G as f,z as d,i as h,u as w,Q as g}from"./languageUtils.js";import{isPromiseLike as m}from"../core/promiseUtils.js";import{isArray as F,isBoolean as p,isInteger as v}from"../support/guards.js";function y(y){function N(n,e){if(n instanceof r)return n.toArray();if(F(n))return n;throw new t("InvalidParameter",e)}function P(n){const t=u(n);return Number.isNaN(t)||t<=0}function I(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return O(I(n.slice(0,e),t),I(n.slice(e,r),t),t)}function O(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?P(r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}async function A(n,t){const r=n.length;if(r<=1)return n.slice();const e=Math.floor(r/2);return b(await A(n.slice(0,e),t),await A(n.slice(e,r),t),t)}async function b(n,t,r){const e=[];for(;n.length>0||t.length>0;)n.length>0&&t.length>0?P(await r(n[0],t[0]))?(e.push(n[0]),n=n.slice(1)):(e.push(t[0]),t=t.slice(1)):n.length>0?(e.push(n[0]),n=n.slice(1)):t.length>0&&(e.push(t[0]),t=t.slice(1));return e}function B(n){if(n.length<=1)return n.slice();let t;for(t=0;t<n.length;t++){const r=n[t];if(null!=r&&!w(r))break}if(t>=n.length)return n.slice();let r=0!==t;const e=g(n[t]);let o=!0;for(t+=1;t<n.length;t++){const i=g(n[t]);if(""!==i){switch(i!==e&&(o=!1),i){case"String":case"Number":case"Boolean":case"Date":case"DateOnly":case"Time":continue}return n.slice()}r=!0}let i=function(n,t){const r=s(n),e=s(t);return r<e?-1:r===e?0:1};if(o&&("String"===e?i=function(n,t){return n<t?-1:n===t?0:1}:"Number"===e?i=function(n,t){return n<t?-1:n>t?1:Object.is(n,t)?0:Number.isNaN(n)?1:Number.isNaN(t)||Object.is(n,-0)?-1:1}:"Boolean"===e?i=function(n,t){return n===t?0:t?-1:1}:"Date"===e&&(i=function(n,t){return n.toNumber()-t.toNumber()})),r){const n=i;i=function(t,r){return null==t||w(t)?null==r||w(r)?0:1:null==r||w(r)?-1:n(t,r)}}return n.toSorted(i)}y.functions.array=function(r,a){return y.standardFunction(r,a,(r,c,s)=>{if(e(s,0,2,a),0===s.length)return[];if(1===s.length&&null===s[0])return[];if(F(s[0])){if(2===s.length&&!1===p(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].slice()}if(i(s[0])){if(2===s.length&&!1===p(s[1]))throw new t("InvalidParameter",a);return!0===o(s[1],!1)?n(s[0]):s[0].toArray().slice()}const l=u(s[0]);if(isNaN(l)||!1===v(l))throw new t("InvalidParameter",a);const f=o(s[1],null),d=new Array(l);return d.fill(f),d})},y.functions.front=function(n,r){return y.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(0)}if(F(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][0]}throw new t("InvalidParameter",r)})},y.functions.back=function(n,r){return y.standardFunction(n,r,(n,o,u)=>{if(e(u,1,1,r),i(u[0])){if(u[0].length()<=0)throw new t("OutOfBounds",r);return u[0].get(u[0].length()-1)}if(F(u[0])){if(u[0].length<=0)throw new t("OutOfBounds",r);return u[0][u[0].length-1]}throw new t("InvalidParameter",r)})},y.functions.push=function(n,r){return y.standardFunction(n,r,(n,o,i)=>{if(e(i,1,2,r),F(i[0]))return i[0][i[0].length]=i[1],i[0].length;throw new t("InvalidParameter",r)})},y.functions.pop=function(n,r){return y.standardFunction(n,r,(n,o,i)=>{if(e(i,1,1,r),F(i[0])){if(i[0].length<=0)throw new t("OutOfBounds",r);const n=i[0][i[0].length-1];return i[0].length=i[0].length-1,n}throw new t("InvalidParameter",r)})},y.functions.erase=function(n,r){return y.standardFunction(n,r,(n,o,i)=>{if(e(i,2,2,r),F(i[0])){let n=u(i[1]);if(isNaN(n)||!1===v(n))throw new t("InvalidParameter",r);const e=i[0];if(e.length<=0)throw new t("OutOfBounds",r);if(n<0&&(n=e.length+n),n<0)throw new t("OutOfBounds",r);if(n>=e.length)throw new t("OutOfBounds",r);return e.splice(n,1),a}if(c(i[0]))return i[0].eraseField(s(i[1])),a;throw new t("InvalidParameter",r)})},y.functions.insert=function(n,r){return y.standardFunction(n,r,(n,o,i)=>{if(e(i,3,3,r),F(i[0])){const n=u(i[1]);if(isNaN(n)||!1===v(n))throw new t("InvalidParameter",r);const e=i[2],o=i[0];if(n>o.length)throw new t("OutOfBounds",r);if(n<0&&n<-1*o.length)throw new t("OutOfBounds",r);return n===o.length?(o[n]=e,a):(o.splice(n,0,e),a)}if(c(i[0]))return i[0].setField(s(i[1]),i[2]),a;throw new t("InvalidParameter",r)})},y.functions.getkeys=function(n,r){return y.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0])||l(o[0])||f(o[0]))return o[0].keys().slice();throw new t("InvalidParameter",r)})},y.functions.getvalues=function(n,r){return y.standardFunction(n,r,(n,r,o)=>{if(e(o,1,1,r),null==o[0])return[];if(c(o[0])||l(o[0])||f(o[0])){const n=o[0];return n.keys().map(t=>n.field(t))}throw new t("InvalidParameter",r)})},y.functions.resize=function(n,r){return y.standardFunction(n,r,(n,i,c)=>{if(e(c,2,3,r),F(c[0])){const n=u(c[1]);if(isNaN(n)||!1===v(n))throw new t("InvalidParameter",r);if(n<0)throw new t("InvalidParameter",r);const e=o(c[2],null),i=c[0];if(i.length>=n)return i.length=n,a;const s=i.length;i.length=n;for(let t=s;t<i.length;t++)i[t]=e;return a}throw new t("InvalidParameter",r)})},y.functions.includes=function(n,r){return y.standardFunction(n,r,(n,o,u)=>{if(e(u,2,2,r),F(u[0])){const n=u[1];return!!u[0].some(t=>d(t,n))}if(i(u[0])){const n=u[1];return!!u[0].toArray().some(t=>d(t,n))}throw new t("InvalidParameter",r)})},y.functions.slice=function(n,r){return y.standardFunction(n,r,(n,a,c)=>{if(e(c,1,3,r),F(c[0])){const n=u(o(c[1],0)),e=u(o(c[2],c[0].length));if(isNaN(n)||!1===v(n))throw new t("InvalidParameter",r);if(isNaN(e)||!1===v(e))throw new t("InvalidParameter",r);return c[0].slice(n,e)}if(i(c[0])){const n=c[0],e=u(o(c[1],0)),i=u(o(c[2],n.length()));if(isNaN(e)||!1===v(e))throw new t("InvalidParameter",r);if(isNaN(i)||!1===v(i))throw new t("InvalidParameter",r);return n.toArray().slice(e,i)}throw new t("InvalidParameter",r)})},y.functions.splice=function(n,t){return y.standardFunction(n,t,(n,t,r)=>{const e=[];for(const o of r)F(o)?e.push(...o):i(o)?e.push(...o.toArray()):e.push(o);return e})},y.functions.top=function(n,r){return y.standardFunction(n,r,(n,o,a)=>{if(e(a,2,2,r),F(a[0]))return u(a[1])>=a[0].length?a[0].slice():a[0].slice(0,u(a[1]));if(i(a[0]))return u(a[1])>=a[0].length()?a[0].slice():a[0].slice(0,u(a[1]));throw new t("InvalidParameter",r)})},y.functions.first=function(n,t){return y.standardFunction(n,t,(n,r,o)=>(e(o,1,1,t),F(o[0])?0===o[0].length?null:o[0][0]:i(o[0])?0===o[0].length()?null:o[0].get(0):null))},"sync"===y.mode&&(y.functions.sort=function(n,r){return y.standardFunction(n,r,(r,o,u)=>{let a;if(e(u,1,2,o),F(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!h(u[1]))throw new t("InvalidParameter",o);return I(a,u[1].createFunction(n))}return B(a)})},y.functions.any=function(n,t){return y.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r);for(const n of u){const t=i(n);if(p(t)&&!0===t)return!0}return!1})},y.functions.all=function(n,t){return y.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r);for(const n of u){if(!0!==i(n))return!1}return!0})},y.functions.none=function(n,t){return y.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r);for(const n of u){if(!0===i(n))return!1}return!0})},y.functions.reduce=function(n,t){return y.standardFunction(n,t,(t,r,o)=>{e(o,2,3,r);const i=o[1].createFunction(n),u=N(o[0],r);return 2===o.length?0===u.length?null:u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null}):u.reduce((n,t)=>{const r=i(n,t);return n=void 0!==r&&r!==a?r:null},o[2])})},y.functions.map=function(n,t){return y.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r),c=[];for(const n of u){const t=i(n);void 0!==t&&t!==a?c.push(t):c.push(null)}return c})},y.functions.filter=function(n,t){return y.standardFunction(n,t,(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r),a=[];for(const n of u){!0===i(n)&&a.push(n)}return a})}),"async"===y.mode&&(y.functions.sort=function(n,r){return y.standardFunctionAsync(n,r,async(r,o,u)=>{let a;if(e(u,1,2,o),F(u[0]))a=u[0];else{if(!i(u[0]))throw new t("InvalidParameter",o);a=u[0].toArray()}if(u.length>1){if(!h(u[1]))throw new t("InvalidParameter",o);return A(a,u[1].createFunction(n))}return B(a)})},y.functions.any=function(n,t){return y.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=m(r)?await t:t,p(r)&&!0===r)return!0}return!1})},y.functions.all=function(n,t){return y.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=m(r)?await t:t,!0!==r)return!1}return!0})},y.functions.none=function(n,t){return y.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r);for(const n of u){const t=await i(n);let r=null;if(r=m(r)?await t:t,!0===r)return!1}return!0})},y.functions.filter=function(n,t){return y.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r),a=[];for(const n of u){const t=await i(n);let r=null;r=m(r)?await t:t,!0===r&&a.push(n)}return a})},y.functions.reduce=function(n,t){return y.standardFunctionAsync(n,t,async(t,r,i)=>{e(i,2,3,r);const u=i[1].createFunction(n),c=N(i[0],r);let s;if(i.length>2){const n=o(i[2],null);s=c.reduce(async(n,t)=>{let r=await n;return void 0!==r&&r!==a||(r=null),u(r,t)},Promise.resolve(n))}else{if(0===c.length)return null;s=c.reduce(async(n,t,r)=>{if(r<=1)return u(n,t);let e=await n;return void 0!==e&&e!==a||(e=null),u(e,t)})}return s.then(n=>void 0!==n&&n!==a?n:null)})},y.functions.map=function(n,t){return y.standardFunctionAsync(n,t,async(t,r,o)=>{e(o,2,2,r);const i=o[1].createFunction(n),u=N(o[0],r),c=[];for(const n of u){const t=await i(n);let r=null;r=m(r)?await t:t,void 0!==r&&r!==a?c.push(r):c.push(null)}return c})})}const N=Object.freeze(Object.defineProperty({__proto__:null,registerFunctions:y},Symbol.toStringTag,{value:"Module"}));export{N as A,y as r};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import t from"../core/Logger.js";import{acosClamped as i}from"../core/mathUtils.js";import{ObjectStack as n}from"../core/ObjectStack.js";import{fromRotation as s,invert as r,transpose as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as a,dot as c,length as u,set as g,subtract as b,exactEquals as f,transformMat4 as l,squaredLength as p,direction as m,scale as d,add as h,distance as j,normalize as y}from"../core/libs/gl-matrix-2/math/vec3.js";import{clone as I,fromValues as v,create as P}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as N}from"../geometry/support/aaBoundingRect.js";import{create as w,distance2 as x,projectPointClamp as M}from"../geometry/support/lineSegment.js";import{create as S,fromVectorsAndPoint as T,getNormal as V,fromValues as A,intersectRay as _,signedDistance as E,intersectLineSegmentClamp as O,isPointInside as k,intersectLineSegment as F,copy as R,projectPoint as q,setOffsetFromPoint as B,wrap as C}from"../geometry/support/plane.js";import{distance2 as Y}from"../geometry/support/ray.js";import{projectPointSignedLength as L}from"../geometry/support/vector.js";import{sv3d as U}from"../geometry/support/vectorStacks.js";const z=()=>t.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function D(t=wt){return{plane:S(t.plane),origin:I(t.origin),basis1:I(t.basis1),basis2:I(t.basis2)}}function G(t,i,n){const s=Tt.get();return s.origin=t,s.basis1=i,s.basis2=n,s.plane=C(0,0,0,0),K(s),s}function W(t,i=D()){return J(t.origin,t.basis1,t.basis2,i)}function H(t,i){a(i.origin,t.origin),a(i.basis1,t.basis1),a(i.basis2,t.basis2),R(i.plane,t.plane)}function J(t,i,n,s=D()){return a(s.origin,t),a(s.basis1,i),a(s.basis2,n),K(s),Pt(s,"fromValues()"),s}function K(t){T(t.basis2,t.basis1,t.origin,t.plane)}function Q(t,i,n){t!==n&&W(t,n);const s=d(U.get(),ht(t),i);return h(n.origin,n.origin,s),n.plane[3]-=i,n}function X(t,i,n){return $(i,n),Q(n,ft(t,t.origin),n),n}function Z(t,i){const n=t.basis1[0],s=t.basis2[1],[r,e]=t.origin;return N(r-n,e-s,r+n,e+s,i)}function $(t,i=D()){const n=(t[2]-t[0])/2,s=(t[3]-t[1])/2;return g(i.origin,t[0]+n,t[1]+s,0),g(i.basis1,n,0,0),g(i.basis2,0,s,0),A(0,0,1,0,i.plane),i}function tt(t,i,n){return!!_(t.plane,i,n)&&yt(t,n)}function it(t,i,n){if(tt(t,i,n))return n;const s=nt(t,i,U.get());return h(n,i.origin,d(U.get(),i.direction,j(i.origin,s)/u(i.direction))),n}function nt(t,n,s){const r=xt.get();Nt(t,n,r,xt.get());let e=Number.POSITIVE_INFINITY;for(const o of Vt){const u=vt(t,o,Mt.get()),g=U.get();if(F(r,u,g)){const t=m(U.get(),n.origin,g),r=Math.abs(i(c(n.direction,t)));r<e&&(e=r,a(s,g))}}return e===Number.POSITIVE_INFINITY?rt(t,n,s):s}function st(t,i){return(i-t)/i}function rt(t,i,n){if(tt(t,i,n))return n;const s=xt.get(),r=xt.get();Nt(t,i,s,r);let e=Number.POSITIVE_INFINITY;for(const o of Vt){const c=vt(t,o,Mt.get()),u=U.get();if(O(s,c,u)){const t=Y(i,u);if(!k(r,u))continue;t<e&&(e=t,a(n,u))}}return at(t,i.origin)<e&&et(t,i.origin,n),n}function et(t,i,n){const s=q(t.plane,i,U.get()),r=M(It(t,t.basis1),s,-1,1,U.get()),e=M(It(t,t.basis2),s,-1,1,U.get());return b(n,h(U.get(),r,e),t.origin),n}function ot(t,i,n){const{origin:s,basis1:r,basis2:e}=t,o=b(U.get(),i,s),a=L(r,o),c=L(e,o),u=L(ht(t),o);return g(n,a,c,u)}function at(t,i){const n=ot(t,i,U.get()),{basis1:s,basis2:r}=t,e=u(s),o=u(r),a=Math.max(Math.abs(n[0])-e,0),c=Math.max(Math.abs(n[1])-o,0),g=n[2];return a*a+c*c+g*g}function ct(t,i){return Math.sqrt(at(t,i))}function ut(t,i){let n=Number.NEGATIVE_INFINITY;for(const s of Vt){const r=vt(t,s,Mt.get()),e=x(r,i);e>n&&(n=e)}return Math.sqrt(n)}function gt(t,i){return E(t.plane,i)>0&&yt(t,i)}function bt(t,i,n,s){return jt(t,n,s)}function ft(t,i){const n=-t.plane[3];return L(ht(t),i)-n}function lt(t,i,n,s){const r=ft(t,i),e=d(St,ht(t),n-r);return h(s,i,e),s}function pt(t,i){return t===i||null==t&&null==i||null!=t&&null!=i&&f(t.basis1,i.basis1)&&f(t.basis2,i.basis2)&&f(t.origin,i.origin)}function mt(t,i,n){return t!==n&&W(t,n),r(At,i),e(At,At),l(n.basis1,t.basis1,At),l(n.basis2,t.basis2,At),l(V(n.plane),V(t.plane),At),l(n.origin,t.origin,i),B(n.plane,n.plane,n.origin),n}function dt(t,i,n,r){return t!==r&&W(t,r),s(_t,i,n),l(r.basis1,t.basis1,_t),l(r.basis2,t.basis2,_t),K(r),r}function ht(t){return V(t.plane)}function jt(t,i,n){switch(i){case 0:a(n,t.basis1),y(n,n);break;case 1:a(n,t.basis2),y(n,n);break;case 2:a(n,ht(t))}return n}function yt(t,i){const n=b(U.get(),i,t.origin),s=p(t.basis1),r=p(t.basis2),e=c(t.basis1,n),o=c(t.basis2,n);return-e-s<0&&e-s<0&&-o-r<0&&o-r<0}function It(t,i){const n=Mt.get();return a(n.origin,t.origin),a(n.vector,i),n}function vt(t,i,n){const{basis1:s,basis2:r,origin:e}=t,o=d(U.get(),s,i.origin[0]),a=d(U.get(),r,i.origin[1]);h(n.origin,o,a),h(n.origin,n.origin,e);const c=d(U.get(),s,i.direction[0]),u=d(U.get(),r,i.direction[1]);return d(n.vector,h(c,c,u),2),n}function Pt(t,i){Math.abs(c(t.basis1,t.basis2)/(u(t.basis1)*u(t.basis2)))>1e-6&&z().warn(i,"Provided basis vectors are not perpendicular"),Math.abs(c(t.basis1,ht(t)))>1e-6&&z().warn(i,"Basis vectors and plane normal are not perpendicular"),Math.abs(-c(ht(t),t.origin)-t.plane[3])>1e-6&&z().warn(i,"Plane offset is not consistent with plane origin")}function Nt(t,i,n,s){const r=ht(t);T(r,i.direction,i.origin,n),T(V(n),r,i.origin,s)}const wt={plane:S(),origin:v(0,0,0),basis1:v(1,0,0),basis2:v(0,1,0)},xt=new n(S),Mt=new n(w),St=P(),Tt=new n(()=>D()),Vt=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],At=o(),_t=o(),Et=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:ft,axisAt:bt,cameraFrustumCoverage:st,closestPoint:rt,closestPointOnSilhouette:nt,copy:W,copyWithoutVerify:H,create:D,distance:ct,distance2:at,distanceToSilhouette:ut,elevate:Q,equals:pt,extrusionContainsPoint:gt,fromAABoundingRect:$,fromValues:J,getExtent:Z,intersectRay:tt,intersectRayClosestSilhouette:it,normal:ht,projectPoint:et,projectPointLocal:ot,rotate:dt,setAltitudeAt:lt,setExtent:X,transform:mt,up:wt,updateUnboundedPlane:K,wrap:G},Symbol.toStringTag,{value:"Module"}));export{X as A,mt as B,wt as C,G as D,W as a,Et as b,D as c,$ as d,ct as e,J as f,pt as g,gt as h,tt as i,st as j,ft as k,bt as l,rt as m,ht as n,nt as o,H as p,at as q,dt as r,ut as s,Q as t,K as u,Z as v,it as w,et as x,ot as y,lt as z};
2
+ import t from"../core/Logger.js";import{acosClamped as i}from"../core/mathUtils.js";import{ObjectStack as n}from"../core/ObjectStack.js";import{fromRotation as s,invert as r,transpose as e}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as o}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{copy as a,dot as c,length as u,set as g,subtract as b,exactEquals as f,transformMat4 as l,squaredLength as p,direction as m,scale as d,add as h,distance as j,normalize as y}from"../core/libs/gl-matrix-2/math/vec3.js";import{clone as I,fromValues as v,create as P}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as N}from"../geometry/support/aaBoundingRect.js";import{create as w,distance2 as x,projectPointClamp as M}from"../geometry/support/lineSegment.js";import{create as S,fromVectorsAndPoint as T,getNormal as V,fromValues as A,intersectRay as _,signedDistance as E,intersectLineSegmentClamp as O,isPointInClosedPositiveHalfspace as k,intersectLineSegment as F,copy as R,projectPoint as q,setOffsetFromPoint as B,wrap as C}from"../geometry/support/plane.js";import{distance2 as Y}from"../geometry/support/ray.js";import{projectPointSignedLength as L}from"../geometry/support/vector.js";import{sv3d as U}from"../geometry/support/vectorStacks.js";const z=()=>t.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function D(t=wt){return{plane:S(t.plane),origin:I(t.origin),basis1:I(t.basis1),basis2:I(t.basis2)}}function G(t,i,n){const s=Tt.get();return s.origin=t,s.basis1=i,s.basis2=n,s.plane=C(0,0,0,0),K(s),s}function W(t,i=D()){return J(t.origin,t.basis1,t.basis2,i)}function H(t,i){a(i.origin,t.origin),a(i.basis1,t.basis1),a(i.basis2,t.basis2),R(i.plane,t.plane)}function J(t,i,n,s=D()){return a(s.origin,t),a(s.basis1,i),a(s.basis2,n),K(s),Pt(s,"fromValues()"),s}function K(t){T(t.basis2,t.basis1,t.origin,t.plane)}function Q(t,i,n){t!==n&&W(t,n);const s=d(U.get(),ht(t),i);return h(n.origin,n.origin,s),n.plane[3]-=i,n}function X(t,i,n){return $(i,n),Q(n,ft(t,t.origin),n),n}function Z(t,i){const n=t.basis1[0],s=t.basis2[1],[r,e]=t.origin;return N(r-n,e-s,r+n,e+s,i)}function $(t,i=D()){const n=(t[2]-t[0])/2,s=(t[3]-t[1])/2;return g(i.origin,t[0]+n,t[1]+s,0),g(i.basis1,n,0,0),g(i.basis2,0,s,0),A(0,0,1,0,i.plane),i}function tt(t,i,n){return!!_(t.plane,i,n)&&yt(t,n)}function it(t,i,n){if(tt(t,i,n))return n;const s=nt(t,i,U.get());return h(n,i.origin,d(U.get(),i.direction,j(i.origin,s)/u(i.direction))),n}function nt(t,n,s){const r=xt.get();Nt(t,n,r,xt.get());let e=Number.POSITIVE_INFINITY;for(const o of Vt){const u=vt(t,o,Mt.get()),g=U.get();if(F(r,u,g)){const t=m(U.get(),n.origin,g),r=Math.abs(i(c(n.direction,t)));r<e&&(e=r,a(s,g))}}return e===Number.POSITIVE_INFINITY?rt(t,n,s):s}function st(t,i){return(i-t)/i}function rt(t,i,n){if(tt(t,i,n))return n;const s=xt.get(),r=xt.get();Nt(t,i,s,r);let e=Number.POSITIVE_INFINITY;for(const o of Vt){const c=vt(t,o,Mt.get()),u=U.get();if(O(s,c,u)){const t=Y(i,u);if(!k(r,u))continue;t<e&&(e=t,a(n,u))}}return at(t,i.origin)<e&&et(t,i.origin,n),n}function et(t,i,n){const s=q(t.plane,i,U.get()),r=M(It(t,t.basis1),s,-1,1,U.get()),e=M(It(t,t.basis2),s,-1,1,U.get());return b(n,h(U.get(),r,e),t.origin),n}function ot(t,i,n){const{origin:s,basis1:r,basis2:e}=t,o=b(U.get(),i,s),a=L(r,o),c=L(e,o),u=L(ht(t),o);return g(n,a,c,u)}function at(t,i){const n=ot(t,i,U.get()),{basis1:s,basis2:r}=t,e=u(s),o=u(r),a=Math.max(Math.abs(n[0])-e,0),c=Math.max(Math.abs(n[1])-o,0),g=n[2];return a*a+c*c+g*g}function ct(t,i){return Math.sqrt(at(t,i))}function ut(t,i){let n=Number.NEGATIVE_INFINITY;for(const s of Vt){const r=vt(t,s,Mt.get()),e=x(r,i);e>n&&(n=e)}return Math.sqrt(n)}function gt(t,i){return E(t.plane,i)>0&&yt(t,i)}function bt(t,i,n,s){return jt(t,n,s)}function ft(t,i){const n=-t.plane[3];return L(ht(t),i)-n}function lt(t,i,n,s){const r=ft(t,i),e=d(St,ht(t),n-r);return h(s,i,e),s}function pt(t,i){return t===i||null==t&&null==i||null!=t&&null!=i&&f(t.basis1,i.basis1)&&f(t.basis2,i.basis2)&&f(t.origin,i.origin)}function mt(t,i,n){return t!==n&&W(t,n),r(At,i),e(At,At),l(n.basis1,t.basis1,At),l(n.basis2,t.basis2,At),l(V(n.plane),V(t.plane),At),l(n.origin,t.origin,i),B(n.plane,n.plane,n.origin),n}function dt(t,i,n,r){return t!==r&&W(t,r),s(_t,i,n),l(r.basis1,t.basis1,_t),l(r.basis2,t.basis2,_t),K(r),r}function ht(t){return V(t.plane)}function jt(t,i,n){switch(i){case 0:a(n,t.basis1),y(n,n);break;case 1:a(n,t.basis2),y(n,n);break;case 2:a(n,ht(t))}return n}function yt(t,i){const n=b(U.get(),i,t.origin),s=p(t.basis1),r=p(t.basis2),e=c(t.basis1,n),o=c(t.basis2,n);return-e-s<0&&e-s<0&&-o-r<0&&o-r<0}function It(t,i){const n=Mt.get();return a(n.origin,t.origin),a(n.vector,i),n}function vt(t,i,n){const{basis1:s,basis2:r,origin:e}=t,o=d(U.get(),s,i.origin[0]),a=d(U.get(),r,i.origin[1]);h(n.origin,o,a),h(n.origin,n.origin,e);const c=d(U.get(),s,i.direction[0]),u=d(U.get(),r,i.direction[1]);return d(n.vector,h(c,c,u),2),n}function Pt(t,i){Math.abs(c(t.basis1,t.basis2)/(u(t.basis1)*u(t.basis2)))>1e-6&&z().warn(i,"Provided basis vectors are not perpendicular"),Math.abs(c(t.basis1,ht(t)))>1e-6&&z().warn(i,"Basis vectors and plane normal are not perpendicular"),Math.abs(-c(ht(t),t.origin)-t.plane[3])>1e-6&&z().warn(i,"Plane offset is not consistent with plane origin")}function Nt(t,i,n,s){const r=ht(t);T(r,i.direction,i.origin,n),T(V(n),r,i.origin,s)}const wt={plane:S(),origin:v(0,0,0),basis1:v(1,0,0),basis2:v(0,1,0)},xt=new n(S),Mt=new n(w),St=P(),Tt=new n(()=>D()),Vt=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],At=o(),_t=o(),Et=Object.freeze(Object.defineProperty({__proto__:null,altitudeAt:ft,axisAt:bt,cameraFrustumCoverage:st,closestPoint:rt,closestPointOnSilhouette:nt,copy:W,copyWithoutVerify:H,create:D,distance:ct,distance2:at,distanceToSilhouette:ut,elevate:Q,equals:pt,extrusionContainsPoint:gt,fromAABoundingRect:$,fromValues:J,getExtent:Z,intersectRay:tt,intersectRayClosestSilhouette:it,normal:ht,projectPoint:et,projectPointLocal:ot,rotate:dt,setAltitudeAt:lt,setExtent:X,transform:mt,up:wt,updateUnboundedPlane:K,wrap:G},Symbol.toStringTag,{value:"Module"}));export{X as A,mt as B,wt as C,G as D,W as a,Et as b,D as c,$ as d,ct as e,J as f,pt as g,gt as h,tt as i,st as j,ft as k,bt as l,rt as m,ht as n,nt as o,H as p,at as q,dt as r,ut as s,Q as t,K as u,Z as v,it as w,et as x,ot as y,lt as z};