@arcgis/core 5.2.0-next.89 → 5.2.0-next.90
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/05fbd1f373cfa3724f0c.js +1 -0
- package/assets/esri/core/workers/chunks/{f7f2102b16d201e5f531.js → 0d2e2d90a4e4a28e2c0c.js} +1 -1
- package/assets/esri/core/workers/chunks/1554feab934e8e1bcd28.js +1 -0
- package/assets/esri/core/workers/chunks/{823dd85b008ae4db6793.js → 188c6ff5f4664827c254.js} +2 -2
- package/assets/esri/core/workers/chunks/{d30a7fc8dab4ebb8893b.js → 1ab8307ba9981124f669.js} +1 -1
- package/assets/esri/core/workers/chunks/{5ed89c862eee1345e3af.js → 20f7b5fe64a217cb3d3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{013a4ee14c44eb824c7c.js → 24c44541046576fee7e0.js} +2 -2
- package/assets/esri/core/workers/chunks/{f3716ce04d09af31cfb1.js → 2754ba5cc094028a7a3c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e8b4f12dfbf568377cef.js → 3a65693964e3976d8035.js} +1 -1
- package/assets/esri/core/workers/chunks/423c2692df662b3dddd4.js +1 -0
- package/assets/esri/core/workers/chunks/{996211727ed1617162da.js → 48726010778d6004e347.js} +2 -2
- package/assets/esri/core/workers/chunks/{680557b8832fbdab7f46.js → 4bf7c0c874d30b1c0760.js} +1 -1
- package/assets/esri/core/workers/chunks/{db180f8d25471cfa48af.js → 545bec045167c433af8f.js} +1 -1
- package/assets/esri/core/workers/chunks/5782c0362a1799ceef41.js +1 -0
- package/assets/esri/core/workers/chunks/{5bf65dbfd9c7a5ea187d.js → 5aa23b0f4521ba9a07ad.js} +1 -1
- package/assets/esri/core/workers/chunks/{eda04911553cf99fb99b.js → 606ac9358f508bda94f2.js} +1 -1
- package/assets/esri/core/workers/chunks/625a692f00357629f609.js +1 -0
- package/assets/esri/core/workers/chunks/{bd2602195e265f8fdb15.js → 69c9a12c97ead8963817.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f3bbc1f7d4abbbeec2f.js → 6ab7bb3834841834f839.js} +1 -1
- package/assets/esri/core/workers/chunks/{afa6b74d9ca9ed0154af.js → 6fd0d9431b141f2a3252.js} +1 -1
- package/assets/esri/core/workers/chunks/{3f82410d9f701e7ad8eb.js → 76e7d3cde2da4bdd7820.js} +1 -1
- package/assets/esri/core/workers/chunks/{ea75c23c44452f45a949.js → 7cf903db44f3647c8fd4.js} +1 -1
- package/assets/esri/core/workers/chunks/848a9f0e5373bbf289a5.js +1 -0
- package/assets/esri/core/workers/chunks/{a88bf8ae93077e1b48cf.js → 8a87e1a89a0d8c6203a7.js} +1 -1
- package/assets/esri/core/workers/chunks/{a3b403f8acb90af19adb.js → 91ac9328afff8a51bd96.js} +1 -1
- package/assets/esri/core/workers/chunks/{00181785a180e934bf7c.js → 91de343844ac578e7c93.js} +1 -1
- package/assets/esri/core/workers/chunks/{d871572997600930e017.js → 95a3f09751bff63f4fab.js} +1 -1
- package/assets/esri/core/workers/chunks/{ffe749d790320dddfa74.js → 97e41500fc2d24a88938.js} +1 -1
- package/assets/esri/core/workers/chunks/{6fe7060235f601b180ea.js → 98d614d6fc9de8ebaf94.js} +1 -1
- package/assets/esri/core/workers/chunks/{1e087fb13b7b0a5d6fec.js → 9d3cdfa08ef4d2805625.js} +1 -1
- package/assets/esri/core/workers/chunks/{0460ea5a85e9c3c2e1b7.js → a89dbef8155d7c4354da.js} +2 -2
- package/assets/esri/core/workers/chunks/{e9f29019aa78f07ace66.js → aed7b80145b22c246098.js} +1 -1
- package/assets/esri/core/workers/chunks/{4aefe6fd4d725a107758.js → b7ed5f130661e9ca00b9.js} +1 -1
- package/assets/esri/core/workers/chunks/c07d2fb9940b2c6eda9f.js +1 -0
- package/assets/esri/core/workers/chunks/{a8b878c12cb1a6ea012b.js → c4a0d3149947a1d2c484.js} +1 -1
- package/assets/esri/core/workers/chunks/{31a0620a6028e94c7532.js → c6ec0e966106f66360d9.js} +2 -2
- package/assets/esri/core/workers/chunks/{5df0639839a354cb2751.js → c7f69d010f1cb32f5d37.js} +1 -1
- package/assets/esri/core/workers/chunks/{23addf8b11938e0c96e9.js → cb983f65995e57fff7a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{f665fb4c5633e0a459d8.js → d24125a791247019e2ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{7b7d0e93689aab8da83d.js → d44338bf5edafa3ca926.js} +1 -1
- package/assets/esri/core/workers/chunks/{2ceb07b125c84b51f02a.js → d7d5275d8b3c9430de1f.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce227146fcaabf088da1.js → da8a314800944706511b.js} +1 -1
- package/assets/esri/core/workers/chunks/{705f459aab890fda134b.js → e018cbd97e6e0e4ca5c4.js} +1 -1
- package/assets/esri/core/workers/chunks/e55507e4114b34d1ef4e.js +1 -0
- package/assets/esri/core/workers/chunks/{6b06858bb9e976c1ef33.js → e594b6db9caee1f7b9fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{4057d97a4ec234978697.js → e90076ac1cf88a83a7f9.js} +1 -1
- package/assets/esri/core/workers/chunks/{e40e08029325f43452d0.js → f4d351b4cd9d1aa10632.js} +1 -1
- package/assets/esri/core/workers/chunks/f5f5b54cab722abe88e0.js +1 -0
- package/assets/esri/core/workers/chunks/{d8e2d78fc4526612aad6.js → ff83d0337ac489ab08de.js} +2 -2
- package/config.js +1 -1
- package/core/EuclideanDistanceTransform.js +2 -0
- package/geometry/support/convexPolyhedron.js +1 -1
- package/geometry/support/frustumPlanes.js +2 -0
- package/kernel.js +1 -1
- package/layers/ParquetLayer.d.ts +3 -2
- package/layers/ParquetLayer.js +1 -1
- package/layers/support/dataSeriesUtils.js +1 -1
- package/package.json +3 -3
- package/popup/FeatureContentCollection.d.ts +6 -0
- package/popup/FeatureContentCollection.js +1 -1
- package/rest/support/AlgorithmicColorRamp.d.ts +2 -2
- package/rest/support/types.d.ts +2 -2
- package/smartMapping/raster/support/colorRamps.d.ts +4 -3
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/CIMSymbolHelper.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/Rasterizer.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/symbols/cim/utils.js +1 -1
- package/views/2d/engine/webgl/GlyphSDFCreator.js +1 -1
- package/views/2d/engine/webgl/SDFConverter.js +1 -1
- package/views/2d/engine/webgl/SpriteMosaic.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterInputEvaluator.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
- package/views/2d/tiling/LODInfo.js +1 -1
- package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/state/Frustum.js +1 -1
- package/views/3d/state/controllers/RopePullController.js +1 -1
- package/views/3d/state/controllers/momentum/RopePullMomentumController.js +2 -0
- package/views/3d/support/SweptSphereVolume.js +2 -0
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/PatchRenderDataWaterproofness.js +1 -1
- package/views/3d/terrain/PlanarPatch.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserLineRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/Octree.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonIntersectionUtils.js +1 -1
- package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
- package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
- package/views/navigation/RopePullMomentumEstimator.js +2 -0
- package/views/support/LayerLayerViewInfo.js +1 -1
- package/views/support/LayerViewManager.js +1 -1
- package/widgets/Features/FeaturesViewModel.d.ts +6 -0
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/assets/esri/core/workers/chunks/028bee58f7bc19e5e39e.js +0 -1
- package/assets/esri/core/workers/chunks/39b6a5222f45cb8dbc94.js +0 -1
- package/assets/esri/core/workers/chunks/51c9bd7c03d780fadebc.js +0 -1
- package/assets/esri/core/workers/chunks/71308dca3fd05687e7bd.js +0 -1
- package/assets/esri/core/workers/chunks/8d8708789843844eb9e1.js +0 -1
- package/assets/esri/core/workers/chunks/9246e2468528650bdc7c.js +0 -1
- package/assets/esri/core/workers/chunks/94453d075ce02eff4844.js +0 -1
- package/assets/esri/core/workers/chunks/a176727a1148ca4fb432.js +0 -1
- package/assets/esri/core/workers/chunks/f106cc7f559856f69b9f.js +0 -1
- package/geometry/support/frustum.js +0 -2
- package/views/3d/layers/i3s/SweptSphereVolume.js +0 -2
- /package/assets/esri/core/workers/chunks/{823dd85b008ae4db6793.js.LICENSE.txt → 188c6ff5f4664827c254.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{013a4ee14c44eb824c7c.js.LICENSE.txt → 24c44541046576fee7e0.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{996211727ed1617162da.js.LICENSE.txt → 48726010778d6004e347.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{0460ea5a85e9c3c2e1b7.js.LICENSE.txt → a89dbef8155d7c4354da.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{d8e2d78fc4526612aad6.js.LICENSE.txt → ff83d0337ac489ab08de.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3902],{49403(e,t,r){r.d(t,["Eq",0,{Regular:0,Provenance:1,Document:2},"G3",0,{esriMergePolicyType_UNSPECIFIED:0,esriMergePolicyTypeSumValues:1,esriMergePolicyTypeAreaWeighted:2,esriMergePolicyTypeDefaultValue:3},"GH",0,{esriSplitPolicyType_UNSPECIFIED:0,esriSplitPolicyTypeGeometryRatio:1,esriSplitPolicyTypeDuplicate:2,esriSplitPolicyTypeDefaultValue:3},"bV",0,{esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},"nP",0,{esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},"r5",0,{esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},"ti",0,{esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},"vy",0,{esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2},"wr",0,{esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2}])},45724(e,t,r){r.d(t,{I:()=>s});var n=r(2741),a=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let i;async function s(){if(i)return i;const e=!!(0,a.A)("wasm-simd");return i=l(e),i}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367));return e({locateFile:e=>(0,n.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013));return t({locateFile:e=>(0,n.s)(o+e)})}},53902(e,t,r){r.r(t),r.d(t,{_checkAuthentication:()=>tn,_esriRequestWrapper:()=>en,_fetchWrapper:()=>Yr,_getClientDataCacheCopy:()=>vr,_setMaxQueryParsingDurationForTesting:()=>sn,_submitJobWrapper:()=>Xr,clearClientDataCache:()=>Wr,clientDataCache:()=>_r,executeAddDomain:()=>$r,executeAddGraphFieldIndex:()=>Dr,executeAddGraphProperties:()=>Rr,executeAddNamedTypes:()=>Cr,executeApplyEdits:()=>br,executeCreateReplica:()=>Vr,executeDeleteDomain:()=>Jr,executeDeleteGraphFieldIndex:()=>kr,executeDeleteGraphProperty:()=>Sr,executeDeleteNamedType:()=>Tr,executeFindPaths:()=>Lr,executeFindPathsAsynchronous:()=>qr,executeQuery:()=>Pr,executeQueryStreaming:()=>Ir,executeSearch:()=>Nr,executeSearchStreaming:()=>jr,executeUnregisterReplica:()=>Hr,executeUpdateDomain:()=>zr,executeUpdateGraphProperty:()=>xr,executeUpdateNamedType:()=>Mr,executeUpdateSearchIndex:()=>Gr,fetchAllClientDataKeys:()=>Or,fetchAsynchronousFindPathsResultData:()=>Kr,fetchClientDataAtKeys:()=>Zr,fetchKnowledgeGraph:()=>Ur,fetchReplicaDefinition:()=>Br,fetchReplicasInformation:()=>Qr,kgRestServices:()=>Ar,refreshDataModel:()=>Fr,refreshServiceDefinition:()=>Er});var n,a=r(70333),o=r(11254),i=r(49186),s=r(53966),l=r(17676),d=r(91075),c=r(16930),u=r(32198),p=r(69622),y=r(91429),h=r(56507),g=r(5443);let f=n=class extends p.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,u.Cg)([(0,y.MZ)({type:c.A})],f.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,y.MZ)({type:g.A})],f.prototype,"processExtent",void 0),(0,u.Cg)([(0,y.MZ)({type:c.A})],f.prototype,"processSpatialReference",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnColumnName",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnFeatureCollection",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnM",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnZ",void 0),f=n=(0,u.Cg)([(0,y.$K)("esri.rest.geoprocessor.GPOptions")],f);var m=r(52039),w=r(20437),_=r(25482);let v=class extends _.o{constructor(e){super(e),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,u.Cg)([(0,y.MZ)({type:g.A})],v.prototype,"extent",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"height",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"href",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"opacity",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"rotation",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"scale",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"visible",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"width",void 0),v=(0,u.Cg)([(0,y.$K)("esri.layers.support.MapImage")],v);var A=r(2272),b=r(2073),C=r(93223);let T=class extends _.o{constructor(e){super(e),this.area=0,this.units=null}};(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],T.prototype,"area",void 0),(0,u.Cg)([(0,C.e)(b.UO)],T.prototype,"units",void 0),T=(0,u.Cg)([(0,y.$K)("esri.rest.support.ArealUnit")],T);let M=class extends _.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],M.prototype,"itemId",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],M.prototype,"url",void 0),M=(0,u.Cg)([(0,y.$K)("esri.rest.support.DataFile")],M);var R=r(22671);let S=class extends _.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],S.prototype,"distance",void 0),(0,u.Cg)([(0,C.e)(b.Y8)],S.prototype,"units",void 0),S=(0,u.Cg)([(0,y.$K)("esri.rest.support.LinearUnit")],S);var x=r(66552);const D="multi-value-",k=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",GPTimeUnit:"time-unit",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${D}areal-unit`,"GPMultiValue:GPBoolean":`${D}boolean`,"GPMultiValue:GPComposite":`${D}composite`,"GPMultiValue:GPDataFile":`${D}data-file`,"GPMultiValue:GPDate":`${D}date`,"GPMultiValue:GPDouble":`${D}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${D}feature-record-set-layer`,"GPMultiValue:Field":`${D}field`,"GPMultiValue:GPLinearUnit":`${D}linear-unit`,"GPMultiValue:GPLong":`${D}long`,"GPMultiValue:GPRasterData":`${D}raster-data`,"GPMultiValue:GPRasterDataLayer":`${D}raster-data-layer`,"GPMultiValue:GPRecordSet":`${D}record-set`,"GPMultiValue:GPString":`${D}string`,"GPMultiValue:GPTimeUnit":`${D}time-unit`});let G=class extends _.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,u.Cg)([(0,C.e)(k,{ignoreUnknown:!1})],G.prototype,"dataType",void 0),(0,u.Cg)([(0,y.MZ)()],G.prototype,"paramName",void 0),(0,u.Cg)([(0,y.MZ)()],G.prototype,"value",void 0),G=(0,u.Cg)([(0,y.$K)("esri.rest.support.ParameterValue")],G);var P=r(36005);let I=class extends _.o{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,u.Cg)([(0,y.MZ)()],I.prototype,"format",void 0),(0,u.Cg)([(0,y.MZ)({json:{name:"itemID",write:!0}})],I.prototype,"itemId",void 0),(0,u.Cg)([(0,y.MZ)()],I.prototype,"type",void 0),(0,u.Cg)([(0,P.w)("type")],I.prototype,"readType",null),(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],I.prototype,"url",void 0),I=(0,u.Cg)([(0,y.$K)("esri.rest.support.RasterData")],I);var N=r(73133);let j=class extends _.o{constructor(e){super(e),this.time=0,this.units=null}};async function O(e,t){switch(e){case"time-unit":return j.fromJSON(t);case"areal-unit":return T.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 M.fromJSON(t);case"linear-unit":return S.fromJSON(t);case"feature-record-set-layer":if("url"in t)return M.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(5620),r.e(8278),r.e(7865),r.e(9953),r.e(6554),r.e(564),r.e(7552),r.e(1214),r.e(5051),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(2718),r.e(3781),r.e(5362)]).then(r.bind(r,53781))).default),{layerDefinition:n,featureSet:a}=t;return e.read({layerDefinition:n,featureSet:a},{origin:"portal-item"}),e.spatialReference=c.A.fromJSON(a.spatialReference??n.spatialReference??n.extent.spatialReference),e}return R.A.fromJSON(t);case"record-set":return"url"in t?M.fromJSON(t):R.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?v.fromJSON(t.mapImage):I.fromJSON(t);case"field":return w.A.fromJSON(t)}}function Z(e){return e.startsWith(D)}function U(e){return e.replace(D,"")}async function F(e){const t=k.fromJSON(e.dataType),{paramName:r}=e,n=Z(t)?await async function(e,t){const r=U(e),n="composite"===r?t.map(e=>O(k.fromJSON(e.dataType),e.value)):t.map(e=>O(r,e));return Promise.all(n)}(t,e.value):await O(t,e.value);return new G({dataType:t,paramName:r,value:n})}function E(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>E({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],j.prototype,"time",void 0),(0,u.Cg)([(0,C.e)(N.j)],j.prototype,"units",void 0),j=(0,u.Cg)([(0,y.$K)("esri.rest.support.TimeUnit")],j);var q,L=r(37807);const K=(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}),$=1e3;let z=class extends _.o{static{q=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,A.Dl)(r),a={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,o.A)(i,a),{messages:d,jobStatus:c,progress:u}=q.fromJSON(s);return this.set({messages:d,jobStatus:c,progress:u}),"job-cancelled"===c?this:new Promise((t,r)=>{(0,l.u7)(a.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,$);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)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,$)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{...e?.query,f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:a}=await(0,o.A)(n,r),{messages:i,jobStatus:s,progress:l}=q.fromJSON(a);return this.set({messages:i,jobStatus:s,progress:l}),this}async fetchResultData(e,t,r){t=f.from(t||{});const{returnColumnName:n,returnFeatureCollection:a,returnM:i,returnZ:s,outSpatialReference:l}=t,{path:d}=(0,A.Dl)(this.sourceUrl),c=E({returnColumnName:n||null,returnFeatureCollection:a||null,returnM:i||null,returnZ:s||null,outSR:l,returnType:"data",f:"json",...r?.query},null),u={...this.requestOptions,...r,query:c},p=`${d}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(p,u);return F(y)}async fetchResultImage(e,t,r){const{path:n}=(0,A.Dl)(this.sourceUrl),a=E({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:a},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(s,i);return F(l)}async fetchResultMapImageLayer(){const{path:e}=(0,A.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(8278),r.e(7865),r.e(6554),r.e(564),r.e(7552),r.e(1214),r.e(5051),r.e(2889),r.e(4674),r.e(893),r.e(8470),r.e(2733)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=$,signal:r,statusCallback:n,apiKey:a}=e;return new Promise((e,o)=>{(0,l.u7)(r,()=>{this.clearJobCompletionTimer(),o((0,l.NK)())}),this.clearJobCompletionTimer();const i=()=>{this._jobCompletionTimer||o((0,l.NK)()),this.checkJobStatus({query:{token:a}}).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(i,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":o(this);break;default:this._jobCompletionTimer=setTimeout(i,t)}}).catch(e=>{o(e)})};this._jobCompletionTimer=setTimeout(i,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,u.Cg)([(0,y.MZ)()],z.prototype,"jobId",void 0),(0,u.Cg)([(0,C.e)(K,{ignoreUnknown:!1})],z.prototype,"jobStatus",void 0),(0,u.Cg)([(0,y.MZ)({type:[L.A]})],z.prototype,"messages",void 0),(0,u.Cg)([(0,y.MZ)()],z.prototype,"progress",void 0),(0,u.Cg)([(0,y.MZ)()],z.prototype,"requestOptions",void 0),(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],z.prototype,"sourceUrl",void 0),z=q=(0,u.Cg)([(0,y.$K)("esri.rest.support.JobInfo")],z);let J=class extends p.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1,this.dataModelTimestamp=null}};(0,u.Cg)([(0,y.MZ)()],J.prototype,"headerKeys",void 0),(0,u.Cg)([(0,y.MZ)()],J.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,y.MZ)()],J.prototype,"exceededTransferLimit",void 0),(0,u.Cg)([(0,y.MZ)()],J.prototype,"dataModelTimestamp",void 0),J=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],J);let V=class extends p.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new J}};(0,u.Cg)([(0,y.MZ)()],V.prototype,"resultRows",void 0),(0,u.Cg)([(0,y.MZ)()],V.prototype,"resultHeader",void 0),V=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResult")],V);let B=class extends p.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new J}};(0,u.Cg)([(0,y.MZ)()],B.prototype,"resultRowsStream",void 0),(0,u.Cg)([(0,y.MZ)()],B.prototype,"resultHeader",void 0),B=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],B);var Q=r(8631);let H=class extends _.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"unique",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"ascending",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"description",void 0),(0,u.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],H.prototype,"fieldNames",void 0),H=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.FieldIndex")],H);let W=class extends _.o{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.domain=null,this.defaultValue=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"alias",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"fieldType",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"geometryType",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasM",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasZ",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"nullable",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"editable",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"required",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"defaultVisibility",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"systemMaintained",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"role",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"domain",void 0),(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],W.prototype,"defaultValue",void 0),W=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphProperty")],W);let Y=class extends _.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"alias",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"role",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"strict",void 0),(0,u.Cg)([(0,y.MZ)({type:[W],json:{write:!0}})],Y.prototype,"properties",void 0),(0,u.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],Y.prototype,"fieldIndexes",void 0),Y=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphObjectType")],Y);let X=class extends Y{constructor(e){super(e),this.type="entity"}};X=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.EntityType")],X);let ee=class extends Y{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],ee.prototype,"endPoints",void 0),ee=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.RelationshipType")],ee);let te=class extends _.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"value",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"behavior",void 0),te=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],te);let re=class extends _.o{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=[],this.domains=[]}};(0,u.Cg)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],re.prototype,"timestamp",void 0),(0,u.Cg)([(0,y.MZ)({type:c.A,json:{write:!0}})],re.prototype,"spatialReference",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"strict",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"objectIdField",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"globalIdField",void 0),(0,u.Cg)([(0,y.MZ)()],re.prototype,"arcgisManaged",void 0),(0,u.Cg)([(0,y.MZ)()],re.prototype,"identifierInfo",void 0),(0,u.Cg)([(0,y.MZ)()],re.prototype,"searchIndexes",void 0),(0,u.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"entityTypes",void 0),(0,u.Cg)([(0,y.MZ)({type:[ee],json:{write:!0}})],re.prototype,"relationshipTypes",void 0),(0,u.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"metaEntityTypes",void 0),(0,u.Cg)([(0,y.MZ)({type:[te],json:{write:!0}})],re.prototype,"provenanceSourceTypeValues",void 0),(0,u.Cg)([(0,y.MZ)({types:[Q.g],json:{write:!0}})],re.prototype,"domains",void 0),re=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.DataModel")],re);let ne=class extends _.o{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,u.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ne.prototype,"capabilities",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsSearch",void 0),(0,u.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ne.prototype,"supportedQueryFormats",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"allowGeometryUpdates",void 0),(0,u.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"searchMaxRecordCount",void 0),(0,u.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ne.prototype,"serviceCapabilities",void 0),(0,u.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"maxRecordCount",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"description",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"copyrightText",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"units",void 0),(0,u.Cg)([(0,y.MZ)({type:c.A,json:{write:!0}})],ne.prototype,"spatialReference",void 0),(0,u.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"currentVersion",void 0),(0,u.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ne.prototype,"dateFieldsTimeReference",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"serviceItemId",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsDocuments",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"dataEditingNotSupported",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"schemaEditingNotSupported",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsProvenance",void 0),ne=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ServiceDefinition")],ne);let ae=class extends _.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function oe(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function ie(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function se(e,t,r,n=!1){const a=new r.ClientDataFetchRequestEncoder;a.deleteLater();for(const o of e){const e=le(o,t,r,n);a.add_client_data_fetch_request_parameter(e)}a.encode();const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}function le(e,t,r,n){const a=new r.ClientDataKey;a.deleteLater(),a.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(a);const i=t.get(e);return i&&!n&&(o.v_tag={v_tag:i.version}),o}(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"url",void 0),(0,u.Cg)([(0,y.MZ)({type:re,json:{write:!0}})],ae.prototype,"dataModel",void 0),(0,u.Cg)([(0,y.MZ)({type:ne,json:{write:!0}})],ae.prototype,"serviceDefinition",void 0),ae=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.KnowledgeGraph")],ae);var de=r(45724),ce=r(48526),ue=r(86738),pe=r(39829),ye=r(82799);const he={exclude:0,include:1};function ge(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(we(e,t))}),r}function fe(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,a]of Object.entries(e))r.set_key_value(n,we(a,t));return r}function me(e,t){if(e instanceof ce.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=[],a=[];a[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(a),r}(e,t);if(e instanceof ue.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=[],a=[];a[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(a),r}(e,t);if(e instanceof ye.A||e instanceof pe.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],a=[];let o=[];e instanceof ye.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof pe.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let i=0,s=0;return o.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),a[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(a),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function we(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof d.A)return me(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(we(e,t))}),r}return fe(e,t)}var _e=r(49403);function ve(e,t){if(!e.typeName)throw new i.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,a]of Object.entries(e.properties))r.set_key_value(n,Se(a,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,a]of Object.entries(e.properties))r.set_key_value(n,Se(a,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 i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Ae(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}}function be(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:_e.r5[e.fieldType]},r.geometry_type={value:e.geometryType?_e.bV[e.geometryType]:_e.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:_e.ti[e.role]},r.default_value=Se(e.defaultValue,t),r.domain=e.domain??"",r}function Ce(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function Te(e,t,r,n){const a=new t.Domain;a.deleteLater(),a.name=e.name;const o=_e.r5[r];a.field_type={value:o};let i=o;if(o!==_e.r5.esriFieldTypeTimeOnly&&o!==_e.r5.esriFieldTypeDateOnly&&o!==_e.r5.esriFieldTypeTimestampOffset||(i=_e.r5.esriFieldTypeString),n&&(a.merge_policy_type={value:_e.G3[n.mergePolicy]},a.split_policy_type={value:_e.GH[n.splitPolicy]}),"coded-value"===e.type){const r=e;a.type="codedValue";const n=new t.CodedValueDomain;n.deleteLater();for(const e of r.codedValues){const r=new t.CodedValue;r.deleteLater(),r.name=e.name,r.set_code(e.code,{value:i}),n.add_coded_value(r)}a.coded_value_domain=n}else if("range"===e.type){const r=e;a.type="range";const n=new t.RangeDomain;n.deleteLater(),n.add_value(r.minValue,{value:i}),n.add_value(r.maxValue,{value:i}),a.range_domain=n}else a.type=e.type??"unspecified";return a}function Me(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:_e.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=be(n,t);r.add_property(e)}return r}function Re(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function Se(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof d.A?me(e,t):null}function xe(e,t){const r=new t.EntityTypeReplicaDefinition;return r.deleteLater(),ke(e,t,r),e.documentOptions&&(r.document_options=function(e,t){const r=e.includeConnectedDocuments?function(e,t){const r=Ge(e.includeDocumentProvenance?{includeProvenance:!0,includeSourceDocuments:e.includeDocumentSourceDocuments}:{includeProvenance:!1},t),n=new t.IncludeConnectedDocuments(r);return n.deleteLater(),n}(e,t):void 0,n=new t.DocumentOptions(r);return n.deleteLater(),n}(e.documentOptions,t)),r}function De(e,t){const r=new t.RelationshipTypeReplicaDefinition;return r.deleteLater(),ke(e,t,r),r}function ke(e,t,r){if(r.type_name=e.typeName,r.open_cypher_where_clause=e.openCypherWhereClause??"",e.provenanceOptions&&(r.provenance_options=Ge(e.provenanceOptions,t)),e.parameters)for(const[n,a]of Object.entries(e.parameters))void 0!==a&&r.add_parameter(n,we(a,t));return r}function Ge(e,t){const r=function(e,t){const r=new t.IncludeProvenance("includeSourceDocuments"in e&&e.includeSourceDocuments);return r.deleteLater(),r}(e,t),n=new t.ProvenanceOptions(r);return n.deleteLater(),n}let Pe=class extends p.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"decoderError",void 0),(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"resultsCount",void 0),(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"results",void 0),(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"updatedKnowledgeGraph",void 0),Pe=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Pe);const Ie=Pe;let Ne=class extends Ie{constructor(e){super(e)}};Ne=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Ne);const je=Ne;let Oe=class extends Ie{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"entityAddResultsCount",void 0),(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"relationshipAddResultsCount",void 0),(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"entityAddResults",void 0),(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"relationshipAddResults",void 0),Oe=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Oe);const Ze=Oe;let Ue=class extends Ie{constructor(e){super(e)}};Ue=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Ue);const Fe=Ue;let Ee=class extends p.A{constructor(e){super(e),this.decoderError=null,this.updatedKnowledgeGraph=null}};(0,u.Cg)([(0,y.MZ)()],Ee.prototype,"decoderError",void 0),(0,u.Cg)([(0,y.MZ)()],Ee.prototype,"updatedKnowledgeGraph",void 0),Ee=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelSingletonOperationResult")],Ee);const qe=Ee;let Le=class extends Ie{constructor(e){super(e)}};Le=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],Le);const Ke=Le;let $e=class extends Ie{constructor(e){super(e),this.warnings=[]}};(0,u.Cg)([(0,y.MZ)()],$e.prototype,"warnings",void 0),$e=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],$e);const ze=$e;let Je=class extends Ie{constructor(e){super(e)}};Je=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],Je);const Ve=Je;let Be=class extends Ie{constructor(e){super(e)}};Be=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Be);const Qe=Be;let He=class extends Ie{constructor(e){super(e)}};He=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],He);const We=He;let Ye=class extends Ie{constructor(e){super(e)}};Ye=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],Ye);const Xe=Ye;function et(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:ie(t.get_error())})}return r}function tt(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),a=new Ze({resultsCount:t,results:et(e,t),decoderError:ie(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),o=r.get_error();a.entityAddResults.push({name:n,error:ie(o)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),o=r.get_error();a.relationshipAddResults.push({name:n,error:ie(o)})}return a}function rt(e){const t=e.get_results_count();return new Qe({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function nt(e){const t=e.get_results_count(),r=[];for(let t=0;t<e.get_warnings_count();t++){const n=ie(e.get_warning_at(t));null!=n&&r.push(n)}const n=et(e,t);return new ze({resultsCount:t,results:n,warnings:r,decoderError:ie(e.error)})}function at(e){const t=e.get_results_count();return new Fe({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function ot(e){const t=e.get_results_count();return new Ve({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function it(e){const t=e.get_results_count();return new We({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function st(e){const t=e.get_results_count();return new Xe({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function lt(e){const t=e.get_results_count();return new je({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function dt(e){const t=e.get_results_count();return new Ke({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function ct(e){return new qe({decoderError:ie(e.error)})}var ut=r(93637),pt=r(64108),yt=r(39357),ht=r(53177),gt=r(76357),ft=r(41628);let mt=class extends p.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,u.Cg)([(0,y.MZ)()],mt.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)()],mt.prototype,"supportedCategory",void 0),(0,u.Cg)([(0,y.MZ)()],mt.prototype,"analyzers",void 0),(0,u.Cg)([(0,y.MZ)()],mt.prototype,"searchProperties",void 0),mt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SearchIndex")],mt);var wt=r(25927),_t=(r(77901),r(40662)),vt=r(42095),At=r(23150);function bt(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=Ct(e,r),{coords:a,geometry_type:o,lengths:s}=e;if(o.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=a[l],l++;t.push(e)}r.paths.push(t)}),r}function Ct(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}const Tt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function Mt(e,t){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 1:return function(e,t){const r={spatialReference:t};let n=2;Ct(e,r);const a=e.coords;return r.x=a[0],r.y=a[1],e.has_z&&(r.z=a[n],n++),e.has_m&&(r.m=a[n]),new ue.A(r)}(e,t);case 2:return function(e,t){const r={spatialReference:t},n=Ct(e,r),a=e.lengths,o=e.coords,i=a[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=o[s],s++;r.points.push(e)}return new ce.A(r)}(e,t);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:a}=bt(e,3);return new ye.A({paths:r,hasM:n,hasZ:a,spatialReference:t})}(e,t);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:a}=bt(e,4);return new pe.A({rings:r,hasM:n,hasZ:a,spatialReference:t})}(e,t);case 5:case 7:return Tt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return Tt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}return Tt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null}function Rt(e,t,r){return((e,t,r)=>{if(!function(e){return null!=e&&"object"==typeof e&&"object_value_type"in e}(e))return Mt(e,r);if(t)switch(e.object_value_type.value){case 0:return function(e,t,r){return new _t.A(xt(e,t,r))}(e,t,r);case 1:return St(e,t,r);case 2:return Dt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),a=e.relationship_count(),o=[];for(let i=0;i<n;i++)o.push(St(e.get_entity_at(i),t,r)),i<a&&o.push(Dt(e.get_relationship_at(i),t,r));return new vt.A({path:o})}(e,t,r);case 4:return function(e,t,r){const n=[],a=e.count();for(let o=0;o<a;o++){const a=e.get_value_at(o);n.push(Rt(a,t,r))}return n}(e,t,r);default:return Tt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}return Tt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null})(e,t,r)}function St(e,t,r){const n=e.type_name,a=xt(e,t,r),o=e.get_id();return new wt.A(Object.assign({typeName:n,id:o},a))}function xt(e,t,r){const n={},a=e.key_count();for(let o=0;o<a;o++)n[e.get_key_at(o)]=Rt(e.get_value_at(o),t,r);return{properties:n}}function Dt(e,t,r){const n=e.type_name,a=xt(e,t,r);return new At.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},a))}function kt(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 c.A(e.get_out_sr());return new J({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit(),dataModelTimestamp:e.data_model_timestamp?new Date(e.data_model_timestamp):null})}let Gt=!1;function Pt(e){return e.deleteLater(),new X(Nt(e))}function It(e){return e.deleteLater(),new H({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:qt(e.fields)})}function Nt(e){return{name:e.name,alias:e.alias,role:(0,ut.i7)(_e.Eq,e.role.value),strict:e.strict,properties:Lt(e.properties),fieldIndexes:Kt(e.field_indexes)}}function jt(e){return e.deleteLater(),new W({alias:e.alias,name:e.name,fieldType:(0,ut.i7)(_e.r5,e.field_type.value)??void 0,geometryType:(0,ut.i7)(_e.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:(0,ut.i7)(_e.ti,e.role.value),defaultValue:Mt(e.default_value,new c.A({wkid:4326})),domain:e.domain})}let Ot=class extends gt.A{};function Zt(e){return 2===e.get_domain_type().value?new ft.A({name:e.name,minValue:e.range_domain.value_at(0),maxValue:e.range_domain.value_at(1)}):1===e.get_domain_type().value?new ht.A({name:e.name,codedValues:Bt(e)}):new Ot({name:e.name})}function Ut(e){e.deleteLater();const t=Nt(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 ee(Object.assign({endPoints:r},t))}function Ft(e){return new te({behavior:e.behavior,value:e.value})}function Et(e){const t=[];for(let r=0;r<e.size();r++)t.push(Pt(e.get(r)));return e.delete(),t}function qt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function Lt(e){const t=[];for(let r=0;r<e.size();r++){const n=jt(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(Gt=!0),t.push(n)}return e.delete(),t}function Kt(e){const t=[];for(let r=0;r<e.size();r++)t.push(It(e.get(r)));return e.delete(),t}function $t(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ut(e.get(r)));return e.delete(),t}function zt(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(Ft(n))}return e.delete(),t}function Jt(e){const t=[];for(let r=0;r<e.size();r++){const n=new mt,a=e.get(r);n.name=a.name,n.supportedCategory=(0,ut.i7)(_e.nP,a.supported_category.value);const o=a.analyzers.size();for(let e=0;e<o;e++)n.analyzers.push({name:a.analyzers.get(e).name});a.analyzers.delete();for(let e=0;e<a.search_properties.keys().size();e++){const t=a.search_properties.keys().get(e),r=a.search_properties.get(t),o=[];for(let e=0;e<r.property_names.size();e++)o.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:o})}t.push(n)}return e.delete(),t}function Vt(e){const t=[];for(let r=0;r<e.domains_count();r++){const n=e.domain_at(r);n.deleteLater(),t.push(Zt(n))}return t}function Bt(e){const t=[];for(let r=0;r<e.coded_value_domain.coded_values_count();r++){const n=e.coded_value_domain.coded_value_at(r);n.deleteLater(),t.push(new yt.A({name:n.name,code:n.get_code()}))}return t}Ot=(0,u.Cg)([(0,pt.$)("esri.rest.knowledgeGraph.wasmInterface.wasmToDataModelFactories")],Ot);let Qt=class extends p.A{constructor(e){super(e),this.asyncStatusUrl=null,this.createReplicaResult=null}};(0,u.Cg)([(0,y.MZ)()],Qt.prototype,"asyncStatusUrl",void 0),(0,u.Cg)([(0,y.MZ)()],Qt.prototype,"createReplicaResult",void 0),Qt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.CreateReplicaResponse")],Qt);let Ht=class extends p.A{constructor(e){super(e),this.replicaName=null,this.replicaId=null,this.replicaOwner=null,this.lastSyncDate=null,this.creationDate=null,this.syncDirection=null,this.replicaFilters=null}};(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaName",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaId",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaOwner",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"lastSyncDate",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"creationDate",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"syncDirection",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaFilters",void 0),Ht=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicaDefinition")],Ht);let Wt=class extends p.A{constructor(e){super(e),this.replicas=[]}};(0,u.Cg)([(0,y.MZ)()],Wt.prototype,"replicas",void 0),Wt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicasInformationResponse")],Wt);let Yt=class extends p.A{constructor(e){super(e),this.decoderError=null,this.unregisterReplicaResults=[]}};(0,u.Cg)([(0,y.MZ)()],Yt.prototype,"decoderError",void 0),(0,u.Cg)([(0,y.MZ)()],Yt.prototype,"unregisterReplicaResults",void 0),Yt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.UnregisterReplicaResponse")],Yt);const Xt=new c.A({wkid:4326});function er(e,t){const r=[];for(let n=0;n<e;n++){const e=ie(t.get_warning_at(n));e&&r.push(e)}return r}function tr(e,t){const r=[];for(let n=0;n<e;n++){const e=ie(t.get_error_at(n));e&&r.push(e)}return r}function rr(e){return{replicaName:e.get_replica_name(),replicaId:e.get_replica_id(),lastSyncDate:gr(e.get_last_sync_date())}}function nr(e){return{replicaId:e.get_replica_id(),error:e.has_error()?ie(e.get_error()):void 0}}function ar(e,t){const r=e.get_static_definition();return r.deleteLater(),{inputQuantizationParameters:void 0,inputSpatialReference:new c.A(e.input_spatial_reference),staticDefinition:or(r,t)}}function or(e,t){const r=[],n=[];for(let n=0;n<e.get_entity_type_replica_definition_count();n++){const a=e.get_entity_type_replica_definition_at(n);a.deleteLater(),r.push(ir(a,t))}for(let r=0;r<e.get_relationship_type_replica_definition_count();r++){const a=e.get_relationship_type_replica_definition_at(r);a.deleteLater(),n.push(sr(a,t))}return{entityTypeReplicaDefinitions:r,relationshipTypeReplicaDefinitions:n}}function ir(e,t){const r=e.document_options.get_include_connected_documents();return r?.deleteLater(),{...lr(e,t),documentOptions:r?cr(r):{includeConnectedDocuments:!1}}}function sr(e,t){return lr(e,t)}function lr(e,t){const r=e.provenance_options;r.deleteLater();const n={},a=e.get_parameter_count();for(let r=0;r<a;r++)n[e.get_parameter_key_at(r)]=dr(e.get_parameter_value_at(r),t);return{typeName:e.type_name,openCypherWhereClause:e.open_cypher_where_clause,provenanceOptions:ur(r),parameters:a?n:void 0}}function dr(e,t){return Rt(e,t,Xt)}function cr(e){const t=e.get_provenance_options();t.deleteLater();const r=ur(t);return r.includeProvenance?{includeConnectedDocuments:!0,includeDocumentProvenance:!0,includeDocumentSourceDocuments:r.includeSourceDocuments}:{includeConnectedDocuments:!0,includeDocumentProvenance:!1}}function ur(e){const t=e.get_include_provenance();return t?{includeProvenance:!0,includeSourceDocuments:pr(t)}:{includeProvenance:!1}}function pr(e){return e.get_include_source_documents()}function yr(e,t){const r=e.value,n=t.SyncDirection;if(r===n.BIDIRECTIONAL.value)return"bidirectional";if(r===n.UPLOAD.value)return"upload";if(r===n.DOWNLOAD.value)return"download";throw new i.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction value: ${r}`)}function hr(e){switch(e.value){case 0:return;case 1:return"pbf";case 2:return"spbf";case 3:return"geoparquet";case 4:return"sqlite";default:throw new i.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format value: ${e.value}`)}}function gr(e){return e?new Date(e):null}let fr=class extends p.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.username=null,this.timestamp=null,this.editResults=[],this.cascadeRelationshipDeleteResults=[],this.cascadeProvenanceDeleteResults=[]}};(0,u.Cg)([(0,y.MZ)()],fr.prototype,"hasError",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"error",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"username",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"timestamp",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"editResults",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"cascadeRelationshipDeleteResults",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"cascadeProvenanceDeleteResults",void 0),fr=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],fr);const mr=fr;function wr(e){const t=e.has_error(),r=function(e){const t=e.get_apply_edits_metadata();t.deleteLater();const r=t.get_username(),n=t.get_timestamp();return{username:r,timestamp:null!=n?new Date(n):null}}(e),n=new mr({hasError:t,error:t?ie(e.error):null});n.username=r.username,n.timestamp=r.timestamp;const a=e.get_edit_results_count();for(let t=0;t<a;t++){const r=e.get_edit_results_at(t);r.deleteLater();const a=e.get_edit_results_type_name_at(t),o=[],i=[],s=[],l=r.get_add_results_count(),d=r.get_update_results_count(),c=r.get_delete_results_count();for(let e=0;e<l;e++){const t=r.get_add_result_at(e);t.deleteLater(),o.push({id:t.id,error:ie(t.error)})}for(let e=0;e<d;e++){const t=r.get_update_result_at(e);t.deleteLater(),i.push({id:t.id,error:ie(t.error)})}for(let e=0;e<c;e++){const t=r.get_delete_result_at(e);t.deleteLater(),s.push({id:t.id,error:ie(t.error)})}n.editResults.push({typeName:a,adds:o,updates:i,deletes:s})}const o=e.get_cascaded_rel_deletes_count();for(let t=0;t<o;t++){const r=e.get_cascaded_rel_deletes_at(t);r.deleteLater();const a=e.get_cascaded_rel_deletes_type_name_at(t),o=[];for(let e=0;e<r.get_count();e++){const t=r.get_result_at(e);t.deleteLater(),o.push({id:t.id,originId:t.origin_id,destinationId:t.dest_id,error:ie(t.error)})}n.cascadeRelationshipDeleteResults.push({typeName:a,cascadeRelationshipDeletes:o})}if(e.has_cascading_provenance_deletes()){const t=e.get_cascading_provenance_deletes();t.deleteLater();const r=t.get_count();for(let e=0;e<r;e++){const r=t.get_result_at(e);r.deleteLater(),n.cascadeProvenanceDeleteResults.push({id:r.id,error:ie(r.error)})}}return n}const _r=new Map,vr=()=>new Map(_r.entries()),Ar={fetchKnowledgeGraph:async e=>{const t=new ae({url:e}),r=[];return r.push(Fr(t)),r.push(Er(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await cn(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 ne(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],a=(await en(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,o=`/rest/services/${a&&a<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await Xr(`${n}${o}`,{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 i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],a=(await en(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,o=`/rest/services/${a&&a<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await en(`${n}${o}`,{method:"post",query:{f:"json",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let l;for(const e of s.data.results)if("out_results_string"===e.paramName){l=e.value;break}if(!l)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return l},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 tn(e);const a=await nn(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");a.data.body=await async function(e,t){const r=await(0,de.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,a]of Object.entries(e.bindParameters))rn(t,a,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 Fr(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.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 i.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 i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.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:he[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const a=n.get_encoding_result();if(0!==a.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:a.error.error_code,errorMessage:a.error.error_message});return structuredClone(a.get_byte_buffer())}(t,e);const o=await Yr(a.data.url,a.data);if(e.dataModel){const t=await dn(o,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported||null!=e.dataModel.arcgisManaged&&!e.dataModel.arcgisManaged)throw new i.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 tn(e);const a=await nn(n,r);return a.data.body=await async function(e,t){if(t.dataModel||await Fr(t),!t.dataModel)throw new i.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,de.I)(),n=!!e.options?.cascadeDelete,a=!!e.options?.cascadeProvenanceDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?Ae(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n,o.cascade_delete_provenance=a;try{let t;e.entityAdds?.forEach(e=>{t=o.add_entity(ve(e,r)),oe(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 i.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=o.add_relationship(ve(e,r)),oe(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 i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_entity(ve(e,r)),oe(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 i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_relationship(ve(e,r)),oe(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 i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.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 i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),o.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=o.get_encoding_result();return oe(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(s.get_byte_buffer())}(t,e),async function(e){return an(e,(await(0,de.I)()).GraphApplyEditsDecoder,wr)}(await Yr(a.data.url,a.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.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 tn(e);const a=await nn(n,r);a.data.body=await async function(e){const t=await(0,de.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(),Me(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 Me(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(n.get_byte_buffer())}(t);const o=await Yr(a.data.url,a.data),s=await async function(e){return an(e,(await(0,de.I)()).GraphNamedObjectTypeAddsResponseDecoder,tt)}(o);return s.updatedKnowledgeGraph=await Ur(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.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 tn(e);const a=await nn(n,r);a.data.body="";const o=await Yr(a.data.url,a.data),s=await async function(e){return an(e,(await(0,de.I)()).GraphNamedObjectTypeDeleteResponseDecoder,nt)}(o);return s.updatedKnowledgeGraph=await Ur(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(a.deleteLater(),r.entityTypes.some(e=>e.name===t))a.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),Re(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");a.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),Re(e,r)}(e,n))}a.update_alias=e.hasOwnProperty("alias");try{a.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(o.get_byte_buffer())}(r,t,e.dataModel);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphNamedObjectTypeUpdateResponseDecoder,rt)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(be(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(n.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphPropertyAddsResponseDecoder,at)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=new((await(0,de.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphPropertyDeleteResponseDecoder,ot)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeUpdateGraphProperty:async(e,t,r,n,a)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await tn(e);const s=await nn(o,a);s.data.body=await async function(e,t){const r=await(0,de.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=Se(e.defaultValue,t)),e.hasOwnProperty("domain")&&(r.domain=e.domain),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue"),n.update_domain=t.hasOwnProperty("domain");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const a=n.get_encoding_result();return oe(a.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(a.get_byte_buffer())}(r,n);const l=await Yr(s.data.url,s.data),d=await async function(e){return an(e,(await(0,de.I)()).GraphPropertyUpdateResponseDecoder,it)}(l);return d.updatedKnowledgeGraph=await Ur(e.url),d},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),structuredClone(n.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphIndexAddsResponseDecoder,lt)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=new((await(0,de.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),structuredClone(r.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphIndexDeleteResponseDecoder,dt)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const a=`${e.url}/dataModel/searchIndex/update`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e,t){const r=await(0,de.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,Ce(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,Ce(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const a=n.get_encoding_result();return oe(a.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(a.get_byte_buffer())}(t,r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphUpdateSearchIndexResponseDecoder,st)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeAddDomain:async(e,t,r,{mergePolicy:n="esriMergePolicyTypeDefaultValue",splitPolicy:a="esriSplitPolicyTypeDefaultValue"},o)=>{const s=`${e.url}/dataModel/domains/add`;await tn(e);const l=await nn(s,o);l.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphDomainAddRequestEncoder;a.deleteLater(),a.set_domain(Te(e,n,t,r));try{a.encode()}catch(e){throw new i.A("knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(o.get_byte_buffer())}(t,r,{mergePolicy:n,splitPolicy:a});const d=await Yr(l.data.url,l.data),c=await async function(e){return an(e,(await(0,de.I)()).GraphDomainAddResponseDecoder,ct)}(d);return c.updatedKnowledgeGraph=await Ur(e.url),c},executeUpdateDomain:async(e,t,r,n,a)=>{const o=`${e.url}/dataModel/domains/${t.name}/update`;await tn(e);const s=await nn(o,a);s.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphDomainUpdateRequestEncoder;a.deleteLater(),a.set_domain(Te(e,n,t,r)),a.update_domain=!0,r?.mergePolicy&&(a.update_merge_policy=!0),r?.splitPolicy&&(a.update_split_policy=!0);try{a.encode()}catch(e){throw new i.A("knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(o.get_byte_buffer())}(t,r,n);const l=await Yr(s.data.url,s.data),d=await async function(e){return an(e,(await(0,de.I)()).GraphDomainUpdateResponseDecoder,ct)}(l);return d.updatedKnowledgeGraph=await Ur(e.url),d},executeDeleteDomain:async(e,t,r)=>{const n=`${e.url}/dataModel/domains/${t}/delete`;if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a domain from the data model contained missing or empty domain name");await tn(e);const a=await nn(n,r);a.data.body="";const o=await Yr(a.data.url,a.data),s=await async function(e){return an(e,(await(0,de.I)()).GraphDomainDeleteResponseDecoder,ct)}(o);return s.updatedKnowledgeGraph=await Ur(e.url),s},executeCreateReplica:async(e,t,r)=>{const n=`${e.url}/replicas/create`;await tn(e);const a=await nn(n,r);return a.data.body=await async function(e){const t=function(e,t){const r=new t.CreateReplicaRequestEncoder;return r.deleteLater(),e.requestedReplicaId&&(r.replica_id=e.requestedReplicaId),e.requestedReplicaName&&(r.requested_replica_name=e.requestedReplicaName),r.sync_direction=function(e,t){const r=t.SyncDirection,n=e.toUpperCase(),a=r?.[n];if(!a)throw new i.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction: ${e}`);return a}(e.syncDirection,t),r.sync_data_format=function(e,t){const r=t.SyncDataFormat,n=e.toUpperCase(),a=r?.[n];if(!a)throw new i.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format: ${e}`);return a}(e.syncDataFormat,t),r.async=!1,"reference"===e.type&&(r.reference_replica=function(e,t){const r=new t.ReferenceReplica;return r.deleteLater(),r.replica_id=e.replicaId,r}(e.referenceReplica,t)),"filter"===e.type&&(r.replica_filters=function(e,t){const r=e.inputQuantizationParameters?Ae(e.inputQuantizationParameters):t.InputQuantizationUtil.WGS84_lossless(),n=function(e,t){const r=new t.StaticDefinition;r.deleteLater();const n=e.entityTypeReplicaDefinitions??[],a=e.relationshipTypeReplicaDefinitions??[];if(n.length<1&&a.length<1)throw new i.A("knowledge-graph:replica-invalid-static-definition","A Filter Replica static definition must include at least one entity type or relationship type replica definition");for(const e of n)r.add_entity_type_replica_definition(xe(e,t));for(const e of a)r.add_relationship_type_replica_definition(De(e,t));return r}(e.staticDefinition,t),a=new t.ReplicaFilters(n);return a.deleteLater(),a.input_quantization_parameters=r,e.inputSpatialReference&&(a.input_spatial_reference=e.inputSpatialReference),a}(e.replicaFilters,t)),r}(e,await(0,de.I)());try{t.encode()}catch(e){throw new i.A("knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed"),structuredClone(r.get_byte_buffer())}(t),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,de.I)()).CreateReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&oe(r.error,"knowledge-graph:createReplica-decoding-error","An error occurred while decoding the createReplica response"),function(e){const t=new Qt;if(e.has_async_status_url()&&(t.asyncStatusUrl=e.get_async_status_url()),e.has_create_replica_result()){const r=e.get_create_replica_result();r.deleteLater(),t.createReplicaResult=function(e){return{errors:tr(e.get_error_count(),e),warnings:er(e.get_warning_count(),e),replicaName:e.get_replica_name(),requestedReplicaName:e.get_requested_replica_name(),replicaId:e.get_replica_id(),syncDate:gr(e.get_sync_date()),replicaDataFormat:hr(e.get_replica_data_format()),replicaDataUrl:e.get_replica_data_url()}}(r)}return t}(r)}finally{r.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for createReplica",{responseType:t,data:await e.text()})}(await Yr(a.data.url,a.data))},fetchReplicaDefinition:async(e,t,r)=>{const n=`${e.url}/replicas/${t}`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",...r?.query},signal:r?.signal,timeout:r?.timeout}),s=a.getHeader?.("content-type"),l=a.data;if(s?.includes("application/x-protobuf")){const t=await(0,de.I)(),r=new t.ReplicaDefinitionResponseDecoder;return r.deleteLater(),r.decode(new Uint8Array(l)),r.has_error()&&oe(r.error,"knowledge-graph:fetchReplica-decoding-error","An error occurred while decoding the replica definition response"),function(e,t,r){const n=e.get_replica_definition();n.deleteLater();const a=n.get_replica_filters();return a.deleteLater(),new Ht({replicaName:n.get_replica_name(),replicaId:n.get_replica_id(),replicaOwner:n.get_replica_owner(),lastSyncDate:gr(n.get_last_sync_date()),creationDate:gr(n.get_creation_date()),syncDirection:yr(n.get_sync_direction(),t),replicaFilters:ar(a,r)})}(r,t,e.dataModel)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching a replica",{responseType:s,data:a.data})},fetchReplicasInformation:async(e,t)=>{const r=`${e.url}/replicas`,n=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf",...t?.query},signal:t?.signal,timeout:t?.timeout}),a=n.getHeader?.("content-type"),s=n.data;if(a?.includes("application/x-protobuf")){const e=new((await(0,de.I)()).ReplicasResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&oe(e.error,"knowledge-graph:fetchReplicasInformation-decoding-error","An error occurred while decoding the replicas information response"),function(e){const t=[];for(let r=0;r<e.get_replicas_count();r++){const n=e.get_replica_info_at(r);n.deleteLater(),t.push(rr(n))}return new Wt({replicas:t})}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching replicas information",{responseType:a,data:n.data})},executeUnregisterReplica:async(e,t,r)=>{if(!0===t.unregisterAll&&"replicaIds"in t)throw new i.A("knowledge-graph:no-arguments","The operation to unregister replicas cannot include replica ids when unregisterAll is true");if(!0!==t.unregisterAll){const e="replicaIds"in t?t.replicaIds:void 0;if(!Array.isArray(e)||!e.some(e=>!!e))throw new i.A("knowledge-graph:no-arguments","The operation to unregister replicas requires at least one replica id")}const n=`${e.url}/replicas/unregister`;await tn(e);const a=await nn(n,r);return a.data.body=await async function(e){const t=function(e,t){const r=new t.UnregisterReplicaRequestEncoder;if(r.deleteLater(),e.unregisterAll)r.set_unregister_all();else{const{replicaIds:t=[]}=e;t.forEach(e=>r.add_replica_id(e))}return r}(e,await(0,de.I)());try{t.encode()}catch(e){throw new i.A("knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed"),structuredClone(r.get_byte_buffer())}(t),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,de.I)()).UnregisterReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&oe(r.error,"knowledge-graph:unregisterReplica-decoding-error","An error occurred while decoding the unregisterReplica response"),function(e){const t=[];for(let r=0;r<e.get_unregister_replica_result_count();r++){const n=e.get_unregister_replica_result_at(r);n.deleteLater(),t.push(nr(n))}return new Yt({decoderError:ie(e.error)??null,unregisterReplicaResults:t})}(r)}finally{r.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for unregisterReplica",{responseType:t,data:await e.text()})}(await Yr(a.data.url,a.data))},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=a.getHeader?.("content-type"),l=a.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,de.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ln({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new V({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:a.data})},executeSearch:async(e,t,r)=>{const n="provenance"===t.typeCategoryFilter?"metaEntityProvenance":t.typeCategoryFilter,a=`${e.url}/graph/search`,s=await(0,o.A)(a,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=s.getHeader?.("content-type"),d=s.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,de.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ln({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new V({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await tn(e);const a=await nn(n,r);a.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphSearchRequestEncoder;r.deleteLater(),r.search_query=e.searchQuery;const n="provenance"===e.typeCategoryFilter?"meta_entity_provenance":e.typeCategoryFilter;if(r.type_category_filter=t.esriNamedTypeCategory[n],!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(ge(e.idsFilter,t))}catch(e){throw new i.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 i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const a=r.get_encoding_result();if(0!==a.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:a.error.error_code,errorMessage:a.error.error_message});return structuredClone(a.get_byte_buffer())}(t);const o=await Yr(a.data.url,a.data);if(e.dataModel){const t=await dn(o,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.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=_r.get(e.url||"");n||(n=new Map,_r.set(e.url||"",n));const a=new Map(n.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,de.I)(),l=se(t,n,s,r.ignoreCache),d=await nn(o,r.requestOptions);d.data.body=l;const c=await Yr(d.data.url,d.data),u=c.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await c.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&oe(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const a=new Map;for(let o=0;o<e.get_results_count();o++){const i=e.get_result_at(o);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),l=i.get_key().key_string,d=r.get(l);let c;if(2===s.get_data_case().value&&d)c=d.value;else{if(1!==s.get_data_case().value)continue;{c=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(l,{key:l,version:e,value:c})}}a.set(l,c)}return a}(e,n,a,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:c})},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}),a=n.getHeader?.("content-type"),s=n.data;if(a?.includes("application/x-protobuf")){const e=new((await(0,de.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&oe(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);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:n.data})},clearClientDataCache:()=>_r.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=f.from(r||{}),async function(e,t,r,n,a){const i={},s={},l=[];!function(e,t,r){for(const n in e){const a=e[n];if(a&&"object"==typeof a&&a instanceof R.A){const{features:e}=a;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,l,i);const d=await(0,m.el)(l),{outSpatialReference:c,processExtent:u,processSpatialReference:p,returnColumnName:y,returnFeatureCollection:h,returnM:g,returnZ:f}=r,{path:w}=(0,A.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=d.slice(t,r)}const _=c?c.wkid||c:null,v=p?p.wkid||p:null,b="execute"===t?{returnColumnName:y||void 0,returnFeatureCollection:h||void 0,returnM:g||void 0,returnZ:f||void 0}:null,C={...a,query:E({...u?{context:{extent:u,outSR:_,processSR:v}}:{"env:outSR":_,"env:processSR":v},...n,...b,f:"json"},null,s)};return(0,o.A)(`${w}/${t}`,C)}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=z.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function br(e,t,r){return Ar.executeApplyEdits(e,t,r)}async function Cr(e,t,r){return Ar.executeAddNamedTypes(e,t,r)}async function Tr(e,t,r){return Ar.executeDeleteNamedType(e,t,r)}async function Mr(e,t,r,n){return Ar.executeUpdateNamedType(e,t,r,n)}async function Rr(e,t,r,n){return Ar.executeAddGraphProperties(e,t,r,n)}async function Sr(e,t,r,n){return Ar.executeDeleteGraphProperty(e,t,r,n)}async function xr(e,t,r,n,a){return Ar.executeUpdateGraphProperty(e,t,r,n,a)}async function Dr(e,t,r,n){return Ar.executeAddGraphFieldIndex(e,t,r,n)}async function kr(e,t,r,n){return Ar.executeDeleteGraphFieldIndex(e,t,r,n)}async function Gr(e,t,r,n){return Ar.executeUpdateSearchIndex(e,t,r,n)}async function Pr(e,t,r){return Ar.executeQuery(e,t,r)}async function Ir(e,t,r){return Ar.executeQueryStreaming(e,t,r)}async function Nr(e,t,r){return Ar.executeSearch(e,t,r)}async function jr(e,t,r){return Ar.executeSearchStreaming(e,t,r)}function Or(e,t){return Ar.fetchAllClientDataKeys(e,t)}function Zr(e,t,r){return Ar.fetchClientDataAtKeys(e,t,r)}async function Ur(e){return Ar.fetchKnowledgeGraph(e)}async function Fr(e){return Ar.refreshDataModel(e)}async function Er(e){return Ar.refreshServiceDefinition(e)}async function qr(e,t){return Ar.executeFindPathsAsynchronous(e,t)}async function Lr(e,t){return Ar.executeFindPaths(e,t)}async function Kr(e,t){return Ar.fetchAsynchronousFindPathsResultData(e,t)}async function $r(e,t,r,n={mergePolicy:"esriMergePolicyTypeDefaultValue",splitPolicy:"esriSplitPolicyTypeDefaultValue"},a){return Ar.executeAddDomain(e,t,r,n,a)}async function zr(e,t,r,n,a){return Ar.executeUpdateDomain(e,t,r,n,a)}async function Jr(e,t,r){return Ar.executeDeleteDomain(e,t,r)}async function Vr(e,t,r){return Ar.executeCreateReplica(e,t,r)}async function Br(e,t,r){return Ar.fetchReplicaDefinition(e,t,r)}async function Qr(e,t){return Ar.fetchReplicasInformation(e,t)}async function Hr(e,t,r){return Ar.executeUnregisterReplica(e,t,r)}function Wr(){return Ar.clearClientDataCache()}async function Yr(e,t){return Ar._fetchWrapper(e,t)}async function Xr(e,t,r,n){return Ar._submitJobWrapper(e,t,r,n)}async function en(e,t){return Ar._esriRequestWrapper(e,t)}async function tn(e){const t=a.id?.findCredential(e.url);t||(e.dataModel?await cn(e):await Fr(e))}function rn(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,me(t,n)):Array.isArray(t)?r.set_param_key_value(e,ge(t,n)):r.set_param_key_value(e,fe(t,n))}async function nn(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})}async function an(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),a=new t;try{return a.decode(new Uint8Array(n)),r(a)}finally{a.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let on=50;function sn(e){on=e}function ln({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:a=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let s,l,d=0;const u=Date.now();let p=!0;for(;e.next_row();){s&&l||(s=n??kt(e),l=s.outSpatialReference??new c.A({wkid:4326})),d||(d=e.get_header_keys().size());const t=new Array(d);for(let n=0;n<d;n++){const a=e.get_value(n);t[n]=Rt(a,r,l)}if(o.push(t),a&&Date.now()-u>on){p=!1;break}}if(e.has_error())throw new i.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:s,resultRows:o,parsedAllResultsFromBuffer:p}}async function dn(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.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,de.I)()).GraphQueryDecoder);let a,o,d;n.deleteLater();const c=new Promise((e,t)=>{o=e,d=t});let u=!1,p=null;const y=new ReadableStream({pull:async function e(c){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw d(e),e}const{done:y,value:h}=p?{done:!1,value:null}:await r.read().catch(e=>{throw d(e),r.releaseLock(),e});h&&(p=h);try{if(y){let e;if(n.has_error()?e=new i.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}):u||o(new J),r.releaseLock(),e)throw c.error(e),d(e),e;return void c.close()}const{resultHeader:s,resultRows:l,parsedAllResultsFromBuffer:g}=ln({wasmQueryDecoder:n,newArrayBufferToParse:h,dataModel:t,decodedHeader:a,limitMaxProcessingTime:!0});return g&&(p=null),!a&&s&&(a=s,o(s),u=!0),l.length>0?void c.enqueue(l):await e(c)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),d(e),r.releaseLock(),(0,l.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await c}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function cn(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),a=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,de.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(a));if(!e)throw new i.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(),Gt=!1;const t=new re({timestamp:e.timestamp,spatialReference:new c.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,ut.i7)(_e.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:(0,ut.i7)(_e.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:Jt(e.search_indexes),entityTypes:Et(e.entity_types),relationshipTypes:$t(e.relationship_types),metaEntityTypes:Et(e.meta_entity_types),provenanceSourceTypeValues:zt(e.provenance_source_type_values.value_behavior_array),domains:Vt(e)});return Gt&&s.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/references/core/layers/support/Field/#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}},22671(e,t,r){r.d(t,{A:()=>w});var n,a=r(32198),o=r(52106),i=r(66552),s=r(25482),l=r(4718),d=r(91429),c=r(16930),u=r(60408),p=r(65864),y=r(50498),h=r(20437),g=r(36005),f=r(43937);const m=new i.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends s.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void m.write(e,t,r,n);const{features:a}=this;if(a)for(const e of a)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,p.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=c.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,a]}=e,o=this.features,i=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((a-e)/r));for(let e=0,t=o.length;e<t;e++)i?.(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,a],scale:[o,i]}=r;let s=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;s=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=>a-e*i,s,l);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=c.A.fromJSON(t.spatialReference),a=[];for(let t=0;t<e.length;t++){const o=e[t],i=r.fromJSON(o),s=o.geometry?.spatialReference;null==i.geometry||s||(i.geometry.spatialReference=n);const l=o.aggregateGeometries,d=i.aggregateGeometries;if(l&&null!=d)for(const e in d){const t=d[e],r=l[e],a=r?.spatialReference;null==t||a||(t.spatialReference=n)}a.push(i)}return a}_quantizePoints(e,t,r){let n,a;const o=[];for(let i=0,s=e.length;i<s;i++){const s=e[i];if(i>0){const e=t(s[0]),i=r(s[1]);e===n&&i===a||(o.push([e-n,i-a]),n=e,a=i)}else n=t(s[0]),a=r(s[1]),o.push([n,a])}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,u.Bi)(e)?e.rings:e.paths,a=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],i=this._quantizePoints(o,t,r);i&&a.push(i)}return a.length>0?((0,u.Bi)(e)?e.rings=a:e.paths=a,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,a){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,u.Bi)(e)?e.rings:e.paths;let i,s;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,a=n.length;e<a;e++){const a=n[e];e>0?(i+=a[0],s+=a[1]):(i=a[0],s=a[1]),a[0]=t(i),a[1]=r(s)}}if(n&&a)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]=a(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(a)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]=a(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)),a&&null!=e.mmax&&null!=e.mmin&&(e.mmax=a(e.mmax),e.mmin=a(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let i,s;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(i+=n[0],s+=n[1]):(i=n[0],s=n[1]),n[0]=t(i),n[1]=r(s)}if(n&&a)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=a(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(a)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=a(t[2])}}:null}};(0,a.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,a.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,a.Cg)([(0,d.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,a.Cg)([(0,g.w)("features")],w.prototype,"readFeatures",null),(0,a.Cg)([(0,d.MZ)({type:[h.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,a.Cg)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],w.prototype,"geometryType",void 0),(0,a.Cg)([(0,f.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,a.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,a.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,a.Cg)([(0,d.MZ)({types:y.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,a.Cg)([(0,g.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,a.Cg)([(0,d.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,a.Cg)([(0,f.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,a.Cg)([(0,d.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,a.Cg)([(0,d.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},37807(e,t,r){var n=r(32198),a=r(66552),o=r(25482),i=r(91429);const s=new a.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let l=class extends o.o{constructor(e){super(e),this.description=null,this.type=null}};(0,n.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,n.Cg)([(0,i.MZ)({type:String,json:{read:s.read,write:s.write}})],l.prototype,"type",void 0),l=(0,n.Cg)([(0,i.$K)("esri.rest.support.GPMessage")],l);const d=l;r.d(t,["A",0,d])},2073(e,t,r){var n=r(66552);const a={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)()(a),i=(0,n.O)()({...a,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),s=(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"}),c=(0,n.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),u=(0,n.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),p=((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}),g=(0,n.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),f=(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}),m=(0,n.O)()({1:"right",2:"left"},{useNumericKeys:!0}),w=(0,n.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),_=(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}),A=(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}),b=(0,n.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),C=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),T=(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}),M=(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}),S=(0,n.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),x=(0,n.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),D=(0,n.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),k=(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"});r.d(t,["$n",0,b,"$r",0,f,"EM",0,g,"Ec",0,k,"JJ",0,h,"Mm",0,T,"OC",0,R,"Sr",0,u,"UO",0,s,"Vj",0,x,"WU",0,D,"Y8",0,i,"Z7",0,l,"_6",0,v,"aJ",0,c,"dd",0,C,"dn",0,d,"et",0,M,"fe",0,_,"gD",0,A,"hE",0,p,"hY",0,o,"iM",0,w,"mt",0,m,"ow",0,y,"vS",0,S])}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3902],{49403(e,t,r){r.d(t,["Eq",0,{Regular:0,Provenance:1,Document:2},"G3",0,{esriMergePolicyType_UNSPECIFIED:0,esriMergePolicyTypeSumValues:1,esriMergePolicyTypeAreaWeighted:2,esriMergePolicyTypeDefaultValue:3},"GH",0,{esriSplitPolicyType_UNSPECIFIED:0,esriSplitPolicyTypeGeometryRatio:1,esriSplitPolicyTypeDuplicate:2,esriSplitPolicyTypeDefaultValue:3},"bV",0,{esriGeometryNull:0,esriGeometryPoint:1,esriGeometryMultipoint:2,esriGeometryPolyline:3,esriGeometryPolygon:4,esriGeometryEnvelope:5,esriGeometryAny:7,esriGeometryMultiPatch:9},"nP",0,{esriTypeUNSPECIFIED:0,esriTypeEntity:1,esriTypeRelationship:2,esriTypeBoth:4,esriTypeMetaEntityProvenance:8},"r5",0,{esriFieldTypeSmallInteger:0,esriFieldTypeInteger:1,esriFieldTypeSingle:2,esriFieldTypeDouble:3,esriFieldTypeString:4,esriFieldTypeDate:5,esriFieldTypeOID:6,esriFieldTypeGeometry:7,esriFieldTypeBlob:8,esriFieldTypeRaster:9,esriFieldTypeGUID:10,esriFieldTypeGlobalID:11,esriFieldTypeXML:12,esriFieldTypeBigInteger:13,esriFieldTypeDateOnly:14,esriFieldTypeTimeOnly:15,esriFieldTypeTimestampOffset:16},"ti",0,{esriGraphPropertyUNSPECIFIED:0,esriGraphPropertyRegular:1,esriGraphPropertyDocumentName:2,esriGraphPropertyDocumentTitle:3,esriGraphPropertyDocumentUrl:4,esriGraphPropertyDocumentText:5,esriGraphPropertyDocumentKeywords:6,esriGraphPropertyDocumentContentType:7,esriGraphPropertyDocumentMetadata:8,esriGraphPropertyDocumentFileExtension:9,esriGraphPropertyProvenanceInstanceId:10,esriGraphPropertyProvenanceSourceType:11,esriGraphPropertyProvenanceSourceName:12,esriGraphPropertyProvenanceSource:13,esriGraphPropertyProvenanceComment:14,esriGraphPropertyProvenanceTypeName:15,esriGraphPropertyProvenancePropertyName:16},"vy",0,{esriIdentifierInfoTypeUNSPECIFIED:0,esriIdentifierInfoTypeDatabaseNative:1,esriIdentifierInfoTypeUniformProperty:2},"wr",0,{esriMethodHintUNSPECIFIED:0,esriUUIDESRI:1,esriUUIDRFC4122:2}])},45724(e,t,r){r.d(t,{I:()=>s});var n=r(2741),a=r(44208);const o="esri/rest/knowledgeGraph/wasmInterface/";let i;async function s(){if(i)return i;const e=!!(0,a.A)("wasm-simd");return i=l(e),i}async function l(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367));return e({locateFile:e=>(0,n.s)(o+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013));return t({locateFile:e=>(0,n.s)(o+e)})}},53902(e,t,r){r.r(t),r.d(t,{_checkAuthentication:()=>tn,_esriRequestWrapper:()=>en,_fetchWrapper:()=>Yr,_getClientDataCacheCopy:()=>vr,_setMaxQueryParsingDurationForTesting:()=>sn,_submitJobWrapper:()=>Xr,clearClientDataCache:()=>Wr,clientDataCache:()=>_r,executeAddDomain:()=>$r,executeAddGraphFieldIndex:()=>Dr,executeAddGraphProperties:()=>Rr,executeAddNamedTypes:()=>Cr,executeApplyEdits:()=>br,executeCreateReplica:()=>Vr,executeDeleteDomain:()=>Jr,executeDeleteGraphFieldIndex:()=>kr,executeDeleteGraphProperty:()=>Sr,executeDeleteNamedType:()=>Tr,executeFindPaths:()=>Lr,executeFindPathsAsynchronous:()=>qr,executeQuery:()=>Pr,executeQueryStreaming:()=>Ir,executeSearch:()=>Nr,executeSearchStreaming:()=>jr,executeUnregisterReplica:()=>Hr,executeUpdateDomain:()=>zr,executeUpdateGraphProperty:()=>xr,executeUpdateNamedType:()=>Mr,executeUpdateSearchIndex:()=>Gr,fetchAllClientDataKeys:()=>Or,fetchAsynchronousFindPathsResultData:()=>Kr,fetchClientDataAtKeys:()=>Zr,fetchKnowledgeGraph:()=>Ur,fetchReplicaDefinition:()=>Br,fetchReplicasInformation:()=>Qr,kgRestServices:()=>Ar,refreshDataModel:()=>Fr,refreshServiceDefinition:()=>Er});var n,a=r(70333),o=r(11254),i=r(49186),s=r(53966),l=r(17676),d=r(91075),c=r(16930),u=r(32198),p=r(69622),y=r(91429),h=r(56507),g=r(5443);let f=n=class extends p.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,u.Cg)([(0,y.MZ)({type:c.A})],f.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,y.MZ)({type:g.A})],f.prototype,"processExtent",void 0),(0,u.Cg)([(0,y.MZ)({type:c.A})],f.prototype,"processSpatialReference",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnColumnName",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnFeatureCollection",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnM",void 0),(0,u.Cg)([(0,y.MZ)({nonNullable:!0})],f.prototype,"returnZ",void 0),f=n=(0,u.Cg)([(0,y.$K)("esri.rest.geoprocessor.GPOptions")],f);var m=r(52039),w=r(20437),_=r(25482);let v=class extends _.o{constructor(e){super(e),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,u.Cg)([(0,y.MZ)({type:g.A})],v.prototype,"extent",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"height",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"href",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"opacity",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"rotation",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"scale",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"visible",void 0),(0,u.Cg)([(0,y.MZ)()],v.prototype,"width",void 0),v=(0,u.Cg)([(0,y.$K)("esri.layers.support.MapImage")],v);var A=r(2272),b=r(2073),C=r(93223);let T=class extends _.o{constructor(e){super(e),this.area=0,this.units=null}};(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],T.prototype,"area",void 0),(0,u.Cg)([(0,C.e)(b.UO)],T.prototype,"units",void 0),T=(0,u.Cg)([(0,y.$K)("esri.rest.support.ArealUnit")],T);let M=class extends _.o{constructor(e){super(e),this.itemId=null,this.url=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{read:{source:"itemID"},write:{target:"itemID"}}})],M.prototype,"itemId",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],M.prototype,"url",void 0),M=(0,u.Cg)([(0,y.$K)("esri.rest.support.DataFile")],M);var R=r(22671);let S=class extends _.o{constructor(e){super(e),this.distance=0,this.units=null}};(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],S.prototype,"distance",void 0),(0,u.Cg)([(0,C.e)(b.Y8)],S.prototype,"units",void 0),S=(0,u.Cg)([(0,y.$K)("esri.rest.support.LinearUnit")],S);var x=r(66552);const D="multi-value-",k=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",GPTimeUnit:"time-unit",GPValueTable:"value-table","GPMultiValue:GPArealUnit":`${D}areal-unit`,"GPMultiValue:GPBoolean":`${D}boolean`,"GPMultiValue:GPComposite":`${D}composite`,"GPMultiValue:GPDataFile":`${D}data-file`,"GPMultiValue:GPDate":`${D}date`,"GPMultiValue:GPDouble":`${D}double`,"GPMultiValue:GPFeatureRecordSetLayer":`${D}feature-record-set-layer`,"GPMultiValue:Field":`${D}field`,"GPMultiValue:GPLinearUnit":`${D}linear-unit`,"GPMultiValue:GPLong":`${D}long`,"GPMultiValue:GPRasterData":`${D}raster-data`,"GPMultiValue:GPRasterDataLayer":`${D}raster-data-layer`,"GPMultiValue:GPRecordSet":`${D}record-set`,"GPMultiValue:GPString":`${D}string`,"GPMultiValue:GPTimeUnit":`${D}time-unit`});let G=class extends _.o{constructor(e){super(e),this.dataType=null,this.paramName=null,this.value=null}};(0,u.Cg)([(0,C.e)(k,{ignoreUnknown:!1})],G.prototype,"dataType",void 0),(0,u.Cg)([(0,y.MZ)()],G.prototype,"paramName",void 0),(0,u.Cg)([(0,y.MZ)()],G.prototype,"value",void 0),G=(0,u.Cg)([(0,y.$K)("esri.rest.support.ParameterValue")],G);var P=r(36005);let I=class extends _.o{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,u.Cg)([(0,y.MZ)()],I.prototype,"format",void 0),(0,u.Cg)([(0,y.MZ)({json:{name:"itemID",write:!0}})],I.prototype,"itemId",void 0),(0,u.Cg)([(0,y.MZ)()],I.prototype,"type",void 0),(0,u.Cg)([(0,P.w)("type")],I.prototype,"readType",null),(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],I.prototype,"url",void 0),I=(0,u.Cg)([(0,y.$K)("esri.rest.support.RasterData")],I);var N=r(73133);let j=class extends _.o{constructor(e){super(e),this.time=0,this.units=null}};async function O(e,t){switch(e){case"time-unit":return j.fromJSON(t);case"areal-unit":return T.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 M.fromJSON(t);case"linear-unit":return S.fromJSON(t);case"feature-record-set-layer":if("url"in t)return M.fromJSON(t);if("layerDefinition"in t){const e=new(0,(await Promise.all([r.e(5620),r.e(8278),r.e(7865),r.e(9953),r.e(6554),r.e(564),r.e(7552),r.e(1214),r.e(5051),r.e(2889),r.e(1017),r.e(9789),r.e(4674),r.e(2718),r.e(8589),r.e(5362)]).then(r.bind(r,18589))).default),{layerDefinition:n,featureSet:a}=t;return e.read({layerDefinition:n,featureSet:a},{origin:"portal-item"}),e.spatialReference=c.A.fromJSON(a.spatialReference??n.spatialReference??n.extent.spatialReference),e}return R.A.fromJSON(t);case"record-set":return"url"in t?M.fromJSON(t):R.A.fromJSON(t);case"raster-data":case"raster-data-layer":return"mapImage"in t?v.fromJSON(t.mapImage):I.fromJSON(t);case"field":return w.A.fromJSON(t)}}function Z(e){return e.startsWith(D)}function U(e){return e.replace(D,"")}async function F(e){const t=k.fromJSON(e.dataType),{paramName:r}=e,n=Z(t)?await async function(e,t){const r=U(e),n="composite"===r?t.map(e=>O(k.fromJSON(e.dataType),e.value)):t.map(e=>O(r,e));return Promise.all(n)}(t,e.value):await O(t,e.value);return new G({dataType:t,paramName:r,value:n})}function E(e,t,r){for(const t in e){const r=e[t];Array.isArray(r)?e[t]=JSON.stringify(r.map(e=>E({item:e},!0).item)):r instanceof Date&&(e[t]=r.getTime())}return(0,A.lF)(e,t,r)}(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],j.prototype,"time",void 0),(0,u.Cg)([(0,C.e)(N.j)],j.prototype,"units",void 0),j=(0,u.Cg)([(0,y.$K)("esri.rest.support.TimeUnit")],j);var q,L=r(37807);const K=(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}),$=1e3;let z=class extends _.o{static{q=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,A.Dl)(r),a={...this.requestOptions,...e,query:{f:"json"}},i=`${n}/jobs/${t}/cancel`,{data:s}=await(0,o.A)(i,a),{messages:d,jobStatus:c,progress:u}=q.fromJSON(s);return this.set({messages:d,jobStatus:c,progress:u}),"job-cancelled"===c?this:new Promise((t,r)=>{(0,l.u7)(a.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,$);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)}}).catch(e=>{r(e)})};this._cancelJobTimer=setTimeout(n,$)})}destroy(){clearInterval(this._cancelJobTimer),clearInterval(this._jobCompletionTimer)}async checkJobStatus(e){const{path:t}=(0,A.Dl)(this.sourceUrl),r={...this.requestOptions,...e,query:{...e?.query,f:"json"}},n=`${t}/jobs/${this.jobId}`,{data:a}=await(0,o.A)(n,r),{messages:i,jobStatus:s,progress:l}=q.fromJSON(a);return this.set({messages:i,jobStatus:s,progress:l}),this}async fetchResultData(e,t,r){t=f.from(t||{});const{returnColumnName:n,returnFeatureCollection:a,returnM:i,returnZ:s,outSpatialReference:l}=t,{path:d}=(0,A.Dl)(this.sourceUrl),c=E({returnColumnName:n||null,returnFeatureCollection:a||null,returnM:i||null,returnZ:s||null,outSR:l,returnType:"data",f:"json",...r?.query},null),u={...this.requestOptions,...r,query:c},p=`${d}/jobs/${this.jobId}/results/${e}`,{data:y}=await(0,o.A)(p,u);return F(y)}async fetchResultImage(e,t,r){const{path:n}=(0,A.Dl)(this.sourceUrl),a=E({...t.toJSON(),f:"json"}),i={...this.requestOptions,...r,query:a},s=`${n}/jobs/${this.jobId}/results/${e}`,{data:l}=await(0,o.A)(s,i);return F(l)}async fetchResultMapImageLayer(){const{path:e}=(0,A.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(8278),r.e(7865),r.e(6554),r.e(564),r.e(7552),r.e(1214),r.e(5051),r.e(2889),r.e(4674),r.e(893),r.e(8470),r.e(2733)]).then(r.bind(r,7656))).default)({url:n})}async waitForJobCompletion(e={}){const{interval:t=$,signal:r,statusCallback:n,apiKey:a}=e;return new Promise((e,o)=>{(0,l.u7)(r,()=>{this.clearJobCompletionTimer(),o((0,l.NK)())}),this.clearJobCompletionTimer();const i=()=>{this._jobCompletionTimer||o((0,l.NK)()),this.checkJobStatus({query:{token:a}}).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(i,t);break;case"job-cancelled":case"job-cancelling":case"job-deleted":case"job-deleting":case"job-failed":case"job-timed-out":o(this);break;default:this._jobCompletionTimer=setTimeout(i,t)}}).catch(e=>{o(e)})};this._jobCompletionTimer=setTimeout(i,t)})}clearCancelJobTimer(){clearTimeout(this._cancelJobTimer),this._cancelJobTimer=void 0}clearJobCompletionTimer(){clearTimeout(this._jobCompletionTimer),this._jobCompletionTimer=void 0}};(0,u.Cg)([(0,y.MZ)()],z.prototype,"jobId",void 0),(0,u.Cg)([(0,C.e)(K,{ignoreUnknown:!1})],z.prototype,"jobStatus",void 0),(0,u.Cg)([(0,y.MZ)({type:[L.A]})],z.prototype,"messages",void 0),(0,u.Cg)([(0,y.MZ)()],z.prototype,"progress",void 0),(0,u.Cg)([(0,y.MZ)()],z.prototype,"requestOptions",void 0),(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],z.prototype,"sourceUrl",void 0),z=q=(0,u.Cg)([(0,y.$K)("esri.rest.support.JobInfo")],z);let J=class extends p.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1,this.dataModelTimestamp=null}};(0,u.Cg)([(0,y.MZ)()],J.prototype,"headerKeys",void 0),(0,u.Cg)([(0,y.MZ)()],J.prototype,"outSpatialReference",void 0),(0,u.Cg)([(0,y.MZ)()],J.prototype,"exceededTransferLimit",void 0),(0,u.Cg)([(0,y.MZ)()],J.prototype,"dataModelTimestamp",void 0),J=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],J);let V=class extends p.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new J}};(0,u.Cg)([(0,y.MZ)()],V.prototype,"resultRows",void 0),(0,u.Cg)([(0,y.MZ)()],V.prototype,"resultHeader",void 0),V=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryResult")],V);let B=class extends p.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new J}};(0,u.Cg)([(0,y.MZ)()],B.prototype,"resultRowsStream",void 0),(0,u.Cg)([(0,y.MZ)()],B.prototype,"resultHeader",void 0),B=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],B);var Q=r(8631);let H=class extends _.o{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=!0,this.description="",this.fieldNames=[]}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"unique",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],H.prototype,"ascending",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],H.prototype,"description",void 0),(0,u.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],H.prototype,"fieldNames",void 0),H=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.FieldIndex")],H);let W=class extends _.o{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.domain=null,this.defaultValue=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"alias",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"fieldType",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"geometryType",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasM",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"hasZ",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"nullable",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"editable",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"required",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"defaultVisibility",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],W.prototype,"systemMaintained",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"role",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],W.prototype,"domain",void 0),(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],W.prototype,"defaultValue",void 0),W=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphProperty")],W);let Y=class extends _.o{constructor(e){super(e),this.name=null,this.alias=null,this.role="Regular",this.strict=null,this.properties=[],this.fieldIndexes=[],this.type=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"alias",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],Y.prototype,"role",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],Y.prototype,"strict",void 0),(0,u.Cg)([(0,y.MZ)({type:[W],json:{write:!0}})],Y.prototype,"properties",void 0),(0,u.Cg)([(0,y.MZ)({type:[H],json:{write:!0}})],Y.prototype,"fieldIndexes",void 0),Y=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphObjectType")],Y);let X=class extends Y{constructor(e){super(e),this.type="entity"}};X=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.EntityType")],X);let ee=class extends Y{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,u.Cg)([(0,y.MZ)({json:{write:!0}})],ee.prototype,"endPoints",void 0),ee=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.RelationshipType")],ee);let te=class extends _.o{constructor(e){super(e),this.value=null,this.behavior=null}};(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"value",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],te.prototype,"behavior",void 0),te=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],te);let re=class extends _.o{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=[],this.domains=[]}};(0,u.Cg)([(0,y.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],re.prototype,"timestamp",void 0),(0,u.Cg)([(0,y.MZ)({type:c.A,json:{write:!0}})],re.prototype,"spatialReference",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],re.prototype,"strict",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"objectIdField",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],re.prototype,"globalIdField",void 0),(0,u.Cg)([(0,y.MZ)()],re.prototype,"arcgisManaged",void 0),(0,u.Cg)([(0,y.MZ)()],re.prototype,"identifierInfo",void 0),(0,u.Cg)([(0,y.MZ)()],re.prototype,"searchIndexes",void 0),(0,u.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"entityTypes",void 0),(0,u.Cg)([(0,y.MZ)({type:[ee],json:{write:!0}})],re.prototype,"relationshipTypes",void 0),(0,u.Cg)([(0,y.MZ)({type:[X],json:{write:!0}})],re.prototype,"metaEntityTypes",void 0),(0,u.Cg)([(0,y.MZ)({type:[te],json:{write:!0}})],re.prototype,"provenanceSourceTypeValues",void 0),(0,u.Cg)([(0,y.MZ)({types:[Q.g],json:{write:!0}})],re.prototype,"domains",void 0),re=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.DataModel")],re);let ne=class extends _.o{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,u.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ne.prototype,"capabilities",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsSearch",void 0),(0,u.Cg)([(0,y.MZ)({type:[String],json:{write:!0}})],ne.prototype,"supportedQueryFormats",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"allowGeometryUpdates",void 0),(0,u.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"searchMaxRecordCount",void 0),(0,u.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ne.prototype,"serviceCapabilities",void 0),(0,u.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"maxRecordCount",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"description",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"copyrightText",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"units",void 0),(0,u.Cg)([(0,y.MZ)({type:c.A,json:{write:!0}})],ne.prototype,"spatialReference",void 0),(0,u.Cg)([(0,y.MZ)({type:Number,json:{write:!0}})],ne.prototype,"currentVersion",void 0),(0,u.Cg)([(0,y.MZ)({type:Object,json:{write:!0}})],ne.prototype,"dateFieldsTimeReference",void 0),(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ne.prototype,"serviceItemId",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsDocuments",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"dataEditingNotSupported",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"schemaEditingNotSupported",void 0),(0,u.Cg)([(0,y.MZ)({type:Boolean,json:{write:!0}})],ne.prototype,"supportsProvenance",void 0),ne=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ServiceDefinition")],ne);let ae=class extends _.o{constructor(e){super(e),this.url=null,this.dataModel=null,this.serviceDefinition=null}};function oe(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function ie(e){return e?.error_code?new i.A("knowledgeGraphService:server-or-decoding-error",e.error_message,{errorCode:e.error_code}):void 0}function se(e,t,r,n=!1){const a=new r.ClientDataFetchRequestEncoder;a.deleteLater();for(const o of e){const e=le(o,t,r,n);a.add_client_data_fetch_request_parameter(e)}a.encode();const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(o.get_byte_buffer())}function le(e,t,r,n){const a=new r.ClientDataKey;a.deleteLater(),a.key_string=e;const o=new r.ClientDataFetchRequestParameter;o.deleteLater(),o.set_key(a);const i=t.get(e);return i&&!n&&(o.v_tag={v_tag:i.version}),o}(0,u.Cg)([(0,y.MZ)({type:String,json:{write:!0}})],ae.prototype,"url",void 0),(0,u.Cg)([(0,y.MZ)({type:re,json:{write:!0}})],ae.prototype,"dataModel",void 0),(0,u.Cg)([(0,y.MZ)({type:ne,json:{write:!0}})],ae.prototype,"serviceDefinition",void 0),ae=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.KnowledgeGraph")],ae);var de=r(45724),ce=r(48526),ue=r(86738),pe=r(39829),ye=r(82799);const he={exclude:0,include:1};function ge(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(we(e,t))}),r}function fe(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,a]of Object.entries(e))r.set_key_value(n,we(a,t));return r}function me(e,t){if(e instanceof ce.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=[],a=[];a[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(a),r}(e,t);if(e instanceof ue.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=[],a=[];a[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(a),r}(e,t);if(e instanceof ye.A||e instanceof pe.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],a=[];let o=[];e instanceof ye.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,o=e.paths):e instanceof pe.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,o=e.rings);let i=0,s=0;return o.forEach(e=>{let t=0;e.forEach(e=>{t++,e.forEach(e=>{n[s]=e,s++})}),a[i]=t,i++}),r.coords=new Float64Array(n),r.lengths=new Uint32Array(a),r}(e,t);throw new i.A("knowledge-graph:unsupported-geometry","Only Point, Multipoint, Polyline, and Polygon geometry are supported by ArcGIS Knowledge",{geometry:e})}function we(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof d.A)return me(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach(e=>{r.add_value(we(e,t))}),r}return fe(e,t)}var _e=r(49403);function ve(e,t){if(!e.typeName)throw new i.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,a]of Object.entries(e.properties))r.set_key_value(n,Se(a,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,a]of Object.entries(e.properties))r.set_key_value(n,Se(a,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 i.A("knowledge-graph:applyEdits-encoding-failure","Could not determine the type of a named graph object passed to the encoder")}function Ae(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}}function be(e,t){const r=new t.GraphProperty;return r.deleteLater(),r.name=e.name,r.alias=e.alias??"",r.field_type={value:_e.r5[e.fieldType]},r.geometry_type={value:e.geometryType?_e.bV[e.geometryType]:_e.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:_e.ti[e.role]},r.default_value=Se(e.defaultValue,t),r.domain=e.domain??"",r}function Ce(e,t){const r=new t.SearchIndexProperties;r.deleteLater();for(const t of e.propertyNames)r.add_search_property_name(t);return r}function Te(e,t,r,n){const a=new t.Domain;a.deleteLater(),a.name=e.name;const o=_e.r5[r];a.field_type={value:o};let i=o;if(o!==_e.r5.esriFieldTypeTimeOnly&&o!==_e.r5.esriFieldTypeDateOnly&&o!==_e.r5.esriFieldTypeTimestampOffset||(i=_e.r5.esriFieldTypeString),n&&(a.merge_policy_type={value:_e.G3[n.mergePolicy]},a.split_policy_type={value:_e.GH[n.splitPolicy]}),"coded-value"===e.type){const r=e;a.type="codedValue";const n=new t.CodedValueDomain;n.deleteLater();for(const e of r.codedValues){const r=new t.CodedValue;r.deleteLater(),r.name=e.name,r.set_code(e.code,{value:i}),n.add_coded_value(r)}a.coded_value_domain=n}else if("range"===e.type){const r=e;a.type="range";const n=new t.RangeDomain;n.deleteLater(),n.add_value(r.minValue,{value:i}),n.add_value(r.maxValue,{value:i}),a.range_domain=n}else a.type=e.type??"unspecified";return a}function Me(e,t,r){r.name=e.name,r.alias=e.alias??"",r.role={value:_e.Eq[e.role]},r.strict=e.strict;for(const n of e.properties){const e=be(n,t);r.add_property(e)}return r}function Re(e,t){return e.hasOwnProperty("alias")&&(t.alias=e.alias),t}function Se(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof d.A?me(e,t):null}function xe(e,t){const r=new t.EntityTypeReplicaDefinition;return r.deleteLater(),ke(e,t,r),e.documentOptions&&(r.document_options=function(e,t){const r=e.includeConnectedDocuments?function(e,t){const r=Ge(e.includeDocumentProvenance?{includeProvenance:!0,includeSourceDocuments:e.includeDocumentSourceDocuments}:{includeProvenance:!1},t),n=new t.IncludeConnectedDocuments(r);return n.deleteLater(),n}(e,t):void 0,n=new t.DocumentOptions(r);return n.deleteLater(),n}(e.documentOptions,t)),r}function De(e,t){const r=new t.RelationshipTypeReplicaDefinition;return r.deleteLater(),ke(e,t,r),r}function ke(e,t,r){if(r.type_name=e.typeName,r.open_cypher_where_clause=e.openCypherWhereClause??"",e.provenanceOptions&&(r.provenance_options=Ge(e.provenanceOptions,t)),e.parameters)for(const[n,a]of Object.entries(e.parameters))void 0!==a&&r.add_parameter(n,we(a,t));return r}function Ge(e,t){const r=function(e,t){const r=new t.IncludeProvenance("includeSourceDocuments"in e&&e.includeSourceDocuments);return r.deleteLater(),r}(e,t),n=new t.ProvenanceOptions(r);return n.deleteLater(),n}let Pe=class extends p.A{constructor(e){super(e),this.decoderError=null,this.resultsCount=0,this.results=[],this.updatedKnowledgeGraph=null}};(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"decoderError",void 0),(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"resultsCount",void 0),(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"results",void 0),(0,u.Cg)([(0,y.MZ)()],Pe.prototype,"updatedKnowledgeGraph",void 0),Pe=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelOperationResult")],Pe);const Ie=Pe;let Ne=class extends Ie{constructor(e){super(e)}};Ne=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddFieldIndexResult")],Ne);const je=Ne;let Oe=class extends Ie{constructor(e){super(e),this.entityAddResultsCount=0,this.relationshipAddResultsCount=0,this.entityAddResults=[],this.relationshipAddResults=[]}};(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"entityAddResultsCount",void 0),(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"relationshipAddResultsCount",void 0),(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"entityAddResults",void 0),(0,u.Cg)([(0,y.MZ)()],Oe.prototype,"relationshipAddResults",void 0),Oe=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddNamedTypesResult")],Oe);const Ze=Oe;let Ue=class extends Ie{constructor(e){super(e)}};Ue=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphAddPropertyResult")],Ue);const Fe=Ue;let Ee=class extends p.A{constructor(e){super(e),this.decoderError=null,this.updatedKnowledgeGraph=null}};(0,u.Cg)([(0,y.MZ)()],Ee.prototype,"decoderError",void 0),(0,u.Cg)([(0,y.MZ)()],Ee.prototype,"updatedKnowledgeGraph",void 0),Ee=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDataModelSingletonOperationResult")],Ee);const qe=Ee;let Le=class extends Ie{constructor(e){super(e)}};Le=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteFieldIndexResult")],Le);const Ke=Le;let $e=class extends Ie{constructor(e){super(e),this.warnings=[]}};(0,u.Cg)([(0,y.MZ)()],$e.prototype,"warnings",void 0),$e=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeleteNamedTypeResult")],$e);const ze=$e;let Je=class extends Ie{constructor(e){super(e)}};Je=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphDeletePropertyResult")],Je);const Ve=Je;let Be=class extends Ie{constructor(e){super(e)}};Be=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateNamedTypesResult")],Be);const Qe=Be;let He=class extends Ie{constructor(e){super(e)}};He=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdatePropertyResult")],He);const We=He;let Ye=class extends Ie{constructor(e){super(e)}};Ye=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphUpdateSearchIndexResult")],Ye);const Xe=Ye;function et(e,t){const r=[];for(let n=0;n<t;n++){const t=e.get_result_at(n);r.push({name:t.get_name(),error:ie(t.get_error())})}return r}function tt(e){const t=e.get_results_count(),r=e.get_entity_type_add_results_count(),n=e.get_relationship_type_add_results_count(),a=new Ze({resultsCount:t,results:et(e,t),decoderError:ie(e.error),entityAddResultsCount:r,relationshipAddResultsCount:n});for(let t=0;t<r;t++){const r=e.get_entity_type_add_results_at(t),n=r.get_name(),o=r.get_error();a.entityAddResults.push({name:n,error:ie(o)})}for(let t=0;t<n;t++){const r=e.get_relationship_type_add_results_at(t),n=r.get_name(),o=r.get_error();a.relationshipAddResults.push({name:n,error:ie(o)})}return a}function rt(e){const t=e.get_results_count();return new Qe({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function nt(e){const t=e.get_results_count(),r=[];for(let t=0;t<e.get_warnings_count();t++){const n=ie(e.get_warning_at(t));null!=n&&r.push(n)}const n=et(e,t);return new ze({resultsCount:t,results:n,warnings:r,decoderError:ie(e.error)})}function at(e){const t=e.get_results_count();return new Fe({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function ot(e){const t=e.get_results_count();return new Ve({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function it(e){const t=e.get_results_count();return new We({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function st(e){const t=e.get_results_count();return new Xe({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function lt(e){const t=e.get_results_count();return new je({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function dt(e){const t=e.get_results_count();return new Ke({resultsCount:t,results:et(e,t),decoderError:ie(e.error)})}function ct(e){return new qe({decoderError:ie(e.error)})}var ut=r(93637),pt=r(64108),yt=r(39357),ht=r(53177),gt=r(76357),ft=r(41628);let mt=class extends p.A{constructor(e){super(e),this.name=null,this.supportedCategory="esriTypeUNSPECIFIED",this.analyzers=[],this.searchProperties=new Map}};(0,u.Cg)([(0,y.MZ)()],mt.prototype,"name",void 0),(0,u.Cg)([(0,y.MZ)()],mt.prototype,"supportedCategory",void 0),(0,u.Cg)([(0,y.MZ)()],mt.prototype,"analyzers",void 0),(0,u.Cg)([(0,y.MZ)()],mt.prototype,"searchProperties",void 0),mt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.SearchIndex")],mt);var wt=r(25927),_t=(r(77901),r(40662)),vt=r(42095),At=r(23150);function bt(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=Ct(e,r),{coords:a,geometry_type:o,lengths:s}=e;if(o.value!==t)throw new i.A("KnowledgeGraph:illegal-geometry-type","Illegal Geometry type for multipath conversion");let l=0;return s.forEach(e=>{const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e[t]=a[l],l++;t.push(e)}r.paths.push(t)}),r}function Ct(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}const Tt=()=>s.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function Mt(e,t){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 1:return function(e,t){const r={spatialReference:t};let n=2;Ct(e,r);const a=e.coords;return r.x=a[0],r.y=a[1],e.has_z&&(r.z=a[n],n++),e.has_m&&(r.m=a[n]),new ue.A(r)}(e,t);case 2:return function(e,t){const r={spatialReference:t},n=Ct(e,r),a=e.lengths,o=e.coords,i=a[0];r.points=[];let s=0;for(let e=0;e<i;e++){const e=[];for(let t=0;t<n;t++)e[t]=o[s],s++;r.points.push(e)}return new ce.A(r)}(e,t);case 3:return function(e,t){const{paths:r,hasM:n,hasZ:a}=bt(e,3);return new ye.A({paths:r,hasM:n,hasZ:a,spatialReference:t})}(e,t);case 4:return function(e,t){const{paths:r,hasM:n,hasZ:a}=bt(e,4);return new pe.A({rings:r,hasM:n,hasZ:a,spatialReference:t})}(e,t);case 5:case 7:return Tt().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;default:return Tt().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}return Tt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null}function Rt(e,t,r){return((e,t,r)=>{if(!function(e){return null!=e&&"object"==typeof e&&"object_value_type"in e}(e))return Mt(e,r);if(t)switch(e.object_value_type.value){case 0:return function(e,t,r){return new _t.A(xt(e,t,r))}(e,t,r);case 1:return St(e,t,r);case 2:return Dt(e,t,r);case 3:return function(e,t,r){const n=e.entity_count(),a=e.relationship_count(),o=[];for(let i=0;i<n;i++)o.push(St(e.get_entity_at(i),t,r)),i<a&&o.push(Dt(e.get_relationship_at(i),t,r));return new vt.A({path:o})}(e,t,r);case 4:return function(e,t,r){const n=[],a=e.count();for(let o=0;o<a;o++){const a=e.get_value_at(o);n.push(Rt(a,t,r))}return n}(e,t,r);default:return Tt().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}return Tt().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null})(e,t,r)}function St(e,t,r){const n=e.type_name,a=xt(e,t,r),o=e.get_id();return new wt.A(Object.assign({typeName:n,id:o},a))}function xt(e,t,r){const n={},a=e.key_count();for(let o=0;o<a;o++)n[e.get_key_at(o)]=Rt(e.get_value_at(o),t,r);return{properties:n}}function Dt(e,t,r){const n=e.type_name,a=xt(e,t,r);return new At.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},a))}function kt(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 c.A(e.get_out_sr());return new J({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit(),dataModelTimestamp:e.data_model_timestamp?new Date(e.data_model_timestamp):null})}let Gt=!1;function Pt(e){return e.deleteLater(),new X(Nt(e))}function It(e){return e.deleteLater(),new H({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:qt(e.fields)})}function Nt(e){return{name:e.name,alias:e.alias,role:(0,ut.i7)(_e.Eq,e.role.value),strict:e.strict,properties:Lt(e.properties),fieldIndexes:Kt(e.field_indexes)}}function jt(e){return e.deleteLater(),new W({alias:e.alias,name:e.name,fieldType:(0,ut.i7)(_e.r5,e.field_type.value)??void 0,geometryType:(0,ut.i7)(_e.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:(0,ut.i7)(_e.ti,e.role.value),defaultValue:Mt(e.default_value,new c.A({wkid:4326})),domain:e.domain})}let Ot=class extends gt.A{};function Zt(e){return 2===e.get_domain_type().value?new ft.A({name:e.name,minValue:e.range_domain.value_at(0),maxValue:e.range_domain.value_at(1)}):1===e.get_domain_type().value?new ht.A({name:e.name,codedValues:Bt(e)}):new Ot({name:e.name})}function Ut(e){e.deleteLater();const t=Nt(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 ee(Object.assign({endPoints:r},t))}function Ft(e){return new te({behavior:e.behavior,value:e.value})}function Et(e){const t=[];for(let r=0;r<e.size();r++)t.push(Pt(e.get(r)));return e.delete(),t}function qt(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function Lt(e){const t=[];for(let r=0;r<e.size();r++){const n=jt(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(Gt=!0),t.push(n)}return e.delete(),t}function Kt(e){const t=[];for(let r=0;r<e.size();r++)t.push(It(e.get(r)));return e.delete(),t}function $t(e){const t=[];for(let r=0;r<e.size();r++)t.push(Ut(e.get(r)));return e.delete(),t}function zt(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(Ft(n))}return e.delete(),t}function Jt(e){const t=[];for(let r=0;r<e.size();r++){const n=new mt,a=e.get(r);n.name=a.name,n.supportedCategory=(0,ut.i7)(_e.nP,a.supported_category.value);const o=a.analyzers.size();for(let e=0;e<o;e++)n.analyzers.push({name:a.analyzers.get(e).name});a.analyzers.delete();for(let e=0;e<a.search_properties.keys().size();e++){const t=a.search_properties.keys().get(e),r=a.search_properties.get(t),o=[];for(let e=0;e<r.property_names.size();e++)o.push(r.property_names.get(e));n.searchProperties.set(t,{propertyNames:o})}t.push(n)}return e.delete(),t}function Vt(e){const t=[];for(let r=0;r<e.domains_count();r++){const n=e.domain_at(r);n.deleteLater(),t.push(Zt(n))}return t}function Bt(e){const t=[];for(let r=0;r<e.coded_value_domain.coded_values_count();r++){const n=e.coded_value_domain.coded_value_at(r);n.deleteLater(),t.push(new yt.A({name:n.name,code:n.get_code()}))}return t}Ot=(0,u.Cg)([(0,pt.$)("esri.rest.knowledgeGraph.wasmInterface.wasmToDataModelFactories")],Ot);let Qt=class extends p.A{constructor(e){super(e),this.asyncStatusUrl=null,this.createReplicaResult=null}};(0,u.Cg)([(0,y.MZ)()],Qt.prototype,"asyncStatusUrl",void 0),(0,u.Cg)([(0,y.MZ)()],Qt.prototype,"createReplicaResult",void 0),Qt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.CreateReplicaResponse")],Qt);let Ht=class extends p.A{constructor(e){super(e),this.replicaName=null,this.replicaId=null,this.replicaOwner=null,this.lastSyncDate=null,this.creationDate=null,this.syncDirection=null,this.replicaFilters=null}};(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaName",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaId",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaOwner",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"lastSyncDate",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"creationDate",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"syncDirection",void 0),(0,u.Cg)([(0,y.MZ)()],Ht.prototype,"replicaFilters",void 0),Ht=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicaDefinition")],Ht);let Wt=class extends p.A{constructor(e){super(e),this.replicas=[]}};(0,u.Cg)([(0,y.MZ)()],Wt.prototype,"replicas",void 0),Wt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.ReplicasInformationResponse")],Wt);let Yt=class extends p.A{constructor(e){super(e),this.decoderError=null,this.unregisterReplicaResults=[]}};(0,u.Cg)([(0,y.MZ)()],Yt.prototype,"decoderError",void 0),(0,u.Cg)([(0,y.MZ)()],Yt.prototype,"unregisterReplicaResults",void 0),Yt=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.UnregisterReplicaResponse")],Yt);const Xt=new c.A({wkid:4326});function er(e,t){const r=[];for(let n=0;n<e;n++){const e=ie(t.get_warning_at(n));e&&r.push(e)}return r}function tr(e,t){const r=[];for(let n=0;n<e;n++){const e=ie(t.get_error_at(n));e&&r.push(e)}return r}function rr(e){return{replicaName:e.get_replica_name(),replicaId:e.get_replica_id(),lastSyncDate:gr(e.get_last_sync_date())}}function nr(e){return{replicaId:e.get_replica_id(),error:e.has_error()?ie(e.get_error()):void 0}}function ar(e,t){const r=e.get_static_definition();return r.deleteLater(),{inputQuantizationParameters:void 0,inputSpatialReference:new c.A(e.input_spatial_reference),staticDefinition:or(r,t)}}function or(e,t){const r=[],n=[];for(let n=0;n<e.get_entity_type_replica_definition_count();n++){const a=e.get_entity_type_replica_definition_at(n);a.deleteLater(),r.push(ir(a,t))}for(let r=0;r<e.get_relationship_type_replica_definition_count();r++){const a=e.get_relationship_type_replica_definition_at(r);a.deleteLater(),n.push(sr(a,t))}return{entityTypeReplicaDefinitions:r,relationshipTypeReplicaDefinitions:n}}function ir(e,t){const r=e.document_options.get_include_connected_documents();return r?.deleteLater(),{...lr(e,t),documentOptions:r?cr(r):{includeConnectedDocuments:!1}}}function sr(e,t){return lr(e,t)}function lr(e,t){const r=e.provenance_options;r.deleteLater();const n={},a=e.get_parameter_count();for(let r=0;r<a;r++)n[e.get_parameter_key_at(r)]=dr(e.get_parameter_value_at(r),t);return{typeName:e.type_name,openCypherWhereClause:e.open_cypher_where_clause,provenanceOptions:ur(r),parameters:a?n:void 0}}function dr(e,t){return Rt(e,t,Xt)}function cr(e){const t=e.get_provenance_options();t.deleteLater();const r=ur(t);return r.includeProvenance?{includeConnectedDocuments:!0,includeDocumentProvenance:!0,includeDocumentSourceDocuments:r.includeSourceDocuments}:{includeConnectedDocuments:!0,includeDocumentProvenance:!1}}function ur(e){const t=e.get_include_provenance();return t?{includeProvenance:!0,includeSourceDocuments:pr(t)}:{includeProvenance:!1}}function pr(e){return e.get_include_source_documents()}function yr(e,t){const r=e.value,n=t.SyncDirection;if(r===n.BIDIRECTIONAL.value)return"bidirectional";if(r===n.UPLOAD.value)return"upload";if(r===n.DOWNLOAD.value)return"download";throw new i.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction value: ${r}`)}function hr(e){switch(e.value){case 0:return;case 1:return"pbf";case 2:return"spbf";case 3:return"geoparquet";case 4:return"sqlite";default:throw new i.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format value: ${e.value}`)}}function gr(e){return e?new Date(e):null}let fr=class extends p.A{constructor(e){super(e),this.hasError=!1,this.error=null,this.username=null,this.timestamp=null,this.editResults=[],this.cascadeRelationshipDeleteResults=[],this.cascadeProvenanceDeleteResults=[]}};(0,u.Cg)([(0,y.MZ)()],fr.prototype,"hasError",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"error",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"username",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"timestamp",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"editResults",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"cascadeRelationshipDeleteResults",void 0),(0,u.Cg)([(0,y.MZ)()],fr.prototype,"cascadeProvenanceDeleteResults",void 0),fr=(0,u.Cg)([(0,y.$K)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],fr);const mr=fr;function wr(e){const t=e.has_error(),r=function(e){const t=e.get_apply_edits_metadata();t.deleteLater();const r=t.get_username(),n=t.get_timestamp();return{username:r,timestamp:null!=n?new Date(n):null}}(e),n=new mr({hasError:t,error:t?ie(e.error):null});n.username=r.username,n.timestamp=r.timestamp;const a=e.get_edit_results_count();for(let t=0;t<a;t++){const r=e.get_edit_results_at(t);r.deleteLater();const a=e.get_edit_results_type_name_at(t),o=[],i=[],s=[],l=r.get_add_results_count(),d=r.get_update_results_count(),c=r.get_delete_results_count();for(let e=0;e<l;e++){const t=r.get_add_result_at(e);t.deleteLater(),o.push({id:t.id,error:ie(t.error)})}for(let e=0;e<d;e++){const t=r.get_update_result_at(e);t.deleteLater(),i.push({id:t.id,error:ie(t.error)})}for(let e=0;e<c;e++){const t=r.get_delete_result_at(e);t.deleteLater(),s.push({id:t.id,error:ie(t.error)})}n.editResults.push({typeName:a,adds:o,updates:i,deletes:s})}const o=e.get_cascaded_rel_deletes_count();for(let t=0;t<o;t++){const r=e.get_cascaded_rel_deletes_at(t);r.deleteLater();const a=e.get_cascaded_rel_deletes_type_name_at(t),o=[];for(let e=0;e<r.get_count();e++){const t=r.get_result_at(e);t.deleteLater(),o.push({id:t.id,originId:t.origin_id,destinationId:t.dest_id,error:ie(t.error)})}n.cascadeRelationshipDeleteResults.push({typeName:a,cascadeRelationshipDeletes:o})}if(e.has_cascading_provenance_deletes()){const t=e.get_cascading_provenance_deletes();t.deleteLater();const r=t.get_count();for(let e=0;e<r;e++){const r=t.get_result_at(e);r.deleteLater(),n.cascadeProvenanceDeleteResults.push({id:r.id,error:ie(r.error)})}}return n}const _r=new Map,vr=()=>new Map(_r.entries()),Ar={fetchKnowledgeGraph:async e=>{const t=new ae({url:e}),r=[];return r.push(Fr(t)),r.push(Er(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await cn(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 ne(t),e.serviceDefinition},executeFindPathsAsynchronous:async(e,t)=>{const r=e.inKnowledgeGraphUrl.split("/rest/services");if(r.length<2)throw new i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],a=(await en(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,o=`/rest/services/${a&&a<12?"System":"Utilities"}/KnowledgeGraphServerToolsAsync/GPServer/ServerFilteredFindPaths`;return await Xr(`${n}${o}`,{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 i.A("knowledge-graph:invalid-tool-url","The URL for the KG Service was not correctly formatted. It should contain /rest/services/");const n=r[0],a=(await en(`${n}/rest/info`,{query:{f:"json"}})).data.currentVersion,o=`/rest/services/${a&&a<12?"System":"Utilities"}/KnowledgeGraphServerTools/GPServer/ServerFilteredFindPaths/execute`,s=await en(`${n}${o}`,{method:"post",query:{f:"json",in_knowledge_graph_url:e.inKnowledgeGraphUrl,config_type:"STRING",config_string:JSON.stringify(e.config),result_type:"STRING"},...t});if(s.data.results.length<1)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results returned",s);let l;for(const e of s.data.results)if("out_results_string"===e.paramName){l=e.value;break}if(!l)throw new i.A("knowledge-graph:no-results","No results were returned from the FindPaths tool - no results were returned on the expected paramater out_results_string",s);return l},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 tn(e);const a=await nn(n,r);if(!e.serviceDefinition?.supportsProvenance&&"include"===t.provenanceBehavior)throw new i.A("knowledge-graph:provenance-not-supported","The Knowledge Graph Service definition indicated that provenance is not supported");a.data.body=await async function(e,t){const r=await(0,de.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,a]of Object.entries(e.bindParameters))rn(t,a,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 Fr(t),4326!==t.dataModel?.spatialReference?.wkid)throw new i.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 i.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 i.A("knowledge-graph:illegal-output-quantization","The Output quantization contained an illegal mode setting",e.quantizeMode);if(!e.tolerance)throw new i.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:he[e]}}(e.provenanceBehavior,n);try{n.encode()}catch(e){throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{error:e})}const a=n.get_encoding_result();if(0!==a.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:a.error.error_code,errorMessage:a.error.error_message});return structuredClone(a.get_byte_buffer())}(t,e);const o=await Yr(a.data.url,a.data);if(e.dataModel){const t=await dn(o,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")},executeApplyEdits:async(e,t,r)=>{if(e.serviceDefinition?.dataEditingNotSupported||null!=e.dataModel.arcgisManaged&&!e.dataModel.arcgisManaged)throw new i.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 tn(e);const a=await nn(n,r);return a.data.body=await async function(e,t){if(t.dataModel||await Fr(t),!t.dataModel)throw new i.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,de.I)(),n=!!e.options?.cascadeDelete,a=!!e.options?.cascadeProvenanceDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?Ae(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n,o.cascade_delete_provenance=a;try{let t;e.entityAdds?.forEach(e=>{t=o.add_entity(ve(e,r)),oe(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 i.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=o.add_relationship(ve(e,r)),oe(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 i.A("knowledge-graph:entity-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_entity(ve(e,r)),oe(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 i.A("knowledge-graph:relationship-id-missing","When updating an entity or relationship, you must specify the id on the class level property");t=o.update_relationship(ve(e,r)),oe(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 i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.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 i.A("knowledge-graph:no-type-name","You must indicate the entity/relationship named object type to apply edits - delete");const t=o.make_delete_helper(e.typeName,!1);e.ids?.forEach(e=>{t.delete_by_id(e)})}),o.encode()}catch(e){throw new i.A("knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed",{error:e})}const s=o.get_encoding_result();return oe(s.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(s.get_byte_buffer())}(t,e),async function(e){return an(e,(await(0,de.I)()).GraphApplyEditsDecoder,wr)}(await Yr(a.data.url,a.data))},executeAddNamedTypes:async(e,t,r)=>{if(!t.newEntityTypes?.length&&!t.newRelationshipTypes?.length)throw new i.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 tn(e);const a=await nn(n,r);a.data.body=await async function(e){const t=await(0,de.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(),Me(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 Me(e,t,r)}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addNamedTypes-encoding-failed","Attempting to encode the addNamedTypes failed"),structuredClone(n.get_byte_buffer())}(t);const o=await Yr(a.data.url,a.data),s=await async function(e){return an(e,(await(0,de.I)()).GraphNamedObjectTypeAddsResponseDecoder,tt)}(o);return s.updatedKnowledgeGraph=await Ur(e.url),s},executeDeleteNamedType:async(e,t,r)=>{if(!t)throw new i.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 tn(e);const a=await nn(n,r);a.data.body="";const o=await Yr(a.data.url,a.data),s=await async function(e){return an(e,(await(0,de.I)()).GraphNamedObjectTypeDeleteResponseDecoder,nt)}(o);return s.updatedKnowledgeGraph=await Ur(e.url),s},executeUpdateNamedType:async(e,t,r,n)=>{if(!t&&!Object.keys(r).length)throw new i.A("knowledge-graph:no-arguments","The operation to update types in the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/update`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphNamedObjectTypeUpdateRequestEncoder;if(a.deleteLater(),r.entityTypes.some(e=>e.name===t))a.update_entity_type(function(e,t){const r=new t.EntityType;return r.deleteLater(),Re(e,r)}(e,n));else{if(!r.relationshipTypes.some(e=>e.name===t))throw new i.A("knowledge-graph:updateNamedType-encoding-failed","The named type you are trying to update does not exist in the data model");a.update_relationship_type(function(e,t){const r=new t.RelationshipType;return r.deleteLater(),Re(e,r)}(e,n))}a.update_alias=e.hasOwnProperty("alias");try{a.encode()}catch(e){throw new i.A("knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:updateNamedType-encoding-failed","Attempting to encode the updateNamedType failed"),structuredClone(o.get_byte_buffer())}(r,t,e.dataModel);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphNamedObjectTypeUpdateResponseDecoder,rt)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeAddGraphProperties:async(e,t,r,n)=>{if(!t&&!r.length)throw new i.A("knowledge-graph:no-arguments","The operation to add properties to the data model contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/add`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphPropertyAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_graph_property(be(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addGraphProperties-encoding-failed","Attempting to encode the addGraphProperties failed"),structuredClone(n.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphPropertyAddsResponseDecoder,at)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeDeleteGraphProperty:async(e,t,r,n)=>{if(!t&&!r)throw new i.A("knowledge-graph:no-arguments","The operation to delete property contained missing or empty values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/fields/delete`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=new((await(0,de.I)()).GraphPropertyDeleteRequestEncoder);t.deleteLater(),t.field_name=e;try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:deleteGraphProperty-encoding-failed","Attempting to encode the deleteGraphProperty failed"),structuredClone(r.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphPropertyDeleteResponseDecoder,ot)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeUpdateGraphProperty:async(e,t,r,n,a)=>{if(!t&&!r&&!Object.keys(n).length)throw new i.A("knowledge-graph:no-arguments","The operation to update properties in the data model contained missing or empty values");const o=`${e.url}/dataModel/edit/namedTypes/${t}/fields/update`;await tn(e);const s=await nn(o,a);s.data.body=await async function(e,t){const r=await(0,de.I)(),n=new r.GraphPropertyUpdateRequestEncoder;n.deleteLater(),n.update_graph_property(function(e,t){const r=new t.GraphProperty;return r.deleteLater(),e.hasOwnProperty("alias")&&(r.alias=e.alias),e.hasOwnProperty("editable")&&(r.editable=e.editable),e.hasOwnProperty("required")&&(r.required=e.required),e.hasOwnProperty("defaultVisibility")&&(r.default_visibility=e.defaultVisibility),e.hasOwnProperty("defaultValue")&&(r.default_value=Se(e.defaultValue,t)),e.hasOwnProperty("domain")&&(r.domain=e.domain),r}(t,r)),n.set_property_name(e),n.update_alias=t.hasOwnProperty("alias"),n.update_editable=t.hasOwnProperty("editable"),n.update_required=t.hasOwnProperty("required"),n.update_visible=t.hasOwnProperty("defaultVisibility"),n.update_default_value=t.hasOwnProperty("defaultValue"),n.update_domain=t.hasOwnProperty("domain");try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed",{error:e})}const a=n.get_encoding_result();return oe(a.error,"knowledge-graph:updateGraphProperty-encoding-failed","Attempting to encode the updateGraphProperty failed"),structuredClone(a.get_byte_buffer())}(r,n);const l=await Yr(s.data.url,s.data),d=await async function(e){return an(e,(await(0,de.I)()).GraphPropertyUpdateResponseDecoder,it)}(l);return d.updatedKnowledgeGraph=await Ur(e.url),d},executeAddGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/add`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphIndexAddsRequestEncoder;r.deleteLater(),e.forEach(e=>{r.add_field_index(function(e,t){const r=new t.FieldIndex;r.deleteLater(),r.name=e.name,r.unique=e.unique,r.ascending=e.ascending,r.description=e.description??"";for(const t of e.fieldNames)r.add_field(t);return r}(e,t))});try{r.encode()}catch(e){throw new i.A("knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed",{error:e})}const n=r.get_encoding_result();return oe(n.error,"knowledge-graph:addGraphFieldIndex-encoding-failed","Attempting to encode the addGraphFieldIndex failed"),structuredClone(n.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphIndexAddsResponseDecoder,lt)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeDeleteGraphFieldIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!r?.length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty field index values");const a=`${e.url}/dataModel/edit/namedTypes/${t}/indexes/delete`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e){const t=new((await(0,de.I)()).GraphIndexDeleteRequestEncoder);t.deleteLater(),e.forEach(e=>{t.add_index_name(e)});try{t.encode()}catch(e){throw new i.A("knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:deleteGraphFieldIndex-encoding-failed","Attempting to encode the deleteGraphFieldIndex failed"),structuredClone(r.get_byte_buffer())}(r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphIndexDeleteResponseDecoder,dt)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeUpdateSearchIndex:async(e,t,r,n)=>{if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing named type");if(!Object.keys(r.addSearchProperties??{}).length&&!Object.keys(r.removeSearchProperties??{}).length)throw new i.A("knowledge-graph:no-arguments","The operation to update search index in the data model contained missing or empty properties values");const a=`${e.url}/dataModel/searchIndex/update`;await tn(e);const o=await nn(a,n);o.data.body=await async function(e,t){const r=await(0,de.I)(),n=new r.GraphUpdateSearchIndexRequestEncoder;n.deleteLater(),t.hasOwnProperty("addSearchProperties")&&n.insert_add_search_property(e,Ce(t.addSearchProperties,r)),t.hasOwnProperty("removeSearchProperties")&&n.insert_delete_search_property(e,Ce(t.removeSearchProperties,r));try{n.encode()}catch(e){throw new i.A("knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed",{error:e})}const a=n.get_encoding_result();return oe(a.error,"knowledge-graph:updateSearchIndex-encoding-failed","Attempting to encode the updateSearchIndex failed"),structuredClone(a.get_byte_buffer())}(t,r);const s=await Yr(o.data.url,o.data),l=await async function(e){return an(e,(await(0,de.I)()).GraphUpdateSearchIndexResponseDecoder,st)}(s);return l.updatedKnowledgeGraph=await Ur(e.url),l},executeAddDomain:async(e,t,r,{mergePolicy:n="esriMergePolicyTypeDefaultValue",splitPolicy:a="esriSplitPolicyTypeDefaultValue"},o)=>{const s=`${e.url}/dataModel/domains/add`;await tn(e);const l=await nn(s,o);l.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphDomainAddRequestEncoder;a.deleteLater(),a.set_domain(Te(e,n,t,r));try{a.encode()}catch(e){throw new i.A("knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:addDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(o.get_byte_buffer())}(t,r,{mergePolicy:n,splitPolicy:a});const d=await Yr(l.data.url,l.data),c=await async function(e){return an(e,(await(0,de.I)()).GraphDomainAddResponseDecoder,ct)}(d);return c.updatedKnowledgeGraph=await Ur(e.url),c},executeUpdateDomain:async(e,t,r,n,a)=>{const o=`${e.url}/dataModel/domains/${t.name}/update`;await tn(e);const s=await nn(o,a);s.data.body=await async function(e,t,r){const n=await(0,de.I)(),a=new n.GraphDomainUpdateRequestEncoder;a.deleteLater(),a.set_domain(Te(e,n,t,r)),a.update_domain=!0,r?.mergePolicy&&(a.update_merge_policy=!0),r?.splitPolicy&&(a.update_split_policy=!0);try{a.encode()}catch(e){throw new i.A("knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed",{error:e})}const o=a.get_encoding_result();return oe(o.error,"knowledge-graph:updateDomain-encoding-failed","Attempting to encode the domain failed"),structuredClone(o.get_byte_buffer())}(t,r,n);const l=await Yr(s.data.url,s.data),d=await async function(e){return an(e,(await(0,de.I)()).GraphDomainUpdateResponseDecoder,ct)}(l);return d.updatedKnowledgeGraph=await Ur(e.url),d},executeDeleteDomain:async(e,t,r)=>{const n=`${e.url}/dataModel/domains/${t}/delete`;if(!t)throw new i.A("knowledge-graph:no-arguments","The operation to delete a domain from the data model contained missing or empty domain name");await tn(e);const a=await nn(n,r);a.data.body="";const o=await Yr(a.data.url,a.data),s=await async function(e){return an(e,(await(0,de.I)()).GraphDomainDeleteResponseDecoder,ct)}(o);return s.updatedKnowledgeGraph=await Ur(e.url),s},executeCreateReplica:async(e,t,r)=>{const n=`${e.url}/replicas/create`;await tn(e);const a=await nn(n,r);return a.data.body=await async function(e){const t=function(e,t){const r=new t.CreateReplicaRequestEncoder;return r.deleteLater(),e.requestedReplicaId&&(r.replica_id=e.requestedReplicaId),e.requestedReplicaName&&(r.requested_replica_name=e.requestedReplicaName),r.sync_direction=function(e,t){const r=t.SyncDirection,n=e.toUpperCase(),a=r?.[n];if(!a)throw new i.A("knowledge-graph:replica-invalid-sync-direction",`Unsupported replica sync direction: ${e}`);return a}(e.syncDirection,t),r.sync_data_format=function(e,t){const r=t.SyncDataFormat,n=e.toUpperCase(),a=r?.[n];if(!a)throw new i.A("knowledge-graph:replica-invalid-sync-data-format",`Unsupported replica sync data format: ${e}`);return a}(e.syncDataFormat,t),r.async=!1,"reference"===e.type&&(r.reference_replica=function(e,t){const r=new t.ReferenceReplica;return r.deleteLater(),r.replica_id=e.replicaId,r}(e.referenceReplica,t)),"filter"===e.type&&(r.replica_filters=function(e,t){const r=e.inputQuantizationParameters?Ae(e.inputQuantizationParameters):t.InputQuantizationUtil.WGS84_lossless(),n=function(e,t){const r=new t.StaticDefinition;r.deleteLater();const n=e.entityTypeReplicaDefinitions??[],a=e.relationshipTypeReplicaDefinitions??[];if(n.length<1&&a.length<1)throw new i.A("knowledge-graph:replica-invalid-static-definition","A Filter Replica static definition must include at least one entity type or relationship type replica definition");for(const e of n)r.add_entity_type_replica_definition(xe(e,t));for(const e of a)r.add_relationship_type_replica_definition(De(e,t));return r}(e.staticDefinition,t),a=new t.ReplicaFilters(n);return a.deleteLater(),a.input_quantization_parameters=r,e.inputSpatialReference&&(a.input_spatial_reference=e.inputSpatialReference),a}(e.replicaFilters,t)),r}(e,await(0,de.I)());try{t.encode()}catch(e){throw new i.A("knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:createReplica-encoding-failed","Attempting to encode createReplica failed"),structuredClone(r.get_byte_buffer())}(t),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,de.I)()).CreateReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&oe(r.error,"knowledge-graph:createReplica-decoding-error","An error occurred while decoding the createReplica response"),function(e){const t=new Qt;if(e.has_async_status_url()&&(t.asyncStatusUrl=e.get_async_status_url()),e.has_create_replica_result()){const r=e.get_create_replica_result();r.deleteLater(),t.createReplicaResult=function(e){return{errors:tr(e.get_error_count(),e),warnings:er(e.get_warning_count(),e),replicaName:e.get_replica_name(),requestedReplicaName:e.get_requested_replica_name(),replicaId:e.get_replica_id(),syncDate:gr(e.get_sync_date()),replicaDataFormat:hr(e.get_replica_data_format()),replicaDataUrl:e.get_replica_data_url()}}(r)}return t}(r)}finally{r.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for createReplica",{responseType:t,data:await e.text()})}(await Yr(a.data.url,a.data))},fetchReplicaDefinition:async(e,t,r)=>{const n=`${e.url}/replicas/${t}`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",...r?.query},signal:r?.signal,timeout:r?.timeout}),s=a.getHeader?.("content-type"),l=a.data;if(s?.includes("application/x-protobuf")){const t=await(0,de.I)(),r=new t.ReplicaDefinitionResponseDecoder;return r.deleteLater(),r.decode(new Uint8Array(l)),r.has_error()&&oe(r.error,"knowledge-graph:fetchReplica-decoding-error","An error occurred while decoding the replica definition response"),function(e,t,r){const n=e.get_replica_definition();n.deleteLater();const a=n.get_replica_filters();return a.deleteLater(),new Ht({replicaName:n.get_replica_name(),replicaId:n.get_replica_id(),replicaOwner:n.get_replica_owner(),lastSyncDate:gr(n.get_last_sync_date()),creationDate:gr(n.get_creation_date()),syncDirection:yr(n.get_sync_direction(),t),replicaFilters:ar(a,r)})}(r,t,e.dataModel)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching a replica",{responseType:s,data:a.data})},fetchReplicasInformation:async(e,t)=>{const r=`${e.url}/replicas`,n=await(0,o.A)(r,{responseType:"array-buffer",query:{f:"pbf",...t?.query},signal:t?.signal,timeout:t?.timeout}),a=n.getHeader?.("content-type"),s=n.data;if(a?.includes("application/x-protobuf")){const e=new((await(0,de.I)()).ReplicasResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&oe(e.error,"knowledge-graph:fetchReplicasInformation-decoding-error","An error occurred while decoding the replicas information response"),function(e){const t=[];for(let r=0;r<e.get_replicas_count();r++){const n=e.get_replica_info_at(r);n.deleteLater(),t.push(rr(n))}return new Wt({replicas:t})}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching replicas information",{responseType:a,data:n.data})},executeUnregisterReplica:async(e,t,r)=>{if(!0===t.unregisterAll&&"replicaIds"in t)throw new i.A("knowledge-graph:no-arguments","The operation to unregister replicas cannot include replica ids when unregisterAll is true");if(!0!==t.unregisterAll){const e="replicaIds"in t?t.replicaIds:void 0;if(!Array.isArray(e)||!e.some(e=>!!e))throw new i.A("knowledge-graph:no-arguments","The operation to unregister replicas requires at least one replica id")}const n=`${e.url}/replicas/unregister`;await tn(e);const a=await nn(n,r);return a.data.body=await async function(e){const t=function(e,t){const r=new t.UnregisterReplicaRequestEncoder;if(r.deleteLater(),e.unregisterAll)r.set_unregister_all();else{const{replicaIds:t=[]}=e;t.forEach(e=>r.add_replica_id(e))}return r}(e,await(0,de.I)());try{t.encode()}catch(e){throw new i.A("knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed",{error:e})}const r=t.get_encoding_result();return oe(r.error,"knowledge-graph:unregisterReplica-encoding-failed","Attempting to encode unregisterReplica failed"),structuredClone(r.get_byte_buffer())}(t),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,de.I)()).UnregisterReplicaResponseDecoder);try{return r.decode(new Uint8Array(t)),r.has_error()&&oe(r.error,"knowledge-graph:unregisterReplica-decoding-error","An error occurred while decoding the unregisterReplica response"),function(e){const t=[];for(let r=0;r<e.get_unregister_replica_result_count();r++){const n=e.get_unregister_replica_result_at(r);n.deleteLater(),t.push(nr(n))}return new Yt({decoderError:ie(e.error)??null,unregisterReplicaResults:t})}(r)}finally{r.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response for unregisterReplica",{responseType:t,data:await e.text()})}(await Yr(a.data.url,a.data))},executeQuery:async(e,t,r)=>{const n=`${e.url}/graph/query`,a=await(0,o.A)(n,{responseType:"array-buffer",query:{f:"pbf",openCypherQuery:t.openCypherQuery,...r?.query},signal:r?.signal,timeout:r?.timeout}),s=a.getHeader?.("content-type"),l=a.data;if(s?.includes("application/x-protobuf")){const t=new((await(0,de.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ln({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new V({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:s,data:a.data})},executeSearch:async(e,t,r)=>{const n="provenance"===t.typeCategoryFilter?"metaEntityProvenance":t.typeCategoryFilter,a=`${e.url}/graph/search`,s=await(0,o.A)(a,{responseType:"array-buffer",query:{f:"pbf",searchQuery:`"${t.searchQuery}"`,typeCategoryFilter:n,...r?.query},signal:r?.signal,timeout:r?.timeout}),l=s.getHeader?.("content-type"),d=s.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,de.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ln({wasmQueryDecoder:t,newArrayBufferToParse:d,dataModel:e.dataModel});return new V({resultRows:r.resultRows,resultHeader:r.resultHeader})}throw new i.A("knowledge-graph:undefined-data-model","The KnowledgeGraph supplied did not have a data model")}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:l,data:s.data})},executeSearchStreaming:async(e,t,r)=>{const n=`${e.url}/graph/search`;await tn(e);const a=await nn(n,r);a.data.body=await async function(e){const t=await(0,de.I)(),r=new t.GraphSearchRequestEncoder;r.deleteLater(),r.search_query=e.searchQuery;const n="provenance"===e.typeCategoryFilter?"meta_entity_provenance":e.typeCategoryFilter;if(r.type_category_filter=t.esriNamedTypeCategory[n],!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(ge(e.idsFilter,t))}catch(e){throw new i.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 i.A("knowledge-graph:search-encoding-failed","Attempting to encode the search failed",{error:e})}const a=r.get_encoding_result();if(0!==a.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:a.error.error_code,errorMessage:a.error.error_message});return structuredClone(a.get_byte_buffer())}(t);const o=await Yr(a.data.url,a.data);if(e.dataModel){const t=await dn(o,e.dataModel);return new B({resultRowsStream:t.readableStream,resultHeader:t.resultHeader})}throw new i.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=_r.get(e.url||"");n||(n=new Map,_r.set(e.url||"",n));const a=new Map(n.entries()),o=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,de.I)(),l=se(t,n,s,r.ignoreCache),d=await nn(o,r.requestOptions);d.data.body=l;const c=await Yr(d.data.url,d.data),u=c.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await c.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&oe(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const a=new Map;for(let o=0;o<e.get_results_count();o++){const i=e.get_result_at(o);if(2!==i.get_fetch_result_case().value||0!==i.error().error_code){const e=i.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=i.get_value(),l=i.get_key().key_string,d=r.get(l);let c;if(2===s.get_data_case().value&&d)c=d.value;else{if(1!==s.get_data_case().value)continue;{c=s.get_data().client_data_string;const e=i.get_value().get_v_tag().v_tag;n||t.set(l,{key:l,version:e,value:c})}}a.set(l,c)}return a}(e,n,a,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:c})},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}),a=n.getHeader?.("content-type"),s=n.data;if(a?.includes("application/x-protobuf")){const e=new((await(0,de.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&oe(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);1===n.get_client_data_key_type().value&&r.push(n.key_string)}return r}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:a,data:n.data})},clearClientDataCache:()=>_r.clear(),_fetchWrapper:async(e,t)=>fetch(e,t),_submitJobWrapper:async(e,t,r,n)=>async function(e,t,r,n){return r=f.from(r||{}),async function(e,t,r,n,a){const i={},s={},l=[];!function(e,t,r){for(const n in e){const a=e[n];if(a&&"object"==typeof a&&a instanceof R.A){const{features:e}=a;r[n]=[t.length,t.length+e.length],e.forEach(e=>{t.push(e.geometry)})}}}(n,l,i);const d=await(0,m.el)(l),{outSpatialReference:c,processExtent:u,processSpatialReference:p,returnColumnName:y,returnFeatureCollection:h,returnM:g,returnZ:f}=r,{path:w}=(0,A.Dl)(e);for(const e in i){const[t,r]=i[e];s[e]=d.slice(t,r)}const _=c?c.wkid||c:null,v=p?p.wkid||p:null,b="execute"===t?{returnColumnName:y||void 0,returnFeatureCollection:h||void 0,returnM:g||void 0,returnZ:f||void 0}:null,C={...a,query:E({...u?{context:{extent:u,outSR:_,processSR:v}}:{"env:outSR":_,"env:processSR":v},...n,...b,f:"json"},null,s)};return(0,o.A)(`${w}/${t}`,C)}(e,"submitJob",r,t??{},n).then(({data:t})=>{const r=z.fromJSON(t);return r.sourceUrl=e,r})}(e,t,r,n),_esriRequestWrapper:async(e,t)=>(0,o.A)(e,t)};async function br(e,t,r){return Ar.executeApplyEdits(e,t,r)}async function Cr(e,t,r){return Ar.executeAddNamedTypes(e,t,r)}async function Tr(e,t,r){return Ar.executeDeleteNamedType(e,t,r)}async function Mr(e,t,r,n){return Ar.executeUpdateNamedType(e,t,r,n)}async function Rr(e,t,r,n){return Ar.executeAddGraphProperties(e,t,r,n)}async function Sr(e,t,r,n){return Ar.executeDeleteGraphProperty(e,t,r,n)}async function xr(e,t,r,n,a){return Ar.executeUpdateGraphProperty(e,t,r,n,a)}async function Dr(e,t,r,n){return Ar.executeAddGraphFieldIndex(e,t,r,n)}async function kr(e,t,r,n){return Ar.executeDeleteGraphFieldIndex(e,t,r,n)}async function Gr(e,t,r,n){return Ar.executeUpdateSearchIndex(e,t,r,n)}async function Pr(e,t,r){return Ar.executeQuery(e,t,r)}async function Ir(e,t,r){return Ar.executeQueryStreaming(e,t,r)}async function Nr(e,t,r){return Ar.executeSearch(e,t,r)}async function jr(e,t,r){return Ar.executeSearchStreaming(e,t,r)}function Or(e,t){return Ar.fetchAllClientDataKeys(e,t)}function Zr(e,t,r){return Ar.fetchClientDataAtKeys(e,t,r)}async function Ur(e){return Ar.fetchKnowledgeGraph(e)}async function Fr(e){return Ar.refreshDataModel(e)}async function Er(e){return Ar.refreshServiceDefinition(e)}async function qr(e,t){return Ar.executeFindPathsAsynchronous(e,t)}async function Lr(e,t){return Ar.executeFindPaths(e,t)}async function Kr(e,t){return Ar.fetchAsynchronousFindPathsResultData(e,t)}async function $r(e,t,r,n={mergePolicy:"esriMergePolicyTypeDefaultValue",splitPolicy:"esriSplitPolicyTypeDefaultValue"},a){return Ar.executeAddDomain(e,t,r,n,a)}async function zr(e,t,r,n,a){return Ar.executeUpdateDomain(e,t,r,n,a)}async function Jr(e,t,r){return Ar.executeDeleteDomain(e,t,r)}async function Vr(e,t,r){return Ar.executeCreateReplica(e,t,r)}async function Br(e,t,r){return Ar.fetchReplicaDefinition(e,t,r)}async function Qr(e,t){return Ar.fetchReplicasInformation(e,t)}async function Hr(e,t,r){return Ar.executeUnregisterReplica(e,t,r)}function Wr(){return Ar.clearClientDataCache()}async function Yr(e,t){return Ar._fetchWrapper(e,t)}async function Xr(e,t,r,n){return Ar._submitJobWrapper(e,t,r,n)}async function en(e,t){return Ar._esriRequestWrapper(e,t)}async function tn(e){const t=a.id?.findCredential(e.url);t||(e.dataModel?await cn(e):await Fr(e))}function rn(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,me(t,n)):Array.isArray(t)?r.set_param_key_value(e,ge(t,n)):r.set_param_key_value(e,fe(t,n))}async function nn(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})}async function an(e,t,r){const n=e.headers.get("content-type");if(n?.includes("application/x-protobuf")){const n=await e.arrayBuffer(),a=new t;try{return a.decode(new Uint8Array(n)),r(a)}finally{a.deleteLater()}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:await e.text()})}let on=50;function sn(e){on=e}function ln({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:a=!1}){t&&e.push_buffer(new Uint8Array(t));const o=[];let s,l,d=0;const u=Date.now();let p=!0;for(;e.next_row();){s&&l||(s=n??kt(e),l=s.outSpatialReference??new c.A({wkid:4326})),d||(d=e.get_header_keys().size());const t=new Array(d);for(let n=0;n<d;n++){const a=e.get_value(n);t[n]=Rt(a,r,l)}if(o.push(t),a&&Date.now()-u>on){p=!1;break}}if(e.has_error())throw new i.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:s,resultRows:o,parsedAllResultsFromBuffer:p}}async function dn(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&s.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,de.I)()).GraphQueryDecoder);let a,o,d;n.deleteLater();const c=new Promise((e,t)=>{o=e,d=t});let u=!1,p=null;const y=new ReadableStream({pull:async function e(c){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw d(e),e}const{done:y,value:h}=p?{done:!1,value:null}:await r.read().catch(e=>{throw d(e),r.releaseLock(),e});h&&(p=h);try{if(y){let e;if(n.has_error()?e=new i.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}):u||o(new J),r.releaseLock(),e)throw c.error(e),d(e),e;return void c.close()}const{resultHeader:s,resultRows:l,parsedAllResultsFromBuffer:g}=ln({wasmQueryDecoder:n,newArrayBufferToParse:h,dataModel:t,decodedHeader:a,limitMaxProcessingTime:!0});return g&&(p=null),!a&&s&&(a=s,o(s),u=!0),l.length>0?void c.enqueue(l):await e(c)}catch(e){throw s.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),d(e),r.releaseLock(),(0,l.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:y,resultHeader:await c}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function cn(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),a=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,de.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(a));if(!e)throw new i.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(),Gt=!1;const t=new re({timestamp:e.timestamp,spatialReference:new c.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:(0,ut.i7)(_e.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:(0,ut.i7)(_e.wr,e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value)}},searchIndexes:Jt(e.search_indexes),entityTypes:Et(e.entity_types),relationshipTypes:$t(e.relationship_types),metaEntityTypes:Et(e.meta_entity_types),provenanceSourceTypeValues:zt(e.provenance_source_type_values.value_behavior_array),domains:Vt(e)});return Gt&&s.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/references/core/layers/support/Field/#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}},22671(e,t,r){r.d(t,{A:()=>w});var n,a=r(32198),o=r(52106),i=r(66552),s=r(25482),l=r(4718),d=r(91429),c=r(16930),u=r(60408),p=r(65864),y=r(50498),h=r(20437),g=r(36005),f=r(43937);const m=new i.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=n=class extends s.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,r,n){if(e)return void m.write(e,t,r,n);const{features:a}=this;if(a)for(const e of a)if(null!=e?.geometry)return void m.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,p.rS)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=c.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,a]}=e,o=this.features,i=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-n)/t),e=>Math.round((a-e)/r));for(let e=0,t=o.length;e<t;e++)i?.(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,a],scale:[o,i]}=r;let s=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;s=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=>a-e*i,s,l);for(const{geometry:e}of t)null!=e&&d&&d(e);return this.transform=null,this}readFeaturesWithClass(e,t,r){const n=c.A.fromJSON(t.spatialReference),a=[];for(let t=0;t<e.length;t++){const o=e[t],i=r.fromJSON(o),s=o.geometry?.spatialReference;null==i.geometry||s||(i.geometry.spatialReference=n);const l=o.aggregateGeometries,d=i.aggregateGeometries;if(l&&null!=d)for(const e in d){const t=d[e],r=l[e],a=r?.spatialReference;null==t||a||(t.spatialReference=n)}a.push(i)}return a}_quantizePoints(e,t,r){let n,a;const o=[];for(let i=0,s=e.length;i<s;i++){const s=e[i];if(i>0){const e=t(s[0]),i=r(s[1]);e===n&&i===a||(o.push([e-n,i-a]),n=e,a=i)}else n=t(s[0]),a=r(s[1]),o.push([n,a])}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,u.Bi)(e)?e.rings:e.paths,a=[];for(let e=0,o=n.length;e<o;e++){const o=n[e],i=this._quantizePoints(o,t,r);i&&a.push(i)}return a.length>0?((0,u.Bi)(e)?e.rings=a:e.paths=a,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,a){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,u.Bi)(e)?e.rings:e.paths;let i,s;for(let e=0,n=o.length;e<n;e++){const n=o[e];for(let e=0,a=n.length;e<a;e++){const a=n[e];e>0?(i+=a[0],s+=a[1]):(i=a[0],s=a[1]),a[0]=t(i),a[1]=r(s)}}if(n&&a)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]=a(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(a)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]=a(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)),a&&null!=e.mmax&&null!=e.mmin&&(e.mmax=a(e.mmax),e.mmin=a(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let i,s;for(let e=0,n=o.length;e<n;e++){const n=o[e];e>0?(i+=n[0],s+=n[1]):(i=n[0],s=n[1]),n[0]=t(i),n[1]=r(s)}if(n&&a)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2]),t[3]=a(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(a)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=a(t[2])}}:null}};(0,a.Cg)([(0,d.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,a.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,a.Cg)([(0,d.MZ)({type:[o.A],json:{write:!0}})],w.prototype,"features",void 0),(0,a.Cg)([(0,g.w)("features")],w.prototype,"readFeatures",null),(0,a.Cg)([(0,d.MZ)({type:[h.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,a.Cg)([(0,d.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:m.read}}})],w.prototype,"geometryType",void 0),(0,a.Cg)([(0,f.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,a.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,a.Cg)([(0,d.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,a.Cg)([(0,d.MZ)({types:y.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,a.Cg)([(0,g.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,a.Cg)([(0,d.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,a.Cg)([(0,f.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,a.Cg)([(0,d.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=n=(0,a.Cg)([(0,d.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},37807(e,t,r){var n=r(32198),a=r(66552),o=r(25482),i=r(91429);const s=new a.J({esriJobMessageTypeInformative:"informative",esriJobMessageTypeProcessDefinition:"process-definition",esriJobMessageTypeProcessStart:"process-start",esriJobMessageTypeProcessStop:"process-stop",esriJobMessageTypeWarning:"warning",esriJobMessageTypeError:"error",esriJobMessageTypeEmpty:"empty",esriJobMessageTypeAbort:"abort"});let l=class extends o.o{constructor(e){super(e),this.description=null,this.type=null}};(0,n.Cg)([(0,i.MZ)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,n.Cg)([(0,i.MZ)({type:String,json:{read:s.read,write:s.write}})],l.prototype,"type",void 0),l=(0,n.Cg)([(0,i.$K)("esri.rest.support.GPMessage")],l);const d=l;r.d(t,["A",0,d])},2073(e,t,r){var n=r(66552);const a={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)()(a),i=(0,n.O)()({...a,esriIntFeet:"international-feet",esriIntInches:"international-inches",esriIntMiles:"international-miles",esriIntNauticalMiles:"international-nautical-miles",esriIntYards:"international-yards"}),s=(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"}),c=(0,n.O)()({esriDOTComplete:"complete",esriDOTCompleteNoEvents:"complete-no-events",esriDOTFeatureSets:"featuresets",esriDOTInstructionsOnly:"instructions-only",esriDOTStandard:"standard",esriDOTSummaryOnly:"summary-only"}),u=(0,n.O)()({esriNAOutputLineNone:"none",esriNAOutputLineStraight:"straight",esriNAOutputLineTrueShape:"true-shape",esriNAOutputLineTrueShapeWithMeasure:"true-shape-with-measure"}),p=((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}),g=(0,n.O)()({0:"stop",1:"waypoint",2:"break"},{useNumericKeys:!0}),f=(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}),m=(0,n.O)()({1:"right",2:"left"},{useNumericKeys:!0}),w=(0,n.O)()({0:"restriction",1:"scaled-cost",2:"added-cost"},{useNumericKeys:!0}),_=(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}),A=(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}),b=(0,n.O)()({"NA Campus":"campus","NA Desktop":"desktop","NA Navigation":"navigation"}),C=(0,n.O)()({Kilometers:"kilometers",Miles:"miles",Meters:"meters"},{ignoreUnknown:!1}),T=(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}),M=(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}),S=(0,n.O)()({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),x=(0,n.O)()({esriGeometryPoint:"point",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"envelope",esriGeometryMultipoint:"multipoint"}),D=(0,n.O)()({esriNAUTCost:"cost",esriNAUTDescriptor:"descriptor",esriNAUTRestriction:"restriction",esriNAUTHierarchy:"hierarchy"}),k=(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"});r.d(t,["$n",0,b,"$r",0,f,"EM",0,g,"Ec",0,k,"JJ",0,h,"Mm",0,T,"OC",0,R,"Sr",0,u,"UO",0,s,"Vj",0,x,"WU",0,D,"Y8",0,i,"Z7",0,l,"_6",0,v,"aJ",0,c,"dd",0,C,"dn",0,d,"et",0,M,"fe",0,_,"gD",0,A,"hE",0,p,"hY",0,o,"iM",0,w,"mt",0,m,"ow",0,y,"vS",0,S])}}]);
|