@arcgis/core 4.32.0-next.20241220 → 4.32.0-next.20241221

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/127c82cdb229434883b6.js +1 -0
  4. package/assets/esri/core/workers/chunks/16530347bd78dc6c2fcd.js +1 -0
  5. package/assets/esri/core/workers/chunks/{5119811063bfc97fb725.js → 1a713cc601c6fcd97d2f.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{48f6eb3b63fec1d3312d.js → 2d908c115ea18e813b95.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{11052103efe3d53a784e.js → 31d9f0a37a5d0a1c450b.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{e7c3199813070ff30a3d.js → 3bb94da29dac3367ecc6.js} +1 -1
  9. package/assets/esri/core/workers/chunks/3ed7c8138231de3a3b96.js +1 -0
  10. package/assets/esri/core/workers/chunks/{9cc9bac6e02ab241e852.js → 4746b7afa90ea3641e60.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{ce33d2b5f22a5c566661.js → 4b5dbdcad438cb2dd4bf.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{ee1ddf56549bb169509c.js → 6332da54159d72a6ce66.js} +1 -1
  13. package/assets/esri/core/workers/chunks/648d7d8fa19a2e772c89.js +1 -0
  14. package/assets/esri/core/workers/chunks/66b411119b8ffb99b9dc.js +1 -0
  15. package/assets/esri/core/workers/chunks/88c68881cbdf4e911832.js +1 -0
  16. package/assets/esri/core/workers/chunks/8e60de347b209a753c73.js +1 -0
  17. package/assets/esri/core/workers/chunks/{770d233254419b741616.js → 9ad7d095e614e7e8d7f5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/9dd167db3f2e68b71cea.js +1 -0
  19. package/assets/esri/core/workers/chunks/{b15894bff153e0793ef4.js → 9f495ad57cdbfa90c5b8.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{d7b76bc7bff34abc2253.js → a0b3d70a1b0360084593.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{95af4dee29eb196b8ada.js → a90611cdc86190799560.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{e213f4a1c95a33f80cdc.js → aedff36d3fec86abb9fb.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{194013d377e7dd00845f.js → b611f46835edcd6eefcc.js} +1 -1
  24. package/assets/esri/core/workers/chunks/c1c216b0aebe86311fae.js +1 -0
  25. package/assets/esri/core/workers/chunks/{f2b195d04414417682d4.js → cbf57abb537e86c1dd7f.js} +1 -1
  26. package/assets/esri/core/workers/chunks/f9af0473878d960a02f2.js +1 -0
  27. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +1 -0
  28. package/assets/esri/core/workers/chunks/{0f1a7aeec18db5323365.js → fdd8a5eb07466541f1f9.js} +1 -1
  29. package/form/elements/GroupElement.js +1 -1
  30. package/form/elements/UtilityNetworkAssociationsElement.d.ts +4 -0
  31. package/form/elements/{UtilityNetworkAssociationElement.js → UtilityNetworkAssociationsElement.js} +1 -1
  32. package/form/elements.js +1 -1
  33. package/form/support/formUtils.js +1 -1
  34. package/interfaces.d.ts +178 -67
  35. package/layers/LinkChartLayer.js +1 -1
  36. package/layers/knowledgeGraph/supportUtils.js +1 -1
  37. package/layers/support/VideoElement.js +1 -1
  38. package/linkChart/OrganicLayoutSettings.js +1 -1
  39. package/package.json +1 -1
  40. package/portal/schemas/definitions.js +1 -1
  41. package/rest/knowledgeGraphService.js +1 -1
  42. package/rest/support/fileFormat.js +1 -1
  43. package/support/revision.js +1 -1
  44. package/views/3d/terrain/TileTexture.js +1 -1
  45. package/views/3d/webgl-engine/collections/Component/RenderSubmitSystem.js +1 -1
  46. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  47. package/views/3d/webgl-engine/lib/TextureCompressionWorker.js +1 -1
  48. package/views/3d/webgl-engine/lib/depthRangeUtils.js +1 -1
  49. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  50. package/views/support/TextureCompressionHelper.js +1 -1
  51. package/views/webgl/Texture.js +1 -1
  52. package/webscene/Slide.js +1 -1
  53. package/webscene/SlideLegend.d.ts +4 -0
  54. package/webscene/SlideLegend.js +5 -0
  55. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  56. package/widgets/FeatureForm.js +1 -1
  57. package/widgets/Print/PrintViewModel.js +1 -1
  58. package/widgets/Print/TemplateOptions.js +1 -1
  59. package/widgets/Print.js +1 -1
  60. package/assets/esri/core/workers/chunks/0e9bd990a8d0691fb9c8.js +0 -1
  61. package/assets/esri/core/workers/chunks/27933d6ffeebb5c13ab7.js +0 -1
  62. package/assets/esri/core/workers/chunks/2c084c0c324e3af56424.js +0 -1
  63. package/assets/esri/core/workers/chunks/48266c87363e7dcaefb3.js +0 -1
  64. package/assets/esri/core/workers/chunks/668679baf519ada9ae28.js +0 -1
  65. package/assets/esri/core/workers/chunks/737f381f2cfeddb96d15.js +0 -1
  66. package/assets/esri/core/workers/chunks/a68068b3151a14c4a0ad.js +0 -1
  67. package/assets/esri/core/workers/chunks/ad99308fb9678cdce917.js +0 -1
  68. package/assets/esri/core/workers/chunks/cc427e8f1b17744b6ea4.js +0 -1
  69. package/assets/esri/core/workers/chunks/dd4bd96dfb7f9921b774.js +0 -1
  70. package/assets/esri/core/workers/chunks/e1a03231e24293e66418.js +0 -1
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1402],{35448:(e,t,r)=>{var n,o,i,a,s,l,p;r.d(t,{Eq:()=>n,bV:()=>i,nP:()=>s,r5:()=>o,ti:()=>l,vy:()=>p,wr:()=>a}),function(e){e[e.Regular=0]="Regular",e[e.Provenance=1]="Provenance",e[e.Document=2]="Document"}(n||(n={})),function(e){e[e.esriFieldTypeSmallInteger=0]="esriFieldTypeSmallInteger",e[e.esriFieldTypeInteger=1]="esriFieldTypeInteger",e[e.esriFieldTypeSingle=2]="esriFieldTypeSingle",e[e.esriFieldTypeDouble=3]="esriFieldTypeDouble",e[e.esriFieldTypeString=4]="esriFieldTypeString",e[e.esriFieldTypeDate=5]="esriFieldTypeDate",e[e.esriFieldTypeOID=6]="esriFieldTypeOID",e[e.esriFieldTypeGeometry=7]="esriFieldTypeGeometry",e[e.esriFieldTypeBlob=8]="esriFieldTypeBlob",e[e.esriFieldTypeRaster=9]="esriFieldTypeRaster",e[e.esriFieldTypeGUID=10]="esriFieldTypeGUID",e[e.esriFieldTypeGlobalID=11]="esriFieldTypeGlobalID",e[e.esriFieldTypeXML=12]="esriFieldTypeXML",e[e.esriFieldTypeBigInteger=13]="esriFieldTypeBigInteger",e[e.esriFieldTypeDateOnly=14]="esriFieldTypeDateOnly",e[e.esriFieldTypeTimeOnly=15]="esriFieldTypeTimeOnly",e[e.esriFieldTypeTimestampOffset=16]="esriFieldTypeTimestampOffset"}(o||(o={})),function(e){e[e.esriGeometryNull=0]="esriGeometryNull",e[e.esriGeometryPoint=1]="esriGeometryPoint",e[e.esriGeometryMultipoint=2]="esriGeometryMultipoint",e[e.esriGeometryPolyline=3]="esriGeometryPolyline",e[e.esriGeometryPolygon=4]="esriGeometryPolygon",e[e.esriGeometryEnvelope=5]="esriGeometryEnvelope",e[e.esriGeometryAny=6]="esriGeometryAny",e[e.esriGeometryMultiPatch=7]="esriGeometryMultiPatch"}(i||(i={})),function(e){e[e.esriMethodHintUNSPECIFIED=0]="esriMethodHintUNSPECIFIED",e[e.esriUUIDESRI=1]="esriUUIDESRI",e[e.esriUUIDRFC4122=2]="esriUUIDRFC4122"}(a||(a={})),function(e){e[e.esriTypeUNSPECIFIED=0]="esriTypeUNSPECIFIED",e[e.esriTypeEntity=1]="esriTypeEntity",e[e.esriTypeRelationship=2]="esriTypeRelationship",e[e.esriTypeBoth=4]="esriTypeBoth"}(s||(s={})),function(e){e[e.esriGraphPropertyUNSPECIFIED=0]="esriGraphPropertyUNSPECIFIED",e[e.esriGraphPropertyRegular=1]="esriGraphPropertyRegular",e[e.esriGraphPropertyDocumentName=2]="esriGraphPropertyDocumentName",e[e.esriGraphPropertyDocumentTitle=3]="esriGraphPropertyDocumentTitle",e[e.esriGraphPropertyDocumentUrl=4]="esriGraphPropertyDocumentUrl",e[e.esriGraphPropertyDocumentText=5]="esriGraphPropertyDocumentText",e[e.esriGraphPropertyDocumentKeywords=6]="esriGraphPropertyDocumentKeywords",e[e.esriGraphPropertyDocumentContentType=7]="esriGraphPropertyDocumentContentType",e[e.esriGraphPropertyDocumentMetadata=8]="esriGraphPropertyDocumentMetadata",e[e.esriGraphPropertyDocumentFileExtension=9]="esriGraphPropertyDocumentFileExtension",e[e.esriGraphPropertyProvenanceInstanceId=10]="esriGraphPropertyProvenanceInstanceId",e[e.esriGraphPropertyProvenanceSourceType=11]="esriGraphPropertyProvenanceSourceType",e[e.esriGraphPropertyProvenanceSourceName=12]="esriGraphPropertyProvenanceSourceName",e[e.esriGraphPropertyProvenanceSource=13]="esriGraphPropertyProvenanceSource",e[e.esriGraphPropertyProvenanceComment=14]="esriGraphPropertyProvenanceComment",e[e.esriGraphPropertyProvenanceTypeName=15]="esriGraphPropertyProvenanceTypeName",e[e.esriGraphPropertyProvenancePropertyName=16]="esriGraphPropertyProvenancePropertyName"}(l||(l={})),function(e){e[e.esriIdentifierInfoTypeUNSPECIFIED=0]="esriIdentifierInfoTypeUNSPECIFIED",e[e.esriIdentifierInfoTypeDatabaseNative=1]="esriIdentifierInfoTypeDatabaseNative",e[e.esriIdentifierInfoTypeUniformProperty=2]="esriIdentifierInfoTypeUniformProperty"}(p||(p={}))},45724:(e,t,r)=>{r.d(t,{I:()=>l});var n=r(2741),o=r(44208);const i="esri/rest/knowledgeGraph/wasmInterface/";let a,s=null;async function l(){const e=s??a;if(e)return e;const t=!!(0,o.A)("wasm-simd");return a=p(t),a}async function p(e){if(e){const{default:e}=await r.e(5367).then(r.bind(r,15367)).then((e=>e.a));return e({locateFile:e=>(0,n.s)(i+e)})}const{default:t}=await r.e(9013).then(r.bind(r,29013)).then((e=>e.a));return t({locateFile:e=>(0,n.s)(i+e)})}},71402:(e,t,r)=>{r.r(t),r.d(t,{_fetchWrapper:()=>Je,_getClientDataCacheCopy:()=>Ne,_setMaxQueryParsingDurationForTesting:()=>nt,clearClientDataCache:()=>We,clientDataCache:()=>je,executeApplyEdits:()=>ze,executeQuery:()=>Ue,executeQueryStreaming:()=>qe,executeSearch:()=>Ye,executeSearchStreaming:()=>Be,fetchAllClientDataKeys:()=>Qe,fetchClientDataAtKeys:()=>He,fetchKnowledgeGraph:()=>Ke,kgRestServices:()=>Le,refreshDataModel:()=>Ve,refreshServiceDefinition:()=>$e}),r(59456);var n=r(70333),o=r(78888),i=r(49186),a=r(53966),s=r(74887),l=r(90237),p=r(69622),d=r(10107),u=(r(44208),r(87811),r(40608));let c=class extends p.A{constructor(e){super(e),this.headerKeys=[],this.outSpatialReference=null,this.exceededTransferLimit=!1}};(0,l._)([(0,d.MZ)()],c.prototype,"headerKeys",void 0),(0,l._)([(0,d.MZ)()],c.prototype,"outSpatialReference",void 0),(0,l._)([(0,d.MZ)()],c.prototype,"exceededTransferLimit",void 0),c=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.GraphQueryResultHeader")],c);const y=c;let h=class extends p.A{constructor(e){super(e),this.resultRows=[],this.resultHeader=new y}};(0,l._)([(0,d.MZ)()],h.prototype,"resultRows",void 0),(0,l._)([(0,d.MZ)()],h.prototype,"resultHeader",void 0),h=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.GraphQueryResult")],h);const f=h;let g=class extends p.A{constructor(e){super(e),this.resultRowsStream=new ReadableStream,this.resultHeader=new y}};(0,l._)([(0,d.MZ)()],g.prototype,"resultRowsStream",void 0),(0,l._)([(0,d.MZ)()],g.prototype,"resultHeader",void 0),g=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.GraphQueryStreamingResult")],g);const _=g;var w=r(25482),m=r(16930);let v=class extends w.A{constructor(e){super(e),this.name=null,this.unique=null,this.ascending=null,this.description=null,this.fieldNames=null}};(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],v.prototype,"name",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"unique",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],v.prototype,"ascending",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],v.prototype,"description",void 0),(0,l._)([(0,d.MZ)({type:[String],json:{write:!0}})],v.prototype,"fieldNames",void 0),v=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.FieldIndex")],v);const T=v;let E=class extends w.A{constructor(e){super(e),this.name=null,this.alias=null,this.fieldType=null,this.geometryType=null,this.hasM=null,this.hasZ=null,this.nullable=null,this.editable=null,this.required=null,this.defaultVisibility=null,this.systemMaintained=null,this.role=null,this.defaultValue=null}};(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"name",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"alias",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"fieldType",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"geometryType",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"hasM",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"hasZ",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"nullable",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"editable",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"required",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"defaultVisibility",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],E.prototype,"systemMaintained",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],E.prototype,"role",void 0),(0,l._)([(0,d.MZ)({json:{write:!0}})],E.prototype,"defaultValue",void 0),E=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.GraphProperty")],E);const M=E;let A=class extends w.A{constructor(e){super(e),this.name=null,this.alias=null,this.role=null,this.strict=null,this.properties=null,this.fieldIndexes=null,this.type=null}};(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],A.prototype,"name",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],A.prototype,"alias",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],A.prototype,"role",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],A.prototype,"strict",void 0),(0,l._)([(0,d.MZ)({type:[M],json:{write:!0}})],A.prototype,"properties",void 0),(0,l._)([(0,d.MZ)({type:[T],json:{write:!0}})],A.prototype,"fieldIndexes",void 0),A=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.GraphObjectType")],A);const I=A;let G=class extends I{constructor(e){super(e),this.type="entity"}};G=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.EntityType")],G);const S=G;let R=class extends I{constructor(e){super(e),this.endPoints=[],this.type="relationship"}};(0,l._)([(0,d.MZ)({json:{write:!0}})],R.prototype,"endPoints",void 0),R=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.RelationshipType")],R);const P=R;let b=class extends w.A{constructor(e){super(e),this.value=null,this.behavior=null}};(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],b.prototype,"value",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],b.prototype,"behavior",void 0),b=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.SourceTypeValueBehavior")],b);const k=b;let D=class extends w.A{constructor(e){super(e),this.timestamp=null,this.spatialReference=null,this.strict=null,this.objectIdField=null,this.globalIdField=null,this.arcgisManaged=null,this.identifierInfo=null,this.searchIndexes=null,this.entityTypes=null,this.relationshipTypes=null,this.metaEntityTypes=null,this.provenanceSourceTypeValues=null}};(0,l._)([(0,d.MZ)({type:Date,json:{type:Number,write:{writer:(e,t)=>{t.timestamp=e?.getTime()}}}})],D.prototype,"timestamp",void 0),(0,l._)([(0,d.MZ)({type:m.A,json:{write:!0}})],D.prototype,"spatialReference",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],D.prototype,"strict",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],D.prototype,"objectIdField",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],D.prototype,"globalIdField",void 0),(0,l._)([(0,d.MZ)()],D.prototype,"arcgisManaged",void 0),(0,l._)([(0,d.MZ)()],D.prototype,"identifierInfo",void 0),(0,l._)([(0,d.MZ)()],D.prototype,"searchIndexes",void 0),(0,l._)([(0,d.MZ)({type:[S],json:{write:!0}})],D.prototype,"entityTypes",void 0),(0,l._)([(0,d.MZ)({type:[P],json:{write:!0}})],D.prototype,"relationshipTypes",void 0),(0,l._)([(0,d.MZ)({type:[S],json:{write:!0}})],D.prototype,"metaEntityTypes",void 0),(0,l._)([(0,d.MZ)({type:[k],json:{write:!0}})],D.prototype,"provenanceSourceTypeValues",void 0),D=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.DataModel")],D);const x=D;let C=class extends w.A{constructor(e){super(e),this.capabilities=[],this.supportsSearch=!1,this.supportedQueryFormats=[],this.allowGeometryUpdates=!1,this.searchMaxRecordCount=null,this.serviceCapabilities=null,this.maxRecordCount=null,this.description="",this.copyrightText="",this.units="",this.spatialReference=null,this.currentVersion=null,this.dateFieldsTimeReference=null,this.serviceItemId="",this.supportsDocuments=!1,this.dataEditingNotSupported=!1,this.schemaEditingNotSupported=!1,this.supportsProvenance=!1}};(0,l._)([(0,d.MZ)({type:[String],json:{write:!0}})],C.prototype,"capabilities",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"supportsSearch",void 0),(0,l._)([(0,d.MZ)({type:[String],json:{write:!0}})],C.prototype,"supportedQueryFormats",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"allowGeometryUpdates",void 0),(0,l._)([(0,d.MZ)({type:Number,json:{write:!0}})],C.prototype,"searchMaxRecordCount",void 0),(0,l._)([(0,d.MZ)({type:Object,json:{write:!0}})],C.prototype,"serviceCapabilities",void 0),(0,l._)([(0,d.MZ)({type:Number,json:{write:!0}})],C.prototype,"maxRecordCount",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],C.prototype,"description",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],C.prototype,"copyrightText",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],C.prototype,"units",void 0),(0,l._)([(0,d.MZ)({type:m.A,json:{write:!0}})],C.prototype,"spatialReference",void 0),(0,l._)([(0,d.MZ)({type:Number,json:{write:!0}})],C.prototype,"currentVersion",void 0),(0,l._)([(0,d.MZ)({type:Object,json:{write:!0}})],C.prototype,"dateFieldsTimeReference",void 0),(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],C.prototype,"serviceItemId",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"supportsDocuments",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"dataEditingNotSupported",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"schemaEditingNotSupported",void 0),(0,l._)([(0,d.MZ)({type:Boolean,json:{write:!0}})],C.prototype,"supportsProvenance",void 0),C=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.ServiceDefinition")],C);const O=C;let F=class extends w.A{constructor(e){super(e),this.dataModel=null,this.serviceDefinition=null}};(0,l._)([(0,d.MZ)({type:String,json:{write:!0}})],F.prototype,"url",void 0),(0,l._)([(0,d.MZ)({type:x,json:{write:!0}})],F.prototype,"dataModel",void 0),(0,l._)([(0,d.MZ)({type:O,json:{write:!0}})],F.prototype,"serviceDefinition",void 0),F=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.KnowledgeGraph")],F);const Z=F;function j(e,t,r){if(0!==e.error_code)throw new i.A(t,r,{errorCode:e.error_code,errorMessage:e.error_message})}function N(e,t,r,n=!1){const o=new r.ClientDataFetchRequestEncoder;o.deleteLater();for(const i of e){const e=L(i,t,r,n);o.add_client_data_fetch_request_parameter(e)}o.encode();const i=o.get_encoding_result();return j(i.error,"knowledge-graph:fetchClientDataAtKeys-encoding-failed","Attempting to encode the fetchClientDataAtKeys failed"),structuredClone(i.get_byte_buffer())}function L(e,t,r,n){const o=new r.ClientDataKey;o.deleteLater(),o.key_string=e;const i=new r.ClientDataFetchRequestParameter;i.deleteLater(),i.set_key(o);const a=t.get(e);return a&&!n&&(i.v_tag={v_tag:a.version}),i}var z,U,q,Y=r(45724),B=r(48526),Q=r(86738),H=r(39829),K=r(82799);!function(e){e[e.OBJECT=0]="OBJECT",e[e.ENTITY=1]="ENTITY",e[e.RELATIONSHIP=2]="RELATIONSHIP",e[e.PATH=3]="PATH",e[e.ARRAY=4]="ARRAY"}(z||(z={})),function(e){e[e.view=0]="view",e[e.edit=1]="edit"}(U||(U={})),function(e){e[e.exclude=0]="exclude",e[e.include=1]="include"}(q||(q={}));var V=r(91075);function $(e,t){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(X(e,t))})),r}function W(e,t){const r=new t.ObjectValue;r.deleteLater();for(const[n,o]of Object.entries(e))r.set_key_value(n,X(o,t));return r}function J(e,t){if(e instanceof B.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=[],o=[];o[0]=e.points.length;let i=0;return e.points.forEach((e=>{e.forEach((e=>{n[i]=e,i++}))})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof Q.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=[],o=[];o[0]=1,n[0]=e.x,n[1]=e.y;let i=2;return e.hasZ&&(n[i]=e.z,i++),e.hasM&&(n[i]=e.m,i++),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),r}(e,t);if(e instanceof K.A||e instanceof H.A)return function(e,t){const r=new t.GeometryValue;r.deleteLater(),r.has_z=e.hasZ,r.has_m=e.hasM;const n=[],o=[];let i=[];e instanceof K.A?(r.geometry_type=t.esriGeometryType.esriGeometryPolyline,i=e.paths):e instanceof H.A&&(r.geometry_type=t.esriGeometryType.esriGeometryPolygon,i=e.rings);let a=0,s=0;return i.forEach((e=>{let t=0;e.forEach((e=>{t++,e.forEach((e=>{n[s]=e,s++}))})),o[a]=t,a++})),r.coords=new Float64Array(n),r.lengths=new Uint32Array(o),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 X(e,t){if(null==e)return"";if("object"!=typeof e)return e;if(e instanceof Date)return e;if(e instanceof V.A)return J(e,t);if(Array.isArray(e)){const r=new t.ArrayValue;return r.deleteLater(),e.forEach((e=>{r.add_value(X(e,t))})),r}return W(e,t)}var ee,te,re,ne,oe=r(25927),ie=r(23150);function ae(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(e instanceof oe.A){const r=new t.EntityValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,se(o,t));return e.id&&r.set_id(e.id),r}if(e instanceof ie.A){const r=new t.RelationshipValue;r.deleteLater(),r.type_name=e.typeName;for(const[n,o]of Object.entries(e.properties))r.set_key_value(n,se(o,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 se(e,t){return null==e?null:"object"!=typeof e||e instanceof Date?e:e instanceof V.A?J(e,t):null}!function(e){e[e.ClientDataKeyTypeUNSPECIFIED=0]="ClientDataKeyTypeUNSPECIFIED",e[e.ClientDataKeyTypeString=1]="ClientDataKeyTypeString"}(ee||(ee={})),function(e){e[e.ClientDataTypeUNSPECIFIED=0]="ClientDataTypeUNSPECIFIED",e[e.ClientDataTypeString=1]="ClientDataTypeString"}(te||(te={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.ClientData=1]="ClientData",e[e.NotModified=2]="NotModified"}(re||(re={})),function(e){e[e.Unspecified=0]="Unspecified",e[e.Error=1]="Error",e[e.ClientDataValue=2]="ClientDataValue"}(ne||(ne={}));let le=class extends p.A{constructor(e){super(e),this.name=null,this.supportedCategory=null,this.analyzers=[],this.searchProperties=new Map}};(0,l._)([(0,d.MZ)()],le.prototype,"name",void 0),(0,l._)([(0,d.MZ)()],le.prototype,"supportedCategory",void 0),(0,l._)([(0,d.MZ)()],le.prototype,"analyzers",void 0),(0,l._)([(0,d.MZ)()],le.prototype,"searchProperties",void 0),le=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.SearchIndex")],le);const pe=le;var de=r(35448);let ue=!1;function ce(e){return e.deleteLater(),new S(he(e))}function ye(e){return e.deleteLater(),new T({name:e.name,unique:e.unique,ascending:e.ascending,description:e.description,fieldNames:me(e.fields)})}function he(e){return{name:e.name,alias:e.alias,role:de.Eq[e.role.value]?de.Eq[e.role.value]:null,strict:e.strict,properties:ve(e.properties),fieldIndexes:Te(e.field_indexes)}}function fe(e){return e.deleteLater(),new M({alias:e.alias,name:e.name,fieldType:de.r5[e.field_type.value]?de.r5[e.field_type.value]:null,geometryType:de.bV[e.geometry_type.value]?de.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:de.ti[e.role.value],defaultValue:e.default_value})}function ge(e){e.deleteLater();const t=he(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 P(Object.assign({endPoints:r},t))}function _e(e){return new k({behavior:e.behavior,value:e.value})}function we(e){const t=[];for(let r=0;r<e.size();r++)t.push(ce(e.get(r)));return e.delete(),t}function me(e){const t=[];for(let r=0;r<e.size();r++)t.push(e.get(r));return e.delete(),t}function ve(e){const t=[];for(let r=0;r<e.size();r++){const n=fe(e.get(r));"esriFieldTypeBigInteger"===n.fieldType&&(ue=!0),t.push(n)}return e.delete(),t}function Te(e){const t=[];for(let r=0;r<e.size();r++)t.push(ye(e.get(r)));return e.delete(),t}function Ee(e){const t=[];for(let r=0;r<e.size();r++)t.push(ge(e.get(r)));return e.delete(),t}function Me(e){const t=[];for(let r=0;r<e.size();r++){const n=e.get(r);n.deleteLater(),t.push(_e(n))}return e.delete(),t}function Ae(e){const t=[];for(let r=0;r<e.size();r++){const r=new pe,n=e.get(0);r.name=n.name,r.supportedCategory=de.nP[n.supported_category.value];const o=n.analyzers.size();for(let e=0;e<o;e++)r.analyzers.push({name:n.analyzers.get(e).name});n.analyzers.delete();for(let e=0;e<n.search_properties.keys().size();e++){const t=n.search_properties.keys().get(e),o=n.search_properties.get(t),i=[];for(let e=0;e<o.property_names.size();e++)i.push(o.property_names.get(e));r.searchProperties.set(t,{propertyNames:i})}t.push(r)}return e.delete(),t}r(77901);var Ie,Ge=r(40662),Se=r(42095);function Re(e,t){const r={paths:[],hasM:!1,hasZ:!1},n=Pe(e,r),{coords:o,geometry_type:a,lengths:s}=e;if(a.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]=o[l],l++;t.push(e)}r.paths.push(t)})),r}function Pe(e,t){let r=2;return e.has_z?(t.hasZ=e.has_z,r++):t.hasZ=!1,e.has_m?(t.hasM=e.has_m,r++):t.hasM=!1,r}!function(e){e[e.ESRI_GEOMETRY_NULL=0]="ESRI_GEOMETRY_NULL",e[e.ESRI_GEOMETRY_POINT=1]="ESRI_GEOMETRY_POINT",e[e.ESRI_GEOMETRY_MULTIPOINT=2]="ESRI_GEOMETRY_MULTIPOINT",e[e.ESRI_GEOMETRY_POLYLINE=3]="ESRI_GEOMETRY_POLYLINE",e[e.ESRI_GEOMETRY_POLYGON=4]="ESRI_GEOMETRY_POLYGON",e[e.ESRI_GEOMETRY_ENVELOPE=5]="ESRI_GEOMETRY_ENVELOPE",e[e.ESRI_GEOMETRY_ANY=6]="ESRI_GEOMETRY_ANY",e[e.ESRI_GEOMETRY_MULTI_PATCH=7]="ESRI_GEOMETRY_MULTI_PATCH"}(Ie||(Ie={}));const be=()=>a.A.getLogger("esri.rest.knowledgeGraph.WasmToQueryResponseObjConstructors");function ke(e,t,r){return((e,t,r)=>{if(null==e)return null;if("object"!=typeof e)return e;if("getDate"in e)return e;if("geometry_type"in e)switch(e.geometry_type.value){case null:return null;case Ie.ESRI_GEOMETRY_POINT:return function(e,t){const r={spatialReference:t};let n=2;Pe(e,r);const o=e.coords;return r.x=o[0],r.y=o[1],e.has_z&&(r.z=o[n],n++),e.has_m&&(r.m=o[n]),new Q.A(r)}(e,r);case Ie.ESRI_GEOMETRY_MULTIPOINT:return function(e,t){const r={spatialReference:t},n=Pe(e,r),o=e.lengths,i=e.coords,a=o[0];r.points=[];let s=0;for(let e=0;e<a;e++){const e=[];for(let t=0;t<n;t++)e[t]=i[s],s++;r.points.push(e)}return new B.A(r)}(e,r);case Ie.ESRI_GEOMETRY_POLYLINE:return function(e,t){const{paths:r,hasM:n,hasZ:o}=Re(e,Ie.ESRI_GEOMETRY_POLYLINE);return new K.A({paths:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case Ie.ESRI_GEOMETRY_POLYGON:return function(e,t){const{paths:r,hasM:n,hasZ:o}=Re(e,Ie.ESRI_GEOMETRY_POLYGON);return new H.A({rings:r,hasM:n,hasZ:o,spatialReference:t})}(e,r);case Ie.ESRI_GEOMETRY_ENVELOPE:case Ie.ESRI_GEOMETRY_MULTI_PATCH:return be().warnOnce("Envelope and Multipatch are not supported on knowledge entities, but one of those geometry types was detected. Result interpreted as null"),null;case Ie.ESRI_GEOMETRY_NULL:case Ie.ESRI_GEOMETRY_ANY:default:return be().warnOnce("Unknown or blank geometry type returned - Result interpreted as null"),null}else{if(!("object_value_type"in e))return be().warnOnce("A decoded value came back of a type that is not supported. Result interpreted as null"),null;switch(e.object_value_type.value){case z.OBJECT:return function(e,t,r){return new Ge.A(xe(e,t,r))}(e,t,r);case z.ENTITY:return De(e,t,r);case z.RELATIONSHIP:return Ce(e,t,r);case z.PATH:return function(e,t,r){const n=e.entity_count(),o=e.relationship_count(),i=[];for(let a=0;a<n;a++)i.push(De(e.get_entity_at(a),t,r)),a<o&&i.push(Ce(e.get_relationship_at(a),t,r));return new Se.A({path:i})}(e,t,r);case z.ARRAY:return function(e,t,r){const n=[],o=e.count();for(let i=0;i<o;i++){const o=e.get_value_at(i);n.push(ke(o,t,r))}return n}(e,t,r);default:return be().warnOnce("Unknown graph object type detected! Result interpreted as null"),null}}})(e,t,r)}function De(e,t,r){const n=e.type_name,o=xe(e,t,r),i=e.get_id();return new oe.A(Object.assign({typeName:n,id:i},o))}function xe(e,t,r){const n={},o=e.key_count();for(let i=0;i<o;i++)n[e.get_key_at(i)]=ke(e.get_value_at(i),t,r);return{properties:n}}function Ce(e,t,r){const n=e.type_name,o=xe(e,t,r);return new ie.A(Object.assign({typeName:n,id:e.get_id(),originId:e.get_origin_entity_id(),destinationId:e.get_destination_entity_id()},o))}function Oe(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 m.A(e.get_out_sr());return new y({headerKeys:t,outSpatialReference:r,exceededTransferLimit:e.exceeded_transfer_limit()})}let Fe=class extends p.A{constructor(e){super(e),this.hasError=null,this.error=null,this.editResults=[]}};(0,l._)([(0,d.MZ)()],Fe.prototype,"hasError",void 0),(0,l._)([(0,d.MZ)()],Fe.prototype,"error",void 0),(0,l._)([(0,d.MZ)()],Fe.prototype,"editResults",void 0),Fe=(0,l._)([(0,u.$)("esri.rest.knowledgeGraph.GraphApplyEditsResult")],Fe);const Ze=Fe,je=new Map,Ne=()=>new Map(je.entries()),Le={fetchKnowledgeGraph:async e=>{const t=new Z({url:e}),r=[];return r.push(Ve(t)),r.push($e(t)),await Promise.all(r),t},refreshDataModel:async e=>{e.dataModel=await at(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 O(t),e.serviceDefinition},executeQueryStreaming:async(e,t,r)=>{const n=`${e.url}/graph/query`;await Xe(e);const o=await tt(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");o.data.body=await async function(e,t){const r=await(0,Y.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,o]of Object.entries(e.bindParameters))et(t,o,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 Ve(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:q[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 o=n.get_encoding_result();if(0!==o.error.error_code)throw new i.A("knowledge-graph:query-encoding-failed","Attempting to encode the query failed",{errorCode:o.error.error_code,errorMessage:o.error.error_message});return structuredClone(o.get_byte_buffer())}(t,e);const a=await Je(o.data.url,o.data);if(e.dataModel){const t=await it(a,e.dataModel);return new _({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)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 Xe(e);const o=await tt(n,r);return o.data.body=await async function(e,t){if(t.dataModel||await Ve(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,Y.I)(),n=!!e.options?.cascadeDelete,o=new r.GraphApplyEditsEncoder(r.SpatialReferenceUtil.WGS84(),e.options?.inputQuantizationParameters?function(e){return{xy_resolution:e.xyResolution,x_false_origin:e.xFalseOrigin,y_false_origin:e.yFalseOrigin,z_resolution:e.zResolution,z_false_origin:e.zFalseOrigin,m_resolution:e.mResolution,m_false_origin:e.mFalseOrigin}}(e.options?.inputQuantizationParameters):r.InputQuantizationUtil.WGS84_lossless());o.deleteLater(),o.cascade_delete=n;try{let t;e.entityAdds?.forEach((e=>{t=o.add_entity(ae(e,r)),j(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(ae(e,r)),j(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(ae(e,r)),j(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(ae(e,r)),j(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 a=o.get_encoding_result();return j(a.error,"knowledge-graph:applyEdits-encoding-failed","Attempting to encode the applyEdits failed"),structuredClone(a.get_byte_buffer())}(t,e),async function(e){const t=e.headers.get("content-type");if(t?.includes("application/x-protobuf")){const t=await e.arrayBuffer(),r=new((await(0,Y.I)()).GraphApplyEditsDecoder);return r.deleteLater(),r.decode(new Uint8Array(t)),function(e){const t=e.has_error(),r=new Ze({hasError:t,error:t?{errorCode:e.error.error_code,errorMessage:e.error.error_message}:null}),n=e.get_edit_results_count();for(let t=0;t<n;t++){const n=e.get_edit_results_at(t),o=e.get_edit_results_type_name_at(t),i=[],a=[],s=[],l=n.get_add_results_count(),p=n.get_update_results_count(),d=n.get_delete_results_count();for(let e=0;e<l;e++){const t=n.get_add_result_at(e);i.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<p;e++){const t=n.get_update_result_at(e);a.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}for(let e=0;e<d;e++){const t=n.get_delete_result_at(e);s.push({id:t.id,error:{errorCode:t.error.error_code,errorMessage:t.error.error_message}})}r.editResults.push({typeName:o,adds:i,updates:a,deletes:s})}return r}(r)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:t,data:e.text()})}(await Je(o.data.url,o.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,Y.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ot({wasmQueryDecoder:t,newArrayBufferToParse:l,dataModel:e.dataModel});return new f({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=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"),p=s.data;if(l?.includes("application/x-protobuf")){const t=new((await(0,Y.I)()).GraphQueryDecoder);if(t.deleteLater(),e.dataModel){const r=ot({wasmQueryDecoder:t,newArrayBufferToParse:p,dataModel:e.dataModel});return new f({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 Xe(e);const o=await tt(n,r);o.data.body=await async function(e){const t=await(0,Y.I)(),r=new t.GraphSearchRequestEncoder;if(r.deleteLater(),r.search_query=e.searchQuery,r.type_category_filter=t.esriNamedTypeCategory[e.typeCategoryFilter],!0===e.returnSearchContext&&(r.return_search_context=e.returnSearchContext),null!=e.start&&e.start>0&&(r.start_index=e.start),null!=e.num&&(r.max_num_results=e.num),null!=e.idsFilter&&Array.isArray(e.idsFilter)&&e.idsFilter.length>0)try{r.set_ids_filter($(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 n=r.get_encoding_result();if(0!==n.error.error_code)throw new i.A("knowledge-graph:search-encoding-failed","Attempting to get encoding result from the query failed",{errorCode:n.error.error_code,errorMessage:n.error.error_message});return structuredClone(n.get_byte_buffer())}(t);const a=await Je(o.data.url,o.data);if(e.dataModel){const t=await it(a,e.dataModel);return new _({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=je.get(e.url||"");n||(n=new Map,je.set(e.url||"",n));const o=new Map(n.entries()),a=`${e.url}/clientData/fetch`;t=Array.from(new Set(t));const s=await(0,Y.I)(),l=N(t,n,s,r.ignoreCache),p=await tt(a,r.requestOptions);p.data.body=l;const d=await Je(p.data.url,p.data),u=d.headers.get("content-type");if(u?.includes("application/x-protobuf")){const e=new s.ClientDataFetchResponseDecoder;e.deleteLater();const t=await d.arrayBuffer();return e.decode(new Uint8Array(t)),e.has_error()&&j(e.error,"knowledge-graph:fetchClientDataAtKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e,t,r,n=!1){const o=new Map;for(let i=0;i<e.get_results_count();i++){const a=e.get_result_at(i);if(a.get_fetch_result_case().value!==ne.ClientDataValue||0!==a.error().error_code){const e=a.get_key().key_string;r.has(e)&&t.delete(e);continue}const s=a.get_value(),l=a.get_key().key_string,p=r.get(l);let d;if(s.get_data_case().value===re.NotModified&&p)d=p.value;else{if(s.get_data_case().value!==re.ClientData)continue;{d=s.get_data().client_data_string;const e=a.get_value().get_v_tag().v_tag;n||t.set(l,{key:l,version:e,value:d})}}o.set(l,d)}return o}(e,n,o,r.ignoreCache)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response when fetching client data",{responseType:u,data:d})},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,Y.I)()).ClientDataKeysResponseDecoder);return e.deleteLater(),e.decode(new Uint8Array(s)),e.has_error()&&j(e.error,"knowledge-graph:fetchAllClientDataKeys-decoding-error","An error occurred while decoding the client data keys response"),function(e){const t=e.get_keys(),r=new Array;for(let e=0;e<t.get_keys_count();e++){const n=t.get_key_at(e);n.get_client_data_key_type().value===ee.ClientDataKeyTypeString&&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:()=>je.clear(),_fetchWrapper:async(e,t)=>fetch(e,t)};async function ze(e,t,r){return Le.executeApplyEdits(e,t,r)}async function Ue(e,t,r){return Le.executeQuery(e,t,r)}async function qe(e,t,r){return Le.executeQueryStreaming(e,t,r)}async function Ye(e,t,r){return Le.executeSearch(e,t,r)}async function Be(e,t,r){return Le.executeSearchStreaming(e,t,r)}function Qe(e,t){return Le.fetchAllClientDataKeys(e,t)}function He(e,t,r){return Le.fetchClientDataAtKeys(e,t,r)}async function Ke(e){return Le.fetchKnowledgeGraph(e)}async function Ve(e){return Le.refreshDataModel(e)}async function $e(e){return Le.refreshServiceDefinition(e)}function We(){return Le.clearClientDataCache()}async function Je(e,t){return Le._fetchWrapper(e,t)}async function Xe(e){const t=n.id?.findCredential(e.url);t||(e.dataModel?await at(e):await Ve(e))}function et(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 V.A?r.set_param_key_value(e,J(t,n)):Array.isArray(t)?r.set_param_key_value(e,$(t,n)):r.set_param_key_value(e,W(t,n))}async function tt(e,t){return(0,o.A)(e,{responseType:"native-request-init",method:"post",query:{f:"pbf",...t?.query},body:"x",headers:{"Content-Type":"application/octet-stream"},signal:t?.signal,timeout:t?.timeout})}let rt=50;function nt(e){rt=e}function ot({wasmQueryDecoder:e,newArrayBufferToParse:t,dataModel:r,decodedHeader:n,limitMaxProcessingTime:o=!1}){t&&e.push_buffer(new Uint8Array(t));const a=[];let s,l,p=0;const d=Date.now();let u=!0;for(;e.next_row();){s&&l||(s=n??Oe(e),l=s.outSpatialReference??new m.A({wkid:4326})),p||(p=e.get_header_keys().size());const t=new Array(p);for(let n=0;n<p;n++){const o=e.get_value(n);t[n]=ke(o,r,l)}if(a.push(t),o&&Date.now()-d>rt){u=!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:a,parsedAllResultsFromBuffer:u}}async function it(e,t){const r=e.headers.get("content-type");if(e.headers.get("content-length")&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("Found `Content-Length` header when expecting a streaming HTTP response! Please investigate whether all intermediate HTTP proxies and/or load balancers are configured such that they don't forcefully buffer the entire response before returning it to the client. A valid HTTP streaming response should use Chunked Transfer Encoding and not have a Content Length defined."),r?.includes("application/x-protobuf")){const r=e.body?.getReader(),n=new((await(0,Y.I)()).GraphQueryDecoder);let o,l,p;n.deleteLater();const d=new Promise(((e,t)=>{l=e,p=t}));let u=!1,c=null;const h=new ReadableStream({pull:async function e(d){if(!r){const e=new i.A("knowledge-graph:stream-decoding-error","Error reading from stream - reader is undefined");throw p(e),e}const{done:h,value:f}=c?{done:!1,value:null}:await r.read().catch((e=>{throw p(e),r.releaseLock(),e}));f&&(c=f);try{if(h){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||l(new y),r.releaseLock(),e)throw d.error(e),p(e),e;return void d.close()}const{resultHeader:a,resultRows:s,parsedAllResultsFromBuffer:g}=ot({wasmQueryDecoder:n,newArrayBufferToParse:f,dataModel:t,decodedHeader:o,limitMaxProcessingTime:!0});return g&&(c=null),!o&&a&&(o=a,l(a),u=!0),s.length>0?void d.enqueue(s):await e(d)}catch(e){throw a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").error(e),p(e),r.releaseLock(),(0,s.zf)(e)?e:new i.A("knowledge-graph:unexpected-server-response","Error inside streaming data return parsing",{error:e})}}});return{readableStream:h,resultHeader:await d}}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:r,data:e.text()})}async function at(e){const t=`${e.url}/dataModel/queryDataModel`,r=await(0,o.A)(t,{responseType:"array-buffer",query:{f:"pbf"}}),n=r.getHeader?.("content-type"),s=r.data;if(n?.includes("application/x-protobuf")){const e=(await(0,Y.I)()).decode_data_model_from_protocol_buffer(new Uint8Array(s));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(),ue=!1;const t=new x({timestamp:e.timestamp,spatialReference:new m.A(e.spatial_reference),strict:e.strict,objectIdField:e.objectid_property,globalIdField:e.globalid_property,arcgisManaged:e.arcgis_managed,identifierInfo:{identifierMappingInfo:{identifierInfoType:de.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:de.wr[e.identifier_info?.identifier_generation_info?.uuid_method_hint?.value]}},searchIndexes:Ae(e.search_indexes),entityTypes:we(e.entity_types),relationshipTypes:Ee(e.relationship_types),metaEntityTypes:we(e.meta_entity_types),provenanceSourceTypeValues:Me(e.provenance_source_type_values.value_behavior_array)});return ue&&a.A.getLogger("esri.rest.knowledgeGraph.knowledgeGraphService").warnOnce("A big integer field was detected in the retrieved data model. The `big-integer` field type is not fully supported in web clients. Please see https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-Field.html#type"),t}(e)}throw new i.A("knowledge-graph:unexpected-server-response","server returned an unexpected response",{responseType:n,data:r.data})}}}]);