(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-7ab3ef05","chunk-2d22611c"],{2698:function(e,t,r){"use strict";function a(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,"a",(function(){return a}))},"2e4d":function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var a=r("a4ee"),s=r("a5d8"),o=r("e694"),i=r("59b2"),n=(r("b50f"),r("c120"),r("cea0")),l=r("afcf"),c=r("d386"),p=r("22f4");let u=class extends(Object(s["b"])(o["b"])){constructor(e){super(e),this.title="",this.id=-1,this.modelName=null,this.isEmpty=null,this.visible=!0,this.opacity=1}readTitle(e,t){return"string"==typeof t.alias?t.alias:"string"==typeof t.name?t.name:""}readIdOnlyOnce(e){return-1!==this.id?this.id:"number"==typeof e?e:void 0}};Object(a["a"])([Object(i["b"])({type:String,json:{origins:{"web-scene":{write:!0},"portal-item":{write:!0}}}})],u.prototype,"title",void 0),Object(a["a"])([Object(l["a"])("service","title",["alias","name"])],u.prototype,"readTitle",null),Object(a["a"])([Object(i["b"])()],u.prototype,"layer",void 0),Object(a["a"])([Object(i["b"])({type:n["a"],readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0}}})],u.prototype,"id",void 0),Object(a["a"])([Object(l["a"])("service","id")],u.prototype,"readIdOnlyOnce",null),Object(a["a"])([Object(i["b"])(Object(p["k"])(String))],u.prototype,"modelName",void 0),Object(a["a"])([Object(i["b"])(Object(p["k"])(Boolean))],u.prototype,"isEmpty",void 0),Object(a["a"])([Object(i["b"])({type:Boolean,json:{name:"visibility",write:!0}})],u.prototype,"visible",void 0),Object(a["a"])([Object(i["b"])({type:Number,json:{write:!0}})],u.prototype,"opacity",void 0),u=Object(a["a"])([Object(c["a"])("esri.layers.buildingSublayers.BuildingSublayer")],u);const d=u},"433f":function(e,t,r){"use strict";r.d(t,"a",(function(){return O}));var a,s=r("a4ee"),o=r("2c4f"),i=r("1853"),n=r("0028"),l=r("59b2"),c=(r("b50f"),r("c120"),r("cea0"),r("d386")),p=r("e814"),u=r("2e4d");const d={type:o["a"],readOnly:!0,json:{origins:{service:{read:{source:"sublayers",reader:b}}},read:!1}};function b(e,t,r){if(e&&Array.isArray(e))return new o["a"](e.map(e=>{const t=h(e);if(t){const a=new t;return a.read(e,r),a}r&&r.messages&&e&&r.messages.push(new n["a"]("building-scene-layer:unsupported-sublayer-type","Building scene sublayer of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:r}))}))}let y=a=class extends u["a"]{constructor(e){super(e),this.type="building-group",this.listMode="show",this.sublayers=null}loadAll(){return Object(i["b"])(this,e=>a.forEachSublayer(this.sublayers,t=>{"building-group"!==t.type&&e(t)}))}};function h(e){return"group"===e.layerType?y:p["a"]}Object(s["a"])([Object(l["b"])({type:["hide","show","hide-children"],json:{write:!0}})],y.prototype,"listMode",void 0),Object(s["a"])([Object(l["b"])(d)],y.prototype,"sublayers",void 0),y=a=Object(s["a"])([Object(c["a"])("esri.layers.buildingSublayers.BuildingGroupSublayer")],y),function(e){function t(e,r){e.forEach(e=>{r(e),"building-group"===e.type&&t(e.sublayers,r)})}e.sublayersProperty=d,e.readSublayers=b,e.forEachSublayer=t}(y||(y={}));const O=y},"4d64e":function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return Se}));var a=r("a4ee"),s=r("2c4f"),o=r("4d10"),i=r("ce50"),n=r("7ffa"),l=r("1853"),c=r("e92d"),p=r("b2b2"),u=r("e694"),d=r("f4cc"),b=r("e041"),y=r("59b2"),h=(r("cea0"),r("afcf")),O=r("d386"),j=r("5996"),f=r("a6a3"),m=r("e814"),g=r("433f"),v=r("f46e"),S=r("3d59"),w=r("b911"),I=r("0db5"),x=r("5a62"),F=r("96ae"),T=r("6a0ed"),R=r("8eed");r("b50f"),r("c120");let A=class extends T["a"]{constructor(){super(...arguments),this.type=null}};Object(a["a"])([Object(y["b"])({type:String,readOnly:!0,json:{write:!0}})],A.prototype,"type",void 0),A=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterAuthoringInfo")],A);const _=A;var P;let L=P=class extends T["a"]{constructor(){super(...arguments),this.filterType=null,this.filterValues=null}clone(){return new P({filterType:this.filterType,filterValues:Object(n["a"])(this.filterValues)})}};Object(a["a"])([Object(y["b"])({type:String,json:{write:!0}})],L.prototype,"filterType",void 0),Object(a["a"])([Object(y["b"])({type:[String],json:{write:!0}})],L.prototype,"filterValues",void 0),L=P=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterAuthoringInfoType")],L);const E=L;var k;const N=s["a"].ofType(E);let U=k=class extends T["a"]{clone(){return new k({filterTypes:Object(n["a"])(this.filterTypes)})}};Object(a["a"])([Object(y["b"])({type:N,json:{write:!0}})],U.prototype,"filterTypes",void 0),U=k=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterAuthoringInfoBlock")],U);const B=U;var M;const q=s["a"].ofType(B);let D=M=class extends _{constructor(){super(...arguments),this.type="checkbox"}clone(){return new M({filterBlocks:Object(n["a"])(this.filterBlocks)})}};Object(a["a"])([Object(y["b"])({type:["checkbox"]})],D.prototype,"type",void 0),Object(a["a"])([Object(y["b"])({type:q,json:{write:!0}})],D.prototype,"filterBlocks",void 0),D=M=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterAuthoringInfoCheckbox")],D);const K=D;let C=class extends T["a"]{};Object(a["a"])([Object(y["b"])({readOnly:!0,json:{read:!1}})],C.prototype,"type",void 0),C=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterMode")],C);const V=C;var Q;let z=Q=class extends V{constructor(){super(...arguments),this.type="solid"}clone(){return new Q}};Object(a["a"])([Object(y["b"])({type:["solid"],readOnly:!0,json:{write:!0}})],z.prototype,"type",void 0),z=Q=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterModeSolid")],z);const $=z;var G,J=r("448d"),H=r("f6ab");let Z=G=class extends V{constructor(){super(...arguments),this.type="wire-frame",this.edges=null}clone(){return new G({edges:Object(n["a"])(this.edges)})}};Object(a["a"])([Object(J["a"])({wireFrame:"wire-frame"})],Z.prototype,"type",void 0),Object(a["a"])([Object(y["b"])(H["a"])],Z.prototype,"edges",void 0),Z=G=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterModeWireFrame")],Z);const W=Z;var X;let Y=X=class extends V{constructor(){super(...arguments),this.type="x-ray"}clone(){return new X}};Object(a["a"])([Object(y["b"])({type:["x-ray"],readOnly:!0,json:{write:!0}})],Y.prototype,"type",void 0),Y=X=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterModeXRay")],Y);const ee=Y;var te;const re={nonNullable:!0,types:{key:"type",base:V,typeMap:{solid:$,"wire-frame":W,"x-ray":ee}},json:{read:e=>{switch(e&&e.type){case"solid":return $.fromJSON(e);case"wireFrame":return W.fromJSON(e);case"x-ray":return ee.fromJSON(e);default:return}},write:{enabled:!0,isRequired:!0}}};let ae=te=class extends T["a"]{constructor(){super(...arguments),this.filterExpression=null,this.filterMode=new $,this.title=""}clone(){return new te({filterExpression:this.filterExpression,filterMode:Object(n["a"])(this.filterMode),title:this.title})}};Object(a["a"])([Object(y["b"])({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"filterExpression",void 0),Object(a["a"])([Object(y["b"])(re)],ae.prototype,"filterMode",void 0),Object(a["a"])([Object(y["b"])({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ae.prototype,"title",void 0),ae=te=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilterBlock")],ae);const se=ae;var oe;const ie=s["a"].ofType(se);let ne=oe=class extends T["a"]{constructor(){super(...arguments),this.description=null,this.filterBlocks=null,this.id=Object(R["a"])(),this.name=null}clone(){return new oe({description:this.description,filterBlocks:Object(n["a"])(this.filterBlocks),id:this.id,name:this.name,filterAuthoringInfo:Object(n["a"])(this.filterAuthoringInfo)})}};Object(a["a"])([Object(y["b"])({type:String,json:{write:!0}})],ne.prototype,"description",void 0),Object(a["a"])([Object(y["b"])({type:ie,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"filterBlocks",void 0),Object(a["a"])([Object(y["b"])({types:{key:"type",base:_,typeMap:{checkbox:K}},json:{read:e=>"checkbox"===(e&&e.type)?K.fromJSON(e):null,write:!0}})],ne.prototype,"filterAuthoringInfo",void 0),Object(a["a"])([Object(y["b"])({type:String,constructOnly:!0,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"id",void 0),Object(a["a"])([Object(y["b"])({type:String,json:{write:{enabled:!0,isRequired:!0}}})],ne.prototype,"name",void 0),ne=oe=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFilter")],ne);const le=ne;var ce=r("2eab"),pe=r("6d5f"),ue=r("fab3");const de=c["a"].getLogger("esri.layers.support.BuildingSummaryStatistics");let be=class extends T["a"]{constructor(){super(...arguments),this.fieldName=null,this.modelName=null,this.label=null,this.min=null,this.max=null,this.mostFrequentValues=null,this.subLayerIds=null}};Object(a["a"])([Object(y["b"])({type:String})],be.prototype,"fieldName",void 0),Object(a["a"])([Object(y["b"])({type:String})],be.prototype,"modelName",void 0),Object(a["a"])([Object(y["b"])({type:String})],be.prototype,"label",void 0),Object(a["a"])([Object(y["b"])({type:Number})],be.prototype,"min",void 0),Object(a["a"])([Object(y["b"])({type:Number})],be.prototype,"max",void 0),Object(a["a"])([Object(y["b"])({json:{read:e=>Array.isArray(e)&&(e.every(e=>"string"==typeof e)||e.every(e=>"number"==typeof e))?e.slice():null}})],be.prototype,"mostFrequentValues",void 0),Object(a["a"])([Object(y["b"])({type:[Number]})],be.prototype,"subLayerIds",void 0),be=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingFieldStatistics")],be);let ye=class extends(pe["a"].LoadableMixin(Object(ue["b"])(T["a"]))){constructor(){super(...arguments),this.url=null}get fields(){return this.loaded||"loading"===this.loadStatus?this._get("fields"):(de.error("building summary statistics are not loaded"),null)}load(e){const t=Object(p["k"])(e)?e.signal:null;return this.addResolvingPromise(this._fetchService(t)),Promise.resolve(this)}async _fetchService(e){const t=(await Object(ce["default"])(this.url,{query:{f:"json"},responseType:"json",signal:e})).data;this.read(t,{origin:"service"})}};Object(a["a"])([Object(y["b"])({constructOnly:!0,type:String})],ye.prototype,"url",void 0),Object(a["a"])([Object(y["b"])({readOnly:!0,type:[be],json:{read:{source:"summary"}}})],ye.prototype,"fields",null),ye=Object(a["a"])([Object(O["a"])("esri.layers.support.BuildingSummaryStatistics")],ye);const he=ye;var Oe=r("22f4"),je=r("9980");const fe=c["a"].getLogger("esri.layers.BuildingSceneLayer"),me=s["a"].ofType(le),ge=Object(n["a"])(g["a"].sublayersProperty);ge.json.origins["web-scene"]={type:[m["a"]],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}},ge.json.origins["portal-item"]={type:[m["a"]],write:{enabled:!0,overridePolicy:()=>({enabled:!1})}};let ve=class extends(Object(F["b"])(Object(S["a"])(Object(w["a"])(Object(I["a"])(Object(x["a"])(Object(u["a"])(Object(v["a"])(f["a"])))))))){constructor(e){super(e),this.operationalLayerType="BuildingSceneLayer",this.allSublayers=new o["a"]({getCollections:()=>[this.sublayers],getChildrenFunction:e=>"building-group"===e.type?e.sublayers:null}),this.sublayers=null,this.sublayerOverrides=null,this.filters=new me,this.activeFilterId=null,this.summaryStatistics=null,this.outFields=null,this.type="building-scene"}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){this.allSublayers.destroy()}readSublayers(e,t,r){const a=g["a"].readSublayers(e,t,r);return g["a"].forEachSublayer(a,e=>e.layer=this),this.sublayerOverrides&&(this.applySublayerOverrides(a,this.sublayerOverrides),this.sublayerOverrides=null),a}applySublayerOverrides(e,{overrides:t,context:r}){g["a"].forEachSublayer(e,e=>e.read(t.get(e.id),r))}readSublayerOverrides(e,t){const r=new Map;for(const a of e)null!=a&&"object"==typeof a&&"number"==typeof a.id?r.set(a.id,a):t.messages.push(new i["a"]("building-scene-layer:invalid-sublayer-override","Invalid value for sublayer override. Not an object or no id specified.",{value:a}));return{overrides:r,context:t}}writeSublayerOverrides(e,t,r){const a=[];g["a"].forEachSublayer(this.sublayers,e=>{const t=e.write({},r);Object.keys(t).length>1&&a.push(t)}),a.length>0&&(t.sublayers=a)}writeUnappliedOverrides(e,t){t.sublayers=[],e.overrides.forEach(e=>{t.sublayers.push(Object(n["a"])(e))})}write(e,t){return e=super.write(e,t),!t||"web-scene"!==t.origin&&"portal-item"!==t.origin||(this.sublayers?this.writeSublayerOverrides(this.sublayers,e,t):this.sublayerOverrides&&this.writeUnappliedOverrides(this.sublayerOverrides,e)),e}read(e,t){if(super.read(e,t),t&&("web-scene"===t.origin||"portal-item"===t.origin)&&null!=e&&Array.isArray(e.sublayers)){const r=this.readSublayerOverrides(e.sublayers,t);this.sublayers?this.applySublayerOverrides(this.sublayers,r):this.sublayerOverrides=r}}readSummaryStatistics(e,t){if("string"==typeof t.statisticsHRef){const e=Object(b["B"])(this.parsedUrl.path,t.statisticsHRef);return new he({url:e})}return null}set elevationInfo(e){this._set("elevationInfo",e),this._validateElevationInfo()}load(e){const t=Object(p["k"])(e)?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(d["u"]).then(()=>this._fetchService(t)).then(()=>this._fetchAssociatedFeatureService(t));return this.addResolvingPromise(r),Promise.resolve(this)}loadAll(){return Object(l["a"])(this,e=>{g["a"].forEachSublayer(this.sublayers,t=>{"building-group"!==t.type&&e(t)}),this.summaryStatistics&&e(this.summaryStatistics)})}async saveAs(e,t){return this._debouncedSaveOperations(F["a"].SAVE_AS,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"},e)}async save(){const e={getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"building-scene"};return this._debouncedSaveOperations(F["a"].SAVE,e)}validateLayer(e){if(!e.layerType||"Building"!==e.layerType)throw new i["a"]("buildingscenelayer:layer-type-not-supported","BuildingSceneLayer does not support this layer type",{layerType:e.layerType})}_getTypeKeywords(){return["Building"]}_validateElevationInfo(){const e=this.elevationInfo;e&&("absolute-height"!==e.mode&&fe.warn(".elevationInfo=","Building scene layers only support absolute-height elevation mode"),e.featureExpressionInfo&&"0"!==e.featureExpressionInfo.expression&&fe.warn(".elevationInfo=","Building scene layers do not support featureExpressionInfo"))}async _fetchAssociatedFeatureService(e){const t=new je["a"](this.parsedUrl,this.portalItem,this.apiKey,e);try{this.associatedFeatureServiceItem=await t.fetchPortalItem()}catch(r){fe.warn("Associated feature service item could not be loaded",r)}}};Object(a["a"])([Object(y["b"])({type:["BuildingSceneLayer"]})],ve.prototype,"operationalLayerType",void 0),Object(a["a"])([Object(y["b"])({readOnly:!0})],ve.prototype,"allSublayers",void 0),Object(a["a"])([Object(y["b"])(ge)],ve.prototype,"sublayers",void 0),Object(a["a"])([Object(h["a"])("service","sublayers")],ve.prototype,"readSublayers",null),Object(a["a"])([Object(y["b"])({type:me,nonNullable:!0,json:{write:!0}})],ve.prototype,"filters",void 0),Object(a["a"])([Object(y["b"])({type:String,json:{write:!0}})],ve.prototype,"activeFilterId",void 0),Object(a["a"])([Object(y["b"])({readOnly:!0,type:he})],ve.prototype,"summaryStatistics",void 0),Object(a["a"])([Object(h["a"])("summaryStatistics",["statisticsHRef"])],ve.prototype,"readSummaryStatistics",null),Object(a["a"])([Object(y["b"])({type:[String],json:{read:!1}})],ve.prototype,"outFields",void 0),Object(a["a"])([Object(y["b"])(Oe["l"])],ve.prototype,"fullExtent",void 0),Object(a["a"])([Object(y["b"])({type:["show","hide","hide-children"]})],ve.prototype,"listMode",void 0),Object(a["a"])([Object(y["b"])(Object(Oe["k"])(j["a"]))],ve.prototype,"spatialReference",void 0),Object(a["a"])([Object(y["b"])(Oe["b"])],ve.prototype,"elevationInfo",null),Object(a["a"])([Object(y["b"])({json:{read:!1},readOnly:!0})],ve.prototype,"type",void 0),Object(a["a"])([Object(y["b"])()],ve.prototype,"associatedFeatureServiceItem",void 0),ve=Object(a["a"])([Object(O["a"])("esri.layers.BuildingSceneLayer")],ve);const Se=ve},"5d34":function(e,t,r){"use strict";r.d(t,"a",(function(){return j})),r.d(t,"b",(function(){return u})),r.d(t,"c",(function(){return l})),r.d(t,"d",(function(){return b}));var a=r("a4ee"),s=r("6a0ed"),o=r("59b2"),i=(r("b50f"),r("c120"),r("cea0"),r("448d")),n=r("d386");let l=class extends s["a"]{constructor(){super(...arguments),this.nodesPerPage=null,this.rootIndex=0,this.lodSelectionMetricType=null}};Object(a["a"])([Object(o["b"])({type:Number})],l.prototype,"nodesPerPage",void 0),Object(a["a"])([Object(o["b"])({type:Number})],l.prototype,"rootIndex",void 0),Object(a["a"])([Object(o["b"])({type:String})],l.prototype,"lodSelectionMetricType",void 0),l=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SNodePageDefinition")],l);let c=class extends s["a"]{constructor(){super(...arguments),this.factor=1}};Object(a["a"])([Object(o["b"])({type:Number,json:{read:{source:"textureSetDefinitionId"}}})],c.prototype,"id",void 0),Object(a["a"])([Object(o["b"])({type:Number})],c.prototype,"factor",void 0),c=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SMaterialTexture")],c);let p=class extends s["a"]{constructor(){super(...arguments),this.baseColorFactor=[1,1,1,1],this.baseColorTexture=null,this.metallicRoughnessTexture=null,this.metallicFactor=1,this.roughnessFactor=1}};Object(a["a"])([Object(o["b"])({type:[Number]})],p.prototype,"baseColorFactor",void 0),Object(a["a"])([Object(o["b"])({type:c})],p.prototype,"baseColorTexture",void 0),Object(a["a"])([Object(o["b"])({type:c})],p.prototype,"metallicRoughnessTexture",void 0),Object(a["a"])([Object(o["b"])({type:Number})],p.prototype,"metallicFactor",void 0),Object(a["a"])([Object(o["b"])({type:Number})],p.prototype,"roughnessFactor",void 0),p=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SMaterialPBRMetallicRoughness")],p);let u=class extends s["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}};Object(a["a"])([Object(i["a"])({opaque:"opaque",mask:"mask",blend:"blend"})],u.prototype,"alphaMode",void 0),Object(a["a"])([Object(o["b"])({type:Number})],u.prototype,"alphaCutoff",void 0),Object(a["a"])([Object(o["b"])({type:Boolean})],u.prototype,"doubleSided",void 0),Object(a["a"])([Object(i["a"])({none:"none",back:"back",front:"front"})],u.prototype,"cullFace",void 0),Object(a["a"])([Object(o["b"])({type:c})],u.prototype,"normalTexture",void 0),Object(a["a"])([Object(o["b"])({type:c})],u.prototype,"occlusionTexture",void 0),Object(a["a"])([Object(o["b"])({type:c})],u.prototype,"emissiveTexture",void 0),Object(a["a"])([Object(o["b"])({type:[Number]})],u.prototype,"emissiveFactor",void 0),Object(a["a"])([Object(o["b"])({type:p})],u.prototype,"pbrMetallicRoughness",void 0),u=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SMaterialDefinition")],u);let d=class extends s["a"]{};Object(a["a"])([Object(o["b"])({type:String,json:{read:{source:["name","index"],reader:(e,t)=>null!=e?e:""+t.index}}})],d.prototype,"name",void 0),Object(a["a"])([Object(i["a"])({jpg:"jpg",png:"png",dds:"dds","ktx-etc2":"ktx-etc2",ktx2:"ktx2",basis:"basis"})],d.prototype,"format",void 0),d=Object(a["a"])([Object(n["a"])("esri.layer.support.I3STextureFormat")],d);let b=class extends s["a"]{constructor(){super(...arguments),this.atlas=!1}};Object(a["a"])([Object(o["b"])({type:[d]})],b.prototype,"formats",void 0),Object(a["a"])([Object(o["b"])({type:Boolean})],b.prototype,"atlas",void 0),b=Object(a["a"])([Object(n["a"])("esri.layer.support.I3STextureSetDefinition")],b);let y=class extends s["a"]{};Object(a["a"])([Object(i["a"])({Float32:"Float32",UInt64:"UInt64",UInt32:"UInt32",UInt16:"UInt16",UInt8:"UInt8"})],y.prototype,"type",void 0),Object(a["a"])([Object(o["b"])({type:Number})],y.prototype,"component",void 0),y=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SGeometryAttribute")],y);let h=class extends s["a"]{};Object(a["a"])([Object(i["a"])({draco:"draco"})],h.prototype,"encoding",void 0),Object(a["a"])([Object(o["b"])({type:[String]})],h.prototype,"attributes",void 0),h=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SGeometryCompressedAttributes")],h);let O=class extends s["a"]{constructor(){super(...arguments),this.offset=0}};Object(a["a"])([Object(o["b"])({type:Number})],O.prototype,"offset",void 0),Object(a["a"])([Object(o["b"])({type:y})],O.prototype,"position",void 0),Object(a["a"])([Object(o["b"])({type:y})],O.prototype,"normal",void 0),Object(a["a"])([Object(o["b"])({type:y})],O.prototype,"uv0",void 0),Object(a["a"])([Object(o["b"])({type:y})],O.prototype,"color",void 0),Object(a["a"])([Object(o["b"])({type:y})],O.prototype,"uvRegion",void 0),Object(a["a"])([Object(o["b"])({type:y})],O.prototype,"featureId",void 0),Object(a["a"])([Object(o["b"])({type:y})],O.prototype,"faceRange",void 0),Object(a["a"])([Object(o["b"])({type:h})],O.prototype,"compressedAttributes",void 0),O=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SGeometryBuffer")],O);let j=class extends s["a"]{};Object(a["a"])([Object(i["a"])({triangle:"triangle"})],j.prototype,"topology",void 0),Object(a["a"])([Object(o["b"])()],j.prototype,"geometryBuffers",void 0),j=Object(a["a"])([Object(n["a"])("esri.layer.support.I3SGeometryDefinition")],j)},"6e36":function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var a=r("2eab"),s=r("ce50"),o=r("b2b2");async function i(e,t,r,i,n,l){let c=null;if(Object(o["k"])(r)){const t=e+"/nodepages/",s=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await Object(a["default"])(s,{query:{f:"json",token:i},responseType:"json",signal:l})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(d){Object(o["k"])(n)&&n.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",s,d),c=d}}if(!t)return null;const p=e+"/nodes/",u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await Object(a["default"])(u,{query:{f:"json",token:i},responseType:"json",signal:l})).data,urlPrefix:p}}catch(d){throw new s["a"]("sceneservice:root-node-missing","Root node missing.",{pageError:c,nodeError:d,url:u})}}},"7eab":function(e,t,r){"use strict";r.d(t,"a",(function(){return a}));const a={attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1},query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},"96ae":function(e,t,r){"use strict";r.d(t,"a",(function(){return U})),r.d(t,"b",(function(){return _}));var a=r("a4ee"),s=r("2eab"),o=r("ce50"),i=(r("c120"),r("e92d")),n=r("b2b2"),l=r("f4cc"),c=r("e041"),p=r("59b2"),u=(r("b50f"),r("cea0"),r("afcf")),d=r("d386"),b=r("09db"),y=r("ca81"),h=r("3af1"),O=r("e64d"),j=r("5996"),f=r("54b4"),m=r("22f4"),g=r("6e36"),v=r("0224"),S=r("a7e1"),w=r("792b"),I=r("8eed"),x=r("e6a6");async function F(e,t,r){if(!t||!t.resources)return;const a=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const s=new Set(t.resources.toKeep.map(e=>e.resource.path)),i=new Set,n=[];s.forEach(t=>{a.delete(t),e.paths.push(t)});for(const o of t.resources.toUpdate)if(a.delete(o.resource.path),s.has(o.resource.path)||i.has(o.resource.path)){const{resource:t,content:a,finish:s,error:i}=o,l=Object(x["getSiblingOfSameTypeI"])(t,Object(I["a"])());e.paths.push(l.path),n.push(T({resource:l,content:a,finish:s,error:i},r))}else e.paths.push(o.resource.path),n.push(R(o,r)),i.add(o.resource.path);for(const o of t.resources.toAdd)n.push(T(o,r)),e.paths.push(o.resource.path);if(a.forEach(e=>{const r=t.portalItem.resourceFromPath(e);n.push(r.portalItem.removeResource(r).catch(()=>{}))}),0===n.length)return;const c=await Object(l["j"])(n);Object(l["v"])(r);const p=c.filter(e=>"error"in e).map(e=>e.error);if(p.length>0)throw new o["a"]("save:resources","Failed to save one or more resources",{errors:p})}async function T(e,t){const r=await Object(w["d"])(e.resource.portalItem.addResource(e.resource,e.content,t));if(!0!==r.ok)throw e.error&&e.error(r.error),r.error;e.finish&&e.finish(e.resource)}async function R(e,t){const r=await Object(w["d"])(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error(r.error),r.error;e.finish(e.resource)}const A=i["a"].getLogger("esri.layers.mixins.SceneService"),_=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=Object(l["i"])(async(e,t,r)=>{switch(e){case U.SAVE:return this._save(t);case U.SAVE_AS:return this._saveAs(r,t)}})}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return j["a"].fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,a=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=a?new j["a"](a):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const a=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return h["a"].fromJSON(a,r)}const a=t.store,s=this._readSpatialReference(t);return null==s||null==a||null==a.extent||!Array.isArray(a.extent)||a.extent.some(e=>e
=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,a=null!=r.version?r.version.toString():"";return this.parseVersionString(a)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return Object(f["i"])(this.url,t.name);let a=t.name;if(!a&&this.url){const e=Object(f["e"])(this.url);Object(n["k"])(e)&&(a=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(a=r+" - "+a),Object(f["a"])(a)}set url(e){const t=Object(f["h"])({layer:this,url:e,nonStandardUrlAllowed:!1,logger:A});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,a){Object(f["j"])(this,e,"layers",t,a)}get parsedUrl(){const e=this._get("url");if(!e)return null;const t=Object(c["M"])(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=Object(g["a"])(this.parsedUrl.path,this.rootNode,e,this.apiKey,A,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===(null==e?void 0:e.type)){var t,r;const a=e.rootIndex%e.pageSize,s=null==(t=e.rootPage)||null==(r=t.nodes)?void 0:r[a];if(null==s||null==s.obb||null==s.obb.center||null==s.obb.halfSize)throw new o["a"]("sceneservice:invalid-node-page","Invalid node page.");if(s.obb.center[0]
0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await Object(s["default"])(this.parsedUrl.path,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const a=t.data;this.read(a,{origin:"service",url:this.parsedUrl}),this.validateLayer(a)}async _fetchVoxelServiceLayer(e){const t=(await Object(s["default"])(this.parsedUrl.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,{origin:"service",url:this.parsedUrl}),this.validateLayer(t)}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const a=t.getTypeKeywords();for(const s of a)e.typeKeywords.push(s);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter((e,t,r)=>r.indexOf(e)===t),r===E.newItem&&(e.typeKeywords=e.typeKeywords.filter(e=>"Hosted Service"!==e)))}async _saveAs(e,t){const r={...N,...t};let a=S["default"].from(e);a||(A.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new o["a"]("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),a.id&&(a=a.clone(),a.id=null);const s=a.portal||v["a"].getDefault();await this._ensureLoadBeforeSave(),a.type=k,a.portal=s;const i={origin:"portal-item",url:null,messages:[],portal:s,portalItem:a,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},n={layers:[this.write({},i)]};return await Promise.all(i.resources.pendingOperations),await this._validateAgainstJSONSchema(n,i,r),a.url=this.url,a.title||(a.title=this.title),this._updateTypeKeywords(a,r,E.newItem),await s._signIn(),await s.user.addItem({item:a,folder:r&&r.folder,data:n}),await F(this.resourceReferences,i,null),this.portalItem=a,Object(y["a"])(i),i.portalItem=a,a}async _save(e){const t={...N,...e};this.portalItem||(A.error("_save(): requires the .portalItem property to be set"),await Promise.reject(new o["a"]("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService"))),this.portalItem.type!==k&&(A.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+k),await Promise.reject(new o["a"]("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${k}"`))),await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&Object(c["M"])(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||v["a"].getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations),await this._validateAgainstJSONSchema(a,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,E.existingItem),await this.portalItem.update({data:a}),await F(this.resourceReferences,r,null),Object(y["a"])(r),this.portalItem}async _validateAgainstJSONSchema(e,t,a){let s=t.messages.filter(e=>"error"===e.type).map(e=>new o["a"](e.name,e.message,e.details));if(a&&a.validationOptions.ignoreUnsupported&&(s=s.filter(e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)),a.validationOptions.enabled||L){const t=(await r.e("chunk-2d209409").then(r.bind(null,"a7eb"))).validate(e,a.portalItemLayerType);if(t.length>0){const e="Layer item did not validate:\n"+t.join("\n");if(A.error("_validateAgainstJSONSchema(): "+e),"throw"===a.validationOptions.failPolicy){const e=t.map(e=>new o["a"]("sceneservice:schema-validation",e)).concat(s);throw new o["a"]("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(s.length>0)throw new o["a"]("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}};return Object(a["a"])([Object(p["b"])(m["c"])],t.prototype,"id",void 0),Object(a["a"])([Object(p["b"])({type:j["a"]})],t.prototype,"spatialReference",void 0),Object(a["a"])([Object(u["a"])("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),Object(a["a"])([Object(p["b"])({type:h["a"]})],t.prototype,"fullExtent",void 0),Object(a["a"])([Object(u["a"])("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),Object(a["a"])([Object(p["b"])({readOnly:!0,type:O["a"]})],t.prototype,"heightModelInfo",void 0),Object(a["a"])([Object(p["b"])({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),Object(a["a"])([Object(p["b"])({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),Object(a["a"])([Object(p["b"])({readOnly:!0})],t.prototype,"version",void 0),Object(a["a"])([Object(u["a"])("version",["store.version"])],t.prototype,"readVersion",null),Object(a["a"])([Object(p["b"])({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),Object(a["a"])([Object(p["b"])({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),Object(a["a"])([Object(p["b"])({type:String})],t.prototype,"title",void 0),Object(a["a"])([Object(u["a"])("portal-item","title")],t.prototype,"readTitlePortalItem",null),Object(a["a"])([Object(u["a"])("service","title",["name"])],t.prototype,"readTitleService",null),Object(a["a"])([Object(p["b"])({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),Object(a["a"])([Object(p["b"])(m["n"])],t.prototype,"url",null),Object(a["a"])([Object(b["a"])("url")],t.prototype,"writeUrl",null),Object(a["a"])([Object(p["b"])()],t.prototype,"parsedUrl",null),Object(a["a"])([Object(p["b"])({readOnly:!0})],t.prototype,"store",void 0),Object(a["a"])([Object(p["b"])({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=Object(a["a"])([Object(d["a"])("esri.layers.mixins.SceneService")],t),t},P=-1e38,L=!1;var E;!function(e){e[e.existingItem=0]="existingItem",e[e.newItem=1]="newItem"}(E||(E={}));const k="Scene Service",N={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var U;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(U||(U={}))},9980:function(e,t,r){"use strict";r.d(t,"a",(function(){return p}));var a=r("f7be"),s=r("2eab"),o=r("b2b2"),i=r("f4cc"),n=r("5bd5"),l=r("0224"),c=r("a7e1");class p{constructor(e,t,r,a){this.parsedUrl=e,this.portalItem=t,this.apiKey=r,this.signal=a,this.rootDocument=null;const s=this.parsedUrl.path.match(/^(.*)\/SceneServer\/layers\/([\d]*)\/?$/i);s&&(this.urlParts={root:s[1],layerId:parseInt(s[2],10)})}async fetch(){var e;if(!this.urlParts)return null;const t=null!=(e=this.portalItem)?e:await this._portalItemFromServiceItemId();if(Object(o["j"])(t))return this._loadFromUrl();const r=await this._findAndLoadRelatedPortalItem(t);return Object(o["j"])(r)?null:this._loadFeatureLayerFromPortalItem(r)}async fetchPortalItem(){var e;if(!this.urlParts)return null;const t=null!=(e=this.portalItem)?e:await this._portalItemFromServiceItemId();return Object(o["j"])(t)?null:this._findAndLoadRelatedPortalItem(t)}async _fetchRootDocument(){if(Object(o["k"])(this.rootDocument))return this.rootDocument;if(Object(o["j"])(this.urlParts))return this.rootDocument={},{};const e={query:{f:"json",token:this.apiKey},responseType:"json",signal:this.signal},t=this.urlParts.root+"/SceneServer";try{const r=await Object(s["default"])(t,e);this.rootDocument=r.data}catch{this.rootDocument={}}return this.rootDocument}async _fetchServiceOwningPortalUrl(){var e;const t=null==(e=a["b"])?void 0:e.findServerInfo(this.parsedUrl.path);if(null!=t&&t.owningSystemUrl)return t.owningSystemUrl;const r=this.parsedUrl.path.replace(/(.*\/rest)\/.*/i,"$1")+"/info";try{const e=(await Object(s["default"])(r,{query:{f:"json"},responseType:"json",signal:this.signal})).data.owningSystemUrl;if(e)return e}catch(o){Object(i["u"])(o)}return null}async _findAndLoadRelatedPortalItem(e){try{return(await e.fetchRelatedItems({relationshipType:"Service2Service",direction:"reverse"},{signal:this.signal})).find(e=>"Feature Service"===e.type)||null}catch(t){return Object(i["u"])(t),null}}async _loadFeatureLayerFromPortalItem(e){await e.load({signal:this.signal});const t=await this._findMatchingAssociatedSublayerUrl(e.url);return new n["default"]({url:t,portalItem:e}).load({signal:this.signal})}async _loadFromUrl(){const e=await this._findMatchingAssociatedSublayerUrl(this.urlParts.root+"/FeatureServer");return new n["default"]({url:e}).load({signal:this.signal})}async _findMatchingAssociatedSublayerUrl(e){const t=e.replace(/^(.*FeatureServer)(\/[\d]*\/?)?$/i,"$1"),r={query:{f:"json"},responseType:"json",authMode:"no-prompt",signal:this.signal},a=this.urlParts.layerId,o=this._fetchRootDocument(),i=Object(s["default"])(t,r),[n,l]=await Promise.all([i,o]),c=l&&l.layers,p=n.data&&n.data.layers;if(!Array.isArray(p))throw new Error("expected layers array");if(Array.isArray(c)){for(let s=0;s