UNPKG

@arcgis/core

Version:

ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API

1 lines • 12.2 kB
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3642],{50805:(e,t,o)=>{o.d(t,{L0:()=>m,Ot:()=>h,W4:()=>p,uV:()=>y});var i=o(90237),r=o(25482),s=o(10107),n=(o(44208),o(53966),o(87811),o(93223)),a=o(40608);let p=class extends r.A{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};(0,i._)([(0,s.MZ)({type:Number})],p.prototype,"nodesPerPage",void 0),(0,i._)([(0,s.MZ)({type:Number})],p.prototype,"rootIndex",void 0),(0,i._)([(0,s.MZ)({type:String})],p.prototype,"lodSelectionMetricType",void 0),p=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SNodePageDefinition")],p);let l=class extends r.A{constructor(){super(...arguments),this.factor=1}};(0,i._)([(0,s.MZ)({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],l.prototype,"id",void 0),(0,i._)([(0,s.MZ)({type:Number})],l.prototype,"factor",void 0),l=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialTexture")],l);let d=class extends r.A{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};(0,i._)([(0,s.MZ)({type:[Number]})],d.prototype,"baseColorFactor",void 0),(0,i._)([(0,s.MZ)({type:l})],d.prototype,"baseColorTexture",void 0),(0,i._)([(0,s.MZ)({type:l})],d.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,s.MZ)({type:Number})],d.prototype,"metallicFactor",void 0),(0,i._)([(0,s.MZ)({type:Number})],d.prototype,"roughnessFactor",void 0),d=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialPBRMetallicRoughness")],d);let y=class extends r.A{constructor(){super(...arguments),this.alphaMode="opaque",this.alphaCutoff=.25,this.doubleSided=!1,this.cullFace="none",this.normalTexture=null,this.occlusionTexture=null,this.emissiveTexture=null,this.emissiveFactor=null,this.pbrMetallicRoughness=null}};(0,i._)([(0,n.e)({opaque:"opaque",mask:"mask",blend:"blend"})],y.prototype,"alphaMode",void 0),(0,i._)([(0,s.MZ)({type:Number})],y.prototype,"alphaCutoff",void 0),(0,i._)([(0,s.MZ)({type:Boolean})],y.prototype,"doubleSided",void 0),(0,i._)([(0,n.e)({none:"none",back:"back",front:"front"})],y.prototype,"cullFace",void 0),(0,i._)([(0,s.MZ)({type:l})],y.prototype,"normalTexture",void 0),(0,i._)([(0,s.MZ)({type:l})],y.prototype,"occlusionTexture",void 0),(0,i._)([(0,s.MZ)({type:l})],y.prototype,"emissiveTexture",void 0),(0,i._)([(0,s.MZ)({type:[Number]})],y.prototype,"emissiveFactor",void 0),(0,i._)([(0,s.MZ)({type:d})],y.prototype,"pbrMetallicRoughness",void 0),y=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SMaterialDefinition")],y);let u=class extends r.A{};(0,i._)([(0,s.MZ)({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:`${t.index}`}}})],u.prototype,"name",void 0),(0,i._)([(0,n.e)({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],u.prototype,"format",void 0),u=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureFormat")],u);let h=class extends r.A{constructor(){super(...arguments),this.atlas=!1}};(0,i._)([(0,s.MZ)({type:[u]})],h.prototype,"formats",void 0),(0,i._)([(0,s.MZ)({type:Boolean})],h.prototype,"atlas",void 0),h=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3STextureSetDefinition")],h);let c=class extends r.A{};(0,i._)([(0,n.e)({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],c.prototype,"type",void 0),(0,i._)([(0,s.MZ)({type:Number})],c.prototype,"component",void 0),c=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryAttribute")],c);let g=class extends r.A{};(0,i._)([(0,n.e)({draco:"draco"})],g.prototype,"encoding",void 0),(0,i._)([(0,s.MZ)({type:[String]})],g.prototype,"attributes",void 0),g=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryCompressedAttributes")],g);let v=class extends r.A{constructor(){super(...arguments),this.offset=0}};(0,i._)([(0,s.MZ)({type:Number})],v.prototype,"offset",void 0),(0,i._)([(0,s.MZ)({type:c})],v.prototype,"position",void 0),(0,i._)([(0,s.MZ)({type:c})],v.prototype,"normal",void 0),(0,i._)([(0,s.MZ)({type:c})],v.prototype,"uv0",void 0),(0,i._)([(0,s.MZ)({type:c})],v.prototype,"color",void 0),(0,i._)([(0,s.MZ)({type:c})],v.prototype,"uvRegion",void 0),(0,i._)([(0,s.MZ)({type:c})],v.prototype,"featureId",void 0),(0,i._)([(0,s.MZ)({type:c})],v.prototype,"faceRange",void 0),(0,i._)([(0,s.MZ)({type:g})],v.prototype,"compressedAttributes",void 0),v=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryBuffer")],v);let m=class extends r.A{};(0,i._)([(0,n.e)({triangle:"triangle"})],m.prototype,"topology",void 0),(0,i._)([(0,s.MZ)()],m.prototype,"geometryBuffers",void 0),m=(0,i._)([(0,a.$)("esri.layers.support.I3SLayerDefinitions.I3SGeometryDefinition")],m)},54239:(e,t,o)=>{o.d(t,{A:()=>m});var i,r=o(90237),s=o(4576),n=o(66552),a=o(25482),p=o(83047),l=o(67076),d=o(10107),y=(o(44208),o(53966),o(36005)),u=o(40608),h=o(43937);const c=(0,n.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=c.jsonValues.slice();(0,s.Xy)(g,"orthometric");const v=(0,n.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let m=i=class extends a.A{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,o){return c.write(e,t,o)}readHeightModel(e,t,o){return c.read(e)||(o?.messages&&o.messages.push(function(e,t){return new l.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:o})),null)}readHeightUnit(e,t,o){return v.read(e)||(o?.messages&&o.messages.push(f(e,{context:o})),null)}readHeightUnitService(e,t,o){return(0,p.LA)(e)||v.read(e)||(o?.messages&&o.messages.push(f(e,{context:o})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const o=(0,p.k1)(t);return new i({heightModel:e.heightModel,heightUnit:o??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function f(e,t){return new l.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r._)([(0,d.MZ)({type:c.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],m.prototype,"heightModel",void 0),(0,r._)([(0,h.K)("web-scene","heightModel")],m.prototype,"writeHeightModel",null),(0,r._)([(0,y.w)(["web-scene","service"],"heightModel")],m.prototype,"readHeightModel",null),(0,r._)([(0,d.MZ)({type:v.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:v.jsonValues,write:{writer:v.write,isRequired:!0}}}}})],m.prototype,"heightUnit",void 0),(0,r._)([(0,y.w)("web-scene","heightUnit")],m.prototype,"readHeightUnit",null),(0,r._)([(0,y.w)("service","heightUnit")],m.prototype,"readHeightUnitService",null),(0,r._)([(0,d.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],m.prototype,"vertCRS",void 0),(0,r._)([(0,y.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],m.prototype,"readVertCRS",null),m=i=(0,r._)([(0,u.$)("esri.geometry.HeightModelInfo")],m)},74660:(e,t,o)=>{o.r(t),o.d(t,{default:()=>A});var i=o(90237),r=o(49186),s=o(53966),n=o(92071),a=o(74887),p=o(36708),l=o(10107),d=(o(44208),o(87811),o(36005)),y=o(40608),u=o(87024),h=o(4146),c=o(52136),g=o(18768),v=o(69208),m=o(16131),f=o(8303),_=o(25036),M=o(58947),S=o(10873),w=o(50805),b=o(58325),I=o(24212),x=o(97159);let Z=class extends((0,M.w6)((0,g.b)((0,m.q)((0,f.A)((0,_.j)((0,n.P)((0,v.d)((0,c.p)(h.A))))))))){constructor(...e){super(...e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this.path=null,this.definitionExpression=null}initialize(){this.addHandles((0,p.on)((()=>this.modifications),"after-changes",(()=>this.modifications=this.modifications),p.OH))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}readModifications(e,t,o){this._modificationsSource={url:(0,x.f)(e,o),context:o}}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}async _doLoad(e){const t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,a.QP)(e)}if(await this._fetchService(t),null!=this._modificationsSource){const t=await b.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then((()=>{}),(()=>{}))}async saveAs(e,t){return this._debouncedSaveOperations(M.Xh.SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"};return this._debouncedSaveOperations(M.Xh.SAVE,e)}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new r.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new r.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new r.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}_validateElevationInfo(e){const t="Integrated mesh layers";(0,I.XF)(s.A.getLogger(this),(0,I.B)(t,"absolute-height",e)),(0,I.XF)(s.A.getLogger(this),(0,I.tW)(t,e))}};(0,i._)([(0,l.MZ)({type:String,readOnly:!0})],Z.prototype,"geometryType",void 0),(0,i._)([(0,l.MZ)({type:["show","hide"]})],Z.prototype,"listMode",void 0),(0,i._)([(0,l.MZ)({type:["IntegratedMeshLayer"]})],Z.prototype,"operationalLayerType",void 0),(0,i._)([(0,l.MZ)({json:{read:!1},readOnly:!0})],Z.prototype,"type",void 0),(0,i._)([(0,l.MZ)({type:w.W4,readOnly:!0})],Z.prototype,"nodePages",void 0),(0,i._)([(0,l.MZ)({type:[w.uV],readOnly:!0})],Z.prototype,"materialDefinitions",void 0),(0,i._)([(0,l.MZ)({type:[w.Ot],readOnly:!0})],Z.prototype,"textureSetDefinitions",void 0),(0,i._)([(0,l.MZ)({type:[w.L0],readOnly:!0})],Z.prototype,"geometryDefinitions",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],Z.prototype,"serviceUpdateTimeStamp",void 0),(0,i._)([(0,l.MZ)({type:b.A,clonable:e=>e.clone()}),(0,u.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],Z.prototype,"modifications",void 0),(0,i._)([(0,d.w)(["web-scene","portal-item"],"modifications")],Z.prototype,"readModifications",null),(0,i._)([(0,l.MZ)(S.Yj)],Z.prototype,"elevationInfo",null),(0,i._)([(0,l.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],Z.prototype,"path",void 0),Z=(0,i._)([(0,y.$)("esri.layers.IntegratedMeshLayer")],Z);const A=Z}}]);