@arcgis/core 4.33.0-next.20250429 → 4.33.0-next.20250430
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/analysis/AreaMeasurementAnalysis.js +1 -1
- package/applications/Components/baUtils.js +5 -0
- package/assets/components/assets/icon/mosaicMethodBlend16.json +1 -1
- package/assets/components/assets/icon/mosaicMethodBlend24.json +1 -1
- package/assets/components/assets/icon/mosaicMethodBlend32.json +1 -1
- package/assets/components/assets/icon/mosaicMethodNorthWest32.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9a1c058d3ecd1db0e996.js → 0c338364cb55afdbd580.js} +1 -1
- package/assets/esri/core/workers/chunks/{4351b3e54b309935faed.js → 173737c60fa54f7d82bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{90dc783a617ff053e862.js → 181ad3cee0b30a72e7c7.js} +1 -1
- package/assets/esri/core/workers/chunks/210e057fe5e66abea984.js +1 -0
- package/assets/esri/core/workers/chunks/{9850ff14bd9c7da81c65.js → 23c76963481e38f39653.js} +1 -1
- package/assets/esri/core/workers/chunks/{b1473d15c75fc560ea4a.js → 2ad47c0ba1680f7d5e03.js} +1 -1
- package/assets/esri/core/workers/chunks/2c3920ad82b9d86c3f05.js +1 -0
- package/assets/esri/core/workers/chunks/{4da99f058cca83937e9b.js → 2c92f6f268aa2de5432c.js} +1 -1
- package/assets/esri/core/workers/chunks/{12c9dd3932218238033b.js → 3a205f87f100832ef9f5.js} +1 -1
- package/assets/esri/core/workers/chunks/543eb46b55cacd6e1dbc.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{2fd5b48976cefe7cc0ab.js → 581180668e0229dcdc14.js} +1 -1
- package/assets/esri/core/workers/chunks/5c2299f22a69e58cc4dd.js +1 -0
- package/assets/esri/core/workers/chunks/60eb6dd09080da5653a1.js +1 -0
- package/assets/esri/core/workers/chunks/6210346dc9d064ac90af.js +1 -0
- package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js → 670a66617249f2d15a62.js} +2 -2
- package/assets/esri/core/workers/chunks/{3cf001abca8ad933bccf.js.LICENSE.txt → 670a66617249f2d15a62.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/710e03feaa25e357f17a.js +1 -0
- package/assets/esri/core/workers/chunks/{a6de903f22f76d875005.js → 7496c4c33c2d8f60a434.js} +1 -1
- package/assets/esri/core/workers/chunks/7b4523ab392966624d97.js +2 -0
- package/assets/esri/core/workers/chunks/{30551c1d3e4fa7be86c1.js.LICENSE.txt → 7b4523ab392966624d97.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{50ffb2620cdbcfd75723.js → 81b3351ea9627bb631d4.js} +1 -1
- package/assets/esri/core/workers/chunks/84d7ed2cf5fe23a0888f.js +1 -0
- package/assets/esri/core/workers/chunks/84f972d7851d982701a0.js +319 -0
- package/assets/esri/core/workers/chunks/{f52e597dca4b32a81881.js → 867c6c5b2ee1db977c99.js} +1 -1
- package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js → 8a87c181b85d0b86b9bb.js} +2 -2
- package/assets/esri/core/workers/chunks/{c5d786166a5609b85276.js.LICENSE.txt → 8a87c181b85d0b86b9bb.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{a0c51c4c30a5f749dfc6.js → 8bf2e2fe5e3e8b4a1fa0.js} +1 -1
- package/assets/esri/core/workers/chunks/{213adc87c843d627c5d6.js → 8f2e0277c66247bd40b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{a600194cfe26aedc21dd.js → 9d32f41f8f69b8a507c3.js} +1 -1
- package/assets/esri/core/workers/chunks/ac9c6779771ec855da79.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{899f197556b6ced6eddf.js → ad9b4e0164706c53b872.js} +2 -2
- package/assets/esri/core/workers/chunks/{1a6d2d090b643a87408a.js → b780c7062b1b18a5ae19.js} +1 -1
- package/assets/esri/core/workers/chunks/{72097a8247101018dcdf.js → ba4aafa8dfa76006c3e7.js} +1 -1
- package/assets/esri/core/workers/chunks/c2594024d72133d3ed7b.js +2 -0
- package/assets/esri/core/workers/chunks/{e524462c63834fae7e01.js.LICENSE.txt → c2594024d72133d3ed7b.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{5a821b7bf58eebb9062c.js → c607d618b64d3accecc4.js} +1 -1
- package/assets/esri/core/workers/chunks/c819535525e9a27bae1f.js +39 -0
- package/assets/esri/core/workers/chunks/{c3033f148213c960b906.js → cb25b45a6b385e60c68d.js} +307 -309
- package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js → ce9de24cb96b56d20562.js} +2 -2
- package/assets/esri/core/workers/chunks/{577f24923fa4d08360e4.js.LICENSE.txt → ce9de24cb96b56d20562.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/d30fae6233d3426615ed.js +1 -0
- package/assets/esri/core/workers/chunks/d8dc922f7466300b668f.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{28317c8d7fa2eeeaf997.js → d92ea6b0674f34206ab6.js} +1 -1
- package/assets/esri/core/workers/chunks/{345993291540433d3d92.js → e93222c65bd28203ddf7.js} +1 -1
- package/assets/esri/themes/base/widgets/_SelectionList.scss +5 -17
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/BloomBlur.glsl.js +1 -1
- package/chunks/BloomComposition.glsl.js +2 -2
- package/chunks/ChapmanAtmosphere.glsl.js +1 -1
- package/chunks/CloudsComposition.glsl.js +1 -1
- package/chunks/ComponentShader.glsl.js +33 -33
- package/chunks/DefaultMaterial.glsl.js +22 -22
- package/chunks/Fog.glsl.js +3 -3
- package/chunks/Haze.glsl.js +1 -1
- package/chunks/Path.glsl.js +22 -18
- package/chunks/RealisticTree.glsl.js +9 -9
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +5 -5
- package/chunks/ShadowHighlight.glsl.js +3 -3
- package/chunks/Terrain.glsl.js +1 -1
- package/chunks/Viewshed.glsl.js +1 -1
- package/geometry/support/PolylineBuilder.js +1 -1
- package/geometry/support/curves/bezierCurveUtils.js +5 -0
- package/geometry/support/curves/circleUtils.js +5 -0
- package/geometry/support/curves/circularArcUtils.js +5 -0
- package/geometry/support/curves/closestPointOnCurve.js +5 -0
- package/geometry/support/curves/curveUtils.js +5 -0
- package/geometry/support/curves/densifyCurvedGeometry.js +5 -0
- package/geometry/support/curves/ellipticArc4Utils.js +5 -0
- package/geometry/support/curves/ellipticArc7Utils.js +5 -0
- package/geometry/support/curves/mathUtils.js +5 -0
- package/geometry/support/curves/splitCurveAtPoint.js +5 -0
- package/interfaces.d.ts +452 -17
- package/layers/VideoLayer.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/knowledgeGraph/GraphAddNamedTypesResult.js +5 -0
- package/rest/knowledgeGraph/GraphDeleteNamedTypeResult.js +5 -0
- package/rest/knowledgeGraph/wasmInterface/WasmDataModelWrapperInterfaces.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
- package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +5 -0
- package/rest/knowledgeGraph/wasmInterface/wasmUtils.js +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMOperators.js +1 -1
- package/symbols/cim/effects/EffectSuppress.js +5 -0
- package/symbols/cim/effects/EffectTaperedPolygon.js +1 -1
- package/views/2d/layers/MediaLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VideoLayerView2D.js +1 -1
- package/views/2d/layers/graphics/GraphicStoreItem.js +1 -1
- package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechniqueConfiguration.js +1 -1
- package/views/3d/environment/EnvironmentManager.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/ObjectSymbolLayerRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/Point3DSymbolRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/SimpleFeatureRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/UniqueValueFeatureRenderer.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/factoryUtils.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/primitiveObjectUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/AnalyticalSkyModel.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateAmbientOcclusion.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +15 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/FoamRendering.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +10 -11
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PiUtils.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/shading/Water.glsl.js +8 -8
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterDistortion.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.glsl.js +27 -0
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.glsl.js +28 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/effects/haze/HazeTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/effects/weather/SnowCover.glsl.js +12 -0
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOID.glsl.js +9 -9
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlight.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ToneMapping.glsl.js +2 -20
- package/views/VideoView.js +1 -1
- package/webscene/support/FeatureReference.d.ts +4 -0
- package/webscene/support/FeatureReference.js +5 -0
- package/webscene/support/FeatureReferenceGlobalId.d.ts +4 -0
- package/webscene/support/FeatureReferenceGlobalId.js +5 -0
- package/webscene/support/FeatureReferenceId.d.ts +4 -0
- package/webscene/support/FeatureReferenceId.js +5 -0
- package/webscene/support/FeatureReferenceObjectId.d.ts +4 -0
- package/webscene/support/FeatureReferenceObjectId.js +5 -0
- package/webscene/support/LayerReference.d.ts +4 -0
- package/webscene/support/LayerReference.js +5 -0
- package/webscene/support/SlideElements.js +1 -1
- package/webscene/support/SlidePopupInfo.d.ts +4 -0
- package/webscene/support/SlidePopupInfo.js +5 -0
- package/webscene/support/featureReferenceUtils.js +5 -0
- package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/TableList/ListItemPanel.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +1 -1
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/2e3019ce49e972a815ca.js +0 -1
- package/assets/esri/core/workers/chunks/30551c1d3e4fa7be86c1.js +0 -2
- package/assets/esri/core/workers/chunks/3293b4041c222299428f.js +0 -1
- package/assets/esri/core/workers/chunks/626ba3a7dee952308566.js +0 -1
- package/assets/esri/core/workers/chunks/97eedd6b90c6a9c67947.js +0 -1
- package/assets/esri/core/workers/chunks/b1e420cb425a3625170e.js +0 -319
- package/assets/esri/core/workers/chunks/bf4947fe446dcb477031.js +0 -1
- package/assets/esri/core/workers/chunks/cd2927b922444880566d.js +0 -1
- package/assets/esri/core/workers/chunks/d3a74087e076a3ae76ca.js +0 -1
- package/assets/esri/core/workers/chunks/def182fff5a0244b1c2c.js +0 -1
- package/assets/esri/core/workers/chunks/e524462c63834fae7e01.js +0 -2
- package/assets/esri/core/workers/chunks/e64e0c3240f8e577a61c.js +0 -39
- package/geometry/support/curveUtils.js +0 -5
- package/geometry/support/densifyUtils.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/Factory.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +0 -5
- package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadow.js +0 -38
- package/views/3d/webgl-engine/core/shaderLibrary/shading/calculateUVZShadowFromDepth.js +0 -35
- package/views/3d/webgl-engine/effects/bloom/BloomCompositionTechniqueConfiguration.js +0 -5
- package/widgets/support/InteractiveAnalysisViewModel.js +0 -5
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1806],{2073:(e,t,r)=>{r.d(t,{$n:()=>A,$r:()=>m,EM:()=>f,Ec:()=>N,JJ:()=>h,Mm:()=>M,OC:()=>R,Sr:()=>p,UO:()=>a,Vj:()=>G,WU:()=>E,Y8:()=>s,Z7:()=>l,_6:()=>v,aJ:()=>u,dd:()=>b,dn:()=>d,et:()=>S,fe:()=>w,gD:()=>T,hE:()=>c,hY:()=>o,iM:()=>_,mt:()=>g,ow:()=>y,vS:()=>P});var n=r(66552);const i={esriCentimeters:"centimeters",esriDecimalDegrees:"decimal-degrees",esriDecimeters:"decimeters",esriFeet:"feet",esriInches:"inches",esriKilometers:"kilometers",esriMeters:"meters",esriMiles:"miles",esriMillimeters:"millimeters",esriNauticalMiles:"nautical-miles",esriPoints:"points",esriUnknownUnits:"unknown",esriYards:"yards"},o=(0,n.O)()(i),s=(0,n.O)()({...i,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),a=(0,n.O)()({esriAcres:"international-acres",esriAcresUS:"us-acres",esriAres:"ares",esriHectares:"hectares",esriSquareCentimeters:"square-centimeters",esriSquareDecimeters:"square-decimeters",esriSquareFeet:"square-international-feet",esriSquareFeetUS:"square-us-feet",esriSquareInches:"square-international-inches",esriSquareInchesUS:"square-us-inches",esriSquareKilometers:"square-kilometers",esriSquareMeters:"square-meters",esriSquareMiles:"square-international-miles",esriSquareMilesUS:"square-us-miles",esriSquareMillimeters:"square-millimeters",esriSquareYards:"square-international-yards",esriSquareYardsUS:"square-us-yards",esriUnknownAreaUnits:"unknown"}),l=(0,n.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards"}),d=(0,n.O)()({esriNAUCentimeters:"centimeters",esriNAUDecimalDegrees:"decimal-degrees",esriNAUDecimeters:"decimeters",esriNAUFeet:"feet",esriNAUInches:"inches",esriNAUKilometers:"kilometers",esriNAUMeters:"meters",esriNAUMiles:"miles",esriNAUMillimeters:"millimeters",esriNAUNauticalMiles:"nautical-miles",esriNAUPoints:"points",esriNAUYards:"yards",esriNAUDays:"days",esriNAUHours:"hours",esriNAUMinutes:"minutes",esriNAUSeconds:"seconds",esriNAUKilometersPerHour:"kilometers-per-hour",esriNAUMilesPerHour:"miles-per-hour",esriNAUUnknown:"unknown"}),u=(0,n.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),p=(0,n.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),c=((0,n.O)()({esriNAOutputPolygonNone:"none",esriNAOutputPolygonSimplified:"simplified",esriNAOutputPolygonDetailed:"detailed"}),(0,n.O)()({esriNFSBAllowBacktrack:"allow-backtrack",esriNFSBAtDeadEndsOnly:"at-dead-ends-only",esriNFSBNoBacktrack:"no-backtrack",esriNFSBAtDeadEndsAndIntersections:"at-dead-ends-and-intersections"})),y=((0,n.O)()({esriNATravelDirectionFromFacility:"from-facility",esriNATravelDirectionToFacility:"to-facility"}),(0,n.O)()({esriNATimeOfDayNotUsed:"not-used",esriNATimeOfDayUseAsStartTime:"start",esriNATimeOfDayUseAsEndTime:"end"}),(0,n.O)()({AUTOMOBILE:"automobile",TRUCK:"truck",WALK:"walk",OTHER:"other"})),h=(0,n.O)()({0:"either-side-of-vehicle",1:"right-side-of-vehicle",2:"left-side-of-vehicle",3:"no-u-turn"},{useNumericKeys:!0}),f=(0,n.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),m=(0,n.O)()({0:"ok",1:"not-located",2:"network-element-not-located",3:"element-not-traversable",4:"invalid-field-values",5:"not-reached",6:"time-window-violation",7:"not-located-on-closest"},{useNumericKeys:!0}),g=(0,n.O)()({1:"right",2:"left"},{useNumericKeys:!0}),_=(0,n.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),w=(0,n.O)()({0:"permit",1:"restrict"},{useNumericKeys:!0}),v=(0,n.O)()({1:"header",50:"arrive",51:"depart",52:"straight",100:"on-ferry",101:"off-ferry",102:"central-fork",103:"roundabout",104:"u-turn",150:"door",151:"stairs",152:"elevator",153:"escalator",154:"pedestrian-ramp",200:"left-fork",201:"left-ramp",202:"clockwise-roundabout",203:"left-handed-u-turn",204:"bear-left",205:"left-turn",206:"sharp-left",207:"left-turn-and-immediate-left-turn",208:"left-turn-and-immediate-right-turn",300:"right-fork",301:"right-ramp",302:"counter-clockwise-roundabout",303:"right-handed-u-turn",304:"bear-right",305:"right-turn",306:"sharp-right",307:"right-turn-and-immediate-left-turn",308:"right-turn-and-immediate-right-turn",400:"up-elevator",401:"up-escalator",402:"up-stairs",500:"down-elevator",501:"down-escalator",502:"down-stairs",1e3:"general-event",1001:"landmark",1002:"time-zone-change",1003:"traffic-event",1004:"scaled-cost-barrier-event",1005:"boundary-crossing",1006:"restriction-violation",1007:"lane"},{useNumericKeys:!0}),T=(0,n.O)()({0:"unknown",1:"segment",2:"maneuver-segment",3:"restriction-violation",4:"scaled-cost-barrier",5:"heavy-traffic",6:"slow-traffic",7:"moderate-traffic"},{useNumericKeys:!0}),A=(0,n.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),b=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),M=(0,n.O)()({Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),S=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters",Minutes:"minutes",TimeAt1KPH:"time-at-1-kph",TravelTime:"travel-time",TruckMinutes:"truck-minutes",TruckTravelTime:"truck-travel-time",WalkTime:"walk-time"},{ignoreUnknown:!1}),R=(0,n.O)()({"Any Hazmat Prohibited":"any-hazmat-prohibited","Avoid Carpool Roads":"avoid-carpool-roads","Avoid Express Lanes":"avoid-express-lanes","Avoid Ferries":"avoid-ferries","Avoid Gates":"avoid-gates","Avoid Limited Access Roads":"avoid-limited-access-roads","Avoid Private Roads":"avoid-private-roads","Avoid Roads Unsuitable for Pedestrians":"avoid-roads-unsuitable-for-pedestrians","Avoid Stairways":"avoid-stairways","Avoid Toll Roads":"avoid-toll-roads","Avoid Toll Roads for Trucks":"avoid-toll-roads-for-trucks","Avoid Truck Restricted Roads":"avoid-truck-restricted-roads","Avoid Unpaved Roads":"avoid-unpaved-roads","Axle Count Restriction":"axle-count-restriction","Driving a Bus":"driving-a-bus","Driving a Taxi":"driving-a-taxi","Driving a Truck":"driving-a-truck","Driving an Automobile":"driving-an-automobile","Driving an Emergency Vehicle":"driving-an-emergency-vehicle","Height Restriction":"height-restriction","Kingpin to Rear Axle Length Restriction":"kingpin-to-rear-axle-length-restriction","Length Restriction":"length-restriction","Preferred for Pedestrians":"preferred-for-pedestrians","Riding a Motorcycle":"riding-a-motorcycle","Roads Under Construction Prohibited":"roads-under-construction-prohibited","Semi or Tractor with One or More Trailers Prohibited":"semi-or-tractor-with-one-or-more-trailers-prohibited","Single Axle Vehicles Prohibited":"single-axle-vehicles-prohibited","Tandem Axle Vehicles Prohibited":"tandem-axle-vehicles-prohibited","Through Traffic Prohibited":"through-traffic-prohibited","Truck with Trailers Restriction":"truck-with-trailers-restriction","Use Preferred Hazmat Routes":"use-preferred-hazmat-routes","Use Preferred Truck Routes":"use-preferred-truck-routes",Walking:"walking","Weight Restriction":"weight-restriction"},{ignoreUnknown:!1}),P=(0,n.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),G=(0,n.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),E=(0,n.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),N=(0,n.O)()({esriDSTAltName:"alt-name",esriDSTArrive:"arrive",esriDSTBranch:"branch",esriDSTCrossStreet:"cross-street",esriDSTCumulativeLength:"cumulative-length",esriDSTDepart:"depart",esriDSTEstimatedArrivalTime:"estimated-arrival-time",esriDSTExit:"exit",esriDSTGeneral:"general",esriDSTLength:"length",esriDSTServiceTime:"service-time",esriDSTStreetName:"street-name",esriDSTSummary:"summary",esriDSTTime:"time",esriDSTTimeWindow:"time-window",esriDSTToward:"toward",esriDSTViolationTime:"violation-time",esriDSTWaitTime:"wait-time"})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var n,i=r(90237),o=r(52106),s=r(66552),a=r(25482),l=r(4718),d=r(10107),u=(r(44208),r(53966),r(36005)),p=r(40608),c=r(43937),y=r(16930),h=r(65864),f=r(50498),m=r(20437);const g=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let _=n=class extends a.A{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void g.write(e,t,r,n);const{features:i}=this;if(i)for(const e of i)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=y.A.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e?.[r];n.geometry=t?.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,i]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((i-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,i],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const d=this._getHydrationFunction(e,(e=>e*o+n),(e=>i-e*s),a,l);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=y.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const o=e[t],s=r.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=n);const l=o.aggregateGeometries,d=s.aggregateGeometries;if(l&&null!=d)for(const e in d){const t=d[e],r=l[e],i=r?.spatialReference;null==t||i||(t.spatialReference=n)}i.push(s)}return i}_quantizePoints(e,t,r){let n,i;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===n&&s===i||(o.push([e-n,s-i]),n=e,i=s)}else n=t(a[0]),i=r(a[1]),o.push([n,i])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,h.Bi)(e)?e.rings:e.paths,i=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],s=this._quantizePoints(o,t,r);s&&i.push(s)}return i.length>0?((0,h.Bi)(e)?e.rings=i:e.paths=i,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,i){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,h.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,i=n.length;e<i;e++){const i=n[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=i(r[3])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),i&&null!=e.mmax&&null!=e.mmin&&(e.mmax=i(e.mmax),e.mmin=i(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}if(n&&i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=i(t[3])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}}:null}};(0,i._)([(0,d.MZ)({type:String,json:{write:!0}})],_.prototype,"displayFieldName",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"exceededTransferLimit",void 0),(0,i._)([(0,d.MZ)({type:[o.A],json:{write:!0}})],_.prototype,"features",void 0),(0,i._)([(0,u.w)("features")],_.prototype,"readFeatures",null),(0,i._)([(0,d.MZ)({type:[m.A],json:{write:!0}})],_.prototype,"fields",void 0),(0,i._)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],_.prototype,"geometryType",void 0),(0,i._)([(0,c.K)("geometryType")],_.prototype,"writeGeometryType",null),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasM",void 0),(0,i._)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],_.prototype,"hasZ",void 0),(0,i._)([(0,d.MZ)({types:f.yR,json:{write:!0}})],_.prototype,"queryGeometry",void 0),(0,i._)([(0,u.w)("queryGeometry")],_.prototype,"readQueryGeometry",null),(0,i._)([(0,d.MZ)({type:y.A,json:{write:!0}})],_.prototype,"spatialReference",void 0),(0,i._)([(0,c.K)("spatialReference")],_.prototype,"writeSpatialReference",null),(0,i._)([(0,d.MZ)({json:{write:!0}})],_.prototype,"transform",void 0),_=n=(0,i._)([(0,p.$)("esri.rest.support.FeatureSet")],_),_.prototype.toJSON.isDefaultToJSON=!0;const w=_},35448:(e,t,r)=>{var n,i,o,s,a,l,d;r.d(t,{Eq:()=>n,bV:()=>o,nP:()=>a,r5:()=>i,ti:()=>l,vy:()=>d,wr:()=>s}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(n||(n={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(i||(i={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=7]="esriGeometryAny",e[e.esriGeometryMultiPatch=9]="esriGeometryMultiPatch"}(o||(o={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(s||(s={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(a||(a={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(d||(d={}))},37807:(e,t,r)=>{r.d(t,{A:()=>u});var n=r(90237),i=r(66552),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(40608));const l=new i.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let d=class extends o.A{constructor(e){super(e),this.description=null,this.type=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,n._)([(0,s.MZ)({type:String,json:{read:l.read,write:l.write}})],d.prototype,"type",void 0),d=(0,n._)([(0,a.$)("esri.rest.support.GPMessage")],d);const u=d},45724:(e,t,r)=>{r.d(t,{I:()=>l});var n=r(2741),i=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let s,a=null;async function l(){const e=a??s;if(e)return e;const t=!!(0,i.A)("wasm-simd");return s=d(t),s}async function d(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,n.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,n.s)(o+e)})}},51806:(e,t,r)=>{r.r(t),r.d(t,{_checkAuthentication:()=>Vt,_esriRequestWrapper:()=>Bt,_fetchWrapper:()=>Kt,_getClientDataCacheCopy:()=>Pt,_setMaxQueryParsingDurationForTesting:()=>Wt,_submitJobWrapper:()=>$t,clearClientDataCache:()=>Jt,clientDataCache:()=>Rt,executeAddNamedTypes:()=>Nt,executeApplyEdits:()=>Et,executeDeleteNamedType:()=>kt,executeFindPaths:()=>Lt,executeFindPathsAsynchronous:()=>qt,executeQuery:()=>Dt,executeQueryStreaming:()=>It,executeSearch:()=>xt,executeSearchStreaming:()=>Ot,fetchAllClientDataKeys:()=>jt,fetchAsynchronousFindPathsResultData:()=>zt,fetchClientDataAtKeys:()=>Ct,fetchKnowledgeGraph:()=>Ft,kgRestServices:()=>Gt,refreshDataModel:()=>Zt,refreshServiceDefinition:()=>Ut});var n,i=r(70333),o=r(78888),s=r(49186),a=r(53966),l=r(74887),d=r(91075),u=r(16930),p=r(90237),c=r(69622),y=r(10107),h=r(56507),f=(r(44208),r(87811),r(40608)),m=r(5443);let g=n=class extends c.A{constructor(e){super(e),this.outSpatialReference=null,this.processExtent=null,this.processSpatialReference=null,this.returnColumnName=!1,this.returnFeatureCollection=!1,this.returnM=!1,this.returnZ=!1}static from(e){return(0,h.PZ)(n,e)}};(0,p._)([(0,y.MZ)({type:u.A})],g.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)({type:m.A})],g.prototype,"processExtent",void 0),(0,p._)([(0,y.MZ)({type:u.A})],g.prototype,"processSpatialReference",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnColumnName",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnFeatureCollection",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnM",void 0),(0,p._)([(0,y.MZ)({nonNullable:!0})],g.prototype,"returnZ",void 0),g=n=(0,p._)([(0,f.$)("esri.rest.geoprocessor.GPOptions")],g);const _=g;var w=r(17136),v=r(20437),T=r(25482);let A=class extends T.A{constructor(){super(...arguments),this.extent=null,this.height=null,this.href=null,this.opacity=1,this.rotation=0,this.scale=null,this.visible=!0,this.width=null}};(0,p._)([(0,y.MZ)({type:m.A})],A.prototype,"extent",void 0),(0,p._)([(0,y.MZ)()],A.prototype,"height",void 0),(0,p._)([(0,y.MZ)()],A.prototype,"href",void 0),(0,p._)([(0,y.MZ)()],A.prototype,"opacity",void 0),(0,p._)([(0,y.MZ)()],A.prototype,"rotation",void 0),(0,p._)([(0,y.MZ)()],A.prototype,"scale",void 0),(0,p._)([(0,y.MZ)()],A.prototype,"visible",void 0),(0,p._)([(0,y.MZ)()],A.prototype,"width",void 0),A=(0,p._)([(0,f.$)("esri.layers.support.MapImage")],A);const b=A;var M=r(2272),S=r(93223),R=r(2073);let P=class extends T.A{constructor(e){super(e),this.area=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],P.prototype,"area",void 0),(0,p._)([(0,S.e)(R.UO)],P.prototype,"units",void 0),P=(0,p._)([(0,f.$)("esri.rest.support.ArealUnit")],P);const G=P;let E=class extends T.A{constructor(e){super(e),this.itemId=null,this.url=null}};(0,p._)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],E.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],E.prototype,"url",void 0),E=(0,p._)([(0,f.$)("esri.rest.support.DataFile")],E);const N=E;var k=r(22671);let D=class extends T.A{constructor(e){super(e),this.distance=0,this.units=null}};(0,p._)([(0,y.MZ)({json:{write:!0}})],D.prototype,"distance",void 0),(0,p._)([(0,S.e)(R.Y8)],D.prototype,"units",void 0),D=(0,p._)([(0,f.$)("esri.rest.support.LinearUnit")],D);const I=D;var x=r(66552);const O="multi-value-",j=new x.J({GPArealUnit:"areal-unit",GPBoolean:"boolean",GPComposite:"composite",GPDataFile:"data-file",GPDate:"date",GPDouble:"double",GPFeatureRecordSetLayer:"feature-record-set-layer",Field:"field",GPLinearUnit:"linear-unit",GPLong:"long",GPRasterData:"raster-data",GPRasterDataLayer:"raster-data-layer",GPRecordSet:"record-set",GPString:"string",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${O}areal-unit`,"GPMultiValue:GPBoolean":`${O}boolean`,"GPMultiValue:GPComposite":`${O}composite`,"GPMultiValue:GPDataFile":`${O}data-file`,"GPMultiValue:GPDate":`${O}date`,"GPMultiValue:GPDouble":`${O}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${O}feature-record-set-layer`,"GPMultiValue:Field":`${O}field`,"GPMultiValue:GPLinearUnit":`${O}linear-unit`,"GPMultiValue:GPLong":`${O}long`,"GPMultiValue:GPRasterData":`${O}raster-data`,"GPMultiValue:GPRasterDataLayer":`${O}raster-data-layer`,"GPMultiValue:GPRecordSet":`${O}record-set`,"GPMultiValue:GPString":`${O}string`});let C=class extends T.A{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,p._)([(0,S.e)(j,{ignoreUnknown:!1})],C.prototype,"dataType",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"paramName",void 0),(0,p._)([(0,y.MZ)()],C.prototype,"value",void 0),C=(0,p._)([(0,f.$)("esri.rest.support.ParameterValue")],C);const F=C;var Z=r(36005);let U=class extends T.A{constructor(e){super(e),this.format=null,this.itemId=null,this.type=null,this.url=null}readType(e){return"ImageService"===e?"image-service":null}};(0,p._)([(0,y.MZ)()],U.prototype,"format",void 0),(0,p._)([(0,y.MZ)({json:{name:"itemID",write:!0}})],U.prototype,"itemId",void 0),(0,p._)([(0,y.MZ)()],U.prototype,"type",void 0),(0,p._)([(0,Z.w)("type")],U.prototype,"readType",null),(0,p._)([(0,y.MZ)({json:{write:!0}})],U.prototype,"url",void 0),U=(0,p._)([(0,f.$)("esri.rest.support.RasterData")],U);const q=U;async function L(e,t){switch(e){case"areal-unit":return G.fromJSON(t);case"boolean":case"double":case"long":case"string":case"value-table":return t;case"date":return new Date(t);case"data-file":return N.fromJSON(t);case"linear-unit":return I.fromJSON(t);case"feature-record-set-layer":if("url"in t)return N.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(9953),r.e(4796),r.e(3029),r.e(4111),r.e(8506),r.e(3600),r.e(2470)]).then(r.bind(r,13600))).default),{layerDefinition:n,featureSet:i}=t;return e.read({layerDefinition:n,featureSet:i},{origin:"portal-item"}),e.spatialReference=u.A.fromJSON(i.spatialReference??n.spatialReference??n.extent.spatialReference),e}return k.A.fromJSON(t);case"record-set":return"url"in t?N.fromJSON(t):k.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?b.fromJSON(t.mapImage):q.fromJSON(t);case"field":return v.A.fromJSON(t)}}async function z(e){const t=j.fromJSON(e.dataType),{paramName:r}=e,n=function(e){return e.startsWith(O)}(t)?await async function(e,t){const r=function(e){return e.replace(O,"")}(e),n="composite"===r?t.map((e=>L(j.fromJSON(e.dataType),e.value))):t.map((e=>L(r,e)));return Promise.all(n)}(t,e.value):await L(t,e.value);return new F({dataType:t,paramName:r,value:n})}function J(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map((e=>J({item:e},!0).item))):r instanceof Date&&(e[t]=r.getTime())}return(0,M.lF)(e,t,r)}var K,$=r(37807);const B=(0,x.O)()({esriJobCancelled:"job-cancelled",esriJobCancelling:"job-cancelling",esriJobDeleted:"job-deleted",esriJobDeleting:"job-deleting",esriJobTimedOut:"job-timed-out",esriJobExecuting:"job-executing",esriJobFailed:"job-failed",esriJobNew:"job-new",esriJobSubmitted:"job-submitted",esriJobSucceeded:"job-succeeded",esriJobWaiting:"job-waiting"},{ignoreUnknown:!1}),V=1e3;let Y=class extends T.A{static{K=this}constructor(e){super(e),this.jobId=null,this.jobStatus=null,this.messages=null,this.progress=null,this.requestOptions=null,this.sourceUrl=null,this._cancelJobTimer=void 0,this._jobCompletionTimer=void 0}async cancelJob(e){const{jobId:t,sourceUrl:r}=this,{path:n}=(0,M.Dl)(r),i={...this.requestOptions,...e,query:{f:"json"}},s=`${n}/jobs/${t}/cancel`,{data:a}=await(0,o.A)(s,i),{messages:d,jobStatus:u,progress:p}=K.fromJSON(a);return this.set({messages:d,jobStatus:u,progress:p}),"job-cancelled"===u?this:new Promise(((t,r)=>{(0,l.u7)(i.signal,(()=>{this.clearCancelJobTimer(),r((0,l.NK)())})),this.clearCancelJobTimer();const n=()=>{this._cancelJobTimer||r((0,l.NK)()),this.checkJobStatus(e).then((({jobStatus:e})=>{switch(e){case"job-cancelling":default:this._cancelJobTimer=setTimeout(n,V);break;case"job-deleted":case"job-deleting":case"job-executing":case"job-failed":case"job-new":case"job-submitted":case"job-succeeded":case"job-timed-out":case"job-waiting":r(this);break;case"job-cancelled":t(this)}}))};this._cancelJobTimer=setTimeout(n,V)}))}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,M.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:i}=await(0,o.A)(n,r),{messages:s,jobStatus:a,progress:l}=K.fromJSON(i);return this.set({messages:s,jobStatus:a,progress:l}),this}async fetchResultData(e,t,r){t=_.from(t||{});const{returnColumnName:n,returnFeatureCollection:i,returnM:s,returnZ:a,outSpatialReference:l}=t,{path:d}=(0,M.Dl)(this.sourceUrl),u=J({returnColumnName:n||null,returnFeatureCollection:i||null,returnM:s||null,returnZ:a||null,outSR:l,returnType:"data",f:"json"},null),p={...this.requestOptions,...r,query:u},c=`${d}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(c,p);return z(y)}async fetchResultImage(e,t,r){const{path:n}=(0,M.Dl)(this.sourceUrl),i=J({...t.toJSON(),f:"json"}),s={...this.requestOptions,...r,query:i},a=`${n}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(a,s);return z(l)}async fetchResultMapImageLayer(){const{path:e}=(0,M.Dl)(this.sourceUrl),t=e.indexOf("/GPServer/"),n=`${e.slice(0,Math.max(0,t))}/MapServer/jobs/${this.jobId}`;return new(0,(await Promise.all([r.e(6131),r.e(8219),r.e(13),r.e(5055),r.e(1214),r.e(1956),r.e(4796),r.e(4111),r.e(364),r.e(4341),r.e(7656),r.e(788)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=V,signal:r,statusCallback:n}=e;return new Promise(((e,i)=>{(0,l.u7)(r,(()=>{this.clearJobCompletionTimer(),i((0,l.NK)())})),this.clearJobCompletionTimer();const o=()=>{this._jobCompletionTimer||i((0,l.NK)()),this.checkJobStatus().then((({jobStatus:r})=>{switch(r){case"job-succeeded":e(this);break;case"job-executing":case"job-new":case"job-submitted":case"job-waiting":n&&n(this),this._jobCompletionTimer=setTimeout(o,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":i(this);break;default:this._jobCompletionTimer=setTimeout(o,t)}})).catch((e=>{i(e)}))};this._jobCompletionTimer=setTimeout(o,t)}))}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,p._)([(0,y.MZ)()],Y.prototype,"jobId",void 0),(0,p._)([(0,S.e)(B,{ignoreUnknown:!1})],Y.prototype,"jobStatus",void 0),(0,p._)([(0,y.MZ)({type:[$.A]})],Y.prototype,"messages",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"progress",void 0),(0,p._)([(0,y.MZ)()],Y.prototype,"requestOptions",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],Y.prototype,"sourceUrl",void 0),Y=K=(0,p._)([(0,f.$)("esri.rest.support.JobInfo")],Y);const H=Y;let Q=class extends c.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,p._)([(0,y.MZ)()],Q.prototype,"headerKeys",void 0),(0,p._)([(0,y.MZ)()],Q.prototype,"outSpatialReference",void 0),(0,p._)([(0,y.MZ)()],Q.prototype,"exceededTransferLimit",void 0),Q=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],Q);const W=Q;let X=class extends c.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new W}};(0,p._)([(0,y.MZ)()],X.prototype,"resultRows",void 0),(0,p._)([(0,y.MZ)()],X.prototype,"resultHeader",void 0),X=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryResult")],X);const ee=X;let te=class extends c.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new W}};(0,p._)([(0,y.MZ)()],te.prototype,"resultRowsStream",void 0),(0,p._)([(0,y.MZ)()],te.prototype,"resultHeader",void 0),te=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],te);const re=te;let ne=class extends T.A{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"unique",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"ascending",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],ne.prototype,"fieldNames",void 0),ne=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.FieldIndex")],ne);const ie=ne;let oe=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=!0,this.required=!1,this.defaultVisibility=!0,this.systemMaintained=null,this.role="esriGraphPropertyUNSPECIFIED",this.defaultValue=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],oe.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],oe.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],oe.prototype,"fieldType",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],oe.prototype,"geometryType",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],oe.prototype,"hasM",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],oe.prototype,"hasZ",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],oe.prototype,"nullable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],oe.prototype,"editable",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],oe.prototype,"required",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],oe.prototype,"defaultVisibility",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],oe.prototype,"systemMaintained",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],oe.prototype,"role",void 0),(0,p._)([(0,y.MZ)({json:{write:!0}})],oe.prototype,"defaultValue",void 0),oe=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphProperty")],oe);const se=oe;let ae=class extends T.A{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"name",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"alias",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"role",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ae.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:[se],json:{write:!0}})],ae.prototype,"properties",void 0),(0,p._)([(0,y.MZ)({type:[ie],json:{write:!0}})],ae.prototype,"fieldIndexes",void 0),ae=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphObjectType")],ae);const le=ae;let de=class extends le{constructor(e){super(e),this.type="entity"}};de=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.EntityType")],de);const ue=de;let pe=class extends le{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,p._)([(0,y.MZ)({json:{write:!0}})],pe.prototype,"endPoints",void 0),pe=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.RelationshipType")],pe);const ce=pe;let ye=class extends T.A{constructor(e){super(e),this.value=null,this.behavior=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ye.prototype,"value",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ye.prototype,"behavior",void 0),ye=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],ye);const he=ye;let fe=class extends T.A{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=[],this.entityTypes=[],this.relationshipTypes=[],this.metaEntityTypes=[],this.provenanceSourceTypeValues=[]}};(0,p._)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],fe.prototype,"timestamp",void 0),(0,p._)([(0,y.MZ)({type:u.A,json:{write:!0}})],fe.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],fe.prototype,"strict",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],fe.prototype,"objectIdField",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],fe.prototype,"globalIdField",void 0),(0,p._)([(0,y.MZ)()],fe.prototype,"arcgisManaged",void 0),(0,p._)([(0,y.MZ)()],fe.prototype,"identifierInfo",void 0),(0,p._)([(0,y.MZ)()],fe.prototype,"searchIndexes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],fe.prototype,"entityTypes",void 0),(0,p._)([(0,y.MZ)({type:[ce],json:{write:!0}})],fe.prototype,"relationshipTypes",void 0),(0,p._)([(0,y.MZ)({type:[ue],json:{write:!0}})],fe.prototype,"metaEntityTypes",void 0),(0,p._)([(0,y.MZ)({type:[he],json:{write:!0}})],fe.prototype,"provenanceSourceTypeValues",void 0),fe=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.DataModel")],fe);const me=fe;let ge=class extends T.A{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],ge.prototype,"capabilities",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ge.prototype,"supportsSearch",void 0),(0,p._)([(0,y.MZ)({type:[String],json:{write:!0}})],ge.prototype,"supportedQueryFormats",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ge.prototype,"allowGeometryUpdates",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],ge.prototype,"searchMaxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],ge.prototype,"serviceCapabilities",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],ge.prototype,"maxRecordCount",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ge.prototype,"description",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ge.prototype,"copyrightText",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ge.prototype,"units",void 0),(0,p._)([(0,y.MZ)({type:u.A,json:{write:!0}})],ge.prototype,"spatialReference",void 0),(0,p._)([(0,y.MZ)({type:Number,json:{write:!0}})],ge.prototype,"currentVersion",void 0),(0,p._)([(0,y.MZ)({type:Object,json:{write:!0}})],ge.prototype,"dateFieldsTimeReference",void 0),(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],ge.prototype,"serviceItemId",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ge.prototype,"supportsDocuments",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ge.prototype,"dataEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ge.prototype,"schemaEditingNotSupported",void 0),(0,p._)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ge.prototype,"supportsProvenance",void 0),ge=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.ServiceDefinition")],ge);const _e=ge;let we=class extends T.A{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};(0,p._)([(0,y.MZ)({type:String,json:{write:!0}})],we.prototype,"url",void 0),(0,p._)([(0,y.MZ)({type:me,json:{write:!0}})],we.prototype,"dataModel",void 0),(0,p._)([(0,y.MZ)({type:_e,json:{write:!0}})],we.prototype,"serviceDefinition",void 0),we=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],we);const ve=we;function Te(e,t,r){if(0!==e.error_code)throw new s.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function Ae(e){return e?.error_code?new s.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function be(e,t,r,n){const i=new r.ClientDataKey;i.deleteLater(),i.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(i);const s=t.get(e);return s&&!n&&(o.v_tag={v_tag:s.version}),o}var Me,Se,Re,Pe=r(45724),Ge=r(48526),Ee=r(86738),Ne=r(39829),ke=r(82799);function De(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(Oe(e,t))})),r}function Ie(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,i]of Object.entries(e))r.set_key_value(n,Oe(i,t));return r}function xe(e,t){if(e instanceof Ge.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=r.geometry_type=t.esriGeometryType.esriGeometryMultipoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=e.points.length;let o=0;return e.points.forEach((e=>{e.forEach((e=>{n[o]=e,o++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof Ee.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.geometry_type=t.esriGeometryType.esriGeometryPoint,r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];i[0]=1,n[0]=e.x,n[1]=e.y;let o=2;return e.hasZ&&(n[o]=e.z,o++),e.hasM&&(n[o]=e.m,o++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);if(e instanceof ke.A||e instanceof Ne.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],i=[];let o=[];e instanceof ke.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof Ne.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let s=0,a=0;return o.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[a]=e,a++}))})),i[s]=t,s++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(i),r}(e,t);throw new s.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function Oe(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof d.A)return xe(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(Oe(e,t))})),r}return Ie(e,t)}!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(Me||(Me={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(Se||(Se={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(Re||(Re={}));var je,Ce,Fe,Ze,Ue=r(35448);function qe(e,t){if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits");if(!("originId"in e)){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,Je(i,t));return e.id&&r.set_id(e.id),r}if("originId"in e&&"destinationId"in e){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,i]of Object.entries(e.properties))r.set_key_value(n,Je(i,t));return e.id&&r.set_id(e.id),e.originId&&e.destinationId&&r.set_related_entity_ids(e.originId,e.destinationId),r}throw new s.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Le(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:Ue.r5[e.fieldType]},r.geometry_type={value:e.geometryType?Ue.bV[e.geometryType]:Ue.bV.esriGeometryNull},r.has_m=e.hasM??!1,r.has_z=e.hasZ??!1,r.nullable=e.nullable??!1,r.editable=e.editable,r.required=e.required,r.default_visibility=e.defaultVisibility,r.system_maintained=e.systemMaintained??!1,r.role={value:Ue.ti[e.role]},r.default_value=Je(e.defaultValue,t),r}function ze(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:Ue.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=Le(n,t);r.add_property(e)}return r}function Je(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof d.A?xe(e,t):null}!function(e){e[e.ClientDataKeyTypeUNSPECIFIED=0]="ClientDataKeyTypeUNSPECIFIED",e[e.ClientDataKeyTypeString=1]="ClientDataKeyTypeString"}(je||(je={})),function(e){e[e.ClientDataTypeUNSPECIFIED=0]="ClientDataTypeUNSPECIFIED",e[e.ClientDataTypeString=1]="ClientDataTypeString"}(Ce||(Ce={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.ClientData=1]="ClientData",e[e.NotModified=2]="NotModified"}(Fe||(Fe={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Error=1]="Error",e[e.ClientDataValue=2]="ClientDataValue"}(Ze||(Ze={}));let Ke=class extends c.A{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.decoderError=null,this.entityAddResults=[],this.relationshipAddResults=[],this.updatedKnowledgeGraph=null}};(0,p._)([(0,y.MZ)()],Ke.prototype,"entityAddResultsCount",void 0),(0,p._)([(0,y.MZ)()],Ke.prototype,"relationshipAddResultsCount",void 0),(0,p._)([(0,y.MZ)()],Ke.prototype,"decoderError",void 0),(0,p._)([(0,y.MZ)()],Ke.prototype,"entityAddResults",void 0),(0,p._)([(0,y.MZ)()],Ke.prototype,"relationshipAddResults",void 0),(0,p._)([(0,y.MZ)()],Ke.prototype,"updatedKnowledgeGraph",void 0),Ke=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Ke);const $e=Ke;let Be=class extends c.A{constructor(e){super(e),this.decoderError=null,this.updatedKnowledgeGraph=null}};(0,p._)([(0,y.MZ)()],Be.prototype,"decoderError",void 0),(0,p._)([(0,y.MZ)()],Be.prototype,"updatedKnowledgeGraph",void 0),Be=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],Be);const Ve=Be;let Ye=class extends c.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,p._)([(0,y.MZ)()],Ye.prototype,"name",void 0),(0,p._)([(0,y.MZ)()],Ye.prototype,"supportedCategory",void 0),(0,p._)([(0,y.MZ)()],Ye.prototype,"analyzers",void 0),(0,p._)([(0,y.MZ)()],Ye.prototype,"searchProperties",void 0),Ye=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.SearchIndex")],Ye);const He=Ye;let Qe=!1;function We(e){return e.deleteLater(),new ue(et(e))}function Xe(e){return e.deleteLater(),new ie({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:ot(e.fields)})}function et(e){return{name:e.name,alias:e.alias,role:Ue.Eq[e.role.value],strict:e.strict,properties:st(e.properties),fieldIndexes:at(e.field_indexes)}}function tt(e){return e.deleteLater(),new se({alias:e.alias,name:e.name,fieldType:Ue.r5[e.field_type.value]?Ue.r5[e.field_type.value]:void 0,geometryType:Ue.bV[e.geometry_type.value]?Ue.bV[e.geometry_type.value]:null,hasM:e.has_m,hasZ:e.has_z,nullable:e.nullable,editable:e.editable,required:e.required,defaultVisibility:e.default_visibility,systemMaintained:e.system_maintained,role:Ue.ti[e.role.value],defaultValue:e.default_value})}function rt(e){e.deleteLater();const t=et(e),r=[];for(let t=0;t<e.end_points.size();t++){const n=e.end_points.get(t);r.push({originEntityType:n.origin_entity_type,destinationEntityType:n.dest_entity_type})}return e.end_points.delete(),new ce(Object.assign({endPoints:r},t))}function nt(e){return new he({behavior:e.behavior,value:e.value})}function it(e){const t=[];for(let r=0;r<e.size();r++)t.push(We(e.get(r)));return e.delete(),t}function ot(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function st(e){const t=[];for(let r=0;r<e.size();r++){const n=tt(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(Qe=!0),t.push(n)}return e.delete(),t}function at(e){const t=[];for(let r=0;r<e.size();r++)t.push(Xe(e.get(r)));return e.delete(),t}function lt(e){const t=[];for(let r=0;r<e.size();r++)t.push(rt(e.get(r)));return e.delete(),t}function dt(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(nt(n))}return e.delete(),t}function ut(e){const t=[];for(let r=0;r<e.size();r++){const r=new He,n=e.get(0);r.name=n.name,r.supportedCategory=Ue.nP[n.supported_category.value];const i=n.analyzers.size();for(let e=0;e<i;e++)r.analyzers.push({name:n.analyzers.get(e).name});n.analyzers.delete();for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),i=n.search_properties.get(t),o=[];for(let e=0;e<i.property_names.size();e++)o.push(i.property_names.get(e));r.searchProperties.set(t,{propertyNames:o})}t.push(r)}return e.delete(),t}var pt,ct=r(25927),yt=(r(77901),r(40662)),ht=r(42095),ft=r(23150);function mt(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=gt(e,r),{coords:i,geometry_type:o,lengths:a}=e;if(o.value!==t)throw new s.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return a.forEach((e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=i[l],l++;t.push(e)}r.paths.push(t)})),r}function gt(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(pt||(pt={}));const _t=()=>a.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function wt(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case pt.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let n=2;gt(e,r);const i=e.coords;return r.x=i[0],r.y=i[1],e.has_z&&(r.z=i[n],n++),e.has_m&&(r.m=i[n]),new Ee.A(r)}(e,r);case pt.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},n=gt(e,r),i=e.lengths,o=e.coords,s=i[0];r.points=[];let a=0;for(let e=0;e<s;e++){const e=[];for(let t=0;t<n;t++)e[t]=o[a],a++;r.points.push(e)}return new Ge.A(r)}(e,r);case pt.ESRI_GEOMETRY_POLYLINE:return function(e,t){const{paths:r,hasM:n,hasZ:i}=mt(e,pt.ESRI_GEOMETRY_POLYLINE);return new ke.A({paths:r,hasM:n,hasZ:i,spatialReference:t})}(e,r);case pt.ESRI_GEOMETRY_POLYGON:return function(e,t){const{paths:r,hasM:n,hasZ:i}=mt(e,pt.ESRI_GEOMETRY_POLYGON);return new Ne.A({rings:r,hasM:n,hasZ:i,spatialReference:t})}(e,r);case pt.ESRI_GEOMETRY_ENVELOPE:case pt.ESRI_GEOMETRY_MULTI_PATCH:return _t().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case pt.ESRI_GEOMETRY_NULL:case pt.ESRI_GEOMETRY_ANY:default:return _t().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return _t().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case Me.OBJECT:return function(e,t,r){return new yt.A(Tt(e,t,r))}(e,t,r);case Me.ENTITY:return vt(e,t,r);case Me.RELATIONSHIP:return At(e,t,r);case Me.PATH:return function(e,t,r){const n=e.entity_count(),i=e.relationship_count(),o=[];for(let s=0;s<n;s++)o.push(vt(e.get_entity_at(s),t,r)),s<i&&o.push(At(e.get_relationship_at(s),t,r));return new ht.A({path:o})}(e,t,r);case Me.ARRAY:return function(e,t,r){const n=[],i=e.count();for(let o=0;o<i;o++){const i=e.get_value_at(o);n.push(wt(i,t,r))}return n}(e,t,r);default:return _t().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function vt(e,t,r){const n=e.type_name,i=Tt(e,t,r),o=e.get_id();return new ct.A(Object.assign({typeName:n,id:o},i))}function Tt(e,t,r){const n={},i=e.key_count();for(let o=0;o<i;o++)n[e.get_key_at(o)]=wt(e.get_value_at(o),t,r);return{properties:n}}function At(e,t,r){const n=e.type_name,i=Tt(e,t,r);return new ft.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},i))}function bt(e){const t=[];for(let r=0;r<e.get_header_keys().size();r++)t.push(e.get_header_keys().get(r));const r=new u.A(e.get_out_sr());return new W({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let Mt=class extends c.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.editResults=[]}};(0,p._)([(0,y.MZ)()],Mt.prototype,"hasError",void 0),(0,p._)([(0,y.MZ)()],Mt.prototype,"error",void 0),(0,p._)([(0,y.MZ)()],Mt.prototype,"editResults",void 0),Mt=(0,p._)([(0,f.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],Mt);const St=Mt,Rt=new Map,Pt=()=>new Map(Rt.entries()),Gt={fetchKnowledgeGraph:async e=>{const t=new ve({url:e}),r=[];return r.push(Zt(t)),r.push(Ut(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await tr(e)},refreshServiceDefinition:async e=>{const t=(await(0,o.A)(e.url,{query:{f:"json"}})).data;return t.capabilities=t?.capabilities?.split(","),t.supportedQueryFormats=t?.supportedQueryFormats?.split(","),e.serviceDefinition=new _e(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const n=r[0];return await $t(`${n}/rest/services/System/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`,{in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:e.config.toJSON(),result_type:"STRING"},{},t)},executeFindPaths:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new s.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /reset/services/");const n=r[0],i=await Bt(`${n}/rest/services/System/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,{method:"post",query:{f:"pjson",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(i.data.results.length<1)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",i);let o;for(const e of i.data.results)if("out_results_string"===e.paramName){o=e.value;break}if(!o)throw new s.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",i);return o},fetchAsynchronousFindPathsResultData:async(e,t)=>(await e.fetchResultData("out_results_string",null,t)).value,executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await Vt(e);const i=await Ht(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new s.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");i.data.body=await async function(e,t){const r=await(0,Pe.I)(),n=new r.GraphQueryRequestEncoder;if(n.deleteLater(),e.outputSpatialReference?n.output_spatial_reference={wkid:e.outputSpatialReference.wkid,latestWkid:e.outputSpatialReference.latestWkid,vcsWkid:e.outputSpatialReference.vcsWkid,latestVcsWkid:e.outputSpatialReference.latestVcsWkid,wkt:e.outputSpatialReference.wkt??""}:n.output_spatial_reference=r.SpatialReferenceUtil.WGS84(),n.open_cypher_query=e.openCypherQuery,e.bindParameters)for(const[t,i]of Object.entries(e.bindParameters))Yt(t,i,n,r);if(e.bindGeometryQuantizationParameters)!function(e,t){t.input_quantization_parameters={xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.bindGeometryQuantizationParameters,n);else{if(t.dataModel||await Zt(t),4326!==t.dataModel?.spatialReference?.wkid)throw new s.A("knowledge-graph:SR-quantization-mismatch","If the DataModel indicates a coordinate system other than WGS84, inputQuantizationParameters must be provided to the query encoder");n.input_quantization_parameters=r.InputQuantizationUtil.WGS84_lossless()}e.outputQuantizationParameters&&function(e,t,r){if(!e.extent)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization provided to the encoder had an illegal value as part of its extent",e.extent);if(!e.quantizeMode)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new s.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal tolerance setting",e.quantizeMode);t.output_quantization_parameters={extent:{xmax:e.extent.xmax,ymax:e.extent.ymax,xmin:e.extent.xmin,ymin:e.extent.ymin},quantize_mode:r.esriQuantizeMode[e.quantizeMode],tolerance:e.tolerance}}(e.outputQuantizationParameters,n,r),e.provenanceBehavior&&function(e,t){t.provenance_behavior={value:Re[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const i=n.get_encoding_result();if(0!==i.error.error_code)throw new s.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:i.error.error_code,errorMessage:i.error.error_message});return structuredClone(i.get_byte_buffer())}(t,e);const o=await Kt(i.data.url,i.data);if(e.dataModel){const t=await er(o,e.dataModel);return new re({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported)throw new s.A("knowledge-graph:data-editing-not-supported","The Knowledge Graph Service definition indicated that data editing is not supported");const n=`${e.url}/graph/applyEdits`;await Vt(e);const i=await Ht(n,r);return i.data.body=await async function(e,t){if(t.dataModel||await Zt(t),!t.dataModel)throw new s.A("knowledge-graph:data-model-undefined","Encoding could not proceed because a data model was not provided and it could not be determined from the service");const r=await(0,Pe.I)(),n=!!e.options?.cascadeDelete,i=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());i.deleteLater(),i.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=i.add_entity(qe(e,r)),Te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipAdds?.forEach((e=>{if(!e.originId||!e.destinationId)throw new s.A("knowledge-graph:relationship-origin-destination-missing","When adding a new relationship, you must provide both an origin and destination id on the appropriate class property");t=i.add_relationship(qe(e,r)),Te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_entity(qe(e,r)),Te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - an entity failed to be added to the encoder")})),e.relationshipUpdates?.forEach((e=>{if(!e.id)throw new s.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=i.update_relationship(qe(e,r)),Te(t,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits - a relationship failed to be added to the encoder")})),e.entityDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!0);t.deleteLater(),e.ids?.forEach((e=>{t.delete_by_id(e)}))})),e.relationshipDeletes?.forEach((e=>{if(!e.typeName)throw new s.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=i.make_delete_helper(e.typeName,!1);e.ids?.forEach((e=>{t.delete_by_id(e)}))})),i.encode()}catch(e){throw new s.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const o=i.get_encoding_result();return Te(o.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(o.get_byte_buffer())}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,Pe.I)()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.has_error(),r=new St({hasError:t,error:t?{errorCode:e.error.error_code,errorMessage:e.error.error_message}:null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t),i=e.get_edit_results_type_name_at(t),o=[],s=[],a=[],l=n.get_add_results_count(),d=n.get_update_results_count(),u=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);o.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=n.get_update_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<u;e++){const t=n.get_delete_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}r.editResults.push({typeName:i,adds:o,updates:s,deletes:a})}return r}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await Kt(i.data.url,i.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new s.A("knowledge-graph:no-arguments","The operation to add types to the data model contained no values");const n=`${e.url}/dataModel/edit/namedTypes/add`;await Vt(e);const i=await Ht(n,r);i.data.body=await async function(e){const t=await(0,Pe.I)(),r=new t.GraphNamedObjectTypeAddsRequestEncoder;r.deleteLater(),e.newEntityTypes?.forEach((e=>{r.add_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),ze(e,t,r)}(e,t))})),e.newRelationshipTypes?.forEach((e=>{r.add_relationship_type(function(e,t){const r=new t.RelationshipType;r.deleteLater();for(const n of e.endPoints){const e=new t.EndPoint;e.deleteLater(),e.origin_entity_type=n.originEntityType,e.dest_entity_type=n.destinationEntityType,r.add_end_point(e)}return ze(e,t,r)}(e,t))}));try{r.encode()}catch(e){throw new s.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const n=r.get_encoding_result();return Te(n.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(n.get_byte_buffer())}(t);const o=await Kt(i.data.url,i.data),a=await async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,Pe.I)()).GraphNamedObjectTypeAddsResponseDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.get_entity_type_add_results_count(),r=e.get_relationship_type_add_results_count(),n=new $e({decoderError:Ae(e.error),entityAddResultsCount:t,relationshipAddResultsCount:r});for(let r=0;r<t;r++){const t=e.get_entity_type_add_results_at(r),i=t.get_name(),o=t.get_error();n.entityAddResults.push({typeName:i,error:Ae(o)})}for(let t=0;t<r;t++){const r=e.get_relationship_type_add_results_at(t),i=r.get_name(),o=r.get_error();n.relationshipAddResults.push({typeName:i,error:Ae(o)})}return n}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(o);return a.updatedKnowledgeGraph=await Ft(e.url),a},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new s.A("knowledge-graph:no-arguments","The operation to delete a named type from the data model contained no value");const n=`${e.url}/dataModel/edit/namedTypes/${t}/delete`;await Vt(e);const i=await Ht(n,r);i.data.body="";const o=await Kt(i.data.url,i.data),a=await async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,Pe.I)()).GraphNamedObjectTypeDeleteResponseDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){return new Ve({decoderError:Ae(e.error)})}(r)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(o);return a.updatedKnowledgeGraph=await Ft(e.url),a},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,i=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),a=i.getHeader?.("content-type"),l=i.data;if(a?.includes("application/x-protobuf")){const t=new((await(0,Pe.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=Xt({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new ee({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:i.data})},executeSearch:async(e,t,r)=>{const n=t.typeCategoryFilter,i=`${e.url}/graph/search`,a=await(0,o.A)(i,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=a.getHeader?.("content-type"),d=a.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,Pe.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=Xt({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new ee({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:a.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await Vt(e);const i=await Ht(n,r);i.data.body=await async function(e){const t=await(0,Pe.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter(De(e.idsFilter,t))}catch(e){throw new s.A("knowledge-graph:ids-format-error","Attempting to set ids filter failed. This is usually caused by an incorrectly formatted UUID string",{error:e})}e.namedTypesFilter?.forEach((e=>{r.add_named_type_filter(e)}));try{r.encode()}catch(e){throw new s.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const n=r.get_encoding_result();if(0!==n.error.error_code)throw new s.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t);const o=await Kt(i.data.url,i.data);if(e.dataModel){const t=await er(o,e.dataModel);return new re({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new s.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},fetchClientDataAtKeys:async(e,t,r={ignoreCache:!1})=>{if(!t.length)return new Map;let n=Rt.get(e.url||"");n||(n=new Map,Rt.set(e.url||"",n));const i=new Map(n.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const a=await(0,Pe.I)(),l=function(e,t,r,n=!1){const i=new r.ClientDataFetchRequestEncoder;i.deleteLater();for(const o of e){const e=be(o,t,r,n);i.add_client_data_fetch_request_parameter(e)}i.encode();const o=i.get_encoding_result();return Te(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}(t,n,a,r.ignoreCache),d=await Ht(o,r.requestOptions);d.data.body=l;const u=await Kt(d.data.url,d.data),p=u.headers.get("content-type");if(p?.includes("application/x-protobuf")){const e=new a.ClientDataFetchResponseDecoder;e.deleteLater();const t=await u.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&Te(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const i=new Map;for(let o=0;o<e.get_results_count();o++){const s=e.get_result_at(o);if(s.get_fetch_result_case().value!==Ze.ClientDataValue||0!==s.error().error_code){const e=s.get_key().key_string;r.has(e)&&t.delete(e);continue}const a=s.get_value(),l=s.get_key().key_string,d=r.get(l);let u;if(a.get_data_case().value===Fe.NotModified&&d)u=d.value;else{if(a.get_data_case().value!==Fe.ClientData)continue;{u=a.get_data().client_data_string;const e=s.get_value().get_v_tag().v_tag;n||t.set(l,{key:l,version:e,value:u})}}i.set(l,u)}return i}(e,n,i,r.ignoreCache)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:p,data:u})},fetchAllClientDataKeys:async(e,t)=>{const r=`${e.url}/clientData`,n=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf"},signal:t?.signal,timeout:t?.timeout}),i=n.getHeader?.("content-type"),a=n.data;if(i?.includes("application/x-protobuf")){const e=new((await(0,Pe.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(a)),e.has_error()&&Te(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);n.get_client_data_key_type().value===je.ClientDataKeyTypeString&&r.push(n.key_string)}return r}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:i,data:n.data})},clearClientDataCache:()=>Rt.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=_.from(r||{}),async function(e,t,r,n,i){const s={},a={},l=[];return function(e,t,r){for(const n in e){const i=e[n];if(i&&"object"==typeof i&&i instanceof k.A){const{features:e}=i;r[n]=[t.length,t.length+e.length],e.forEach((e=>{t.push(e.geometry)}))}}}(n,l,s),(0,w.el)(l).then((l=>{const{outSpatialReference:d,processExtent:u,processSpatialReference:p,returnColumnName:c,returnFeatureCollection:y,returnM:h,returnZ:f}=r,{path:m}=(0,M.Dl)(e);for(const e in s){const[t,r]=s[e];a[e]=l.slice(t,r)}const g=d?d.wkid||d:null,_=p?p.wkid||p:null,w="execute"===t?{returnColumnName:c||void 0,returnFeatureCollection:y||void 0,returnM:h||void 0,returnZ:f||void 0}:null,v=J({...u?{context:{extent:u,outSR:g,processSR:_}}:{"env:outSR":g,"env:processSR":_},...n,...w,f:"json"},null,a),T={...i,query:v};return(0,o.A)(`${m}/${t}`,T)}))}(e,"submitJob",r,t??{},n).then((({data:t})=>{const r=H.fromJSON(t);return r.sourceUrl=e,r}))}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function Et(e,t,r){return Gt.executeApplyEdits(e,t,r)}async function Nt(e,t,r){return Gt.executeAddNamedTypes(e,t,r)}async function kt(e,t,r){return Gt.executeDeleteNamedType(e,t,r)}async function Dt(e,t,r){return Gt.executeQuery(e,t,r)}async function It(e,t,r){return Gt.executeQueryStreaming(e,t,r)}async function xt(e,t,r){return Gt.executeSearch(e,t,r)}async function Ot(e,t,r){return Gt.executeSearchStreaming(e,t,r)}function jt(e,t){return Gt.fetchAllClientDataKeys(e,t)}function Ct(e,t,r){return Gt.fetchClientDataAtKeys(e,t,r)}async function Ft(e){return Gt.fetchKnowledgeGraph(e)}async function Zt(e){return Gt.refreshDataModel(e)}async function Ut(e){return Gt.refreshServiceDefinition(e)}async function qt(e,t){return Gt.executeFindPathsAsynchronous(e,t)}async function Lt(e,t){return Gt.executeFindPaths(e,t)}async function zt(e,t){return Gt.fetchAsynchronousFindPathsResultData(e,t)}function Jt(){return Gt.clearClientDataCache()}async function Kt(e,t){return Gt._fetchWrapper(e,t)}async function $t(e,t,r,n){return Gt._submitJobWrapper(e,t,r,n)}async function Bt(e,t){return Gt._esriRequestWrapper(e,t)}async function Vt(e){const t=i.id?.findCredential(e.url);t||(e.dataModel?await tr(e):await Zt(e))}function Yt(e,t,r,n){null==t?r.set_param_key_value(e,""):"object"!=typeof t||t instanceof Date?r.set_param_key_value(e,t):t instanceof d.A?r.set_param_key_value(e,xe(t,n)):Array.isArray(t)?r.set_param_key_value(e,De(t,n)):r.set_param_key_value(e,Ie(t,n))}async function Ht(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}let Qt=50;function Wt(e){Qt=e}function Xt({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:i=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let a,l,d=0;const p=Date.now();let c=!0;for(;e.next_row();){a&&l||(a=n??bt(e),l=a.outSpatialReference??new u.A({wkid:4326})),d||(d=e.get_header_keys().size());const t=new Array(d);for(let n=0;n<d;n++){const i=e.get_value(n);t[n]=wt(i,r,l)}if(o.push(t),i&&Date.now()-p>Qt){c=!1;break}}if(e.has_error())throw new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - inner row decoding",{errorCode:e.error.error_code,errorMessage:e.error.error_message});return{resultHeader:a,resultRows:o,parsedAllResultsFromBuffer:c}}async function er(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,Pe.I)()).GraphQueryDecoder);let i,o,d;n.deleteLater();const u=new Promise(((e,t)=>{o=e,d=t}));let p=!1,c=null;const y=new ReadableStream({pull:async function e(u){if(!r){const e=new s.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw d(e),e}const{done:y,value:h}=c?{done:!1,value:null}:await r.read().catch((e=>{throw d(e),r.releaseLock(),e}));h&&(c=h);try{if(y){let e;if(n.has_error()?e=new s.A("knowledge-graph:stream-decoding-error","One or more result rows were not successfully decoded - query stream done",{errorCode:n.error.error_code,errorMessage:n.error.error_message}):p||o(new W),r.releaseLock(),e)throw u.error(e),d(e),e;return void u.close()}const{resultHeader:a,resultRows:l,parsedAllResultsFromBuffer:f}=Xt({wasmQueryDecoder:n,newArrayBufferToParse:h,dataModel:t,decodedHeader:i,limitMaxProcessingTime:!0});return f&&(c=null),!i&&a&&(i=a,o(a),p=!0),l.length>0?void u.enqueue(l):await e(u)}catch(e){throw a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),d(e),r.releaseLock(),(0,l.zf)(e)?e:new s.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await u}}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function tr(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),i=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,Pe.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(i));if(!e)throw new s.A("knowledge-graph:data-model-decode-failure","The server responded to the data model query, but the response failed to be decoded. This typically occurs when the Knowledge JS API (4.26 or later) is used with an unsupported backend (11.0 or earlier)");return function(e){e.deleteLater(),Qe=!1;const t=new me({timestamp:e.timestamp,spatialReference:new u.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:Ue.vy[e.identifier_info?.identifier_mapping_info?.identifier_info_type?.value],databaseNativeIdentifier:e.identifier_info?.identifier_mapping_info?.database_native_identifier,uniformPropertyIdentifier:{identifierPropertyName:e.identifier_info?.identifier_mapping_info?.uniform_property_identifier?.identifier_property_name}},identifierGenerationInfo:{uuidMethodHint:Ue.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:ut(e.search_indexes),entityTypes:it(e.entity_types),relationshipTypes:lt(e.relationship_types),metaEntityTypes:it(e.meta_entity_types),provenanceSourceTypeValues:dt(e.provenance_source_type_values.value_behavior_array)});return Qe&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new s.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9695],{13069:(t,e,n)=>{n.d(e,{AG:()=>a,lk:()=>o,vD:()=>i,yS:()=>s});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function s(){return`{${o().toUpperCase()}}`}function i(){return`{${o()}}`}function a(t){const e=t.toUpperCase();return"{"!==t[0]?`{${e}}`:e}},24212:(t,e,n)=>{function r(t,e){return function(t,e){return e?.mode?e.mode:function(t){return t?l:u}(t).mode}(null==t||(t.hasZ??!1),e)}function o(t,e,n){return n&&n.mode!==e?`${t} only support ${e} elevation mode`:null}function s(t,e,n){return n?.mode===e?`${t} do not support ${e} elevation mode`:null}function i(t,e){return null!=e?.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function a(t,e){e&&t.warn(".elevationInfo=",e)}n.d(e,{$7:()=>s,B:()=>o,XF:()=>a,tW:()=>i,w7:()=>r}),n(83047),n(16271);const l={mode:"absolute-height",offset:0},u={mode:"on-the-ground",offset:null}},49695:(t,e,n)=>{n.r(e),n.d(e,{default:()=>C});var r=n(90237),o=n(79608),s=n(65176),i=n(69622),a=n(69540),l=n(25482),u=n(97768),p=n(10107),c=(n(44208),n(53966),n(87811),n(40608)),d=n(87024),f=n(86738),y=n(88625);let h=class extends(l.A.JSONSupportMixin(a.A.ClonableMixin(i.A))){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r._)([(0,p.MZ)({type:f.A,json:{write:{isRequired:!0}}})],h.prototype,"position",void 0),(0,r._)([(0,p.MZ)({type:y.A}),(0,d.P)()],h.prototype,"elevationInfo",void 0),(0,r._)([(0,p.MZ)(s.N1)],h.prototype,"feature",void 0),h=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysisObserver")],h);const g=h;let v=class extends(l.A.JSONSupportMixin(a.A)){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r._)([(0,p.MZ)({type:f.A,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,d.P)()],v.prototype,"position",void 0),(0,r._)([(0,p.MZ)({type:y.A}),(0,d.P)()],v.prototype,"elevationInfo",void 0),(0,r._)([(0,p.MZ)(s.N1)],v.prototype,"feature",void 0),v=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysisTarget")],v);const m=v;var w=n(5503),x=n(62885),b=n(36708),A=n(80586),j=n(70328),M=n(24212);const _=w.A.ofType(m);let I=class extends o.A{constructor(t){super(t),this.type="line-of-sight",this.observer=null,this.extent=null}initialize(){this.addHandles((0,b.wB)((()=>this._computeExtent()),(t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)}),b.pc))}get targets(){return this._get("targets")||new _}set targets(t){this._set("targets",(0,x.V)(t,this.targets,_))}get spatialReference(){return null!=this.observer?.position?this.observer.position.spatialReference:null}get valid(){return null!=this.observer?.position}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==this.observer?.position||null==t)return null;const e=t=>"absolute-height"===(0,M.w7)(t.position,t.elevationInfo),n=this.observer.position,r=(0,j.fA)(n.x,n.y,n.z,n.x,n.y,n.z);for(const e of this.targets)if(null!=e.position){const n=(0,A.projectOrLoad)(e.position,t);if(null!=n.pending)return{pending:n.pending,extent:null};if(null!=n.geometry){const{x:t,y:e,z:o}=n.geometry;(0,j.iT)(r,[t,e,o])}}const o=(0,j.w1)(r,t);return e(this.observer)&&this.targets.every(e)||(o.zmin=void 0,o.zmax=void 0),{pending:null,extent:o}}clear(){this.observer=null,this.targets.removeAll()}};(0,r._)([(0,p.MZ)({type:["line-of-sight"]})],I.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:g,json:{read:!0,write:!0}})],I.prototype,"observer",void 0),(0,r._)([(0,p.MZ)({cast:x.H,type:_,nonNullable:!0,json:{read:!0,write:!0}})],I.prototype,"targets",null),(0,r._)([(0,p.MZ)({value:null,readOnly:!0})],I.prototype,"extent",void 0),(0,r._)([(0,p.MZ)()],I.prototype,"spatialReference",null),(0,r._)([(0,p.MZ)({readOnly:!0})],I.prototype,"valid",null),I=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysis")],I);const O=I;var R=n(92071),Z=n(4146),S=n(16131);const U=w.A.ofType(m);let $=class extends((0,S.q)((0,R.P)(Z.A))){constructor(t){super(t),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new O,this.opacity=1}initialize(){this.addHandles((0,b.wB)((()=>this.analysis),((t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)}),b.pc))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return this.analysis?.observer}set observer(t){const{analysis:e}=this;e&&(e.observer=t)}get targets(){return null!=this.analysis?this.analysis.targets:new w.A}set targets(t){(0,x.V)(t,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(t){this.analysis===t&&(this.analysis=new O)}};(0,r._)([(0,p.MZ)({json:{read:!1},readOnly:!0})],$.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:["LineOfSightLayer"]})],$.prototype,"operationalLayerType",void 0),(0,r._)([(0,p.MZ)({type:g,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],$.prototype,"observer",null),(0,r._)([(0,p.MZ)({type:U,json:{read:!0,write:{ignoreOrigin:!0,isRequired:!0}}})],$.prototype,"targets",null),(0,r._)([(0,p.MZ)({type:O,nonNullable:!0,json:{read:!1,write:!1}})],$.prototype,"analysis",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],$.prototype,"fullExtent",null),(0,r._)([(0,p.MZ)({readOnly:!0})],$.prototype,"spatialReference",null),(0,r._)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],$.prototype,"opacity",void 0),(0,r._)([(0,p.MZ)({type:["show","hide"]})],$.prototype,"listMode",void 0),$=(0,r._)([(0,c.$)("esri.layers.LineOfSightLayer")],$);const C=$},76553:(t,e,n)=>{function r(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{H:()=>r})},80200:(t,e,n)=>{n.d(e,{T:()=>r,d:()=>h});const r={Base64:0,Hex:1,String:2,Raw:3},o=8,s=(1<<o)-1;function i(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function a(t){const e=[];for(let n=0,r=t.length*o;n<r;n+=o)e[n>>5]|=(t.charCodeAt(n/o)&s)<<n%32;return e}function l(t){const e=[];for(let n=0,r=32*t.length;n<r;n+=o)e.push(String.fromCharCode(t[n>>5]>>>n%32&s));return e.join("")}function u(t,e,n,r,o,s){return i(function(t,e){return t<<e|t>>>32-e}(i(i(e,t),i(r,s)),o),n)}function p(t,e,n,r,o,s,i){return u(e&n|~e&r,t,e,o,s,i)}function c(t,e,n,r,o,s,i){return u(e&r|n&~r,t,e,o,s,i)}function d(t,e,n,r,o,s,i){return u(e^n^r,t,e,o,s,i)}function f(t,e,n,r,o,s,i){return u(n^(e|~r),t,e,o,s,i)}function y(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;let n=1732584193,r=-271733879,o=-1732584194,s=271733878;for(let e=0;e<t.length;e+=16){const a=n,l=r,u=o,y=s;n=p(n,r,o,s,t[e],7,-680876936),s=p(s,n,r,o,t[e+1],12,-389564586),o=p(o,s,n,r,t[e+2],17,606105819),r=p(r,o,s,n,t[e+3],22,-1044525330),n=p(n,r,o,s,t[e+4],7,-176418897),s=p(s,n,r,o,t[e+5],12,1200080426),o=p(o,s,n,r,t[e+6],17,-1473231341),r=p(r,o,s,n,t[e+7],22,-45705983),n=p(n,r,o,s,t[e+8],7,1770035416),s=p(s,n,r,o,t[e+9],12,-1958414417),o=p(o,s,n,r,t[e+10],17,-42063),r=p(r,o,s,n,t[e+11],22,-1990404162),n=p(n,r,o,s,t[e+12],7,1804603682),s=p(s,n,r,o,t[e+13],12,-40341101),o=p(o,s,n,r,t[e+14],17,-1502002290),r=p(r,o,s,n,t[e+15],22,1236535329),n=c(n,r,o,s,t[e+1],5,-165796510),s=c(s,n,r,o,t[e+6],9,-1069501632),o=c(o,s,n,r,t[e+11],14,643717713),r=c(r,o,s,n,t[e],20,-373897302),n=c(n,r,o,s,t[e+5],5,-701558691),s=c(s,n,r,o,t[e+10],9,38016083),o=c(o,s,n,r,t[e+15],14,-660478335),r=c(r,o,s,n,t[e+4],20,-405537848),n=c(n,r,o,s,t[e+9],5,568446438),s=c(s,n,r,o,t[e+14],9,-1019803690),o=c(o,s,n,r,t[e+3],14,-187363961),r=c(r,o,s,n,t[e+8],20,1163531501),n=c(n,r,o,s,t[e+13],5,-1444681467),s=c(s,n,r,o,t[e+2],9,-51403784),o=c(o,s,n,r,t[e+7],14,1735328473),r=c(r,o,s,n,t[e+12],20,-1926607734),n=d(n,r,o,s,t[e+5],4,-378558),s=d(s,n,r,o,t[e+8],11,-2022574463),o=d(o,s,n,r,t[e+11],16,1839030562),r=d(r,o,s,n,t[e+14],23,-35309556),n=d(n,r,o,s,t[e+1],4,-1530992060),s=d(s,n,r,o,t[e+4],11,1272893353),o=d(o,s,n,r,t[e+7],16,-155497632),r=d(r,o,s,n,t[e+10],23,-1094730640),n=d(n,r,o,s,t[e+13],4,681279174),s=d(s,n,r,o,t[e],11,-358537222),o=d(o,s,n,r,t[e+3],16,-722521979),r=d(r,o,s,n,t[e+6],23,76029189),n=d(n,r,o,s,t[e+9],4,-640364487),s=d(s,n,r,o,t[e+12],11,-421815835),o=d(o,s,n,r,t[e+15],16,530742520),r=d(r,o,s,n,t[e+2],23,-995338651),n=f(n,r,o,s,t[e],6,-198630844),s=f(s,n,r,o,t[e+7],10,1126891415),o=f(o,s,n,r,t[e+14],15,-1416354905),r=f(r,o,s,n,t[e+5],21,-57434055),n=f(n,r,o,s,t[e+12],6,1700485571),s=f(s,n,r,o,t[e+3],10,-1894986606),o=f(o,s,n,r,t[e+10],15,-1051523),r=f(r,o,s,n,t[e+1],21,-2054922799),n=f(n,r,o,s,t[e+8],6,1873313359),s=f(s,n,r,o,t[e+15],10,-30611744),o=f(o,s,n,r,t[e+6],15,-1560198380),r=f(r,o,s,n,t[e+13],21,1309151649),n=f(n,r,o,s,t[e+4],6,-145523070),s=f(s,n,r,o,t[e+11],10,-1120210379),o=f(o,s,n,r,t[e+2],15,718787259),r=f(r,o,s,n,t[e+9],21,-343485551),n=i(n,a),r=i(r,l),o=i(o,u),s=i(s,y)}return[n,r,o,s]}function h(t,e=r.Hex){const n=e||r.Base64,s=y(a(t),t.length*o);switch(n){case r.Raw:return s;case r.Hex:return function(t){const e="0123456789abcdef",n=[];for(let r=0,o=4*t.length;r<o;r++)n.push(e.charAt(t[r>>2]>>r%4*8+4&15)+e.charAt(t[r>>2]>>r%4*8&15));return n.join("")}(s);case r.String:return l(s);case r.Base64:return function(t){const e=[];for(let n=0,r=4*t.length;n<r;n+=3){const r=(t[n>>2]>>n%4*8&255)<<16|(t[n+1>>2]>>(n+1)%4*8&255)<<8|t[n+2>>2]>>(n+2)%4*8&255;for(let o=0;o<4;o++)8*n+6*o>32*t.length?e.push("="):e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-o)&63))}return e.join("")}(s)}}},85648:(t,e,n)=>{n.d(e,{n:()=>o});var r=n(84952);function o(t){return s[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,r.Zo)(t);return l[e]||i}(t.url)}(t)]||a}const s={},i="text/plain",a=s[i],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)s[l[t]]=t},87024:(t,e,n)=>{n.d(e,{P:()=>f});var r=n(49186),o=n(80200),s=n(76553),i=n(84952),a=n(13069),l=n(96156),u=n(35666),p=n(10107),c=n(85648),d=n(97159);function f(t){const e=t?.origins??[void 0];return(n,r)=>{const o=function(t,e,n){if("resource"===t?.type)return function(t,e,n){const r=(0,l.z4)(e,n);return{type:String,read:(t,e,n)=>{const o=(0,d.r)(t,e,n);return r.type===String?o:"function"==typeof r.type?new r.type({url:o}):void 0},write:{isRequired:r.json?.write?.isRequired,writer(e,o,a,l){if(!l?.resources)return"string"==typeof e?void(o[a]=(0,d.t)(e,l)):void(o[a]=e.write({},l));const p=function(t){return null==t?null:"string"==typeof t?t:t.url}(e),f=(0,d.t)(p,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),v=r.type!==String&&(!(0,s.H)(this)||l?.origin&&this.originIdOf(n)>(0,u.aB)(l.origin)),m={object:this,propertyName:n,value:e,targetUrl:f,dest:o,targetPropertyName:a,context:l,params:t};l?.portalItem&&f&&!(0,i.oP)(f)?v&&t?.contentAddressed?y(m):v?function(t){const{context:e,targetUrl:n,params:r,value:o,dest:s,targetPropertyName:a}=t;if(!e.portalItem)return;const l=e.portalItem.resourceFromPath(n),u=g(o,n,e),p=(0,c.n)(u),d=(0,i.Zo)(l.path),f=r?.compress??!1;p===d?(e.resources&&h({...t,resource:l,content:u,compress:f,updates:e.resources.toUpdate}),s[a]=n):y(t)}(m):function({context:t,targetUrl:e,dest:n,targetPropertyName:r}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(e),compress:!1}),n[r]=e)}(m):l?.portalItem&&(null==f||null!=(0,d.i)(f)||(0,i.w8)(f)||v)?y(m):o[a]=f}}}}(t,e,n);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:t,write:e}=d.b;return{read:t,write:e}}}}(t,n,r);for(const t of e){const e=(0,p.rM)(n,t,r);for(const t in o)e[t]=o[t]}}}function y(t){const{targetUrl:e,params:n,value:s,context:l,dest:u,targetPropertyName:p}=t;if(!l.portalItem)return;const f=(0,d.p)(e),y=g(s,e,l);if(n?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new r.A("persistable:contentAddressingUnsupported",`Property "${p}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const v=n?.contentAddressed&&"json"===y.type?(0,o.d)(y.jsonString):f?.filename??(0,a.lk)(),m=(0,i.fj)(n?.prefix??f?.prefix,v),w=`${m}.${(0,c.n)(y)}`;if(n?.contentAddressed&&l.resources&&"json"===y.type){const t=l.resources.toKeep.find((({resource:t})=>t.path===w))??l.resources.toAdd.find((({resource:t})=>t.path===w));if(t)return void(u[p]=t.resource.itemRelativeUrl)}const x=l.portalItem.resourceFromPath(w);(0,i.w8)(e)&&l.resources&&l.resources.pendingOperations.push((0,i.tk)(e).then((t=>{x.path=`${m}.${(0,c.n)({type:"blob",blob:t})}`,u[p]=x.itemRelativeUrl})).catch((()=>{})));const b=n?.compress??!1;l.resources&&h({...t,resource:x,content:y,compress:b,updates:l.resources.toAdd}),u[p]=x.itemRelativeUrl}function h({object:t,propertyName:e,updates:n,resource:r,content:o,compress:s}){n.push({resource:r,content:o,compress:s,finish:n=>{!function(t,e,n){"string"==typeof t[e]?t[e]=n.url:t[e].url=n.url}(t,e,n)}})}function g(t,e,n){return"string"==typeof t?{type:"url",url:e}:{type:"json",jsonString:JSON.stringify(t.toJSON(n))}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9695],{13069:(t,e,n)=>{n.d(e,{AG:()=>a,lk:()=>o,vD:()=>i,yS:()=>s});const r="randomUUID"in crypto;function o(){if(r)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function s(){return`{${o().toUpperCase()}}`}function i(){return`{${o()}}`}function a(t){const e=t.toUpperCase();return"{"!==t[0]?`{${e}}`:e}},24212:(t,e,n)=>{function r(t,e){return function(t,e){return e?.mode?e.mode:function(t){return t?l:u}(t).mode}(null==t||(t.hasZ??!1),e)}function o(t,e,n){return n&&n.mode!==e?`${t} only support ${e} elevation mode`:null}function s(t,e,n){return n?.mode===e?`${t} do not support ${e} elevation mode`:null}function i(t,e){return null!=e?.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression?`${t} do not support featureExpressionInfo`:null}function a(t,e){e&&t.warn(".elevationInfo=",e)}n.d(e,{$7:()=>s,B:()=>o,XF:()=>a,tW:()=>i,w7:()=>r}),n(83047),n(16271);const l={mode:"absolute-height",offset:0},u={mode:"on-the-ground",offset:null}},49695:(t,e,n)=>{n.r(e),n.d(e,{default:()=>C});var r=n(90237),o=n(79608),s=n(44612),i=n(69622),a=n(69540),l=n(25482),u=n(97768),p=n(10107),c=(n(44208),n(53966),n(87811),n(40608)),d=n(87024),f=n(86738),y=n(88625);let h=class extends(l.A.JSONSupportMixin(a.A.ClonableMixin(i.A))){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r._)([(0,p.MZ)({type:f.A,json:{write:{isRequired:!0}}})],h.prototype,"position",void 0),(0,r._)([(0,p.MZ)({type:y.A}),(0,d.P)()],h.prototype,"elevationInfo",void 0),(0,r._)([(0,p.MZ)(s.N1)],h.prototype,"feature",void 0),h=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysisObserver")],h);const g=h;let v=class extends(l.A.JSONSupportMixin(a.A)){constructor(t){super(t),this.position=null,this.elevationInfo=null,this.feature=null}equals(t){return(0,u.CM)(this.position,t.position)&&(0,u.CM)(this.elevationInfo,t.elevationInfo)&&(0,s.xH)(this.feature,t.feature)}};(0,r._)([(0,p.MZ)({type:f.A,json:{write:!0,origins:{"web-scene":{write:{isRequired:!0}}}}}),(0,d.P)()],v.prototype,"position",void 0),(0,r._)([(0,p.MZ)({type:y.A}),(0,d.P)()],v.prototype,"elevationInfo",void 0),(0,r._)([(0,p.MZ)(s.N1)],v.prototype,"feature",void 0),v=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysisTarget")],v);const m=v;var w=n(5503),x=n(62885),b=n(36708),A=n(80586),j=n(70328),M=n(24212);const _=w.A.ofType(m);let I=class extends o.A{constructor(t){super(t),this.type="line-of-sight",this.observer=null,this.extent=null}initialize(){this.addHandles((0,b.wB)((()=>this._computeExtent()),(t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)}),b.pc))}get targets(){return this._get("targets")||new _}set targets(t){this._set("targets",(0,x.V)(t,this.targets,_))}get spatialReference(){return null!=this.observer?.position?this.observer.position.spatialReference:null}get valid(){return null!=this.observer?.position}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==this.observer?.position||null==t)return null;const e=t=>"absolute-height"===(0,M.w7)(t.position,t.elevationInfo),n=this.observer.position,r=(0,j.fA)(n.x,n.y,n.z,n.x,n.y,n.z);for(const e of this.targets)if(null!=e.position){const n=(0,A.projectOrLoad)(e.position,t);if(null!=n.pending)return{pending:n.pending,extent:null};if(null!=n.geometry){const{x:t,y:e,z:o}=n.geometry;(0,j.iT)(r,[t,e,o])}}const o=(0,j.w1)(r,t);return e(this.observer)&&this.targets.every(e)||(o.zmin=void 0,o.zmax=void 0),{pending:null,extent:o}}clear(){this.observer=null,this.targets.removeAll()}};(0,r._)([(0,p.MZ)({type:["line-of-sight"]})],I.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:g,json:{read:!0,write:!0}})],I.prototype,"observer",void 0),(0,r._)([(0,p.MZ)({cast:x.H,type:_,nonNullable:!0,json:{read:!0,write:!0}})],I.prototype,"targets",null),(0,r._)([(0,p.MZ)({value:null,readOnly:!0})],I.prototype,"extent",void 0),(0,r._)([(0,p.MZ)()],I.prototype,"spatialReference",null),(0,r._)([(0,p.MZ)({readOnly:!0})],I.prototype,"valid",null),I=(0,r._)([(0,c.$)("esri.analysis.LineOfSightAnalysis")],I);const O=I;var R=n(92071),Z=n(4146),S=n(16131);const U=w.A.ofType(m);let $=class extends((0,S.q)((0,R.P)(Z.A))){constructor(t){super(t),this.type="line-of-sight",this.operationalLayerType="LineOfSightLayer",this.analysis=new O,this.opacity=1}initialize(){this.addHandles((0,b.wB)((()=>this.analysis),((t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)}),b.pc))}async load(){return null!=this.analysis&&this.addResolvingPromise(this.analysis.waitComputeExtent()),this}get observer(){return this.analysis?.observer}set observer(t){const{analysis:e}=this;e&&(e.observer=t)}get targets(){return null!=this.analysis?this.analysis.targets:new w.A}set targets(t){(0,x.V)(t,this.analysis?.targets)}get fullExtent(){return null!=this.analysis?this.analysis.extent:null}get spatialReference(){return null!=this.analysis?this.analysis.spatialReference:null}releaseAnalysis(t){this.analysis===t&&(this.analysis=new O)}};(0,r._)([(0,p.MZ)({json:{read:!1},readOnly:!0})],$.prototype,"type",void 0),(0,r._)([(0,p.MZ)({type:["LineOfSightLayer"]})],$.prototype,"operationalLayerType",void 0),(0,r._)([(0,p.MZ)({type:g,json:{read:!0,write:{isRequired:!0,ignoreOrigin:!0}}})],$.prototype,"observer",null),(0,r._)([(0,p.MZ)({type:U,json:{read:!0,write:{ignoreOrigin:!0,isRequired:!0}}})],$.prototype,"targets",null),(0,r._)([(0,p.MZ)({type:O,nonNullable:!0,json:{read:!1,write:!1}})],$.prototype,"analysis",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],$.prototype,"fullExtent",null),(0,r._)([(0,p.MZ)({readOnly:!0})],$.prototype,"spatialReference",null),(0,r._)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],$.prototype,"opacity",void 0),(0,r._)([(0,p.MZ)({type:["show","hide"]})],$.prototype,"listMode",void 0),$=(0,r._)([(0,c.$)("esri.layers.LineOfSightLayer")],$);const C=$},76553:(t,e,n)=>{function r(t){return t&&"getAtOrigin"in t&&"originOf"in t}n.d(e,{H:()=>r})},80200:(t,e,n)=>{n.d(e,{T:()=>r,d:()=>h});const r={Base64:0,Hex:1,String:2,Raw:3},o=8,s=(1<<o)-1;function i(t,e){const n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}function a(t){const e=[];for(let n=0,r=t.length*o;n<r;n+=o)e[n>>5]|=(t.charCodeAt(n/o)&s)<<n%32;return e}function l(t){const e=[];for(let n=0,r=32*t.length;n<r;n+=o)e.push(String.fromCharCode(t[n>>5]>>>n%32&s));return e.join("")}function u(t,e,n,r,o,s){return i(function(t,e){return t<<e|t>>>32-e}(i(i(e,t),i(r,s)),o),n)}function p(t,e,n,r,o,s,i){return u(e&n|~e&r,t,e,o,s,i)}function c(t,e,n,r,o,s,i){return u(e&r|n&~r,t,e,o,s,i)}function d(t,e,n,r,o,s,i){return u(e^n^r,t,e,o,s,i)}function f(t,e,n,r,o,s,i){return u(n^(e|~r),t,e,o,s,i)}function y(t,e){t[e>>5]|=128<<e%32,t[14+(e+64>>>9<<4)]=e;let n=1732584193,r=-271733879,o=-1732584194,s=271733878;for(let e=0;e<t.length;e+=16){const a=n,l=r,u=o,y=s;n=p(n,r,o,s,t[e],7,-680876936),s=p(s,n,r,o,t[e+1],12,-389564586),o=p(o,s,n,r,t[e+2],17,606105819),r=p(r,o,s,n,t[e+3],22,-1044525330),n=p(n,r,o,s,t[e+4],7,-176418897),s=p(s,n,r,o,t[e+5],12,1200080426),o=p(o,s,n,r,t[e+6],17,-1473231341),r=p(r,o,s,n,t[e+7],22,-45705983),n=p(n,r,o,s,t[e+8],7,1770035416),s=p(s,n,r,o,t[e+9],12,-1958414417),o=p(o,s,n,r,t[e+10],17,-42063),r=p(r,o,s,n,t[e+11],22,-1990404162),n=p(n,r,o,s,t[e+12],7,1804603682),s=p(s,n,r,o,t[e+13],12,-40341101),o=p(o,s,n,r,t[e+14],17,-1502002290),r=p(r,o,s,n,t[e+15],22,1236535329),n=c(n,r,o,s,t[e+1],5,-165796510),s=c(s,n,r,o,t[e+6],9,-1069501632),o=c(o,s,n,r,t[e+11],14,643717713),r=c(r,o,s,n,t[e],20,-373897302),n=c(n,r,o,s,t[e+5],5,-701558691),s=c(s,n,r,o,t[e+10],9,38016083),o=c(o,s,n,r,t[e+15],14,-660478335),r=c(r,o,s,n,t[e+4],20,-405537848),n=c(n,r,o,s,t[e+9],5,568446438),s=c(s,n,r,o,t[e+14],9,-1019803690),o=c(o,s,n,r,t[e+3],14,-187363961),r=c(r,o,s,n,t[e+8],20,1163531501),n=c(n,r,o,s,t[e+13],5,-1444681467),s=c(s,n,r,o,t[e+2],9,-51403784),o=c(o,s,n,r,t[e+7],14,1735328473),r=c(r,o,s,n,t[e+12],20,-1926607734),n=d(n,r,o,s,t[e+5],4,-378558),s=d(s,n,r,o,t[e+8],11,-2022574463),o=d(o,s,n,r,t[e+11],16,1839030562),r=d(r,o,s,n,t[e+14],23,-35309556),n=d(n,r,o,s,t[e+1],4,-1530992060),s=d(s,n,r,o,t[e+4],11,1272893353),o=d(o,s,n,r,t[e+7],16,-155497632),r=d(r,o,s,n,t[e+10],23,-1094730640),n=d(n,r,o,s,t[e+13],4,681279174),s=d(s,n,r,o,t[e],11,-358537222),o=d(o,s,n,r,t[e+3],16,-722521979),r=d(r,o,s,n,t[e+6],23,76029189),n=d(n,r,o,s,t[e+9],4,-640364487),s=d(s,n,r,o,t[e+12],11,-421815835),o=d(o,s,n,r,t[e+15],16,530742520),r=d(r,o,s,n,t[e+2],23,-995338651),n=f(n,r,o,s,t[e],6,-198630844),s=f(s,n,r,o,t[e+7],10,1126891415),o=f(o,s,n,r,t[e+14],15,-1416354905),r=f(r,o,s,n,t[e+5],21,-57434055),n=f(n,r,o,s,t[e+12],6,1700485571),s=f(s,n,r,o,t[e+3],10,-1894986606),o=f(o,s,n,r,t[e+10],15,-1051523),r=f(r,o,s,n,t[e+1],21,-2054922799),n=f(n,r,o,s,t[e+8],6,1873313359),s=f(s,n,r,o,t[e+15],10,-30611744),o=f(o,s,n,r,t[e+6],15,-1560198380),r=f(r,o,s,n,t[e+13],21,1309151649),n=f(n,r,o,s,t[e+4],6,-145523070),s=f(s,n,r,o,t[e+11],10,-1120210379),o=f(o,s,n,r,t[e+2],15,718787259),r=f(r,o,s,n,t[e+9],21,-343485551),n=i(n,a),r=i(r,l),o=i(o,u),s=i(s,y)}return[n,r,o,s]}function h(t,e=r.Hex){const n=e||r.Base64,s=y(a(t),t.length*o);switch(n){case r.Raw:return s;case r.Hex:return function(t){const e="0123456789abcdef",n=[];for(let r=0,o=4*t.length;r<o;r++)n.push(e.charAt(t[r>>2]>>r%4*8+4&15)+e.charAt(t[r>>2]>>r%4*8&15));return n.join("")}(s);case r.String:return l(s);case r.Base64:return function(t){const e=[];for(let n=0,r=4*t.length;n<r;n+=3){const r=(t[n>>2]>>n%4*8&255)<<16|(t[n+1>>2]>>(n+1)%4*8&255)<<8|t[n+2>>2]>>(n+2)%4*8&255;for(let o=0;o<4;o++)8*n+6*o>32*t.length?e.push("="):e.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(r>>6*(3-o)&63))}return e.join("")}(s)}}},85648:(t,e,n)=>{n.d(e,{n:()=>o});var r=n(84952);function o(t){return s[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,r.Zo)(t);return l[e]||i}(t.url)}(t)]||a}const s={},i="text/plain",a=s[i],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)s[l[t]]=t},87024:(t,e,n)=>{n.d(e,{P:()=>f});var r=n(49186),o=n(80200),s=n(76553),i=n(84952),a=n(13069),l=n(96156),u=n(35666),p=n(10107),c=n(85648),d=n(97159);function f(t){const e=t?.origins??[void 0];return(n,r)=>{const o=function(t,e,n){if("resource"===t?.type)return function(t,e,n){const r=(0,l.z4)(e,n);return{type:String,read:(t,e,n)=>{const o=(0,d.r)(t,e,n);return r.type===String?o:"function"==typeof r.type?new r.type({url:o}):void 0},write:{isRequired:r.json?.write?.isRequired,writer(e,o,a,l){if(!l?.resources)return"string"==typeof e?void(o[a]=(0,d.t)(e,l)):void(o[a]=e.write({},l));const p=function(t){return null==t?null:"string"==typeof t?t:t.url}(e),f=(0,d.t)(p,{...l,verifyItemRelativeUrls:l?.verifyItemRelativeUrls?{writtenUrls:l.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},d.M.NO),v=r.type!==String&&(!(0,s.H)(this)||l?.origin&&this.originIdOf(n)>(0,u.aB)(l.origin)),m={object:this,propertyName:n,value:e,targetUrl:f,dest:o,targetPropertyName:a,context:l,params:t};l?.portalItem&&f&&!(0,i.oP)(f)?v&&t?.contentAddressed?y(m):v?function(t){const{context:e,targetUrl:n,params:r,value:o,dest:s,targetPropertyName:a}=t;if(!e.portalItem)return;const l=e.portalItem.resourceFromPath(n),u=g(o,n,e),p=(0,c.n)(u),d=(0,i.Zo)(l.path),f=r?.compress??!1;p===d?(e.resources&&h({...t,resource:l,content:u,compress:f,updates:e.resources.toUpdate}),s[a]=n):y(t)}(m):function({context:t,targetUrl:e,dest:n,targetPropertyName:r}){t.portalItem&&t.resources&&(t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(e),compress:!1}),n[r]=e)}(m):l?.portalItem&&(null==f||null!=(0,d.i)(f)||(0,i.w8)(f)||v)?y(m):o[a]=f}}}}(t,e,n);switch(t?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:t,write:e}=d.b;return{read:t,write:e}}}}(t,n,r);for(const t of e){const e=(0,p.rM)(n,t,r);for(const t in o)e[t]=o[t]}}}function y(t){const{targetUrl:e,params:n,value:s,context:l,dest:u,targetPropertyName:p}=t;if(!l.portalItem)return;const f=(0,d.p)(e),y=g(s,e,l);if(n?.contentAddressed&&"json"!==y.type)return void l.messages?.push(new r.A("persistable:contentAddressingUnsupported",`Property "${p}" is trying to serializing a resource with content of type ${y.type} with content addressing. Content addressing is only supported for json resources.`,{content:y}));const v=n?.contentAddressed&&"json"===y.type?(0,o.d)(y.jsonString):f?.filename??(0,a.lk)(),m=(0,i.fj)(n?.prefix??f?.prefix,v),w=`${m}.${(0,c.n)(y)}`;if(n?.contentAddressed&&l.resources&&"json"===y.type){const t=l.resources.toKeep.find((({resource:t})=>t.path===w))??l.resources.toAdd.find((({resource:t})=>t.path===w));if(t)return void(u[p]=t.resource.itemRelativeUrl)}const x=l.portalItem.resourceFromPath(w);(0,i.w8)(e)&&l.resources&&l.resources.pendingOperations.push((0,i.tk)(e).then((t=>{x.path=`${m}.${(0,c.n)({type:"blob",blob:t})}`,u[p]=x.itemRelativeUrl})).catch((()=>{})));const b=n?.compress??!1;l.resources&&h({...t,resource:x,content:y,compress:b,updates:l.resources.toAdd}),u[p]=x.itemRelativeUrl}function h({object:t,propertyName:e,updates:n,resource:r,content:o,compress:s}){n.push({resource:r,content:o,compress:s,finish:n=>{!function(t,e,n){"string"==typeof t[e]?t[e]=n.url:t[e].url=n.url}(t,e,n)}})}function g(t,e,n){return"string"==typeof t?{type:"url",url:e}:{type:"json",jsonString:JSON.stringify(t.toJSON(n))}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>z});var i,n,o=a(90237),s=a(67996),r=a(5503),l=a(49186),h=a(53966),d=a(91869),c=a(92071),u=a(74887),p=a(36708),y=a(10107),g=(a(44208),a(87811),a(40608)),m=a(35666),f=a(5443),M=a(86738),L=a(82799),b=a(4146),w=a(90708),k=a(15375);(n=i||(i={})).MULTIPLIER="multiplier",n.ABSOLUTE="absolute-value";var C=a(80340),T=a(70643),N=a(85342),x=a(69860),v=a(30504),D=a(63074),E=a(16131),_=a(25036),I=a(10873),A=a(8460),S=a(88613);let R=class extends((0,E.q)((0,D.dM)((0,_.j)((0,c.P)(b.A))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(T.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(T.A)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new l.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new l.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,o)=>{const s=this._graphTypeLookup.get(o);if(!s)return h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);"relationship"===s.type?t.has(o)||(t.add(o),i.push(s)):"entity"===s.type?t.has(o)||(t.add(o),a.push(s)):(h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new C.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,N.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((a=>{(0,S.fetchKnowledgeGraph)(this.url).then((async i=>{i.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),i.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const n=this.linkChart?.linkChartProperties;if(n?.originIdOf("entitiesUrl")===m.Gr.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await s.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:n?.entitiesUrl,relationshipsUrl:n?.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(i.dataModel),this.initializationLinkChartConfig={layoutSettings:n?.layoutSettings??void 0,layoutMode:(0,v.k5)(n.layoutType)}),this._initializeLayerProperties({knowledgeGraph:i,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=x.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,d.tE)(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}await t()}else{const a="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then((async()=>{(0,u.Te)(e),await t()})))}a(null)}))}))),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):h.A.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,v.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const t of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id))&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);const o=a?void 0:this.getCurrentNodeLocations();await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:o}),n.length>0&&(this.membershipModified=!0);const s=[];return this.layers.forEach((e=>{s.push(e.refreshCachedQueryEngine())})),await Promise.all(s),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),(0,u.Te)(t?.signal)}catch(e){throw(0,u.zf)(e)&&a.length>0&&await this.removeRecords(a,{overrideMembershipCheck:!0}),e}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===m.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===m.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=(0,d.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="organic-standard",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const o=new Map,s=new Map,r=new Map,c=new Map,p=new Uint8Array(a.length),y=new Float64Array(a.length),g=new Float64Array(a.length),m=new Float64Array(a.length),b=new Float64Array(a.length),C=new Uint32Array(i.length),T=new Uint32Array(i.length),N=new Float64Array(i.length),x=new Float64Array(i.length),v=[];let D=!1;const E=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let _,I="organic-standard",S=0,R=0;const z=A.i6.apply;switch(I="geographic-organic-standard"===e?"organic-standard":e,I){case"organic-standard":_=A.pM.apply;break;case"organic-community":_=A.Tu.apply;break;case"hierarchical-bottom-to-top":_=A.$C.apply;break;case"radial-root-centric":_=A.vJ.apply;break;case"tree-left-to-right":_=A.Xq.apply;break;default:_=A.Wg.apply}let G=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[k.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?p[S]=A.tx.IsGeographic:p[S]=A.tx.None;const n=t.lockedNodeLocations.get(i.attributes[k.dr]);y[S]=n.x,g[S]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){p[S]=A.tx.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":y[S]=t?.x,g[S]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[S]=e.x,g[S]=e.y):p[S]=A.tx.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[S]=e.x,g[S]=e.y):p[S]=A.tx.IsMovable;break;default:p[S]=A.tx.IsMovable}(null==y[S]||null==g[S]||Number.isNaN(y[S])||Number.isNaN(g[S]))&&(p[S]=A.tx.IsMovable,y[S]=0,g[S]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!G&&t?.lockedNodeLocations?.has(i.attributes[k.dr])&&(G=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;m[S]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?i.attributes[s]:null;b[S]=r?new Date(r).getTime():NaN,y[S]=0,g[S]=0,p[S]=A.tx.IsMovable}else p[S]=A.tx.IsMovable,y[S]=0,g[S]=0;c.set(i.attributes[k.dr],S),v[S]={feature:i,typeName:a},S++})),G&&h.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let P=!1;const F=new Map;i.forEach((a=>{const i=a.feature.attributes[k.Cz],o=a.feature.attributes[k.KQ],s=c.get(i),r=c.get(o),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?a.feature.attributes[h]:null,u=l?.endField,p=u?a.feature.attributes[u]:null;if(void 0!==s&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+p);const l=F.get(t),h=l?.has(a.typeName);h||(C[R]=s,T[R]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(N[R]=d?new Date(d).getTime():NaN,x[R]=p?new Date(p).getTime():NaN),void 0===l?F.set(t,new Map([[a.typeName,R]])):l.set(a.typeName,R),R++),n.push(a)}else P=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),P&&h.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const O=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),U=this._convertValidatedOrganicSettingsToCalculationSettings(O);await(0,A.Hh)();let Z=A.JT.Error,B=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:Z,links:B,graphics:a}=z((()=>t?.signal?.aborted??!1),p,y,g,m,b,C.subarray(0,R),T.subarray(0,R),N.subarray(0,R),x.subarray(0,R),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),Z===A.JT.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:Z,links:B}=_((()=>t?.signal?.aborted??!1),p,y,g,C.subarray(0,R),T.subarray(0,R),U.computationBudgetTime,U.idealEdgeLengthMultiplier,U.repulsionRadiusMultiplier));if((0,u.Te)(t?.signal),Z===A.JT.Error)throw new l.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(Z===A.JT.Canceled)throw(0,u.NK)();for(let e=0;e<v.length;e++){if(g[e]>84.9999?g[e]=84.9999:g[e]<-84.9999&&(g[e]=-84.9999),y[e]>179.9999?y[e]=179.9999:y[e]<-179.9999&&(y[e]=-179.9999),v[e].feature.attributes[k.T1]=new M.A(y[e],g[e]),o.has(v[e].typeName)){const t=o.get(v[e].typeName);t?.set(v[e].feature.attributes[k.dr],v[e].feature)}else{const t=new Map;t.set(v[e].feature.attributes[k.dr],v[e].feature),o.set(v[e].typeName,t)}r.set(v[e].feature.attributes[k.dr],v[e].feature);const t=(0,w.Ux)(v[e].feature.attributes[k.T1]);this.entityLinkChartDiagramLookup.set(v[e].feature.attributes[k.dr],v[e].feature.attributes[k.T1]?t:null);const a=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,v[e].typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(a.members,v[e].feature.attributes[k.dr],(()=>({id:v[e].feature.attributes[k.dr],linkChartLocation:void 0}))).linkChartLocation=v[e].feature.attributes[k.T1];const{x:i,y:n}=v[e].feature.attributes[k.T1];if(D)E.xmin=Math.min(E.xmin,i),E.xmax=Math.max(E.xmax,i),E.ymin=Math.min(E.ymin,n),E.ymax=Math.max(E.ymax,n);else{const e=1e-7;E.xmin=i-e,E.xmax=i+e,E.ymin=n-e,E.ymax=n+e,D=!0}}if(this.linkChartExtent.xmin=E.xmin,this.linkChartExtent.xmax=E.xmax,this.linkChartExtent.ymin=E.ymin,this.linkChartExtent.ymax=E.ymax,!B)throw new l.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const j=new Map,Q=new Map,J=new Map,K=new Set;for(let a=0;a<n.length;a++){const i=[],o=n[a],l=o.feature.attributes[k.Cz],u=o.feature.attributes[k.KQ];let p=l+"-"+u;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(o.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?o.feature.attributes[a]:null,n=e?.endField;p+="-"+i+"-"+(n?o.feature.attributes[n]:null)}const y=F.get(p).get(o.typeName),g=0===y?0:B?.vertexEndIndex[y-1];if(!K.has(y)){if(K.add(y),B.types[y]===A.J.Recursive){const e=[B.vertices[2*g],B.vertices[2*g+1]],t=[B.vertices[2*(g+1)],B.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(B.types[y]!==A.J.Regular){h.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<B.vertexEndIndex[y];e++)i.push([B.vertices[2*e],B.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=v[c.get(l)]?.feature.attributes[k.T1],t=v[c.get(u)]?.feature.attributes[k.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);j.has(p)?j.get(p).push(i):j.set(p,[i])}const m=j.get(p);Q.has(p)||(Q.set(p,new Map),J.set(p,new Map));const f=Q.get(p),M=J.get(p);f.has(o.typeName)||(f.set(o.typeName,m.shift()),M.set(o.typeName,0));const b=f.get(o.typeName);M.set(o.typeName,M.get(o.typeName)+1);const C=new L.A({paths:[b]});if(o.feature.attributes[k.T1]=C,s.has(o.typeName)){const e=s.get(o.typeName);e?.set(o.feature.attributes[k.dr],o.feature)}else{const e=new Map;e.set(o.feature.attributes[k.dr],o.feature),s.set(o.typeName,e)}r.set(o.feature.attributes[k.dr],o.feature);const T=(0,w.Ux)(o.feature.attributes[k.T1]);this.relationshipLinkChartDiagramLookup.set(o.feature.attributes[k.dr],o.feature.attributes[k.T1]?T:null);const N=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,o.typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(N.members,o.feature.attributes[k.dr],(()=>({id:o.feature.attributes[k.dr],linkChartLocation:void 0}))).linkChartLocation=T}for(const e of n)e.feature.attributes[k.M1]=J.get(e.feature.attributes[k.Cz]+"-"+e.feature.attributes[k.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:o,links:s,idMap:r}}async applyNewLinkChartLayout(e="organic-standard",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new M.A({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),(0,u.Te)(t)}catch(e){throw(0,u.zf)(e)&&this.removeRecords(a),e}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),(0,u.Te)(t)}catch(e){throw(0,u.zf)(e)&&this.removeRecords(a),e}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=[],i=[];for(const t of e)this._graphTypeLookup.has(t.typeName)&&(this.dataManager.sublayerCaches.has(t.typeName)||(this.dataManager.sublayerCaches.set(t.typeName,new Map),a.push(t.typeName)),(0,d.tE)(this.sublayerIdsCache,t.typeName,(()=>new Set)).add(t.id),i.push(t));this.dataManager.addToLayer(i);for(const e of a){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a)}}await(0,N.qN)(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const n={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:new Map};for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&n.lockedNodeLocations.set(e,new M.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,n)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=m.Gr.PORTAL_ITEM&&e<m.Gr.USER}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[k.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[k.KQ]);if(t&&a){const i=(0,w.Ux)(new L.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[k.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[k.dr],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig||{}}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),n=e=>a(e)&&e>=0,o={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return o;const{computationBudgetTime:s,autoRepulsionRadius:r,repulsionRadiusMultiplier:l,absoluteIdealEdgeLength:d,multiplicativeIdealEdgeLength:c,idealEdgeLengthType:u}=t;return(e=>a(e)&&e>=1)(s)?o.computationBudgetTime=s:s&&h.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),o.autoRepulsionRadius=r,!r&&(e=>a(e)&&e>=1)(l)?o.repulsionRadiusMultiplier=l:r||(o.autoRepulsionRadius=!0,h.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&((e=>Object.values(i).includes(e))(u)?o.idealEdgeLengthType=u:void 0!==u&&h.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===u&&n(d)?o.absoluteIdealEdgeLength=d:"absolute-value"===u&&void 0!==d?h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===u&&n(c)?o.multiplicativeIdealEdgeLength=c:"multiplier"===u&&void 0!==c&&h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),o}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===i.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===i.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new T.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),a=new Set((e.entityTypes??[]).map((e=>e.name))),i=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=a.has(e.graphTypeName)?"entity":"relationship");const e=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):i.has(e.graphTypeName))));this.setAtOrigin("layers",e,(0,m.OL)(this.originIdOf("layers")))}else this.layers=new r.A;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const t of a)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});const i=[];for(const e of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(e)||(h.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(e));for(const e of i)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,o._)([(0,y.MZ)(I.OZ)],R.prototype,"url",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataPreloadedInLocalCache",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationLinkChartConfig",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"membershipModified",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataManager",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationInclusionModeDefinition",null),(0,o._)([(0,y.MZ)()],R.prototype,"knowledgeGraph",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),(0,o._)([(0,y.MZ)({readOnly:!0})],R.prototype,"linkChart",null),(0,o._)([(0,y.MZ)()],R.prototype,"entityLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"linkChartExtent",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberEntityTypes",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberRelationshipTypes",void 0),(0,o._)([(0,y.MZ)({type:["LinkChartLayer"]})],R.prototype,"operationalLayerType",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"sublayerIdsCache",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"type",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"chronologicalAuxiliaryGraphics",void 0),R=(0,o._)([(0,g.$)("esri.layers.LinkChartLayer")],R);const z=R}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1728],{71728:(e,t,a)=>{a.r(t),a.d(t,{default:()=>z});var i,n,o=a(90237),s=a(67996),r=a(5503),l=a(49186),h=a(53966),d=a(91869),c=a(92071),u=a(74887),p=a(36708),y=a(10107),g=(a(44208),a(87811),a(40608)),m=a(35666),f=a(5443),M=a(86738),L=a(82799),b=a(4146),w=a(90708),k=a(15375);(n=i||(i={})).MULTIPLIER="multiplier",n.ABSOLUTE="absolute-value";var C=a(80340),T=a(70643),N=a(85342),x=a(69860),v=a(30504),D=a(63074),E=a(16131),_=a(25036),I=a(10873),A=a(8460),S=a(51806);let R=class extends((0,E.q)((0,D.dM)((0,_.j)((0,c.P)(b.A))))){constructor(e){if(super(e),this.url=null,this.dataPreloadedInLocalCache=!1,this.initializationLinkChartConfig=null,this.membershipModified=!0,this._currentLinkChartConfig={layoutMode:"organic-standard"},this._graphTypeLookup=new Map,this.dataManager=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(T.A)),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map,this.linkChartExtent=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7}),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="LinkChartLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(T.A)),this.type="link-chart",this.chronologicalAuxiliaryGraphics=null,this._originalInclusionList=e?.initializationInclusionModeDefinition,e?.dataPreloadedInLocalCache&&!e?.initializationInclusionModeDefinition)throw new l.A("knowledge-graph:linkchart-layer-constructor","If creating a link chart composite layer and configured that data is already loaded in the cache, you must specify an inclusion list so the Composite Layer knows what records belong to it");this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}normalizeCtorArgs(e){if(!e)return{};const{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}=e;return{url:t,title:a,dataPreloadedInLocalCache:i,initializationLinkChartConfig:n}}_initializeLayerProperties(e){if(!this.title&&this.url){const e=this.url.split("/");this.title=e[e.length-2]}const t=new Set;let a=[],i=[];if(e.inclusionModeDefinition&&(!e.inclusionModeDefinition.namedTypeDefinitions||e.inclusionModeDefinition.namedTypeDefinitions.size<1))throw new l.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined");e.inclusionModeDefinition?.generateAllSublayers?(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]):e.inclusionModeDefinition?.namedTypeDefinitions&&e.inclusionModeDefinition?.namedTypeDefinitions.size>0?e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((n,o)=>{const s=this._graphTypeLookup.get(o);if(!s)return h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(o);"relationship"===s.type?t.has(o)||(t.add(o),i.push(s)):"entity"===s.type?t.has(o)||(t.add(o),a.push(s)):(h.A.getLogger(this).warn(`A named type, ${o}, was in the inclusion list that wasn't properly modeled and will be removed`),e.inclusionModeDefinition?.namedTypeDefinitions.delete(o))})):(a=e.knowledgeGraph.dataModel.entityTypes??[],i=e.knowledgeGraph.dataModel.relationshipTypes??[]);const n=new C.P({knowledgeGraph:e.knowledgeGraph,inclusionModeDefinition:e.inclusionModeDefinition});this.knowledgeGraph=e.knowledgeGraph,this.memberEntityTypes=a,this.memberRelationshipTypes=i,this.dataManager=n}load(e){const t=async()=>{const e=[],t=[];this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,N.qN)(this),this.dataManager.inclusionModeDefinition&&(this.dataManager.inclusionModeDefinition.generateAllSublayers=!1),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.forEach((e=>{e.useAllData=!1})),await this._initializeDiagram(),this.layers.forEach((a=>{t.push(a.refreshCachedQueryEngine()),e.push(new Promise((e=>{a.on("layerview-create",(()=>{e(null)}))})))})),this.tables.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t)};return this.addResolvingPromise(new Promise((a=>{(0,S.fetchKnowledgeGraph)(this.url).then((async i=>{i.dataModel.entityTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)})),i.dataModel.relationshipTypes?.forEach((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}));const n=this.linkChart?.linkChartProperties;if(n?.originIdOf("entitiesUrl")===m.Gr.LINK_CHART&&(this.membershipModified=!1,this._originalInclusionList=await s.XW.fetchAndConvertSerializedLinkChart({entitiesUrl:n?.entitiesUrl,relationshipsUrl:n?.relationshipsUrl}),this._alignLayersDataModelAndInclusionDefinition(i.dataModel),this.initializationLinkChartConfig={layoutSettings:n?.layoutSettings??void 0,layoutMode:(0,v.k5)(n.layoutType)}),this._initializeLayerProperties({knowledgeGraph:i,inclusionModeDefinition:this._originalInclusionList}),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.size||(this.dataManager.inclusionModeDefinition={generateAllSublayers:!1,namedTypeDefinitions:new Map},this.dataManager.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})})),this.dataManager.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.set(e.name,{useAllData:!0})}))),this.dataPreloadedInLocalCache){const e=x.A.getInstance();for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions??[])for(const i of a.members?.values()??[]){const a=e.readFromStoreById(`${t}__${i.id}`);a&&(0,d.tE)(this.dataManager.sublayerCaches,t,(()=>new Map)).set(i.id,a)}await t()}else{const a="geographic-organic-standard"===this.initializationLinkChartConfig?.layoutMode;this.addResolvingPromise(this.dataManager.refreshCacheContent(void 0,!1,a,!0).then((async()=>{(0,u.Te)(e),await t()})))}a(null)}))}))),Promise.resolve(this)}set initializationInclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("initializationInclusionModeDefinition",e):h.A.getLogger(this).error("#initializationInclusionModeDefinition","initializationInclusionModeDefinition cannot be changed after the layer is loaded.")}get linkChart(){return this.parent}async addRecords(e,t){let a=[];t?.cascadeAddRelationshipEndNodes&&this.dataManager.knowledgeGraph.dataModel&&(a=await(0,v.aq)(e,this.dataManager.knowledgeGraph));const i=e.concat(a).filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id)));i.length>0&&(this.membershipModified=!0),await this._handleNewRecords(i,t)}async removeRecords(e,{cascadeRemoveRelationships:t=!0,recalculateLayout:a=!1,overrideMembershipCheck:i=!1}={cascadeRemoveRelationships:!0,recalculateLayout:!1,overrideMembershipCheck:!1}){let n=[];for(const t of e)(i||!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(t.typeName)?.members?.has(t.id))&&n.push(t);if(t){const e=new Set,t=[];for(const t of n)if(this.dataManager.nodeConnectionsLookup.has(t.id))for(const a of this.dataManager.nodeConnectionsLookup.get(t.id))e.add(a);for(const a of e)if(this.dataManager.memberIdTypeLookup.has(a))for(const e of this.dataManager.memberIdTypeLookup.get(a))this.dataManager.relationshipTypeNames.has(e)&&t.push({id:a,typeName:e});n=n.concat(t)}this.dataManager.removeFromLayer(n);for(const e of n)this.sublayerIdsCache.get(e.typeName)?.delete(e.id),this.dataManager.relationshipTypeNames.has(e.typeName)?this.relationshipLinkChartDiagramLookup.delete(e.id):this.entityLinkChartDiagramLookup.delete(e.id);const o=a?void 0:this.getCurrentNodeLocations();await this._calculateLayoutWithSublayerTimeInfo(this._currentLinkChartConfig.layoutMode,{layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:o}),n.length>0&&(this.membershipModified=!0);const s=[];return this.layers.forEach((e=>{s.push(e.refreshCachedQueryEngine())})),await Promise.all(s),this._refreshNamedTypes(),n}async expand(e,t){let a=[];try{const i=await this.dataManager.getConnectedRecordIds(e,t?.relationshipTypeNames,t);a=i.filter((e=>!this.sublayerIdsCache.get(e.typeName)?.has(e.id))),await this._handleNewRecords(i,t),i.length>0&&(this.membershipModified=!0),(0,u.Te)(t?.signal)}catch(e){throw(0,u.zf)(e)&&a.length>0&&await this.removeRecords(a,{overrideMembershipCheck:!0}),e}return{records:a}}loadLayerAssumingLocalCache(){const e=[...this.memberRelationshipTypes,...this.memberEntityTypes];this.originIdOf("layers")===m.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===m.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const a=(0,d.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((({id:e,linkChartLocation:i})=>{if(a.add(e),i){const a="coords"in i&&"lengths"in i?i:(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(e,a):this.entityLinkChartDiagramLookup.set(e,a)}}))}))}async calculateLinkChartLayout(e="organic-standard",t){const a=[],i=[],n=[];this.dataManager.sublayerCaches.forEach(((e,t)=>{this.dataManager.entityTypeNames.has(t)?e.forEach((e=>{a.push({typeName:t,feature:e})})):this.dataManager.relationshipTypeNames.has(t)&&e.forEach((e=>{i.push({typeName:t,feature:e})}))})),this.entityLinkChartDiagramLookup=new Map,this.relationshipLinkChartDiagramLookup=new Map;const o=new Map,s=new Map,r=new Map,c=new Map,p=new Uint8Array(a.length),y=new Float64Array(a.length),g=new Float64Array(a.length),m=new Float64Array(a.length),b=new Float64Array(a.length),C=new Uint32Array(i.length),T=new Uint32Array(i.length),N=new Float64Array(i.length),x=new Float64Array(i.length),v=[];let D=!1;const E=new f.A({xmin:-1e-7,ymin:-1e-7,xmax:1e-7,ymax:1e-7});let _,I="organic-standard",S=0,R=0;const z=A.i6.apply;switch(I="geographic-organic-standard"===e?"organic-standard":e,I){case"organic-standard":_=A.pM.apply;break;case"organic-community":_=A.Tu.apply;break;case"hierarchical-bottom-to-top":_=A.$C.apply;break;case"radial-root-centric":_=A.vJ.apply;break;case"tree-left-to-right":_=A.Xq.apply;break;default:_=A.Wg.apply}let G=!1;a.forEach((({typeName:a,feature:i})=>{if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e&&t?.lockedNodeLocations?.has(i.attributes[k.dr])){"geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)?p[S]=A.tx.IsGeographic:p[S]=A.tx.None;const n=t.lockedNodeLocations.get(i.attributes[k.dr]);y[S]=n.x,g[S]=n.y}else if("geographic-organic-standard"===e&&this.dataManager.geographicLookup.has(a)){p[S]=A.tx.IsGeographic;let e=null;const t=i.attributes[this.dataManager.geographicLookup.get(a).name],n=this.dataManager.geographicLookup.get(a)?.geometryType;switch(n){case"esriGeometryPoint":y[S]=t?.x,g[S]=t?.y;break;case"esriGeometryPolygon":e=t?.centroid,null!=e?.x&&null!=e?.y?(y[S]=e.x,g[S]=e.y):p[S]=A.tx.IsMovable;break;case"esriGeometryPolyline":case"esriGeometryMultipoint":e=t?.extent?.center,null!=e?.x&&null!=e?.y?(y[S]=e.x,g[S]=e.y):p[S]=A.tx.IsMovable;break;default:p[S]=A.tx.IsMovable}(null==y[S]||null==g[S]||Number.isNaN(y[S])||Number.isNaN(g[S]))&&(p[S]=A.tx.IsMovable,y[S]=0,g[S]=0)}else if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){!G&&t?.lockedNodeLocations?.has(i.attributes[k.dr])&&(G=!0);const e=t?.timeInfoByTypeName?.get(a),n=e?.startField,o=n&&e?.startField?i.attributes[n]:null;m[S]=o?new Date(o).getTime():NaN;const s=e?.endField,r=s&&e?.endField?i.attributes[s]:null;b[S]=r?new Date(r).getTime():NaN,y[S]=0,g[S]=0,p[S]=A.tx.IsMovable}else p[S]=A.tx.IsMovable,y[S]=0,g[S]=0;c.set(i.attributes[k.dr],S),v[S]={feature:i,typeName:a},S++})),G&&h.A.getLogger(this).warn("Locked node locations are not supported for chronological layout at this time. Requested node locations were ignored");let P=!1;const F=new Map;i.forEach((a=>{const i=a.feature.attributes[k.Cz],o=a.feature.attributes[k.KQ],s=c.get(i),r=c.get(o),l=t?.timeInfoByTypeName?.get(a.typeName),h=t?.timeInfoByTypeName?l?.startField:null,d=h?a.feature.attributes[h]:null,u=l?.endField,p=u?a.feature.attributes[u]:null;if(void 0!==s&&void 0!==r){let t=i+"-"+o;"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(t=t+"-"+d+"-"+p);const l=F.get(t),h=l?.has(a.typeName);h||(C[R]=s,T[R]=r,"chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e||(N[R]=d?new Date(d).getTime():NaN,x[R]=p?new Date(p).getTime():NaN),void 0===l?F.set(t,new Map([[a.typeName,R]])):l.set(a.typeName,R),R++),n.push(a)}else P=!0,this.relationshipLinkChartDiagramLookup.set(i,null)})),P&&h.A.getLogger(this).warn("A relationship is a member of this layer that has either origin or destination entity nodes that are not members. The diagram geometry will be set to null");const O=this._validateOrganicLayoutSettings(e,t?.layoutSettings?.organicLayoutSettings),U=this._convertValidatedOrganicSettingsToCalculationSettings(O);await(0,A.Hh)();let Z=A.JT.Error,B=null;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){let a;({status:Z,links:B,graphics:a}=z((()=>t?.signal?.aborted??!1),p,y,g,m,b,C.subarray(0,R),T.subarray(0,R),N.subarray(0,R),x.subarray(0,R),"chronological-multi-timeline"===e,t?.layoutSettings?.chronologicalLayoutSettings)),Z===A.JT.Success&&(this.chronologicalAuxiliaryGraphics=a)}else({status:Z,links:B}=_((()=>t?.signal?.aborted??!1),p,y,g,C.subarray(0,R),T.subarray(0,R),U.computationBudgetTime,U.idealEdgeLengthMultiplier,U.repulsionRadiusMultiplier));if((0,u.Te)(t?.signal),Z===A.JT.Error)throw new l.A("knowledge-graph:layout-failed","Attempting to arrange the records in the specified layout failed");if(Z===A.JT.Canceled)throw(0,u.NK)();for(let e=0;e<v.length;e++){if(g[e]>84.9999?g[e]=84.9999:g[e]<-84.9999&&(g[e]=-84.9999),y[e]>179.9999?y[e]=179.9999:y[e]<-179.9999&&(y[e]=-179.9999),v[e].feature.attributes[k.T1]=new M.A(y[e],g[e]),o.has(v[e].typeName)){const t=o.get(v[e].typeName);t?.set(v[e].feature.attributes[k.dr],v[e].feature)}else{const t=new Map;t.set(v[e].feature.attributes[k.dr],v[e].feature),o.set(v[e].typeName,t)}r.set(v[e].feature.attributes[k.dr],v[e].feature);const t=(0,w.Ux)(v[e].feature.attributes[k.T1]);this.entityLinkChartDiagramLookup.set(v[e].feature.attributes[k.dr],v[e].feature.attributes[k.T1]?t:null);const a=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,v[e].typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(a.members,v[e].feature.attributes[k.dr],(()=>({id:v[e].feature.attributes[k.dr],linkChartLocation:void 0}))).linkChartLocation=v[e].feature.attributes[k.T1];const{x:i,y:n}=v[e].feature.attributes[k.T1];if(D)E.xmin=Math.min(E.xmin,i),E.xmax=Math.max(E.xmax,i),E.ymin=Math.min(E.ymin,n),E.ymax=Math.max(E.ymax,n);else{const e=1e-7;E.xmin=i-e,E.xmax=i+e,E.ymin=n-e,E.ymax=n+e,D=!0}}if(this.linkChartExtent.xmin=E.xmin,this.linkChartExtent.xmax=E.xmax,this.linkChartExtent.ymin=E.ymin,this.linkChartExtent.ymax=E.ymax,!B)throw new l.A("knowledge-graph:layout-failed","Attempting to retrieve link geometry from diagram engine failed");const j=new Map,Q=new Map,J=new Map,K=new Set;for(let a=0;a<n.length;a++){const i=[],o=n[a],l=o.feature.attributes[k.Cz],u=o.feature.attributes[k.KQ];let p=l+"-"+u;if("chronological-mono-timeline"===e||"chronological-multi-timeline"===e){const e=t?.timeInfoByTypeName?.get(o.typeName),a=t?.timeInfoByTypeName?e?.startField:null,i=a?o.feature.attributes[a]:null,n=e?.endField;p+="-"+i+"-"+(n?o.feature.attributes[n]:null)}const y=F.get(p).get(o.typeName),g=0===y?0:B?.vertexEndIndex[y-1];if(!K.has(y)){if(K.add(y),B.types[y]===A.J.Recursive){const e=[B.vertices[2*g],B.vertices[2*g+1]],t=[B.vertices[2*(g+1)],B.vertices[2*(g+1)+1]],a=[.5*(e[0]+t[0]),.5*(e[1]+t[1])],n=[a[0]-e[0],a[1]-e[1]],o=[a[0]+n[1],a[1]-n[0]],s=[a[0]-n[1],a[1]+n[0]];i.push(e),i.push(o),i.push(t),i.push(s),i.push(e)}else{if(B.types[y]!==A.J.Regular){h.A.getLogger(this).warn("A relationship generated an unsupported link geometry type. It will not be rendered");continue}for(let e=g;e<B.vertexEndIndex[y];e++)i.push([B.vertices[2*e],B.vertices[2*e+1]])}if("chronological-mono-timeline"!==e&&"chronological-multi-timeline"!==e){const e=v[c.get(l)]?.feature.attributes[k.T1],t=v[c.get(u)]?.feature.attributes[k.T1];i[0][0]===e.x&&i[0][1]===e.y||(i[0]=[e.x,e.y]),i[i.length-1][0]===t.x&&i[i.length-1][1]===t.y||(i[i.length-1]=[t.x,t.y])}for(let e=1;e<i.length-1;e++)i[e][1]>85.5?i[e][1]=85.5:i[e][1]<-85.5&&(i[e][1]=-85.5),i[e][0]>179.9999?i[e][0]=179.9999:i[e][0]<-179.9999&&(i[e][0]=-179.9999);j.has(p)?j.get(p).push(i):j.set(p,[i])}const m=j.get(p);Q.has(p)||(Q.set(p,new Map),J.set(p,new Map));const f=Q.get(p),M=J.get(p);f.has(o.typeName)||(f.set(o.typeName,m.shift()),M.set(o.typeName,0));const b=f.get(o.typeName);M.set(o.typeName,M.get(o.typeName)+1);const C=new L.A({paths:[b]});if(o.feature.attributes[k.T1]=C,s.has(o.typeName)){const e=s.get(o.typeName);e?.set(o.feature.attributes[k.dr],o.feature)}else{const e=new Map;e.set(o.feature.attributes[k.dr],o.feature),s.set(o.typeName,e)}r.set(o.feature.attributes[k.dr],o.feature);const T=(0,w.Ux)(o.feature.attributes[k.T1]);this.relationshipLinkChartDiagramLookup.set(o.feature.attributes[k.dr],o.feature.attributes[k.T1]?T:null);const N=(0,d.tE)(this.dataManager.inclusionModeDefinition.namedTypeDefinitions,o.typeName,(()=>({useAllData:!1,members:new Map})));(0,d.tE)(N.members,o.feature.attributes[k.dr],(()=>({id:o.feature.attributes[k.dr],linkChartLocation:void 0}))).linkChartLocation=T}for(const e of n)e.feature.attributes[k.M1]=J.get(e.feature.attributes[k.Cz]+"-"+e.feature.attributes[k.KQ])?.get(e.typeName)??null;return this._currentLinkChartConfig={layoutMode:e,layoutSettings:t?.layoutSettings?.clone()},{nodes:o,links:s,idMap:r}}async applyNewLinkChartLayout(e="organic-standard",t){const a=[];await this._calculateLayoutWithSublayerTimeInfo(e,t),this.layers.forEach((e=>{a.push(e.refreshCachedQueryEngine())})),this.membershipModified=!0,await Promise.all(a),this._refreshNamedTypes()}getCurrentNodeLocations(){const e=new Map;for(const[t,a]of this.dataManager.inclusionModeDefinition?.namedTypeDefinitions.entries()??[])this.dataManager.relationshipTypeNames.has(t)||a?.members?.forEach((t=>{const a=t.linkChartLocation;let i;const n=t.id;a&&(i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]},e.set(n,new M.A({x:i.x,y:i.y})))}));return e}async refreshLinkChartCache(e){await this.dataManager.refreshCacheContent(e);const t=[];this.layers.forEach((e=>{t.push(e.refreshCachedQueryEngine())})),await Promise.all(t),this._refreshNamedTypes()}async connectBetweenEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}a=await this.dataManager.getRelationshipsBetweenNodes(e,i,t),await this._handleNewRecords(a,t),(0,u.Te)(t)}catch(e){throw(0,u.zf)(e)&&this.removeRecords(a),e}return{records:a}}async connectFromEntities(e,t){if(!e.length)return{records:[]};let a=[];try{let i=[];for(const e of this.dataManager.relationshipTypeNames){const t=this.sublayerIdsCache.get(e);t&&(i=i.concat(Array.from(t.keys())))}let n=[];for(const e of this.dataManager.entityTypeNames){const t=this.sublayerIdsCache.get(e);t&&(n=n.concat(Array.from(t)))}a=await this.dataManager.getRelationshipsFromNodes(e,n,i,t),await this._handleNewRecords(a,t),a.length>0&&(this.membershipModified=!0),(0,u.Te)(t)}catch(e){throw(0,u.zf)(e)&&this.removeRecords(a),e}return{records:a}}getCurrentLayout(){return this._currentLinkChartConfig.layoutMode}async _calculateLayoutWithSublayerTimeInfo(e="organic-standard",t){const a=new Map;this.layers.forEach((e=>{a.set(e.objectType.name,e.timeInfo)})),await this.calculateLinkChartLayout(e,{timeInfoByTypeName:a,...t}),this.linkChart?.handleChronologicalOverlay()}async _handleNewRecords(e,t){const a=[],i=[];for(const t of e)this._graphTypeLookup.has(t.typeName)&&(this.dataManager.sublayerCaches.has(t.typeName)||(this.dataManager.sublayerCaches.set(t.typeName,new Map),a.push(t.typeName)),(0,d.tE)(this.sublayerIdsCache,t.typeName,(()=>new Set)).add(t.id),i.push(t));this.dataManager.addToLayer(i);for(const e of a){const t=this._graphTypeLookup.get(e);if(t){const a=this._createSublayer(t);"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),a.geometryType?this.layers.push(a):this.tables.push(a)}}await(0,N.qN)(this,a,t),await this.dataManager.refreshCacheContent(e.map((e=>e.id)),void 0,void 0,void 0,t);const n={layoutSettings:this._currentLinkChartConfig.layoutSettings,lockedNodeLocations:new Map};for(const[e,t]of this.entityLinkChartDiagramLookup.entries())t&&n.lockedNodeLocations.set(e,new M.A(t.coords[0],t.coords[1]));await this.applyNewLinkChartLayout(this._currentLinkChartConfig.layoutMode,n)}_createSublayers(e,t,a){e.forEach((e=>{const i=this._createSublayer(e);a(i)&&t.push(i),this._updateSublayerCaches(e)}))}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const a=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));a&&(t.objectType=a,t.read({title:a.name},{origin:"service"}),this._updateSublayerCaches(a))}))}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=m.Gr.PORTAL_ITEM&&e<m.Gr.USER}async _initializeDiagram(){this.initializationLinkChartConfig?this.initializationLinkChartConfig.doNotRecalculateLayout?(this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e?.members?.forEach((e=>{const a=e.linkChartLocation;let i;const n=e.id;if(!a)return;i="x"in a?{x:a.x,y:a.y}:{x:a.coords[0],y:a.coords[1]};const o=(0,w.Ux)(i);this.dataManager.relationshipTypeNames.has(t)?this.relationshipLinkChartDiagramLookup.set(n,o):this.entityLinkChartDiagramLookup.set(n,o),this.linkChartExtent.xmin>i.x&&(this.linkChartExtent.xmin=i.x),this.linkChartExtent.xmax<i.x&&(this.linkChartExtent.xmax=i.x),this.linkChartExtent.ymin>i.y&&(this.linkChartExtent.ymin=i.y),this.linkChartExtent.ymax<i.y&&(this.linkChartExtent.ymax=i.y)}))})),this.memberRelationshipTypes.forEach((e=>{e.name&&this.dataManager.sublayerCaches.get(e.name)?.forEach((e=>{const t=this.relationshipLinkChartDiagramLookup.get(e.attributes[k.Cz]),a=this.relationshipLinkChartDiagramLookup.get(e.attributes[k.KQ]);if(t&&a){const i=(0,w.Ux)(new L.A({paths:[[[t.coords[0],t.coords[1]],[a.coords[0],a.coords[1]]]]}));this.relationshipLinkChartDiagramLookup.set(e.attributes[k.dr],i)}else this.relationshipLinkChartDiagramLookup.set(e.attributes[k.dr],null)}))}))):await this._calculateLayoutWithSublayerTimeInfo(this.initializationLinkChartConfig.layoutMode,{lockedNodeLocations:this.getCurrentNodeLocations(),...this.initializationLinkChartConfig||{}}):await this._calculateLayoutWithSublayerTimeInfo("organic-standard",{lockedNodeLocations:this.getCurrentNodeLocations()})}_refreshNamedTypes(){for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}_validateOrganicLayoutSettings(e,t){const a=e=>"number"==typeof e&&!isNaN(e),n=e=>a(e)&&e>=0,o={};if(!new Set(["organic-standard","organic-community","geographic-organic-standard","chronological-multi-timeline","chronological-mono-timeline"]).has(e)||!t)return o;const{computationBudgetTime:s,autoRepulsionRadius:r,repulsionRadiusMultiplier:l,absoluteIdealEdgeLength:d,multiplicativeIdealEdgeLength:c,idealEdgeLengthType:u}=t;return(e=>a(e)&&e>=1)(s)?o.computationBudgetTime=s:s&&h.A.getLogger(this).warn("Invalid layout computationBudgetTime setting, will revert to default setting"),o.autoRepulsionRadius=r,!r&&(e=>a(e)&&e>=1)(l)?o.repulsionRadiusMultiplier=l:r||(o.autoRepulsionRadius=!0,h.A.getLogger(this).warn("Invalid layout repulsionRadiusMultiplier setting, will revert to default setting")),"geographic-organic-standard"===e&&((e=>Object.values(i).includes(e))(u)?o.idealEdgeLengthType=u:void 0!==u&&h.A.getLogger(this).warn('Invalid layout idealEdgeLengthType setting, will revert to "multiplier" setting'),"absolute-value"===u&&n(d)?o.absoluteIdealEdgeLength=d:"absolute-value"===u&&void 0!==d?h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting"):"multiplier"===u&&n(c)?o.multiplicativeIdealEdgeLength=c:"multiplier"===u&&void 0!==c&&h.A.getLogger(this).warn("Invalid layout idealEdgeLength setting, will revert to default setting")),o}_convertValidatedOrganicSettingsToCalculationSettings(e){let t=e.idealEdgeLengthType===i.ABSOLUTE?e.absoluteIdealEdgeLength:e.multiplicativeIdealEdgeLength;return e.idealEdgeLengthType===i.ABSOLUTE&&(void 0===t?t=-1:t*=-1),{computationBudgetTime:e.computationBudgetTime??void 0,repulsionRadiusMultiplier:e.repulsionRadiusMultiplier&&!e.autoRepulsionRadius?e.repulsionRadiusMultiplier:void 0,idealEdgeLengthMultiplier:t}}_createSublayer(e){return new T.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_alignLayersDataModelAndInclusionDefinition(e){const t=new Set((e.entityTypes??[]).map((e=>e.name)).concat((e.relationshipTypes??[]).map((e=>e.name)))),a=new Set((e.entityTypes??[]).map((e=>e.name))),i=new Set((e.relationshipTypes??[]).map((e=>e.name)));if(this.layers){for(const e of this.layers)!e.graphType&&t.has(e.graphTypeName)&&(e.graphType=a.has(e.graphTypeName)?"entity":"relationship");const e=this.layers.filter((e=>t.has(e.graphTypeName)&&("entity"===e.graphType?a.has(e.graphTypeName):i.has(e.graphTypeName))));this.setAtOrigin("layers",e,(0,m.OL)(this.originIdOf("layers")))}else this.layers=new r.A;if(this.layers&&this._originalInclusionList){const e=new Set(this._originalInclusionList.namedTypeDefinitions.keys()),t=this.tables?.map((e=>e.graphTypeName))??[],a=this.layers.map((e=>e.graphTypeName)).concat(t);for(const t of a)e.has(t)||this._originalInclusionList.namedTypeDefinitions.set(t,{useAllData:!1,members:new Map});const i=[];for(const e of this._originalInclusionList.namedTypeDefinitions.keys())a.includes(e)||(h.A.getLogger(this).warn(`A named type, ${e}, was in the serialized feature collection but did not have a sublayer config in the item, so will be removed`),i.push(e));for(const e of i)this._originalInclusionList.namedTypeDefinitions.delete(e)}}};(0,o._)([(0,y.MZ)(I.OZ)],R.prototype,"url",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataPreloadedInLocalCache",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationLinkChartConfig",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"membershipModified",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"dataManager",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"initializationInclusionModeDefinition",null),(0,o._)([(0,y.MZ)()],R.prototype,"knowledgeGraph",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"layers",void 0),(0,o._)([(0,y.MZ)({readOnly:!0})],R.prototype,"linkChart",null),(0,o._)([(0,y.MZ)()],R.prototype,"entityLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"relationshipLinkChartDiagramLookup",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"linkChartExtent",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberEntityTypes",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"memberRelationshipTypes",void 0),(0,o._)([(0,y.MZ)({type:["LinkChartLayer"]})],R.prototype,"operationalLayerType",void 0),(0,o._)([(0,y.MZ)()],R.prototype,"sublayerIdsCache",void 0),(0,o._)([(0,y.MZ)({type:r.A.ofType(T.A),json:{write:{ignoreOrigin:!0}}})],R.prototype,"tables",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"type",void 0),(0,o._)([(0,y.MZ)({json:{read:!1}})],R.prototype,"chronologicalAuxiliaryGraphics",void 0),R=(0,o._)([(0,g.$)("esri.layers.LinkChartLayer")],R);const z=R}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9899],{1843:(_,E,A)=>{A.d(E,{BP:()=>S,l5:()=>I});var R=A(13030),T=A(90239),e=A(620);class N{constructor(_,E){this.layout=_,this.buffer="number"==typeof E?new ArrayBuffer(E*_.stride):E;for(const E of _.fields.keys()){const A=_.fields.get(E);this[E]=new A.constructor(this.buffer,A.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.buffer.byteLength/this.stride}get byteLength(){return this.buffer.byteLength}getField(_,E){const A=this[_];return A&&A.elementCount===E.ElementCount&&A.elementType===E.ElementType?A:null}slice(_,E){return new N(this.layout,this.buffer.slice(_*this.stride,E*this.stride))}copyFrom(_,E=0,A=0,R=_.count){const T=this.stride;if(T%4==0){const e=new Uint32Array(_.buffer,E*T,R*T/4);new Uint32Array(this.buffer,A*T,R*T/4).set(e)}else{const e=new Uint8Array(_.buffer,E*T,R*T);new Uint8Array(this.buffer,A*T,R*T).set(e)}return this}get cachedMemory(){return this.byteLength}dispose(){}}class t{constructor(_){this._stride=0,this._fields=new Map,_&&(this._stride=_.stride,_.fields.forEach((_=>this._fields.set(_[0],{..._[1],constructor:O(_[1].constructor)}))))}freeze(){return this}vec2f16(_,E){return this._appendField(_,R.ZD.available?R.ZD:R.gH,E),this}vec2f(_,E){return this._appendField(_,R.gH,E),this}vec2f64(_,E){return this._appendField(_,R.si,E),this}vec3f16(_,E){return this._appendField(_,R.EC.available?R.EC:R.xs,E),this}vec3f(_,E){return this._appendField(_,R.xs,E),this}vec3f64(_,E){return this._appendField(_,R.Xm,E),this}vec4f16(_,E){return this._appendField(_,R.jz.available?R.jz:R.Eq,E),this}vec4f(_,E){return this._appendField(_,R.Eq,E),this}vec4f64(_,E){return this._appendField(_,R.Aj,E),this}mat3f(_,E){return this._appendField(_,R.jZ,E),this}mat3f64(_,E){return this._appendField(_,R.j0,E),this}mat4f(_,E){return this._appendField(_,R.Sx,E),this}mat4f64(_,E){return this._appendField(_,R.E$,E),this}vec4u8(_,E){return this._appendField(_,R.XP,E),this}f16(_,E){return this._appendField(_,R.XW.available?R.XW:R.Y$,E),this}f32(_,E){return this._appendField(_,R.Y$,E),this}f64(_,E){return this._appendField(_,R.qB,E),this}u8(_,E){return this._appendField(_,R.SL,E),this}u16(_,E){return this._appendField(_,R.h,E),this}i8(_,E){return this._appendField(_,R.bf,E),this}vec2i8(_,E){return this._appendField(_,R.D6,E),this}vec2i16(_,E){return this._appendField(_,R.mJ,E),this}vec2u8(_,E){return this._appendField(_,R.LC,E),this}vec2u16(_,E){return this._appendField(_,R.Yi,E),this}vec4u16(_,E){return this._appendField(_,R.Uz,E),this}u32(_,E){return this._appendField(_,R.P,E),this}_appendField(_,E,A){this._fields.has(_)&&(0,e.vA)(!1,`${_} already added to vertex buffer layout`);const R=E.ElementCount*(0,T.GJ)(E.ElementType),N=this._stride;this._fields.set(_,{constructor:E,size:R,offset:N,optional:A}),this._alignFields()}_alignFields(){let _=0,E=1;this._fields.forEach((A=>{const R=(0,T.GJ)(A.constructor.ElementType);_=Math.floor((_+R-1)/R)*R,A.offset=_,_+=A.size,E=Math.max(E,R)})),_=Math.floor((_+E-1)/E)*E,this._stride=_}createBuffer(_){return new N(this,_)}createView(_){return new N(this,_)}clone(){const _=new t;return _._stride=this._stride,_._fields=new Map,this._fields.forEach(((E,A)=>_._fields.set(A,E))),_.BufferType=this.BufferType,_}get stride(){return this._stride}get fields(){return this._fields}}function S(){return new t}class I{constructor(_){this.fields=new Array,_.fields.forEach(((_,E)=>{const A={..._,constructor:r(_.constructor)};this.fields.push([E,A])})),this.stride=_.stride}}const n=[R.Y$,R.gH,R.xs,R.Eq,R.jZ,R.Sx,R.qB,R.si,R.Xm,R.Aj,R.j0,R.E$,R.SL,R.LC,R.eI,R.XP,R.h,R.Yi,R.nS,R.Uz,R.P,R.An,R.H$,R.ml,R.bf,R.D6,R.m8,R.TX,R.Qt,R.mJ,R.Vp,R.E7,R.My,R.UL,R.zD,R.Y4];function r(_){return`${_.ElementType}_${_.ElementCount}`}function O(_){return i.get(_)}const i=new Map;n.forEach((_=>i.set(r(_),_)))},11868:(_,E,A)=>{A.d(E,{Wz:()=>e,oe:()=>T});var R=A(34275);function T(_,E=!1){return _<=R.y9?E?new Array(_).fill(0):new Array(_):new Float32Array(_)}function e(_){return(Array.isArray(_)?_.length:_.byteLength/8)<=R.y9?Array.from(_):new Float32Array(_)}},63907:(_,E,A)=>{var R,T,e,N,t,S,I,n,r,O,i,C,L,D,U,M,P,s,G,F,B,u,f,c,o,a,h;A.d(E,{Ab:()=>M,Ac:()=>n,Ap:()=>D,CQ:()=>V,Cj:()=>C,Fq:()=>H,H0:()=>P,H3:()=>U,Hr:()=>h,MT:()=>O,NV:()=>R,SB:()=>F,Tb:()=>t,WR:()=>e,Xo:()=>B,Y7:()=>I,bh:()=>W,dn:()=>N,eA:()=>i,iE:()=>G,j7:()=>s,ld:()=>u,nI:()=>p,pF:()=>L,pe:()=>r,r6:()=>l,vt:()=>a,yI:()=>d}),function(_){_[_.DEPTH=256]="DEPTH",_[_.STENCIL=1024]="STENCIL",_[_.COLOR=16384]="COLOR"}(R||(R={})),function(_){_[_.COLOR=6144]="COLOR",_[_.DEPTH=6145]="DEPTH",_[_.STENCIL=6146]="STENCIL",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(T||(T={})),function(_){_[_.POINTS=0]="POINTS",_[_.LINES=1]="LINES",_[_.LINE_LOOP=2]="LINE_LOOP",_[_.LINE_STRIP=3]="LINE_STRIP",_[_.TRIANGLES=4]="TRIANGLES",_[_.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",_[_.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(e||(e={})),function(_){_[_.ZERO=0]="ZERO",_[_.ONE=1]="ONE",_[_.SRC_COLOR=768]="SRC_COLOR",_[_.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",_[_.SRC_ALPHA=770]="SRC_ALPHA",_[_.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",_[_.DST_ALPHA=772]="DST_ALPHA",_[_.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",_[_.DST_COLOR=774]="DST_COLOR",_[_.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",_[_.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",_[_.CONSTANT_COLOR=32769]="CONSTANT_COLOR",_[_.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",_[_.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",_[_.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(N||(N={})),function(_){_[_.ADD=32774]="ADD",_[_.MIN=32775]="MIN",_[_.MAX=32776]="MAX",_[_.SUBTRACT=32778]="SUBTRACT",_[_.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(t||(t={})),function(_){_[_.ARRAY_BUFFER=34962]="ARRAY_BUFFER",_[_.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",_[_.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",_[_.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",_[_.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",_[_.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",_[_.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER",_[_.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"}(S||(S={})),function(_){_[_.FRONT=1028]="FRONT",_[_.BACK=1029]="BACK",_[_.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(I||(I={})),function(_){_[_.CW=2304]="CW",_[_.CCW=2305]="CCW"}(n||(n={})),function(_){_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.INT=5124]="INT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.FLOAT=5126]="FLOAT",_[_.HALF_FLOAT=5131]="HALF_FLOAT"}(r||(r={})),function(_){_[_.NEVER=512]="NEVER",_[_.LESS=513]="LESS",_[_.EQUAL=514]="EQUAL",_[_.LEQUAL=515]="LEQUAL",_[_.GREATER=516]="GREATER",_[_.NOTEQUAL=517]="NOTEQUAL",_[_.GEQUAL=518]="GEQUAL",_[_.ALWAYS=519]="ALWAYS"}(O||(O={})),function(_){_[_.ZERO=0]="ZERO",_[_.KEEP=7680]="KEEP",_[_.REPLACE=7681]="REPLACE",_[_.INCR=7682]="INCR",_[_.DECR=7683]="DECR",_[_.INVERT=5386]="INVERT",_[_.INCR_WRAP=34055]="INCR_WRAP",_[_.DECR_WRAP=34056]="DECR_WRAP"}(i||(i={})),function(_){_[_.NEAREST=9728]="NEAREST",_[_.LINEAR=9729]="LINEAR",_[_.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",_[_.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",_[_.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",_[_.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(C||(C={})),function(_){_[_.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",_[_.REPEAT=10497]="REPEAT",_[_.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(L||(L={})),function(_){_[_.TEXTURE_2D=3553]="TEXTURE_2D",_[_.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",_[_.TEXTURE_3D=32879]="TEXTURE_3D",_[_.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",_[_.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",_[_.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",_[_.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",_[_.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(D||(D={})),function(_){_[_.MIN_LOD=33082]="MIN_LOD",_[_.MAX_LOD=33083]="MAX_LOD",_[_.BASE_LEVEL=33084]="BASE_LEVEL",_[_.MAX_LEVEL=33085]="MAX_LEVEL",_[_.MAX_TEXTURE_SIZE=3379]="MAX_TEXTURE_SIZE"}(U||(U={})),function(_){_[_.ALPHA=6406]="ALPHA",_[_.RGB=6407]="RGB",_[_.RGBA=6408]="RGBA",_[_.LUMINANCE=6409]="LUMINANCE",_[_.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",_[_.RED=6403]="RED",_[_.RG=33319]="RG",_[_.RED_INTEGER=36244]="RED_INTEGER",_[_.RG_INTEGER=33320]="RG_INTEGER",_[_.RGB_INTEGER=36248]="RGB_INTEGER",_[_.RGBA_INTEGER=36249]="RGBA_INTEGER"}(M||(M={})),function(_){_[_.RGBA4=32854]="RGBA4",_[_.R16F=33325]="R16F",_[_.RG16F=33327]="RG16F",_[_.RGB32F=34837]="RGB32F",_[_.RGBA16F=34842]="RGBA16F",_[_.R32F=33326]="R32F",_[_.RG32F=33328]="RG32F",_[_.RGBA32F=34836]="RGBA32F",_[_.R11F_G11F_B10F=35898]="R11F_G11F_B10F",_[_.RGB8=32849]="RGB8",_[_.RGBA8=32856]="RGBA8",_[_.RGB5_A1=32855]="RGB5_A1",_[_.R8=33321]="R8",_[_.RG8=33323]="RG8",_[_.R8I=33329]="R8I",_[_.R8UI=33330]="R8UI",_[_.R16I=33331]="R16I",_[_.R16UI=33332]="R16UI",_[_.R32I=33333]="R32I",_[_.R32UI=33334]="R32UI",_[_.RG8I=33335]="RG8I",_[_.RG8UI=33336]="RG8UI",_[_.RG16I=33337]="RG16I",_[_.RG16UI=33338]="RG16UI",_[_.RG32I=33339]="RG32I",_[_.RG32UI=33340]="RG32UI",_[_.RGB16F=34843]="RGB16F",_[_.RGB9_E5=35901]="RGB9_E5",_[_.SRGB8=35905]="SRGB8",_[_.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",_[_.RGB565=36194]="RGB565",_[_.RGBA32UI=36208]="RGBA32UI",_[_.RGB32UI=36209]="RGB32UI",_[_.RGBA16UI=36214]="RGBA16UI",_[_.RGB16UI=36215]="RGB16UI",_[_.RGBA8UI=36220]="RGBA8UI",_[_.RGB8UI=36221]="RGB8UI",_[_.RGBA32I=36226]="RGBA32I",_[_.RGB32I=36227]="RGB32I",_[_.RGBA16I=36232]="RGBA16I",_[_.RGB16I=36233]="RGB16I",_[_.RGBA8I=36238]="RGBA8I",_[_.RGB8I=36239]="RGB8I",_[_.R8_SNORM=36756]="R8_SNORM",_[_.RG8_SNORM=36757]="RG8_SNORM",_[_.RGB8_SNORM=36758]="RGB8_SNORM",_[_.RGBA8_SNORM=36759]="RGBA8_SNORM",_[_.RGB10_A2=32857]="RGB10_A2",_[_.RGB10_A2UI=36975]="RGB10_A2UI"}(P||(P={})),function(_){_[_.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(s||(s={})),function(_){_[_.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",_[_.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(G||(G={})),function(_){_[_.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",_[_.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",_[_.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F"}(F||(F={})),function(_){_[_.STENCIL_INDEX8=36168]="STENCIL_INDEX8"}(B||(B={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",_[_.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",_[_.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",_[_.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.INT=5124]="INT",_[_.HALF_FLOAT=5131]="HALF_FLOAT",_[_.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",_[_.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",_[_.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",_[_.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(u||(u={})),function(_){_[_.STATIC_DRAW=35044]="STATIC_DRAW",_[_.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",_[_.STREAM_DRAW=35040]="STREAM_DRAW",_[_.STATIC_READ=35045]="STATIC_READ",_[_.DYNAMIC_READ=35049]="DYNAMIC_READ",_[_.STREAM_READ=35041]="STREAM_READ",_[_.STATIC_COPY=35046]="STATIC_COPY",_[_.DYNAMIC_COPY=35050]="DYNAMIC_COPY",_[_.STREAM_COPY=35042]="STREAM_COPY"}(f||(f={})),function(_){_[_.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",_[_.VERTEX_SHADER=35633]="VERTEX_SHADER"}(c||(c={})),function(_){_[_.FRAMEBUFFER=36160]="FRAMEBUFFER",_[_.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",_[_.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(o||(o={})),function(_){_[_.Texture=0]="Texture",_[_.TileTexture=1]="TileTexture",_[_.BufferObject=2]="BufferObject",_[_.VertexArrayObject=3]="VertexArrayObject",_[_.Shader=4]="Shader",_[_.Program=5]="Program",_[_.FramebufferObject=6]="FramebufferObject",_[_.Renderbuffer=7]="Renderbuffer",_[_.TransformFeedback=8]="TransformFeedback",_[_.Sync=9]="Sync",_[_.UNCOUNTED=10]="UNCOUNTED",_[_.LinesOfCode=10]="LinesOfCode",_[_.Uniform=11]="Uniform",_[_.COUNT=12]="COUNT"}(a||(a={})),function(_){_[_.NONE=0]="NONE",_[_.BACK=1029]="BACK"}(h||(h={}));const l=36064,d=36065,H=36066,p=33306;var V,X,Y,y,b,m,w,W,g;!function(_){_[_.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",_[_.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",_[_.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",_[_.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",_[_.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",_[_.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",_[_.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",_[_.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",_[_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(V||(V={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.FLOAT_VEC2=35664]="FLOAT_VEC2",_[_.FLOAT_VEC3=35665]="FLOAT_VEC3",_[_.FLOAT_VEC4=35666]="FLOAT_VEC4",_[_.INT=5124]="INT",_[_.INT_VEC2=35667]="INT_VEC2",_[_.INT_VEC3=35668]="INT_VEC3",_[_.INT_VEC4=35669]="INT_VEC4",_[_.BOOL=35670]="BOOL",_[_.BOOL_VEC2=35671]="BOOL_VEC2",_[_.BOOL_VEC3=35672]="BOOL_VEC3",_[_.BOOL_VEC4=35673]="BOOL_VEC4",_[_.FLOAT_MAT2=35674]="FLOAT_MAT2",_[_.FLOAT_MAT3=35675]="FLOAT_MAT3",_[_.FLOAT_MAT4=35676]="FLOAT_MAT4",_[_.SAMPLER_2D=35678]="SAMPLER_2D",_[_.SAMPLER_CUBE=35680]="SAMPLER_CUBE",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",_[_.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",_[_.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",_[_.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",_[_.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",_[_.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",_[_.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",_[_.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",_[_.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",_[_.SAMPLER_3D=35679]="SAMPLER_3D",_[_.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",_[_.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",_[_.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",_[_.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",_[_.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",_[_.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",_[_.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",_[_.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",_[_.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",_[_.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",_[_.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",_[_.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(X||(X={})),function(_){_[_.OBJECT_TYPE=37138]="OBJECT_TYPE",_[_.SYNC_CONDITION=37139]="SYNC_CONDITION",_[_.SYNC_STATUS=37140]="SYNC_STATUS",_[_.SYNC_FLAGS=37141]="SYNC_FLAGS"}(Y||(Y={})),function(_){_[_.UNSIGNALED=37144]="UNSIGNALED",_[_.SIGNALED=37145]="SIGNALED"}(y||(y={})),function(_){_[_.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",_[_.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",_[_.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",_[_.WAIT_FAILED=37149]="WAIT_FAILED"}(b||(b={})),function(_){_[_.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(m||(m={})),function(_){_[_.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(w||(w={})),function(_){_[_.INVALID_ENUM=1280]="INVALID_ENUM",_[_.INVALID_VALUE=1281]="INVALID_VALUE",_[_.INVALID_OPERATION=1282]="INVALID_OPERATION",_[_.OUT_OF_MEMORY=1285]="OUT_OF_MEMORY",_[_.INVALID_FRAMEBUFFER_OPERATION=1286]="INVALID_FRAMEBUFFER_OPERATION",_[_.CONTEXT_LOST_WEBGL=37442]="CONTEXT_LOST_WEBGL"}(W||(W={})),function(_){_[_.COMPLETION_STATUS_KHR=37297]="COMPLETION_STATUS_KHR"}(g||(g={}))},90239:(_,E,A)=>{function R(_){switch(_){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}A.d(E,{GJ:()=>R})},97146:(_,E,A)=>{A.d(E,{Dg:()=>e,my:()=>N,tM:()=>n,uW:()=>T});var R=A(34275);function T(_){return e(_,!0)}function e(_,E){if(Array.isArray(_)){if(_.length<R.y9)return _}else if(_.length<R.y9)return Array.from(_);let A=!0,T=!0;return _.some(((_,E)=>(A=A&&0===_,T=T&&_===E,!A&&!T))),A?function(_){if(1===_)return S;if(_<R.y9)return new Array(_).fill(0);if(_>O.length){const E=Math.max(2*O.length,_);O=new Uint8Array(E)}return new Uint8Array(O.buffer,0,_)}(_.length):T?n(_.length):(0,R.iu)(_)&&_.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?_:function(_,E){for(const A of _){if(A>=65536)return(0,R.iu)(_)?_:new Uint32Array(_);A>=256&&(E=!1)}return E?new Uint8Array(_):new Uint16Array(_)}(_,!E)}function N(_){return _<=R.y9?new Array(_):_<=65536?new Uint16Array(_):new Uint32Array(_)}let t=r(131072);const S=[0],I=(()=>{const _=new Uint16Array(65536);for(let E=0;E<_.length;++E)_[E]=E;return _})();function n(_){return 1===_?S:_<R.y9?Array.from(new Uint16Array(I.buffer,0,_)):_<I.length?new Uint16Array(I.buffer,0,_):(_>t.length&&(t=r(Math.max(2*t.length,_))),new Uint32Array(t.buffer,0,_))}function r(_){const E=new Uint32Array(_);for(let _=0;_<E.length;_++)E[_]=_;return E}let O=new Uint8Array(65536)}}]);
|