@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
1 lines • 31 kB
JavaScript
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2029],{4902:(e,t,r)=>{r.d(t,{A:()=>u});var s=r(90237),i=r(40608);let l=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+l++})}};return t=(0,s._)([(0,i.$)("esri.core.Identifiable")],t),t};let n=class extends(o(class{})){};var a;n=(0,s._)([(0,i.$)("esri.core.Identifiable")],n),(a=n||(n={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:l++})}};return t=(0,s._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};const u=n},8303:(e,t,r)=>{r.d(t,{A:()=>b});var s=r(90237),i=r(92602),l=r(70333),o=r(78888),n=r(60999),a=r(49186),u=r(53966),c=r(97768),p=r(74887),h=r(84952),d=r(10107),f=(r(44208),r(87811),r(36005)),y=r(40608),m=r(43937),g=r(77548),w=r(20655),v=r(80812),_=r(41318),M=r(10407);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await r.e(1204).then(r.bind(r,41204));return(0,p.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:s},content:{updateItem:i}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",i)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!l.id?.findCredential(this.url),i=e===r.id;if(i&&r.portal.user)return this._getUserPrivileges(r,s);let o,n;if(i)o=r.portal.url;else try{o=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!o||!(0,h.b8)(o,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(l.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const a=!0,u=!1,c=!1;if(!n)return{features:{edit:a,fullEdit:u},content:{updateItem:c}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:o}}),await r.load(t)),r.portal.user)return this._getUserPrivileges(r,s)}catch(e){(0,p.QP)(e)}return{features:{edit:a,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const r=(0,M.It)(e);return t&&(r.features.edit=!0),r}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?l.id?.findCredential(this.url):null;if(!t)return!0;const r=A.credential===t?A.user:await this._fetchEditingUser(e);return A.credential=t,A.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=l.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const s=`${r.owningSystemUrl}/sharing/rest`,i=w.A.getDefault();if(i&&i.loaded&&(0,h.S8)(i.restUrl)===(0,h.S8)(s))return i.user;const a=`${s}/community/self`,u=null!=e?e.signal:null,c=await(0,n.Ke)((0,o.A)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?_.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return r&&s&&!(0,h.ut)(s.restUrl,r.restUrl)?(t.messages&&t.messages.push(new a.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,d.MZ)({type:v.default})],t.prototype,"portalItem",null),(0,s._)([(0,f.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,y.$)("esri.layers.mixins.PortalLayer")],t),t},A={credential:null,user:null}},27865:(e,t,r)=>{r.d(t,{O9:()=>l,dw:()=>o,mj:()=>i});var s=r(59247);function i(e,t){const r=e.length>t.length?e:t;return(e.length>t.length?t:e).every(((e,t)=>e.type===r[t].type))}function l(e,t){const r=e.length>t.length?e:t,i=e.length>t.length?t:e;for(let e=i.length;e<r.length;e++)i.push((0,s.sK)(r[e]))}function o(e){const t=e[0];return!!t&&"type"in t}},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>l});var s=r(49186),i=r(74887);async function l(e,t,r){let l;try{l=await createImageBitmap(e)}catch(e){throw new s.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,i.Te)(r),l}async function o(e,t,r,l,o){let n;try{n=await createImageBitmap(e)}catch(e){throw new s.A("request:server",`Unable to load tile ${t}/${r}/${l}`,{error:e,level:t,row:r,col:l})}return(0,i.Te)(o),n}},47314:(e,t,r)=>{r.r(t),r.d(t,{default:()=>I});var s,i=r(90237),l=r(78888),o=r(49186),n=r(92071),a=r(799),u=r(84952),c=r(10107),p=(r(44208),r(53966),r(87811),r(36005)),h=r(40608),d=r(43937),f=r(5443),y=r(86738),m=r(16930),g=r(4146),w=r(63074),v=r(16131),_=r(8303),M=r(54310),b=r(25036),A=r(33446),T=r(91806),x=r(87045),P=r(83703);let I=s=class extends((0,w.dM)((0,M.J)((0,b.j)((0,v.q)((0,_.A)((0,n.P)(g.A))))))){constructor(...e){super(...e),this.copyright="",this.fullExtent=new f.A(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,m.A.WebMercator),this.legendEnabled=!1,this.isReference=null,this.popupEnabled=!1,this.spatialReference=m.A.WebMercator,this.subDomains=null,this.tileInfo=new x.A({size:[256,256],dpi:96,format:"png8",compressionQuality:0,origin:new y.A({x:-20037508.342787,y:20037508.342787,spatialReference:m.A.WebMercator}),spatialReference:m.A.WebMercator,lods:[new T.A({level:0,scale:591657527.591555,resolution:156543.033928}),new T.A({level:1,scale:295828763.795777,resolution:78271.5169639999}),new T.A({level:2,scale:147914381.897889,resolution:39135.7584820001}),new T.A({level:3,scale:73957190.948944,resolution:19567.8792409999}),new T.A({level:4,scale:36978595.474472,resolution:9783.93962049996}),new T.A({level:5,scale:18489297.737236,resolution:4891.96981024998}),new T.A({level:6,scale:9244648.868618,resolution:2445.98490512499}),new T.A({level:7,scale:4622324.434309,resolution:1222.99245256249}),new T.A({level:8,scale:2311162.217155,resolution:611.49622628138}),new T.A({level:9,scale:1155581.108577,resolution:305.748113140558}),new T.A({level:10,scale:577790.554289,resolution:152.874056570411}),new T.A({level:11,scale:288895.277144,resolution:76.4370282850732}),new T.A({level:12,scale:144447.638572,resolution:38.2185141425366}),new T.A({level:13,scale:72223.819286,resolution:19.1092570712683}),new T.A({level:14,scale:36111.909643,resolution:9.55462853563415}),new T.A({level:15,scale:18055.954822,resolution:4.77731426794937}),new T.A({level:16,scale:9027.977411,resolution:2.38865713397468}),new T.A({level:17,scale:4513.988705,resolution:1.19432856685505}),new T.A({level:18,scale:2256.994353,resolution:.597164283559817}),new T.A({level:19,scale:1128.497176,resolution:.298582141647617}),new T.A({level:20,scale:564.248588,resolution:.14929107082380833}),new T.A({level:21,scale:282.124294,resolution:.07464553541190416}),new T.A({level:22,scale:141.062147,resolution:.03732276770595208}),new T.A({level:23,scale:70.5310735,resolution:.01866138385297604})]}),this.type="web-tile",this.urlTemplate=null,this.wmtsInfo=null}normalizeCtorArgs(e,t){return"string"==typeof e?{urlTemplate:e,...t}:e}load(e){const t=this.loadFromPortal({supportedTypes:["WMTS"]},e).then((()=>{let e="";if(this.urlTemplate)if(this.spatialReference.equals(this.tileInfo.spatialReference)){const t=new u.s0(this.urlTemplate);!(this.subDomains&&this.subDomains.length>0)&&t.authority?.includes("{subDomain}")&&(e="is missing 'subDomains' property")}else e="spatialReference must match tileInfo.spatialReference";else e="is missing the required 'urlTemplate' property value";if(e)throw new o.A("web-tile-layer:load",`WebTileLayer (title: '${this.title}', id: '${this.id}') ${e}`)}));return this.addResolvingPromise(t),Promise.resolve(this)}get levelValues(){const e=[];if(!this.tileInfo)return null;for(const t of this.tileInfo.lods)e[t.level]=t.levelValue||t.level;return e}readSpatialReference(e,t){return e||m.A.fromJSON(t.fullExtent?.spatialReference)}get tileServers(){if(!this.urlTemplate)return null;const e=[],{urlTemplate:t,subDomains:r}=this,s=new u.s0(t),i=s.scheme?s.scheme+"://":"//",l=i+s.authority+"/",o=s.authority;if(o?.includes("{subDomain}")){if(r&&r.length>0&&o.split(".").length>1)for(const t of r)e.push(i+o.replaceAll(/\{subDomain\}/gi,t)+"/")}else e.push(l);return e.map(u.Il)}get urlPath(){if(!this.urlTemplate)return null;const e=this.urlTemplate,t=new u.s0(e),r=(t.scheme?t.scheme+"://":"//")+t.authority+"/";return e.slice(r.length)}readUrlTemplate(e,t){return e||t.templateUrl}writeUrlTemplate(e,t){(0,u.BQ)(e)&&(e="https:"+e),e&&(e=e.replaceAll(/\{z\}/gi,"{level}").replaceAll(/\{x\}/gi,"{col}").replaceAll(/\{y\}/gi,"{row}"),e=(0,u.S8)(e)),t.templateUrl=e}fetchTile(e,t,r,s={}){const{signal:i}=s,o=this.getTileUrl(e,t,r),n={responseType:"image",signal:i,query:{...this.refreshParameters}};return(0,l.A)(o,n).then((e=>e.data))}async fetchImageBitmapTile(e,t,r,i={}){const{signal:o}=i;if(this.fetchTile!==s.prototype.fetchTile){const s=await this.fetchTile(e,t,r,i);return(0,A.C)(s,e,t,r,o)}const n=this.getTileUrl(e,t,r),a={responseType:"blob",signal:o,query:{...this.refreshParameters}},{data:u}=await(0,l.A)(n,a);return(0,A.C)(u,e,t,r,o)}getTileUrl(e,t,r){const{levelValues:s,tileServers:i,urlPath:l}=this;if(!s||!i||!l)return"";const o=s[e];return i[t%i.length]+(0,a.HC)(l,{level:o,z:o,col:r,x:r,row:t,y:t})}};(0,i._)([(0,c.MZ)({type:String,value:"",json:{write:!0}})],I.prototype,"copyright",void 0),(0,i._)([(0,c.MZ)({type:f.A,json:{write:!0},nonNullable:!0})],I.prototype,"fullExtent",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],I.prototype,"legendEnabled",void 0),(0,i._)([(0,c.MZ)({type:["show","hide"]})],I.prototype,"listMode",void 0),(0,i._)([(0,c.MZ)({json:{read:!0,write:!0}})],I.prototype,"blendMode",void 0),(0,i._)([(0,c.MZ)()],I.prototype,"levelValues",null),(0,i._)([(0,c.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],I.prototype,"isReference",void 0),(0,i._)([(0,c.MZ)({type:["WebTiledLayer"],value:"WebTiledLayer"})],I.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!1}})],I.prototype,"popupEnabled",void 0),(0,i._)([(0,c.MZ)({type:m.A})],I.prototype,"spatialReference",void 0),(0,i._)([(0,p.w)("spatialReference",["spatialReference","fullExtent.spatialReference"])],I.prototype,"readSpatialReference",null),(0,i._)([(0,c.MZ)({type:[String],json:{write:!0}})],I.prototype,"subDomains",void 0),(0,i._)([(0,c.MZ)({type:x.A,json:{write:!0}})],I.prototype,"tileInfo",void 0),(0,i._)([(0,c.MZ)({readOnly:!0})],I.prototype,"tileServers",null),(0,i._)([(0,c.MZ)({json:{read:!1}})],I.prototype,"type",void 0),(0,i._)([(0,c.MZ)()],I.prototype,"urlPath",null),(0,i._)([(0,c.MZ)({type:String,json:{origins:{"portal-item":{read:{source:"url"}}}}})],I.prototype,"urlTemplate",void 0),(0,i._)([(0,p.w)("urlTemplate",["urlTemplate","templateUrl"])],I.prototype,"readUrlTemplate",null),(0,i._)([(0,d.K)("urlTemplate",{templateUrl:{type:String}})],I.prototype,"writeUrlTemplate",null),(0,i._)([(0,c.MZ)({type:P.x,json:{write:!0}})],I.prototype,"wmtsInfo",void 0),I=s=(0,i._)([(0,h.$)("esri.layers.WebTileLayer")],I)},59247:(e,t,r)=>{r.d(t,{bv:()=>a,Fk:()=>u,yG:()=>c,$b:()=>p,Nd:()=>h,jm:()=>d,sK:()=>m});var s=r(40876),i=r(90629);function l(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const o=l();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(e){const t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},create:l,fromValues:function(e,t,r,s,i,l,o,n,a,u,c,p,h,d,f,y){const m=new Float32Array(16);return m[0]=e,m[1]=t,m[2]=r,m[3]=s,m[4]=i,m[5]=l,m[6]=o,m[7]=n,m[8]=a,m[9]=u,m[10]=c,m[11]=p,m[12]=h,m[13]=d,m[14]=f,m[15]=y,m}},Symbol.toStringTag,{value:"Module"}));var n=r(58083);class a{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=f(e.strength,t.strength,r),this.radius=f(e.radius,t.radius,r),this.threshold=f(e.threshold,t.threshold,r)}clone(){return new a(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:y(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(f(e.radius,t.radius,r))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:y(this.radius)}}}class c{constructor(e,t){this.type=e,this.amount=t,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||l();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,n.hZ)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,n.mg)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,n.hZ)(e,t,0,0,.5-.5*t,0,t,0,.5-.5*t,0,0,t,.5-.5*t,0,0,0,1);return(0,n.mg)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,n.hZ)(e,.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1);return(0,n.mg)(r,r)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,s=(0,n.hZ)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,n.mg)(s,s)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,n.hZ)(e,.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1);return(0,n.mg)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=(e=>{const t=1-this.amount,r=(0,n.hZ)(e,.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1);return(0,n.mg)(r,r)})(e)}}}class p{constructor(e,t,r,s){this.offsetX=e,this.offsetY=t,this.blurRadius=r,this.color=s,this.type="drop-shadow"}interpolate(e,t,r){this.offsetX=f(e.offsetX,t.offsetX,r),this.offsetY=f(e.offsetY,t.offsetY,r),this.blurRadius=f(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(f(e.color[0],t.color[0],r)),this.color[1]=Math.round(f(e.color[1],t.color[1],r)),this.color[2]=Math.round(f(e.color[2],t.color[2],r)),this.color[3]=f(e.color[3],t.color[3],r)}clone(){return new p(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const e=[...this.color];return e[3]*=255,{type:"drop-shadow",xoffset:y(this.offsetX),yoffset:y(this.offsetY),blurRadius:y(this.blurRadius),color:e}}}class h{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=f(e.angle,t.angle,r),this._updateMatrix()}clone(){return new h(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||l();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),s=Math.cos(t*Math.PI/180),i=(0,n.hZ)(e,.213+.787*s-.213*r,.715-.715*s-.715*r,.072-.072*s+.928*r,0,.213-.213*s+.143*r,.715+.285*s+.14*r,.072-.072*s-.283*r,0,.213-.213*s-.787*r,.715-.715*s+.715*r,.072+.928*s+.072*r,0,0,0,0,1);return(0,n.mg)(i,i)})(e,this.angle)}}class d{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=f(e.amount,t.amount,r)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function f(e,t,r){return e+(t-e)*r}function y(e){return Math.round(1e3*(0,i.PN)(e))/1e3}function m(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new c(e.type,0);case"saturate":case"brightness":case"contrast":return new c(e.type,1);case"opacity":return new d(1);case"hue-rotate":return new h(0);case"blur":return new u(0);case"drop-shadow":return new p(0,0,0,[...(0,s.TS)("transparent")]);case"bloom":return new a(0,0,1)}}},64272:(e,t,r)=>{r.d(t,{T:()=>h});var s,i=r(90237),l=r(25482),o=r(88930),n=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),u=r(40608),c=r(43937),p=r(98623);let h=class extends l.A{static{s=this}static get allTime(){return d}static get empty(){return f}static fromArray(e){return new s({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(s.allTime)}get isEmpty(){return this.equals(s.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new s({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,s=e.start?.getTime()??e.start,i=e.end?.getTime()??e.end;return t===s&&r===i}expandTo(e,t=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,o.lL)(r,e,t));let i=this.end;if(i){const r=(0,o.lL)(i,e,t);i=i.getTime()===r.getTime()?r:(0,o.S1)(r,1,e,t)}return new s({start:r,end:i})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return s.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,i=e.start?.getTime()??-1/0,l=e.end?.getTime()??1/0;let o,n;return i>=t&&i<=r?o=i:t>=i&&t<=l&&(o=t),r>=i&&r<=l?n=r:l>=t&&l<=r&&(n=l),null==o||null==n||isNaN(o)||isNaN(n)?s.empty:new s({start:o===-1/0?null:new Date(o),end:n===1/0?null:new Date(n)})}offset(e,t,r=p.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new s,{start:l,end:n}=this;return null!=l&&(i.start=(0,o.S1)(l,e,t,r)),null!=n&&(i.end=(0,o.S1)(n,e,t,r)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return d.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new s({start:t,end:r})}};(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,i._)([(0,a.w)("end")],h.prototype,"readEnd",null),(0,i._)([(0,c.K)("end")],h.prototype,"writeEnd",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,i._)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,i._)([(0,n.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,i._)([(0,a.w)("start")],h.prototype,"readStart",null),(0,i._)([(0,c.K)("start")],h.prototype,"writeStart",null),h=s=(0,i._)([(0,u.$)("esri.time.TimeExtent")],h);const d=new h,f=new h({start:void 0,end:void 0})},69540:(e,t,r)=>{r.d(t,{A:()=>h});var s=r(90237),i=r(69622),l=(r(44208),r(4718)),o=(r(53966),r(97768)),n=r(35666),a=r(88620),u=r(40608);const c=e=>{let t=class extends e{clone(){const e=(0,a.oY)(this);(0,o.Lw)(e,"unable to clone instance of non-accessor class");const t=e.metadata,r=e.store,s={},i=new Map;for(const e in t){const o=t[e],a=r?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||a!==n.Gr.USER&&a!==n.Gr.DEFAULTS&&a!==n.Gr.WEB_MAP&&a!==n.Gr.WEB_SCENE)continue;const c=this[e];let p=null;p="function"==typeof u?u(c):"reference"===u?c:(0,l.TU)(c),null!=c&&null==p||(a===n.Gr.DEFAULTS?i.set(e,p):s[e]=p)}const u=new(0,Object.getPrototypeOf(this).constructor)(s);if(i.size){const e=(0,a.oY)(u)?.store;if(e)for(const[t,r]of i)e.set(t,r,n.Gr.DEFAULTS)}return u}};return t=(0,s._)([(0,u.$)("esri.core.Clonable")],t),t};let p=class extends(c(i.A)){};p=(0,s._)([(0,u.$)("esri.core.Clonable")],p),(p||(p={})).ClonableMixin=c;const h=p},72802:(e,t,r)=>{r.d(t,{U:()=>s});class s{constructor(e,t,r,s,i=void 0){this.id=e,this.level=t,this.row=r,this.col=s,this.extent=i}}},78553:(e,t,r)=>{r.d(t,{D:()=>l,p:()=>i});var s=r(56507);function i(e){const t=(0,s.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function l(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}},83703:(e,t,r)=>{r.d(t,{x:()=>u});var s,i=r(90237),l=r(25482),o=r(4718),n=r(10107),a=(r(44208),r(53966),r(40608));let u=s=class extends l.A{constructor(e){super(e)}clone(){return new s({customLayerParameters:(0,o.o8)(this.customLayerParameters),customParameters:(0,o.o8)(this.customParameters),layerIdentifier:this.layerIdentifier,tileMatrixSet:this.tileMatrixSet,url:this.url})}};(0,i._)([(0,n.MZ)({json:{type:Object,write:!0}})],u.prototype,"customLayerParameters",void 0),(0,i._)([(0,n.MZ)({json:{type:Object,write:!0}})],u.prototype,"customParameters",void 0),(0,i._)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"layerIdentifier",void 0),(0,i._)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"tileMatrixSet",void 0),(0,i._)([(0,n.MZ)({type:String,json:{write:!0}})],u.prototype,"url",void 0),u=s=(0,i._)([(0,a.$)("esri.layers.support.WMTSLayerInfo")],u)},87045:(e,t,r)=>{r.d(t,{A:()=>M});var s,i=r(90237),l=r(66552),o=r(25482),n=r(83047),a=r(10107),u=r(56507),c=(r(44208),r(87811),r(36005)),p=r(40608),h=r(43937),d=r(86738),f=r(16930),y=r(19419),m=r(21325),g=r(28735),w=r(91806),v=r(72802);const _=new l.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let M=class extends o.A{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:r,size:i=256,spatialReference:l=f.A.WebMercator,numLODs:o=24}=e;if(!(0,m.fn)(l)){const e=[];if(r)for(let t=0;t<r.length;t++){const s=r[t];e.push(new w.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let r=o-1;r>=0;r--)e.unshift(new w.A({level:r,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new d.A(0,0,l),size:[i,i],spatialReference:l})}const a=(0,m.Vp)(l),u=e.origin?new d.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):new d.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:l}:{x:0,y:0,spatialReference:l}),c=1/(39.37*(0,n.GA)(l)*96),p=[];if(r)for(let e=0;e<r.length;e++){const t=r[e],s=t*c;p.push(new w.A({level:e,scale:t,resolution:s}))}else{let e=(0,m.EA)(l)?512/i*591657527.5917094:256/i*591657527.591555;const r=Math.ceil(o/t);p.push(new w.A({level:0,scale:e,resolution:e*c}));for(let s=1;s<r;s++){const r=e/2**t,i=r*c;p.push(new w.A({level:s,scale:r,resolution:i})),e=r}}return new s({dpi:96,lods:p,origin:u,size:[i,i],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const r=(0,m.Vp)(e);return e.isWrappable&&!!r&&Math.abs(r.origin[0]-t.x)<=r.dx}return!1}readOrigin(e,t){return d.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,r=0;const s=[],i=this._levelToLOD={};e&&(t=-1/0,r=1/0,e.forEach((e=>{s.push(e.scale),t=e.scale>t?e.scale:t,r=e.scale<r?e.scale:r,i[e.level]=e}))),this._set("scales",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const r=Math.floor(e),s=r+1;return t[r]/(t[r]/t[s])**(e-r)}scaleToZoom(e){const t=this.scales,r=t.length-1;let s=0;for(;s<r;s++){const r=t[s],i=t[s+1];if(r<=e)return s;if(i===e)return s+1;if(r>e&&i<e)return s+Math.log(r/e)/Math.log(r/i)}return s}tileAt(e,t,r,s){const i=this.lodAt(e);if(!i)return null;let l,o;if("number"==typeof t)l=t,o=r;else if((0,m.aI)(t.spatialReference,this.spatialReference))l=t.x,o=t.y,s=r;else{const e=(0,g.Cv)(t,this.spatialReference);if(null==e)return null;l=e.x,o=e.y,s=r}const n=i.resolution*this.size[0],a=i.resolution*this.size[1];return s||(s=new v.U(null,0,0,0,(0,y.vt)())),s.level=e,s.row=Math.floor((this.origin.y-o)/a+.001),s.col=Math.floor((l-this.origin.x)/n+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=s.ExtrapolateOptions.NONE){let r=this.lodAt(e.level);if(!r&&t===s.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(r=t)}if(!r)return;const i=e.level-r.level,l=r.resolution*this.size[0]/2**i,o=r.resolution*this.size[1]/2**i;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,y.vt)()),e.extent[0]=this.origin.x+e.col*l,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+l,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const r=this.lodAt(t.level);if(null==r)return null;const{resolution:s}=r,i=s*this.size[0],l=s*this.size[1];return e[0]=this.origin.x+t.col*i,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+i,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return s.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const r=[],i=this.lods.length-t;for(let e=0;e<i;e++){const s=e+t,{scale:i,resolution:l}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};r.push(new w.A({level:e,scale:i,resolution:l}))}return new s({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:r})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let r=0;r<e.length;r++){const s=e[r];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};var b,A;(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"compressionQuality",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"dpi",void 0),(0,i._)([(0,a.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],M.prototype,"format",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],M.prototype,"isWrappable",null),(0,i._)([(0,a.MZ)({type:d.A,json:{write:!0}})],M.prototype,"origin",void 0),(0,i._)([(0,c.w)("origin")],M.prototype,"readOrigin",null),(0,i._)([(0,a.MZ)({type:[w.A],value:null,json:{write:!0}})],M.prototype,"lods",null),(0,i._)([(0,a.MZ)({readOnly:!0})],M.prototype,"scales",void 0),(0,i._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],M.prototype,"size",void 0),(0,i._)([(0,c.w)("size",["rows","cols"])],M.prototype,"readSize",null),(0,i._)([(0,h.K)("size",{cols:{type:u.jz},rows:{type:u.jz}})],M.prototype,"writeSize",null),(0,i._)([(0,a.MZ)({type:f.A,json:{write:!0}})],M.prototype,"spatialReference",void 0),M=s=(0,i._)([(0,p.$)("esri.layers.support.TileInfo")],M),(A=(b=M||(M={})).ExtrapolateOptions||(b.ExtrapolateOptions={}))[A.NONE=0]="NONE",A[A.POWER_OF_TWO=1]="POWER_OF_TWO"},90629:(e,t,r)=>{r.d(t,{Lz:()=>o,PN:()=>n,cr:()=>a,tc:()=>u});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",l=96;function o(e){return e?e/72*l:0}function n(e){return e?72*e/l:0}function a(e){if("string"==typeof e){const t=e.match(s);if(t){const r=Number(t[1]),s=t[3]&&t[3].toLowerCase(),i="-"===e.charAt(0),l="px"===s?n(r):r;return i?-l:l}return console.warn(i),null}return e}function u(e=0,t=0){return{x:e,y:t}}},91806:(e,t,r)=>{r.d(t,{A:()=>u});var s,i=r(90237),l=r(25482),o=r(10107),n=r(56507),a=(r(44208),r(87811),r(40608));let u=class extends l.A{static{s=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,i._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,i._)([(0,o.MZ)({type:n.jz,json:{write:!0}})],u.prototype,"level",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,i._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,i._)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=s=(0,i._)([(0,a.$)("esri.layers.support.LOD")],u)}}]);