@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 8.59 kB
JavaScript
;(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2288],{23150(e,t,r){r.d(t,{A:()=>s});var n=r(5482),o=r(91429),i=r(82799),a=r(54238);let s=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"originId",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],s.prototype,"destinationId",void 0),(0,n.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],s.prototype,"layoutGeometry",void 0),s=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.Relationship")],s)},25927(e,t,r){r.d(t,{A:()=>s});var n=r(5482),o=r(91429),i=r(86738),a=r(54238);let s=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,n.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],s.prototype,"layoutGeometry",void 0),s=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.Entity")],s)},40662(e,t,r){r.d(t,{A:()=>a});var n=r(5482),o=r(91429),i=r(77901);let a=class extends i.A{constructor(e){super(e)}};a=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.ObjectValue")],a)},42095(e,t,r){r.d(t,{A:()=>s});var n=r(5482),o=r(25482),i=r(91429),a=r(77901);let s=class extends o.o{constructor(e){super(e),this.path=[]}};(0,n.Cg)([(0,i.MZ)({type:[a.A],json:{write:!0}})],s.prototype,"path",void 0),s=(0,n.Cg)([(0,i.$K)("esri.rest.knowledgeGraph.Path")],s)},42538(e,t,r){r.d(t,{A:()=>p});var n=r(5482),o=r(91429),i=r(16930),a=r(69622);let s=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,n.Cg)([(0,o.MZ)()],s.prototype,"openCypherQuery",void 0),s=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphQuery")],s);let p=class extends s{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,n.Cg)([(0,o.MZ)()],p.prototype,"bindParameters",void 0),(0,n.Cg)([(0,o.MZ)()],p.prototype,"bindGeometryQuantizationParameters",void 0),(0,n.Cg)([(0,o.MZ)()],p.prototype,"outputQuantizationParameters",void 0),(0,n.Cg)([(0,o.MZ)({type:i.A})],p.prototype,"outputSpatialReference",void 0),(0,n.Cg)([(0,o.MZ)()],p.prototype,"provenanceBehavior",void 0),p=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphQueryStreaming")],p)},54238(e,t,r){r.d(t,{A:()=>a});var n=r(5482),o=r(91429),i=r(77901);let a=class extends i.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,n.Cg)([(0,o.$K)("esri.rest.knowledgeGraph.GraphNamedObject")],a)},77901(e,t,r){r.d(t,{A:()=>a});var n=r(5482),o=r(25482),i=r(91429);let a=class extends o.o{constructor(e){super(e),this.properties={}}};(0,n.Cg)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,n.Cg)([(0,i.$K)("esri.rest.knowledgeGraph.GraphObject")],a)},80672(e,t,r){r.d(t,{R:()=>o});var n=r(20655);function o(e,t){return null===e?t:new n.A({url:e.field("url")})}},92288(e,t,r){r.r(t),r.d(t,{registerFunctions:()=>J});var n=r(92602),o=r(47609),i=r(66395),a=r(85935),s=r(78878),p=r(80672),l=r(91075),u=r(91218),c=r(16930),d=r(28735),f=r(20655),h=r(80812),g=r(11254),y=r(56507),m=r(60408),w=r(2272),v=r(92300),A=r(5482),S=r(25482),C=r(91429),R=r(21325);let G=class extends S.o{constructor(e){super(e),this.geometries=[],this.outSpatialReference=null,this.transformation=null,this.transformForward=null}toJSON(){const e=this.geometries.map(e=>e.toJSON()),t=this.geometries[0],r={};return r.outSR=(0,R.YX)(this.outSpatialReference),r.inSR=(0,R.YX)(t.spatialReference),r.geometries=JSON.stringify({geometryType:(0,m.$B)(t),geometries:e}),this.transformation&&(r.transformation=this.transformation.wkid||JSON.stringify(this.transformation)),null!=this.transformForward&&(r.transformForward=this.transformForward),r}};(0,A.Cg)([(0,C.MZ)()],G.prototype,"geometries",void 0),(0,A.Cg)([(0,C.MZ)({type:c.A,json:{read:{source:"outSR"}}})],G.prototype,"outSpatialReference",void 0),(0,A.Cg)([(0,C.MZ)()],G.prototype,"transformation",void 0),(0,A.Cg)([(0,C.MZ)()],G.prototype,"transformForward",void 0),G=(0,A.Cg)([(0,C.$K)("esri.rest.support.ProjectParameters")],G);const x=(0,y.dp)(G);var M=r(25927),$=r(42538),b=r(40662),j=r(42095),P=r(23150),Z=r(54218);let k=null;async function K(e,t){const n=new h.default({portal:e,id:t});return await n.load(),null===k&&(k=await Promise.all([r.e(2869),r.e(3910),r.e(8065),r.e(217),r.e(2555),r.e(490)]).then(r.bind(r,2555))),await k.fetchKnowledgeGraph(n.url)}function N(e,t,r,n,o){if(null===e)return null;if((0,Z.Kg)(e)||(0,Z.Et)(e))return e;if((0,s.e)(e))return e.toJSDate();if((0,s.e)(e))return e.toJSDate();if((0,s.f)(e))return e.toStorageFormat();if((0,s.g)(e))return e.toStorageString();if((0,s.n)(e)){const i={};for(const a of e.keys())i[a]=N(e.field(a),t,r,n,o),i[a]instanceof l.A&&o.push({container:i,indexer:a});return i}if((0,Z.cy)(e)){const i=e.map(e=>N(e,t,r,n,o));for(let e=0;e<i.length;e++)i[e]instanceof l.A&&o.push({container:i,indexer:e});return i}return(0,s.h)(e)?e.spatialReference.isWGS84?e:e.spatialReference.isWebMercator&&t?(0,d.ci)(e):e:void 0}function D(e,t){if(!e)return null;const r={};for(const n in e)r[n]=I(e[n],t);return r}function I(e,t){return null===e?null:(0,Z.cy)(e)?e.map(e=>I(e,t)):e instanceof M.A?{graphTypeName:e.typeName,id:e.id,graphType:"entity",properties:D(e.properties,t)}:e instanceof b.A?{graphType:"object",properties:D(e.properties,t)}:e instanceof P.A?{graphTypeName:e.typeName,id:e.id,graphType:"relationship",originId:e.originId??null,destinationId:e.destinationId??null,properties:D(e.properties,t)}:e instanceof j.A?{graphType:"path",path:e.path?e.path.map(e=>I(e,t)):null}:(0,s.h)(e)?function(e,t){if(!e)return e;if(e.spatialReference.isWGS84&&t.spatialReference.isWebMercator)return(0,d.Gh)(e);if(e.spatialReference.equals(t.spatialReference))return e;throw new a.D$(t,"WrongSpatialReference",null)}(e,t):(0,Z.Kg)(e)||(0,Z.Et)(e)||(0,Z.$P)(e)?e:null}function J(e){"async"===e.mode&&(e.functions.knowledgegraphbyportalitem=function(t,r){return e.standardFunctionAsync(t,r,(e,n,i)=>{if((0,s.B)(i,2,2,t,r),null===i[0])throw new a.D$(t,"PortalRequired",r);if(i[0]instanceof o.A){const e=(0,s.s)(i[1]);let r;return r=t.services?.portal?t.services.portal:f.A.getDefault(),K((0,p.R)(i[0],r),e)}if(!1===(0,Z.Kg)(i[0]))throw new a.D$(t,"InvalidParameter",r);const l=(0,s.s)(i[0]);return K(t.services?.portal??f.A.getDefault(),l)})},e.signatures.push({name:"knowledgegraphbyportalitem",min:2,max:2}),e.functions.querygraph=function(t,o){return e.standardFunctionAsync(t,o,async(e,p,l)=>{(0,s.B)(l,2,4,t,o);const d=l[0];if(!(0,s.o)(d))throw new a.D$(t,"InvalidParameter",o);const f=l[1];if(!(0,Z.Kg)(f))throw new a.D$(t,"InvalidParameter",o);null===k&&(k=await Promise.all([r.e(2869),r.e(3910),r.e(8065),r.e(217),r.e(2555),r.e(490)]).then(r.bind(r,2555)));let h=null;const y=(0,s.J)(l[2],null);if(!(y instanceof i.A||null===y))throw new a.D$(t,"InvalidParameter",o);if(y){let e=[];h=N(y,!0,!1,t,e),e=e.filter(e=>!e.container[e.indexer].spatialReference.isWGS84),e.length>0&&await async function(e){const t=n.A.geometryServiceUrl??"";if(!t){(0,u.isLoaded)()||await(0,u.load)();for(const t of e)t.container[t.indexer]=(0,u.project)(t.container[t.indexer],c.A.WGS84);return}const r=e.map(e=>e.container[e.indexer]),o=new G({geometries:r,outSpatialReference:c.A.WGS84}),i=await async function(e,t){t=x(t);const r=(0,w.Dl)(e),n={...r.query,f:"json",...t.toJSON()},o=t.outSpatialReference,i=(0,m.$B)(t.geometries[0]),a=(0,w.jV)(n,void 0);return(0,g.A)(r.path+"/project",a).then(({data:{geometries:e}})=>(0,v.V)(e,i,o))}(t,o);for(let t=0;t<i.length;t++){const r=e[t];r.container[r.indexer]=i[t]}}(e)}const A=(0,s.J)(l[3],!1),S=new $.A({openCypherQuery:f,bindParameters:h,provenanceBehavior:A?"include":"exclude"});(d?.serviceDefinition?.currentVersion??11.3)>11.2&&(S.outputSpatialReference=t.spatialReference);const C=(await k.executeQueryStreaming(d,S)).resultRowsStream.getReader(),R=[];try{for(;;){const{done:e,value:r}=await C.read();if(e)break;if((0,Z.cy)(r))for(const e of r)R.push(I(e,t));else{const e=[];for(const n of r)e.push(I(r[n],t));R.push(e)}}}catch(e){throw e}return i.A.convertJsonToArcade(R,(0,s.K)(t),!1,!0)})},e.signatures.push({name:"querygraph",min:2,max:4}))}},92300(e,t,r){r.d(t,{V:()=>a,X:()=>i});var n=r(60408),o=r(65864);function i(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function a(e,t,r){const n=(0,o.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=r,t})}}}]);