@arcgis/core 4.34.0-next.65 → 4.34.0-next.66
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.
- package/Graphic.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05016b0713ef760fc57d.js +1 -0
- package/assets/esri/core/workers/chunks/{eadac757f74470b89a36.js → 0952aeddddc16705b7a3.js} +1 -1
- package/assets/esri/core/workers/chunks/09dd8613bc03e7a3a4cb.js +1 -0
- package/assets/esri/core/workers/chunks/0c4f07eb3f3dd5cd2c6c.js +1 -0
- package/assets/esri/core/workers/chunks/117eb1422e9795d37ea3.js +1 -0
- package/assets/esri/core/workers/chunks/{79933271a76a1756584f.js → 12d30c2367652e2c688b.js} +1 -1
- package/assets/esri/core/workers/chunks/16fe21ca9b24eaee3069.js +1 -0
- package/assets/esri/core/workers/chunks/18c7b1e1fbf7eb6c3c33.js +1 -0
- package/assets/esri/core/workers/chunks/{e72aee3f857aa473822c.js → 1c7b5ca80e80c314f78d.js} +1 -1
- package/assets/esri/core/workers/chunks/{426232091caf8608e5f1.js → 26b791291689434dde09.js} +1 -1
- package/assets/esri/core/workers/chunks/2a938096a42613425c7b.js +1 -0
- package/assets/esri/core/workers/chunks/31e7358fe802abb3f8db.js +1 -0
- package/assets/esri/core/workers/chunks/3212a476184be25d17f8.js +1 -0
- package/assets/esri/core/workers/chunks/3bc50ee639a4d16c4f80.js +1 -0
- package/assets/esri/core/workers/chunks/4102ed32b8dbdc32cb3b.js +1 -0
- package/assets/esri/core/workers/chunks/{6ab435423acb0ed0b1c7.js → 44031bef6d500167ef0b.js} +1 -1
- package/assets/esri/core/workers/chunks/{a29fb90226bd08157bd1.js → 481aea82501d04667ba2.js} +1 -1
- package/assets/esri/core/workers/chunks/{7c3a1958990de095d3a1.js → 48316d91c06928f69f61.js} +1 -1
- package/assets/esri/core/workers/chunks/{897f9775f06ddbf6486f.js → 4be2bab8ff3bd14ffdfb.js} +1 -1
- package/assets/esri/core/workers/chunks/4f0f6653b8e92c633d14.js +1 -0
- package/assets/esri/core/workers/chunks/548818df658b607a364e.js +1 -0
- package/assets/esri/core/workers/chunks/5c053d197935c65792ce.js +1 -0
- package/assets/esri/core/workers/chunks/60920d4856a011ace7e2.js +1 -0
- package/assets/esri/core/workers/chunks/66cb5b294d7f251c2cc8.js +1 -0
- package/assets/esri/core/workers/chunks/66ffefd46fe6175c2af4.js +1 -0
- package/assets/esri/core/workers/chunks/6a5b5b80917a5375b9f6.js +1 -0
- package/assets/esri/core/workers/chunks/{d1e8220dcae1d01d3c35.js → 707311e24b2f458d9209.js} +1 -1
- package/assets/esri/core/workers/chunks/7a17e78c76076ed4476f.js +1 -0
- package/assets/esri/core/workers/chunks/7e95896ac41c7e2ca26a.js +1 -0
- package/assets/esri/core/workers/chunks/{5d12862042b6bf9f9d54.js → 82cb5defb0593e3017ff.js} +1 -1
- package/assets/esri/core/workers/chunks/8f60804c7ba445f25df8.js +1 -0
- package/assets/esri/core/workers/chunks/9a6d359ead62a8eadd3c.js +1 -0
- package/assets/esri/core/workers/chunks/{657b01a6df8dc46c5209.js → 9e3f8c06b4e090a35710.js} +1 -1
- package/assets/esri/core/workers/chunks/9eb1bfcb9b05f2a36748.js +1 -0
- package/assets/esri/core/workers/chunks/{0a36df6fdab95785d1ce.js → a2963ffc9a8c90822d2d.js} +1 -1
- package/assets/esri/core/workers/chunks/ad7aa7d09bfceb12609e.js +1 -0
- package/assets/esri/core/workers/chunks/{9f93513037a6e87433c4.js → adfb018f510e19a520fb.js} +1 -1
- package/assets/esri/core/workers/chunks/af1030e4c4437d4eb600.js +1 -0
- package/assets/esri/core/workers/chunks/{a1bd4eecca1e3272bffb.js → aff553c3d6544e20f188.js} +1 -1
- package/assets/esri/core/workers/chunks/b482132638f3b351724c.js +1 -0
- package/assets/esri/core/workers/chunks/{e1b25b1ce3bd4f0f2cda.js → bc5fa33afec5354601a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{0b53bc76d38e85902748.js → c20aead85cdea91c4b74.js} +1 -1
- package/assets/esri/core/workers/chunks/{904c116c6b093e0e970c.js → d1b361b8adf1c719a10a.js} +1 -1
- package/assets/esri/core/workers/chunks/dcad3dcbd4ea2f5a6a04.js +1 -0
- package/assets/esri/core/workers/chunks/e0fe6bb51ecc9b2faf69.js +1 -0
- package/assets/esri/core/workers/chunks/e4e224983c3ee24fc51d.js +1 -0
- package/assets/esri/core/workers/chunks/ee391a41144855fc625d.js +1 -0
- package/assets/esri/core/workers/chunks/f054557e23978e174686.js +1 -0
- package/assets/esri/core/workers/chunks/f5101f5f93f776a6456f.js +1 -0
- package/chunks/GlowComposition.glsl.js +4 -4
- package/config.js +1 -1
- package/core/AsyncUpdate.js +1 -1
- package/core/mapCollectionUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
- package/geometry/Polygon.js +1 -1
- package/geometry/support/centroid.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/graphic/AggregateGraphicOrigin.js +1 -1
- package/graphic/BuildingGraphicOrigin.js +1 -1
- package/graphic/CSVGraphicOrigin.js +1 -1
- package/graphic/CatalogGraphicOrigin.js +1 -1
- package/graphic/FeatureGraphicOrigin.js +1 -1
- package/graphic/GeoJSONGraphicOrigin.js +1 -1
- package/graphic/GeoRSSGraphicOrigin.js +1 -1
- package/graphic/ImageryGraphicOrigin.js +1 -1
- package/graphic/ImageryTileGraphicOrigin.js +1 -1
- package/graphic/KMLGraphicOrigin.js +1 -1
- package/graphic/KnowledgeGraphGraphicOrigin.js +1 -1
- package/graphic/LinkChartGraphicOrigin.js +1 -1
- package/graphic/MapImageGraphicOrigin.js +1 -1
- package/graphic/MapNotesGraphicOrigin.js +1 -1
- package/graphic/OGCFeatureGraphicOrigin.js +1 -1
- package/graphic/OrientedImageryGraphicOrigin.js +1 -1
- package/graphic/ParquetGraphicOrigin.js +1 -1
- package/graphic/PointCloudGraphicOrigin.js +1 -1
- package/graphic/SceneGraphicOrigin.js +1 -1
- package/graphic/StreamGraphicOrigin.js +1 -1
- package/graphic/SubtypeGroupGraphicOrigin.js +1 -1
- package/graphic/TileGraphicOrigin.js +1 -1
- package/graphic/TrackGraphicOrigin.js +1 -1
- package/graphic/VectorTileGraphicOrigin.js +1 -1
- package/graphic/VoxelGraphicOrigin.js +1 -1
- package/graphic/WCSGraphicOrigin.js +1 -1
- package/graphic/WFSGraphicOrigin.js +1 -1
- package/graphic/getIdFieldsProvider.js +5 -0
- package/graphic/getSliceableContainer.js +5 -0
- package/graphic/graphicOrigins.d.ts +0 -2
- package/graphic/graphicOrigins.js +1 -1
- package/interfaces.d.ts +115 -60
- package/kernel.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/orientedImagery/core/coverageUtils.js +1 -1
- package/layers/support/rasterDatasets/multidimensionalUtils.js +1 -1
- package/package.json +1 -1
- package/smartMapping/support/adapters/FeatureLayerBinningAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewCIMSymbol.js +1 -1
- package/symbols/support/previewSymbol2D.js +1 -1
- package/symbols/support/renderUtils.js +1 -1
- package/symbols/support/svgUtils.js +1 -1
- package/symbols/support/symbolUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/analysis/ElevationProfile/ElevationProfileInputVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileLineVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfile/ElevationProfileVisualization2D.js +5 -0
- package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization3D.js +5 -0
- package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/environment/Fog.js +1 -1
- package/views/3d/layers/BuildingSceneLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/graphicUtils.js +1 -1
- package/views/3d/layers/i3s/Intersector.js +1 -1
- package/views/3d/layers/support/SublayerPopupHighlightHelper3D.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/Intersector.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheFormats.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +4 -4
- package/views/3d/webgl-engine/effects/glow/GlowPresets.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/intersectorUtilsConversions.js +1 -1
- package/views/View2D.js +1 -1
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +5 -0
- package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
- package/views/analysis/ElevationProfile/constants.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileInputVisualizationUtils.js +5 -0
- package/views/draw/support/createUtils.js +1 -1
- package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/Legend/styles/card/CardView.js +1 -1
- package/widgets/Legend/styles/card/ColorRamp.js +1 -1
- package/widgets/Legend/styles/card/LegendElement.js +1 -1
- package/widgets/Legend/styles/card/UnivariateAboveAndBelowRamp.js +1 -1
- package/widgets/Legend/styles/card/UnivariateColorSizeRamp.js +1 -1
- package/widgets/Legend/styles/classic/ClassicView.js +1 -1
- package/widgets/Legend/styles/classic/LegendElement.js +1 -1
- package/widgets/Legend/styles/classic/UnivariateAboveAndBelowRamp.js +1 -1
- package/widgets/Legend/styles/classic/UnivariateColorSizeRamp.js +1 -1
- package/widgets/Legend/styles/support/relationshipUtils.js +1 -1
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
- package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
- package/widgets/UtilityNetworkTrace/support/GraphicHandler.js +1 -1
- package/assets/esri/core/workers/chunks/0264905da9fa56166538.js +0 -1
- package/assets/esri/core/workers/chunks/070b29cba896f46537f9.js +0 -1
- package/assets/esri/core/workers/chunks/0cdf6b51f2a63f348530.js +0 -1
- package/assets/esri/core/workers/chunks/0d82cc6905b105b3568a.js +0 -1
- package/assets/esri/core/workers/chunks/1143313f2f6f34deaad7.js +0 -1
- package/assets/esri/core/workers/chunks/14c6461ffd36319e1d74.js +0 -1
- package/assets/esri/core/workers/chunks/2394ac65d64e50399d76.js +0 -1
- package/assets/esri/core/workers/chunks/47febd4de836a33b51b1.js +0 -1
- package/assets/esri/core/workers/chunks/487afbf352d12c745430.js +0 -1
- package/assets/esri/core/workers/chunks/56b4dcd04c844eaacd60.js +0 -1
- package/assets/esri/core/workers/chunks/5d65987f2c1b5c56a799.js +0 -1
- package/assets/esri/core/workers/chunks/77e27f318b5863dd0f5c.js +0 -1
- package/assets/esri/core/workers/chunks/7b7f5028a488bb9c10f4.js +0 -1
- package/assets/esri/core/workers/chunks/808cfed7022e3846d5b2.js +0 -1
- package/assets/esri/core/workers/chunks/8bd5a0ff7dcf1067bf53.js +0 -1
- package/assets/esri/core/workers/chunks/99b20eef2893047fac10.js +0 -1
- package/assets/esri/core/workers/chunks/9f4e23bae621ff3ecea3.js +0 -1
- package/assets/esri/core/workers/chunks/a596d6ccb6103e594031.js +0 -1
- package/assets/esri/core/workers/chunks/a5e6359fadbd699b1c8e.js +0 -1
- package/assets/esri/core/workers/chunks/a7f3cdd9a249ef4572ce.js +0 -1
- package/assets/esri/core/workers/chunks/a80d769b0ed025f0df64.js +0 -1
- package/assets/esri/core/workers/chunks/af83dddddbfe25194527.js +0 -1
- package/assets/esri/core/workers/chunks/b057e6d593c1607cae61.js +0 -1
- package/assets/esri/core/workers/chunks/b1f1a26e7a2ef5b783ee.js +0 -1
- package/assets/esri/core/workers/chunks/b605dfdfed8ff8eda4f3.js +0 -1
- package/assets/esri/core/workers/chunks/c337c1a2dbc452780dd7.js +0 -1
- package/assets/esri/core/workers/chunks/c601bbdafdee5074b04f.js +0 -1
- package/assets/esri/core/workers/chunks/c8694a27e2cf28b010e8.js +0 -1
- package/assets/esri/core/workers/chunks/e6457ac25c0829ee039c.js +0 -1
- package/assets/esri/core/workers/chunks/f4167fc895d4009df1c7.js +0 -1
- package/assets/esri/core/workers/chunks/f76774781865cb1411b0.js +0 -1
- package/assets/esri/core/workers/chunks/fd04df45cdcc6ff52554.js +0 -1
- package/graphic/IntegratedMesh3DTilesGraphicOrigin.d.ts +0 -4
- package/graphic/IntegratedMesh3DTilesGraphicOrigin.js +0 -5
- package/graphic/IntegratedMeshGraphicOrigin.d.ts +0 -4
- package/graphic/IntegratedMeshGraphicOrigin.js +0 -5
- package/graphic/isIntegratedMesh3DTilesGraphicOrigin.js +0 -5
- package/graphic/isIntegratedMeshGraphicOrigin.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileHoveredPointsVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileInputVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineVisualization.js +0 -5
- package/views/3d/analysis/ElevationProfile/ElevationProfileVisualization.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3249],{6797:(e,t,r)=>{r.d(t,{Mj:()=>d,Ui:()=>h,w2:()=>y});var i=r(65008),s=r(7762),n=r(88620);const o=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof i.A}function l(e){return e instanceof s.A?Object.keys(e.items):a(e)?(0,n.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof s.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const r=e.diff;if(r&&"function"==typeof r)return r(e,t);const i=l(e),s=l(t);if(0===i.length&&0===s.length)return;if(!i.length||!s.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 n=s.filter(e=>!i.includes(e)),d=i.filter(e=>!s.includes(e)),y=i.filter(r=>s.includes(r)&&u(e,r)!==u(t,r)).concat(n,d).sort(),h=c(e);if(h&&o.has(h)&&y.length)return{type:"complete",oldValue:e,newValue:t};let f;const m=a(e)&&a(t);for(const i of y){const s=u(e,i),n=u(t,i);let o;if((m||"function"!=typeof s&&"function"!=typeof n)&&s!==n&&(null!=s||null!=n)){if(r&&r[i]&&"function"==typeof r[i])o=r[i]?.(s,n);else if(s instanceof Date&&n instanceof Date){if(s.getTime()===n.getTime())continue;o={type:"complete",oldValue:s,newValue:n}}else o="object"==typeof s&&"object"==typeof n&&c(s)===c(n)?p(s,n):{type:"complete",oldValue:s,newValue:n};null!=o&&(null!=f?f.diff[i]=o:f={type:"partial",diff:{[i]:o}})}}return f}function d(e,t){return function(e,t){if(null==e)return!1;const r=t.split(".");let i=e;for(const e of r){if("complete"===i.type)return!0;if("partial"!==i.type)return!1;{const t=i.diff[e];if(!t)return!1;i=t}}return!0}(e,t)}function y(e,t){if(!e)return!1;if("partial"===e.type){const r=Object.keys(e.diff);return 1===r.length&&r[0]===t}return!1}function h(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},15775:(e,t,r)=>{r.d(t,{A:()=>ye});var i=r(31635),s=r(13874),n=r(78888),o=r(7762),a=r(49186),l=r(44208),u=r(4902),c=r(4718),p=r(92474),d=r(53966),y=r(92071),h=r(39516),f=r(84952),m=r(10107),g=r(79901),b=r(36005),w=r(40608),v=r(43937),S=r(56507),_=r(35666),x=r(88620),I=r(5443),C=r(16930),A=r(50498),F=r(89808),T=r(99959);const O=Symbol("isMapImageGraphicOriginSymbol");var M;class D extends T.A{get[(M=O,F.Q)](){return this.layer}constructor(e,t){super(),this[M]=!0,this.type="map-image",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}const P=Symbol("isTileGraphicOriginSymbol");var L;class q extends T.A{get[(L=P,F.Q)](){return this.layer}constructor(e,t){super(),this[L]=!0,this.type="tile",this.layer=e,this.sublayer=t}get id(){return`${this.layer.id}:__${this.sublayer.id}__`}}var Z,j=r(28132),E=r(32756),R=r(15426),V=r(33143),N=r(20437),k=r(95466),$=r(30524),B=r(46499),z=r(39383),Q=r(37352),G=r(91880),J=r(45067),U=r(22453),Y=r(27733),K=r(49053),H=r(41214),X=r(2272),W=r(54546),ee=r(61956),te=r(30291),re=r(33910),ie=r(43440);function se(e){return"esriSMS"===e?.type}function ne(e,t,r){const i=r.minimumWritableOrigin||r.origin;return!!i&&e.originIdOf(t)>=(0,_.aB)(i)}function oe(e,t,r){const i=ne(this,t,r);return{ignoreOrigin:!0,allowNull:i,enabled:!!r&&"map-image"===r.layer?.type&&(r.writeSublayerStructure||i)}}function ae(e,t,r){return{enabled:!!r&&"tile"===r.layer?.type&&(ne(this,t,r)||this._isOverridden(t))}}function le(e,t,r){return{ignoreOrigin:!0,enabled:r&&r.writeSublayerStructure||!1}}function ue(e,t,r){return{ignoreOrigin:!0,enabled:!!r?.writeSublayerStructure&&this.originIdOf(t)>2}}function ce(e,t,r){return{ignoreOrigin:!0,enabled:!!r&&(r.writeSublayerStructure||ne(this,t,r))}}let pe=0;const de=new Set(["layer","parent","loaded","loadStatus","loadError","loadWarnings"]);let ye=class extends((0,y.P)((0,u.sA)(p.x_))){static{Z=this}constructor(e){super(e),this.attributeTableTemplate=null,this.capabilities=void 0,this.maxScaleRange={minScale:0,maxScale:0},this.fields=null,this.fullExtent=null,this.geometryType=null,this.globalIdField=null,this.isTable=!1,this.legendEnabled=!0,this.objectIdField=null,this.parent=null,this.popupEnabled=!0,this.popupTemplate=null,this.relationships=null,this.sourceJSON=null,this.spatialReference=null,this.title=null,this.typeIdField=null,this.type="sublayer",this.types=null,this._lastParsedUrl=null}async load(e){return this.addResolvingPromise((async()=>{const{layer:t,url:r}=this;if(!t&&!r)throw new a.A("sublayer:missing-layer","Sublayer can't be loaded without being part of a layer",{sublayer:this});const i=t?await t.fetchSublayerInfo(this,e):(await(0,n.A)(r,{responseType:"json",query:{f:"json"},...e})).data;i&&(this.sourceJSON=i,this.read({layerDefinition:i},{origin:"service",layer:t,url:(0,X.Dl)(r)}))})()),this}readCapabilities(e,t){t=t.layerDefinition||t;const{attachment:r,operations:{supportsQuery:i,supportsQueryAttachments:s},query:{supportsFormatPBF:n,supportsOrderBy:o,supportsPagination:a},data:{supportsAttachment:l},queryRelated:u}=(0,U.S)(t,this.url);return{attachment:{supportsOrderByFields:r?.supportsOrderByFields??!1,supportsResize:r?.supportsResize??!1},exportMap:{supportsModification:!!t.canModifyLayer},operations:{supportsQuery:i,supportsQueryAttachments:s},data:{supportsAttachment:l},query:{supportsFormatPBF:n,supportsOrderBy:o,supportsPagination:a},queryRelated:u}}get defaultPopupTemplate(){return this.createPopupTemplate()}set definitionExpression(e){this._setAndNotifyLayer("definitionExpression",e)}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}readMaxScaleRange(e,t){return{minScale:(t=t.layerDefinition||t).minScale??0,maxScale:t.maxScale??0}}get fieldsIndex(){return new k.A(this.fields||[])}set floorInfo(e){this._setAndNotifyLayer("floorInfo",e)}readGlobalIdFieldFromService(e,t){if((t=t.layerDefinition||t).globalIdField)return t.globalIdField;if(t.fields)for(const e of t.fields)if("esriFieldTypeGlobalID"===e.type)return e.name}get graphicOrigin(){if(!this.layer)return null;switch(this.layer.type){case"tile":return new q(this.layer,this);case"map-image":return new D(this.layer,this)}}get id(){return this._get("id")??pe++}set id(e){this._get("id")!==e&&(!1!==this.layer?.capabilities?.exportMap?.supportsDynamicLayers?this._set("id",e):this._logLockedError("id","capability not available 'layer.capabilities.exportMap.supportsDynamicLayers'"))}readIsTable(e,t){return"Table"===t.type}set labelingInfo(e){this._setAndNotifyLayer("labelingInfo",e)}writeLabelingInfo(e,t,r,i){e&&e.length&&(t.layerDefinition={drawingInfo:{labelingInfo:e.map(e=>e.write({},i))}})}set labelsVisible(e){this._setAndNotifyLayer("labelsVisible",e)}set layer(e){this._set("layer",e),this.sublayers?.forEach(t=>t.layer=e)}set listMode(e){this._set("listMode",e)}set minScale(e){this._setAndNotifyLayer("minScale",e)}readMinScale(e,t){return t.minScale||t.layerDefinition?.minScale||0}set maxScale(e){this._setAndNotifyLayer("maxScale",e)}readMaxScale(e,t){return t.maxScale||t.layerDefinition?.maxScale||0}readObjectIdFieldFromService(e,t){if((t=t.layerDefinition||t).objectIdField)return t.objectIdField;const r=t.fields?.find(e=>"esriFieldTypeOID"===e.type);return r?.name}set opacity(e){this._setAndNotifyLayer("opacity",e)}readOpacity(e,t){const{layerDefinition:r}=t;return 1-.01*(r?.transparency??r?.drawingInfo?.transparency??0)}writeOpacity(e,t,r,i){t.layerDefinition={drawingInfo:{transparency:100-100*e}}}set orderBy(e){this._setAndNotifyLayer("orderBy",e)}writeParent(e,t){this.parent&&this.parent!==this.layer?t.parentLayerId=(0,S.Vr)(this.parent.id):t.parentLayerId=-1}get queryTask(){if(!this.layer)return null;const{capabilities:e,fieldsIndex:t,layer:r,url:i}=this,{spatialReference:s}=r,n="gdbVersion"in r?r.gdbVersion:void 0,o=(0,l.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF;return new j.A({fieldsIndex:t,gdbVersion:n,pbfSupported:o,queryAttachmentsSupported:e?.operations?.supportsQueryAttachments??!1,sourceSpatialReference:s,url:i})}set renderer(e){if((0,$.yp)(e,this.fieldsIndex),e)for(const t of e.symbols)if((0,re.wk)(t)){d.A.getLogger(this).warn("Sublayer renderer should use 2D symbols");break}this._setAndNotifyLayer("renderer",e)}get source(){return this._get("source")||new K.f({mapLayerId:this.id})}set source(e){this._setAndNotifyLayer("source",e)}set sublayers(e){this._handleSublayersChange(e,this._get("sublayers")),this._set("sublayers",e)}castSublayers(e){return(0,S.dp)(o.A.ofType(Z),e)}writeSublayers(e,t,r){this.sublayers?.length&&(t[r]=this.sublayers.map(e=>e.id).toArray().reverse())}readTitle(e,t){return t.layerDefinition?.name??t.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find(e=>e.name.toLowerCase()===r);e&&(r=e.name)}return r}get url(){const e=this.layer?.parsedUrl??this._lastParsedUrl,t=this.source;if(!e)return null;if(this._lastParsedUrl=e,"map-layer"===t?.type)return`${e.path}/${t.mapLayerId}`;const r={layer:JSON.stringify({source:this.source})};return`${e.path}/dynamicLayer?${(0,f.x0)(r)}`}set url(e){this._overrideIfSome("url",e)}set visible(e){this._setAndNotifyLayer("visible",e)}writeVisible(e,t,r,i){t[r]=this.getAtOrigin("defaultVisibility","service")||e}clone(){const{store:e}=(0,x.oY)(this),t=new Z;return(0,x.oY)(t).store=e.clone(de),this.commitProperty("url"),t._lastParsedUrl=this._lastParsedUrl,t}createPopupTemplate(e){return(0,te.tn)(this,e)}createQuery(){return new ee.A({returnGeometry:!0,where:this.definitionExpression||"1=1"})}async createFeatureLayer(){if(this.hasOwnProperty("sublayers"))return null;const e=(await Promise.all([r.e(9953),r.e(1017),r.e(8506),r.e(9784),r.e(7694)]).then(r.bind(r,29784))).default,{layer:t,url:i}=this;let s;if(i&&this.originIdOf("url")>2)s=new e({url:i});else{if(!t?.parsedUrl)throw new a.A("createFeatureLayer:missing-information","Cannot create a FeatureLayer without a url or a parent layer");{const r=t.parsedUrl;s=new e({url:r.path}),r&&this.source&&("map-layer"===this.source.type?s.layerId=this.source.mapLayerId:s.dynamicDataSource=this.source)}}return null!=t?.refreshInterval&&(s.refreshInterval=t.refreshInterval),this.definitionExpression&&(s.definitionExpression=this.definitionExpression),this.floorInfo&&(s.floorInfo=(0,c.o8)(this.floorInfo)),this.originIdOf("labelingInfo")>2&&(s.labelingInfo=(0,c.o8)(this.labelingInfo)),this.originIdOf("labelsVisible")>0&&(s.labelsVisible=this.labelsVisible),this.originIdOf("legendEnabled")>0&&(s.legendEnabled=this.legendEnabled),this.originIdOf("visible")>0&&(s.visible=this.visible),this.originIdOf("minScale")>0&&(s.minScale=this.minScale),this.originIdOf("maxScale")>0&&(s.maxScale=this.maxScale),this.originIdOf("opacity")>0&&(s.opacity=this.opacity),this.originIdOf("popupTemplate")>0&&(s.popupTemplate=(0,c.o8)(this.popupTemplate)),this.originIdOf("renderer")>2&&(s.renderer=(0,c.o8)(this.renderer)),"data-layer"===this.source?.type&&(s.dynamicDataSource=this.source.clone()),this.originIdOf("title")>0&&(s.title=this.title),"map-image"===t?.type&&t.originIdOf("customParameters")>0&&(s.customParameters=t.customParameters),"tile"===t?.type&&t.originIdOf("customParameters")>0&&(s.customParameters=t.customParameters),s}getField(e){return this.fieldsIndex.get(e)}getFeatureType(e){return(0,R.xd)(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=this.getFeatureType(r);if(i){const t=i.domains&&i.domains[e];if(t&&"inherited"!==t.type)return t}return this._getLayerDomain(e)}async queryAttachments(e,t){await this.load(),e=W.A.from(e);const r=this.capabilities;if(!r?.data?.supportsAttachment)throw new a.A("queryAttachments:not-supported","this layer doesn't support attachments");const{attachmentTypes:i,objectIds:s,globalIds:n,num:o,size:l,start:u,where:c}=e;if(!r?.operations?.supportsQueryAttachments&&(i?.length>0||n?.length>0||l?.length>0||o||u||c))throw new a.A("queryAttachments:option-not-supported","when 'capabilities.operations.supportsQueryAttachments' is false, only objectIds is supported",e);if(!(s?.length||n?.length||c))throw new a.A("queryAttachments:invalid-query","'objectIds', 'globalIds', or 'where' are required to perform attachment query",e);return!r?.attachment?.supportsOrderByFields&&e.orderByFields?.length&&((e=e.clone()).orderByFields=null),this.queryTask.executeAttachmentQuery(e,t)}async queryFeatureCount(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatureCount:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatureCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryFeatures(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryFeatures:not-supported","this layer has no url.");const r=await this.queryTask.execute(e,{...t,query:{...this.layer?.customParameters,token:this.layer?.apiKey}});if(r?.features){const e=this.graphicOrigin;for(const t of r.features)t.sourceLayer=this,t.origin=e}return r}async queryObjectIds(e=this.createQuery(),t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryObjectIds:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryObjectIds:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeForIds(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeatures(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeatures:not-supported","this layer doesn't support queries.");if(!this.url)throw new a.A("queryRelatedFeatures:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQuery(e,{...t,query:{...this.layer?.customParameters,token:r}})}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.capabilities.operations.supportsQuery)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support queries.");if(!this.capabilities.queryRelated.supportsCount)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer doesn't support query related counts.");if(!this.url)throw new a.A("queryRelatedFeaturesCount:not-supported","this layer has no url.");const r=this.layer?.apiKey;return await this.queryTask.executeRelationshipQueryForCount(e,{...t,query:{...this.layer?.customParameters,token:r}})}toExportImageJSON(e){const t={id:this.id,source:this.source?.toJSON()||{mapLayerId:this.id,type:"mapLayer"}},r=(0,h.mA)(e,this.definitionExpression);null!=r&&(t.definitionExpression=r);const i=["renderer","labelingInfo","opacity","labelsVisible"].reduce((e,t)=>(e[t]=this.originIdOf(t),e),{}),s=Object.keys(i).some(e=>i[e]>2);if(s){const e=t.drawingInfo={};if(i.renderer>2&&(e.renderer=this.renderer?this.renderer.toJSON():null),i.labelsVisible>2&&(e.showLabels=this.labelsVisible),this.labelsVisible&&i.labelingInfo>2)if(this.labelingInfo){!this.loaded&&this.labelingInfo?.some(e=>!e.labelPlacement)&&d.A.getLogger(this).warnOnce(`A Sublayer (title: ${this.title}, id: ${this.id}) has an undefined 'labelPlacement' and so labels cannot be displayed. Either define a valid 'labelPlacement' or call Sublayer.load() to use a default value based on geometry type.`,{sublayer:this});let t=this.labelingInfo;null!=this.geometryType&&(t=(0,z.z)(this.labelingInfo,A.gy.toJSON(this.geometryType))),e.showLabels=!0,e.labelingInfo=t.filter(e=>e.labelPlacement).map(e=>e.toJSON({origin:"service",layer:this.layer}))}else e.showLabels=!1;i.opacity>2&&(e.transparency=100-100*this.opacity),this._assignDefaultSymbolColors(e.renderer)}return(this.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1)&&this.originIdOf("orderBy")>2&&(t.orderBy=this.orderBy?.map(e=>e.toJSON())??null),t}_assignDefaultSymbolColors(e){this._forEachSimpleMarkerSymbols(e,e=>{e.color||"esriSMSX"!==e.style&&"esriSMSCross"!==e.style||(e.outline?.color?e.color=e.outline.color:e.color=[0,0,0,0])})}_forEachSimpleMarkerSymbols(e,t){if(e){const r=("uniqueValueInfos"in e?e.uniqueValueInfos:"classBreakInfos"in e?e.classBreakInfos:null)??[];for(const e of r)se(e.symbol)&&t(e.symbol);"symbol"in e&&se(e.symbol)&&t(e.symbol),"defaultSymbol"in e&&se(e.defaultSymbol)&&t(e.defaultSymbol)}}_setAndNotifyLayer(e,t){const r=this.layer,i=this._get(e);let s,n;switch(e){case"definitionExpression":case"floorInfo":s="supportsSublayerDefinitionExpression";break;case"minScale":case"maxScale":case"visible":s="supportsSublayerVisibility";break;case"labelingInfo":case"labelsVisible":case"opacity":case"renderer":case"source":s="supportsDynamicLayers",n="supportsModification";break;case"orderBy":s="supportsSublayerOrderBy",n="supportsModification"}const o=(0,x.oY)(this).getDefaultOrigin();if("service"!==o){if(s&&!1===this.layer?.capabilities?.exportMap?.[s])return void this._logLockedError(e,`capability not available 'layer.capabilities.exportMap.${s}'`);if(n&&!1===this.capabilities?.exportMap[n])return void this._logLockedError(e,`capability not available 'capabilities.exportMap.${n}'`)}"source"!==e||"not-loaded"===this.loadStatus?(this._set(e,t),"service"!==o&&i!==t&&r?.emit&&r.emit("sublayer-update",{propertyName:e,target:this})):this._logLockedError(e,"'source' can't be changed after calling sublayer.load()")}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeAllHandles()),e&&(e.forEach(e=>{e.parent=this,e.layer=this.layer}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this.layer}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null}),e.on("before-changes",e=>{(this.layer?.capabilities?.exportMap?.supportsSublayersChanges??1)||(d.A.getLogger(this).error(new a.A("sublayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{sublayer:this,layer:this.layer})),e.preventDefault())})]))}_logLockedError(e,t){const{layer:r,declaredClass:i}=this;d.A.getLogger(i).error(new a.A("sublayer:locked",`Property '${String(e)}' can't be changed on Sublayer from the layer '${r?.id}'`,{reason:t,sublayer:this,layer:r}))}_getLayerDomain(e){return this.fieldsIndex.get(e)?.domain??null}static{this.test={isMapImageLayerOverridePolicy:e=>e===ue||e===le||e===oe,isTileImageLayerOverridePolicy:e=>e===ae}}};(0,i.Cg)([(0,m.MZ)({type:ie.A,json:{name:"attributeTableInfo",write:{overridePolicy:oe},origins:{"web-scene":{write:!1}}}})],ye.prototype,"attributeTableTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"capabilities",void 0),(0,i.Cg)([(0,b.w)("service","capabilities",["layerDefinition.canModifyLayer","layerDefinition.capabilities"])],ye.prototype,"readCapabilities",null),(0,i.Cg)([(0,m.MZ)()],ye.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,m.MZ)({type:String,value:null,json:{name:"layerDefinition.definitionExpression",write:{allowNull:!0,overridePolicy:oe}}})],ye.prototype,"definitionExpression",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"effectiveScaleRange",null),(0,i.Cg)([(0,b.w)("service","maxScaleRange",["minScale","maxScale"])],ye.prototype,"readMaxScaleRange",null),(0,i.Cg)([(0,m.MZ)({type:[N.A],json:{origins:{service:{read:{source:"layerDefinition.fields"}}}}})],ye.prototype,"fields",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"fieldsIndex",null),(0,i.Cg)([(0,m.MZ)({type:Q.A,value:null,json:{name:"layerDefinition.floorInfo",read:{source:"layerDefinition.floorInfo"},write:{target:"layerDefinition.floorInfo",overridePolicy:oe},origins:{"web-scene":{read:!1,write:!1}}}})],ye.prototype,"floorInfo",null),(0,i.Cg)([(0,m.MZ)({type:I.A,json:{read:{source:"layerDefinition.extent"}}})],ye.prototype,"fullExtent",void 0),(0,i.Cg)([(0,m.MZ)({type:A.gy.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:A.gy.read}}}}})],ye.prototype,"geometryType",void 0),(0,i.Cg)([(0,m.MZ)({type:String})],ye.prototype,"globalIdField",void 0),(0,i.Cg)([(0,b.w)("service","globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],ye.prototype,"readGlobalIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"graphicOrigin",null),(0,i.Cg)([(0,m.MZ)({type:S.jz,json:{write:{ignoreOrigin:!0}}})],ye.prototype,"id",null),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"isTable",void 0),(0,i.Cg)([(0,b.w)("service","isTable",["type"])],ye.prototype,"readIsTable",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[B.A],json:{read:{source:"layerDefinition.drawingInfo.labelingInfo"},write:{target:"layerDefinition.drawingInfo.labelingInfo",overridePolicy:ue}}})],ye.prototype,"labelingInfo",null),(0,i.Cg)([(0,v.K)("labelingInfo")],ye.prototype,"writeLabelingInfo",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"layerDefinition.drawingInfo.showLabels"},write:{target:"layerDefinition.drawingInfo.showLabels",overridePolicy:le}}})],ye.prototype,"labelsVisible",null),(0,i.Cg)([(0,m.MZ)({value:null})],ye.prototype,"layer",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{write:{overridePolicy:ae}}})],ye.prototype,"layerItemId",void 0),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend",overridePolicy:ce}}})],ye.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:["show","hide","hide-children"],value:"show",json:{read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],ye.prototype,"listMode",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:le}}})],ye.prototype,"minScale",null),(0,i.Cg)([(0,b.w)("minScale",["minScale","layerDefinition.minScale"])],ye.prototype,"readMinScale",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:0,json:{write:{overridePolicy:le}}})],ye.prototype,"maxScale",null),(0,i.Cg)([(0,b.w)("maxScale",["maxScale","layerDefinition.maxScale"])],ye.prototype,"readMaxScale",null),(0,i.Cg)([(0,m.MZ)()],ye.prototype,"objectIdField",void 0),(0,i.Cg)([(0,b.w)("service","objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],ye.prototype,"readObjectIdFieldFromService",null),(0,i.Cg)([(0,m.MZ)({type:Number,value:1,json:{write:{target:"layerDefinition.drawingInfo.transparency",overridePolicy:le}}})],ye.prototype,"opacity",null),(0,i.Cg)([(0,b.w)("opacity",["layerDefinition.drawingInfo.transparency","layerDefinition.transparency"])],ye.prototype,"readOpacity",null),(0,i.Cg)([(0,v.K)("opacity")],ye.prototype,"writeOpacity",null),(0,i.Cg)([(0,m.MZ)({value:null,type:[G.A],json:{name:"layerDefinition.orderBy",read:{reader:E.Rr},write:{overridePolicy:oe},origins:{"web-scene":{read:!1,write:!1}}}})],ye.prototype,"orderBy",null),(0,i.Cg)([(0,m.MZ)({json:{type:S.jz,write:{target:"parentLayerId",writerEnsuresNonNull:!0,overridePolicy:le}}})],ye.prototype,"parent",void 0),(0,i.Cg)([(0,v.K)("parent")],ye.prototype,"writeParent",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy:ce,writer(e,t,r){t[r]=!e}}}})],ye.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,m.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy:ce}}})],ye.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,m.MZ)({readOnly:!0})],ye.prototype,"queryTask",null),(0,i.Cg)([(0,m.MZ)({type:[J.A],readOnly:!0,json:{origins:{service:{read:{source:"layerDefinition.relationships"}}}}})],ye.prototype,"relationships",void 0),(0,i.Cg)([(0,m.MZ)({types:H.Hg,value:null,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ue},origins:{"web-scene":{types:H.XJ,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:ue}}}}})],ye.prototype,"renderer",null),(0,i.Cg)([(0,m.MZ)({types:{key:"type",base:null,typeMap:{"data-layer":Y.L,"map-layer":K.f}},cast(e){if(e){if("mapLayerId"in e)return(0,S.PZ)(K.f,e);if("dataSource"in e)return(0,S.PZ)(Y.L,e)}return e},json:{name:"layerDefinition.source",write:{overridePolicy:le}}})],ye.prototype,"source",null),(0,i.Cg)([(0,m.MZ)()],ye.prototype,"sourceJSON",void 0),(0,i.Cg)([(0,m.MZ)({type:C.A,json:{origins:{service:{read:{source:"layerDefinition.extent.spatialReference"}}}}})],ye.prototype,"spatialReference",void 0),(0,i.Cg)([(0,m.MZ)({value:null,json:{type:[S.jz],write:{target:"subLayerIds",allowNull:!0,overridePolicy:le}}})],ye.prototype,"sublayers",null),(0,i.Cg)([(0,g.w)("sublayers")],ye.prototype,"castSublayers",null),(0,i.Cg)([(0,v.K)("sublayers")],ye.prototype,"writeSublayers",null),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"name",write:{overridePolicy:ce}}})],ye.prototype,"title",void 0),(0,i.Cg)([(0,b.w)("service","title",["name","layerDefinition.name"])],ye.prototype,"readTitle",null),(0,i.Cg)([(0,m.MZ)({type:String})],ye.prototype,"typeIdField",void 0),(0,i.Cg)([(0,m.MZ)({json:{read:!1},readOnly:!0,value:"sublayer"})],ye.prototype,"type",void 0),(0,i.Cg)([(0,b.w)("typeIdField",["layerDefinition.typeIdField"])],ye.prototype,"readTypeIdField",null),(0,i.Cg)([(0,m.MZ)({type:[V.A],json:{origins:{service:{read:{source:"layerDefinition.types"}}}}})],ye.prototype,"types",void 0),(0,i.Cg)([(0,m.MZ)({type:String,json:{name:"layerUrl",write:{overridePolicy:ae}}})],ye.prototype,"url",null),(0,i.Cg)([(0,m.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"},write:{target:"defaultVisibility",overridePolicy:le}}})],ye.prototype,"visible",null),(0,i.Cg)([(0,v.K)("visible")],ye.prototype,"writeVisible",null),ye=Z=(0,i.Cg)([(0,w.$)("esri.layers.support.Sublayer")],ye)},28132:(e,t,r)=>{r.d(t,{A:()=>P});var i=r(31635),s=r(65008),n=r(49186),o=r(44208),a=r(74887),l=r(84952),u=r(10107),c=(r(53966),r(87811),r(40608)),p=r(21325),d=r(20557),y=r(27733),h=r(2272),f=r(20615),m=r(5443),g=r(80893),b=r(61956),w=r(78286),v=r(99199),S=r(97768),_=r(62815),x=r(90708);function I(e,t){return t}function C(e,t,r,i){switch(r){case 0:return O(e,t+i,0);case 1:return"lowerLeft"===e.originPosition?O(e,t+i,1):function({translate:e,scale:t},r,i){return e[i]-r*t[i]}(e,t+i,1)}}function A(e,t,r,i){return 2===r?O(e,t,2):C(e,t,r,i)}function F(e,t,r,i){return 2===r?0===t?0:O(e,t,3):C(e,t,r,i)}function T(e,t,r,i){return 3===r?0===t?0:O(e,t,3):A(e,t,r,i)}function O({translate:e,scale:t},r,i){return e[i]+r*t[i]}class M{constructor(e){this._options=e,this.geometryTypes=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=I,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._mValueOffset=null,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return{fields:[],features:[]}}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,_.N)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return{}}addField(e,t){const r=e.fields;(0,S.Lw)(r),r.push(t);const i=r.map(e=>e.name);this._attributesConstructor=function(){for(const e of i)this[e]=null}}addFeature(e,t){e.features.push(t)}prepareFeatures(e){switch(this._transform=e.transform,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._mValueOffset=null,this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&(this._mValueOffset=this._vertexDimension,this._vertexDimension++),e.geometryType){case"esriGeometryPoint":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"esriGeometryPolygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"esriGeometryPolyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"esriGeometryMultipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,{attributes:new this._attributesConstructor}}allocateCoordinates(){}addLength(e,t,r){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:i}=t,s=this._transform?(0,x.Ch)(r.clone(),r,!1,!1,this._transform):r.clone(),n=(0,x.zv)(s,i,!1,!1);e.queryGeometryType=i,e.queryGeometry={...n}}createPointGeometry(e){const t={x:0,y:0,spatialReference:e.spatialReference};return e.hasZ&&(t.z=0),e.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const i=this._transform;switch(t=this._applyTransform(i,t,r,0),r){case 0:e.x=t;break;case 1:e.y=t;break;case 2:"z"in e?e.z=t:e.m=t;break;case 3:e.m=t}}_transformPathLikeValue(e,t){let r=0;t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e);const i=this._transform;return null!==this._mValueOffset&&0===e&&t>0&&!(t%this._mValueOffset)?0:this._applyTransform(i,e,t,r)}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const i=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(i)}_createPolygonGeometry(e){return{rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0===this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const i=this._transformPathLikeValue(t,r),s=e[e.length-1];0===r&&(this._coordinateBufferPtr=0,this._coordinateBuffer=new Array(this._vertexDimension),s.push(this._coordinateBuffer)),this._coordinateBuffer[this._coordinateBufferPtr++]=i}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?T:t?A:r?F:C}}var D=r(22671);let P=class extends s.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.queryAttachmentsSupported=!1,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,l.An)(this.url)}async execute(e,t){const r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){const r=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],s=(0,o.A)("featurelayer-pbf-statistics"),n=(!i||s)&&!0!==e.returnTrueCurves;let a;if(this.pbfSupported&&n)try{a=await async function(e,t,r,i){const s=(0,h.Dl)(e),n={...r},o=b.A.from(t),a=!o.quantizationParameters,{data:l}=await(0,g.IJ)(s,o,new M({sourceSpatialReference:o.sourceSpatialReference,applyTransform:a}),n,i);return l}(this.url,r,t,{uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return this.pbfSupported&&n||(a=await(0,v.e)(this.url,r,t,{uniqueIdFields:this.uniqueIdFields})),this._normalizeFields(a.fields),a}async featureSetFromJSON(e,t,i){if(!this._queryIs3DObjectFormat(e)||null==this.infoFor3D||!t.features)return D.A.fromJSON(t);const{meshFeatureSetFromJSON:s}=await(0,a.qr)(Promise.all([r.e(8487),r.e(36),r.e(5066)]).then(r.bind(r,40050)),i);return s(e,this.infoFor3D,t)}executeForCount(e,t){return(0,f.I)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return async function(e,t,r){const i=(0,h.Dl)(e),s=await(0,g.Jf)(i,b.A.from(t),{...r}),n=s.data.extent;return!n||isNaN(n.xmin)||isNaN(n.ymin)||isNaN(n.xmax)||isNaN(n.ymax)?{count:s.data.count,extent:null}:{count:s.data.count,extent:m.A.fromJSON(n)}}(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,w.V)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){const[{default:i},{executeRelationshipQuery:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeRelationshipQueryForCount(e,t){const[{default:i},{executeRelationshipQueryForCount:s}]=await(0,a.qr)(Promise.all([Promise.resolve().then(r.bind(r,26591)),r.e(5257).then(r.bind(r,15257))]),t);return e=i.from(e),(this.gdbVersion||this.dynamicDataSource)&&((e=e.clone()).gdbVersion=e.gdbVersion||this.gdbVersion,e.dynamicDataSource=e.dynamicDataSource||this.dynamicDataSource),s(this.url,e,t)}async executeAttachmentQuery(e,t){const{executeAttachmentQuery:i,fetchAttachments:s,processAttachmentQueryResult:n}=await(0,a.qr)(r.e(9239).then(r.bind(r,9239)),t),o=(0,h.Dl)(this.url);return n(o,await(this.queryAttachmentsSupported?i(o,e,t):s(o,e,t)))}async executeAttributeBinsQuery(e,t){const{executeAttributeBinsQuery:i}=await(0,a.qr)(Promise.all([r.e(4575),r.e(3103)]).then(r.bind(r,33103)),t);return i(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){const{executeTopFeaturesQuery:i}=await(0,a.qr)(r.e(1273).then(r.bind(r,11273)),t);return i(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){const{executeForTopIds:i}=await(0,a.qr)(r.e(1277).then(r.bind(r,21277)),t);return i(this.parsedUrl,e,t)}async executeForTopExtents(e,t){const{executeForTopExtents:i}=await(0,a.qr)(r.e(8018).then(r.bind(r,8018)),t);return i(this.parsedUrl,e,t)}async executeForTopCount(e,t){const{executeForTopCount:i}=await(0,a.qr)(r.e(980).then(r.bind(r,10980)),t);return i(this.parsedUrl,e,t)}_normalizeQuery(e){let t=b.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?y.L.from(e.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:r}=this;if(null!=r&&this._queryIs3DObjectFormat(e)){if(t=t===e?t.clone():t,t.formatOf3DObjects=(0,d.Hz)(r),!t.formatOf3DObjects)throw new n.A("query:unsupported-3d-query-formats","Could not find any supported 3D object query format. Only supported formats are 3D_glb and 3D_gltf");if(t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new n.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,null==t.outFields&&(t.outFields=[]);const{originX:i,originY:s,originZ:n,translationX:o,translationY:a,translationZ:l,scaleX:u,scaleY:c,scaleZ:p,rotationX:d,rotationY:y,rotationZ:h,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(i,s,n,o,a,l,u,c,p,d,y,h,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(const t of e){const e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryIs3DObjectFormat(e){return null!=this.infoFor3D&&!0===e.returnGeometry&&"xyFootprint"!==e.multipatchOption&&!e.outStatistics}};(0,i.Cg)([(0,u.MZ)({type:y.L})],P.prototype,"dynamicDataSource",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"gdbVersion",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"infoFor3D",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],P.prototype,"parsedUrl",null),(0,i.Cg)([(0,u.MZ)()],P.prototype,"pbfSupported",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"queryAttachmentsSupported",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"sourceSpatialReference",void 0),(0,i.Cg)([(0,u.MZ)()],P.prototype,"uniqueIdFields",void 0),(0,i.Cg)([(0,u.MZ)({type:String})],P.prototype,"url",void 0),P=(0,i.Cg)([(0,c.$)("esri.layers.graphics.sources.support.QueryTask")],P)},32730:(e,t,r)=>{r.d(t,{BI:()=>m,D3:()=>h,XJ:()=>f,lc:()=>y,mX:()=>b,rU:()=>g,tH:()=>x});var i=r(799);const s="__begin__",n="__end__",o=new RegExp(s,"ig"),a=new RegExp(n,"ig"),l=new RegExp("^"+s,"i"),u=new RegExp(n+"$","i"),c='"',p=c+" + ",d=" + "+c;function y(e){return e.replaceAll(new RegExp("\\[","g"),"{").replaceAll(new RegExp("\\]","g"),"}")}function h(e){return e.replaceAll(new RegExp("\\{","g"),"[").replaceAll(new RegExp("\\}","g"),"]")}function f(e){const t={expression:"",type:"none"};return e.labelExpressionInfo?e.labelExpressionInfo.value?(t.expression=e.labelExpressionInfo.value,t.type="conventional"):e.labelExpressionInfo.expression&&(t.expression=e.labelExpressionInfo.expression,t.type="arcade"):null!=e.labelExpression&&(t.expression=y(e.labelExpression),t.type="conventional"),t}function m(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return b(t.expression);case"arcade":return t.expression}return null}function g(e){const t=f(e);if(!t)return null;switch(t.type){case"conventional":return function(e){const t=e?.match(w);return t?.[1].trim()||null}(t.expression);case"arcade":return x(t.expression)}return null}function b(e){let t;return e?(t=(0,i.HC)(e,e=>s+'$feature["'+e+'"]'+n),t=l.test(t)?t.replace(l,""):c+t,t=u.test(t)?t.replace(u,""):t+c,t=t.replaceAll(o,p).replaceAll(a,d)):t='""',t}const w=/^\s*\{([^}]+)\}\s*$/i,v=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*$/i,S=/^\s*(?:(?:\$feature\.(\w+))|(?:\$feature\[(["'])(.+)(\2)\]));?\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(\1|\3)(\5)\s*\));?\s*$/i,_=/^\s*(?:DomainName\(\s*\$feature\s*,\s*(["'])(.+)(\1)\s*\));?\s*$/i;function x(e){if(!e)return null;let t=v.exec(e)||S.exec(e);return t?t[1]||t[3]:(t=_.exec(e),t?t[2]:null)}},32756:(e,t,r)=>{r.d(t,{Rr:()=>l,fY:()=>c,ne:()=>u});var i=r(31635),s=r(93637),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);function l(e,t,r){if(!e)return null;const i=e.find(e=>!!e.field);if(!i)return null;const s=new a.A;return s.read(i,r),[s]}const u={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:l},write:{writer:function(e,t,r,i){const n=e.find(e=>!!e.field);n&&(0,s.sM)(r,[n.toJSON()],t)}}}},c=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.orderBy=null}};return(0,i.Cg)([(0,n.MZ)(u)],r.prototype,"orderBy",void 0),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.OrderedLayer")],r),r}},33143:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(31635),s=r(69540),n=r(25482),o=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),c=r(80451),p=r(29005);let d=class extends((0,s.OU)(n.o)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"id",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"name",void 0),(0,i.Cg)([(0,o.MZ)({json:{write:!0}})],d.prototype,"domains",void 0),(0,i.Cg)([(0,a.w)("domains")],d.prototype,"readDomains",null),(0,i.Cg)([(0,u.K)("domains")],d.prototype,"writeDomains",null),(0,i.Cg)([(0,o.MZ)({type:[p.A],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,i.Cg)([(0,l.$)("esri.layers.support.FeatureType")],d)},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>n});var i=r(49186),s=r(74887);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.Te)(o),a}},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(31635),s=r(7762),n=r(36708),o=r(10107),a=r(40608),l=r(80559);let u=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,l.fm)(()=>this._refresh(),n.OH))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t)}_createNewInstance(e){return new s.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i.Cg)([(0,o.MZ)()],u.prototype,"getCollections",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"getChildrenFunction",void 0),(0,i.Cg)([(0,o.MZ)()],u.prototype,"itemFilterFunction",void 0),u=(0,i.Cg)([(0,a.$)("esri.core.CollectionFlattener")],u)},41366:(e,t,r)=>{r.d(t,{K:()=>d,Q:()=>u});var i=r(31635),s=r(66552),n=r(53966),o=r(10107),a=(r(44208),r(87811),r(93223)),l=r(40608);const u=(0,s.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",p="field",d=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&&c||null,t&&r&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==p&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i.Cg)([(0,o.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],r.prototype,"normalizationField",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],r.prototype,"normalizationMaxValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],r.prototype,"normalizationMinValue",void 0),(0,i.Cg)([(0,o.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],r.prototype,"normalizationTotal",void 0),(0,i.Cg)([(0,a.e)(u,{name:"parameters.normalizationType"})],r.prototype,"normalizationType",null),r=(0,i.Cg)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],r),r}},46140:(e,t,r)=>{r.d(t,{R:()=>s});var i=r(49186);let s=class e{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[s,n]=t.split("."),o=/^\s*\d+\s*$/;if(!s?.match||!o.test(s))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!o.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const a=parseInt(s,10),l=parseInt(n,10);return new e(a,l,r)}}},55674:(e,t,r)=>{r.d(t,{Ad:()=>y,Gj:()=>m,QY:()=>d,lL:()=>g,xR:()=>h});var i=r(66131),s=r(49186),n=(r(44208),r(44729)),o=r(15032),a=r(65864),l=r(95466),u=r(43668),c=r(98623);const p=["geometry","scale","timeProperties"];function d(e,t){if(null!=t)for(const r of p)t.hasArcadeDependency(r)&&e.add(r);return e}function y(e,t){return f.create(e,t,null,["$feature","$view"])}function h(e,t,r){return f.create(e,t,r,["$feature","$view","$config"])}class f{static async create(e,t,r,i){const{arcade:n,Dictionary:o}=await(0,u.l)();let a;try{a=n.parseScript(e)}catch(t){throw new s.A("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})}const l=n.scriptUsesGeometryEngine(a);l&&await n.enableGeometrySupport(),await n.loadDependentModules(new Set,a,null,!1,l);const c={vars:i.reduce((e,t)=>({...e,[t]:null}),{}),spatialReference:t,useAsync:!1},p=n.compileScript(a,c);let d=null;null!=r&&(d=new o(r),d.immutable=!0);const y=new o;return y.immutable=!1,y.setField("scale",0),new f(e,n,a,p,t,y,d,o)}constructor(e,t,r,i,s,n,o,a){this.script=e,this._arcade=t,this._syntaxTree=r,this._compiled=i,this._spatialReference=s,this._viewDict=n,this._configDict=o,this._dictionaryCtor=a,this._dependencies=new Map,this._featureReader=new m,this._dependencies.set("geometry",t.scriptTouchesGeometry(this._syntaxTree)),this._dependencies.set("scale",this._arcade.referencesMember(this._syntaxTree,"scale")),this._dependencies.set("timeProperties",this._arcade.scriptUsesViewProperties(this._syntaxTree,["timeProperties"]))}evaluate(e,t){const r=t.$view?.timeZone;if(t.$view){let e;if(this._viewDict.setField("scale",t.$view.scale),null!=t.$view.timeProperties){const{currentStart:s,currentEnd:n}=t.$view.timeProperties;e=new this._dictionaryCtor({currentStart:null!=s?null!=r?i.lY.epochToArcadeDate(s,r):i.lY.unknownEpochToArcadeDate(s):void 0,currentEnd:null!=n?null!=r?i.lY.epochToArcadeDate(n,r):i.lY.unknownEpochToArcadeDate(n):void 0,startIncluded:!0,endIncluded:!0})}this._viewDict.setField("timeProperties",e)}return this._compiled({vars:{$view:this._viewDict,$config:this._configDict,$feature:e},spatialReference:this._spatialReference,timeZone:r})}repurposeFeature(e,t){return this._featureReader.bind(e,t,this._spatialReference),this._featureReader}references(e){return this._dependencies.get(e)??!1}}class m{constructor(){this._boundTarget=null,this._boundSchema={fields:null,fieldsIndex:null,spatialReference:null,get geometryType(){return null},get objectIdField(){return null}},this.arcadeDeclaredClass="esri.arcade.Feature",this._contextTimeZone=null}bind(e,t,r){const i=t??new l.A(g(e.attributes));this._boundTarget=e,this._boundSchema.fields=i.fields,this._boundSchema.fieldsIndex=i,this._boundSchema.spatialReference=r}_getField(e){return this._boundSchema.fieldsIndex.get(e)}get contextTimeZone(){return this._contextTimeZone}set contextTimeZone(e){this._contextTimeZone=e}readArcadeFeature(){return this}hasField(e){return this._boundSchema.fieldsIndex.has(e)}geometry(){if("fromJSON"in this._boundTarget)return this._boundTarget.geometry;const e=(0,a.rS)(this._boundTarget.geometry);if(e){if(!this._boundSchema.spatialReference)throw new Error("InternalError: Expected spatial reference to be defined");e.spatialReference=this._boundSchema.spatialReference}return e}isUnknownDateTimeField(e){return this._boundSchema.fieldsIndex.getTimeZone(e)===c.L5}field(e,t=!0){const r=this._getField(e);if(r){const t=this._boundTarget.attributes[r.name];if(null==t)return null;switch(r.type){case"date-only":case"esriFieldTypeDateOnly":return n.n.fromReader(t);case"time-only":case"esriFieldTypeTimeOnly":return o.k.fromReader(t);case"esriFieldTypeTimestampOffset":case"timestamp-offset":return i.lY.fromReaderAsTimeStampOffset(t);case"date":case"esriFieldTypeDate":return this.isUnknownDateTimeField(e)?i.lY.unknownEpochToArcadeDate(t):i.lY.epochToArcadeDate(t,this.contextTimeZone??c.qU);default:return t}}if(t)throw new Error(`Field ${e} does not exist`);return null}setField(e,t){throw new Error("Unable to update feature attribute values, feature is readonly")}keys(){return this._boundSchema.fieldsIndex.fields.map(e=>e.name)}castToText(e=!1){return JSON.stringify(this._boundTarget)}gdbVersion(){return null}fullSchema(){return this._boundSchema}castAsJson(e=null){return{attributes:this._boundTarget.attributes,geometry:!0===e?.keepGeometryType?this.geometry():this.geometry()?.toJSON()??null}}castAsJsonAsync(e=null,t=null){return Promise.resolve(this.castAsJson(t))}}function g(e){const t=[];for(const r in e)t.push({name:r,alias:r,type:"string"==typeof e[r]?"esriFieldTypeString":"esriFieldTypeDouble"});return t}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},63389:(e,t,r)=>{function i(e,t,r){const i=t.flatten(({sublayers:e})=>e).length;return i!==e.length||!!e.some(e=>e.originIdOf("minScale")>r||e.originIdOf("maxScale")>r||e.originIdOf("renderer")>r||e.originIdOf("labelingInfo")>r||e.originIdOf("opacity")>r||e.originIdOf("labelsVisible")>r||e.originIdOf("source")>r)||!n(e,t)}function s(e,t,r){return!!e.some(e=>{const t=e.source,i=!t||"map-layer"===t.type&&t.mapLayerId===e.id&&(null==t.gdbVersion||t.gdbVersion===r);e.commitProperty("renderer"),e.commitProperty("labelingInfo"),e.commitProperty("opacity"),e.commitProperty("labelsVisible"),e.commitProperty("orderBy");const s=e.layer?.capabilities?.exportMap?.supportsSublayerOrderBy??!1;return!i||e.originIdOf("renderer")>2||e.originIdOf("labelingInfo")>2||e.originIdOf("opacity")>2||e.originIdOf("labelsVisible")>2||s&&e.originIdOf("orderBy")>2})||!n(e,t)}function n(e,t){if(!e?.length||null==t)return!0;const r=t.slice().reverse().flatten(({sublayers:e})=>e&&e.toArray().reverse()).map(e=>e.id).toArray();if(e.length>r.length)return!1;let i=0;const s=r.length;for(const{id:t}of e){for(;i<s&&r[i]!==t;)i++;if(i>=s)return!1}return!0}function o(e){return!!e&&e.some(e=>null!=e.minScale||null!=e.layerDefinition?.minScale)}r.d(t,{Sk:()=>s,Zx:()=>i,_X:()=>o})},73681:(e,t,r)=>{r.d(t,{n:()=>l});var i=r(49186),s=r(53966),n=r(46140),o=r(95466),a=r(55674);class l{static async from(e,t,r){const o=e.dictionary_version?n.R.parse(e.dictionary_version):null,c=new Set(e.itemsNames),p={};if(t)for(const e in t)p[e]=t[e];if(e.authoringInfo.configuration)for(const t of e.authoringInfo.configuration)p.hasOwnProperty(t.name)||(p[t.name]=t.value);const d=new Set(e.authoringInfo.symbol);for(const e of Object.keys(r))d.delete(e);d.size&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("missing-fields: fieldMap entries for the following symbol fields are missing",{symbolFields:d});const y=await(0,a.xR)(e.expression,null,p);if(!y)throw new i.A("dictionary-renderer:expression-error","Unable to create dictionary renderer expression");const h=!o||!o.greaterEqual(4,0);h&&s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("Dictionary script does not support native field types. Applying fallback",{version:o});const f=new u(r,h);return new l(h,c,y,f)}constructor(e,t,r,i){this._requiresFieldCoercionToString=e,this._itemNames=t,this._compiled=r,this._reader=i}get itemNames(){return this._itemNames}evaluate(e,t,r,i){try{return this._reader.bind(e,r,i),this._compiled.evaluate(this._reader,{$view:{scale:t}})}catch(e){s.A.getLogger("esri.renderers.support.DictionaryScriptEvaluator").warnOnce("arcade: dictionary script evaluation failed",{error:e})}return null}createDictionaryFieldsIndex(e){if(!this._requiresFieldCoercionToString)return new o.A(e);const t=e.map(e=>({...e,type:"esriFieldTypeString"}));return new o.A(t)}}class u extends a.Gj{constructor(e,t){super(),this._fieldMap=e,this._requiresFieldCoercionToString=t}_getField(e){const t=this._fieldMap[e]??e;return this._boundSchema.fieldsIndex.get(t)}field(e){if(!this._requiresFieldCoercionToString)return super.field(e,!1);const t=this._getField(e);return null==t||null==this._boundTarget.attributes[t.name]?"":""+this._boundTarget.attributes[t.name]}}},81583:(e,t,r)=>{r.d(t,{L:()=>a,g:()=>o});var i=r(60999),s=r(7762),n=r(92474);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const r=[],o=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?o(...t):s.A.isCollection(t)?t.forEach(e=>o(e)):(0,n.Zm)(t)&&r.push(t))};t(o);let a=null;if(await(0,i.Tj)(r,async e=>{const t=await(0,i.Ke)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||a||(a=t)}),a)throw a.error;return e}},91880:(e,t,r)=>{r.d(t,{A:()=>c});var i,s=r(31635),n=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new n.J({asc:"ascending",desc:"descending"});let c=class extends o.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,s.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s.Cg)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],c.prototype,"valueExpression",void 0),(0,s.Cg)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],c.prototype,"order",void 0),c=i=(0,s.Cg)([(0,l.$)("esri.layers.support.OrderByInfo")],c)},91921:(e,t,r)=>{r.d(t,{I:()=>g});var i=r(31635),s=r(7762),n=r(38961),o=r(49186),a=r(53966),l=r(36708),u=r(10107),c=(r(44208),r(87811),r(88620)),p=r(40608),d=r(35666),y=r(15775),h=r(63389);const f=s.A.ofType(y.A);function m(e,t){e&&e.forEach(e=>{t(e),e.sublayers&&e.sublayers.length&&m(e.sublayers,t)})}const g=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this.allSublayers=new n.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.sublayersSourceJSON={2:{},3:{},4:{},5:{},6:{}},this.subtables=null,this.addHandles([(0,l.wB)(()=>this.sublayers,(e,t)=>this._handleSublayersChange(e,t),l.OH),(0,l.wB)(()=>this.subtables,(e,t)=>this._handleSublayersChange(e,t),l.OH)])}destroy(){this.allSublayers.destroy()}readSublayers(e,t){if(!t||!e)return;const{sublayersSourceJSON:r}=this,i=(0,d.aB)(t.origin);if(i<2)return;if(r[i]={context:t,visibleLayers:e.visibleLayers||r[i].visibleLayers,layers:e.layers||r[i].layers},i>2)return;this._set("serviceSublayers",this.createSublayersForOrigin("service").sublayers);const{sublayers:s,origin:n}=this.createSublayersForOrigin("web-document"),o=(0,c.oY)(this);o.setDefaultOrigin(n),this._set("sublayers",new f(s)),o.setDefaultOrigin("user")}findSublayerById(e){return this.allSublayers.find(t=>t.id===e)}createServiceSublayers(){return this.createSublayersForOrigin("service").sublayers}createSublayersForOrigin(e){let t;const r=(0,d.aB)("web-document"===e?"web-map":e);let i=2,s=this.sublayersSourceJSON[2].layers,n=this.sublayersSourceJSON[2].context,o=null;const a=[3,4,5].filter(e=>e<=r);for(const e of a){const t=this.sublayersSourceJSON[e];(0,h._X)(t.layers)&&(i=e,s=t.layers,n=t.context,t.visibleLayers&&(o={visibleLayers:t.visibleLayers,context:t.context}))}const l=[3,4,5].filter(e=>e>i&&e<=r);let u=null;for(const e of l){const{layers:r,visibleLayers:i,context:s}=this.sublayersSourceJSON[e];r&&(u={layers:r,context:s},t??=e),i&&(o={visibleLayers:i,context:s})}const c=function(e,t){const r=[],i={};return e?(e.forEach(e=>{const s=new y.A;if(s.read(e,t),i[s.id]=s,null!=e.parentLayerId&&-1!==e.parentLayerId){const t=i[e.parentLayerId];t.sublayers||(t.sublayers=[]),t.sublayers.unshift(s)}else r.unshift(s)}),r):r}(s,n),p=new Map,g=new Set;if(u)for(const e of u.layers)p.set(e.id,e);if(o?.visibleLayers)for(const e of o.visibleLayers)g.add(e);return m(c,e=>{u&&e.read(p.get(e.id),u.context),o&&e.read({defaultVisibility:g.has(e.id)},o.context)}),{origin:(0,d.OL)(i),originWithPartialOverrides:t?(0,d.OL)(t):null,sublayers:new f({items:c})}}read(e,t){super.read(e,t),this.readSublayers(e,t)}_handleSublayersChange(e,t){t&&(t.forEach(e=>{e.parent=null,e.layer=null}),this.removeHandles("sublayers-owner")),e&&(e.forEach(e=>{e.parent=this,e.layer=this}),this.addHandles([e.on("after-add",({item:e})=>{e.parent=this,e.layer=this}),e.on("after-remove",({item:e})=>{e.parent=null,e.layer=null})],"sublayers-owner"),"tile"===this.type&&this.addHandles(e.on("before-changes",e=>{a.A.getLogger("esri.layers.TileLayer").error(new o.A("tilelayer:sublayers-non-modifiable","Sublayer can't be added, moved, or removed from the layer's sublayers",{layer:this})),e.preventDefault()}),"sublayers-owner"))}};return(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"allSublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0,type:s.A.ofType(y.A)})],r.prototype,"serviceSublayers",void 0),(0,i.Cg)([(0,u.MZ)({value:null,type:f,json:{read:!1,write:{allowNull:!0,ignoreOrigin:!0}}})],r.prototype,"sublayers",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"sublayersSourceJSON",void 0),(0,i.Cg)([(0,u.MZ)({type:f,json:{read:{source:"tables"}}})],r.prototype,"subtables",void 0),r=(0,i.Cg)([(0,p.$)("esri.layers.mixins.SublayersOwner")],r),r}},98534:(e,t,r)=>{r.d(t,{V:()=>g});var i=r(31635),s=r(78888),n=r(91869),o=r(74887),a=r(84952),l=r(46140),u=r(10107),c=(r(44208),r(53966),r(87811),r(36005)),p=r(40608),d=r(5443),y=r(16930),h=r(60694),f=r(10873),m=r(10407);const g=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.capabilities=void 0,this.copyright=null,this.fullExtent=null,this.legendEnabled=!0,this.spatialReference=null,this.version=void 0,this._allLayersAndTablesMap=null}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());if(!r)return{operations:{supportsExportMap:!1,supportsExportTiles:!1,supportsIdentify:!1,supportsQuery:!1,supportsTileMap:!1},exportMap:null,exportTiles:null};const i=this.type,s="tile"!==i&&!!t.supportsDynamicLayers,n=r.includes("query"),o=r.includes("map"),a=!!t.exportTilesAllowed,u=r.includes("tilemap"),c=r.includes("data"),p="tile"!==i&&(!t.tileInfo||s),d="tile"!==i&&(!t.tileInfo||s),y="tile"!==i,h="tile"!==i&&s&&t.currentVersion>=11.1,f=t.cimVersion?l.R.parse(t.cimVersion):null,m=f?.greaterEqual(1,4)??!1,g=f?.greaterEqual(2,0)??!1;return{operations:{supportsExportMap:o,supportsExportTiles:a,supportsIdentify:n,supportsQuery:c,supportsTileMap:u},exportMap:o?{supportsArcadeExpressionForLabeling:m,supportsCIMSymbols:g,supportsDynamicLayers:s,supportsSublayerOrderBy:h,supportsSublayerDefinitionExpression:d,supportsSublayerVisibility:p,supportsSublayersChanges:y}:null,exportTiles:a?{maxExportTilesCount:+t.maxExportTilesCount}:null}}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("capabilities")||t.hasOwnProperty("tables")?10:t.hasOwnProperty("supportedImageFormatTypes")?9.31:9.3),r}async fetchRelatedService(e){const t=this.portalItem;if(!t||!(0,m.bK)(t))return null;this._relatedFeatureServicePromise||(this._relatedFeatureServicePromise=t.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},e).then(e=>e.find(e=>"Feature Service"===e.type)??null,()=>null));const r=await this._relatedFeatureServicePromise;return(0,o.Te)(e),r?{itemId:r.id,url:r.url}:null}async fetchSublayerInfo(e,t){const{source:r}=e;if(this?.portalItem&&"tile"===this.type&&"map-layer"===r?.type&&(0,m.bK)(this.portalItem)&&e.originIdOf("url")<2){const i=await this.fetchRelatedService(t);i&&(e.url=(0,a.fj)(i.url,r.mapLayerId.toString()),e.layerItemId=i.itemId)}const{url:i}=e;let n;if("data-layer"===r.type)n=(await(0,s.A)(i,{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey},...t})).data;else if(i&&e.originIdOf("url")>2)try{const e=await this._fetchAllLayersAndTablesFromService(i),t=(0,h.qg)(i)?.sublayer??r.mapLayerId;n=e.get(t)}catch{}else{let i=e.id;"map-layer"===r?.type&&(i=r.mapLayerId);try{n=(await this.fetchAllLayersAndTables(t)).get(i)}catch{}}return n}async fetchAllLayersAndTables(e){return this._fetchAllLayersAndTablesFromService(this.parsedUrl?.path,e)}async _fetchAllLayersAndTablesFromService(e,t){await this.load(t),this._allLayersAndTablesMap||=new Map;const r=(0,h.qg)(e),i=(0,n.tE)(this._allLayersAndTablesMap,r?.url.path,()=>(0,s.A)((0,a.fj)(r?.url.path,"/layers"),{responseType:"json",query:{f:"json",...this.customParameters,token:this.apiKey}}).then(e=>{const t=new Map,{layers:r,tables:i}=e.data,s=[...r??[],...i??[]];for(const e of s)t.set(e.id,e);return{result:t}},e=>({error:e}))),l=await i;if((0,o.Te)(t),"result"in l)return l.result;throw l.error}};return(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"capabilities",void 0),(0,i.Cg)([(0,c.w)("service","capabilities",["capabilities","cimVersion","currentVersion","exportTilesAllowed","maxExportTilesCount","supportsDynamicLayers","tileInfo"])],r.prototype,"readCapabilities",null),(0,i.Cg)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,u.MZ)({type:d.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,u.MZ)(f.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,u.MZ)({type:Boolean,json:{origins:{service:{read:{enabled:!1}}},read:{source:"showLegend"},write:{target:"showLegend"}}})],r.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,u.MZ)(f.M6)],r.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,u.MZ)({type:y.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,u.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,c.w)("service","version",["currentVersion","capabilities","tables","supportedImageFormatTypes"])],r.prototype,"readVersion",null),r=(0,i.Cg)([(0,p.$)("esri.layers.mixins.ArcGISMapService")],r),r}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2288],{9762:(e,n,t)=>{t.r(n),t.d(n,{projectBuffer:()=>i});var r=t(37539);function i(e,n,t,i,o,l,s=Math.floor(e.length/3)){const a=(0,r.jd)(n,o);if(null==a)return!1;if(a===r.pO){if(e===i&&t===l)return!0;const n=t+3*s;for(let r=t,o=l;r<n;r++,o++)i[o]=e[r];return!0}const u=t+3*s;for(let n=t,r=l;n<u;n+=3,r+=3)a(e,n,i,r);return!0}},23150:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(82799),s=t(54238);let a=class extends s.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.Relationship")],a)},25927:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(86738),s=t(54238);let a=class extends s.A{constructor(e){super(e),this.layoutGeometry=null}};(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.Entity")],a)},37539:(e,n,t)=>{t.d(n,{pO:()=>g,jd:()=>p,Tp:()=>h,w5:()=>f});var r=t(34727),i=t(83047),o=t(73941),l=t(79258);Math.PI;const s=l.$O.radius,a=l.$O.eccentricitySquared,u={a1:s*a,a2:s*a*s*a,a3:s*a*a/2,a4:s*a*s*a*2.5,a5:s*a+s*a*a/2,a6:1-a};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=t(21325);const f={2:{5:g,7:null,9:null,10:g,1:k,6:null,8:null,0:null,3:y,11:w,2:g,4:P},5:{5:g,7:null,9:null,10:g,1:k,6:null,8:null,0:null,3:y,11:w,2:g,4:P},7:{5:null,7:g,9:null,10:g,1:null,6:j,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:g,10:g,1:null,6:null,8:M,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,n,t,r){const i=e[n]/Z,o=O-2*Math.atan(Math.exp(-e[n+1]/Z)),l=Z+e[n+2],s=Math.cos(o)*l;t[r]=Math.cos(i)*s,t[r+1]=Math.sin(i)*s,t[r+2]=Math.sin(o)*l},6:null,8:null,0:null,3:g,11:function(e,n,t,r){m(e,n,t,r),w(t,r,t,r)},2:m,4:function(e,n,t,r){m(e,n,t,r),P(t,r,t,r)}},4:{5:G,7:null,9:null,10:G,1:function(e,n,t,r){G(e,n,t,r),k(t,r,t,r)},6:null,8:null,0:null,3:function(e,n,t,r){G(e,n,t,r),y(t,r,t,r)},11:function(e,n,t,r){G(e,n,t,r),w(t,r,t,r)},2:G,4:g},1:{5:I,7:null,9:null,10:I,1:g,6:null,8:null,0:null,3:function(e,n,t,r){I(e,n,t,r),y(t,r,t,r)},11:function(e,n,t,r){I(e,n,t,r),w(t,r,t,r)},2:I,4:function(e,n,t,r){I(e,n,t,r),P(t,r,t,r)}},6:{5:null,7:A,9:null,10:A,1:null,6:g,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:x,10:x,1:null,6:null,8:g,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:g,3:null,11:null,2:null,4:null},10:{5:g,7:g,9:g,10:g,1:k,6:j,8:M,0:null,3:y,11:w,2:g,4:P},11:{5:v,7:null,9:null,10:v,1:function(e,n,t,r){v(e,n,t,r),k(t,r,t,r)},6:null,8:null,0:null,3:function(e,n,t,r){v(e,n,t,r),y(t,r,t,r)},11:g,2:v,4:function(e,n,t,r){v(e,n,t,r),P(t,r,t,r)}}};function p(e,n){return h(e,n)?.projector}function h(e,n){if(null==e||null==n)return null;if(_.source.spatialReference===e&&_.dest.spatialReference===n)return _;const t=d(e,_.source),r=d(n,_.dest);return 0===t&&0===r?(0,c.aI)(e,n)?_.projector=g:_.projector=null:_.projector=f[t][r],_}function d(e,n){return e?n.spatialReference===e?n.spatialReferenceId:(n.spatialReference=e,"metersPerUnit"in n&&(n.metersPerUnit=(0,i.GA)(e,1)),(0,o.jA)(e)?n.spatialReferenceId=1:(0,c.oT)(e)?n.spatialReferenceId=2:(0,c.K8)(e)?n.spatialReferenceId=3:(0,c.r1)(e)?n.spatialReferenceId=11:e.wkt===o.Ro.wkt?n.spatialReferenceId=4:4490===e.wkid?n.spatialReferenceId=5:e.wkt===o.FY.wkt?n.spatialReferenceId=6:e.wkt===o.LJ.wkt?n.spatialReferenceId=8:(0,c.q8)(e)?n.spatialReferenceId=7:(0,c.KQ)(e)?n.spatialReferenceId=9:n.spatialReferenceId=0):0}function g(e,n,t,r){e!==t&&(t[r++]=e[n++],t[r++]=e[n++],t[r]=e[n])}function m(e,n,t,r){t[r]=$*(e[n]/Z),t[r+1]=$*(O-2*Math.atan(Math.exp(-e[n+1]/Z))),t[r+2]=e[n+2]}function y(e,n,t,i){!function(e,n,t,i,o){const l=.4999999*Math.PI,s=(0,r.qE)(C*e[n+1],-l,l),a=Math.sin(s);t[i++]=C*e[n]*o.radius,t[i++]=o.halfSemiMajorAxis*Math.log((1+a)/(1-a)),t[i]=e[n+2]}(e,n,t,i,l.$O)}function w(e,n,t,r){t[r]=e[n]*b,t[r+1]=e[n+1]*b,t[r+2]=e[n+2]}function v(e,n,t,r){t[r]=e[n]*z,t[r+1]=e[n+1]*z,t[r+2]=e[n+2]}function R(e,n,t,r,i){const o=i+e[n+2],l=C*e[n+1],s=C*e[n],a=Math.cos(l)*o;t[r]=Math.cos(s)*a,t[r+1]=Math.sin(s)*a,t[r+2]=Math.sin(l)*o}function M(e,n,t,r){R(e,n,t,r,l.Sw.radius)}function j(e,n,t,r){R(e,n,t,r,l.sH.radius)}function k(e,n,t,r){R(e,n,t,r,l.$O.radius)}function S(e,n,t,i,o){const l=e[n],s=e[n+1],a=e[n+2],u=Math.sqrt(l*l+s*s+a*a),c=(0,r.YN)(a/(0===u?1:u)),f=Math.atan2(s,l);t[i++]=$*f,t[i++]=$*c,t[i]=u-o}function x(e,n,t,r){S(e,n,t,r,l.Sw.radius)}function A(e,n,t,r){S(e,n,t,r,l.sH.radius)}function I(e,n,t,r){S(e,n,t,r,l.$O.radius)}function P(e,n,t,r){!function(e,n,t,r,i){const o=C*e[n],l=C*e[n+1],s=e[n+2],a=Math.sin(l),u=Math.cos(l),c=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);t[r++]=(c+s)*u*Math.cos(o),t[r++]=(c+s)*u*Math.sin(o),t[r++]=(c*(1-i.eccentricitySquared)+s)*a}(e,n,t,r,l.$O)}function G(e,n,t,r){const i=u,o=e[n],s=e[n+1],a=e[n+2];let c,f,p,h,d,g,m,y,w,v,R,M,j,k,S,x,A,I,P,G,_;c=Math.abs(a),f=o*o+s*s,p=Math.sqrt(f),h=f+a*a,d=Math.sqrt(h),G=Math.atan2(s,o),g=a*a/h,m=f/h,k=i.a2/d,S=i.a3-i.a4/d,m>.3?(y=c/d*(1+m*(i.a1+k+g*S)/d),P=Math.asin(y),v=y*y,w=Math.sqrt(1-v)):(w=p/d*(1-g*(i.a5-k-m*S)/d),P=Math.acos(w),v=1-w*w,y=Math.sqrt(v)),R=1-l.$O.eccentricitySquared*v,M=l.$O.radius/Math.sqrt(R),j=i.a6*M,k=p-M*w,S=c-j*y,A=w*k+y*S,x=w*S-y*k,I=x/(j/R+A),P+=I,_=A+x*I/2,a<0&&(P=-P),t[r++]=$*G,t[r++]=$*P,t[r]=_}const _={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:g},C=(0,r.kU)(1),$=(0,r.KJ)(1),O=.5*Math.PI,Z=l.$O.radius,b=Z*Math.PI/180,z=180/(Z*Math.PI)},40662:(e,n,t)=>{t.d(n,{A:()=>l});var r=t(31635),i=(t(53966),t(44208),t(87811),t(49186),t(40608)),o=t(77901);let l=class extends o.A{constructor(e){super(e)}};l=(0,r.Cg)([(0,i.$)("esri.rest.knowledgeGraph.ObjectValue")],l)},42095:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(31635),i=t(25482),o=t(10107),l=(t(44208),t(53966),t(87811),t(40608)),s=t(77901);let a=class extends i.o{constructor(e){super(e),this.path=[]}};(0,r.Cg)([(0,o.MZ)({type:[s.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,r.Cg)([(0,l.$)("esri.rest.knowledgeGraph.Path")],a)},42538:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(16930),s=t(65008);let a=class extends s.A{constructor(e){super(e),this.openCypherQuery=""}};(0,r.Cg)([(0,i.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.GraphQuery")],a);let u=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,r.Cg)([(0,i.MZ)()],u.prototype,"bindParameters",void 0),(0,r.Cg)([(0,i.MZ)()],u.prototype,"bindGeometryQuantizationParameters",void 0),(0,r.Cg)([(0,i.MZ)()],u.prototype,"outputQuantizationParameters",void 0),(0,r.Cg)([(0,i.MZ)({type:l.A})],u.prototype,"outputSpatialReference",void 0),(0,r.Cg)([(0,i.MZ)()],u.prototype,"provenanceBehavior",void 0),u=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],u)},54238:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(77901);let s=class extends l.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],s.prototype,"typeName",void 0),(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],s.prototype,"id",void 0),s=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.GraphNamedObject")],s)},62815:(e,n,t)=>{t.d(n,{N:()=>l});var r=t(83047),i=t(73941),o=t(21325);function l(e,n,t){if(null==n||null==t||t.vcsWkid||(0,o.aI)(n,t)||(0,i.xP)(n)||(0,i.xP)(t))return null;const l=(0,r.G9)(n)/(0,r.G9)(t);if(1===l)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,n){null!=e?.z&&(e.z*=n)}(e,l);case"polyline":case"esriGeometryPolyline":return e=>function(e,n){if(e)for(const t of e.paths)for(const e of t)e.length>2&&(e[2]*=n)}(e,l);case"polygon":case"esriGeometryPolygon":return e=>function(e,n){if(e)for(const t of e.rings)for(const e of t)e.length>2&&(e[2]*=n)}(e,l);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,n){if(e)for(const t of e.points)t.length>2&&(t[2]*=n)}(e,l);case"extent":case"esriGeometryEnvelope":return e=>function(e,n){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=n,e.zmax*=n)}(e,l);default:return null}}},77901:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(31635),i=t(25482),o=t(10107),l=(t(44208),t(53966),t(87811),t(40608));let s=class extends i.o{constructor(e){super(e),this.properties=null}};(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],s.prototype,"properties",void 0),s=(0,r.Cg)([(0,l.$)("esri.rest.knowledgeGraph.GraphObject")],s)},80672:(e,n,t)=>{t.d(n,{R:()=>i});var r=t(20655);function i(e,n){return null===e?n:new r.A({url:e.field("url")})}},92288:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>q});var r=t(92602),i=t(47609),o=t(66395),l=t(85935),s=t(78878),a=t(80672),u=t(91075),c=t(98988),f=t(16930),p=t(28735),h=t(20655),d=t(80812),g=t(78888),m=t(56507),y=t(65864),w=t(2272),v=t(92300),R=t(31635),M=t(25482),j=t(10107),k=(t(44208),t(53966),t(87811),t(40608)),S=t(21325);let x=class extends M.o{constructor(e){super(e),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const e=this.geometries.map(e=>e.toJSON()),n=this.geometries[0],t={};return t.outSR=(0,S.YX)(this.outSpatialReference),t.inSR=(0,S.YX)(n.spatialReference),t.geometries=JSON.stringify({geometryType:(0,y.$B)(n),geometries:e}),this.transformation&&(t.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(t.transformForward=this.transformForward),t}};(0,R.Cg)([(0,j.MZ)()],x.prototype,"geometries",void 0),(0,R.Cg)([(0,j.MZ)({type:f.A,json:{read:{source:"outSR"}}})],x.prototype,"outSpatialReference",void 0),(0,R.Cg)([(0,j.MZ)()],x.prototype,"transformation",void 0),(0,R.Cg)([(0,j.MZ)()],x.prototype,"transformForward",void 0),x=(0,R.Cg)([(0,k.$)("esri.rest.support.ProjectParameters")],x);const A=(0,m.dp)(x);var I=t(25927),P=t(42538),G=t(40662),_=t(42095),C=t(23150),$=t(54218);let O=null;async function Z(e,n){const r=new d.default({portal:e,id:n});return await r.load(),null===O&&(O=await Promise.all([t.e(8948),t.e(3910),t.e(5323),t.e(217),t.e(2568),t.e(409)]).then(t.bind(t,62568))),await O.fetchKnowledgeGraph(r.url)}function b(e,n,t,r,i){if(null===e)return null;if((0,$.Kg)(e)||(0,$.Et)(e))return e;if((0,s.e)(e))return e.toJSDate();if((0,s.e)(e))return e.toJSDate();if((0,s.f)(e))return e.toStorageFormat();if((0,s.g)(e))return e.toStorageString();if((0,s.n)(e)){const o={};for(const l of e.keys())o[l]=b(e.field(l),n,t,r,i),o[l]instanceof u.A&&i.push({container:o,indexer:l});return o}if((0,$.cy)(e)){const o=e.map(e=>b(e,n,t,r,i));for(let e=0;e<o.length;e++)o[e]instanceof u.A&&i.push({container:o,indexer:e});return o}return(0,s.h)(e)?e.spatialReference.isWGS84?e:e.spatialReference.isWebMercator&&n?(0,p.ci)(e):e:void 0}function z(e,n){if(!e)return null;const t={};for(const r in e)t[r]=T(e[r],n);return t}function T(e,n){return null===e?null:(0,$.cy)(e)?e.map(e=>T(e,n)):e instanceof I.A?{graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:z(e.properties,n)}:e instanceof G.A?{graphType:"object",properties:z(e.properties,n)}:e instanceof C.A?{graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:z(e.properties,n)}:e instanceof _.A?{graphType:"path",path:e.path?e.path.map(e=>T(e,n)):null}:(0,s.h)(e)?function(e,n){if(!e)return e;if(e.spatialReference.isWGS84&&n.spatialReference.isWebMercator)return(0,p.Gh)(e);if(e.spatialReference.equals(n.spatialReference))return e;throw new l.D$(n,"WrongSpatialReference",null)}(e,n):(0,$.Kg)(e)||(0,$.Et)(e)||(0,$.$P)(e)?e:null}function q(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(n,t){return e.standardFunctionAsync(n,t,(e,r,o)=>{if((0,s.B)(o,2,2,n,t),null===o[0])throw new l.D$(n,"PortalRequired",t);if(o[0]instanceof i.A){const e=(0,s.u)(o[1]);let t;return t=n.services?.portal?n.services.portal:h.A.getDefault(),Z((0,a.R)(o[0],t),e)}if(!1===(0,$.Kg)(o[0]))throw new l.D$(n,"InvalidParameter",t);const u=(0,s.u)(o[0]);return Z(n.services?.portal??h.A.getDefault(),u)})},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(n,i){return e.standardFunctionAsync(n,i,async(e,a,u)=>{(0,s.B)(u,2,4,n,i);const p=u[0];if(!(0,s.o)(p))throw new l.D$(n,"InvalidParameter",i);const h=u[1];if(!(0,$.Kg)(h))throw new l.D$(n,"InvalidParameter",i);null===O&&(O=await Promise.all([t.e(8948),t.e(3910),t.e(5323),t.e(217),t.e(2568),t.e(409)]).then(t.bind(t,62568)));let d=null;const m=(0,s.J)(u[2],null);if(!(m instanceof o.A||null===m))throw new l.D$(n,"InvalidParameter",i);if(m){let e=[];d=b(m,!0,!1,n,e),e=e.filter(e=>!e.container[e.indexer].spatialReference.isWGS84),e.length>0&&await async function(e){const n=r.A.geometryServiceUrl??"";if(!n){(0,c.isLoaded)()||await(0,c.load)();for(const n of e)n.container[n.indexer]=(0,c.project)(n.container[n.indexer],f.A.WGS84);return}const t=e.map(e=>e.container[e.indexer]),i=new x({geometries:t,outSpatialReference:f.A.WGS84}),o=await async function(e,n){n=A(n);const t=(0,w.Dl)(e),r={...t.query,f:"json",...n.toJSON()},i=n.outSpatialReference,o=(0,y.$B)(n.geometries[0]),l=(0,w.jV)(r,void 0);return(0,g.A)(t.path+"/project",l).then(({data:{geometries:e}})=>(0,v.V)(e,o,i))}(n,i);for(let n=0;n<o.length;n++){const t=e[n];t.container[t.indexer]=o[n]}}(e)}const R=(0,s.J)(u[3],!1),M=new P.A({openCypherQuery:h,bindParameters:d,provenanceBehavior:R?"include":"exclude"});(p?.serviceDefinition?.currentVersion??11.3)>11.2&&(M.outputSpatialReference=n.spatialReference);const j=(await O.executeQueryStreaming(p,M)).resultRowsStream.getReader(),k=[];try{for(;;){const{done:e,value:t}=await j.read();if(e)break;if((0,$.cy)(t))for(const e of t)k.push(T(e,n));else{const e=[];for(const r of t)e.push(T(t[r],n));k.push(e)}}}catch(e){throw e}return o.A.convertJsonToArcade(k,(0,s.K)(n),!1,!0)})},e.signatures.push({name:"querygraph",min:2,max:4}))}},92300:(e,n,t)=>{t.d(n,{V:()=>o,X:()=>i});var r=t(65864);function i(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,n,t){const i=(0,r.xD)(n);return e.map(e=>{const n=i.fromJSON(e);return n.spatialReference=t,n})}},98988:(e,n,t)=>{t.r(n),t.d(n,{canProjectWithoutEngine:()=>L,getTransformation:()=>W,getTransformations:()=>B,initializeProjection:()=>H,isEqualBaseGCS:()=>Q,isLoaded:()=>C,isLoadedOrLoad:()=>$,isLoadedOrLoadFor:()=>O,load:()=>b,project:()=>z,projectExtent:()=>oe,projectMany:()=>T,projectMultipoint:()=>X,projectOrLoad:()=>q,projectOrLoadMany:()=>N,projectPoint:()=>V,projectPolygon:()=>re,projectPolyline:()=>ne,projectWithZConversion:()=>F,projectWithoutEngine:()=>U,requiresLoad:()=>Z,test:()=>J,tryProjectWithZConversion:()=>D,unload:()=>K});var r=t(49186),i=t(74887),o=t(62788),l=t(95488),s=t(51850),a=t(21276),u=t(73941),c=t(5443),f=t(48526),p=t(83290),h=t(86738),d=t(39829),g=t(82799),m=t(16930),y=t(9762),w=t(37539);function v(e,n,t,r,i,o){return R[0]=e,R[1]=n,R[2]=t,(0,y.projectBuffer)(R,r,0,i,o,0)}const R=(0,s.vt)();let M=0;class j{static fromGE(e){const n=new j;return n._wkt=e.wkt,n._wkid=e.wkid,n._isInverse=e.isInverse,n}constructor(e){this.uid=M++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=M++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=M++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=M++}getInverse(){const e=new j;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class k{static cacheKey(e,n){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??""].join()}static fromGE(e){const n=new k;let t="";for(const r of e.steps){const e=j.fromGE(r);n.steps.push(e),t+=e.uid.toString()+","}return n._cachedProjection={},n._gtlistentry=null,n._chain=t,n}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const n of e.steps)n instanceof j?this.steps.push(n):this.steps.push(new j({wkid:n.wkid,wkt:n.wkt,isInverse:n.isInverse}))}getInverse(){const e=new k;e.steps=[];for(let n=this.steps.length-1;n>=0;n--){const t=this.steps[n];e.steps.push(t.getInverse())}return e}getGTListEntry(){let e="";for(const n of this.steps)e+=n.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,n,t){this._cachedProjection[k.cacheKey(e,n)]=t}getCachedGeTransformation(e,n){let t="";for(const e of this.steps)t+=e.uid.toString()+",";t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t);const r=this._cachedProjection[k.cacheKey(e,n)];return void 0===r?null:r}}var S=t(21325),x=t(62815);let A=null,I=null,P=null,G={};const _=new l.I;function C(){return!!A&&(0,p.i)()}function $(){return!!C()||((0,o.gc)(_),b(),!1)}function O(e,n){return!e||!n||L(e,n)||$()}function Z(e,n){return!L(e,n)&&!C()}function b(e){return null==P&&(P=Promise.all([(0,p.l)(),t.e(9930).then(t.bind(t,49930)).then(e=>e.g),t.e(2731).then(t.bind(t,12731))])),P.then(([,n,{hydratedAdapter:t}])=>{(0,i.Te)(e),I=t,A=n.default,A._enableProjection(p.p),_.notify()})}function z(e,n,t=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),T(I,e,e[0].spatialReference,n,t,r)):((0,a.f)(e),T(I,[e],e.spatialReference,n,t,r)[0])}function T(e,n,t,r,i=null,o=null){if(null==t||null==r)return n;if(L(t,r,i))return n.map(e=>U(e,t,r));if(null==i&&(0,u.jA)(t))return n.map(e=>U(e,t,m.A.WGS84)).map(e=>D(e,r));if(null==i&&(0,u.jA)(r))return n.map(e=>D(e,m.A.WGS84)).map(e=>U(e,m.A.WGS84,r));if(null==i){const e=k.cacheKey(t,r);void 0!==G[e]?i=G[e]:(null==(i=W(t,r,void 0))&&(i=new k),G[e]=i)}if(null==A||null==e)throw new E;return null!=o?A._project(e,n,t,r,i,o):A._project(e,n,t,r,i)}function q(e,n){const t=N([e],n);return null!=t.pending?{pending:t.pending,geometry:null}:null!=t.geometries?{pending:null,geometry:t.geometries[0]}:{pending:null,geometry:null}}function N(e,n){if(!C())for(const t of e)if(null!=t&&!(0,S.aI)(t.spatialReference,n)&&(0,S.fn)(t.spatialReference)&&(0,S.fn)(n)&&!L(t.spatialReference,n))return(0,o.gc)(_),{pending:b(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,S.aI)(e.spatialReference,n)?e:(0,S.fn)(e.spatialReference)&&(0,S.fn)(n)?D(e,n):null)}}function W(e,n,t=null){if(null==e||null==n)return null;if(null==A||null==I)throw new E;const r=A._getTransformation(I,e,n,t,t?.spatialReference);return null!==r?k.fromGE(r):null}function B(e,n,t=null){if(null==A||null==I)throw new E;const r=A._getTransformationBySuitability(I,e,n,t,t?.spatialReference);if(null!==r){const e=[];for(const n of r)e.push(k.fromGE(n));return e}return[]}class E extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function K(){A=null,I=null,P=null,G={}}const J={get loadPromise(){return P}};function D(e,n){try{const t=z(e,n);if(null==t)return null;"xmin"in e&&"xmin"in t&&(t.zmin=e.zmin,t.zmax=e.zmax);const r=(0,x.N)(t.type,e.spatialReference,n);return null!=r&&r(t),t}catch(e){if(!(e instanceof E))throw e;return null}}async function F(e,n,t){const r=e.spatialReference;return null!=r&&null!=n&&await H(r,n,null,t),D(e,n)}function L(e,n,t){return!t&&(!!(0,S.aI)(e,n)||(0,S.fn)(e)&&(0,S.fn)(n)&&!!(0,w.jd)(e,n))}function Q(e,n){if((0,S.aI)(e,n))return!0;if(!(0,S.fn)(e)||!(0,S.fn)(n))return!1;const t=(0,S.oT)(e)||(0,S.K8)(e)||(0,S.x1)(e),r=(0,S.oT)(n)||(0,S.K8)(n)||(0,S.x1)(n);return t&&r}async function H(e,n,t,r){if(C())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:n,dest:t,geographicTransformation:i}of e)if(n&&t&&!L(n,t,i))return b(r)}else if(e&&n&&!L(e,n,t))return b(r);return(0,i.NO)(r)}function U(e,n,t){return e?"x"in e?Y(e,n,new h.A,t,0):"xmin"in e?le(e,n,new c.A,t,0):"rings"in e?ie(e,n,new d.A,t,0):"paths"in e?te(e,n,new g.A,t,0):"points"in e?ee(e,n,new f.A,t,0):null:null}function V(e,n,t=n.spatialReference,r=0){return null!=t&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,n,t,r)}function Y(e,n,t,r,i){ae[0]=e.x,ae[1]=e.y;const o=e.z;return ae[2]=void 0!==o?o:i,(0,y.projectBuffer)(ae,n,0,ae,r,0)?(t.x=ae[0],t.y=ae[1],t.spatialReference=r,void 0!==o||(0,u.xP)(r)?(t.z=ae[2],t.hasZ=!0):(t.z=void 0,t.hasZ=!1),void 0===e.m?(t.m=void 0,t.hasM=!1):(t.m=e.m,t.hasM=!0),t):null}function X(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ee(e,e.spatialReference,n,t,r)}function ee(e,n,t,r,i){const{points:o,hasZ:l,hasM:s}=e,a=[],c=o.length,f=[];for(const e of o)f.push(e[0],e[1],l?e[2]:i);if(!(0,y.projectBuffer)(f,n,0,f,r,0,c))return null;const p=l||(0,u.xP)(r);for(let e=0;e<c;++e){const n=3*e,t=f[n],r=f[n+1];p&&s?a.push([t,r,f[n+2],o[e][3]]):p?a.push([t,r,f[n+2]]):s?a.push([t,r,o[e][2]]):a.push([t,r])}return t.points=a,t.spatialReference=r,t.hasZ=l,t.hasM=s,t}function ne(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=te(e,e.spatialReference,n,t,r)}function te(e,n,t,r,i){const{paths:o,hasZ:l,hasM:s}=e,a=[];if(!se(o,l??!1,s??!1,n,a,r,i))return null;const c=l||(0,u.xP)(r);return t.paths=a,t.spatialReference=r,t.hasZ=c,t.hasM=s,t}function re(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ie(e,e.spatialReference,n,t,r)}function ie(e,n,t,r,i){const{rings:o,hasZ:l,hasM:s}=e,a=[];if(!se(o,l??!1,s??!1,n,a,r,i))return null;const c=l||(0,u.xP)(r);return t.rings=a,t.spatialReference=r,t.hasZ=c,t.hasM=s,t}function oe(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=le(e,e.spatialReference,n,t,r)}function le(e,n,t,r,i){const{xmin:o,ymin:l,xmax:s,ymax:a,hasZ:c,hasM:f}=e;if(!v(o,l,c?e.zmin:i,n,ae,r))return null;const p=c||(0,u.xP)(r);return t.xmin=ae[0],t.ymin=ae[1],p&&(t.zmin=ae[2]),v(s,a,c?e.zmax:i,n,ae,r)?(t.xmax=ae[0],t.ymax=ae[1],p&&(t.zmax=ae[2]),f&&(t.mmin=e.mmin,t.mmax=e.mmax),t.spatialReference=r,t):null}function se(e,n,t,r,i,o,l=0){const s=new Array;for(const t of e)for(const e of t)s.push(e[0],e[1],n?e[2]:l);if(!(0,y.projectBuffer)(s,r,0,s,o,0))return!1;let a=0;i.length=0;const c=n||(0,u.xP)(o);for(const n of e){const e=new Array;for(const r of n)c&&t?e.push([s[a++],s[a++],s[a++],r[3]]):c?e.push([s[a++],s[a++],s[a++]]):t?(e.push([s[a++],s[a++],r[2]]),a++):(e.push([s[a++],s[a++]]),a++);i.push(e)}return!0}const ae=(0,s.vt)()}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2288],{9762:(e,n,t)=>{t.r(n),t.d(n,{projectBuffer:()=>i});var r=t(37539);function i(e,n,t,i,o,l,s=Math.floor(e.length/3)){const a=(0,r.jd)(n,o);if(null==a)return!1;if(a===r.pO){if(e===i&&t===l)return!0;const n=t+3*s;for(let r=t,o=l;r<n;r++,o++)i[o]=e[r];return!0}const u=t+3*s;for(let n=t,r=l;n<u;n+=3,r+=3)a(e,n,i,r);return!0}},23150:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(82799),s=t(54238);let a=class extends s.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],a.prototype,"originId",void 0),(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],a.prototype,"destinationId",void 0),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.Relationship")],a)},25927:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(86738),s=t(54238);let a=class extends s.A{constructor(e){super(e),this.layoutGeometry=null}};(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],a.prototype,"layoutGeometry",void 0),a=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.Entity")],a)},37539:(e,n,t)=>{t.d(n,{pO:()=>g,jd:()=>p,Tp:()=>h,w5:()=>f});var r=t(34727),i=t(83047),o=t(73941),l=t(79258);Math.PI;const s=l.$O.radius,a=l.$O.eccentricitySquared,u={a1:s*a,a2:s*a*s*a,a3:s*a*a/2,a4:s*a*s*a*2.5,a5:s*a+s*a*a/2,a6:1-a};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c=t(21325);const f={2:{5:g,7:null,9:null,10:g,1:k,6:null,8:null,0:null,3:y,11:w,2:g,4:P},5:{5:g,7:null,9:null,10:g,1:k,6:null,8:null,0:null,3:y,11:w,2:g,4:P},7:{5:null,7:g,9:null,10:g,1:null,6:j,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:g,10:g,1:null,6:null,8:M,0:null,3:null,11:null,2:null,4:null},3:{5:m,7:null,9:null,10:m,1:function(e,n,t,r){const i=e[n]/Z,o=O-2*Math.atan(Math.exp(-e[n+1]/Z)),l=Z+e[n+2],s=Math.cos(o)*l;t[r]=Math.cos(i)*s,t[r+1]=Math.sin(i)*s,t[r+2]=Math.sin(o)*l},6:null,8:null,0:null,3:g,11:function(e,n,t,r){m(e,n,t,r),w(t,r,t,r)},2:m,4:function(e,n,t,r){m(e,n,t,r),P(t,r,t,r)}},4:{5:G,7:null,9:null,10:G,1:function(e,n,t,r){G(e,n,t,r),k(t,r,t,r)},6:null,8:null,0:null,3:function(e,n,t,r){G(e,n,t,r),y(t,r,t,r)},11:function(e,n,t,r){G(e,n,t,r),w(t,r,t,r)},2:G,4:g},1:{5:I,7:null,9:null,10:I,1:g,6:null,8:null,0:null,3:function(e,n,t,r){I(e,n,t,r),y(t,r,t,r)},11:function(e,n,t,r){I(e,n,t,r),w(t,r,t,r)},2:I,4:function(e,n,t,r){I(e,n,t,r),P(t,r,t,r)}},6:{5:null,7:A,9:null,10:A,1:null,6:g,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:x,10:x,1:null,6:null,8:g,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:g,3:null,11:null,2:null,4:null},10:{5:g,7:g,9:g,10:g,1:k,6:j,8:M,0:null,3:y,11:w,2:g,4:P},11:{5:v,7:null,9:null,10:v,1:function(e,n,t,r){v(e,n,t,r),k(t,r,t,r)},6:null,8:null,0:null,3:function(e,n,t,r){v(e,n,t,r),y(t,r,t,r)},11:g,2:v,4:function(e,n,t,r){v(e,n,t,r),P(t,r,t,r)}}};function p(e,n){return h(e,n)?.projector}function h(e,n){if(null==e||null==n)return null;if(_.source.spatialReference===e&&_.dest.spatialReference===n)return _;const t=d(e,_.source),r=d(n,_.dest);return 0===t&&0===r?(0,c.aI)(e,n)?_.projector=g:_.projector=null:_.projector=f[t][r],_}function d(e,n){return e?n.spatialReference===e?n.spatialReferenceId:(n.spatialReference=e,"metersPerUnit"in n&&(n.metersPerUnit=(0,i.GA)(e,1)),(0,o.jA)(e)?n.spatialReferenceId=1:(0,c.oT)(e)?n.spatialReferenceId=2:(0,c.K8)(e)?n.spatialReferenceId=3:(0,c.r1)(e)?n.spatialReferenceId=11:e.wkt===o.Ro.wkt?n.spatialReferenceId=4:4490===e.wkid?n.spatialReferenceId=5:e.wkt===o.FY.wkt?n.spatialReferenceId=6:e.wkt===o.LJ.wkt?n.spatialReferenceId=8:(0,c.q8)(e)?n.spatialReferenceId=7:(0,c.KQ)(e)?n.spatialReferenceId=9:n.spatialReferenceId=0):0}function g(e,n,t,r){e!==t&&(t[r++]=e[n++],t[r++]=e[n++],t[r]=e[n])}function m(e,n,t,r){t[r]=$*(e[n]/Z),t[r+1]=$*(O-2*Math.atan(Math.exp(-e[n+1]/Z))),t[r+2]=e[n+2]}function y(e,n,t,i){!function(e,n,t,i,o){const l=.4999999*Math.PI,s=(0,r.qE)(C*e[n+1],-l,l),a=Math.sin(s);t[i++]=C*e[n]*o.radius,t[i++]=o.halfSemiMajorAxis*Math.log((1+a)/(1-a)),t[i]=e[n+2]}(e,n,t,i,l.$O)}function w(e,n,t,r){t[r]=e[n]*b,t[r+1]=e[n+1]*b,t[r+2]=e[n+2]}function v(e,n,t,r){t[r]=e[n]*z,t[r+1]=e[n+1]*z,t[r+2]=e[n+2]}function R(e,n,t,r,i){const o=i+e[n+2],l=C*e[n+1],s=C*e[n],a=Math.cos(l)*o;t[r]=Math.cos(s)*a,t[r+1]=Math.sin(s)*a,t[r+2]=Math.sin(l)*o}function M(e,n,t,r){R(e,n,t,r,l.Sw.radius)}function j(e,n,t,r){R(e,n,t,r,l.sH.radius)}function k(e,n,t,r){R(e,n,t,r,l.$O.radius)}function S(e,n,t,i,o){const l=e[n],s=e[n+1],a=e[n+2],u=Math.sqrt(l*l+s*s+a*a),c=(0,r.YN)(a/(0===u?1:u)),f=Math.atan2(s,l);t[i++]=$*f,t[i++]=$*c,t[i]=u-o}function x(e,n,t,r){S(e,n,t,r,l.Sw.radius)}function A(e,n,t,r){S(e,n,t,r,l.sH.radius)}function I(e,n,t,r){S(e,n,t,r,l.$O.radius)}function P(e,n,t,r){!function(e,n,t,r,i){const o=C*e[n],l=C*e[n+1],s=e[n+2],a=Math.sin(l),u=Math.cos(l),c=i.radius/Math.sqrt(1-i.eccentricitySquared*a*a);t[r++]=(c+s)*u*Math.cos(o),t[r++]=(c+s)*u*Math.sin(o),t[r++]=(c*(1-i.eccentricitySquared)+s)*a}(e,n,t,r,l.$O)}function G(e,n,t,r){const i=u,o=e[n],s=e[n+1],a=e[n+2];let c,f,p,h,d,g,m,y,w,v,R,M,j,k,S,x,A,I,P,G,_;c=Math.abs(a),f=o*o+s*s,p=Math.sqrt(f),h=f+a*a,d=Math.sqrt(h),G=Math.atan2(s,o),g=a*a/h,m=f/h,k=i.a2/d,S=i.a3-i.a4/d,m>.3?(y=c/d*(1+m*(i.a1+k+g*S)/d),P=Math.asin(y),v=y*y,w=Math.sqrt(1-v)):(w=p/d*(1-g*(i.a5-k-m*S)/d),P=Math.acos(w),v=1-w*w,y=Math.sqrt(v)),R=1-l.$O.eccentricitySquared*v,M=l.$O.radius/Math.sqrt(R),j=i.a6*M,k=p-M*w,S=c-j*y,A=w*k+y*S,x=w*S-y*k,I=x/(j/R+A),P+=I,_=A+x*I/2,a<0&&(P=-P),t[r++]=$*G,t[r++]=$*P,t[r]=_}const _={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:g},C=(0,r.kU)(1),$=(0,r.KJ)(1),O=.5*Math.PI,Z=l.$O.radius,b=Z*Math.PI/180,z=180/(Z*Math.PI)},40662:(e,n,t)=>{t.d(n,{A:()=>l});var r=t(31635),i=(t(53966),t(44208),t(87811),t(49186),t(40608)),o=t(77901);let l=class extends o.A{constructor(e){super(e)}};l=(0,r.Cg)([(0,i.$)("esri.rest.knowledgeGraph.ObjectValue")],l)},42095:(e,n,t)=>{t.d(n,{A:()=>a});var r=t(31635),i=t(25482),o=t(10107),l=(t(44208),t(53966),t(87811),t(40608)),s=t(77901);let a=class extends i.o{constructor(e){super(e),this.path=[]}};(0,r.Cg)([(0,o.MZ)({type:[s.A],json:{write:!0}})],a.prototype,"path",void 0),a=(0,r.Cg)([(0,l.$)("esri.rest.knowledgeGraph.Path")],a)},42538:(e,n,t)=>{t.d(n,{A:()=>u});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(16930),s=t(65008);let a=class extends s.A{constructor(e){super(e),this.openCypherQuery=""}};(0,r.Cg)([(0,i.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.GraphQuery")],a);let u=class extends a{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,r.Cg)([(0,i.MZ)()],u.prototype,"bindParameters",void 0),(0,r.Cg)([(0,i.MZ)()],u.prototype,"bindGeometryQuantizationParameters",void 0),(0,r.Cg)([(0,i.MZ)()],u.prototype,"outputQuantizationParameters",void 0),(0,r.Cg)([(0,i.MZ)({type:l.A})],u.prototype,"outputSpatialReference",void 0),(0,r.Cg)([(0,i.MZ)()],u.prototype,"provenanceBehavior",void 0),u=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],u)},54238:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(31635),i=t(10107),o=(t(44208),t(53966),t(87811),t(40608)),l=t(77901);let s=class extends l.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],s.prototype,"typeName",void 0),(0,r.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],s.prototype,"id",void 0),s=(0,r.Cg)([(0,o.$)("esri.rest.knowledgeGraph.GraphNamedObject")],s)},62815:(e,n,t)=>{t.d(n,{N:()=>l});var r=t(83047),i=t(73941),o=t(21325);function l(e,n,t){if(null==n||null==t||t.vcsWkid||(0,o.aI)(n,t)||(0,i.xP)(n)||(0,i.xP)(t))return null;const l=(0,r.G9)(n)/(0,r.G9)(t);if(1===l)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,n){null!=e?.z&&(e.z*=n)}(e,l);case"polyline":case"esriGeometryPolyline":return e=>function(e,n){if(e)for(const t of e.paths)for(const e of t)e.length>2&&(e[2]*=n)}(e,l);case"polygon":case"esriGeometryPolygon":return e=>function(e,n){if(e)for(const t of e.rings)for(const e of t)e.length>2&&(e[2]*=n)}(e,l);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,n){if(e)for(const t of e.points)t.length>2&&(t[2]*=n)}(e,l);case"extent":case"esriGeometryEnvelope":return e=>function(e,n){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=n,e.zmax*=n)}(e,l);default:return null}}},77901:(e,n,t)=>{t.d(n,{A:()=>s});var r=t(31635),i=t(25482),o=t(10107),l=(t(44208),t(53966),t(87811),t(40608));let s=class extends i.o{constructor(e){super(e),this.properties=null}};(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],s.prototype,"properties",void 0),s=(0,r.Cg)([(0,l.$)("esri.rest.knowledgeGraph.GraphObject")],s)},80672:(e,n,t)=>{t.d(n,{R:()=>i});var r=t(20655);function i(e,n){return null===e?n:new r.A({url:e.field("url")})}},92288:(e,n,t)=>{t.r(n),t.d(n,{registerFunctions:()=>q});var r=t(92602),i=t(47609),o=t(66395),l=t(85935),s=t(78878),a=t(80672),u=t(91075),c=t(98988),f=t(16930),p=t(28735),h=t(20655),d=t(80812),g=t(78888),m=t(56507),y=t(65864),w=t(2272),v=t(92300),R=t(31635),M=t(25482),j=t(10107),k=(t(44208),t(53966),t(87811),t(40608)),S=t(21325);let x=class extends M.o{constructor(e){super(e),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const e=this.geometries.map(e=>e.toJSON()),n=this.geometries[0],t={};return t.outSR=(0,S.YX)(this.outSpatialReference),t.inSR=(0,S.YX)(n.spatialReference),t.geometries=JSON.stringify({geometryType:(0,y.$B)(n),geometries:e}),this.transformation&&(t.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(t.transformForward=this.transformForward),t}};(0,R.Cg)([(0,j.MZ)()],x.prototype,"geometries",void 0),(0,R.Cg)([(0,j.MZ)({type:f.A,json:{read:{source:"outSR"}}})],x.prototype,"outSpatialReference",void 0),(0,R.Cg)([(0,j.MZ)()],x.prototype,"transformation",void 0),(0,R.Cg)([(0,j.MZ)()],x.prototype,"transformForward",void 0),x=(0,R.Cg)([(0,k.$)("esri.rest.support.ProjectParameters")],x);const A=(0,m.dp)(x);var I=t(25927),P=t(42538),G=t(40662),_=t(42095),C=t(23150),$=t(54218);let O=null;async function Z(e,n){const r=new d.default({portal:e,id:n});return await r.load(),null===O&&(O=await Promise.all([t.e(9545),t.e(3910),t.e(5323),t.e(217),t.e(2568),t.e(409)]).then(t.bind(t,62568))),await O.fetchKnowledgeGraph(r.url)}function b(e,n,t,r,i){if(null===e)return null;if((0,$.Kg)(e)||(0,$.Et)(e))return e;if((0,s.e)(e))return e.toJSDate();if((0,s.e)(e))return e.toJSDate();if((0,s.f)(e))return e.toStorageFormat();if((0,s.g)(e))return e.toStorageString();if((0,s.n)(e)){const o={};for(const l of e.keys())o[l]=b(e.field(l),n,t,r,i),o[l]instanceof u.A&&i.push({container:o,indexer:l});return o}if((0,$.cy)(e)){const o=e.map(e=>b(e,n,t,r,i));for(let e=0;e<o.length;e++)o[e]instanceof u.A&&i.push({container:o,indexer:e});return o}return(0,s.h)(e)?e.spatialReference.isWGS84?e:e.spatialReference.isWebMercator&&n?(0,p.ci)(e):e:void 0}function z(e,n){if(!e)return null;const t={};for(const r in e)t[r]=T(e[r],n);return t}function T(e,n){return null===e?null:(0,$.cy)(e)?e.map(e=>T(e,n)):e instanceof I.A?{graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:z(e.properties,n)}:e instanceof G.A?{graphType:"object",properties:z(e.properties,n)}:e instanceof C.A?{graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:z(e.properties,n)}:e instanceof _.A?{graphType:"path",path:e.path?e.path.map(e=>T(e,n)):null}:(0,s.h)(e)?function(e,n){if(!e)return e;if(e.spatialReference.isWGS84&&n.spatialReference.isWebMercator)return(0,p.Gh)(e);if(e.spatialReference.equals(n.spatialReference))return e;throw new l.D$(n,"WrongSpatialReference",null)}(e,n):(0,$.Kg)(e)||(0,$.Et)(e)||(0,$.$P)(e)?e:null}function q(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(n,t){return e.standardFunctionAsync(n,t,(e,r,o)=>{if((0,s.B)(o,2,2,n,t),null===o[0])throw new l.D$(n,"PortalRequired",t);if(o[0]instanceof i.A){const e=(0,s.u)(o[1]);let t;return t=n.services?.portal?n.services.portal:h.A.getDefault(),Z((0,a.R)(o[0],t),e)}if(!1===(0,$.Kg)(o[0]))throw new l.D$(n,"InvalidParameter",t);const u=(0,s.u)(o[0]);return Z(n.services?.portal??h.A.getDefault(),u)})},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(n,i){return e.standardFunctionAsync(n,i,async(e,a,u)=>{(0,s.B)(u,2,4,n,i);const p=u[0];if(!(0,s.o)(p))throw new l.D$(n,"InvalidParameter",i);const h=u[1];if(!(0,$.Kg)(h))throw new l.D$(n,"InvalidParameter",i);null===O&&(O=await Promise.all([t.e(9545),t.e(3910),t.e(5323),t.e(217),t.e(2568),t.e(409)]).then(t.bind(t,62568)));let d=null;const m=(0,s.J)(u[2],null);if(!(m instanceof o.A||null===m))throw new l.D$(n,"InvalidParameter",i);if(m){let e=[];d=b(m,!0,!1,n,e),e=e.filter(e=>!e.container[e.indexer].spatialReference.isWGS84),e.length>0&&await async function(e){const n=r.A.geometryServiceUrl??"";if(!n){(0,c.isLoaded)()||await(0,c.load)();for(const n of e)n.container[n.indexer]=(0,c.project)(n.container[n.indexer],f.A.WGS84);return}const t=e.map(e=>e.container[e.indexer]),i=new x({geometries:t,outSpatialReference:f.A.WGS84}),o=await async function(e,n){n=A(n);const t=(0,w.Dl)(e),r={...t.query,f:"json",...n.toJSON()},i=n.outSpatialReference,o=(0,y.$B)(n.geometries[0]),l=(0,w.jV)(r,void 0);return(0,g.A)(t.path+"/project",l).then(({data:{geometries:e}})=>(0,v.V)(e,o,i))}(n,i);for(let n=0;n<o.length;n++){const t=e[n];t.container[t.indexer]=o[n]}}(e)}const R=(0,s.J)(u[3],!1),M=new P.A({openCypherQuery:h,bindParameters:d,provenanceBehavior:R?"include":"exclude"});(p?.serviceDefinition?.currentVersion??11.3)>11.2&&(M.outputSpatialReference=n.spatialReference);const j=(await O.executeQueryStreaming(p,M)).resultRowsStream.getReader(),k=[];try{for(;;){const{done:e,value:t}=await j.read();if(e)break;if((0,$.cy)(t))for(const e of t)k.push(T(e,n));else{const e=[];for(const r of t)e.push(T(t[r],n));k.push(e)}}}catch(e){throw e}return o.A.convertJsonToArcade(k,(0,s.K)(n),!1,!0)})},e.signatures.push({name:"querygraph",min:2,max:4}))}},92300:(e,n,t)=>{t.d(n,{V:()=>o,X:()=>i});var r=t(65864);function i(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,n,t){const i=(0,r.xD)(n);return e.map(e=>{const n=i.fromJSON(e);return n.spatialReference=t,n})}},98988:(e,n,t)=>{t.r(n),t.d(n,{canProjectWithoutEngine:()=>L,getTransformation:()=>W,getTransformations:()=>B,initializeProjection:()=>H,isEqualBaseGCS:()=>Q,isLoaded:()=>C,isLoadedOrLoad:()=>$,isLoadedOrLoadFor:()=>O,load:()=>b,project:()=>z,projectExtent:()=>oe,projectMany:()=>T,projectMultipoint:()=>X,projectOrLoad:()=>q,projectOrLoadMany:()=>N,projectPoint:()=>V,projectPolygon:()=>re,projectPolyline:()=>ne,projectWithZConversion:()=>F,projectWithoutEngine:()=>U,requiresLoad:()=>Z,test:()=>J,tryProjectWithZConversion:()=>D,unload:()=>K});var r=t(49186),i=t(74887),o=t(62788),l=t(95488),s=t(51850),a=t(21276),u=t(73941),c=t(5443),f=t(48526),p=t(83290),h=t(86738),d=t(39829),g=t(82799),m=t(16930),y=t(9762),w=t(37539);function v(e,n,t,r,i,o){return R[0]=e,R[1]=n,R[2]=t,(0,y.projectBuffer)(R,r,0,i,o,0)}const R=(0,s.vt)();let M=0;class j{static fromGE(e){const n=new j;return n._wkt=e.wkt,n._wkid=e.wkid,n._isInverse=e.isInverse,n}constructor(e){this.uid=M++,e?(this._wkt=null!=e.wkt?e.wkt:null,this._wkid=null!=e.wkid?e.wkid:-1,this._isInverse=null!=e.isInverse&&!0===e.isInverse):(this._wkt=null,this._wkid=-1,this._isInverse=!1)}get wkt(){return this._wkt}set wkt(e){this._wkt=e,this.uid=M++}get wkid(){return this._wkid}set wkid(e){this._wkid=e,this.uid=M++}get isInverse(){return this._isInverse}set isInverse(e){this._isInverse=e,this.uid=M++}getInverse(){const e=new j;return e._wkt=this.wkt,e._wkid=this._wkid,e._isInverse=!this.isInverse,e}}class k{static cacheKey(e,n){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",n.wkid?.toString()??"-1",n.wkt?.toString()??"",n.wkt2?.toString()??""].join()}static fromGE(e){const n=new k;let t="";for(const r of e.steps){const e=j.fromGE(r);n.steps.push(e),t+=e.uid.toString()+","}return n._cachedProjection={},n._gtlistentry=null,n._chain=t,n}constructor(e){if(this.steps=[],this._cachedProjection={},this._chain="",this._gtlistentry=null,e?.steps)for(const n of e.steps)n instanceof j?this.steps.push(n):this.steps.push(new j({wkid:n.wkid,wkt:n.wkt,isInverse:n.isInverse}))}getInverse(){const e=new k;e.steps=[];for(let n=this.steps.length-1;n>=0;n--){const t=this.steps[n];e.steps.push(t.getInverse())}return e}getGTListEntry(){let e="";for(const n of this.steps)e+=n.uid.toString()+",";return e!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=e),this._gtlistentry}assignCachedGe(e,n,t){this._cachedProjection[k.cacheKey(e,n)]=t}getCachedGeTransformation(e,n){let t="";for(const e of this.steps)t+=e.uid.toString()+",";t!==this._chain&&(this._gtlistentry=null,this._cachedProjection={},this._chain=t);const r=this._cachedProjection[k.cacheKey(e,n)];return void 0===r?null:r}}var S=t(21325),x=t(62815);let A=null,I=null,P=null,G={};const _=new l.I;function C(){return!!A&&(0,p.i)()}function $(){return!!C()||((0,o.gc)(_),b(),!1)}function O(e,n){return!e||!n||L(e,n)||$()}function Z(e,n){return!L(e,n)&&!C()}function b(e){return null==P&&(P=Promise.all([(0,p.l)(),t.e(9930).then(t.bind(t,49930)).then(e=>e.g),t.e(2731).then(t.bind(t,12731))])),P.then(([,n,{hydratedAdapter:t}])=>{(0,i.Te)(e),I=t,A=n.default,A._enableProjection(p.p),_.notify()})}function z(e,n,t=null,r=null){return Array.isArray(e)?0===e.length?[]:((0,a.H)(e),T(I,e,e[0].spatialReference,n,t,r)):((0,a.f)(e),T(I,[e],e.spatialReference,n,t,r)[0])}function T(e,n,t,r,i=null,o=null){if(null==t||null==r)return n;if(L(t,r,i))return n.map(e=>U(e,t,r));if(null==i&&(0,u.jA)(t))return n.map(e=>U(e,t,m.A.WGS84)).map(e=>D(e,r));if(null==i&&(0,u.jA)(r))return n.map(e=>D(e,m.A.WGS84)).map(e=>U(e,m.A.WGS84,r));if(null==i){const e=k.cacheKey(t,r);void 0!==G[e]?i=G[e]:(null==(i=W(t,r,void 0))&&(i=new k),G[e]=i)}if(null==A||null==e)throw new E;return null!=o?A._project(e,n,t,r,i,o):A._project(e,n,t,r,i)}function q(e,n){const t=N([e],n);return null!=t.pending?{pending:t.pending,geometry:null}:null!=t.geometries?{pending:null,geometry:t.geometries[0]}:{pending:null,geometry:null}}function N(e,n){if(!C())for(const t of e)if(null!=t&&!(0,S.aI)(t.spatialReference,n)&&(0,S.fn)(t.spatialReference)&&(0,S.fn)(n)&&!L(t.spatialReference,n))return(0,o.gc)(_),{pending:b(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,S.aI)(e.spatialReference,n)?e:(0,S.fn)(e.spatialReference)&&(0,S.fn)(n)?D(e,n):null)}}function W(e,n,t=null){if(null==e||null==n)return null;if(null==A||null==I)throw new E;const r=A._getTransformation(I,e,n,t,t?.spatialReference);return null!==r?k.fromGE(r):null}function B(e,n,t=null){if(null==A||null==I)throw new E;const r=A._getTransformationBySuitability(I,e,n,t,t?.spatialReference);if(null!==r){const e=[];for(const n of r)e.push(k.fromGE(n));return e}return[]}class E extends r.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function K(){A=null,I=null,P=null,G={}}const J={get loadPromise(){return P}};function D(e,n){try{const t=z(e,n);if(null==t)return null;"xmin"in e&&"xmin"in t&&(t.zmin=e.zmin,t.zmax=e.zmax);const r=(0,x.N)(t.type,e.spatialReference,n);return null!=r&&r(t),t}catch(e){if(!(e instanceof E))throw e;return null}}async function F(e,n,t){const r=e.spatialReference;return null!=r&&null!=n&&await H(r,n,null,t),D(e,n)}function L(e,n,t){return!t&&(!!(0,S.aI)(e,n)||(0,S.fn)(e)&&(0,S.fn)(n)&&!!(0,w.jd)(e,n))}function Q(e,n){if((0,S.aI)(e,n))return!0;if(!(0,S.fn)(e)||!(0,S.fn)(n))return!1;const t=(0,S.oT)(e)||(0,S.K8)(e)||(0,S.x1)(e),r=(0,S.oT)(n)||(0,S.K8)(n)||(0,S.x1)(n);return t&&r}async function H(e,n,t,r){if(C())return(0,i.NO)(r);if(Array.isArray(e)){for(const{source:n,dest:t,geographicTransformation:i}of e)if(n&&t&&!L(n,t,i))return b(r)}else if(e&&n&&!L(e,n,t))return b(r);return(0,i.NO)(r)}function U(e,n,t){return e?"x"in e?Y(e,n,new h.A,t,0):"xmin"in e?le(e,n,new c.A,t,0):"rings"in e?ie(e,n,new d.A,t,0):"paths"in e?te(e,n,new g.A,t,0):"points"in e?ee(e,n,new f.A,t,0):null:null}function V(e,n,t=n.spatialReference,r=0){return null!=t&&null!=e.spatialReference&&null!=Y(e,e.spatialReference,n,t,r)}function Y(e,n,t,r,i){ae[0]=e.x,ae[1]=e.y;const o=e.z;return ae[2]=void 0!==o?o:i,(0,y.projectBuffer)(ae,n,0,ae,r,0)?(t.x=ae[0],t.y=ae[1],t.spatialReference=r,void 0!==o||(0,u.xP)(r)?(t.z=ae[2],t.hasZ=!0):(t.z=void 0,t.hasZ=!1),void 0===e.m?(t.m=void 0,t.hasM=!1):(t.m=e.m,t.hasM=!0),t):null}function X(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ee(e,e.spatialReference,n,t,r)}function ee(e,n,t,r,i){const{points:o,hasZ:l,hasM:s}=e,a=[],c=o.length,f=[];for(const e of o)f.push(e[0],e[1],l?e[2]:i);if(!(0,y.projectBuffer)(f,n,0,f,r,0,c))return null;const p=l||(0,u.xP)(r);for(let e=0;e<c;++e){const n=3*e,t=f[n],r=f[n+1];p&&s?a.push([t,r,f[n+2],o[e][3]]):p?a.push([t,r,f[n+2]]):s?a.push([t,r,o[e][2]]):a.push([t,r])}return t.points=a,t.spatialReference=r,t.hasZ=l,t.hasM=s,t}function ne(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=te(e,e.spatialReference,n,t,r)}function te(e,n,t,r,i){const{paths:o,hasZ:l,hasM:s}=e,a=[];if(!se(o,l??!1,s??!1,n,a,r,i))return null;const c=l||(0,u.xP)(r);return t.paths=a,t.spatialReference=r,t.hasZ=c,t.hasM=s,t}function re(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=ie(e,e.spatialReference,n,t,r)}function ie(e,n,t,r,i){const{rings:o,hasZ:l,hasM:s}=e,a=[];if(!se(o,l??!1,s??!1,n,a,r,i))return null;const c=l||(0,u.xP)(r);return t.rings=a,t.spatialReference=r,t.hasZ=c,t.hasM=s,t}function oe(e,n,t=n.spatialReference,r=0){return null!=e.spatialReference&&null!=t&&null!=le(e,e.spatialReference,n,t,r)}function le(e,n,t,r,i){const{xmin:o,ymin:l,xmax:s,ymax:a,hasZ:c,hasM:f}=e;if(!v(o,l,c?e.zmin:i,n,ae,r))return null;const p=c||(0,u.xP)(r);return t.xmin=ae[0],t.ymin=ae[1],p&&(t.zmin=ae[2]),v(s,a,c?e.zmax:i,n,ae,r)?(t.xmax=ae[0],t.ymax=ae[1],p&&(t.zmax=ae[2]),f&&(t.mmin=e.mmin,t.mmax=e.mmax),t.spatialReference=r,t):null}function se(e,n,t,r,i,o,l=0){const s=new Array;for(const t of e)for(const e of t)s.push(e[0],e[1],n?e[2]:l);if(!(0,y.projectBuffer)(s,r,0,s,o,0))return!1;let a=0;i.length=0;const c=n||(0,u.xP)(o);for(const n of e){const e=new Array;for(const r of n)c&&t?e.push([s[a++],s[a++],s[a++],r[3]]):c?e.push([s[a++],s[a++],s[a++]]):t?(e.push([s[a++],s[a++],r[2]]),a++):(e.push([s[a++],s[a++]]),a++);i.push(e)}return!0}const ae=(0,s.vt)()}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,7885],{4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(31635),s=r(78888),n=r(49186),o=r(65529),a=r(4902),l=r(92474),d=r(53966),u=r(74887),p=r(84952),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),g=r(16930),f=r(92602),m=r(64272);let v=0,w=class extends((0,o.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||f.A.portalUrl;throw d.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||d.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"groundLayers"in e&&e.groundLayers.includes(t)?e.groundLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,c.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i.Cg)([(0,c.MZ)({type:y.A})],w.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,c.MZ)({type:g.A})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String})],w.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)()],w.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:m.T})],w.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],w)},8303:(e,t,r)=>{r.d(t,{A:()=>C});var i=r(31635),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),d=r(53966),u=r(97768),p=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),g=r(40608),f=r(43937),m=r(77548),v=r(20655),w=r(80812),S=r(41318),b=r(10407);const C=e=>{const t=e;let C=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.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,p.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,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,c.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:d},content:{updateItem:u}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:u}}}_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,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.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=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?S.A.fromJSON(u.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||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.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:w.default})],C.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,i.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],C.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasUpdateItemPrivileges",void 0),C=(0,i.Cg)([(0,g.$)("esri.layers.mixins.PortalLayer")],C),C},I={credential:null,user:null}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},15804:(e,t,r)=>{r.d(t,{addOrUpdateResources:()=>a,bg:()=>c,cL:()=>p,fetchResources:()=>o,removeAllResources:()=>d,removeResource:()=>l});var i=r(78888),s=r(49186),n=r(84952);async function o(e,t={},r){await e.load(r);const i=(0,n.fj)(e.itemUrl,"resources"),{start:s=1,num:o=10,sortOrder:a="asc",sortField:l="resource"}=t,d={query:{start:s,num:o,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(i,d);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map(({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)}))}}async function a(e,t,r,i){const o=new Map;for(const{resource:e,content:i,compress:n,access:a}of t){if(!e.hasPath())throw new s.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=u(e.path),d=`${t}/${n??""}/${a??""}`;o.has(d)||o.set(d,{prefix:t,compress:n,access:a,files:[]}),o.get(d).files.push({fileName:l,content:i})}await e.load(i);const a=(0,n.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:s,files:n}of o.values()){const o=25;for(let l=0;l<n.length;l+=o){const d=n.slice(l,l+o),u=new FormData;t&&"."!==t&&u.append("resourcesPrefix",t),r&&u.append("compress","true"),s&&u.append("access",s);let p=0;for(const{fileName:e,content:t}of d)u.append("file"+ ++p,t,e);u.append("f","json"),await e.portal.request(a,{method:"post",body:u,signal:i?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new s.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function d(e,t){await e.load(t);const r=(0,n.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function c(e,t){if(!e.hasPath())return null;const[r,,i]=function(e){const[t,r]=function(e){const t=(0,n.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=u(t);return[i,s,r]}(e.path);return e.portalItem.resourceFromPath((0,n.fj)(r,t+i))}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.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(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(31635),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.ArcGISService")],r),r}},24212:(e,t,r)=>{function i(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:d}(e).mode}(null==e||(e.hasZ??!1),t)}function s(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function o(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function a(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{$7:()=>n,B:()=>s,XF:()=>a,tW:()=>o,w7:()=>i}),r(83047),r(16271);const l={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},26121:(e,t,r)=>{r.d(t,{ci:()=>o,dL:()=>s});var i=r(49186);async function s(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}r(77548);const n=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function o(e,t,r){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>new i.A("url:unsupported",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter(({name:e})=>!(n.has(e)||t.includes(e)))),i&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}},30291:(e,t,r)=>{r.d(t,{tn:()=>d});var i=r(13874),s=r(30524),n=r(89893),o=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(47582),r(41227)),l=r(68780);function d({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:d},h){if(!r)return null;const g=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const i=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||y,sortDisabled:t?.sortDisabled}).map(t=>new a.A({fieldName:t.name,isEditable:(0,s.R$)(t,e),label:t.alias,format:c(t),visible:u(t,{...e,visibleFieldNames:r})}))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!g.length)return null;const f=function(e){const t=(0,s.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:d,fields:r,displayField:e}),m=[new o.A,new n.A];return new i.A({title:f,content:m,fieldInfos:g})}const u=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,s.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const y=["geometry","blob","raster","guid","xml"]},46130:(e,t,r)=>{r.d(t,{v:()=>s});var i=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=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,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>m});var i,s=r(31635),n=r(4576),o=r(66552),a=r(25482),l=r(83047),d=r(67076),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,n.Xy)(g,"orthometric");const f=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,c.$)("esri.geometry.HeightModelInfo")],m)},58947:(e,t,r)=>{r.d(t,{w:()=>A});var i=r(31635),s=r(78888),n=r(49186),o=r(53966),a=r(74887),l=r(10107),d=(r(44208),r(87811),r(36005)),u=r(40608),p=r(46130),c=r(5443),h=r(54239),y=r(16930),g=r(60694),f=r(10873),m=r(83898),v=r(73179);var w=r(20655),S=r(80812),b=r(88788),C=r(91682),I=r(26121);const A=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return x(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:x(t)}:e;return c.A.fromJSON(i,r)}const i=t.store,s=x(t);return null==s||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<M)?null:new c.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,g.yG)(this.url,t.name):t.name;let i=t.name;if(!i&&this.url){const e=(0,g.qg)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,g.cr)(i)}get parsedUrl(){return(0,v.h)(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,m.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,o.A.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new n.A("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<M||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,s=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=s-o,this.fullExtent.zmax=s+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<M)return;const r=t[2],i=t[3],{fullExtent:s}=this;s&&(s.zmin=r-i,s.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const r={...O,...t};let i=S.default.from(e);if(!i)throw new n.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);const s=i.portal||w.A.getDefault();await this._ensureLoadBeforeSave(),i.type=F,i.portal=s;const o=(0,b.m)(i,"portal-item",!0),a={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,o,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),_(i,r,1),await s.signIn(),await s.user.addItem({item:i,folder:r?.folder,data:a}),await(0,C.r)(this.resourceReferences,o),this.portalItem=i,(0,p.v)(o),o.portalItem=i,i}async _save(e){const t={...O,...e};if(!this.portalItem)throw new n.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==F)throw new n.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${F}"`);await this._ensureLoadBeforeSave();const r=(0,b.m)(this.portalItem,"portal-item",!0),i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.url&&(this.portalItem.url=this.url),this.portalItem.title||(this.portalItem.title=this.title),_(this.portalItem,t,0),await(0,C.S)(this.portalItem,i,this.resourceReferences,r),(0,p.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const i=r?.validationOptions;(0,I.ci)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const s=i?.enabled,a=null;if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;const s=`Layer item did not validate:\n${t.join("\n")}`;if(o.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${s}`),"throw"===i.failPolicy){const e=t.map(e=>new n.A("sceneservice:schema-validation",e));throw new n.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i.Cg)([(0,l.MZ)(f.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({type:y.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readSpatialReference",null),(0,i.Cg)([(0,l.MZ)({type:c.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,d.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readFullExtent",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:h.A})],r.prototype,"heightModelInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,d.w)("version",["store.version"])],r.prototype,"readVersion",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:!1}})],r.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"title",void 0),(0,i.Cg)([(0,d.w)("portal-item","title")],r.prototype,"readTitlePortalItem",null),(0,i.Cg)([(0,d.w)("service","title",["name"])],r.prototype,"readTitleService",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],r.prototype,"layerId",void 0),(0,i.Cg)([(0,l.MZ)((0,v.b)({separator:"layers"}))],r.prototype,"url",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"store",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],r.prototype,"rootNode",void 0),r=(0,i.Cg)([(0,u.$)("esri.layers.mixins.SceneService")],r),r},M=-1e38;function x(e){if(null!=e.spatialReference)return y.A.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=i?new y.A(i):null}function _(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const F="Scene Service",O={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}}},64272:(e,t,r)=>{r.d(t,{T:()=>c});var i,s=r(31635),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),u=r(43937),p=r(98623);let c=class extends n.o{static{i=this}static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let s=this.end;if(s){const r=(0,o.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,r)),null!=a&&(s.end=(0,o.S1)(a,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s.Cg)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,s.Cg)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s.Cg)([(0,l.w)("start")],c.prototype,"readStart",null),(0,s.Cg)([(0,u.K)("start")],c.prototype,"writeStart",null),c=i=(0,s.Cg)([(0,d.$)("esri.time.TimeExtent")],c);const h=new c,y=new c({start:void 0,end:void 0})},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},73179:(e,t,r)=>{r.d(t,{b:()=>l,h:()=>d});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function d(e,t){const{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,n.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString()))),i}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},77885:(e,t,r)=>{r.r(t),r.d(t,{default:()=>oe});var i=r(31635),s=r(13874),n=r(78888),o=r(69540),a=r(49186),l=r(4718),d=r(53966),u=r(92071),p=r(93637),c=r(74887),h=r(84952),y=r(10107),g=(r(44208),r(36005)),f=r(40608),m=r(43937),v=r(99959);const w=Symbol("isPointCloudGraphicOrigin");var S;class b extends v.A{static{S=w}constructor(e){super(),this[S]=!0,this.type="point-cloud",this.layer=e}}var C=r(4146),I=r(52136),A=r(18768),M=r(69208),x=r(16131),_=r(8303),F=r(25036),O=r(58947),T=r(56507),P=r(93223),R=r(25482);r(87811);let Z=class extends R.o{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Z.prototype,"field",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],Z.prototype,"type",void 0),Z=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudFilter")],Z);const E=Z;var U;let L=U=class extends E{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new U({field:this.field,requiredClearBits:(0,l.o8)(this.requiredClearBits),requiredSetBits:(0,l.o8)(this.requiredSetBits)})}};(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],L.prototype,"requiredClearBits",void 0),(0,i.Cg)([(0,y.MZ)({type:[T.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],L.prototype,"requiredSetBits",void 0),(0,i.Cg)([(0,P.e)({pointCloudBitfieldFilter:"bitfield"})],L.prototype,"type",void 0),L=U=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],L);const N=L;var j;let $=j=class extends E{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new j({field:this.field,includedReturns:(0,l.o8)(this.includedReturns)})}};(0,i.Cg)([(0,y.MZ)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],$.prototype,"includedReturns",void 0),(0,i.Cg)([(0,P.e)({pointCloudReturnFilter:"return"})],$.prototype,"type",void 0),$=j=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],$);const q=$;var B;let D=B=class extends E{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new B({field:this.field,mode:this.mode,values:(0,l.o8)(this.values)})}};(0,i.Cg)([(0,y.MZ)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],D.prototype,"mode",void 0),(0,i.Cg)([(0,P.e)({pointCloudValueFilter:"value"})],D.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],D.prototype,"values",void 0),D=B=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudValueFilter")],D);const k={key:"type",base:E,typeMap:{value:D,bitfield:N,return:q}};var K,V=r(10873),H=r(20437),z=r(17036),J=r(93705),G=r(63531),Q=r(51857);let W=K=class extends Q.A{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new K({...this.cloneProperties(),field:(0,l.o8)(this.field)})}};(0,i.Cg)([(0,P.e)({pointCloudRGBRenderer:"point-cloud-rgb"})],W.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{isRequired:!0}}})],W.prototype,"field",void 0),W=K=(0,i.Cg)([(0,f.$)("esri.renderers.PointCloudRGBRenderer")],W);const X=W;var Y=r(69846),ee=r(48425);const te={key:"type",base:Q.A,typeMap:{"point-cloud-class-breaks":G.A,"point-cloud-rgb":X,"point-cloud-stretch":Y.A,"point-cloud-unique-value":ee.A},errorContext:"renderer"};var re=r(24212),ie=r(30291);const se=(0,z.p)();let ne=class extends((0,O.w)((0,A.b)((0,x.q)((0,_.A)((0,F.j)((0,u.P)((0,M.d)((0,I.p)((0,o.OU)(C.A)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new b(this)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map(e=>{const t=new H.A;return"FieldTypeInteger"===e.type&&((e=(0,l.o8)(e)).type="esriFieldTypeInteger"),t.read(e,r),t}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(e=>new H.A({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,t,r,i){(0,p.sM)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP).then(()=>this._fetchService(t));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){const t=(0,ie.tn)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;const i=new J.A({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;const i=new J.A({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new a.A("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a.A("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===r.name){const r=(0,h.fj)(this.parsedUrl?.path??"",`./statistics/${e.key}`);return(0,n.A)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(e=>e.data)}throw new a.A("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new a.A("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new a.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){(0,re.XF)(d.A.getLogger(this),(0,re.B)("Point cloud layers","absolute-height",e)),(0,re.XF)(d.A.getLogger(this),(0,re.tW)("Point cloud layers",e))}};(0,i.Cg)([(0,y.MZ)({type:["PointCloudLayer"]})],ne.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,y.MZ)(V.M6)],ne.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],ne.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],ne.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],ne.prototype,"opacity",void 0),(0,i.Cg)([(0,y.MZ)({type:["show","hide"]})],ne.prototype,"listMode",void 0),(0,i.Cg)([(0,y.MZ)({types:[k],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],ne.prototype,"filters",void 0),(0,i.Cg)([(0,y.MZ)({type:[H.A]})],ne.prototype,"fields",void 0),(0,i.Cg)([(0,y.MZ)(se.fieldsIndex)],ne.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,g.w)("service","fields",["fields","attributeStorageInfo"])],ne.prototype,"readServiceFields",null),(0,i.Cg)([(0,y.MZ)(se.outFields)],ne.prototype,"outFields",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ne.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,y.MZ)(V.Yj)],ne.prototype,"elevationInfo",null),(0,i.Cg)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],ne.prototype,"path",void 0),(0,i.Cg)([(0,y.MZ)(V.fV)],ne.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,y.MZ)({types:te,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:te},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],ne.prototype,"renderer",void 0),(0,i.Cg)([(0,m.K)("renderer")],ne.prototype,"writeRenderer",null),(0,i.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0})],ne.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ne.prototype,"graphicOrigin",void 0),ne=(0,i.Cg)([(0,f.$)("esri.layers.PointCloudLayer")],ne);const oe=ne},83898:(e,t,r)=>{r.d(t,{F:()=>n});var i=r(78888),s=r(49186);async function n(e,t,r,n,o,a,l){let d=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(s,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),d=e}}if(!t)return null;const u=t?.split("/").pop(),p=`${e}/nodes/`,c=p+u;try{return{type:"node",rootNode:(await(0,i.A)(c,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new s.A("sceneservice:root-node-missing","Root node missing.",{pageError:d,nodeError:e,url:c})}}},88788:(e,t,r)=>{r.d(t,{m:()=>o,v:()=>n});var i=r(84952),s=r(20655);function n(e,t){return{...a(e,t),readResourcePaths:[]}}function o(e,t,r){const s=(0,i.An)(e.itemUrl);return{...a(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},91682:(e,t,r)=>{r.d(t,{S:()=>l,r:()=>a});var i=r(49186),s=r(74887),n=r(13069),o=r(15804);async function a(e,t,r){const i=await d(e,t,r);await u(i,t,r)}async function l(e,t,r,i,s){const n=await d(r,i,s);await e.update({data:t}),await u(n,i,s)}async function d(e,t,a){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const d=new Set(t.resources.toKeep.map(e=>e.resource.path)),u=new Set,p=[];d.forEach(t=>{l.delete(t),e.paths.push(t)});const c=[],h=[],y=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),d.has(r.resource.path)||u.has(r.resource.path)){const{resource:t,content:i,finish:s}=r,a=(0,o.bg)(t,(0,n.lk)());e.paths.push(a.path),c.push({resource:a,content:await(0,o.cL)(i),compress:r.compress}),s&&y.push(()=>s(a))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});const t=r.finish;t&&y.push(()=>t(r.resource)),u.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{c.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});const e=r.finish;e&&y.push(()=>e(r.resource))}if(c.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,15804));await e(t.portalItem,c,"add",a),await e(t.portalItem,h,"update",a)}if(y.forEach(e=>e()),0===p.length)return l;const g=await(0,s.Ol)(p);if((0,s.Te)(a),g.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:g});return l}async function u(e,t,r){if(!e||!t.portalItem)return;const i=[];for(const s of e){const e=t.portalItem.resourceFromPath(s);i.push(e.portalItem.removeResource(e,r))}await(0,s.Lx)(i)}},92071:(e,t,r)=>{r.d(t,{P:()=>v,L:()=>w});var i=r(31635),s=r(65008),n=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[0];r&&r.forEach((e,r)=>{t.set(r,(0,o.o8)(e),0)});for(let r=2;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(i),r)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=7){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=7){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var d=r(45917),u=r(88620),p=r(40608);const c=e=>{const t=e;let r=class extends t{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,d.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach(e=>{s[e]=r.get(e,i)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach(e=>{s.invalidate(e),r.revert(e,i),s.commit(e)})}};return r=(0,i.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function h(e){return(0,u.oY)(e).store}c(s.A);var y=r(16649),g=r(49422);const f=e=>{const t=e;let r=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,g.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=m(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),7)}updateOrigin(e,t){const r=m(this),i=(0,a.aB)(t),s=(0,y.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function m(e){return(0,u.oY)(e).store}const v=e=>{const t=f(c(e));let r=class extends t{constructor(...e){super(...e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],r),r},w=v(s.A)},95466:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(49186),s=r(53966),n=r(91869),o=r(3330),a=r(12195),l=r(30524),d=r(98623),u=r(56400),p=r(96285);const c=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],m(e))}static fromLayerJSON(e){return new h(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=g(t);if(t&&i){const s=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(g(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):f.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?o.GB.instance:t===d.n$?p.mQ.utcInstance:(0,n.tE)(c,t,()=>p.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,a.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function g(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):a??d.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,c=new Map([[y(s?.creationDateField??""),l],[y(s?.editDateField??""),l],[y(n),p],[y(o),p]]);for(const{name:i,type:s}of e.fields)if(f.has(s))t.set(i,d.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,d.L5);else{const e=c.get(y(i??""))??a;t.set(i,e)}return t}},99959:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(31635),s=(r(53966),r(44208),r(87811),r(49186),r(40608));let n=class{};n=(0,i.Cg)([(0,s.$)("esri.graphic.GraphicOrigin")],n)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5804,7885],{4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(31635),s=r(78888),n=r(49186),o=r(65529),a=r(4902),l=r(92474),d=r(53966),u=r(74887),p=r(84952),c=r(10107),h=(r(44208),r(87811),r(40608)),y=r(5443),g=r(16930),f=r(92602),m=r(64272);let v=0,w=class extends((0,o.Zt)((0,a.sA)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||f.A.portalUrl;throw d.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,u.zf)(e)||d.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"groundLayers"in e&&e.groundLayers.includes(t)?e.groundLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}get parsedUrl(){return(0,p.An)(this.url)}createLayerView(e,t){return Promise.reject(new n.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i.Cg)([(0,c.MZ)({type:String})],w.prototype,"attributionDataUrl",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"effectiveVisible",null),(0,i.Cg)([(0,c.MZ)({type:y.A})],w.prototype,"fullExtent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"hasAttributionData",null),(0,i.Cg)([(0,c.MZ)({type:String,clonable:!1})],w.prototype,"id",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:["show","hide","hide-children"]})],w.prototype,"listMode",void 0),(0,i.Cg)([(0,c.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],w.prototype,"opacity",void 0),(0,i.Cg)([(0,c.MZ)({clonable:!1})],w.prototype,"parent",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,i.Cg)([(0,c.MZ)({type:Boolean,readOnly:!0})],w.prototype,"persistenceEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean})],w.prototype,"attributionVisible",void 0),(0,i.Cg)([(0,c.MZ)({type:g.A})],w.prototype,"spatialReference",void 0),(0,i.Cg)([(0,c.MZ)({type:String})],w.prototype,"title",void 0),(0,i.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],w.prototype,"type",void 0),(0,i.Cg)([(0,c.MZ)()],w.prototype,"url",void 0),(0,i.Cg)([(0,c.MZ)({type:m.T})],w.prototype,"visibilityTimeExtent",void 0),(0,i.Cg)([(0,c.MZ)({type:Boolean,nonNullable:!0})],w.prototype,"visible",void 0),w=(0,i.Cg)([(0,h.$)("esri.layers.Layer")],w)},8303:(e,t,r)=>{r.d(t,{A:()=>C});var i=r(31635),s=r(92602),n=r(70333),o=r(78888),a=r(60999),l=r(49186),d=r(53966),u=r(97768),p=r(74887),c=r(84952),h=r(10107),y=(r(44208),r(87811),r(36005)),g=r(40608),f=r(43937),m=r(77548),v=r(20655),w=r(80812),S=r(41318),b=r(10407);const C=e=>{const t=e;let C=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new w.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,p.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,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!n.id?.findCredential(this.url),s=e===r.id;if(s&&r.portal.user)return this._getUserPrivileges(r,i);let o,a;if(s)o=r.portal.url;else try{o=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,c.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,u=!1;if(!a)return{features:{edit:l,fullEdit:d},content:{updateItem:u}};try{if(s?await r.reload():(r=new w.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,i)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:u}}}_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,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=I.credential===t?I.user:await this._fetchEditingUser(e);return I.credential=t,I.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=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,c.S8)(s.restUrl)===(0,c.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,u=await(0,a.Ke)((0,o.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return u.ok?S.A.fromJSON(u.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||v.A.getDefault());return r&&i&&!(0,c.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.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:w.default})],C.prototype,"portalItem",null),(0,i.Cg)([(0,y.w)("web-document","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,i.Cg)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,i.Cg)([(0,h.MZ)({clonable:!1})],C.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,h.MZ)({type:Boolean,readOnly:!0})],C.prototype,"userHasUpdateItemPrivileges",void 0),C=(0,i.Cg)([(0,g.$)("esri.layers.mixins.PortalLayer")],C),C},I={credential:null,user:null}},13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>s,vD:()=>o,yS:()=>n});const i="randomUUID"in crypto;function s(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${s().toUpperCase()}}`}function o(){return`{${s()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},15804:(e,t,r)=>{r.d(t,{addOrUpdateResources:()=>a,bg:()=>c,cL:()=>p,fetchResources:()=>o,removeAllResources:()=>d,removeResource:()=>l});var i=r(78888),s=r(49186),n=r(84952);async function o(e,t={},r){await e.load(r);const i=(0,n.fj)(e.itemUrl,"resources"),{start:s=1,num:o=10,sortOrder:a="asc",sortField:l="resource"}=t,d={query:{start:s,num:o,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(i,d);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map(({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)}))}}async function a(e,t,r,i){const o=new Map;for(const{resource:e,content:i,compress:n,access:a}of t){if(!e.hasPath())throw new s.A(`portal-item-resource-${r}:invalid-path`,"Resource does not have a valid path");const[t,l]=u(e.path),d=`${t}/${n??""}/${a??""}`;o.has(d)||o.set(d,{prefix:t,compress:n,access:a,files:[]}),o.get(d).files.push({fileName:l,content:i})}await e.load(i);const a=(0,n.fj)(e.userItemUrl,"add"===r?"addResources":"updateResources");for(const{prefix:t,compress:r,access:s,files:n}of o.values()){const o=25;for(let l=0;l<n.length;l+=o){const d=n.slice(l,l+o),u=new FormData;t&&"."!==t&&u.append("resourcesPrefix",t),r&&u.append("compress","true"),s&&u.append("access",s);let p=0;for(const{fileName:e,content:t}of d)u.append("file"+ ++p,t,e);u.append("f","json"),await e.portal.request(a,{method:"post",body:u,signal:i?.signal})}}}async function l(e,t,r){if(!t.hasPath())throw new s.A("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.fj)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function d(e,t){await e.load(t);const r=(0,n.fj)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}async function p(e){return"blob"===e.type?e.blob:"json"===e.type?new Blob([e.jsonString],{type:"application/json"}):(await(0,i.A)(e.url,{responseType:"blob"})).data}function c(e,t){if(!e.hasPath())return null;const[r,,i]=function(e){const[t,r]=function(e){const t=(0,n.Zo)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,s]=u(t);return[i,s,r]}(e.path);return e.portalItem.resourceFromPath((0,n.fj)(r,t+i))}},17036:(e,t,r)=>{r.d(t,{p:()=>l});var i=r(44208),s=r(53966),n=r(20437),o=r(95466),a=r(30524);function l(){return{fields:{type:[n.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(", ");s.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return o.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const r=this.fieldsIndex?.has(t);r||s.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(31635),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,o.$)("esri.layers.mixins.ArcGISService")],r),r}},24212:(e,t,r)=>{function i(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:d}(e).mode}(null==e||(e.hasZ??!1),t)}function s(e,t,r){return r&&r.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,r){return r?.mode===t?`${e} do not support ${t} elevation mode`:null}function o(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function a(e,t){t&&e.warn(".elevationInfo=",t)}r.d(t,{$7:()=>n,B:()=>s,XF:()=>a,tW:()=>o,w7:()=>i}),r(83047),r(16271);const l={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}},25036:(e,t,r)=>{r.d(t,{j:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,s.MZ)({readOnly:!0})],r.prototype,"effectiveScaleRange",null),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.ScaleRangeLayer")],r),r}},26121:(e,t,r)=>{r.d(t,{ci:()=>o,dL:()=>s});var i=r(49186);async function s(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}r(77548);const n=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function o(e,t,r){let s=(e.messages??[]).filter(({type:e})=>"error"===e).map(({name:e,message:t,details:r})=>new i.A(e,t,r));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map(e=>new i.A("url:unsupported",`Relative url '${e}' is not supported`)))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter(({name:e})=>!(n.has(e)||t.includes(e)))),i&&(s=s.filter(e=>"web-document-write:property-required"!==e.name))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}},30291:(e,t,r)=>{r.d(t,{tn:()=>d});var i=r(13874),s=r(30524),n=r(89893),o=(r(84424),r(80737),r(96808),r(66159)),a=(r(67336),r(92094),r(23721),r(47582),r(41227)),l=r(68780);function d({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:d},h){if(!r)return null;const g=function(e,t){const r=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:r}){const i=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===i&&(e=e.slice()),!0!==r&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||y,sortDisabled:t?.sortDisabled}).map(t=>new a.A({fieldName:t.name,isEditable:(0,s.R$)(t,e),label:t.alias,format:c(t),visible:u(t,{...e,visibleFieldNames:r})}))}({editFieldsInfo:t,fields:r,objectIdField:l},h);if(!g.length)return null;const f=function(e){const t=(0,s.mB)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:d,fields:r,displayField:e}),m=[new o.A,new n.A];return new i.A({title:f,content:m,fieldInfos:g})}const u=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,s.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:h(e)?-1:h(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function c(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.A({digitSeparator:!0,places:0});case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,s.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function h(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const y=["geometry","blob","raster","guid","xml"]},46130:(e,t,r)=>{r.d(t,{v:()=>s});var i=r(76553);function s(e){e?.writtenProperties&&e.writtenProperties.forEach(({target:e,propName:t,newOrigin:r})=>{(0,i.H)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)})}},52136:(e,t,r)=>{r.d(t,{p:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=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,i.Cg)([(0,s.MZ)({type:String})],r.prototype,"apiKey",null),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.APIKeyMixin")],r),r}},54239:(e,t,r)=>{r.d(t,{A:()=>m});var i,s=r(31635),n=r(4576),o=r(66552),a=r(25482),l=r(83047),d=r(67076),u=r(10107),p=(r(44208),r(53966),r(36005)),c=r(40608),h=r(43937);const y=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=y.jsonValues.slice();(0,n.Xy)(g,"orthometric");const f=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r?.messages&&r.messages.push(function(e,t){return new d.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.LA)(e)||f.read(e)||(r?.messages&&r.messages.push(v(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.k1)(t);return new i({heightModel:e.heightModel,heightUnit:r??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function v(e,t){return new d.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s.Cg)([(0,u.MZ)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,s.Cg)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,s.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,s.Cg)([(0,u.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:{writer:f.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,s.Cg)([(0,p.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,s.Cg)([(0,p.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,s.Cg)([(0,u.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,s.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,s.Cg)([(0,c.$)("esri.geometry.HeightModelInfo")],m)},58947:(e,t,r)=>{r.d(t,{w:()=>A});var i=r(31635),s=r(78888),n=r(49186),o=r(53966),a=r(74887),l=r(10107),d=(r(44208),r(87811),r(36005)),u=r(40608),p=r(46130),c=r(5443),h=r(54239),y=r(16930),g=r(60694),f=r(10873),m=r(83898),v=r(73179);var w=r(20655),S=r(80812),b=r(88788),C=r(91682),I=r(26121);const A=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.url=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.sg)(async(e,t,r)=>{switch(e){case 0:return this._save(t);case 1:return this._saveAs(r,t)}})}readSpatialReference(e,t){return x(t)}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:x(t)}:e;return c.A.fromJSON(i,r)}const i=t.store,s=x(t);return null==s||null==i?.extent||!Array.isArray(i.extent)||i.extent.some(e=>e<M)?null:new c.A({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:s})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?(0,g.yG)(this.url,t.name):t.name;let i=t.name;if(!i&&this.url){const e=(0,g.qg)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,g.cr)(i)}get parsedUrl(){return(0,v.h)(this,{separator:"layers"})}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,m.F)(this.parsedUrl?.path??"",this.rootNode,e,this.customParameters,this.apiKey,o.A.getLogger(this),t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r?.obb?.center||null==r.obb.halfSize)throw new n.A("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<M||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,s=r.obb.center[2],o=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=s-o,this.fullExtent.zmax=s+o}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<M)return;const r=t[2],i=t[3],{fullExtent:s}=this;s&&(s.zmin=r-i,s.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.A("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,s.A)(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,s.A)(this.parsedUrl?.path??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e});t.ssl&&this.url&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,s.A)(this.parsedUrl?.path+"/layer",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}async _saveAs(e,t){const r={...O,...t};let i=S.default.from(e);if(!i)throw new n.A("sceneservice:portal-item-required","_saveAs() requires a portal item to save to");i.id&&(i=i.clone(),i.id=null);const s=i.portal||w.A.getDefault();await this._ensureLoadBeforeSave(),i.type=F,i.portal=s;const o=(0,b.m)(i,"portal-item",!0),a={layers:[this.write({},o)]};return await Promise.all(o.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,o,r),this.url&&(i.url=this.url),i.title||(i.title=this.title),_(i,r,1),await s.signIn(),await s.user.addItem({item:i,folder:r?.folder,data:a}),await(0,C.r)(this.resourceReferences,o),this.portalItem=i,(0,p.v)(o),o.portalItem=i,i}async _save(e){const t={...O,...e};if(!this.portalItem)throw new n.A("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==F)throw new n.A("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${F}"`);await this._ensureLoadBeforeSave();const r=(0,b.m)(this.portalItem,"portal-item",!0),i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.url&&(this.portalItem.url=this.url),this.portalItem.title||(this.portalItem.title=this.title),_(this.portalItem,t,0),await(0,C.S)(this.portalItem,i,this.resourceReferences,r),(0,p.v)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){const i=r?.validationOptions;(0,I.ci)(t,{errorName:"sceneservice:save"},{ignoreUnsupported:i?.ignoreUnsupported,supplementalUnsupportedErrors:["scenemodification:unsupported"]});const s=i?.enabled,a=null;if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(!t.length)return;const s=`Layer item did not validate:\n${t.join("\n")}`;if(o.A.getLogger(this).error(`_validateAgainstJSONSchema(): ${s}`),"throw"===i.failPolicy){const e=t.map(e=>new n.A("sceneservice:schema-validation",e));throw new n.A("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{validationErrors:e})}}}};return(0,i.Cg)([(0,l.MZ)(f.id)],r.prototype,"id",void 0),(0,i.Cg)([(0,l.MZ)({type:y.A})],r.prototype,"spatialReference",void 0),(0,i.Cg)([(0,d.w)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readSpatialReference",null),(0,i.Cg)([(0,l.MZ)({type:c.A})],r.prototype,"fullExtent",void 0),(0,i.Cg)([(0,d.w)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],r.prototype,"readFullExtent",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0,type:h.A})],r.prototype,"heightModelInfo",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],r.prototype,"minScale",void 0),(0,i.Cg)([(0,l.MZ)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],r.prototype,"maxScale",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"version",void 0),(0,i.Cg)([(0,d.w)("version",["store.version"])],r.prototype,"readVersion",null),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:{source:"copyrightText"}}})],r.prototype,"copyright",void 0),(0,i.Cg)([(0,l.MZ)({type:String,json:{read:!1}})],r.prototype,"sublayerTitleMode",void 0),(0,i.Cg)([(0,l.MZ)({type:String})],r.prototype,"title",void 0),(0,i.Cg)([(0,d.w)("portal-item","title")],r.prototype,"readTitlePortalItem",null),(0,i.Cg)([(0,d.w)("service","title",["name"])],r.prototype,"readTitleService",null),(0,i.Cg)([(0,l.MZ)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],r.prototype,"layerId",void 0),(0,i.Cg)([(0,l.MZ)((0,v.b)({separator:"layers"}))],r.prototype,"url",void 0),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"parsedUrl",null),(0,i.Cg)([(0,l.MZ)({readOnly:!0})],r.prototype,"store",void 0),(0,i.Cg)([(0,l.MZ)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],r.prototype,"rootNode",void 0),r=(0,i.Cg)([(0,u.$)("esri.layers.mixins.SceneService")],r),r},M=-1e38;function x(e){if(null!=e.spatialReference)return y.A.fromJSON(e.spatialReference);const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.slice(r.lastIndexOf("/")+1),10);return null!=i?new y.A(i):null}function _(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),1===r&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}const F="Scene Service",O={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}}},64272:(e,t,r)=>{r.d(t,{T:()=>c});var i,s=r(31635),n=r(25482),o=r(88930),a=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),u=r(43937),p=r(98623);let c=class extends n.o{static{i=this}static get allTime(){return h}static get empty(){return y}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let s=this.end;if(s){const r=(0,o.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;return s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,r=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:a}=this;return null!=n&&(s.start=(0,o.S1)(n,e,t,r)),null!=a&&(s.end=(0,o.S1)(a,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s.Cg)([(0,l.w)("end")],c.prototype,"readEnd",null),(0,s.Cg)([(0,u.K)("end")],c.prototype,"writeEnd",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s.Cg)([(0,l.w)("start")],c.prototype,"readStart",null),(0,s.Cg)([(0,u.K)("start")],c.prototype,"writeStart",null),c=i=(0,s.Cg)([(0,d.$)("esri.time.TimeExtent")],c);const h=new c,y=new c({start:void 0,end:void 0})},69208:(e,t,r)=>{r.d(t,{d:()=>o});var i=r(31635),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608));const o=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,i.Cg)([(0,s.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],r.prototype,"customParameters",void 0),r=(0,i.Cg)([(0,n.$)("esri.layers.mixins.CustomParametersMixin")],r),r}},73179:(e,t,r)=>{r.d(t,{b:()=>l,h:()=>d});var i=r(4718),s=r(53966),n=r(84952),o=r(60694),a=r(10873);function l(e){const{nonStandardUrlAllowed:t=!1,separator:r}=e??{},n=(0,i.o8)(a.OZ),l=n.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,s){(0,o.LS)(this,e,r,t,s)}),{...n,set:function(e){if(null==e)return void this._set("url",e);const r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:s.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function d(e,t){const{separator:r}=t??{},i=(0,n.An)(e.url);return null!=i&&(null!=e.dynamicDataSource?i.path=(0,n.fj)(i.path,"dynamicLayer"):null!=e.layerId&&(i.path=(0,n.fj)(i.path,r??"",e.layerId.toString()))),i}},76553:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{H:()=>i})},77885:(e,t,r)=>{r.r(t),r.d(t,{default:()=>le});var i=r(31635),s=r(13874),n=r(78888),o=r(69540),a=r(49186),l=r(4718),d=r(53966),u=r(92071),p=r(93637),c=r(74887),h=r(84952),y=r(10107),g=(r(44208),r(36005)),f=r(40608),m=r(43937),v=r(60950),w=r(89808),S=r(99959);const b=Symbol("isPointCloudGraphicOrigin");var C;class I extends S.A{get[(C=b,v.ym)](){return this.layer}get[w.Q](){return this.layer}constructor(e){super(),this[C]=!0,this.type="point-cloud",this.layer=e}get id(){return this.layer.id}}var A=r(4146),M=r(52136),x=r(18768),_=r(69208),F=r(16131),O=r(8303),T=r(25036),P=r(58947),R=r(56507),Z=r(93223),E=r(25482);r(87811);let U=class extends E.o{constructor(e){super(e),this.field=null,this.type=null}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}};(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],U.prototype,"field",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,nonNullable:!0,json:{read:!1,write:{isRequired:!0}}})],U.prototype,"type",void 0),U=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudFilter")],U);const L=U;var N;let j=N=class extends L{constructor(e){super(e),this.requiredClearBits=null,this.requiredSetBits=null,this.type="bitfield"}clone(){return new N({field:this.field,requiredClearBits:(0,l.o8)(this.requiredClearBits),requiredSetBits:(0,l.o8)(this.requiredSetBits)})}};(0,i.Cg)([(0,y.MZ)({type:[R.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredSetBits}}}}})],j.prototype,"requiredClearBits",void 0),(0,i.Cg)([(0,y.MZ)({type:[R.jz],json:{write:{enabled:!0,overridePolicy(){return{enabled:!0,isRequired:!this.requiredClearBits}}}}})],j.prototype,"requiredSetBits",void 0),(0,i.Cg)([(0,Z.e)({pointCloudBitfieldFilter:"bitfield"})],j.prototype,"type",void 0),j=N=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudBitfieldFilter")],j);const $=j;var q;let B=q=class extends L{constructor(e){super(e),this.includedReturns=[],this.type="return"}clone(){return new q({field:this.field,includedReturns:(0,l.o8)(this.includedReturns)})}};(0,i.Cg)([(0,y.MZ)({type:[["firstOfMany","last","lastOfMany","single"]],json:{write:{enabled:!0,isRequired:!0}}})],B.prototype,"includedReturns",void 0),(0,i.Cg)([(0,Z.e)({pointCloudReturnFilter:"return"})],B.prototype,"type",void 0),B=q=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudReturnFilter")],B);const D=B;var k;let K=k=class extends L{constructor(e){super(e),this.mode="exclude",this.type="value",this.values=[]}clone(){return new k({field:this.field,mode:this.mode,values:(0,l.o8)(this.values)})}};(0,i.Cg)([(0,y.MZ)({type:["exclude","include"],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"mode",void 0),(0,i.Cg)([(0,Z.e)({pointCloudValueFilter:"value"})],K.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"values",void 0),K=k=(0,i.Cg)([(0,f.$)("esri.layers.pointCloudFilters.PointCloudValueFilter")],K);const V={key:"type",base:L,typeMap:{value:K,bitfield:$,return:D}};var H,z=r(10873),J=r(20437),G=r(17036),Q=r(93705),W=r(63531),X=r(51857);let Y=H=class extends X.A{constructor(e){super(e),this.type="point-cloud-rgb",this.field=null}clone(){return new H({...this.cloneProperties(),field:(0,l.o8)(this.field)})}};(0,i.Cg)([(0,Z.e)({pointCloudRGBRenderer:"point-cloud-rgb"})],Y.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({type:String,json:{write:{isRequired:!0}}})],Y.prototype,"field",void 0),Y=H=(0,i.Cg)([(0,f.$)("esri.renderers.PointCloudRGBRenderer")],Y);const ee=Y;var te=r(69846),re=r(48425);const ie={key:"type",base:X.A,typeMap:{"point-cloud-class-breaks":W.A,"point-cloud-rgb":ee,"point-cloud-stretch":te.A,"point-cloud-unique-value":re.A},errorContext:"renderer"};var se=r(24212),ne=r(30291);const oe=(0,G.p)();let ae=class extends((0,P.w)((0,x.b)((0,F.q)((0,O.A)((0,T.j)((0,u.P)((0,_.d)((0,M.p)((0,o.OU)(A.A)))))))))){constructor(...e){super(...e),this.operationalLayerType="PointCloudLayer",this.popupEnabled=!0,this.popupTemplate=null,this.opacity=1,this.filters=[],this.fields=null,this.fieldsIndex=null,this.outFields=null,this.path=null,this.legendEnabled=!0,this.renderer=null,this.type="point-cloud",this.graphicOrigin=new I(this)}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}get defaultPopupTemplate(){return this.attributeStorageInfo?this.createPopupTemplate():null}getFieldDomain(e){const t=this.fieldsIndex.get(e);return t?.domain?t.domain:null}readServiceFields(e,t,r){return Array.isArray(e)?e.map(e=>{const t=new J.A;return"FieldTypeInteger"===e.type&&((e=(0,l.o8)(e)).type="esriFieldTypeInteger"),t.read(e,r),t}):Array.isArray(t.attributeStorageInfo)?t.attributeStorageInfo.map(e=>new J.A({name:e.name,type:"ELEVATION"===e.name?"double":"integer"})):null}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}writeRenderer(e,t,r,i){(0,p.sM)("layerDefinition.drawingInfo.renderer",e.write({},i),t)}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(c.QP).then(()=>this._fetchService(t));return this.addResolvingPromise(r),Promise.resolve(this)}createPopupTemplate(e){const t=(0,ne.tn)(this,e);return t&&(this._formatPopupTemplateReturnsField(t),this._formatPopupTemplateRGBField(t)),t}_formatPopupTemplateReturnsField(e){const t=this.fieldsIndex.get("RETURNS");if(!t)return;const r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;const i=new Q.A({name:"pcl-returns-decoded",title:t.alias||t.name,expression:`\n var returnValue = $feature.${t.name};\n return (returnValue % 16) + " / " + Floor(returnValue / 16);\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-returns-decoded"}_formatPopupTemplateRGBField(e){const t=this.fieldsIndex.get("RGB");if(!t)return;const r=e.fieldInfos?.find(e=>e.fieldName===t.name);if(!r)return;const i=new Q.A({name:"pcl-rgb-decoded",title:t.alias||t.name,expression:`\n var rgb = $feature.${t.name};\n var red = Floor(rgb / 65536, 0);\n var green = Floor((rgb - (red * 65536)) / 256,0);\n var blue = rgb - (red * 65536) - (green * 256);\n\n return "rgb(" + red + "," + green + "," + blue + ")";\n `});e.expressionInfos=[...e.expressionInfos||[],i],r.fieldName="expression/pcl-rgb-decoded"}async queryCachedStatistics(e,t){if(await this.load(t),!this.attributeStorageInfo)throw new a.A("scenelayer:no-cached-statistics","Cached statistics are not available for this layer");const r=this.fieldsIndex.get(e);if(!r)throw new a.A("pointcloudlayer:field-unexisting",`Field '${e}' does not exist on the layer`);for(const e of this.attributeStorageInfo)if(e.name===r.name){const r=(0,h.fj)(this.parsedUrl?.path??"",`./statistics/${e.key}`);return(0,n.A)(r,{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:t?t.signal:null}).then(e=>e.data)}throw new a.A("pointcloudlayer:no-cached-statistics","Cached statistics for this attribute are not available")}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"point-cloud"};return this._debouncedSaveOperations(0,e)}validateLayer(e){if(e.layerType&&"PointCloud"!==e.layerType)throw new a.A("pointcloudlayer:layer-type-not-supported","PointCloudLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"});if(this.version.major>2)throw new a.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x-2.x"})}hasCachedStatistics(e){return null!=this.attributeStorageInfo&&this.attributeStorageInfo.some(t=>t.name===e)}_getTypeKeywords(){return["PointCloud"]}_validateElevationInfo(e){(0,se.XF)(d.A.getLogger(this),(0,se.B)("Point cloud layers","absolute-height",e)),(0,se.XF)(d.A.getLogger(this),(0,se.tW)("Point cloud layers",e))}};(0,i.Cg)([(0,y.MZ)({type:["PointCloudLayer"]})],ae.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,y.MZ)(z.M6)],ae.prototype,"popupEnabled",void 0),(0,i.Cg)([(0,y.MZ)({type:s.A,json:{name:"popupInfo",write:!0}})],ae.prototype,"popupTemplate",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],ae.prototype,"defaultPopupTemplate",null),(0,i.Cg)([(0,y.MZ)({readOnly:!0,json:{write:!1,read:!1,origins:{"web-document":{write:!1,read:!1}}}})],ae.prototype,"opacity",void 0),(0,i.Cg)([(0,y.MZ)({type:["show","hide"]})],ae.prototype,"listMode",void 0),(0,i.Cg)([(0,y.MZ)({types:[V],json:{origins:{service:{read:{source:"filters"}}},name:"layerDefinition.filters",write:!0}})],ae.prototype,"filters",void 0),(0,i.Cg)([(0,y.MZ)({type:[J.A]})],ae.prototype,"fields",void 0),(0,i.Cg)([(0,y.MZ)(oe.fieldsIndex)],ae.prototype,"fieldsIndex",void 0),(0,i.Cg)([(0,g.w)("service","fields",["fields","attributeStorageInfo"])],ae.prototype,"readServiceFields",null),(0,i.Cg)([(0,y.MZ)(oe.outFields)],ae.prototype,"outFields",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"attributeStorageInfo",void 0),(0,i.Cg)([(0,y.MZ)(z.Yj)],ae.prototype,"elevationInfo",null),(0,i.Cg)([(0,y.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],ae.prototype,"path",void 0),(0,i.Cg)([(0,y.MZ)(z.fV)],ae.prototype,"legendEnabled",void 0),(0,i.Cg)([(0,y.MZ)({types:ie,json:{origins:{service:{read:{source:"drawingInfo.renderer"}}},name:"layerDefinition.drawingInfo.renderer",write:{target:{"layerDefinition.drawingInfo.renderer":{types:ie},"layerDefinition.drawingInfo.transparency":{type:Number}}}}})],ae.prototype,"renderer",void 0),(0,i.Cg)([(0,m.K)("renderer")],ae.prototype,"writeRenderer",null),(0,i.Cg)([(0,y.MZ)({json:{read:!1},readOnly:!0})],ae.prototype,"type",void 0),(0,i.Cg)([(0,y.MZ)({readOnly:!0})],ae.prototype,"graphicOrigin",void 0),ae=(0,i.Cg)([(0,f.$)("esri.layers.PointCloudLayer")],ae);const le=ae},83898:(e,t,r)=>{r.d(t,{F:()=>n});var i=r(78888),s=r(49186);async function n(e,t,r,n,o,a,l){let d=null;if(null!=r){const t=`${e}/nodepages/`,s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.A)(s,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=a&&a.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,e),d=e}}if(!t)return null;const u=t?.split("/").pop(),p=`${e}/nodes/`,c=p+u;try{return{type:"node",rootNode:(await(0,i.A)(c,{query:{f:"json",...n,token:o},responseType:"json",signal:l})).data,urlPrefix:p}}catch(e){throw new s.A("sceneservice:root-node-missing","Root node missing.",{pageError:d,nodeError:e,url:c})}}},88788:(e,t,r)=>{r.d(t,{m:()=>o,v:()=>n});var i=r(84952),s=r(20655);function n(e,t){return{...a(e,t),readResourcePaths:[]}}function o(e,t,r){const s=(0,i.An)(e.itemUrl);return{...a(e,t),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:s?{rootPath:s.path,writtenUrls:[]}:null,resources:r?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}:null}}function a(e,t){return{origin:t,url:(0,i.An)(e.itemUrl),portal:e.portal||s.A.getDefault(),portalItem:e}}},89808:(e,t,r)=>{r.d(t,{Q:()=>i});const i=Symbol("getSliceableSymbol")},91682:(e,t,r)=>{r.d(t,{S:()=>l,r:()=>a});var i=r(49186),s=r(74887),n=r(13069),o=r(15804);async function a(e,t,r){const i=await d(e,t,r);await u(i,t,r)}async function l(e,t,r,i,s){const n=await d(r,i,s);await e.update({data:t}),await u(n,i,s)}async function d(e,t,a){if(!t?.resources)return;const l=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const d=new Set(t.resources.toKeep.map(e=>e.resource.path)),u=new Set,p=[];d.forEach(t=>{l.delete(t),e.paths.push(t)});const c=[],h=[],y=[];for(const r of t.resources.toUpdate)if(l.delete(r.resource.path),d.has(r.resource.path)||u.has(r.resource.path)){const{resource:t,content:i,finish:s}=r,a=(0,o.bg)(t,(0,n.lk)());e.paths.push(a.path),c.push({resource:a,content:await(0,o.cL)(i),compress:r.compress}),s&&y.push(()=>s(a))}else{e.paths.push(r.resource.path),h.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});const t=r.finish;t&&y.push(()=>t(r.resource)),u.add(r.resource.path)}for(const r of t.resources.toAdd)if(e.paths.push(r.resource.path),l.has(r.resource.path))l.delete(r.resource.path);else{c.push({resource:r.resource,content:await(0,o.cL)(r.content),compress:r.compress});const e=r.finish;e&&y.push(()=>e(r.resource))}if(c.length||h.length){const{addOrUpdateResources:e}=await Promise.resolve().then(r.bind(r,15804));await e(t.portalItem,c,"add",a),await e(t.portalItem,h,"update",a)}if(y.forEach(e=>e()),0===p.length)return l;const g=await(0,s.Ol)(p);if((0,s.Te)(a),g.length>0)throw new i.A("save:resources","Failed to save one or more resources",{errors:g});return l}async function u(e,t,r){if(!e||!t.portalItem)return;const i=[];for(const s of e){const e=t.portalItem.resourceFromPath(s);i.push(e.portalItem.removeResource(e,r))}await(0,s.Lx)(i)}},92071:(e,t,r)=>{r.d(t,{P:()=>v,L:()=>w});var i=r(31635),s=r(65008),n=r(76953),o=r(4718),a=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[0];r&&r.forEach((e,r)=>{t.set(r,(0,o.o8)(e),0)});for(let r=2;r<a.AU;r++){const i=this._originStores[r];i&&i.forEach((i,s)=>{e&&e.has(s)||t.set(s,(0,o.o8)(i),r)})}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=7){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=7){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||0}isAtOrigin(e,t){return this.has(e,t)&&this.originOf(e)===t}isBelowOrigin(e,t){return!this.has(e)||this.originOf(e)<t}forEach(e){this._values.forEach(e)}}var d=r(45917),u=r(88620),p=r(40608);const c=e=>{const t=e;let r=class extends t{constructor(...e){super(...e);const t=(0,u.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,d.L)(this,e,t)}getAtOrigin(e,t){const r=h(this),i=(0,a.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach(e=>{s[e]=r.get(e,i)}),s}originOf(e){return(0,a.OL)(this.originIdOf(e))}originIdOf(e){return h(this).originOf(e)}revert(e,t){const r=h(this),i=(0,a.aB)(t),s=(0,u.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach(e=>{s.invalidate(e),r.revert(e,i),s.commit(e)})}};return r=(0,i.Cg)([(0,p.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],r),r};function h(e){return(0,u.oY)(e).store}c(s.A);var y=r(16649),g=r(49422);const f=e=>{const t=e;let r=class extends t{constructor(...e){super(...e)}clear(e,t="user"){(0,u.oY)(this).clearOrigin(e,(0,a.aB)(t))}write(e,t){return(0,g.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,u.oY)(this).setAtOrigin(e,t,(0,a.aB)(r))}removeOrigin(e){const t=m(this),r=(0,a.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),7)}updateOrigin(e,t){const r=m(this),i=(0,a.aB)(t),s=(0,y.Jt)(this,e);for(let t=i+1;t<a.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],r),r.prototype.toJSON.isDefaultToJSON=!0,r};function m(e){return(0,u.oY)(e).store}const v=e=>{const t=f(c(e));let r=class extends t{constructor(...e){super(...e)}};return r=(0,i.Cg)([(0,p.$)("esri.core.MultiOriginJSONSupport")],r),r},w=v(s.A)},95466:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(49186),s=r(53966),n=r(91869),o=r(3330),a=r(12195),l=r(30524),d=r(98623),u=r(56400),p=r(96285);const c=new Map;class h{static fromJSON(e){return new h(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new h(e.fields??[],m(e))}static fromLayerJSON(e){return new h(e.fields??[],m(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=g(t);if(t&&i){const s=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(s,e),this._normalizedFieldsMap.set(i,e),r.push(`${s}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(g(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(s.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),d.n$):f.has(t.type)?d.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===d.L5?o.GB.instance:t===d.n$?p.mQ.utcInstance:(0,n.tE)(c,t,()=>p.oh.create(t)):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,a.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function g(e){return(0,l.rS)(e)?.toLowerCase()??""}const f=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function m(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:s}=e,n=(i?"startField"in i?i.startField:i.startTimeField:"")??"",o=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=s?function(e){return"timeZone"in e}(s)?s.timeZone??a:s.dateFieldsTimeReference?(0,u.ZS)(s.dateFieldsTimeReference):a??d.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,c=new Map([[y(s?.creationDateField??""),l],[y(s?.editDateField??""),l],[y(n),p],[y(o),p]]);for(const{name:i,type:s}of e.fields)if(f.has(s))t.set(i,d.L5);else if("date"!==s&&"esriFieldTypeDate"!==s)t.set(i,null);else if(r)t.set(i,d.L5);else{const e=c.get(y(i??""))??a;t.set(i,e)}return t}},99959:(e,t,r)=>{r.d(t,{A:()=>n});var i=r(31635),s=(r(53966),r(44208),r(87811),r(49186),r(40608));let n=class{};n=(0,i.Cg)([(0,s.$)("esri.graphic.GraphicOrigin")],n)}}]);
|