@geoscene/core 4.29.6 → 4.29.7
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1664],{72208:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var s=r(41948),i=r(2600),a=r(2952),n=r(30604),o=r(40504),l=r(62088),c=r(95800),u=r(79152),p=r(66360),d=r(70680),y=r(10860),h=r(28176),m=r(1580),g=(r(9456),r(12552)),f=r(18996),b=r(56156),v=r(54872),S=r(9764),q=r(21320),w=r(43780),_=(r(72052),r(89960));const M=new Set(["ar","bs","ca","hr","cs","da","nl","en","et","fi","fr","de","el","he","hu","id","it","ja","ko","lv","lt","nb","pl","ro","ru","sr","es","sv","th","tr","uk","vi"]);let T=class extends w.c{constructor(e){super(e),this.id=null,this.language=null,this.places=null,this.serviceUrl="https://basemapstyles-api.geoscene.cn/geoscene/rest/services/styles/v2/webmaps",this.worldview=null}getLanguageParamValue(){if(this.language)return this.language;const e=(0,_.a8)().toLowerCase();switch(e){case"pt-br":return"pt-BR";case"pt-pt":return"pt-PT";case"zh-cn":return"zh-CN";case"zh-hk":return"zh-HK";case"zh-tw":return"zh-TW"}const t=(0,_.mo)(e);return"pt"===t?"pt-BR":t&&M.has(t)?t:"global"}};(0,s._)([(0,m.qq)()],T.prototype,"id",void 0),(0,s._)([(0,m.qq)()],T.prototype,"language",void 0),(0,s._)([(0,m.qq)()],T.prototype,"places",void 0),(0,s._)([(0,m.qq)()],T.prototype,"serviceUrl",void 0),(0,s._)([(0,m.qq)()],T.prototype,"worldview",void 0),T=(0,s._)([(0,g.c)("geoscene.support.BasemapStyle")],T);const I=T;var L,O=r(14812);let x=0,U=L=class extends((0,o.Ib)(c.c)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.style=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+x++,this.baseLayers=new a.c,this.referenceLayers=new a.c;const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&p.c.getLogger(this).error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},r=e=>{e.parent=null};this.addHandles([this.baseLayers.on("after-add",(e=>t(e.item))),this.referenceLayers.on("after-add",(e=>t(e.item))),this.baseLayers.on("after-remove",(e=>r(e.item))),this.referenceLayers.on("after-remove",(e=>r(e.item)))])}initialize(){this.when().catch((e=>{p.c.getLogger(this).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.toArray();for(const t of e)t.destroy();const t=this.referenceLayers.toArray();for(const e of t)e.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),this.portalItem=(0,d.mG)(this.portalItem)}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",(0,n.q)(e,this._get("baseLayers")))}_writeBaseLayers(e,t,r){const s=[];e?(r={...r,layerContainerType:"basemap"},this.baseLayers.forEach((e=>{const t=(0,O.WW)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&s.push(t)})),this.referenceLayers.forEach((e=>{const t=(0,O.WW)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&("scene"!==e.type&&(t.isReference=!0),s.push(t))})),t.baseMapLayers=s):t.baseMapLayers=s}set referenceLayers(e){this._set("referenceLayers",(0,n.q)(e,this._get("referenceLayers")))}writeTitle(e,t){t.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return(0,u.A)(this,(e=>{e(this.baseLayers,this.referenceLayers)}))}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.map((e=>(0,l.O8)(e)?e.clone():e)),referenceLayers:this.referenceLayers.map((e=>(0,l.O8)(e)?e.clone():e))};return this.loaded&&(e.loadStatus="loaded"),new L({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}write(e,t){return e=e||{},t?.origin||(t={origin:"web-map",...t}),super.write(e,t),!this.loaded&&this.resourceInfo?.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((e=>{const t=(0,l.ct)(e);return t.url&&(0,h.eC)(t.url)&&(t.url=`https:${t.url}`),t.templateUrl&&(0,h.eC)(t.templateUrl)&&(t.templateUrl=`https:${t.templateUrl}`),t}))),e}async _loadFromSource(e){const{resourceInfo:t,portalItem:r,style:s}=this;(0,y.wp)(e);const i=[];if(t){const r=t.context?t.context.url:null;if(i.push(this._loadLayersFromJSON(t.data,r,e)),t.data.id&&!t.data.title){const e=t.data.id;i.push((0,q.y)(e).then((e=>{e&&this.read({title:e},t.context)})))}}else r?i.push(this._loadFromItem(r,e)):s&&i.push(this._loadFromStylesService(s,e));await Promise.all(i)}async _loadLayersFromJSON(e,t,s){const i=this.resourceInfo?.context,a=this.portalItem?.portal||i?.portal||null,n=G[i?.origin||""]??"web-map",{populateOperationalLayers:o}=await Promise.all([r.e(74),r.e(8828),r.e(8616)]).then(r.bind(r,58828)),l=[];if((0,y.wp)(s),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const r={context:{...i,origin:n,url:t,portal:a,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},s=e=>"web-scene"===n&&"ArcGISSceneServiceLayer"===e.layerType||e.isReference,c=o(this.baseLayers,e.baseMapLayers.filter((e=>!s(e))),r);l.push(c);const u=o(this.referenceLayers,e.baseMapLayers.filter(s),r);l.push(u)}await Promise.allSettled(l)}async _loadFromItem(e,t){const r=await e.load(t),s=await r.fetchData("json",t),i=(0,h.as)(e.itemUrl??"");return this._set("resourceInfo",{data:s.baseMap??{},context:{origin:k[e.type||""]??"web-map",portal:e.portal||v.c.getDefault(),url:i}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||v.c.getDefault(),url:i}),this._loadLayersFromJSON(this.resourceInfo.data,i,t)}async _loadFromStylesService(e,t){const r=`${e.serviceUrl}/${e.id}`,s=(await(0,i.c)(r,{query:{language:e.getLanguageParamValue(),places:e.places,worldview:e.worldview},signal:t?.signal})).data,a=(0,h.as)(r);return this._set("resourceInfo",{data:s.baseMap??{},context:{origin:"web-map",url:a}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),this._loadLayersFromJSON(this.resourceInfo.data,a,t)}static fromId(e){const t=q.u[e];return t?t.itemId?new L({portalItem:{id:t.itemId,portal:{url:"https://www.geosceneonline.cn/geoscene"}}}):L.fromJSON(t,{origin:t.is3d?"web-scene":"web-map"}):null}};(0,s._)([(0,m.qq)({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,t,r,s){this._writeBaseLayers(e,t,s)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:a.c}},writer(e,t,r,s){this._writeBaseLayers(e,t,s)}}}}}})],U.prototype,"baseLayers",null),(0,s._)([(0,m.qq)({type:String,json:{origins:{"web-scene":{write:!0}}}})],U.prototype,"id",void 0),(0,s._)([(0,m.qq)({type:S.default})],U.prototype,"portalItem",void 0),(0,s._)([(0,m.qq)()],U.prototype,"referenceLayers",null),(0,s._)([(0,m.qq)({readOnly:!0})],U.prototype,"resourceInfo",void 0),(0,s._)([(0,m.qq)({type:b.c})],U.prototype,"spatialReference",void 0),(0,s._)([(0,m.qq)({type:I})],U.prototype,"style",void 0),(0,s._)([(0,m.qq)()],U.prototype,"thumbnailUrl",void 0),(0,s._)([(0,m.qq)({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],U.prototype,"title",void 0),(0,s._)([(0,f.G)("title")],U.prototype,"writeTitle",null),U=L=(0,s._)([(0,g.c)("geoscene.Basemap")],U);const k={"Web Scene":"web-scene","Web Map":"web-map","Link Chart":"link-chart"},G={"web-scene":"web-scene","web-map":"web-map","link-chart":"link-chart"},F=U},91952:(e,t,r)=>{r.d(t,{M:()=>f,a:()=>m,b:()=>v,e:()=>y,f:()=>a,i:()=>p,p:()=>d,r:()=>o,t:()=>n,w:()=>l});var s=r(47620),i=r(28176);function a(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,i.WM)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,i.SU)(e,t.portalItem.itemUrl);null!=r&&u.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=h(e,t?.portal))&&c.test(e)?m(e):e}function n(e,t,r=f.YES){if(null==(e=e&&c.test(e)?g(e):e))return e;!(0,i.ic)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,i.WM)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const a=h(r,t.portal),n=h(s,t.portal);s=(0,i.SU)(n,a,a),null!=s&&s!==n&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=y(s,t?.portal),(0,i.ic)(s)&&(s=(0,i.k7)(s)),t?.resources&&t?.portalItem&&!(0,i.ic)(s)&&!(0,i.o9)(s)&&r===f.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function o(e,t,r){return a(e,r)}function l(e,t,r,s){const i=n(e,s);void 0!==i&&(t[r]=i)}const c=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function p(e){const t=e?.match(c)??null;return t?.[1]??null}function d(e){const t=e?.match(c)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,i.wB)(r);return{prefix:null,filename:e,extension:t}}const{path:a,extension:n}=(0,i.wB)(r.slice(s+1));return{prefix:r.slice(0,s),filename:a,extension:n}}function y(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.uN)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function h(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,i.k3)();return(0,i.OS)(s,`${s.scheme}://${r}`)?(0,i.uN)(e,t.portalHostname,r):(0,i.uN)(e,r,t.portalHostname)}function m(e){if(!e)return e||null;let t=e;return t&&s.id&&!s.id.findCredential(t)&&(t=s.id._normalizeAGOLorgDomain(t),t=t.replace(/^https?:\/\/www\.geoscene\.cn/,"https://cdn.geoscene.cn"),t=t.replace(/^https?:\/\/devext\.geoscene\.cn/,"https://cdndev.geoscene.cn"),t=t.replace(/^https?:\/\/qaext\.geoscene\.cn/,"https://cdnqa.geoscene.cn")),t}function g(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.geoscene\.cn/,"https://www.geosceneonline.cn/geoscene"),t=t.replace(/^https?:\/\/cdndev\.geoscene\.cn/,"https://devext.geoscene.cn"),t=t.replace(/^https?:\/\/cdnqa\.geoscene\.cn/,"https://qaext.geoscene.cn"),t&&s.id&&!s.id.findCredential(t)&&(t=s.id._normalizeAGOLorgDomain(t)),t}var f,b;(b=f||(f={}))[b.YES=0]="YES",b[b.NO=1]="NO";const v=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return f},ensureMainOnlineDomain:y,fromCDNUrl:g,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:d,read:o,toCDNUrl:m,toJSON:n,write:l},Symbol.toStringTag,{value:"Module"}))},46988:(e,t,r)=>{r.d(t,{SQ:()=>a,ec:()=>l,kv:()=>i,uO:()=>n,yU:()=>c});const s={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(e){return!!s[e]||!!s[e.toLowerCase()]}function a(e){return s[e]??s[e.toLowerCase()]}function n(e){return[...a(e)]}function o(e,t,r){r<0&&++r,r>1&&--r;const s=6*r;return s<1?e+(t-e)*s:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,s=1){const i=(e%360+360)%360/360,a=r<=.5?r*(t+1):r+t-r*t,n=2*r-a;return[Math.round(255*o(n,a,i+1/3)),Math.round(255*o(n,a,i)),Math.round(255*o(n,a,i-1/3)),s]}function c(e){const t=e.length>5,r=t?8:4,s=(1<<r)-1,i=t?1:17,a=t?9===e.length:5===e.length;let n=Number("0x"+e.substr(1));if(isNaN(n))return null;const o=[0,0,0,1];let l;return a&&(l=n&s,n>>=r,o[3]=i*l/255),l=n&s,n>>=r,o[2]=i*l,l=n&s,n>>=r,o[1]=i*l,l=n&s,n>>=r,o[0]=i*l,o}},95800:(e,t,r)=>{r.d(t,{c:()=>m});var s=r(41948),i=r(20744),a=r(70680),n=r(94804),o=r(10860),l=r(69504),c=r(1580),u=r(12552);const p="loaded",d=e=>{let t=class extends e{constructor(...e){super(...e),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((e=>{const t=this.load.bind(this);this.load=r=>{const s=new Promise(((e,t)=>{const s=(0,o.Ij)(r,t);this.destroyed&&t(new i.c("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(e,t).finally((()=>{s&&s.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const e=this._loadController=new AbortController;t({signal:e.signal})}return e(),s}}))),this.when((()=>{this._set("loadStatus",p),this._loadController=null}),(e=>{this._set("loadStatus","failed"),this._set("loadError",e),this._loadController=null}))}destroy(){this._loadController&&(this._loadController=(0,a.K8)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===p}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new i.c("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"loaded",null),(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"loadError",void 0),(0,s._)([(0,c.qq)({clonable:!1})],t.prototype,"loadStatus",void 0),(0,s._)([(0,c.qq)({type:[l.c],readOnly:!0})],t.prototype,"loadWarnings",null),t=(0,s._)([(0,u.c)("geoscene.core.Loadable")],t),t};let y=class extends(d(n._)){};var h;y=(0,s._)([(0,u.c)("geoscene.core.Loadable")],y),(h=y||(y={})).LoadableMixin=d,h.isLoadable=function(e){return!(!e||!e.load)};const m=y},33456:(e,t,r)=>{function s(e,t){if(!t)return e;for(const r of t)e.add(r);return e}function i(e,t){const r=new Set;return s(r,e),s(r,t),r}function a(e,t){const r=new Set;for(const s of t)e.has(s)&&r.add(s);return r}function n(e,t){if(!e||!t)return!1;if(e===t)return!0;for(const r of e)if(!t.has(r))return!1;return!0}function o(e,t){if(null==e&&null==t)return!0;if(null==e||null==t||e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function l(e,t){const r=new Set(e);for(const e of t)r.delete(e);return r}r.d(t,{Cs:()=>n,SQ:()=>i,WR:()=>a,o1:()=>l,yK:()=>o})},30604:(e,t,r)=>{r.d(t,{W:()=>a,q:()=>i});var s=r(2952);function i(e,t,r=s.c){return t||(t=new r),t===e||(t.removeAll(),(i=e)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?t.addMany(e):e&&t.add(e)),t;var i}function a(e){return e}},79152:(e,t,r)=>{r.d(t,{A:()=>n,W:()=>o});var s=r(40196),i=r(2952),a=r(95800);async function n(e,t){return await e.load(),o(e,t)}async function o(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.c.isCollection(t)?t.forEach((e=>n(e))):a.c.isLoadable(t)&&r.push(t))};t(n);let o=null;if(await(0,s.kH)(r,(async e=>{const t=await(0,s.aG)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||o||(o=t)})),o)throw o.error;return e}},50144:(e,t,r)=>{r.d(t,{Gy:()=>c,Qz:()=>l,WM:()=>o,im:()=>n});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",a=96;function n(e){return e?e/72*a:0}function o(e){return e?72*e/a:0}function l(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),a="px"===s?o(r):r;return i?-a:a}return console.warn(i),null}return e}function c(e=0,t=0){return{x:e,y:t}}},94360:(e,t,r)=>{r.d(t,{QJ:()=>c,aU:()=>l,g1:()=>o,iC:()=>n});var s=r(47828),i=r(28484),a=r(39452);const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function o(e,t,r,n=i.OX){const o=new a._C((0,s.Y9)(n)),l=a.CS.fromJSDate(e,{zone:o}),c="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[c]:t}).toJSDate()}function l(e,t,r=i.OX){const n=new a._C((0,s.Y9)(r)),o=a.CS.fromJSDate(e,{zone:n});if("decades"===t||"centuries"===t){const e=o.startOf("year"),{year:r}=e,s=r-r%("decades"===t?10:100);return e.set({year:s}).toJSDate()}const l=u(t);return o.startOf(l).toJSDate()}function c(e,t,r){return 0===e?0:e*n[t]/n[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},60708:(e,t,r)=>{r.d(t,{Su:()=>u});var s=r(53368),i=r(95247),a=r(50853),n=r(53004),o=r(67776),l=r(7488),c=r(48516);r(56156),r(97492),r(6704);const u={base:a.c,key:"type",typeMap:{extent:i.c,multipoint:n.c,point:o.c,polyline:c.c,polygon:l.c}};(0,s.S2)(u)},6704:(e,t,r)=>{r.d(t,{Ce:()=>m,Cs:()=>y,Ul:()=>c,_:()=>u,_x:()=>p,cZ:()=>d,h4:()=>h,uG:()=>f});var s=r(95247),i=r(50853),a=r(53004),n=r(67776),o=r(7488),l=r(48516);function c(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function u(e){return void 0!==e.points}function p(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function y(e){return void 0!==e.rings}function h(e){return null==e?null:e instanceof i.c?e:p(e)?n.c.fromJSON(e):d(e)?l.c.fromJSON(e):y(e)?o.c.fromJSON(e):u(e)?a.c.fromJSON(e):c(e)?s.c.fromJSON(e):null}function m(e){return e?p(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":y(e)?"esriGeometryPolygon":c(e)?"esriGeometryEnvelope":u(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:n.c,esriGeometryPolyline:l.c,esriGeometryPolygon:o.c,esriGeometryEnvelope:s.c,esriGeometryMultipoint:a.c};function f(e){return e&&g[e]||null}},42736:(e,t,r)=>{r.d(t,{Mh:()=>h,QL:()=>p,eE:()=>n,q0:()=>y,qb:()=>d,yw:()=>m}),r(6704);const s=(e,t,r)=>[t,r],i=(e,t,r)=>[t,r,e[2]],a=(e,t,r)=>[t,r,e[2],e[3]];function n(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function o({scale:e,translate:t},r){return r*e[0]+t[0]}function l({scale:e,translate:t},r){return t[1]-r*e[1]}function c(e,t,r){const s=new Array(r.length);if(!r.length)return s;const[i,a]=e.scale;let n=o(e,r[0][0]),c=l(e,r[0][1]);s[0]=t(r[0],n,c);for(let e=1;e<r.length;e++){const o=r[e];n+=o[0]*i,c-=o[1]*a,s[e]=t(o,n,c)}return s}function u(e,t,r){const s=new Array(r.length);for(let i=0;i<r.length;i++)s[i]=c(e,t,r[i]);return s}function p(e,t,r,s,i){return t.x=function({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}(e,r.x),t.y=function({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}(e,r.y),t!==r&&(s&&(t.z=r.z),i&&(t.m=r.m)),t}function d(e,t,r,n,o){return null!=r&&(t.points=function(e,t,r,n){return c(e,r?n?a:i:n?i:s,t)}(e,r.points,n,o)),t}function y(e,t,r,s,i){return null==r||(t.x=o(e,r.x),t.y=l(e,r.y),t!==r&&(s&&(t.z=r.z),i&&(t.m=r.m))),t}function h(e,t,r,n,o){return null!=r&&(t.rings=function(e,t,r,n){return u(e,r?n?a:i:n?i:s,t)}(e,r.rings,n,o)),t}function m(e,t,r,n,o){return null!=r&&(t.paths=function(e,t,r,n){return u(e,r?n?a:i:n?i:s,t)}(e,r.paths,n,o)),t}},97492:(e,t,r)=>{r.d(t,{U:()=>i,j:()=>a});var s=r(14628);const i=(0,s.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),a=(0,s.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},65604:(e,t,r)=>{r.d(t,{qC:()=>l,o1:()=>c,M7:()=>u,of:()=>p,C8:()=>d,Ez:()=>y,aO:()=>g});var s=r(46988),i=r(50144);function a(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const n=a();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,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:a,createView:function(e,t){return new Float32Array(e,t,16)},fromValues:function(e,t,r,s,i,a,n,o,l,c,u,p,d,y,h,m){const g=new Float32Array(16);return g[0]=e,g[1]=t,g[2]=r,g[3]=s,g[4]=i,g[5]=a,g[6]=n,g[7]=o,g[8]=l,g[9]=c,g[10]=u,g[11]=p,g[12]=d,g[13]=y,g[14]=h,g[15]=m,g}},Symbol.toStringTag,{value:"Module"}));var o=r(15008);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=h(e.strength,t.strength,r),this.radius=h(e.radius,t.radius,r),this.threshold=h(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:m(this.radius),strength:this.strength,threshold:this.threshold}}}class c{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(h(e.radius,t.radius,r))}clone(){return new c(this.radius)}toJSON(){return{type:"blur",radius:m(this.radius)}}}class u{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=h(e.amount,t.amount,r),this._updateMatrix()}clone(){return new u(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||a();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,o.WO)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,o.oL)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,o.WO)(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,o.oL)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=((e,t)=>{const r=1-this.amount,s=(0,o.WO)(e,.2126+.7874*r,.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1);return(0,o.oL)(s,s)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,s=(0,o.WO)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,o.oL)(s,s)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,o.WO)(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,o.oL)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=((e,t)=>{const r=1-this.amount,s=(0,o.WO)(e,.393+.607*r,.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1);return(0,o.oL)(s,s)})(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=h(e.offsetX,t.offsetX,r),this.offsetY=h(e.offsetY,t.offsetY,r),this.blurRadius=h(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(h(e.color[0],t.color[0],r)),this.color[1]=Math.round(h(e.color[1],t.color[1],r)),this.color[2]=Math.round(h(e.color[2],t.color[2],r)),this.color[3]=h(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:m(this.offsetX),yoffset:m(this.offsetY),blurRadius:m(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=h(e.angle,t.angle,r),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||a();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),s=Math.cos(t*Math.PI/180),i=(0,o.WO)(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,o.oL)(i,i)})(e,this.angle)}}class y{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=h(e.amount,t.amount,r)}clone(){return new y(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function h(e,t,r){return e+(t-e)*r}function m(e){return Math.round(1e3*(0,i.WM)(e))/1e3}function g(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new u(e.type,0);case"saturate":case"brightness":case"contrast":return new u(e.type,1);case"opacity":return new y(1);case"hue-rotate":return new d(0);case"blur":return new c(0);case"drop-shadow":return new p(0,0,0,[...(0,s.SQ)("transparent")]);case"bloom":return new l(0,0,1)}}},14644:(e,t,r)=>{r.d(t,{A1:()=>a,Ub:()=>n,w1:()=>i});var s=r(65604);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 a(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.aO)(r[e]))}function n(e){const t=e[0];return!!t&&"type"in t}},41936:(e,t,r)=>{r.d(t,{Qb:()=>y,w1:()=>S,O0:()=>v}),r(2016),r(9456),r(20744),r(53648);var s=r(70680),i=(r(47828),r(28484),r(82060)),a=r(39452);r(89960),new Map([["hours",3600],["minutes",60],["seconds",1],["deciseconds",.1],["centiseconds",.01],["milliseconds",.001]]);const n="yyyy-MM-dd";var o,l;(l=o||(o={})).HM="HH:mm",l.HMS="HH:mm:ss",l.HMS_MS="HH:mm:ss.SSS";const c=[o.HMS_MS,o.HMS,o.HM,"TT"];function u(e){if(!e||!(0,i.c)(e))return null;const t=a.CS.fromFormat(e,n);return t.isValid?t:null}function p(e){return e&&(0,i.c)(e)?(0,s.EP)(c,(t=>{const r=a.CS.fromFormat(e,t);return r.isValid?r:null}))??null:null}function d(e){if(!e||!(0,i.c)(e))return null;const t=a.CS.fromISO(e);return t.isValid?t:null}var y,h;new Set(["date-only","time-only","timestamp-offset"]),(h=y||(y={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",h.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";const m=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]);function g(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function f(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function b(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function v(e,t){const r=e?.domain;if(!r)return null;switch(r.type){case"range":{const{min:r,max:s}=S(e);if(null!=r&&+t<r||null!=s&&+t>s)return y.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==r.codedValues||r.codedValues.every((e=>null==e||e.code!==t)))return y.INVALID_CODED_VALUE}return null}function S(e,t){const r=t??e?.domain;if(!r||"range"!==r.type)return;const s="range"in r?r.range[0]:r.minValue,i="range"in r?r.range[1]:r.maxValue,a=function(e){return null!=e&&m.has(e.type)}(e);return g(e)||b(e)||f(e)?{...q(e,i,s),isInteger:a}:{min:null!=s&&"number"==typeof s?s:null,max:null!=i&&"number"==typeof i?i:null,rawMin:s,rawMax:i,isInteger:a}}function q(e,t,r){return g(e)?{min:u(r)?.toMillis(),max:u(t)?.toMillis(),rawMin:r,rawMax:t}:b(e)?{min:p(r)?.toMillis(),max:p(t)?.toMillis(),rawMin:r,rawMax:t}:f(e)?{min:d(r)?.toMillis(),max:d(t)?.toMillis(),rawMin:r,rawMax:t}:{max:null,min:null}}},564:(e,t,r)=>{r.d(t,{AN:()=>S,AZ:()=>$,G0:()=>G,G2:()=>q,Gi:()=>d,Gm:()=>ce,Ke:()=>le,Mz:()=>Q,OC:()=>f,OJ:()=>ee,OO:()=>g,Oo:()=>H,Wc:()=>h,YT:()=>te,Yn:()=>x,eM:()=>J,gB:()=>k,gP:()=>c,gp:()=>W,i:()=>b,iW:()=>j,iY:()=>U,k7:()=>v,mS:()=>Y,tm:()=>_,w1:()=>K,yM:()=>z}),r(20744);var s=r(58820),i=r(33456),a=r(41936),n=r(6384);const o=/^([0-9_])/,l=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){return null==e?null:e.trim().replaceAll(l,"_").replace(o,"F$1")||null}const u=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],p=["field","normalizationField"];function d(e,t){if(null!=e&&null!=t)for(const r of Array.isArray(e)?e:[e])if(y(u,r,t),"visualVariables"in r&&r.visualVariables)for(const e of r.visualVariables)y(p,e,t)}function y(e,t,r){if(e)for(const i of e){const e=(0,s.YT)(i,t),a=e&&"function"!=typeof e&&r.get(e);a&&(0,s.qQ)(i,a.name,t)}}function h(e,t){if(null!=e&&t?.fields?.length)if("startField"in e){const r=t.get(e.startField),s=t.get(e.endField);e.startField=r?.name??null,e.endField=s?.name??null}else{const r=t.get(e.startTimeField),s=t.get(e.endTimeField);e.startTimeField=r?.name??null,e.endTimeField=s?.name??null}}const m=new Set;function g(e,t){return e&&t?(m.clear(),f(m,e,t),Array.from(m).sort()):[]}function f(e,t,r){if(r)if(t?.fields?.length)if(r.includes("*"))for(const{name:r}of t.fields)e.add(r);else for(const s of r)b(e,t,s);else{if(r.includes("*"))return e.clear(),void e.add("*");for(const t of r)null!=t&&e.add(t)}}function b(e,t,r){if("string"==typeof r)if(t){const s=t.get(r);s&&e.add(s.name)}else e.add(r)}function v(e,t){return null==t||null==e?[]:t.includes("*")?(e.fields??[]).map((e=>e.name)):t}async function S(e,t,r){if(!r)return;const{arcadeUtils:s}=await(0,n.uK)(),i=s.extractFieldNames(r,t?.fields?.map((e=>e.name)));for(const r of i)b(e,t,r)}function q({displayField:e,fields:t}){return e||(t?.length?w(t,"name-or-title")||w(t,"unique-identifier")||w(t,"type-or-category")||function(e){for(const t of e){if(!t?.name)continue;const e=t.name.toLowerCase();if(e.includes("name")||e.includes("title"))return t.name}return null}(t):null)}function w(e,t){for(const r of e)if(r?.valueType&&r.valueType===t)return r.name;return null}function _(e){return e?g(e.fieldsIndex,L(e)):[]}const M=new Set(["oid","global-id","guid"]),T=new Set(["oid","global-id"]),I=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function L(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;if(!t)return[];const{creationDateField:r,creatorField:s,editDateField:i,editorField:a}=t;return[r,s,i,a].filter(Boolean)}function O(e){return L(e).map((e=>e.toLowerCase()))}function x(e,t){return e.editable&&!M.has(e.type)&&!O(t).includes(e.name?.toLowerCase()??"")}function U(e,t){const r=e.name?.toLowerCase()??"";return!(null!=t?.objectIdField&&r===t.objectIdField.toLowerCase()||null!=t?.globalIdField&&r===t.globalIdField.toLowerCase()||function(e){const t=new Set;O(e).forEach((e=>t.add(e))),function(e){if(!e)return[];const t=e.geometryFieldsInfo;return t?g(e.fieldsIndex,[t.shapeAreaField,t.shapeLengthField]):[]}(e).forEach((e=>t.add(e.toLowerCase())));const r=e&&"infoFor3D"in e?e.infoFor3D:void 0;return r&&(Object.values(r.assetMapFieldRoles).forEach((e=>t.add(e.toLowerCase()))),Object.values(r.transformFieldRoles).forEach((e=>t.add(e.toLowerCase())))),Array.from(t)}(t).includes(r)||T.has(e.type)||I.some((e=>e.test(r))))}function k(e){const t=e.defaultValue;return void 0!==t&&V(e,t)?t:e.nullable?null:void 0}function G(e){const t="string"==typeof e?{type:e}:e;return $(t)?255:"esriFieldTypeDate"===t.type||"date"===t.type?8:void 0}function F(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function D(e){return null===e||F(e)}function C(e){return null===e||Number.isInteger(e)}function P(e){return null!=e&&"string"==typeof e}function A(e){return null===e||P(e)}function N(){return!0}function V(e,t){let r;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":r=e.nullable?C:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":r=e.nullable?D:F;break;case"string":case"esriFieldTypeString":r=e.nullable?A:P;break;default:r=N}return 1===arguments.length?r:r(t)}const R=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]),E=new Set(["single","double","esriFieldTypeSingle","esriFieldTypeDouble"]),B=(0,i.SQ)(R,E);function j(e){return null!=e&&B.has(e.type)}function $(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function W(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function z(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function H(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function J(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function Q(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function K(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function Y(e,t){return null===te(e,t)}var X,Z;function ee(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function te(e,t){return null==e||e.nullable&&null===t?null:j(e)&&!function(e,t){const r="string"==typeof e?re(e):e;if(!r)return!1;const s=r.min,i=r.max;return r.isInteger?Number.isInteger(t)&&t>=s&&t<=i:t>=s&&t<=i}(e.type,Number(t))?X.OUT_OF_RANGE:V(e,t)?e.domain?(0,a.O0)(e,t):null:Z.INVALID_TYPE}function re(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return se;case"esriFieldTypeInteger":case"integer":return ie;case"esriFieldTypeBigInteger":case"big-integer":return ae;case"esriFieldTypeSingle":case"single":return ne;case"esriFieldTypeDouble":case"double":return oe}}(X||(X={})).OUT_OF_RANGE="numeric-range-validation-error::out-of-range",function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(Z||(Z={}));const se={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},ie={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},ae={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},ne={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function le(e,t,r){switch(e){case a.Qb.INVALID_CODED_VALUE:return`Value ${r} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case a.Qb.VALUE_OUT_OF_RANGE:return`Value ${r} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case Z.INVALID_TYPE:return`Value ${r} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case X.OUT_OF_RANGE:{const{min:e,max:s}=re(t.type);return`Value ${r} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${s}`}}}function ce(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((t=>e.toLowerCase().startsWith(t)))}},71068:(e,t,r)=>{r.d(t,{O7:()=>o,UB:()=>l,UX:()=>p,Wr:()=>a,iL:()=>n,kZ:()=>u,mK:()=>c});var s=r(47620),i=r(2600);const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function n(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){return("feature"===e?.type||"subtype-group"===e?.type)&&"feature-layer"===e.source?.type}async function c(e,t){const r=s.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const a=e.toLowerCase().indexOf("/rest/services");if(-1===a)return null;const n=`${e.substring(0,a)}/rest/info`,o=null!=t?t.signal:null,{data:l}=await(0,i.c)(n,{query:{f:"json"},responseType:"json",signal:o});return l?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},54872:(e,t,r)=>{r.d(t,{c:()=>U});var s=r(41948),i=r(6220),a=r(47620),n=r(2600),o=r(20744),l=r(40504),c=r(95800),u=r(70680),p=r(10860),d=r(1580),y=r(53368),h=(r(72052),r(9456),r(33600)),m=r(12552),g=r(95247),f=r(89960);let b;var v=r(62504),S=r(30872),q=r(43780);r(66360);let w=class extends q.c{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,s._)([(0,d.qq)()],w.prototype,"nextQueryParams",void 0),(0,s._)([(0,d.qq)()],w.prototype,"queryParams",void 0),(0,s._)([(0,d.qq)()],w.prototype,"results",void 0),(0,s._)([(0,d.qq)()],w.prototype,"total",void 0),w=(0,s._)([(0,m.c)("geoscene.portal.PortalQueryResult")],w);const _=w;var M,T=r(53039),I=r(20572);let L;const O={PortalGroup:()=>Promise.resolve({default:v.c}),PortalItem:()=>Promise.resolve().then(r.bind(r,9764)),PortalUser:()=>Promise.resolve({default:T.c})};let x=M=class extends((0,l.Ib)(c.c)){constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=i.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){k.unregister(this),this.defaultBasemap=(0,u.mG)(this.defaultBasemap),this.defaultDevBasemap=(0,u.mG)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,u.mG)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,u.oR)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const t of e)i.default.request.trustedServers.includes(t)||i.default.request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=this.user?.orgId,t=!e||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.substring(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=T.c.fromJSON(e),t.portal=this),t}load(e){const t=Promise.resolve().then(r.bind(r,72208)).then((({default:t})=>{(0,p.wp)(e),L=t})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e))).then((e=>{if(a.id){const e=a.id;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==M.AUTH_MODE_AUTO&&this.authMode!==M.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",function(e){const t=a.id;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),k.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await Promise.all([r.e(5612),r.e(74),r.e(2968),r.e(8380),r.e(6236)]).then(r.bind(r,47104))).default;return e?e.map((e=>new t({id:e.id,url:e.url}))):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){const s=await this._fetchBasemaps3D(e,t);r.unshift(...s)}return r}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then((e=>e.categorySchema)):(0,p.wv)(e)?Promise.reject((0,p.Uh)()):Promise.resolve([])}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new S.c;if(r.num=100,r.sortField="title",t&&t.length){const s=[];for(const e of t)s.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=s.join(" OR "),this.queryGroups(r,e).then((e=>e.results))}return(0,p.wv)(e)?Promise.reject((0,p.Uh)()):Promise.resolve([])}fetchRegions(e){const t=this.user?.culture||this.culture||(0,f.a8)();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){const t=this.user?.culture||this.culture||(0,f.a8)();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return b&&!b.destroyed||(b=new M),b}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const s=this.restUrl+"/portals/self",i={authMode:e,query:{culture:(0,f.a8)().toLowerCase()},withCredentials:!0,...r};return"auto"===i.authMode&&(i.authMode="no-prompt"),t&&(i.query.default=!0),this.request(s,i)}queryPortal(e,t,r,s){const i=(0,y.ey)(S.c,t),a=t=>this.request(this.restUrl+e,{...i.toRequestOptions(this),...s}).then((e=>{const r=i.clone();return r.start=e.nextStart,new _({nextQueryParams:r,queryParams:i,total:e.total,results:M._resultsToTypedArray(t,{portal:this},e,s)})})).then((e=>Promise.all(e.results.map((t=>"function"==typeof t.when?t.when():e))).then((()=>e),(t=>((0,p.CE)(t),e)))));return r&&O[r]?O[r]().then((({default:e})=>((0,p.wp)(s),a(e)))):a()}signIn(){if(this.authMode===M.AUTH_MODE_ANONYMOUS||this.authMode===M.AUTH_MODE_NO_PROMPT&&!a.id)return Promise.reject(new o.c("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate")))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate")))).then((e=>{e&&(this.sourceJSON=e,this.read(e))}));return a.id?a.id.getCredential(this.restUrl,{prompt:this.authMode!==M.AUTH_MODE_NO_PROMPT}).then((t=>e(t))):e(this.credential)}normalizeUrl(e){const t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then((e=>{const t=M._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map((t=>"function"==typeof t.when?t.when():e))).then((()=>t),(()=>t))}))}request(e,t={}){const r={f:"json",...t.query},{authMode:s=(this.authMode===M.AUTH_MODE_ANONYMOUS||this.authMode===M.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:i=null,cacheBust:a=!1,method:o="auto",responseType:l="json",signal:c}=t,u={authMode:s,body:i,cacheBust:a,method:o,query:r,responseType:l,timeout:0,signal:c};return t.withCredentials&&(u.withCredentials=!0),(0,n.c)(this._normalizeSSL(e),u).then((e=>e.data))}toJSON(){throw new o.c("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new M({sourceJSON:e})}_getHelperService(e){const t=this.helperServices&&this.helperServices[e];if(!t)throw new o.c("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new S.c;r.query=e||(i.default.apiKey&&(0,I.s)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const s=await this.queryGroups(r,t);if(!s.total)return[];const a=s.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=a.sortField||"name",r.sortOrder=a.sortOrder||"desc";const n=await a.queryItems(r,t);return n.total?n.results.filter((e=>"Web Map"===e.type)).map((e=>new L({portalItem:e}))):[]}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];const s=new S.c({query:r,disableExtraQuery:!0}),i=await this.queryGroups(s,t);if(!i.total)return[];const a=i.results[0];s.num=100,s.query='type:"Web Scene"',s.sortField=a.sortField||"name",s.sortOrder=a.sortOrder||"desc";const n=await a.queryItems(s,t);return n.total?n.results.filter((e=>"Web Scene"===e.type)).map((e=>new L({portalItem:e}))):[]}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=L.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,s){let i=[];if(r){const a=null!=s?s.signal:null;i=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(i=i.map((r=>{const s=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof s.load&&s.load(a),s})))}else i=[];return i}};x.AUTH_MODE_ANONYMOUS="anonymous",x.AUTH_MODE_AUTO="auto",x.AUTH_MODE_IMMEDIATE="immediate",x.AUTH_MODE_NO_PROMPT="no-prompt",(0,s._)([(0,d.qq)()],x.prototype,"access",void 0),(0,s._)([(0,d.qq)()],x.prototype,"allSSL",void 0),(0,s._)([(0,d.qq)()],x.prototype,"authMode",void 0),(0,s._)([(0,d.qq)()],x.prototype,"authorizedCrossOriginDomains",void 0),(0,s._)([(0,h.E)("authorizedCrossOriginDomains")],x.prototype,"readAuthorizedCrossOriginDomains",null),(0,s._)([(0,d.qq)()],x.prototype,"basemapGalleryGroupQuery",void 0),(0,s._)([(0,d.qq)({json:{name:"3DBasemapGalleryGroupQuery"}})],x.prototype,"basemapGalleryGroupQuery3D",void 0),(0,s._)([(0,d.qq)()],x.prototype,"bingKey",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canListApps",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canListData",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canListPreProvisionedItems",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canProvisionDirectPurchase",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSearchPublic",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canShareBingPublic",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSharePublic",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSignInArcGIS",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSignInIDP",void 0),(0,s._)([(0,d.qq)()],x.prototype,"colorSetsGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"commentsEnabled",void 0),(0,s._)([(0,d.qq)({type:Date})],x.prototype,"created",void 0),(0,s._)([(0,d.qq)()],x.prototype,"credential",void 0),(0,s._)([(0,d.qq)()],x.prototype,"culture",void 0),(0,s._)([(0,d.qq)()],x.prototype,"currentVersion",void 0),(0,s._)([(0,d.qq)()],x.prototype,"customBaseUrl",void 0),(0,s._)([(0,d.qq)()],x.prototype,"defaultBasemap",void 0),(0,s._)([(0,h.E)("defaultBasemap")],x.prototype,"readDefaultBasemap",null),(0,s._)([(0,d.qq)()],x.prototype,"defaultDevBasemap",void 0),(0,s._)([(0,h.E)("defaultDevBasemap")],x.prototype,"readDefaultDevBasemap",null),(0,s._)([(0,d.qq)({type:g.c})],x.prototype,"defaultExtent",void 0),(0,s._)([(0,d.qq)()],x.prototype,"defaultVectorBasemap",void 0),(0,s._)([(0,h.E)("defaultVectorBasemap")],x.prototype,"readDefaultVectorBasemap",null),(0,s._)([(0,d.qq)()],x.prototype,"description",void 0),(0,s._)([(0,d.qq)()],x.prototype,"devBasemapGalleryGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"eueiEnabled",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"extraQuery",null),(0,s._)([(0,d.qq)()],x.prototype,"featuredGroups",void 0),(0,s._)([(0,d.qq)()],x.prototype,"featuredItemsGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"galleryTemplatesGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"layoutGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"livingAtlasGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"hasCategorySchema",void 0),(0,s._)([(0,d.qq)()],x.prototype,"helpBase",void 0),(0,s._)([(0,d.qq)()],x.prototype,"helperServices",void 0),(0,s._)([(0,d.qq)()],x.prototype,"helpMap",void 0),(0,s._)([(0,d.qq)()],x.prototype,"homePageFeaturedContent",void 0),(0,s._)([(0,d.qq)()],x.prototype,"homePageFeaturedContentCount",void 0),(0,s._)([(0,d.qq)()],x.prototype,"httpPort",void 0),(0,s._)([(0,d.qq)()],x.prototype,"httpsPort",void 0),(0,s._)([(0,d.qq)()],x.prototype,"id",void 0),(0,s._)([(0,d.qq)()],x.prototype,"ipCntryCode",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"isOrganization",null),(0,s._)([(0,d.qq)()],x.prototype,"isPortal",void 0),(0,s._)([(0,d.qq)()],x.prototype,"isReadOnly",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"itemPageUrl",null),(0,s._)([(0,d.qq)()],x.prototype,"layerTemplatesGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"maxTokenExpirationMinutes",void 0),(0,s._)([(0,d.qq)({type:Date})],x.prototype,"modified",void 0),(0,s._)([(0,d.qq)()],x.prototype,"name",void 0),(0,s._)([(0,d.qq)()],x.prototype,"portalHostname",void 0),(0,s._)([(0,d.qq)()],x.prototype,"portalMode",void 0),(0,s._)([(0,d.qq)()],x.prototype,"portalProperties",void 0),(0,s._)([(0,d.qq)()],x.prototype,"region",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"restUrl",null),(0,s._)([(0,d.qq)()],x.prototype,"rotatorPanels",void 0),(0,s._)([(0,d.qq)()],x.prototype,"showHomePageDescription",void 0),(0,s._)([(0,d.qq)()],x.prototype,"sourceJSON",void 0),(0,s._)([(0,d.qq)()],x.prototype,"staticImagesUrl",void 0),(0,s._)([(0,d.qq)({json:{name:"2DStylesGroupQuery"}})],x.prototype,"stylesGroupQuery2d",void 0),(0,s._)([(0,d.qq)({json:{name:"stylesGroupQuery"}})],x.prototype,"stylesGroupQuery3d",void 0),(0,s._)([(0,d.qq)()],x.prototype,"supportsHostedServices",void 0),(0,s._)([(0,d.qq)()],x.prototype,"symbolSetsGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"templatesGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"thumbnail",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,s._)([(0,d.qq)()],x.prototype,"units",void 0),(0,s._)([(0,d.qq)()],x.prototype,"url",void 0),(0,s._)([(0,d.qq)()],x.prototype,"urlKey",void 0),(0,s._)([(0,h.E)("urlKey")],x.prototype,"readUrlKey",null),(0,s._)([(0,d.qq)()],x.prototype,"user",void 0),(0,s._)([(0,h.E)("user")],x.prototype,"readUser",null),(0,s._)([(0,d.qq)()],x.prototype,"use3dBasemaps",void 0),(0,s._)([(0,d.qq)()],x.prototype,"useStandardizedQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"useVectorBasemaps",void 0),(0,s._)([(0,d.qq)()],x.prototype,"vectorBasemapGalleryGroupQuery",void 0),x=M=(0,s._)([(0,m.c)("geoscene.portal.Portal")],x);const U=x,k=new FinalizationRegistry((e=>{e.remove()}))},62504:(e,t,r)=>{r.d(t,{c:()=>d});var s,i=r(41948),a=r(20744),n=r(40504),o=r(1580),l=r(53368),c=(r(72052),r(9456),r(12552)),u=r(30872);let p=s=class extends n.am{constructor(e){super(e),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t&&this.portal?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){const e=this.portal?.restUrl;return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal.request(this.url+"/categorySchema",e).then((t=>{const r=t.categorySchema||[];return r.some((e=>"contentCategorySetsGroupQuery.LivingAtlas"===e.source))?this._fetchCategorySchemaSet("LivingAtlas",e):r}))}fetchMembers(e){return this.portal.request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}toJSON(){throw new a.c("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new s;return t.sourceJSON=e,t.read(e),t}queryItems(e,t){let r=(0,l.ey)(u.c,e);const s=this.portal;return parseFloat(s.currentVersion)>5?(r=r||new u.c,s.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new u.c,r.query="group:"+this.id+(r.query?" "+r.query:""),s.queryItems(r,t))}_fetchCategorySchemaSet(e,t){const r=this.portal;return r.fetchSelf(r.authMode,!0,t).then((e=>{const s=e.contentCategorySetsGroupQuery;if(s){const e=new u.c;return e.disableExtraQuery=!0,e.num=1,e.query=s,r.queryGroups(e,t)}throw new a.c("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const s=r.results[0],i=new u.c;return i.num=1,i.query=`typekeywords:"${e}"`,s.queryItems(i,t)}throw new a.c("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((e=>e.total?e.results[0].fetchData("json",t).then((e=>{const t=e?.categorySchema;return t?.length?t:[]})):[]))}};(0,i._)([(0,o.qq)()],p.prototype,"access",void 0),(0,i._)([(0,o.qq)({type:Date})],p.prototype,"created",void 0),(0,i._)([(0,o.qq)()],p.prototype,"description",void 0),(0,i._)([(0,o.qq)()],p.prototype,"id",void 0),(0,i._)([(0,o.qq)()],p.prototype,"isInvitationOnly",void 0),(0,i._)([(0,o.qq)({type:Date})],p.prototype,"modified",void 0),(0,i._)([(0,o.qq)()],p.prototype,"owner",void 0),(0,i._)([(0,o.qq)()],p.prototype,"portal",void 0),(0,i._)([(0,o.qq)()],p.prototype,"snippet",void 0),(0,i._)([(0,o.qq)()],p.prototype,"sortField",void 0),(0,i._)([(0,o.qq)()],p.prototype,"sortOrder",void 0),(0,i._)([(0,o.qq)()],p.prototype,"sourceJSON",void 0),(0,i._)([(0,o.qq)()],p.prototype,"tags",void 0),(0,i._)([(0,o.qq)()],p.prototype,"thumbnail",void 0),(0,i._)([(0,o.qq)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,i._)([(0,o.qq)()],p.prototype,"title",void 0),(0,i._)([(0,o.qq)({readOnly:!0})],p.prototype,"url",null),p=s=(0,i._)([(0,c.c)("geoscene.portal.PortalGroup")],p);const d=p},9764:(e,t,r)=>{r.r(t),r.d(t,{default:()=>O});var s=r(41948),i=r(24832),a=r(20744),n=r(40504),o=r(62088),l=r(95800),c=r(28176),u=r(1580),p=r(53368),d=r(33600),y=r(12552),h=r(95247),m=r(54872),g=r(43780),f=r(66360),b=r(33392);r(72052),r(9456);let v=class extends g.c{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e?.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){null!=e&&(0,c.ic)(e)?f.c.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const r=this.cdnUrl;if(null==r)throw new a.c("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(r,{responseType:e,query:{token:this.portalItem.apiKey},signal:t?.signal})}async update(e,t){const{addOrUpdateResources:s}=await r.e(8240).then(r.bind(r,38240));return await s(this.portalItem,[{resource:this,content:e,compress:t?.compress,access:t?.access}],"update",t),this}hasPath(){return null!=this.path}_normalizePath(e,t){return null==e?e:(e=e.replace(/^\/+/,""),null!=t&&(0,c.ic)(e)&&(e=(0,c.SU)(e,t.itemUrl)),e?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,s._)([(0,u.qq)()],v.prototype,"portalItem",void 0),(0,s._)([(0,u.qq)({type:String,value:null})],v.prototype,"path",null),(0,s._)([(0,b.W)("path")],v.prototype,"_castPath",null),(0,s._)([(0,u.qq)({type:String,readOnly:!0})],v.prototype,"url",null),(0,s._)([(0,u.qq)({type:String,readOnly:!0})],v.prototype,"cdnUrl",null),(0,s._)([(0,u.qq)({type:String,readOnly:!0})],v.prototype,"itemRelativeUrl",null),v=(0,s._)([(0,y.c)("geoscene.portal.PortalItemResource")],v);const S=v;let q=class extends g.c{constructor(e){super(e),this.created=null,this.rating=null}};(0,s._)([(0,u.qq)()],q.prototype,"created",void 0),(0,s._)([(0,u.qq)()],q.prototype,"rating",void 0),q=(0,s._)([(0,y.c)("geoscene.portal.PortalRating")],q);const w=q;var _,M=r(91952);const T=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Map Service","Media Layer","Scene Service","Stream Service","Vector Tile Service","WFS","WMS","WMTS"]),I=new Set(["KML","GeoJson","CSV"]);let L=_=class extends((0,n.Ib)(l.c)){static from(e){return(0,p.uY)(_,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let r=e;return"Feature Service"===e||"Feature Collection"===e?r=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?r=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?r="Scene Layer":"Video Service"===e?r="Video Layer":"Scene Package"===e?r="Scene Layer Package":"Stream Service"===e?r="Feature Layer":"Geoprocessing Service"===e?r=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?r="GeoEnrichment Service":"Geocoding Service"===e?r="Locator":"Microsoft Powerpoint"===e?r="Microsoft PowerPoint":"GeoJson"===e?r="GeoJSON":"Globe Service"===e?r="Globe Layer":"Vector Tile Service"===e?r="Tile Layer":"netCDF"===e?r="NetCDF":"Map Service"===e?r=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e&&e.toLowerCase().includes("add in")?r=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?r="Big Data File Share":"Compact Tile Package"===e?r="Tile Package (tpkx)":"Raster function template"===e?r="Raster Function Template":"OGCFeatureServer"===e?r="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?r="Instant App":"Insights Page"===e?r="Insights Report":"Excalibur Imagery Project"===e?r="Excalibur Project":"3DTiles Service"===e?r="3D tiles layer":"3DTiles Package"===e&&(r="3D tiles package"),r}readExtent(e){return e&&e.length?new h.c(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",t=this.typeKeywords||[];let r,s=!1,a=!1,n=!1,o=!1,l=!1,c=!1,u=!1,p=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(s=t.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(a=t.includes("Table"),n=t.includes("Route Layer"),o=t.includes("Markup"),l=t.includes("Spatiotemporal"),c=t.includes("UtilityNetwork"),r=l&&a?"spatiotemporaltable":a?"table":n?"routelayer":o?"markup":l?"spatiotemporal":c?"utilitynetwork":s?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(l=t.includes("Spatiotemporal"),u=t.includes("Relational"),r=l||u?"mapimages":s||t.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):r="scene service"===e?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?t.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?t.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?t.includes("3DObject")?"3dobjecttileslayer":t.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?r="maps":"web scene"===e?r=t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.includes("configurableApp")?r="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?r="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.includes("ArcGIS Pro")||"explorer map"===e&&t.indexOf("Explorer Document")?r="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?r="datafiles":"360 vr experience"===e?r="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?r="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?r="addindesktop":"pdf"===e?r="pdf":"microsoft word"===e?r="word":"microsoft excel"===e?r="excel":"microsoft powerpoint"===e?r="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&t.includes("Explorer Mapping Application")||t.includes("Document")?r="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?r="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?r="layersgray":"scene package"===e?r="scenepackage":"3dtiles package"===e?r="3dtileslayerpackage":"3dtiles service"===e?r="3dtileslayer":"mobile scene package"===e?r="mobilescenepackage":"tile package"===e||"compact tile package"===e?r="tilepackage":"task file"===e?r="taskfile":"report template"===e?r="report-template":"statistical data collection"===e?r="statisticaldatacollection":"insights workbook"===e?r="workbook":"insights model"===e?r="insightsmodel":"insights page"===e?r="insightspage":"insights theme"===e?r="insightstheme":"hub initiative"===e?r="hubinitiative":"hub page"===e?r="hubpage":"hub site application"===e?r="hubsite":"hub event"===e?r="hubevent":"hub project"===e?r="hubproject":"relational database connection"===e?r="relationaldatabaseconnection":"big data file share"===e?r="datastorecollection":"image collection"===e?r="imagecollection":"desktop style"===e?r="desktopstyle":"style"===e?r="style":"dashboard"===e?r="dashboard":"raster function template"===e?r="rasterprocessingtemplate":"vector tile package"===e?r="vectortilepackage":"ortho mapping project"===e?r="orthomappingproject":"ortho mapping template"===e?r="orthomappingtemplate":"solution"===e?r="solutions":"geopackage"===e?r="geopackage":"deep learning package"===e?r="deeplearningpackage":"real time analytic"===e?r="realtimeanalytics":"big data analytic"===e?r="bigdataanalytics":"feed"===e?r="feed":"excalibur imagery project"===e?r="excaliburimageryproject":"notebook"===e?r="notebook":"storymap"===e?r="storymap":"survey123 add in"===e?r="survey123addin":"mission"===e?r="mission":"mission report"===e?r="missionreport":"mission template"===e?r="missiontemplate":"quickcapture project"===e?r="quickcaptureproject":"pro report"===e?r="proreport":"pro report template"===e?r="proreporttemplate":"urban model"===e?r="urbanmodel":"web experience"===e?r="experiencebuilder":"web experience template"===e?r="webexperiencetemplate":"experience builder widget"===e?r="experiencebuilderwidget":"experience builder widget package"===e?r="experiencebuilderwidgetpackage":"workflow"===e?r="workflow":"kernel gateway connection"===e?r="kernelgatewayconnection":"insights script"===e?r="insightsscript":"hub initiative template"===e?r="hubinitiativetemplate":"storymap theme"===e?r="storymaptheme":"knowledge graph"===e?r="knowledgegraph":"knowledge studio project"===e?r="knowledgestudio":"native application"===e?r="nativeapp":"native application installer"===e?r="nativeappinstaller":"web link chart"===e?r="linkchart":"knowledge graph web investigation"===e?r="investigation":"ogcfeatureserver"===e?r="features":"pro project"===e?r="proproject":"insights workbook package"===e?r="insightsworkbookpackage":"apache parquet"===e?r="apacheparquet":"notebook code snippets"===e||"notebook code snippet library"===e?r="notebookcodesnippets":"suitability model"===e?r="suitabilitymodel":"esri classifier definition"===e?r="classifierdefinition":"esri classification schema"===e?r="classificationschema":"insights data engineering workbook"===e?r="dataengineeringworkbook":"insights data engineering model"===e?r="dataengineeringmodel":"deep learning studio project"===e?r="deeplearningproject":"discussion"===e?r="discussion":"allsource project"===e?r="allsourceproject":"api key"===e?r="apikey":"data pipeline"===e?r="datapipelines":"group layer"===e?(p=t.includes("Map"),r=p?"layergroup2d":"layergroup"):r="media layer"===e?"onlinemedialayer":"form"===e?t.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"maps",r?(0,i.O)("geoscene/images/portal/"+r+"16.png"):null}get isLayer(){return null!=this.type&&T.has(this.type)}get itemCdnUrl(){return(0,M.a)(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.username;return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){const t=this.portal??(this.portal=m.c.getDefault()),r=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(r),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof w&&(e=e.rating),null==e||isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new w({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,o.ct)(this.applicationProxies),avgRating:this.avgRating,categories:(0,o.ct)(this.categories),created:(0,o.ct)(this.created),culture:this.culture,description:this.description,extent:(0,o.ct)(this.extent),groupCategories:(0,o.ct)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,o.ct)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,o.ct)(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,o.ct)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,o.ct)(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new _({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new w(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},_)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e?.data,r={method:"post"};r.query=this.createPostQuery();for(const e in r.query)null===r.query[e]&&(r.query[e]="");return r.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?r.query.text=t:"object"==typeof t&&(r.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,r).then((()=>this.reload()))})):Promise.reject(new a.c("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new a.c("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:s,folder:i,tags:n,title:o}=e||{},l={method:"post",query:{copyPrivateResources:"all"===s,folder:"string"==typeof i?i:i?.id,includeResources:!!s,tags:n?.join(","),title:o}},{itemId:c}=await t.request(`${r}/copy`,l);return new _({id:c,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,r=e.filename,s={method:"post"};if("string"==typeof t)(0,c.o9)(t)?s.query={data:t}:s.query={url:(0,c.WM)(t)},null!=r&&(s.query.filename=r);else{const e=new FormData;null!=r?e.append("file",t,r):e.append("file",t),s.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,s).then((()=>this.reload()))})):Promise.reject(new a.c("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:s}=await r.e(8240).then(r.bind(r,38240));return s(this,e,t)}async addResource(e,t,s){const{addOrUpdateResources:i}=await r.e(8240).then(r.bind(r,38240));return e.portalItem=this,await i(this,[{resource:e,content:t,compress:s?.compress,access:s?.access}],"add",s),e}async removeResource(e,t){const{removeResource:s}=await r.e(8240).then(r.bind(r,38240));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new a.c("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return s(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await r.e(8240).then(r.bind(r,38240));return t(this,e)}resourceFromPath(e){return new S({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:(0,o.ct)(this.categories),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,o.ct)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,o.ct)(this.typeKeywords),url:this.url};return(0,o.MV)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,s._)([(0,u.qq)({type:["private","shared","org","public"]})],L.prototype,"access",void 0),(0,s._)([(0,u.qq)()],L.prototype,"accessInformation",void 0),(0,s._)([(0,u.qq)({type:String})],L.prototype,"apiKey",void 0),(0,s._)([(0,u.qq)({json:{read:{source:"appProxies"}}})],L.prototype,"applicationProxies",void 0),(0,s._)([(0,u.qq)()],L.prototype,"avgRating",void 0),(0,s._)([(0,u.qq)()],L.prototype,"categories",void 0),(0,s._)([(0,u.qq)({type:Date})],L.prototype,"created",void 0),(0,s._)([(0,u.qq)()],L.prototype,"culture",void 0),(0,s._)([(0,u.qq)()],L.prototype,"description",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"displayName",null),(0,s._)([(0,u.qq)({type:h.c})],L.prototype,"extent",void 0),(0,s._)([(0,d.E)("extent")],L.prototype,"readExtent",null),(0,s._)([(0,u.qq)()],L.prototype,"groupCategories",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"iconUrl",null),(0,s._)([(0,u.qq)()],L.prototype,"id",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"isLayer",null),(0,s._)([(0,u.qq)({type:Boolean,readOnly:!0})],L.prototype,"isOrgItem",void 0),(0,s._)([(0,u.qq)()],L.prototype,"itemControl",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"itemPageUrl",null),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"itemUrl",null),(0,s._)([(0,u.qq)()],L.prototype,"licenseInfo",void 0),(0,s._)([(0,u.qq)({type:Date})],L.prototype,"modified",void 0),(0,s._)([(0,u.qq)()],L.prototype,"name",void 0),(0,s._)([(0,u.qq)()],L.prototype,"numComments",void 0),(0,s._)([(0,u.qq)()],L.prototype,"numRatings",void 0),(0,s._)([(0,u.qq)()],L.prototype,"numViews",void 0),(0,s._)([(0,u.qq)()],L.prototype,"owner",void 0),(0,s._)([(0,u.qq)()],L.prototype,"ownerFolder",void 0),(0,s._)([(0,u.qq)({type:m.c})],L.prototype,"portal",void 0),(0,s._)([(0,u.qq)()],L.prototype,"screenshots",void 0),(0,s._)([(0,u.qq)()],L.prototype,"size",void 0),(0,s._)([(0,u.qq)()],L.prototype,"snippet",void 0),(0,s._)([(0,u.qq)()],L.prototype,"sourceJSON",void 0),(0,s._)([(0,u.qq)({type:String})],L.prototype,"sourceUrl",void 0),(0,s._)([(0,u.qq)({type:String})],L.prototype,"spatialReference",void 0),(0,s._)([(0,u.qq)()],L.prototype,"tags",void 0),(0,s._)([(0,u.qq)()],L.prototype,"thumbnail",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"thumbnailUrl",null),(0,s._)([(0,u.qq)()],L.prototype,"title",void 0),(0,s._)([(0,u.qq)()],L.prototype,"type",void 0),(0,s._)([(0,u.qq)()],L.prototype,"typeKeywords",void 0),(0,s._)([(0,u.qq)({type:String,json:{read(e,t){if(I.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],L.prototype,"url",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"userItemUrl",null),L=_=(0,s._)([(0,y.c)("geoscene.portal.PortalItem")],L);const O=L},30872:(e,t,r)=>{r.d(t,{c:()=>m});var s,i=r(41948),a=r(43780),n=r(14628),o=r(62088),l=r(1580),c=(r(9456),r(66360),r(12552)),u=r(95247),p=r(56156),d=r(29120);const y=new n.O({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let h=s=class extends a.c{constructor(e){super(e),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(e){"asc"!==e&&"desc"!==e||this._set("sortOrder",e)}clone(){return new s({categories:this.categories?(0,o.ct)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(e,t){let r=[];this.categories&&(r=this.categories.map((e=>Array.isArray(e)?JSON.stringify(e):e)));let s="";if(this.extent){const e=(0,d.yU)(this.extent,p.c.WGS84);null!=e&&(s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`)}let i=this.query;!this.disableExtraQuery&&e.extraQuery&&(i="("+i+")"+e.extraQuery);const a={categories:r,bbox:s,q:i,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(a.sortField=this.sortField.split(",").map((e=>y.toJSON(e.trim()))).join(","),a.sortOrder=this.sortOrder),{query:{...t,...a}}}};(0,i._)([(0,l.qq)()],h.prototype,"categories",void 0),(0,i._)([(0,l.qq)()],h.prototype,"disableExtraQuery",void 0),(0,i._)([(0,l.qq)({type:u.c})],h.prototype,"extent",void 0),(0,i._)([(0,l.qq)()],h.prototype,"filter",void 0),(0,i._)([(0,l.qq)()],h.prototype,"num",void 0),(0,i._)([(0,l.qq)()],h.prototype,"query",void 0),(0,i._)([(0,l.qq)()],h.prototype,"sortField",void 0),(0,i._)([(0,l.qq)()],h.prototype,"sortOrder",null),(0,i._)([(0,l.qq)()],h.prototype,"start",void 0),h=s=(0,i._)([(0,c.c)("geoscene.portal.PortalQueryParams")],h);const m=h},53039:(e,t,r)=>{r.d(t,{c:()=>y});var s=r(41948),i=r(20744),a=r(40504),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));let l=class extends a.am{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const e=this.portal?.restUrl;return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new i.c("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,s._)([(0,n.qq)({type:Date})],l.prototype,"created",void 0),(0,s._)([(0,n.qq)()],l.prototype,"id",void 0),(0,s._)([(0,n.qq)()],l.prototype,"portal",void 0),(0,s._)([(0,n.qq)()],l.prototype,"title",void 0),(0,s._)([(0,n.qq)({readOnly:!0})],l.prototype,"url",null),(0,s._)([(0,n.qq)()],l.prototype,"username",void 0),l=(0,s._)([(0,o.c)("geoscene.portal.PortalFolder")],l);const c=l;var u,p=r(62504);let d=u=class extends a.am{constructor(...e){super(...e),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal.normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){const e=this.portal?.restUrl;return e?`${e}/content/users/${this.username}`:null}get url(){const e=this.portal?.restUrl;return e?`${e}/community/users/${this.username}`:null}addItem(e){const t=e&&e.item,r=e?.data,s=e?.folder,i={method:"post"};t&&(i.query=t.createPostQuery(),null!=r&&("string"==typeof r?i.query.text=r:"object"==typeof r&&(i.query.text=JSON.stringify(r))));let a=this.userContentUrl;return s&&(a+="/"+("string"==typeof s?s:s.id)),this.portal.request(a+"/addItem",i).then((e=>(t.id=e.id,t.portal=this.portal,t.loaded?t.reload():t.load())))}deleteItem(e){let t=this.userContentUrl;return e.ownerFolder&&(t+="/"+e.ownerFolder),this.portal.request(t+`/items/${e.id}/delete`,{method:"post"}).then((()=>{e.id=null,e.portal=null}))}deleteItems(e){const t=this.userContentUrl+"/deleteItems",r=e.map((e=>e.id));if(r.length){const s={method:"post",query:{items:r.join(",")}};return this.portal.request(t,s).then((()=>{e.forEach((e=>{e.id=null,e.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((e=>{let t;return t=e&&e.folders?e.folders.map((e=>{const t=c.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchGroups(){return this.portal.request(this.url??"").then((e=>{let t;return t=e&&e.groups?e.groups.map((e=>{const t=p.c.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchItems(e){const t=e??{};let s,i=this.userContentUrl??"";return t.folder&&(i+="/"+t.folder.id),Promise.resolve().then(r.bind(r,9764)).then((({default:e})=>{s=e;const r={folders:!1,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"};return this.portal.request(i,{query:r})})).then((e=>{let t;return e?.items?(t=e.items.map((e=>{const t=s.fromJSON(e);return t.portal=this.portal,t})),Promise.all(t.map((e=>e.load()))).catch((e=>e)).then((()=>({items:t,nextStart:e.nextStart,total:e.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((e=>e.tags))}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}queryFavorites(e){return this.favGroupId?(this._favGroup||(this._favGroup=new p.c({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(e)):Promise.reject(new i.c("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new i.c("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new u;return t.sourceJSON=e,t.read(e),t}};(0,s._)([(0,n.qq)()],d.prototype,"access",void 0),(0,s._)([(0,n.qq)({type:Date})],d.prototype,"created",void 0),(0,s._)([(0,n.qq)()],d.prototype,"culture",void 0),(0,s._)([(0,n.qq)()],d.prototype,"description",void 0),(0,s._)([(0,n.qq)()],d.prototype,"email",void 0),(0,s._)([(0,n.qq)()],d.prototype,"favGroupId",void 0),(0,s._)([(0,n.qq)()],d.prototype,"fullName",void 0),(0,s._)([(0,n.qq)({type:Date})],d.prototype,"modified",void 0),(0,s._)([(0,n.qq)()],d.prototype,"orgId",void 0),(0,s._)([(0,n.qq)()],d.prototype,"portal",void 0),(0,s._)([(0,n.qq)()],d.prototype,"preferredView",void 0),(0,s._)([(0,n.qq)()],d.prototype,"privileges",void 0),(0,s._)([(0,n.qq)()],d.prototype,"region",void 0),(0,s._)([(0,n.qq)()],d.prototype,"role",void 0),(0,s._)([(0,n.qq)()],d.prototype,"roleId",void 0),(0,s._)([(0,n.qq)()],d.prototype,"sourceJSON",void 0),(0,s._)([(0,n.qq)()],d.prototype,"thumbnail",void 0),(0,s._)([(0,n.qq)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,s._)([(0,n.qq)()],d.prototype,"units",void 0),(0,s._)([(0,n.qq)({readOnly:!0})],d.prototype,"userContentUrl",null),(0,s._)([(0,n.qq)({readOnly:!0})],d.prototype,"url",null),(0,s._)([(0,n.qq)()],d.prototype,"username",void 0),(0,s._)([(0,n.qq)()],d.prototype,"userType",void 0),d=u=(0,s._)([(0,o.c)("geoscene.portal.PortalUser")],d);const y=d},41680:(e,t,r)=>{r.d(t,{CO:()=>o,Mn:()=>a,Mz:()=>n,ai:()=>i,eU:()=>l}),r(53648);var s=r(50144);r(74784),r(37008);const i=2.4;function a(e){return(0,s.WM)(e*i)}function n(e){return(0,s.im)(e)/i}function o(e,t,r){const s=Math.sqrt(e**2+t**2)/r;return s>1?0:3/(Math.PI*r**2)*(1-s**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},88352:(e,t,r)=>{r.d(t,{c:()=>d});var s=r(41948),i=r(14628),a=r(40504),n=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),l=r(12552);const c=new i.O({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new i.O({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let p=class extends a.am{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,s._)([(0,o.G)({classBreaksDef:"class-breaks-definition"})],p.prototype,"type",void 0),(0,s._)([(0,n.qq)({json:{write:!0}})],p.prototype,"breakCount",void 0),(0,s._)([(0,n.qq)({json:{write:!0}})],p.prototype,"classificationField",void 0),(0,s._)([(0,n.qq)({type:String,json:{read:c.read,write:c.write}})],p.prototype,"classificationMethod",void 0),(0,s._)([(0,n.qq)({json:{write:!0}})],p.prototype,"normalizationField",void 0),(0,s._)([(0,n.qq)({json:{read:u.read,write:u.write}})],p.prototype,"normalizationType",void 0),(0,s._)([(0,n.qq)({value:null,json:{write:!0}})],p.prototype,"standardDeviationInterval",null),(0,s._)([(0,n.qq)({value:null,json:{write:!0}})],p.prototype,"definedInterval",null),p=(0,s._)([(0,l.c)("geoscene.rest.support.ClassBreaksDefinition")],p);const d=p},19184:(e,t,r)=>{r.d(t,{W:()=>n});var s=r(66360);const i=()=>s.c.getLogger("geoscene.rest.support.generateRendererUtils");function a(e,t){return Number(e.toFixed(t))}function n(e){const{normalizationTotal:t}=e;return{classBreaks:o(e),normalizationTotal:t}}function o(e){const t=e.definition,{classificationMethod:r,normalizationType:s,definedInterval:i}=t,n=t.breakCount??1,o=[];let u=e.values;if(0===u.length)return[];u=u.sort(((e,t)=>e-t));const p=u[0],d=u[u.length-1];if("equal-interval"===r)if(u.length>=n){const e=(d-p)/n;let t=p;for(let r=1;r<n;r++){const i=a(p+r*e,6);o.push({minValue:t,maxValue:i,label:l(t,i,s)}),t=i}o.push({minValue:t,maxValue:d,label:l(t,d,s)})}else u.forEach((e=>{o.push({minValue:e,maxValue:e,label:l(e,e,s)})}));else if("natural-breaks"===r){const t=function(e){const t=[],r=[];let s=Number.MIN_VALUE,i=1,a=-1;for(let n=0;n<e.length;n++){const o=e[n];o===s?(i++,r[a]=i):null!==o&&(t.push(o),s=o,i=1,r.push(i),a++)}return{uniqueValues:t,valueFrequency:r}}(u),r=e.valueFrequency||t.valueFrequency,i=c(t.uniqueValues,r,n);let y=p;for(let e=1;e<n;e++)if(t.uniqueValues.length>e){const r=a(t.uniqueValues[i[e]],6);o.push({minValue:y,maxValue:r,label:l(y,r,s)}),y=r}o.push({minValue:y,maxValue:d,label:l(y,d,s)})}else if("quantile"===r)if(u.length>=n&&p!==d){let e=p,t=Math.ceil(u.length/n),r=0;for(let i=1;i<n;i++){let a=t+r-1;a>u.length&&(a=u.length-1),a<0&&(a=0),o.push({minValue:e,maxValue:u[a],label:l(e,u[a],s)}),e=u[a],r+=t,t=Math.ceil((u.length-r)/(n-i))}o.push({minValue:e,maxValue:d,label:l(e,d,s)})}else{let e=-1;for(let t=0;t<u.length;t++){const r=u[t];r!==e&&(e=r,o.push({minValue:e,maxValue:r,label:l(e,r,s)}),e=r)}}else if("standard-deviation"===r){const e=function(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t/=e.length,t}(u),t=function(e,t){let r=0;for(let s=0;s<e.length;s++){const i=e[s];r+=(i-t)*(i-t)}return r/=e.length,Math.sqrt(r)}(u,e);if(0===t)o.push({minValue:u[0],maxValue:u[0],label:l(u[0],u[0],s)});else{const r=function(e,t,r,s,i){let a=Math.max(s-e,t-s)/i/r;return a=a>=1?1:a>=.5?.5:.25,a}(p,d,n,e,t)*t;let i=0,c=p;for(let t=n;t>=1;t--){const n=a(e-(t-.5)*r,6);o.push({minValue:c,maxValue:n,label:l(c,n,s)}),c=n,i++}let u=a(e+.5*r,6);o.push({minValue:c,maxValue:u,label:l(c,u,s)}),c=u,i++;for(let t=1;t<=n;t++)u=i===2*n?d:a(e+(t+.5)*r,6),o.push({minValue:c,maxValue:u,label:l(c,u,s)}),c=u,i++}}else if("defined-interval"===r){if(!i)return o;const e=u[0],t=u[u.length-1],r=Math.ceil((t-e)/i);let n=e;for(let t=1;t<r;t++){const r=a(e+t*i,6);o.push({minValue:n,maxValue:r,label:l(n,r,s)}),n=r}o.push({minValue:n,maxValue:t,label:l(n,t,s)})}return o}function l(e,t,r){let s=null;return s=e===t?r&&"percent-of-total"===r?e+"%":e.toString():r&&"percent-of-total"===r?e+"% - "+t+"%":e+" - "+t,s}function c(e,t,r){const s=e.length,i=[];r>s&&(r=s);for(let e=0;e<r;e++)i.push(Math.round(e*s/r-1));i.push(s-1);let a=u(i,e,t,r);return function(e,t,r,s,i,a){let n=0,o=0,l=0,c=0,u=!0;for(let d=0;d<2&&u;d++){0===d&&(u=!1);for(let d=0;d<a-1;d++)for(;r[d+1]+1!==r[d+2];){r[d+1]=r[d+1]+1;const a=p(d,r,s,i);l=a.sbMean,n=a.sbSdcm;const y=p(d+1,r,s,i);if(c=y.sbMean,o=y.sbSdcm,!(n+o<t[d]+t[d+1])){r[d+1]=r[d+1]-1;break}t[d]=n,t[d+1]=o,e[d]=l,e[d+1]=c,u=!0}for(let d=a-1;d>0;d--)for(;r[d]!==r[d-1]+1;){r[d]=r[d]-1;const a=p(d-1,r,s,i);l=a.sbMean,n=a.sbSdcm;const y=p(d,r,s,i);if(c=y.sbMean,o=y.sbSdcm,!(n+o<t[d-1]+t[d])){r[d]=r[d]+1;break}t[d-1]=n,t[d]=o,e[d-1]=l,e[d]=c,u=!0}}return u}(a.mean,a.sdcm,i,e,t,r)&&(a=u(i,e,t,r)),i}function u(e,t,r,s){let i=[],a=[],n=[],o=0;const l=[],c=[];for(let i=0;i<s;i++){const s=p(i,e,t,r);l.push(s.sbMean),c.push(s.sbSdcm),o+=c[i]}let u,d=o,y=!0;for(;y||o<d;){y=!1,i=[];for(let t=0;t<s;t++)i.push(e[t]);for(let r=0;r<s;r++)for(let i=e[r]+1;i<=e[r+1];i++)if(u=t[i],r>0&&i!==e[r+1]&&Math.abs(u-l[r])>Math.abs(u-l[r-1]))e[r]=i;else if(r<s-1&&e[r]!==i-1&&Math.abs(u-l[r])>Math.abs(u-l[r+1])){e[r+1]=i-1;break}d=o,o=0,a=[],n=[];for(let i=0;i<s;i++){a.push(l[i]),n.push(c[i]);const s=p(i,e,t,r);l[i]=s.sbMean,c[i]=s.sbSdcm,o+=c[i]}}if(o>d){for(let t=0;t<s;t++)e[t]=i[t],l[t]=a[t],c[t]=n[t];o=d}return{mean:l,sdcm:c}}function p(e,t,r,s){let a=0,n=0;for(let i=t[e]+1;i<=t[e+1];i++){const e=s[i];a+=r[i]*e,n+=e}n<=0&&i().warn("Exception in Natural Breaks calculation");const o=a/n;let l=0;for(let i=t[e]+1;i<=t[e+1];i++)l+=s[i]*(r[i]-o)**2;return{sbMean:o,sbSdcm:l}}},41664:(e,t,r)=>{r.d(t,{yI:()=>g,GY:()=>b,Gu:()=>m,Mr:()=>f}),r(60708),r(20744);var s=r(50144),i=r(94360),a=r(56156),n=r(42736),o=r(60544),l=r(564),c=r(41680),u=(r(47828),r(6384));r(72208),r(6220),r(2952),r(66360),r(28176),r(53368),r(14644),r(21320),r(28484),new Set(["integer","small-integer"]);var p=r(76160),d=r(67776);let y=null;const h=/^(?<hh>([0-1][0-9])|([2][0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?([.](?<ms>\d+))?$/;function m(e,t,r,s){const i=(0,o.G4)(r)?(0,o.Nq)(r):null,a=i?Math.round((i.valid[1]-i.valid[0])/t.scale[0]):null;return e.map((e=>{const r=new d.c(e.geometry);return(0,n.QL)(t,r,r,r.hasZ,r.hasM),e.geometry=i?function(e,t,r){return e.x<0?e.x+=t:e.x>r&&(e.x-=t),e}(r,a??0,s[0]):r,e}))}function g(e,t=18,r,i,a){const n=new Float64Array(i*a);t=Math.round((0,s.im)(t));let o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;const u=(0,c.eU)(r);for(const{geometry:r,attributes:s}of e){const{x:e,y:p}=r,d=Math.max(0,e-t),y=Math.max(0,p-t),h=Math.min(a,p+t),m=Math.min(i,e+t),g=+u(s);for(let r=y;r<h;r++)for(let s=d;s<m;s++){const a=r*i+s,u=(0,c.CO)(s-e,r-p,t)*g,d=n[a]+=u;o=Math.min(o,d),l=Math.max(l,d)}}return{min:o,max:l}}function f(e){const t=h.exec(e);if(!t)return null;const{hh:r,mm:s,ss:a,ms:n}=t.groups;return Number(r)*i.iC.hours+Number(s)*i.iC.minutes+Number(a)*i.iC.seconds+Number(n||0)}async function b(e,t,r=!0){if(!t)return[];const{field:s,field2:i,field3:n,fieldDelimiter:o,fieldInfos:c,timeZone:d}=e,h=s&&c?.find((e=>e.name.toLowerCase()===s.toLowerCase())),m=!!h&&(0,l.eM)(h),g=!!h&&function(e){return(0,l.gp)(e)||(0,l.yM)(e)||(0,l.Oo)(e)}(h),b=e.valueExpression,v=e.normalizationType,S=e.normalizationField,q=e.normalizationTotal,w=[],_=e.viewInfoParams;let M=null,T=null;if(b){if(!y){const{arcadeUtils:e}=await(0,u.uK)();y=e}y.hasGeometryOperations(b)&&await y.enableGeometryOperations(),M=y.createFunction(b),T=_?y.getViewInfo({viewingMode:_.viewingMode,scale:_.scale,spatialReference:new a.c(_.spatialReference)}):null}const I=e.fieldInfos,L=t[0]&&"declaredClass"in t[0]&&"geoscene.Graphic"===t[0].declaredClass||!I?null:{fields:I};return t.forEach((e=>{const t=e.attributes;let a;if(b){const t=L?{...e,layer:L}:e,r=y.createExecContext(t,T,d);a=y.executeFunction(M,r)}else t&&(a=t[s],i?(a=`${(0,p.O6)(a)}${o}${(0,p.O6)(t[i])}`,n&&(a=`${a}${o}${(0,p.O6)(t[n])}`)):"string"==typeof a&&r&&(g?a=a?new Date(a).getTime():null:m&&(a=a?f(a):null)));if(v&&"number"==typeof a&&isFinite(a)){const e=t&&parseFloat(t[S]);a=(0,p.m2)(a,v,e,q)}w.push(a)})),w}},76160:(e,t,r)=>{r.d(t,{GE:()=>b,ID:()=>D,O6:()=>h,Oq:()=>k,Qv:()=>g,UP:()=>V,cJ:()=>N,hU:()=>f,m2:()=>C,o9:()=>G,rZ:()=>v,uu:()=>m,wj:()=>P});var s=r(88352),i=r(19184);const a="<Null>",n="equal-interval",o=1,l=5,c=10,u=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,p=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),d=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),y=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function h(e){return null==e||"string"==typeof e&&!e?a:e}function m(e){const t=null!=e.normalizationField||null!=e.normalizationType,r=null!=e.minValue||null!=e.maxValue,s=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!r&&!s}function g(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,r=t.filter((e=>null!=e)).sort(),s=r.length,i={count:s,min:r[0],max:r[s-1]};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=b(t,e.percentileParams)),i}function f(e){const{values:t,useSampleStdDev:r,supportsNullCount:s}=e;let i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,n=null,o=null,l=null,c=null,u=0;const p=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=p&&e<=d&&(n=null===n?e:n+e,i=Math.min(i,e),a=Math.max(a,e),u++):"string"==typeof e&&u++;if(u&&null!=n){o=n/u;let e=0;for(const r of t)Number.isFinite(r)&&r>=p&&r<=d&&(e+=(r-o)**2);c=r?u>1?e/(u-1):0:u>0?e/u:0,l=Math.sqrt(c)}else i=null,a=null;const y={avg:o,count:u,max:a,min:i,stddev:l,sum:n,variance:c};return s&&(y.nullcount=t.length-u),e.percentileParams&&(y.median=b(t,e.percentileParams)),y}function b(e,t){const{fieldType:r,value:s,orderBy:i,isDiscrete:a}=t,n=v(r,"desc"===i);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>n(e,t)))).length)return null;if(s<=0)return e[0];if(s>=1)return e[e.length-1];const o=(e.length-1)*s,l=Math.floor(o),c=l+1,u=o%1,p=e[l],d=e[c];return c>=e.length||a||"string"==typeof p||"string"==typeof d?p:p*(1-u)+d*u}function v(e,t){if(e){if(p.has(e))return x(t);if(d.has(e))return I(t,!1);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?_:w}(t);const r=I(t,!0);if("esriFieldTypeString"===e)return r;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>r(U(e),U(t))}const r=t?1:-1,s=x(t),i=I(t,!0);return(e,t)=>"number"==typeof e&&"number"==typeof t?s(e,t):"string"==typeof e&&"string"==typeof t?i(e,t):r}const S=(e,t)=>null==e?null==t?0:1:null==t?-1:null,q=(e,t)=>null==e?null==t?0:-1:null==t?1:null,w=(e,t)=>q(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),_=(e,t)=>S(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),M=(e,t)=>q(e,t)??(e===t?0:e<t?-1:1),T=(e,t)=>S(e,t)??(e===t?0:e<t?1:-1);function I(e,t){if(!t)return e?T:M;const r=function(e){return e?S:q}(e);return e?(e,t)=>{const s=r(e,t);return null!=s?s:(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0}:(e,t)=>{const s=r(e,t);return null!=s?s:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}}const L=(e,t)=>S(e,t)??t-e,O=(e,t)=>q(e,t)??e-t;function x(e){return e?L:O}function U(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function k(e,t){let r;for(r in e)y.includes(r)&&(Number.isFinite(e[r])||(e[r]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))})),e):e}function G(e){const t={};for(let r of e)(null==r||"string"==typeof r&&""===r.trim())&&(r=null),null==t[r]?t[r]={count:1,data:r}:t[r].count++;return{count:t}}function F(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function D(e,t,r,s){const i=e.count,a=[];if(r&&t){const e=[],r=F(t[0]);for(const i of r)if(t[1]){const r=F(t[1]);for(const a of r)if(t[2]){const r=F(t[2]);for(const t of r)e.push(`${h(i)}${s}${h(a)}${s}${h(t)}`)}else e.push(`${h(i)}${s}${h(a)}`)}else e.push(i);for(const t of e)i.hasOwnProperty(t)||(i[t]={data:t,count:0})}for(const e in i){const t=i[e];a.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:a}}function C(e,t,r,s){let i=null;switch(t){case"log":0!==e&&(i=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(s)&&0!==s&&(i=e/s*100);break;case"field":Number.isFinite(r)&&0!==r&&(i=e/r);break;case"natural-log":e>0&&(i=Math.log(e));break;case"square-root":e>0&&(i=e**.5)}return i}function P(e,t){const r=A({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||l});return e=function(e,t,r){const s=t??-1/0,i=r??1/0;return e.filter((e=>Number.isFinite(e)&&e>=s&&e<=i))}(e,t.minValue,t.maxValue),(0,i.W)({definition:r,values:e,normalizationTotal:t.normalizationTotal})}function A(e){const{breakCount:t,field:r,normalizationField:i,normalizationType:a}=e,l=e.classificationMethod||n,c="standard-deviation"===l?e.standardDeviationInterval||o:void 0;return new s.c({breakCount:t,classificationField:r,classificationMethod:l,normalizationField:"field"===a?i:void 0,normalizationType:a,standardDeviationInterval:c})}function N(e,t){let r=e.classBreaks;const s=r.length,i=r[0]?.minValue,a=r[s-1]?.maxValue,n="standard-deviation"===t,o=u;return r=r.map((e=>{const t=e.label,r={minValue:e.minValue,maxValue:e.maxValue,label:t};if(n&&t){const e=t.match(o),s=e?.map((e=>+e.trim()))??[];2===s.length?(r.minStdDev=s[0],r.maxStdDev=s[1],s[0]<0&&s[1]>0&&(r.hasAvg=!0)):1===s.length&&(t.includes("<")?(r.minStdDev=null,r.maxStdDev=s[0]):t.includes(">")&&(r.minStdDev=s[0],r.maxStdDev=null))}return r})),{minValue:i,maxValue:a,classBreakInfos:r,normalizationTotal:e.normalizationTotal}}function V(e,t){const r=R(e,t);if(null==r.min&&null==r.max)return{bins:[],minValue:r.min,maxValue:r.max,normalizationTotal:t.normalizationTotal};const s=r.intervals,i=r.min??0,a=r.max??0,n=s.map(((e,t)=>({minValue:s[t][0],maxValue:s[t][1],count:0})));for(const t of e)if(null!=t&&t>=i&&t<=a){const e=E(s,t);e>-1&&n[e].count++}return{bins:n,minValue:i,maxValue:a,normalizationTotal:t.normalizationTotal}}function R(e,t){const{field:r,classificationMethod:s,standardDeviationInterval:i,normalizationType:a,normalizationField:n,normalizationTotal:o,minValue:l,maxValue:u}=t,p=t.numBins||c;let d=null,y=null,h=null;if(s&&"equal-interval"!==s||a){const{classBreaks:t}=P(e,{field:r,normalizationType:a,normalizationField:n,normalizationTotal:o,classificationMethod:s,standardDeviationInterval:i,minValue:l,maxValue:u,numClasses:p});d=t[0].minValue,y=t[t.length-1].maxValue,h=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)d=l,y=u;else{const t=f({values:e,minValue:l,maxValue:u,useSampleStdDev:!a,supportsNullCount:m({normalizationType:a,normalizationField:n,minValue:l,maxValue:u})});d=t.min??null,y=t.max??null}h=function(e,t,r){const s=(t-e)/r,i=[];let a,n=e;for(let e=1;e<=r;e++)a=n+s,a=Number(a.toFixed(16)),i.push([n,e===r?t:a]),n=a;return i}(d??0,y??0,p)}return{min:d,max:y,intervals:h}}function E(e,t){let r=-1;for(let s=e.length-1;s>=0;s--)if(t>=e[s][0]){r=s;break}return r}},6384:(e,t,r)=>{r.d(t,{Qx:()=>c,kr:()=>l,uK:()=>o}),r(60708);var s=r(20744),i=r(66360),a=r(56156);let n;function o(){return n||(n=(async()=>{const e=await r.e(3960).then(r.bind(r,83960));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),n}const l=(e,t,r)=>u.create(e,t,r,null,["$feature","$view"],[]),c=(e,t,r,s)=>u.create(e,t,r,s,["$feature","$view"],[]);class u{constructor(e,t,r,s,i,a,n){this.services=null,this.script=e,this.evaluate=s;const o=Array.isArray(a)?a:a?.fields;this.fields=o??[],this._syntaxTree=r,this._arcade=t,this._arcadeFeature=i,this._spatialReference=n,this._referencesGeometry=t.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,t,r,n,l,c){const{arcade:p,Feature:d,Dictionary:y}=await o(),h=a.c.fromJSON(t);let m;try{m=p.parseScript(e,c)}catch(t){return i.c.getLogger("geoscene.support.arcadeOnDemand").error(new s.c("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})),null}const g=l.reduce(((e,t)=>({...e,[t]:null})),{});let f=null;null!=n&&(f=new y(n),f.immutable=!0,g.$config=null);const b=p.scriptUsesGeometryEngine(m),v=b&&p.enableGeometrySupport(),S=p.scriptUsesFeatureSet(m)&&p.enableFeatureSetSupport(),q=p.scriptIsAsync(m),w=q&&p.enableAsyncSupport(),_={vars:g,spatialReference:h,useAsync:!!w};await Promise.all([v,S,w]);const M=new Set;await p.loadDependentModules(M,m,null,q,b);const T=new y;T.immutable=!1,T.setField("scale",0);const I=p.compileScript(m,_);return new u(e,p,m,((e,t)=>{const r=e.$view?.timeZone;return"$view"in e&&e.$view&&(T.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=T),f&&(e.$config=f),I({vars:e,spatialReference:h,services:t,timeZone:r})}),new d,r,h)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}},21320:(e,t,r)=>{r.d(t,{u:()=>n,y:()=>a});var s=r(24832),i=r(51544);async function a(e){if(!e)return;const t=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,r=await(0,i.kB)("geoscene/t9n/basemaps");return r[e]||r[t]}const n={"geoscene-community":{get thumbnailUrl(){return (0,s.O)("geoscene/images/basemap/community.jpg")},id:"geoscene-community",classic:true,title:"彩色版基础底图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"彩色版基础底图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineCommunity/MapServer"}]},"geoscene-gray":{get thumbnailUrl(){return (0,s.O)("geoscene/images/basemap/gray.jpg")},id:"geoscene-gray",classic:true,title:"灰色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"灰色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetGray/MapServer"}]},"geoscene-blue":{get thumbnailUrl(){return (0,s.O)("geoscene/images/basemap/blue.jpg")},id:"geoscene-blue",classic:true,title:"蓝黑色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"蓝黑色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetPurplishBlue/MapServer"}]},"geoscene-warm":{get thumbnailUrl(){return (0,s.O)("geoscene/images/basemap/warm.jpg")},id:"geoscene-warm",classic:true,title:"暖色不含兴趣点版中国基础地图",baseMapLayers:[{layerType:"ArcGISTiledMapServiceLayer",showLegend:!1,title:"暖色不含兴趣点版中国基础地图",url:"//map.geoq.cn/arcgis/rest/services/ChinaOnlineStreetWarm/MapServer"}]},"tianditu-topography":{classic:true,title:"天地图-地形地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/ter_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=ter&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_6884","title":"天地图-地形地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cta_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cta&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_4525","title":"天地图-地形注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-image":{classic:true,title:"天地图-影像地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=img&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_3572","title":"天地图-影像地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cia&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_5882","title":"天地图-影像注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-vector":{classic:true,title:"天地图-矢量(含注记)(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=vec&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_8803","title":"天地图-矢量地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cva&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_2198","title":"天地图-矢量注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]}}},14812:(e,t,r)=>{r.d(t,{WW:()=>d});var s=r(20744),i=r(62088),a=r(58820),n=r(38584),o=r(71068);const l=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),c=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){if(t.restrictedWebMapWriting){const r=function(e){return"basemap"===e.layerContainerType?l:"operational-layers"===e.layerContainerType?c:null}(t);return null==r||r.has(e.type)&&!(0,o.O7)(e)}return!0}function p(e,t){"maxScale"in e&&(t.maxScale=(0,n.A)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,n.A)(e.minScale)??void 0)}function d(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return r?.messages&&r.messages.push(new s.c("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if((0,o.O7)(e)&&!e.isTable)t=e.resourceInfo;else if(u(e,r)){const t={};return e.write(t,r)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,o.O7)(e)){const r=(0,a.YT)("featureCollection.layers",t),s=r?.[0]?.layerDefinition;s&&p(e,s)}else"group"!==e.type&&p(e,t)}(e,t),t&&(t.id=e.id,"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,n.A)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,o.O7)(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,i.ct)(t)),t}},82060:(e,t,r)=>{function s(e){return"number"==typeof e}function i(e){return"string"==typeof e||e instanceof String}r.d(t,{I:()=>s,c:()=>i})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1664],{72208:(e,t,r)=>{r.r(t),r.d(t,{default:()=>F});var s=r(41948),i=r(2600),a=r(2952),n=r(30604),o=r(40504),l=r(62088),c=r(95800),u=r(79152),p=r(66360),d=r(70680),y=r(10860),h=r(28176),m=r(1580),g=(r(9456),r(12552)),f=r(18996),b=r(56156),v=r(54872),S=r(9764),q=r(21320),w=r(43780),_=(r(72052),r(89960));const M=new Set(["ar","bs","ca","hr","cs","da","nl","en","et","fi","fr","de","el","he","hu","id","it","ja","ko","lv","lt","nb","pl","ro","ru","sr","es","sv","th","tr","uk","vi"]);let T=class extends w.c{constructor(e){super(e),this.id=null,this.language=null,this.places=null,this.serviceUrl="https://basemapstyles-api.geoscene.cn/geoscene/rest/services/styles/v2/webmaps",this.worldview=null}getLanguageParamValue(){if(this.language)return this.language;const e=(0,_.a8)().toLowerCase();switch(e){case"pt-br":return"pt-BR";case"pt-pt":return"pt-PT";case"zh-cn":return"zh-CN";case"zh-hk":return"zh-HK";case"zh-tw":return"zh-TW"}const t=(0,_.mo)(e);return"pt"===t?"pt-BR":t&&M.has(t)?t:"global"}};(0,s._)([(0,m.qq)()],T.prototype,"id",void 0),(0,s._)([(0,m.qq)()],T.prototype,"language",void 0),(0,s._)([(0,m.qq)()],T.prototype,"places",void 0),(0,s._)([(0,m.qq)()],T.prototype,"serviceUrl",void 0),(0,s._)([(0,m.qq)()],T.prototype,"worldview",void 0),T=(0,s._)([(0,g.c)("geoscene.support.BasemapStyle")],T);const I=T;var L,O=r(14812);let x=0,U=L=class extends((0,o.Ib)(c.c)){constructor(e){super(e),this.id=null,this.portalItem=null,this.spatialReference=null,this.style=null,this.thumbnailUrl=null,this.title="Basemap",this.id=Date.now().toString(16)+"-basemap-"+x++,this.baseLayers=new a.c,this.referenceLayers=new a.c;const t=e=>{e.parent&&e.parent!==this&&"remove"in e.parent&&e.parent.remove(e),e.parent=this,"elevation"===e.type&&p.c.getLogger(this).error(`Layer '${e.title}, id:${e.id}' of type '${e.type}' is not supported as a basemap layer and will therefore be ignored.`)},r=e=>{e.parent=null};this.addHandles([this.baseLayers.on("after-add",(e=>t(e.item))),this.referenceLayers.on("after-add",(e=>t(e.item))),this.baseLayers.on("after-remove",(e=>r(e.item))),this.referenceLayers.on("after-remove",(e=>r(e.item)))])}initialize(){this.when().catch((e=>{p.c.getLogger(this).error("#load()",`Failed to load basemap (title: '${this.title}', id: '${this.id}')`,e)})),this.resourceInfo&&this.read(this.resourceInfo.data,this.resourceInfo.context)}destroy(){const e=this.baseLayers.toArray();for(const t of e)t.destroy();const t=this.referenceLayers.toArray();for(const e of t)e.destroy();this.baseLayers.destroy(),this.referenceLayers.destroy(),this.portalItem=(0,d.mG)(this.portalItem)}normalizeCtorArgs(e){return e&&"resourceInfo"in e&&(this._set("resourceInfo",e.resourceInfo),delete(e={...e}).resourceInfo),e}set baseLayers(e){this._set("baseLayers",(0,n.q)(e,this._get("baseLayers")))}_writeBaseLayers(e,t,r){const s=[];e?(r={...r,layerContainerType:"basemap"},this.baseLayers.forEach((e=>{const t=(0,O.WW)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&s.push(t)})),this.referenceLayers.forEach((e=>{const t=(0,O.WW)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);null!=t&&("scene"!==e.type&&(t.isReference=!0),s.push(t))})),t.baseMapLayers=s):t.baseMapLayers=s}set referenceLayers(e){this._set("referenceLayers",(0,n.q)(e,this._get("referenceLayers")))}writeTitle(e,t){t.title=e||"Basemap"}load(e){return this.addResolvingPromise(this._loadFromSource(e)),Promise.resolve(this)}loadAll(){return(0,u.A)(this,(e=>{e(this.baseLayers,this.referenceLayers)}))}clone(){const e={id:this.id,title:this.title,portalItem:this.portalItem,baseLayers:this.baseLayers.map((e=>(0,l.O8)(e)?e.clone():e)),referenceLayers:this.referenceLayers.map((e=>(0,l.O8)(e)?e.clone():e))};return this.loaded&&(e.loadStatus="loaded"),new L({resourceInfo:this.resourceInfo}).set(e)}read(e,t){this.resourceInfo||this._set("resourceInfo",{data:e,context:t}),super.read(e,t)}write(e,t){return e=e||{},t?.origin||(t={origin:"web-map",...t}),super.write(e,t),!this.loaded&&this.resourceInfo?.data.baseMapLayers&&(e.baseMapLayers=this.resourceInfo.data.baseMapLayers.map((e=>{const t=(0,l.ct)(e);return t.url&&(0,h.eC)(t.url)&&(t.url=`https:${t.url}`),t.templateUrl&&(0,h.eC)(t.templateUrl)&&(t.templateUrl=`https:${t.templateUrl}`),t}))),e}async _loadFromSource(e){const{resourceInfo:t,portalItem:r,style:s}=this;(0,y.wp)(e);const i=[];if(t){const r=t.context?t.context.url:null;if(i.push(this._loadLayersFromJSON(t.data,r,e)),t.data.id&&!t.data.title){const e=t.data.id;i.push((0,q.y)(e).then((e=>{e&&this.read({title:e},t.context)})))}}else r?i.push(this._loadFromItem(r,e)):s&&i.push(this._loadFromStylesService(s,e));await Promise.all(i)}async _loadLayersFromJSON(e,t,s){const i=this.resourceInfo?.context,a=this.portalItem?.portal||i?.portal||null,n=G[i?.origin||""]??"web-map",{populateOperationalLayers:o}=await Promise.all([r.e(74),r.e(8828),r.e(8616)]).then(r.bind(r,58828)),l=[];if((0,y.wp)(s),e.baseMapLayers&&Array.isArray(e.baseMapLayers)){const r={context:{...i,origin:n,url:t,portal:a,layerContainerType:"basemap"},defaultLayerType:"DefaultTileLayer"},s=e=>"web-scene"===n&&"ArcGISSceneServiceLayer"===e.layerType||e.isReference,c=o(this.baseLayers,e.baseMapLayers.filter((e=>!s(e))),r);l.push(c);const u=o(this.referenceLayers,e.baseMapLayers.filter(s),r);l.push(u)}await Promise.allSettled(l)}async _loadFromItem(e,t){const r=await e.load(t),s=await r.fetchData("json",t),i=(0,h.as)(e.itemUrl??"");return this._set("resourceInfo",{data:s.baseMap??{},context:{origin:k[e.type||""]??"web-map",portal:e.portal||v.c.getDefault(),url:i}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),this.read({title:e.title,thumbnailUrl:e.thumbnailUrl},{origin:"portal-item",portal:e.portal||v.c.getDefault(),url:i}),this._loadLayersFromJSON(this.resourceInfo.data,i,t)}async _loadFromStylesService(e,t){const r=`${e.serviceUrl}/${e.id}`,s=(await(0,i.c)(r,{query:{language:e.getLanguageParamValue(),places:e.places,worldview:e.worldview},signal:t?.signal})).data,a=(0,h.as)(r);return this._set("resourceInfo",{data:s.baseMap??{},context:{origin:"web-map",url:a}}),this.read(this.resourceInfo.data,this.resourceInfo.context),this.read({spatialReference:s.spatialReference},this.resourceInfo.context),this._loadLayersFromJSON(this.resourceInfo.data,a,t)}static fromId(e){const t=q.u[e];return t?t.itemId?new L({portalItem:{id:t.itemId,portal:{url:"https://www.geosceneonline.cn/geoscene"}}}):L.fromJSON(t,{origin:t.is3d?"web-scene":"web-map"}):null}};(0,s._)([(0,m.qq)({json:{write:{ignoreOrigin:!0,target:"baseMapLayers",writer(e,t,r,s){this._writeBaseLayers(e,t,s)}},origins:{"web-scene":{write:{ignoreOrigin:!0,target:{baseMapLayers:{type:a.c}},writer(e,t,r,s){this._writeBaseLayers(e,t,s)}}}}}})],U.prototype,"baseLayers",null),(0,s._)([(0,m.qq)({type:String,json:{origins:{"web-scene":{write:!0}}}})],U.prototype,"id",void 0),(0,s._)([(0,m.qq)({type:S.default})],U.prototype,"portalItem",void 0),(0,s._)([(0,m.qq)()],U.prototype,"referenceLayers",null),(0,s._)([(0,m.qq)({readOnly:!0})],U.prototype,"resourceInfo",void 0),(0,s._)([(0,m.qq)({type:b.c})],U.prototype,"spatialReference",void 0),(0,s._)([(0,m.qq)({type:I})],U.prototype,"style",void 0),(0,s._)([(0,m.qq)()],U.prototype,"thumbnailUrl",void 0),(0,s._)([(0,m.qq)({type:String,json:{origins:{"web-scene":{write:{isRequired:!0}}}}})],U.prototype,"title",void 0),(0,s._)([(0,f.G)("title")],U.prototype,"writeTitle",null),U=L=(0,s._)([(0,g.c)("geoscene.Basemap")],U);const k={"Web Scene":"web-scene","Web Map":"web-map","Link Chart":"link-chart"},G={"web-scene":"web-scene","web-map":"web-map","link-chart":"link-chart"},F=U},91952:(e,t,r)=>{r.d(t,{M:()=>f,a:()=>m,b:()=>v,e:()=>y,f:()=>a,i:()=>p,p:()=>d,r:()=>o,t:()=>n,w:()=>l});var s=r(47620),i=r(28176);function a(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,i.WM)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,i.SU)(e,t.portalItem.itemUrl);null!=r&&u.test(r)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=h(e,t?.portal))&&c.test(e)?m(e):e}function n(e,t,r=f.YES){if(null==(e=e&&c.test(e)?g(e):e))return e;!(0,i.ic)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,i.WM)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const a=h(r,t.portal),n=h(s,t.portal);s=(0,i.SU)(n,a,a),null!=s&&s!==n&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=y(s,t?.portal),(0,i.ic)(s)&&(s=(0,i.k7)(s)),t?.resources&&t?.portalItem&&!(0,i.ic)(s)&&!(0,i.o9)(s)&&r===f.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function o(e,t,r){return a(e,r)}function l(e,t,r,s){const i=n(e,s);void 0!==i&&(t[r]=i)}const c=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function p(e){const t=e?.match(c)??null;return t?.[1]??null}function d(e){const t=e?.match(c)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,i.wB)(r);return{prefix:null,filename:e,extension:t}}const{path:a,extension:n}=(0,i.wB)(r.slice(s+1));return{prefix:r.slice(0,s),filename:a,extension:n}}function y(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.uN)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function h(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,i.k3)();return(0,i.OS)(s,`${s.scheme}://${r}`)?(0,i.uN)(e,t.portalHostname,r):(0,i.uN)(e,r,t.portalHostname)}function m(e){if(!e)return e||null;let t=e;return t&&s.id&&!s.id.findCredential(t)&&(t=s.id._normalizeAGOLorgDomain(t),t=t.replace(/^https?:\/\/www\.geoscene\.cn/,"https://cdn.geoscene.cn"),t=t.replace(/^https?:\/\/devext\.geoscene\.cn/,"https://cdndev.geoscene.cn"),t=t.replace(/^https?:\/\/qaext\.geoscene\.cn/,"https://cdnqa.geoscene.cn")),t}function g(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.geoscene\.cn/,"https://www.geosceneonline.cn/geoscene"),t=t.replace(/^https?:\/\/cdndev\.geoscene\.cn/,"https://devext.geoscene.cn"),t=t.replace(/^https?:\/\/cdnqa\.geoscene\.cn/,"https://qaext.geoscene.cn"),t&&s.id&&!s.id.findCredential(t)&&(t=s.id._normalizeAGOLorgDomain(t)),t}var f,b;(b=f||(f={}))[b.YES=0]="YES",b[b.NO=1]="NO";const v=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return f},ensureMainOnlineDomain:y,fromCDNUrl:g,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:d,read:o,toCDNUrl:m,toJSON:n,write:l},Symbol.toStringTag,{value:"Module"}))},46988:(e,t,r)=>{r.d(t,{SQ:()=>a,ec:()=>l,kv:()=>i,uO:()=>n,yU:()=>c});const s={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function i(e){return!!s[e]||!!s[e.toLowerCase()]}function a(e){return s[e]??s[e.toLowerCase()]}function n(e){return[...a(e)]}function o(e,t,r){r<0&&++r,r>1&&--r;const s=6*r;return s<1?e+(t-e)*s:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,s=1){const i=(e%360+360)%360/360,a=r<=.5?r*(t+1):r+t-r*t,n=2*r-a;return[Math.round(255*o(n,a,i+1/3)),Math.round(255*o(n,a,i)),Math.round(255*o(n,a,i-1/3)),s]}function c(e){const t=e.length>5,r=t?8:4,s=(1<<r)-1,i=t?1:17,a=t?9===e.length:5===e.length;let n=Number("0x"+e.substr(1));if(isNaN(n))return null;const o=[0,0,0,1];let l;return a&&(l=n&s,n>>=r,o[3]=i*l/255),l=n&s,n>>=r,o[2]=i*l,l=n&s,n>>=r,o[1]=i*l,l=n&s,n>>=r,o[0]=i*l,o}},95800:(e,t,r)=>{r.d(t,{c:()=>m});var s=r(41948),i=r(20744),a=r(70680),n=r(94804),o=r(10860),l=r(69504),c=r(1580),u=r(12552);const p="loaded",d=e=>{let t=class extends e{constructor(...e){super(...e),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((e=>{const t=this.load.bind(this);this.load=r=>{const s=new Promise(((e,t)=>{const s=(0,o.Ij)(r,t);this.destroyed&&t(new i.c("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(e,t).finally((()=>{s&&s.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const e=this._loadController=new AbortController;t({signal:e.signal})}return e(),s}}))),this.when((()=>{this._set("loadStatus",p),this._loadController=null}),(e=>{this._set("loadStatus","failed"),this._set("loadError",e),this._loadController=null}))}destroy(){this._loadController&&(this._loadController=(0,a.K8)(this._loadController),this._promiseProps.abort()),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===p}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new i.c("load:cancelled","Cancelled")),this._loadController?.abort(),this._promiseProps.abort()),this}};return(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"loaded",null),(0,s._)([(0,c.qq)({readOnly:!0})],t.prototype,"loadError",void 0),(0,s._)([(0,c.qq)({clonable:!1})],t.prototype,"loadStatus",void 0),(0,s._)([(0,c.qq)({type:[l.c],readOnly:!0})],t.prototype,"loadWarnings",null),t=(0,s._)([(0,u.c)("geoscene.core.Loadable")],t),t};let y=class extends(d(n._)){};var h;y=(0,s._)([(0,u.c)("geoscene.core.Loadable")],y),(h=y||(y={})).LoadableMixin=d,h.isLoadable=function(e){return!(!e||!e.load)};const m=y},33456:(e,t,r)=>{function s(e,t){if(!t)return e;for(const r of t)e.add(r);return e}function i(e,t){const r=new Set;return s(r,e),s(r,t),r}function a(e,t){const r=new Set;for(const s of t)e.has(s)&&r.add(s);return r}function n(e,t){if(!e||!t)return!1;if(e===t)return!0;for(const r of e)if(!t.has(r))return!1;return!0}function o(e,t){if(null==e&&null==t)return!0;if(null==e||null==t||e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}function l(e,t){const r=new Set(e);for(const e of t)r.delete(e);return r}r.d(t,{Cs:()=>n,SQ:()=>i,WR:()=>a,o1:()=>l,yK:()=>o})},30604:(e,t,r)=>{r.d(t,{W:()=>a,q:()=>i});var s=r(2952);function i(e,t,r=s.c){return t||(t=new r),t===e||(t.removeAll(),(i=e)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?t.addMany(e):e&&t.add(e)),t;var i}function a(e){return e}},79152:(e,t,r)=>{r.d(t,{A:()=>n,W:()=>o});var s=r(40196),i=r(2952),a=r(95800);async function n(e,t){return await e.load(),o(e,t)}async function o(e,t){const r=[],n=(...e)=>{for(const t of e)null!=t&&(Array.isArray(t)?n(...t):i.c.isCollection(t)?t.forEach((e=>n(e))):a.c.isLoadable(t)&&r.push(t))};t(n);let o=null;if(await(0,s.kH)(r,(async e=>{const t=await(0,s.aG)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load());!1!==t.ok||o||(o=t)})),o)throw o.error;return e}},50144:(e,t,r)=>{r.d(t,{Gy:()=>c,Qz:()=>l,WM:()=>o,im:()=>n});const s=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",a=96;function n(e){return e?e/72*a:0}function o(e){return e?72*e/a:0}function l(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),a="px"===s?o(r):r;return i?-a:a}return console.warn(i),null}return e}function c(e=0,t=0){return{x:e,y:t}}},94360:(e,t,r)=>{r.d(t,{QJ:()=>c,aU:()=>l,g1:()=>o,iC:()=>n});var s=r(47828),i=r(28484),a=r(39452);const n={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8};function o(e,t,r,n=i.OX){const o=new a._C((0,s.Y9)(n)),l=a.CS.fromJSDate(e,{zone:o}),c="decades"===r||"centuries"===r?"year":u(r);return"decades"===r&&(t*=10),"centuries"===r&&(t*=100),l.plus({[c]:t}).toJSDate()}function l(e,t,r=i.OX){const n=new a._C((0,s.Y9)(r)),o=a.CS.fromJSDate(e,{zone:n});if("decades"===t||"centuries"===t){const e=o.startOf("year"),{year:r}=e,s=r-r%("decades"===t?10:100);return e.set({year:s}).toJSDate()}const l=u(t);return o.startOf(l).toJSDate()}function c(e,t,r){return 0===e?0:e*n[t]/n[r]}function u(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}},60708:(e,t,r)=>{r.d(t,{Su:()=>u});var s=r(53368),i=r(95247),a=r(50853),n=r(53004),o=r(67776),l=r(7488),c=r(48516);r(56156),r(97492),r(6704);const u={base:a.c,key:"type",typeMap:{extent:i.c,multipoint:n.c,point:o.c,polyline:c.c,polygon:l.c}};(0,s.S2)(u)},6704:(e,t,r)=>{r.d(t,{Ce:()=>m,Cs:()=>y,Ul:()=>c,_:()=>u,_x:()=>p,cZ:()=>d,h4:()=>h,uG:()=>f});var s=r(95247),i=r(50853),a=r(53004),n=r(67776),o=r(7488),l=r(48516);function c(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function u(e){return void 0!==e.points}function p(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function y(e){return void 0!==e.rings}function h(e){return null==e?null:e instanceof i.c?e:p(e)?n.c.fromJSON(e):d(e)?l.c.fromJSON(e):y(e)?o.c.fromJSON(e):u(e)?a.c.fromJSON(e):c(e)?s.c.fromJSON(e):null}function m(e){return e?p(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":y(e)?"esriGeometryPolygon":c(e)?"esriGeometryEnvelope":u(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:n.c,esriGeometryPolyline:l.c,esriGeometryPolygon:o.c,esriGeometryEnvelope:s.c,esriGeometryMultipoint:a.c};function f(e){return e&&g[e]||null}},42736:(e,t,r)=>{r.d(t,{Mh:()=>h,QL:()=>p,eE:()=>n,q0:()=>y,qb:()=>d,yw:()=>m}),r(6704);const s=(e,t,r)=>[t,r],i=(e,t,r)=>[t,r,e[2]],a=(e,t,r)=>[t,r,e[2],e[3]];function n(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function o({scale:e,translate:t},r){return r*e[0]+t[0]}function l({scale:e,translate:t},r){return t[1]-r*e[1]}function c(e,t,r){const s=new Array(r.length);if(!r.length)return s;const[i,a]=e.scale;let n=o(e,r[0][0]),c=l(e,r[0][1]);s[0]=t(r[0],n,c);for(let e=1;e<r.length;e++){const o=r[e];n+=o[0]*i,c-=o[1]*a,s[e]=t(o,n,c)}return s}function u(e,t,r){const s=new Array(r.length);for(let i=0;i<r.length;i++)s[i]=c(e,t,r[i]);return s}function p(e,t,r,s,i){return t.x=function({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}(e,r.x),t.y=function({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}(e,r.y),t!==r&&(s&&(t.z=r.z),i&&(t.m=r.m)),t}function d(e,t,r,n,o){return null!=r&&(t.points=function(e,t,r,n){return c(e,r?n?a:i:n?i:s,t)}(e,r.points,n,o)),t}function y(e,t,r,s,i){return null==r||(t.x=o(e,r.x),t.y=l(e,r.y),t!==r&&(s&&(t.z=r.z),i&&(t.m=r.m))),t}function h(e,t,r,n,o){return null!=r&&(t.rings=function(e,t,r,n){return u(e,r?n?a:i:n?i:s,t)}(e,r.rings,n,o)),t}function m(e,t,r,n,o){return null!=r&&(t.paths=function(e,t,r,n){return u(e,r?n?a:i:n?i:s,t)}(e,r.paths,n,o)),t}},97492:(e,t,r)=>{r.d(t,{U:()=>i,j:()=>a});var s=r(14628);const i=(0,s.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),a=(0,s.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},65604:(e,t,r)=>{r.d(t,{qC:()=>l,o1:()=>c,M7:()=>u,of:()=>p,C8:()=>d,Ez:()=>y,aO:()=>g});var s=r(46988),i=r(50144);function a(){const e=new Float32Array(16);return e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}const n=a();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:n,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:a,createView:function(e,t){return new Float32Array(e,t,16)},fromValues:function(e,t,r,s,i,a,n,o,l,c,u,p,d,y,h,m){const g=new Float32Array(16);return g[0]=e,g[1]=t,g[2]=r,g[3]=s,g[4]=i,g[5]=a,g[6]=n,g[7]=o,g[8]=l,g[9]=c,g[10]=u,g[11]=p,g[12]=d,g[13]=y,g[14]=h,g[15]=m,g}},Symbol.toStringTag,{value:"Module"}));var o=r(15008);class l{constructor(e,t,r){this.strength=e,this.radius=t,this.threshold=r,this.type="bloom"}interpolate(e,t,r){this.strength=h(e.strength,t.strength,r),this.radius=h(e.radius,t.radius,r),this.threshold=h(e.threshold,t.threshold,r)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:m(this.radius),strength:this.strength,threshold:this.threshold}}}class c{constructor(e){this.radius=e,this.type="blur"}interpolate(e,t,r){this.radius=Math.round(h(e.radius,t.radius,r))}clone(){return new c(this.radius)}toJSON(){return{type:"blur",radius:m(this.radius)}}}class u{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=h(e.amount,t.amount,r),this._updateMatrix()}clone(){return new u(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const e=this._colorMatrix||a();switch(this.type){case"brightness":this._colorMatrix=((e,t)=>{const r=(0,o.WO)(e,t,0,0,0,0,t,0,0,0,0,t,0,0,0,0,1);return(0,o.oL)(r,r)})(e,this.amount);break;case"contrast":this._colorMatrix=((e,t)=>{const r=(0,o.WO)(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,o.oL)(r,r)})(e,this.amount);break;case"grayscale":this._colorMatrix=((e,t)=>{const r=1-this.amount,s=(0,o.WO)(e,.2126+.7874*r,.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1);return(0,o.oL)(s,s)})(e);break;case"invert":this._colorMatrix=((e,t)=>{const r=1-2*t,s=(0,o.WO)(e,r,0,0,t,0,r,0,t,0,0,r,t,0,0,0,1);return(0,o.oL)(s,s)})(e,this.amount);break;case"saturate":this._colorMatrix=((e,t)=>{const r=(0,o.WO)(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,o.oL)(r,r)})(e,this.amount);break;case"sepia":this._colorMatrix=((e,t)=>{const r=1-this.amount,s=(0,o.WO)(e,.393+.607*r,.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1);return(0,o.oL)(s,s)})(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=h(e.offsetX,t.offsetX,r),this.offsetY=h(e.offsetY,t.offsetY,r),this.blurRadius=h(e.blurRadius,t.blurRadius,r),this.color[0]=Math.round(h(e.color[0],t.color[0],r)),this.color[1]=Math.round(h(e.color[1],t.color[1],r)),this.color[2]=Math.round(h(e.color[2],t.color[2],r)),this.color[3]=h(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:m(this.offsetX),yoffset:m(this.offsetY),blurRadius:m(this.blurRadius),color:e}}}class d{constructor(e){this.angle=e,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(e,t,r){this.angle=h(e.angle,t.angle,r),this._updateMatrix()}clone(){return new d(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const e=this._colorMatrix||a();this._colorMatrix=((e,t)=>{const r=Math.sin(t*Math.PI/180),s=Math.cos(t*Math.PI/180),i=(0,o.WO)(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,o.oL)(i,i)})(e,this.angle)}}class y{constructor(e){this.amount=e,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(e,t,r){this.amount=h(e.amount,t.amount,r)}clone(){return new y(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function h(e,t,r){return e+(t-e)*r}function m(e){return Math.round(1e3*(0,i.WM)(e))/1e3}function g(e){switch(e.type){case"grayscale":case"sepia":case"invert":return new u(e.type,0);case"saturate":case"brightness":case"contrast":return new u(e.type,1);case"opacity":return new y(1);case"hue-rotate":return new d(0);case"blur":return new c(0);case"drop-shadow":return new p(0,0,0,[...(0,s.SQ)("transparent")]);case"bloom":return new l(0,0,1)}}},14644:(e,t,r)=>{r.d(t,{A1:()=>a,Ub:()=>n,w1:()=>i});var s=r(65604);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 a(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.aO)(r[e]))}function n(e){const t=e[0];return!!t&&"type"in t}},41936:(e,t,r)=>{r.d(t,{Qb:()=>y,w1:()=>S,O0:()=>v}),r(2016),r(9456),r(20744),r(53648);var s=r(70680),i=(r(47828),r(28484),r(82060)),a=r(39452);r(89960),new Map([["hours",3600],["minutes",60],["seconds",1],["deciseconds",.1],["centiseconds",.01],["milliseconds",.001]]);const n="yyyy-MM-dd";var o,l;(l=o||(o={})).HM="HH:mm",l.HMS="HH:mm:ss",l.HMS_MS="HH:mm:ss.SSS";const c=[o.HMS_MS,o.HMS,o.HM,"TT"];function u(e){if(!e||!(0,i.c)(e))return null;const t=a.CS.fromFormat(e,n);return t.isValid?t:null}function p(e){return e&&(0,i.c)(e)?(0,s.EP)(c,(t=>{const r=a.CS.fromFormat(e,t);return r.isValid?r:null}))??null:null}function d(e){if(!e||!(0,i.c)(e))return null;const t=a.CS.fromISO(e);return t.isValid?t:null}var y,h;new Set(["date-only","time-only","timestamp-offset"]),(h=y||(y={})).VALUE_OUT_OF_RANGE="domain-validation-error::value-out-of-range",h.INVALID_CODED_VALUE="domain-validation-error::invalid-coded-value";const m=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]);function g(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function f(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function b(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function v(e,t){const r=e?.domain;if(!r)return null;switch(r.type){case"range":{const{min:r,max:s}=S(e);if(null!=r&&+t<r||null!=s&&+t>s)return y.VALUE_OUT_OF_RANGE;break}case"coded-value":case"codedValue":if(null==r.codedValues||r.codedValues.every((e=>null==e||e.code!==t)))return y.INVALID_CODED_VALUE}return null}function S(e,t){const r=t??e?.domain;if(!r||"range"!==r.type)return;const s="range"in r?r.range[0]:r.minValue,i="range"in r?r.range[1]:r.maxValue,a=function(e){return null!=e&&m.has(e.type)}(e);return g(e)||b(e)||f(e)?{...q(e,i,s),isInteger:a}:{min:null!=s&&"number"==typeof s?s:null,max:null!=i&&"number"==typeof i?i:null,rawMin:s,rawMax:i,isInteger:a}}function q(e,t,r){return g(e)?{min:u(r)?.toMillis(),max:u(t)?.toMillis(),rawMin:r,rawMax:t}:b(e)?{min:p(r)?.toMillis(),max:p(t)?.toMillis(),rawMin:r,rawMax:t}:f(e)?{min:d(r)?.toMillis(),max:d(t)?.toMillis(),rawMin:r,rawMax:t}:{max:null,min:null}}},564:(e,t,r)=>{r.d(t,{AN:()=>S,AZ:()=>$,G0:()=>G,G2:()=>q,Gi:()=>d,Gm:()=>ce,Ke:()=>le,Mz:()=>Q,OC:()=>f,OJ:()=>ee,OO:()=>g,Oo:()=>H,Wc:()=>h,YT:()=>te,Yn:()=>x,eM:()=>J,gB:()=>k,gP:()=>c,gp:()=>W,i:()=>b,iW:()=>j,iY:()=>U,k7:()=>v,mS:()=>Y,tm:()=>_,w1:()=>K,yM:()=>z}),r(20744);var s=r(58820),i=r(33456),a=r(41936),n=r(6384);const o=/^([0-9_])/,l=/[^a-z0-9_\u0080-\uffff]+/gi;function c(e){return null==e?null:e.trim().replaceAll(l,"_").replace(o,"F$1")||null}const u=["field","field2","field3","normalizationField","rotationInfo.field","proportionalSymbolInfo.field","proportionalSymbolInfo.normalizationField","colorInfo.field","colorInfo.normalizationField"],p=["field","normalizationField"];function d(e,t){if(null!=e&&null!=t)for(const r of Array.isArray(e)?e:[e])if(y(u,r,t),"visualVariables"in r&&r.visualVariables)for(const e of r.visualVariables)y(p,e,t)}function y(e,t,r){if(e)for(const i of e){const e=(0,s.YT)(i,t),a=e&&"function"!=typeof e&&r.get(e);a&&(0,s.qQ)(i,a.name,t)}}function h(e,t){if(null!=e&&t?.fields?.length)if("startField"in e){const r=t.get(e.startField),s=t.get(e.endField);e.startField=r?.name??null,e.endField=s?.name??null}else{const r=t.get(e.startTimeField),s=t.get(e.endTimeField);e.startTimeField=r?.name??null,e.endTimeField=s?.name??null}}const m=new Set;function g(e,t){return e&&t?(m.clear(),f(m,e,t),Array.from(m).sort()):[]}function f(e,t,r){if(r)if(t?.fields?.length)if(r.includes("*"))for(const{name:r}of t.fields)e.add(r);else for(const s of r)b(e,t,s);else{if(r.includes("*"))return e.clear(),void e.add("*");for(const t of r)null!=t&&e.add(t)}}function b(e,t,r){if("string"==typeof r)if(t){const s=t.get(r);s&&e.add(s.name)}else e.add(r)}function v(e,t){return null==t||null==e?[]:t.includes("*")?(e.fields??[]).map((e=>e.name)):t}async function S(e,t,r){if(!r)return;const{arcadeUtils:s}=await(0,n.uK)(),i=s.extractFieldNames(r,t?.fields?.map((e=>e.name)));for(const r of i)b(e,t,r)}function q({displayField:e,fields:t}){return e||(t?.length?w(t,"name-or-title")||w(t,"unique-identifier")||w(t,"type-or-category")||function(e){for(const t of e){if(!t?.name)continue;const e=t.name.toLowerCase();if(e.includes("name")||e.includes("title"))return t.name}return null}(t):null)}function w(e,t){for(const r of e)if(r?.valueType&&r.valueType===t)return r.name;return null}function _(e){return e?g(e.fieldsIndex,L(e)):[]}const M=new Set(["oid","global-id","guid"]),T=new Set(["oid","global-id"]),I=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^shape$/i,/^shape_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/perimeter/i,/objectid/i,/_i$/i];function L(e){if(!e)return[];const t="editFieldsInfo"in e&&e.editFieldsInfo;if(!t)return[];const{creationDateField:r,creatorField:s,editDateField:i,editorField:a}=t;return[r,s,i,a].filter(Boolean)}function O(e){return L(e).map((e=>e.toLowerCase()))}function x(e,t){return e.editable&&!M.has(e.type)&&!O(t).includes(e.name?.toLowerCase()??"")}function U(e,t){const r=e.name?.toLowerCase()??"";return!(null!=t?.objectIdField&&r===t.objectIdField.toLowerCase()||null!=t?.globalIdField&&r===t.globalIdField.toLowerCase()||function(e){const t=new Set;O(e).forEach((e=>t.add(e))),function(e){if(!e)return[];const t=e.geometryFieldsInfo;return t?g(e.fieldsIndex,[t.shapeAreaField,t.shapeLengthField]):[]}(e).forEach((e=>t.add(e.toLowerCase())));const r=e&&"infoFor3D"in e?e.infoFor3D:void 0;return r&&(Object.values(r.assetMapFieldRoles).forEach((e=>t.add(e.toLowerCase()))),Object.values(r.transformFieldRoles).forEach((e=>t.add(e.toLowerCase())))),Array.from(t)}(t).includes(r)||T.has(e.type)||I.some((e=>e.test(r))))}function k(e){const t=e.defaultValue;return void 0!==t&&V(e,t)?t:e.nullable?null:void 0}function G(e){const t="string"==typeof e?{type:e}:e;return $(t)?255:"esriFieldTypeDate"===t.type||"date"===t.type?8:void 0}function F(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}function D(e){return null===e||F(e)}function C(e){return null===e||Number.isInteger(e)}function P(e){return null!=e&&"string"==typeof e}function A(e){return null===e||P(e)}function N(){return!0}function V(e,t){let r;switch(e.type){case"date":case"integer":case"long":case"small-integer":case"big-integer":case"esriFieldTypeDate":case"esriFieldTypeInteger":case"esriFieldTypeLong":case"esriFieldTypeSmallInteger":case"esriFieldTypeBigInteger":r=e.nullable?C:Number.isInteger;break;case"double":case"single":case"esriFieldTypeSingle":case"esriFieldTypeDouble":r=e.nullable?D:F;break;case"string":case"esriFieldTypeString":r=e.nullable?A:P;break;default:r=N}return 1===arguments.length?r:r(t)}const R=new Set(["integer","small-integer","big-integer","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeBigInteger"]),E=new Set(["single","double","esriFieldTypeSingle","esriFieldTypeDouble"]),B=(0,i.SQ)(R,E);function j(e){return null!=e&&B.has(e.type)}function $(e){return null!=e&&("string"===e.type||"esriFieldTypeString"===e.type)}function W(e){return null!=e&&("date"===e.type||"esriFieldTypeDate"===e.type)}function z(e){return null!=e&&("date-only"===e.type||"esriFieldTypeDateOnly"===e.type)}function H(e){return null!=e&&("timestamp-offset"===e.type||"esriFieldTypeTimestampOffset"===e.type)}function J(e){return null!=e&&("time-only"===e.type||"esriFieldTypeTimeOnly"===e.type)}function Q(e){return null!=e&&("oid"===e.type||"esriFieldTypeOID"===e.type)}function K(e){return null!=e&&("global-id"===e.type||"esriFieldTypeGlobalID"===e.type)}function Y(e,t){return null===te(e,t)}var X,Z;function ee(e){return null==e||"number"==typeof e&&isNaN(e)?null:e}function te(e,t){return null==e||e.nullable&&null===t?null:j(e)&&!function(e,t){const r="string"==typeof e?re(e):e;if(!r)return!1;const s=r.min,i=r.max;return r.isInteger?Number.isInteger(t)&&t>=s&&t<=i:t>=s&&t<=i}(e.type,Number(t))?X.OUT_OF_RANGE:V(e,t)?e.domain?(0,a.O0)(e,t):null:Z.INVALID_TYPE}function re(e){switch(e){case"esriFieldTypeSmallInteger":case"small-integer":return se;case"esriFieldTypeInteger":case"integer":return ie;case"esriFieldTypeBigInteger":case"big-integer":return ae;case"esriFieldTypeSingle":case"single":return ne;case"esriFieldTypeDouble":case"double":return oe}}(X||(X={})).OUT_OF_RANGE="numeric-range-validation-error::out-of-range",function(e){e.INVALID_TYPE="type-validation-error::invalid-type"}(Z||(Z={}));const se={min:-32768,max:32767,isInteger:!0,rawMin:-32768,rawMax:32767},ie={min:-2147483648,max:2147483647,isInteger:!0,rawMin:-2147483648,rawMax:2147483647},ae={min:-Number.MAX_SAFE_INTEGER,max:Number.MAX_SAFE_INTEGER,isInteger:!0,rawMin:-Number.MAX_SAFE_INTEGER,rawMax:Number.MAX_SAFE_INTEGER},ne={min:-34e37,max:12e37,isInteger:!1,rawMin:-34e37,rawMax:12e37},oe={min:-Number.MAX_VALUE,max:Number.MAX_VALUE,isInteger:!1,rawMin:-Number.MAX_VALUE,rawMax:Number.MAX_VALUE};function le(e,t,r){switch(e){case a.Qb.INVALID_CODED_VALUE:return`Value ${r} is not in the coded domain - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case a.Qb.VALUE_OUT_OF_RANGE:return`Value ${r} is out of the range of valid values - field: ${t.name}, domain: ${JSON.stringify(t.domain)}`;case Z.INVALID_TYPE:return`Value ${r} is not a valid value for the field type - field: ${t.name}, type: ${t.type}, nullable: ${t.nullable}`;case X.OUT_OF_RANGE:{const{min:e,max:s}=re(t.type);return`Value ${r} is out of range for the number type - field: ${t.name}, type: ${t.type}, value range is ${e} to ${s}`}}}function ce(e){return!!e&&["raster.itempixelvalue","raster.servicepixelvalue"].some((t=>e.toLowerCase().startsWith(t)))}},71068:(e,t,r)=>{r.d(t,{O7:()=>o,UB:()=>l,UX:()=>p,Wr:()=>a,iL:()=>n,kZ:()=>u,mK:()=>c});var s=r(47620),i=r(2600);const a={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function n(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function o(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){return("feature"===e?.type||"subtype-group"===e?.type)&&"feature-layer"===e.source?.type}async function c(e,t){const r=s.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const a=e.toLowerCase().indexOf("/rest/services");if(-1===a)return null;const n=`${e.substring(0,a)}/rest/info`,o=null!=t?t.signal:null,{data:l}=await(0,i.c)(n,{query:{f:"json"},responseType:"json",signal:o});return l?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function p(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}},54872:(e,t,r)=>{r.d(t,{c:()=>U});var s=r(41948),i=r(6220),a=r(47620),n=r(2600),o=r(20744),l=r(40504),c=r(95800),u=r(70680),p=r(10860),d=r(1580),y=r(53368),h=(r(72052),r(9456),r(33600)),m=r(12552),g=r(95247),f=r(89960);let b;var v=r(62504),S=r(30872),q=r(43780);r(66360);let w=class extends q.c{constructor(e){super(e),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,s._)([(0,d.qq)()],w.prototype,"nextQueryParams",void 0),(0,s._)([(0,d.qq)()],w.prototype,"queryParams",void 0),(0,s._)([(0,d.qq)()],w.prototype,"results",void 0),(0,s._)([(0,d.qq)()],w.prototype,"total",void 0),w=(0,s._)([(0,m.c)("geoscene.portal.PortalQueryResult")],w);const _=w;var M,T=r(53039),I=r(20572);let L;const O={PortalGroup:()=>Promise.resolve({default:v.c}),PortalItem:()=>Promise.resolve().then(r.bind(r,9764)),PortalUser:()=>Promise.resolve({default:T.c})};let x=M=class extends((0,l.Ib)(c.c)){constructor(e){super(e),this._esriIdCredentialCreateHandle=null,this.access=null,this.allSSL=!1,this.authMode="auto",this.authorizedCrossOriginDomains=null,this.basemapGalleryGroupQuery=null,this.basemapGalleryGroupQuery3D=null,this.bingKey=null,this.canListApps=!1,this.canListData=!1,this.canListPreProvisionedItems=!1,this.canProvisionDirectPurchase=!1,this.canSearchPublic=!0,this.canShareBingPublic=!1,this.canSharePublic=!1,this.canSignInArcGIS=!1,this.canSignInIDP=!1,this.colorSetsGroupQuery=null,this.commentsEnabled=!1,this.created=null,this.culture=null,this.customBaseUrl=null,this.defaultBasemap=null,this.defaultDevBasemap=null,this.defaultExtent=null,this.defaultVectorBasemap=null,this.description=null,this.devBasemapGalleryGroupQuery=null,this.eueiEnabled=null,this.featuredGroups=null,this.featuredItemsGroupQuery=null,this.galleryTemplatesGroupQuery=null,this.layoutGroupQuery=null,this.livingAtlasGroupQuery=null,this.hasCategorySchema=!1,this.helperServices=null,this.homePageFeaturedContent=null,this.homePageFeaturedContentCount=null,this.httpPort=null,this.httpsPort=null,this.id=null,this.ipCntryCode=null,this.isPortal=!1,this.isReadOnly=!1,this.layerTemplatesGroupQuery=null,this.maxTokenExpirationMinutes=null,this.modified=null,this.name=null,this.portalHostname=null,this.portalMode=null,this.portalProperties=null,this.region=null,this.rotatorPanels=null,this.showHomePageDescription=!1,this.sourceJSON=null,this.supportsHostedServices=!1,this.symbolSetsGroupQuery=null,this.templatesGroupQuery=null,this.units=null,this.url=i.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(e){return"string"==typeof e?{url:e}:e}destroy(){k.unregister(this),this.defaultBasemap=(0,u.mG)(this.defaultBasemap),this.defaultDevBasemap=(0,u.mG)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,u.mG)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,u.oR)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(e){if(e)for(const t of e)i.default.request.trustedServers.includes(t)||i.default.request.trustedServers.push(t);return e}readDefaultBasemap(e){return this._readBasemap(e)}readDefaultDevBasemap(e){return this._readBasemap(e)}readDefaultVectorBasemap(e){return this._readBasemap(e)}get extraQuery(){const e=this.user?.orgId,t=!e||this.canSearchPublic;return this.id&&!t?` AND orgid:${this.id}`:null}get isOrganization(){return!!this.access}get itemPageUrl(){return this.url?`${this.url}/home/item.html`:null}get restUrl(){let e=this.url;if(e){const t=e.indexOf("/sharing");e=t>0?e.substring(0,t):this.url.replace(/\/+$/,""),e+="/sharing/rest"}return e}get thumbnailUrl(){const e=this.restUrl,t=this.thumbnail;return e&&t?this._normalizeSSL(e+"/portals/self/resources/"+t):null}readUrlKey(e){return e?e.toLowerCase():e}readUser(e){let t=null;return e&&(t=T.c.fromJSON(e),t.portal=this),t}load(e){const t=Promise.resolve().then(r.bind(r,72208)).then((({default:t})=>{(0,p.wp)(e),L=t})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,e))).then((e=>{if(a.id){const e=a.id;this.credential=e.findCredential(this.restUrl),this.credential||this.authMode!==M.AUTH_MODE_AUTO&&this.authMode!==M.AUTH_MODE_NO_PROMPT||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=e.on("credential-create",function(e){const t=a.id;return()=>{const r=e.deref();r&&t.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),k.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}async createElevationLayers(){await this.load();const e=this._getHelperService("defaultElevationLayers"),t=(await Promise.all([r.e(5612),r.e(74),r.e(2968),r.e(8380),r.e(6236)]).then(r.bind(r,47104))).default;return e?e.map((e=>new t({id:e.id,url:e.url}))):[]}async fetchBasemaps(e,t){const r=await this._fetchBasemaps(e,t);if(!0===t?.include3d&&!1!==this.use3dBasemaps){const s=await this._fetchBasemaps3D(e,t);r.unshift(...s)}return r}fetchCategorySchema(e){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",e).then((e=>e.categorySchema)):(0,p.wv)(e)?Promise.reject((0,p.Uh)()):Promise.resolve([])}fetchFeaturedGroups(e){const t=this.featuredGroups,r=new S.c;if(r.num=100,r.sortField="title",t&&t.length){const s=[];for(const e of t)s.push(`(title:"${e.title}" AND owner:${e.owner})`);return r.query=s.join(" OR "),this.queryGroups(r,e).then((e=>e.results))}return(0,p.wv)(e)?Promise.reject((0,p.Uh)()):Promise.resolve([])}fetchRegions(e){const t=this.user?.culture||this.culture||(0,f.a8)();return this.request(this.restUrl+"/portals/regions",{...e,query:{culture:t}})}fetchSettings(e){const t=this.user?.culture||this.culture||(0,f.a8)();return this.request(this.restUrl+"/portals/self/settings",{...e,query:{culture:t}})}static getDefault(){return b&&!b.destroyed||(b=new M),b}queryGroups(e,t){return this.queryPortal("/community/groups",e,"PortalGroup",t)}queryItems(e,t){return this.queryPortal("/search",e,"PortalItem",t)}queryUsers(e,t){return e.sortField||(e.sortField="username"),this.queryPortal("/community/users",e,"PortalUser",t)}fetchSelf(e=this.authMode,t=!1,r){const s=this.restUrl+"/portals/self",i={authMode:e,query:{culture:(0,f.a8)().toLowerCase()},withCredentials:!0,...r};return"auto"===i.authMode&&(i.authMode="no-prompt"),t&&(i.query.default=!0),this.request(s,i)}queryPortal(e,t,r,s){const i=(0,y.ey)(S.c,t),a=t=>this.request(this.restUrl+e,{...i.toRequestOptions(this),...s}).then((e=>{const r=i.clone();return r.start=e.nextStart,new _({nextQueryParams:r,queryParams:i,total:e.total,results:M._resultsToTypedArray(t,{portal:this},e,s)})})).then((e=>Promise.all(e.results.map((t=>"function"==typeof t.when?t.when():e))).then((()=>e),(t=>((0,p.CE)(t),e)))));return r&&O[r]?O[r]().then((({default:e})=>((0,p.wp)(s),a(e)))):a()}signIn(){if(this.authMode===M.AUTH_MODE_ANONYMOUS||this.authMode===M.AUTH_MODE_NO_PROMPT&&!a.id)return Promise.reject(new o.c("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const e=e=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(e||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=e,this.fetchSelf("immediate")))):this.user&&this.credential===e?null:(this.credential=e,this.fetchSelf("immediate")))).then((e=>{e&&(this.sourceJSON=e,this.read(e))}));return a.id?a.id.getCredential(this.restUrl,{prompt:this.authMode!==M.AUTH_MODE_NO_PROMPT}).then((t=>e(t))):e(this.credential)}normalizeUrl(e){const t=this.credential?.token;return this._normalizeSSL(t?e+(e.includes("?")?"&":"?")+"token="+t:e)}requestToTypedArray(e,t,r){return this.request(e,t).then((e=>{const t=M._resultsToTypedArray(r,{portal:this},e);return Promise.all(t.map((t=>"function"==typeof t.when?t.when():e))).then((()=>t),(()=>t))}))}request(e,t={}){const r={f:"json",...t.query},{authMode:s=(this.authMode===M.AUTH_MODE_ANONYMOUS||this.authMode===M.AUTH_MODE_NO_PROMPT?this.authMode:"auto"),body:i=null,cacheBust:a=!1,method:o="auto",responseType:l="json",signal:c}=t,u={authMode:s,body:i,cacheBust:a,method:o,query:r,responseType:l,timeout:0,signal:c};return t.withCredentials&&(u.withCredentials=!0),(0,n.c)(this._normalizeSSL(e),u).then((e=>e.data))}toJSON(){throw new o.c("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new M({sourceJSON:e})}_getHelperService(e){const t=this.helperServices&&this.helperServices[e];if(!t)throw new o.c("portal:service-not-found",`The \`helperServices\` do not include an entry named "${e}"`);return t}async _fetchBasemaps(e,t){const r=new S.c;r.query=e||(i.default.apiKey&&(0,I.s)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const s=await this.queryGroups(r,t);if(!s.total)return[];const a=s.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=a.sortField||"name",r.sortOrder=a.sortOrder||"desc";const n=await a.queryItems(r,t);return n.total?n.results.filter((e=>"Web Map"===e.type)).map((e=>new L({portalItem:e}))):[]}async _fetchBasemaps3D(e,t){const r=e||this.basemapGalleryGroupQuery3D;if(!r)return[];const s=new S.c({query:r,disableExtraQuery:!0}),i=await this.queryGroups(s,t);if(!i.total)return[];const a=i.results[0];s.num=100,s.query='type:"Web Scene"',s.sortField=a.sortField||"name",s.sortOrder=a.sortOrder||"desc";const n=await a.queryItems(s,t);return n.total?n.results.filter((e=>"Web Scene"===e.type)).map((e=>new L({portalItem:e}))):[]}_normalizeSSL(e){return e.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(e){if(e){const t=L.fromJSON(e);return t.portalItem={portal:this},t}return null}static _resultsToTypedArray(e,t,r,s){let i=[];if(r){const a=null!=s?s.signal:null;i=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(e||t)&&(i=i.map((r=>{const s=Object.assign(e?e.fromJSON(r):r,t);return"function"==typeof s.load&&s.load(a),s})))}else i=[];return i}};x.AUTH_MODE_ANONYMOUS="anonymous",x.AUTH_MODE_AUTO="auto",x.AUTH_MODE_IMMEDIATE="immediate",x.AUTH_MODE_NO_PROMPT="no-prompt",(0,s._)([(0,d.qq)()],x.prototype,"access",void 0),(0,s._)([(0,d.qq)()],x.prototype,"allSSL",void 0),(0,s._)([(0,d.qq)()],x.prototype,"authMode",void 0),(0,s._)([(0,d.qq)()],x.prototype,"authorizedCrossOriginDomains",void 0),(0,s._)([(0,h.E)("authorizedCrossOriginDomains")],x.prototype,"readAuthorizedCrossOriginDomains",null),(0,s._)([(0,d.qq)()],x.prototype,"basemapGalleryGroupQuery",void 0),(0,s._)([(0,d.qq)({json:{name:"3DBasemapGalleryGroupQuery"}})],x.prototype,"basemapGalleryGroupQuery3D",void 0),(0,s._)([(0,d.qq)()],x.prototype,"bingKey",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canListApps",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canListData",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canListPreProvisionedItems",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canProvisionDirectPurchase",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSearchPublic",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canShareBingPublic",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSharePublic",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSignInArcGIS",void 0),(0,s._)([(0,d.qq)()],x.prototype,"canSignInIDP",void 0),(0,s._)([(0,d.qq)()],x.prototype,"colorSetsGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"commentsEnabled",void 0),(0,s._)([(0,d.qq)({type:Date})],x.prototype,"created",void 0),(0,s._)([(0,d.qq)()],x.prototype,"credential",void 0),(0,s._)([(0,d.qq)()],x.prototype,"culture",void 0),(0,s._)([(0,d.qq)()],x.prototype,"currentVersion",void 0),(0,s._)([(0,d.qq)()],x.prototype,"customBaseUrl",void 0),(0,s._)([(0,d.qq)()],x.prototype,"defaultBasemap",void 0),(0,s._)([(0,h.E)("defaultBasemap")],x.prototype,"readDefaultBasemap",null),(0,s._)([(0,d.qq)()],x.prototype,"defaultDevBasemap",void 0),(0,s._)([(0,h.E)("defaultDevBasemap")],x.prototype,"readDefaultDevBasemap",null),(0,s._)([(0,d.qq)({type:g.c})],x.prototype,"defaultExtent",void 0),(0,s._)([(0,d.qq)()],x.prototype,"defaultVectorBasemap",void 0),(0,s._)([(0,h.E)("defaultVectorBasemap")],x.prototype,"readDefaultVectorBasemap",null),(0,s._)([(0,d.qq)()],x.prototype,"description",void 0),(0,s._)([(0,d.qq)()],x.prototype,"devBasemapGalleryGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"eueiEnabled",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"extraQuery",null),(0,s._)([(0,d.qq)()],x.prototype,"featuredGroups",void 0),(0,s._)([(0,d.qq)()],x.prototype,"featuredItemsGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"galleryTemplatesGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"layoutGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"livingAtlasGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"hasCategorySchema",void 0),(0,s._)([(0,d.qq)()],x.prototype,"helpBase",void 0),(0,s._)([(0,d.qq)()],x.prototype,"helperServices",void 0),(0,s._)([(0,d.qq)()],x.prototype,"helpMap",void 0),(0,s._)([(0,d.qq)()],x.prototype,"homePageFeaturedContent",void 0),(0,s._)([(0,d.qq)()],x.prototype,"homePageFeaturedContentCount",void 0),(0,s._)([(0,d.qq)()],x.prototype,"httpPort",void 0),(0,s._)([(0,d.qq)()],x.prototype,"httpsPort",void 0),(0,s._)([(0,d.qq)()],x.prototype,"id",void 0),(0,s._)([(0,d.qq)()],x.prototype,"ipCntryCode",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"isOrganization",null),(0,s._)([(0,d.qq)()],x.prototype,"isPortal",void 0),(0,s._)([(0,d.qq)()],x.prototype,"isReadOnly",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"itemPageUrl",null),(0,s._)([(0,d.qq)()],x.prototype,"layerTemplatesGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"maxTokenExpirationMinutes",void 0),(0,s._)([(0,d.qq)({type:Date})],x.prototype,"modified",void 0),(0,s._)([(0,d.qq)()],x.prototype,"name",void 0),(0,s._)([(0,d.qq)()],x.prototype,"portalHostname",void 0),(0,s._)([(0,d.qq)()],x.prototype,"portalMode",void 0),(0,s._)([(0,d.qq)()],x.prototype,"portalProperties",void 0),(0,s._)([(0,d.qq)()],x.prototype,"region",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"restUrl",null),(0,s._)([(0,d.qq)()],x.prototype,"rotatorPanels",void 0),(0,s._)([(0,d.qq)()],x.prototype,"showHomePageDescription",void 0),(0,s._)([(0,d.qq)()],x.prototype,"sourceJSON",void 0),(0,s._)([(0,d.qq)()],x.prototype,"staticImagesUrl",void 0),(0,s._)([(0,d.qq)({json:{name:"2DStylesGroupQuery"}})],x.prototype,"stylesGroupQuery2d",void 0),(0,s._)([(0,d.qq)({json:{name:"stylesGroupQuery"}})],x.prototype,"stylesGroupQuery3d",void 0),(0,s._)([(0,d.qq)()],x.prototype,"supportsHostedServices",void 0),(0,s._)([(0,d.qq)()],x.prototype,"symbolSetsGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"templatesGroupQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"thumbnail",void 0),(0,s._)([(0,d.qq)({readOnly:!0})],x.prototype,"thumbnailUrl",null),(0,s._)([(0,d.qq)()],x.prototype,"units",void 0),(0,s._)([(0,d.qq)()],x.prototype,"url",void 0),(0,s._)([(0,d.qq)()],x.prototype,"urlKey",void 0),(0,s._)([(0,h.E)("urlKey")],x.prototype,"readUrlKey",null),(0,s._)([(0,d.qq)()],x.prototype,"user",void 0),(0,s._)([(0,h.E)("user")],x.prototype,"readUser",null),(0,s._)([(0,d.qq)()],x.prototype,"use3dBasemaps",void 0),(0,s._)([(0,d.qq)()],x.prototype,"useStandardizedQuery",void 0),(0,s._)([(0,d.qq)()],x.prototype,"useVectorBasemaps",void 0),(0,s._)([(0,d.qq)()],x.prototype,"vectorBasemapGalleryGroupQuery",void 0),x=M=(0,s._)([(0,m.c)("geoscene.portal.Portal")],x);const U=x,k=new FinalizationRegistry((e=>{e.remove()}))},62504:(e,t,r)=>{r.d(t,{c:()=>d});var s,i=r(41948),a=r(20744),n=r(40504),o=r(1580),l=r(53368),c=(r(72052),r(9456),r(12552)),u=r(30872);let p=s=class extends n.am{constructor(e){super(e),this.access=null,this.created=null,this.description=null,this.id=null,this.isInvitationOnly=!1,this.modified=null,this.owner=null,this.portal=null,this.snippet=null,this.sortField=null,this.sortOrder=null,this.sourceJSON=null,this.tags=null,this.title=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t&&this.portal?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`):null}get url(){const e=this.portal?.restUrl;return e?e+"/community/groups/"+this.id:null}fetchCategorySchema(e){return this.portal.request(this.url+"/categorySchema",e).then((t=>{const r=t.categorySchema||[];return r.some((e=>"contentCategorySetsGroupQuery.LivingAtlas"===e.source))?this._fetchCategorySchemaSet("LivingAtlas",e):r}))}fetchMembers(e){return this.portal.request(this.url+"/users",e)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}toJSON(){throw new a.c("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new s;return t.sourceJSON=e,t.read(e),t}queryItems(e,t){let r=(0,l.ey)(u.c,e);const s=this.portal;return parseFloat(s.currentVersion)>5?(r=r||new u.c,s.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",t)):(r=r?r.clone():new u.c,r.query="group:"+this.id+(r.query?" "+r.query:""),s.queryItems(r,t))}_fetchCategorySchemaSet(e,t){const r=this.portal;return r.fetchSelf(r.authMode,!0,t).then((e=>{const s=e.contentCategorySetsGroupQuery;if(s){const e=new u.c;return e.disableExtraQuery=!0,e.num=1,e.query=s,r.queryGroups(e,t)}throw new a.c("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const s=r.results[0],i=new u.c;return i.num=1,i.query=`typekeywords:"${e}"`,s.queryItems(i,t)}throw new a.c("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((e=>e.total?e.results[0].fetchData("json",t).then((e=>{const t=e?.categorySchema;return t?.length?t:[]})):[]))}};(0,i._)([(0,o.qq)()],p.prototype,"access",void 0),(0,i._)([(0,o.qq)({type:Date})],p.prototype,"created",void 0),(0,i._)([(0,o.qq)()],p.prototype,"description",void 0),(0,i._)([(0,o.qq)()],p.prototype,"id",void 0),(0,i._)([(0,o.qq)()],p.prototype,"isInvitationOnly",void 0),(0,i._)([(0,o.qq)({type:Date})],p.prototype,"modified",void 0),(0,i._)([(0,o.qq)()],p.prototype,"owner",void 0),(0,i._)([(0,o.qq)()],p.prototype,"portal",void 0),(0,i._)([(0,o.qq)()],p.prototype,"snippet",void 0),(0,i._)([(0,o.qq)()],p.prototype,"sortField",void 0),(0,i._)([(0,o.qq)()],p.prototype,"sortOrder",void 0),(0,i._)([(0,o.qq)()],p.prototype,"sourceJSON",void 0),(0,i._)([(0,o.qq)()],p.prototype,"tags",void 0),(0,i._)([(0,o.qq)()],p.prototype,"thumbnail",void 0),(0,i._)([(0,o.qq)({readOnly:!0})],p.prototype,"thumbnailUrl",null),(0,i._)([(0,o.qq)()],p.prototype,"title",void 0),(0,i._)([(0,o.qq)({readOnly:!0})],p.prototype,"url",null),p=s=(0,i._)([(0,c.c)("geoscene.portal.PortalGroup")],p);const d=p},9764:(e,t,r)=>{r.r(t),r.d(t,{default:()=>O});var s=r(41948),i=r(24832),a=r(20744),n=r(40504),o=r(62088),l=r(95800),c=r(28176),u=r(1580),p=r(53368),d=r(33600),y=r(12552),h=r(95247),m=r(54872),g=r(43780),f=r(66360),b=r(33392);r(72052),r(9456);let v=class extends g.c{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e?.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){null!=e&&(0,c.ic)(e)?f.c.getLogger(this).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get cdnUrl(){return this.portalItem&&this.path?`${this.portalItem.itemCdnUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const r=this.cdnUrl;if(null==r)throw new a.c("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal.request(r,{responseType:e,query:{token:this.portalItem.apiKey},signal:t?.signal})}async update(e,t){const{addOrUpdateResources:s}=await r.e(8240).then(r.bind(r,38240));return await s(this.portalItem,[{resource:this,content:e,compress:t?.compress,access:t?.access}],"update",t),this}hasPath(){return null!=this.path}_normalizePath(e,t){return null==e?e:(e=e.replace(/^\/+/,""),null!=t&&(0,c.ic)(e)&&(e=(0,c.SU)(e,t.itemUrl)),e?.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,s._)([(0,u.qq)()],v.prototype,"portalItem",void 0),(0,s._)([(0,u.qq)({type:String,value:null})],v.prototype,"path",null),(0,s._)([(0,b.W)("path")],v.prototype,"_castPath",null),(0,s._)([(0,u.qq)({type:String,readOnly:!0})],v.prototype,"url",null),(0,s._)([(0,u.qq)({type:String,readOnly:!0})],v.prototype,"cdnUrl",null),(0,s._)([(0,u.qq)({type:String,readOnly:!0})],v.prototype,"itemRelativeUrl",null),v=(0,s._)([(0,y.c)("geoscene.portal.PortalItemResource")],v);const S=v;let q=class extends g.c{constructor(e){super(e),this.created=null,this.rating=null}};(0,s._)([(0,u.qq)()],q.prototype,"created",void 0),(0,s._)([(0,u.qq)()],q.prototype,"rating",void 0),q=(0,s._)([(0,y.c)("geoscene.portal.PortalRating")],q);const w=q;var _,M=r(91952);const T=new Set(["3DTiles Service","CSV","Feature Collection","Feature Service","Feed","GeoJson","Group Layer","Image Service","KML","Map Service","Media Layer","Scene Service","Stream Service","Vector Tile Service","WFS","WMS","WMTS"]),I=new Set(["KML","GeoJson","CSV"]);let L=_=class extends((0,n.Ib)(l.c)){static from(e){return(0,p.uY)(_,e)}constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.isOrgItem=!1,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.sourceUrl=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let r=e;return"Feature Service"===e||"Feature Collection"===e?r=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?r=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?r="Scene Layer":"Video Service"===e?r="Video Layer":"Scene Package"===e?r="Scene Layer Package":"Stream Service"===e?r="Feature Layer":"Geoprocessing Service"===e?r=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geoenrichment Service"===e?r="GeoEnrichment Service":"Geocoding Service"===e?r="Locator":"Microsoft Powerpoint"===e?r="Microsoft PowerPoint":"GeoJson"===e?r="GeoJSON":"Globe Service"===e?r="Globe Layer":"Vector Tile Service"===e?r="Tile Layer":"netCDF"===e?r="NetCDF":"Map Service"===e?r=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e&&e.toLowerCase().includes("add in")?r=e.replaceAll(/(add in)/gi,"Add-In"):"datastore catalog service"===e?r="Big Data File Share":"Compact Tile Package"===e?r="Tile Package (tpkx)":"Raster function template"===e?r="Raster Function Template":"OGCFeatureServer"===e?r="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")?r="Instant App":"Insights Page"===e?r="Insights Report":"Excalibur Imagery Project"===e?r="Excalibur Project":"3DTiles Service"===e?r="3D tiles layer":"3DTiles Package"===e&&(r="3D tiles package"),r}readExtent(e){return e&&e.length?new h.c(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type?.toLowerCase()||"",t=this.typeKeywords||[];let r,s=!1,a=!1,n=!1,o=!1,l=!1,c=!1,u=!1,p=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(s=t.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(a=t.includes("Table"),n=t.includes("Route Layer"),o=t.includes("Markup"),l=t.includes("Spatiotemporal"),c=t.includes("UtilityNetwork"),r=l&&a?"spatiotemporaltable":a?"table":n?"routelayer":o?"markup":l?"spatiotemporal":c?"utilitynetwork":s?"featureshosted":"features"):"map service"===e||"wms"===e||"wmts"===e?(l=t.includes("Spatiotemporal"),u=t.includes("Relational"),r=l||u?"mapimages":s||t.includes("Tiled")||"wmts"===e?"maptiles":"mapimages"):r="scene service"===e?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"video service"===e?t.includes("Live Stream")?"livestreamvideolayer":"videolayer":"geoprocessing service"===e?t.includes("Web Tool")?"tool":"layers":"geodata service"===e?"geodataservice":"3dtiles service"===e?t.includes("3DObject")?"3dobjecttileslayer":t.includes("IntegratedMesh")?"integratedmeshtileslayer":"3dtileslayer":"layers"):"web map"===e||"cityengine web scene"===e?r="maps":"web scene"===e?r=t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.includes("configurableApp")?r="instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?r="apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.includes("ArcGIS Pro")||"explorer map"===e&&t.indexOf("Explorer Document")?r="mapsgray":"service definition"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"netcdf"===e||"administrative report"===e?r="datafiles":"360 vr experience"===e?r="360vr":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?r="appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?r="addindesktop":"pdf"===e?r="pdf":"microsoft word"===e?r="word":"microsoft excel"===e?r="excel":"microsoft powerpoint"===e?r="ppt":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"workflow manager package"===e||"explorer map"===e&&t.includes("Explorer Mapping Application")||t.includes("Document")?r="datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?r="toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?r="layersgray":"scene package"===e?r="scenepackage":"3dtiles package"===e?r="3dtileslayerpackage":"3dtiles service"===e?r="3dtileslayer":"mobile scene package"===e?r="mobilescenepackage":"tile package"===e||"compact tile package"===e?r="tilepackage":"task file"===e?r="taskfile":"report template"===e?r="report-template":"statistical data collection"===e?r="statisticaldatacollection":"insights workbook"===e?r="workbook":"insights model"===e?r="insightsmodel":"insights page"===e?r="insightspage":"insights theme"===e?r="insightstheme":"hub initiative"===e?r="hubinitiative":"hub page"===e?r="hubpage":"hub site application"===e?r="hubsite":"hub event"===e?r="hubevent":"hub project"===e?r="hubproject":"relational database connection"===e?r="relationaldatabaseconnection":"big data file share"===e?r="datastorecollection":"image collection"===e?r="imagecollection":"desktop style"===e?r="desktopstyle":"style"===e?r="style":"dashboard"===e?r="dashboard":"raster function template"===e?r="rasterprocessingtemplate":"vector tile package"===e?r="vectortilepackage":"ortho mapping project"===e?r="orthomappingproject":"ortho mapping template"===e?r="orthomappingtemplate":"solution"===e?r="solutions":"geopackage"===e?r="geopackage":"deep learning package"===e?r="deeplearningpackage":"real time analytic"===e?r="realtimeanalytics":"big data analytic"===e?r="bigdataanalytics":"feed"===e?r="feed":"excalibur imagery project"===e?r="excaliburimageryproject":"notebook"===e?r="notebook":"storymap"===e?r="storymap":"survey123 add in"===e?r="survey123addin":"mission"===e?r="mission":"mission report"===e?r="missionreport":"mission template"===e?r="missiontemplate":"quickcapture project"===e?r="quickcaptureproject":"pro report"===e?r="proreport":"pro report template"===e?r="proreporttemplate":"urban model"===e?r="urbanmodel":"web experience"===e?r="experiencebuilder":"web experience template"===e?r="webexperiencetemplate":"experience builder widget"===e?r="experiencebuilderwidget":"experience builder widget package"===e?r="experiencebuilderwidgetpackage":"workflow"===e?r="workflow":"kernel gateway connection"===e?r="kernelgatewayconnection":"insights script"===e?r="insightsscript":"hub initiative template"===e?r="hubinitiativetemplate":"storymap theme"===e?r="storymaptheme":"knowledge graph"===e?r="knowledgegraph":"knowledge studio project"===e?r="knowledgestudio":"native application"===e?r="nativeapp":"native application installer"===e?r="nativeappinstaller":"web link chart"===e?r="linkchart":"knowledge graph web investigation"===e?r="investigation":"ogcfeatureserver"===e?r="features":"pro project"===e?r="proproject":"insights workbook package"===e?r="insightsworkbookpackage":"apache parquet"===e?r="apacheparquet":"notebook code snippets"===e||"notebook code snippet library"===e?r="notebookcodesnippets":"suitability model"===e?r="suitabilitymodel":"esri classifier definition"===e?r="classifierdefinition":"esri classification schema"===e?r="classificationschema":"insights data engineering workbook"===e?r="dataengineeringworkbook":"insights data engineering model"===e?r="dataengineeringmodel":"deep learning studio project"===e?r="deeplearningproject":"discussion"===e?r="discussion":"allsource project"===e?r="allsourceproject":"api key"===e?r="apikey":"data pipeline"===e?r="datapipelines":"group layer"===e?(p=t.includes("Map"),r=p?"layergroup2d":"layergroup"):r="media layer"===e?"onlinemedialayer":"form"===e?t.includes("Survey123")?"survey":"datafilesgray":"csv"===e?"csv":"image"===e?"image":"maps",r?(0,i.O)("geoscene/images/portal/"+r+"16.png"):null}get isLayer(){return null!=this.type&&T.has(this.type)}get itemCdnUrl(){return(0,M.a)(this.itemUrl)}get itemPageUrl(){const e=this.portal?.itemPageUrl;return e&&this.id?`${e}?id=${this.id}`:null}get itemUrl(){const e=this.portal?.restUrl;return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal?.normalizeUrl(`${e}/info/${t}?f=json`)??null:null}get userItemUrl(){const e=this.portal?.restUrl;if(!e)return null;const t=this.owner||this.portal?.user?.username;return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){const t=this.portal??(this.portal=m.c.getDefault()),r=t.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?t.request(this.itemUrl,{signal:null!=e?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(r),Promise.resolve(this)}async addRating(e){const t={method:"post",query:{}};return e instanceof w&&(e=e.rating),null==e||isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal?(await this.portal.request(this.itemUrl+"/addRating",t),new w({rating:e,created:new Date})):null}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,o.ct)(this.applicationProxies),avgRating:this.avgRating,categories:(0,o.ct)(this.categories),created:(0,o.ct)(this.created),culture:this.culture,description:this.description,extent:(0,o.ct)(this.extent),groupCategories:(0,o.ct)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,o.ct)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,o.ct)(this.screenshots),size:this.size,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,o.ct)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,o.ct)(this.typeKeywords),url:this.url};this.loaded&&(e.loadStatus="loaded");const t=new _({sourceJSON:this.sourceJSON}).set(e);return t._set("isOrgItem",this.isOrgItem),t}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]=e[t]?.join(", ");const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}async deleteRating(){await this.portal.request(this.itemUrl+"/deleteRating",{method:"post"})}fetchData(e="json",t){return this.portal.request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}async fetchRating(e){const t=await this.portal.request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e});return null!=t.rating?(t.created=new Date(t.created),new w(t)):null}fetchRelatedItems(e,t){return this.portal.requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},_)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal.request(this.itemUrl??"",{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e?.data,r={method:"post"};r.query=this.createPostQuery();for(const e in r.query)null===r.query[e]&&(r.query[e]="");return r.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?r.query.text=t:"object"==typeof t&&(r.query.text=JSON.stringify(t))),this.portal.request(`${this.userItemUrl}/update`,r).then((()=>this.reload()))})):Promise.reject(new a.c("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async copy(e){if(!this.id)throw new a.c("portal:item-does-not-exist","The item does not exist yet");await this.load();const{portal:t,itemUrl:r}=this;await t.signIn();const{copyResources:s,folder:i,tags:n,title:o}=e||{},l={method:"post",query:{copyPrivateResources:"all"===s,folder:"string"==typeof i?i:i?.id,includeResources:!!s,tags:n?.join(","),title:o}},{itemId:c}=await t.request(`${r}/copy`,l);return new _({id:c,portal:t})}updateThumbnail(e){return this.id?this.load().then((()=>this.portal.signIn())).then((()=>{const t=e.thumbnail,r=e.filename,s={method:"post"};if("string"==typeof t)(0,c.o9)(t)?s.query={data:t}:s.query={url:(0,c.WM)(t)},null!=r&&(s.query.filename=r);else{const e=new FormData;null!=r?e.append("file",t,r):e.append("file",t),s.body=e}return this.portal.request(`${this.userItemUrl}/updateThumbnail`,s).then((()=>this.reload()))})):Promise.reject(new a.c("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){const{fetchResources:s}=await r.e(8240).then(r.bind(r,38240));return s(this,e,t)}async addResource(e,t,s){const{addOrUpdateResources:i}=await r.e(8240).then(r.bind(r,38240));return e.portalItem=this,await i(this,[{resource:e,content:t,compress:s?.compress,access:s?.access}],"add",s),e}async removeResource(e,t){const{removeResource:s}=await r.e(8240).then(r.bind(r,38240));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new a.c("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return s(this,e,t)}async removeAllResources(e){const{removeAllResources:t}=await r.e(8240).then(r.bind(r,38240));return t(this,e)}resourceFromPath(e){return new S({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:(0,o.ct)(this.categories),created:this.created?.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,isOrgItem:this.isOrgItem,licenseInfo:this.licenseInfo,modified:this.modified?.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,sourceUrl:this.sourceUrl,spatialReference:this.spatialReference,tags:(0,o.ct)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,o.ct)(this.typeKeywords),url:this.url};return(0,o.MV)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new _({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,s._)([(0,u.qq)({type:["private","shared","org","public"]})],L.prototype,"access",void 0),(0,s._)([(0,u.qq)()],L.prototype,"accessInformation",void 0),(0,s._)([(0,u.qq)({type:String})],L.prototype,"apiKey",void 0),(0,s._)([(0,u.qq)({json:{read:{source:"appProxies"}}})],L.prototype,"applicationProxies",void 0),(0,s._)([(0,u.qq)()],L.prototype,"avgRating",void 0),(0,s._)([(0,u.qq)()],L.prototype,"categories",void 0),(0,s._)([(0,u.qq)({type:Date})],L.prototype,"created",void 0),(0,s._)([(0,u.qq)()],L.prototype,"culture",void 0),(0,s._)([(0,u.qq)()],L.prototype,"description",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"displayName",null),(0,s._)([(0,u.qq)({type:h.c})],L.prototype,"extent",void 0),(0,s._)([(0,d.E)("extent")],L.prototype,"readExtent",null),(0,s._)([(0,u.qq)()],L.prototype,"groupCategories",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"iconUrl",null),(0,s._)([(0,u.qq)()],L.prototype,"id",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"isLayer",null),(0,s._)([(0,u.qq)({type:Boolean,readOnly:!0})],L.prototype,"isOrgItem",void 0),(0,s._)([(0,u.qq)()],L.prototype,"itemControl",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"itemPageUrl",null),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"itemUrl",null),(0,s._)([(0,u.qq)()],L.prototype,"licenseInfo",void 0),(0,s._)([(0,u.qq)({type:Date})],L.prototype,"modified",void 0),(0,s._)([(0,u.qq)()],L.prototype,"name",void 0),(0,s._)([(0,u.qq)()],L.prototype,"numComments",void 0),(0,s._)([(0,u.qq)()],L.prototype,"numRatings",void 0),(0,s._)([(0,u.qq)()],L.prototype,"numViews",void 0),(0,s._)([(0,u.qq)()],L.prototype,"owner",void 0),(0,s._)([(0,u.qq)()],L.prototype,"ownerFolder",void 0),(0,s._)([(0,u.qq)({type:m.c})],L.prototype,"portal",void 0),(0,s._)([(0,u.qq)()],L.prototype,"screenshots",void 0),(0,s._)([(0,u.qq)()],L.prototype,"size",void 0),(0,s._)([(0,u.qq)()],L.prototype,"snippet",void 0),(0,s._)([(0,u.qq)()],L.prototype,"sourceJSON",void 0),(0,s._)([(0,u.qq)({type:String})],L.prototype,"sourceUrl",void 0),(0,s._)([(0,u.qq)({type:String})],L.prototype,"spatialReference",void 0),(0,s._)([(0,u.qq)()],L.prototype,"tags",void 0),(0,s._)([(0,u.qq)()],L.prototype,"thumbnail",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"thumbnailUrl",null),(0,s._)([(0,u.qq)()],L.prototype,"title",void 0),(0,s._)([(0,u.qq)()],L.prototype,"type",void 0),(0,s._)([(0,u.qq)()],L.prototype,"typeKeywords",void 0),(0,s._)([(0,u.qq)({type:String,json:{read(e,t){if(I.has(t.type)){const t=this.portal?.restUrl;e||=t&&this.id?`${t}/content/items/${this.id}/data`:null}return e}}})],L.prototype,"url",void 0),(0,s._)([(0,u.qq)({readOnly:!0})],L.prototype,"userItemUrl",null),L=_=(0,s._)([(0,y.c)("geoscene.portal.PortalItem")],L);const O=L},30872:(e,t,r)=>{r.d(t,{c:()=>m});var s,i=r(41948),a=r(43780),n=r(14628),o=r(62088),l=r(1580),c=(r(9456),r(66360),r(12552)),u=r(95247),p=r(56156),d=r(29120);const y=new n.O({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let h=s=class extends a.c{constructor(e){super(e),this.categories=null,this.disableExtraQuery=!1,this.extent=null,this.filter=null,this.num=10,this.query=null,this.sortField=null,this.start=1}get sortOrder(){return this._get("sortOrder")||"asc"}set sortOrder(e){"asc"!==e&&"desc"!==e||this._set("sortOrder",e)}clone(){return new s({categories:this.categories?(0,o.ct)(this.categories):null,disableExtraQuery:this.disableExtraQuery,extent:this.extent?this.extent.clone():null,filter:this.filter,num:this.num,query:this.query,sortField:this.sortField,sortOrder:this.sortOrder,start:this.start})}toRequestOptions(e,t){let r=[];this.categories&&(r=this.categories.map((e=>Array.isArray(e)?JSON.stringify(e):e)));let s="";if(this.extent){const e=(0,d.yU)(this.extent,p.c.WGS84);null!=e&&(s=`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`)}let i=this.query;!this.disableExtraQuery&&e.extraQuery&&(i="("+i+")"+e.extraQuery);const a={categories:r,bbox:s,q:i,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(a.sortField=this.sortField.split(",").map((e=>y.toJSON(e.trim()))).join(","),a.sortOrder=this.sortOrder),{query:{...t,...a}}}};(0,i._)([(0,l.qq)()],h.prototype,"categories",void 0),(0,i._)([(0,l.qq)()],h.prototype,"disableExtraQuery",void 0),(0,i._)([(0,l.qq)({type:u.c})],h.prototype,"extent",void 0),(0,i._)([(0,l.qq)()],h.prototype,"filter",void 0),(0,i._)([(0,l.qq)()],h.prototype,"num",void 0),(0,i._)([(0,l.qq)()],h.prototype,"query",void 0),(0,i._)([(0,l.qq)()],h.prototype,"sortField",void 0),(0,i._)([(0,l.qq)()],h.prototype,"sortOrder",null),(0,i._)([(0,l.qq)()],h.prototype,"start",void 0),h=s=(0,i._)([(0,c.c)("geoscene.portal.PortalQueryParams")],h);const m=h},53039:(e,t,r)=>{r.d(t,{c:()=>y});var s=r(41948),i=r(20744),a=r(40504),n=r(1580),o=(r(9456),r(66360),r(72052),r(12552));let l=class extends a.am{constructor(e){super(e),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const e=this.portal?.restUrl;return e?`${e}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new i.c("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,s._)([(0,n.qq)({type:Date})],l.prototype,"created",void 0),(0,s._)([(0,n.qq)()],l.prototype,"id",void 0),(0,s._)([(0,n.qq)()],l.prototype,"portal",void 0),(0,s._)([(0,n.qq)()],l.prototype,"title",void 0),(0,s._)([(0,n.qq)({readOnly:!0})],l.prototype,"url",null),(0,s._)([(0,n.qq)()],l.prototype,"username",void 0),l=(0,s._)([(0,o.c)("geoscene.portal.PortalFolder")],l);const c=l;var u,p=r(62504);let d=u=class extends a.am{constructor(...e){super(...e),this.access=null,this.created=null,this.culture=null,this.description=null,this.email=null,this.fullName=null,this.modified=null,this.orgId=null,this.portal=null,this.preferredView=null,this.privileges=null,this.region=null,this.role=null,this.roleId=null,this.sourceJSON=null,this.units=null,this.username=null,this.userType=null}get thumbnailUrl(){const e=this.url,t=this.thumbnail;return e&&t?this.portal.normalizeUrl(`${e}/info/${t}?f=json`):null}get userContentUrl(){const e=this.portal?.restUrl;return e?`${e}/content/users/${this.username}`:null}get url(){const e=this.portal?.restUrl;return e?`${e}/community/users/${this.username}`:null}addItem(e){const t=e&&e.item,r=e?.data,s=e?.folder,i={method:"post"};t&&(i.query=t.createPostQuery(),null!=r&&("string"==typeof r?i.query.text=r:"object"==typeof r&&(i.query.text=JSON.stringify(r))));let a=this.userContentUrl;return s&&(a+="/"+("string"==typeof s?s:s.id)),this.portal.request(a+"/addItem",i).then((e=>(t.id=e.id,t.portal=this.portal,t.loaded?t.reload():t.load())))}deleteItem(e){let t=this.userContentUrl;return e.ownerFolder&&(t+="/"+e.ownerFolder),this.portal.request(t+`/items/${e.id}/delete`,{method:"post"}).then((()=>{e.id=null,e.portal=null}))}deleteItems(e){const t=this.userContentUrl+"/deleteItems",r=e.map((e=>e.id));if(r.length){const s={method:"post",query:{items:r.join(",")}};return this.portal.request(t,s).then((()=>{e.forEach((e=>{e.id=null,e.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((e=>{let t;return t=e&&e.folders?e.folders.map((e=>{const t=c.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchGroups(){return this.portal.request(this.url??"").then((e=>{let t;return t=e&&e.groups?e.groups.map((e=>{const t=p.c.fromJSON(e);return t.portal=this.portal,t})):[],t}))}fetchItems(e){const t=e??{};let s,i=this.userContentUrl??"";return t.folder&&(i+="/"+t.folder.id),Promise.resolve().then(r.bind(r,9764)).then((({default:e})=>{s=e;const r={folders:!1,num:t.num||10,start:t.start||1,sortField:t.sortField||"created",sortOrder:t.sortOrder||"asc"};return this.portal.request(i,{query:r})})).then((e=>{let t;return e?.items?(t=e.items.map((e=>{const t=s.fromJSON(e);return t.portal=this.portal,t})),Promise.all(t.map((e=>e.load()))).catch((e=>e)).then((()=>({items:t,nextStart:e.nextStart,total:e.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((e=>e.tags))}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}queryFavorites(e){return this.favGroupId?(this._favGroup||(this._favGroup=new p.c({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(e)):Promise.reject(new i.c("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new i.c("internal:not-yet-implemented","PortalUser.toJSON is not yet implemented")}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");const t=new u;return t.sourceJSON=e,t.read(e),t}};(0,s._)([(0,n.qq)()],d.prototype,"access",void 0),(0,s._)([(0,n.qq)({type:Date})],d.prototype,"created",void 0),(0,s._)([(0,n.qq)()],d.prototype,"culture",void 0),(0,s._)([(0,n.qq)()],d.prototype,"description",void 0),(0,s._)([(0,n.qq)()],d.prototype,"email",void 0),(0,s._)([(0,n.qq)()],d.prototype,"favGroupId",void 0),(0,s._)([(0,n.qq)()],d.prototype,"fullName",void 0),(0,s._)([(0,n.qq)({type:Date})],d.prototype,"modified",void 0),(0,s._)([(0,n.qq)()],d.prototype,"orgId",void 0),(0,s._)([(0,n.qq)()],d.prototype,"portal",void 0),(0,s._)([(0,n.qq)()],d.prototype,"preferredView",void 0),(0,s._)([(0,n.qq)()],d.prototype,"privileges",void 0),(0,s._)([(0,n.qq)()],d.prototype,"region",void 0),(0,s._)([(0,n.qq)()],d.prototype,"role",void 0),(0,s._)([(0,n.qq)()],d.prototype,"roleId",void 0),(0,s._)([(0,n.qq)()],d.prototype,"sourceJSON",void 0),(0,s._)([(0,n.qq)()],d.prototype,"thumbnail",void 0),(0,s._)([(0,n.qq)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,s._)([(0,n.qq)()],d.prototype,"units",void 0),(0,s._)([(0,n.qq)({readOnly:!0})],d.prototype,"userContentUrl",null),(0,s._)([(0,n.qq)({readOnly:!0})],d.prototype,"url",null),(0,s._)([(0,n.qq)()],d.prototype,"username",void 0),(0,s._)([(0,n.qq)()],d.prototype,"userType",void 0),d=u=(0,s._)([(0,o.c)("geoscene.portal.PortalUser")],d);const y=d},41680:(e,t,r)=>{r.d(t,{CO:()=>o,Mn:()=>a,Mz:()=>n,ai:()=>i,eU:()=>l}),r(53648);var s=r(50144);r(74784),r(37008);const i=2.4;function a(e){return(0,s.WM)(e*i)}function n(e){return(0,s.im)(e)/i}function o(e,t,r){const s=Math.sqrt(e**2+t**2)/r;return s>1?0:3/(Math.PI*r**2)*(1-s**2)**2}function l(e){return"function"==typeof e?e:e?t=>+t[e]:()=>1}},88352:(e,t,r)=>{r.d(t,{c:()=>d});var s=r(41948),i=r(14628),a=r(40504),n=r(1580),o=(r(9456),r(66360),r(72052),r(9968)),l=r(12552);const c=new i.O({esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation",esriClassifyDefinedInterval:"defined-interval"}),u=new i.O({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:"percent-of-total",esriNormalizeByField:"field"});let p=class extends a.am{constructor(e){super(e),this.type="class-breaks-definition",this.breakCount=null,this.classificationField=null,this.classificationMethod=null,this.normalizationField=null,this.normalizationType=null}set standardDeviationInterval(e){"standard-deviation"===this.classificationMethod&&this._set("standardDeviationInterval",e)}set definedInterval(e){"defined-interval"===this.classificationMethod&&this._set("definedInterval",e)}};(0,s._)([(0,o.G)({classBreaksDef:"class-breaks-definition"})],p.prototype,"type",void 0),(0,s._)([(0,n.qq)({json:{write:!0}})],p.prototype,"breakCount",void 0),(0,s._)([(0,n.qq)({json:{write:!0}})],p.prototype,"classificationField",void 0),(0,s._)([(0,n.qq)({type:String,json:{read:c.read,write:c.write}})],p.prototype,"classificationMethod",void 0),(0,s._)([(0,n.qq)({json:{write:!0}})],p.prototype,"normalizationField",void 0),(0,s._)([(0,n.qq)({json:{read:u.read,write:u.write}})],p.prototype,"normalizationType",void 0),(0,s._)([(0,n.qq)({value:null,json:{write:!0}})],p.prototype,"standardDeviationInterval",null),(0,s._)([(0,n.qq)({value:null,json:{write:!0}})],p.prototype,"definedInterval",null),p=(0,s._)([(0,l.c)("geoscene.rest.support.ClassBreaksDefinition")],p);const d=p},19184:(e,t,r)=>{r.d(t,{W:()=>n});var s=r(66360);const i=()=>s.c.getLogger("geoscene.rest.support.generateRendererUtils");function a(e,t){return Number(e.toFixed(t))}function n(e){const{normalizationTotal:t}=e;return{classBreaks:o(e),normalizationTotal:t}}function o(e){const t=e.definition,{classificationMethod:r,normalizationType:s,definedInterval:i}=t,n=t.breakCount??1,o=[];let u=e.values;if(0===u.length)return[];u=u.sort(((e,t)=>e-t));const p=u[0],d=u[u.length-1];if("equal-interval"===r)if(u.length>=n){const e=(d-p)/n;let t=p;for(let r=1;r<n;r++){const i=a(p+r*e,6);o.push({minValue:t,maxValue:i,label:l(t,i,s)}),t=i}o.push({minValue:t,maxValue:d,label:l(t,d,s)})}else u.forEach((e=>{o.push({minValue:e,maxValue:e,label:l(e,e,s)})}));else if("natural-breaks"===r){const t=function(e){const t=[],r=[];let s=Number.MIN_VALUE,i=1,a=-1;for(let n=0;n<e.length;n++){const o=e[n];o===s?(i++,r[a]=i):null!==o&&(t.push(o),s=o,i=1,r.push(i),a++)}return{uniqueValues:t,valueFrequency:r}}(u),r=e.valueFrequency||t.valueFrequency,i=c(t.uniqueValues,r,n);let y=p;for(let e=1;e<n;e++)if(t.uniqueValues.length>e){const r=a(t.uniqueValues[i[e]],6);o.push({minValue:y,maxValue:r,label:l(y,r,s)}),y=r}o.push({minValue:y,maxValue:d,label:l(y,d,s)})}else if("quantile"===r)if(u.length>=n&&p!==d){let e=p,t=Math.ceil(u.length/n),r=0;for(let i=1;i<n;i++){let a=t+r-1;a>u.length&&(a=u.length-1),a<0&&(a=0),o.push({minValue:e,maxValue:u[a],label:l(e,u[a],s)}),e=u[a],r+=t,t=Math.ceil((u.length-r)/(n-i))}o.push({minValue:e,maxValue:d,label:l(e,d,s)})}else{let e=-1;for(let t=0;t<u.length;t++){const r=u[t];r!==e&&(e=r,o.push({minValue:e,maxValue:r,label:l(e,r,s)}),e=r)}}else if("standard-deviation"===r){const e=function(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t/=e.length,t}(u),t=function(e,t){let r=0;for(let s=0;s<e.length;s++){const i=e[s];r+=(i-t)*(i-t)}return r/=e.length,Math.sqrt(r)}(u,e);if(0===t)o.push({minValue:u[0],maxValue:u[0],label:l(u[0],u[0],s)});else{const r=function(e,t,r,s,i){let a=Math.max(s-e,t-s)/i/r;return a=a>=1?1:a>=.5?.5:.25,a}(p,d,n,e,t)*t;let i=0,c=p;for(let t=n;t>=1;t--){const n=a(e-(t-.5)*r,6);o.push({minValue:c,maxValue:n,label:l(c,n,s)}),c=n,i++}let u=a(e+.5*r,6);o.push({minValue:c,maxValue:u,label:l(c,u,s)}),c=u,i++;for(let t=1;t<=n;t++)u=i===2*n?d:a(e+(t+.5)*r,6),o.push({minValue:c,maxValue:u,label:l(c,u,s)}),c=u,i++}}else if("defined-interval"===r){if(!i)return o;const e=u[0],t=u[u.length-1],r=Math.ceil((t-e)/i);let n=e;for(let t=1;t<r;t++){const r=a(e+t*i,6);o.push({minValue:n,maxValue:r,label:l(n,r,s)}),n=r}o.push({minValue:n,maxValue:t,label:l(n,t,s)})}return o}function l(e,t,r){let s=null;return s=e===t?r&&"percent-of-total"===r?e+"%":e.toString():r&&"percent-of-total"===r?e+"% - "+t+"%":e+" - "+t,s}function c(e,t,r){const s=e.length,i=[];r>s&&(r=s);for(let e=0;e<r;e++)i.push(Math.round(e*s/r-1));i.push(s-1);let a=u(i,e,t,r);return function(e,t,r,s,i,a){let n=0,o=0,l=0,c=0,u=!0;for(let d=0;d<2&&u;d++){0===d&&(u=!1);for(let d=0;d<a-1;d++)for(;r[d+1]+1!==r[d+2];){r[d+1]=r[d+1]+1;const a=p(d,r,s,i);l=a.sbMean,n=a.sbSdcm;const y=p(d+1,r,s,i);if(c=y.sbMean,o=y.sbSdcm,!(n+o<t[d]+t[d+1])){r[d+1]=r[d+1]-1;break}t[d]=n,t[d+1]=o,e[d]=l,e[d+1]=c,u=!0}for(let d=a-1;d>0;d--)for(;r[d]!==r[d-1]+1;){r[d]=r[d]-1;const a=p(d-1,r,s,i);l=a.sbMean,n=a.sbSdcm;const y=p(d,r,s,i);if(c=y.sbMean,o=y.sbSdcm,!(n+o<t[d-1]+t[d])){r[d]=r[d]+1;break}t[d-1]=n,t[d]=o,e[d-1]=l,e[d]=c,u=!0}}return u}(a.mean,a.sdcm,i,e,t,r)&&(a=u(i,e,t,r)),i}function u(e,t,r,s){let i=[],a=[],n=[],o=0;const l=[],c=[];for(let i=0;i<s;i++){const s=p(i,e,t,r);l.push(s.sbMean),c.push(s.sbSdcm),o+=c[i]}let u,d=o,y=!0;for(;y||o<d;){y=!1,i=[];for(let t=0;t<s;t++)i.push(e[t]);for(let r=0;r<s;r++)for(let i=e[r]+1;i<=e[r+1];i++)if(u=t[i],r>0&&i!==e[r+1]&&Math.abs(u-l[r])>Math.abs(u-l[r-1]))e[r]=i;else if(r<s-1&&e[r]!==i-1&&Math.abs(u-l[r])>Math.abs(u-l[r+1])){e[r+1]=i-1;break}d=o,o=0,a=[],n=[];for(let i=0;i<s;i++){a.push(l[i]),n.push(c[i]);const s=p(i,e,t,r);l[i]=s.sbMean,c[i]=s.sbSdcm,o+=c[i]}}if(o>d){for(let t=0;t<s;t++)e[t]=i[t],l[t]=a[t],c[t]=n[t];o=d}return{mean:l,sdcm:c}}function p(e,t,r,s){let a=0,n=0;for(let i=t[e]+1;i<=t[e+1];i++){const e=s[i];a+=r[i]*e,n+=e}n<=0&&i().warn("Exception in Natural Breaks calculation");const o=a/n;let l=0;for(let i=t[e]+1;i<=t[e+1];i++)l+=s[i]*(r[i]-o)**2;return{sbMean:o,sbSdcm:l}}},41664:(e,t,r)=>{r.d(t,{yI:()=>g,GY:()=>b,Gu:()=>m,Mr:()=>f}),r(60708),r(20744);var s=r(50144),i=r(94360),a=r(56156),n=r(42736),o=r(60544),l=r(564),c=r(41680),u=(r(47828),r(6384));r(72208),r(6220),r(2952),r(66360),r(28176),r(53368),r(14644),r(21320),r(28484),new Set(["integer","small-integer"]);var p=r(76160),d=r(67776);let y=null;const h=/^(?<hh>([0-1][0-9])|([2][0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?([.](?<ms>\d+))?$/;function m(e,t,r,s){const i=(0,o.G4)(r)?(0,o.Nq)(r):null,a=i?Math.round((i.valid[1]-i.valid[0])/t.scale[0]):null;return e.map((e=>{const r=new d.c(e.geometry);return(0,n.QL)(t,r,r,r.hasZ,r.hasM),e.geometry=i?function(e,t,r){return e.x<0?e.x+=t:e.x>r&&(e.x-=t),e}(r,a??0,s[0]):r,e}))}function g(e,t=18,r,i,a){const n=new Float64Array(i*a);t=Math.round((0,s.im)(t));let o=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;const u=(0,c.eU)(r);for(const{geometry:r,attributes:s}of e){const{x:e,y:p}=r,d=Math.max(0,e-t),y=Math.max(0,p-t),h=Math.min(a,p+t),m=Math.min(i,e+t),g=+u(s);for(let r=y;r<h;r++)for(let s=d;s<m;s++){const a=r*i+s,u=(0,c.CO)(s-e,r-p,t)*g,d=n[a]+=u;o=Math.min(o,d),l=Math.max(l,d)}}return{min:o,max:l}}function f(e){const t=h.exec(e);if(!t)return null;const{hh:r,mm:s,ss:a,ms:n}=t.groups;return Number(r)*i.iC.hours+Number(s)*i.iC.minutes+Number(a)*i.iC.seconds+Number(n||0)}async function b(e,t,r=!0){if(!t)return[];const{field:s,field2:i,field3:n,fieldDelimiter:o,fieldInfos:c,timeZone:d}=e,h=s&&c?.find((e=>e.name.toLowerCase()===s.toLowerCase())),m=!!h&&(0,l.eM)(h),g=!!h&&function(e){return(0,l.gp)(e)||(0,l.yM)(e)||(0,l.Oo)(e)}(h),b=e.valueExpression,v=e.normalizationType,S=e.normalizationField,q=e.normalizationTotal,w=[],_=e.viewInfoParams;let M=null,T=null;if(b){if(!y){const{arcadeUtils:e}=await(0,u.uK)();y=e}y.hasGeometryOperations(b)&&await y.enableGeometryOperations(),M=y.createFunction(b),T=_?y.getViewInfo({viewingMode:_.viewingMode,scale:_.scale,spatialReference:new a.c(_.spatialReference)}):null}const I=e.fieldInfos,L=t[0]&&"declaredClass"in t[0]&&"geoscene.Graphic"===t[0].declaredClass||!I?null:{fields:I};return t.forEach((e=>{const t=e.attributes;let a;if(b){const t=L?{...e,layer:L}:e,r=y.createExecContext(t,T,d);a=y.executeFunction(M,r)}else t&&(a=t[s],i?(a=`${(0,p.O6)(a)}${o}${(0,p.O6)(t[i])}`,n&&(a=`${a}${o}${(0,p.O6)(t[n])}`)):"string"==typeof a&&r&&(g?a=a?new Date(a).getTime():null:m&&(a=a?f(a):null)));if(v&&"number"==typeof a&&isFinite(a)){const e=t&&parseFloat(t[S]);a=(0,p.m2)(a,v,e,q)}w.push(a)})),w}},76160:(e,t,r)=>{r.d(t,{GE:()=>b,ID:()=>D,O6:()=>h,Oq:()=>k,Qv:()=>g,UP:()=>V,cJ:()=>N,hU:()=>f,m2:()=>C,o9:()=>G,rZ:()=>v,uu:()=>m,wj:()=>P});var s=r(88352),i=r(19184);const a="<Null>",n="equal-interval",o=1,l=5,c=10,u=/\s*(\+|-)?((\d+(\.\d+)?)|(\.\d+))\s*/gi,p=new Set(["esriFieldTypeDate","esriFieldTypeInteger","esriFieldTypeSmallInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong","esriFieldTypeOID","esriFieldTypeBigInteger"]),d=new Set(["esriFieldTypeTimeOnly","esriFieldTypeDateOnly"]),y=["min","max","avg","stddev","count","sum","variance","nullcount","median"];function h(e){return null==e||"string"==typeof e&&!e?a:e}function m(e){const t=null!=e.normalizationField||null!=e.normalizationType,r=null!=e.minValue||null!=e.maxValue,s=!!e.sqlExpression&&e.supportsSQLExpression;return!t&&!r&&!s}function g(e){const t=e.returnDistinct?[...new Set(e.values)]:e.values,r=t.filter((e=>null!=e)).sort(),s=r.length,i={count:s,min:r[0],max:r[s-1]};return e.supportsNullCount&&(i.nullcount=t.length-s),e.percentileParams&&(i.median=b(t,e.percentileParams)),i}function f(e){const{values:t,useSampleStdDev:r,supportsNullCount:s}=e;let i=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,n=null,o=null,l=null,c=null,u=0;const p=null==e.minValue?-1/0:e.minValue,d=null==e.maxValue?1/0:e.maxValue;for(const e of t)Number.isFinite(e)?e>=p&&e<=d&&(n=null===n?e:n+e,i=Math.min(i,e),a=Math.max(a,e),u++):"string"==typeof e&&u++;if(u&&null!=n){o=n/u;let e=0;for(const r of t)Number.isFinite(r)&&r>=p&&r<=d&&(e+=(r-o)**2);c=r?u>1?e/(u-1):0:u>0?e/u:0,l=Math.sqrt(c)}else i=null,a=null;const y={avg:o,count:u,max:a,min:i,stddev:l,sum:n,variance:c};return s&&(y.nullcount=t.length-u),e.percentileParams&&(y.median=b(t,e.percentileParams)),y}function b(e,t){const{fieldType:r,value:s,orderBy:i,isDiscrete:a}=t,n=v(r,"desc"===i);if(0===(e=[...e].filter((e=>null!=e)).sort(((e,t)=>n(e,t)))).length)return null;if(s<=0)return e[0];if(s>=1)return e[e.length-1];const o=(e.length-1)*s,l=Math.floor(o),c=l+1,u=o%1,p=e[l],d=e[c];return c>=e.length||a||"string"==typeof p||"string"==typeof d?p:p*(1-u)+d*u}function v(e,t){if(e){if(p.has(e))return x(t);if(d.has(e))return I(t,!1);if("esriFieldTypeTimestampOffset"===e)return function(e){return e?_:w}(t);const r=I(t,!0);if("esriFieldTypeString"===e)return r;if("esriFieldTypeGUID"===e||"esriFieldTypeGlobalID"===e)return(e,t)=>r(U(e),U(t))}const r=t?1:-1,s=x(t),i=I(t,!0);return(e,t)=>"number"==typeof e&&"number"==typeof t?s(e,t):"string"==typeof e&&"string"==typeof t?i(e,t):r}const S=(e,t)=>null==e?null==t?0:1:null==t?-1:null,q=(e,t)=>null==e?null==t?0:-1:null==t?1:null,w=(e,t)=>q(e,t)??(e===t?0:new Date(e).getTime()-new Date(t).getTime()),_=(e,t)=>S(e,t)??(e===t?0:new Date(t).getTime()-new Date(e).getTime()),M=(e,t)=>q(e,t)??(e===t?0:e<t?-1:1),T=(e,t)=>S(e,t)??(e===t?0:e<t?1:-1);function I(e,t){if(!t)return e?T:M;const r=function(e){return e?S:q}(e);return e?(e,t)=>{const s=r(e,t);return null!=s?s:(e=e.toUpperCase())>(t=t.toUpperCase())?-1:e<t?1:0}:(e,t)=>{const s=r(e,t);return null!=s?s:(e=e.toUpperCase())<(t=t.toUpperCase())?-1:e>t?1:0}}const L=(e,t)=>S(e,t)??t-e,O=(e,t)=>q(e,t)??e-t;function x(e){return e?L:O}function U(e){return e.substr(24,12)+e.substr(19,4)+e.substr(16,2)+e.substr(14,2)+e.substr(11,2)+e.substr(9,2)+e.substr(6,2)+e.substr(4,2)+e.substr(2,2)+e.substr(0,2)}function k(e,t){let r;for(r in e)y.includes(r)&&(Number.isFinite(e[r])||(e[r]=null));return t?(["avg","stddev","variance"].forEach((t=>{null!=e[t]&&(e[t]=Math.ceil(e[t]??0))})),e):e}function G(e){const t={};for(let r of e)(null==r||"string"==typeof r&&""===r.trim())&&(r=null),null==t[r]?t[r]={count:1,data:r}:t[r].count++;return{count:t}}function F(e){return"coded-value"!==e?.type?[]:e.codedValues.map((e=>e.code))}function D(e,t,r,s){const i=e.count,a=[];if(r&&t){const e=[],r=F(t[0]);for(const i of r)if(t[1]){const r=F(t[1]);for(const a of r)if(t[2]){const r=F(t[2]);for(const t of r)e.push(`${h(i)}${s}${h(a)}${s}${h(t)}`)}else e.push(`${h(i)}${s}${h(a)}`)}else e.push(i);for(const t of e)i.hasOwnProperty(t)||(i[t]={data:t,count:0})}for(const e in i){const t=i[e];a.push({value:t.data,count:t.count,label:t.label})}return{uniqueValueInfos:a}}function C(e,t,r,s){let i=null;switch(t){case"log":0!==e&&(i=Math.log(e)*Math.LOG10E);break;case"percent-of-total":Number.isFinite(s)&&0!==s&&(i=e/s*100);break;case"field":Number.isFinite(r)&&0!==r&&(i=e/r);break;case"natural-log":e>0&&(i=Math.log(e));break;case"square-root":e>0&&(i=e**.5)}return i}function P(e,t){const r=A({field:t.field,normalizationType:t.normalizationType,normalizationField:t.normalizationField,classificationMethod:t.classificationMethod,standardDeviationInterval:t.standardDeviationInterval,breakCount:t.numClasses||l});return e=function(e,t,r){const s=t??-1/0,i=r??1/0;return e.filter((e=>Number.isFinite(e)&&e>=s&&e<=i))}(e,t.minValue,t.maxValue),(0,i.W)({definition:r,values:e,normalizationTotal:t.normalizationTotal})}function A(e){const{breakCount:t,field:r,normalizationField:i,normalizationType:a}=e,l=e.classificationMethod||n,c="standard-deviation"===l?e.standardDeviationInterval||o:void 0;return new s.c({breakCount:t,classificationField:r,classificationMethod:l,normalizationField:"field"===a?i:void 0,normalizationType:a,standardDeviationInterval:c})}function N(e,t){let r=e.classBreaks;const s=r.length,i=r[0]?.minValue,a=r[s-1]?.maxValue,n="standard-deviation"===t,o=u;return r=r.map((e=>{const t=e.label,r={minValue:e.minValue,maxValue:e.maxValue,label:t};if(n&&t){const e=t.match(o),s=e?.map((e=>+e.trim()))??[];2===s.length?(r.minStdDev=s[0],r.maxStdDev=s[1],s[0]<0&&s[1]>0&&(r.hasAvg=!0)):1===s.length&&(t.includes("<")?(r.minStdDev=null,r.maxStdDev=s[0]):t.includes(">")&&(r.minStdDev=s[0],r.maxStdDev=null))}return r})),{minValue:i,maxValue:a,classBreakInfos:r,normalizationTotal:e.normalizationTotal}}function V(e,t){const r=R(e,t);if(null==r.min&&null==r.max)return{bins:[],minValue:r.min,maxValue:r.max,normalizationTotal:t.normalizationTotal};const s=r.intervals,i=r.min??0,a=r.max??0,n=s.map(((e,t)=>({minValue:s[t][0],maxValue:s[t][1],count:0})));for(const t of e)if(null!=t&&t>=i&&t<=a){const e=E(s,t);e>-1&&n[e].count++}return{bins:n,minValue:i,maxValue:a,normalizationTotal:t.normalizationTotal}}function R(e,t){const{field:r,classificationMethod:s,standardDeviationInterval:i,normalizationType:a,normalizationField:n,normalizationTotal:o,minValue:l,maxValue:u}=t,p=t.numBins||c;let d=null,y=null,h=null;if(s&&"equal-interval"!==s||a){const{classBreaks:t}=P(e,{field:r,normalizationType:a,normalizationField:n,normalizationTotal:o,classificationMethod:s,standardDeviationInterval:i,minValue:l,maxValue:u,numClasses:p});d=t[0].minValue,y=t[t.length-1].maxValue,h=t.map((e=>[e.minValue,e.maxValue]))}else{if(null!=l&&null!=u)d=l,y=u;else{const t=f({values:e,minValue:l,maxValue:u,useSampleStdDev:!a,supportsNullCount:m({normalizationType:a,normalizationField:n,minValue:l,maxValue:u})});d=t.min??null,y=t.max??null}h=function(e,t,r){const s=(t-e)/r,i=[];let a,n=e;for(let e=1;e<=r;e++)a=n+s,a=Number(a.toFixed(16)),i.push([n,e===r?t:a]),n=a;return i}(d??0,y??0,p)}return{min:d,max:y,intervals:h}}function E(e,t){let r=-1;for(let s=e.length-1;s>=0;s--)if(t>=e[s][0]){r=s;break}return r}},6384:(e,t,r)=>{r.d(t,{Qx:()=>c,kr:()=>l,uK:()=>o}),r(60708);var s=r(20744),i=r(66360),a=r(56156);let n;function o(){return n||(n=(async()=>{const e=await r.e(3960).then(r.bind(r,83960));return{arcade:e.arcade,arcadeUtils:e,Dictionary:e.Dictionary,Feature:e.arcadeFeature}})()),n}const l=(e,t,r)=>u.create(e,t,r,null,["$feature","$view"],[]),c=(e,t,r,s)=>u.create(e,t,r,s,["$feature","$view"],[]);class u{constructor(e,t,r,s,i,a,n){this.services=null,this.script=e,this.evaluate=s;const o=Array.isArray(a)?a:a?.fields;this.fields=o??[],this._syntaxTree=r,this._arcade=t,this._arcadeFeature=i,this._spatialReference=n,this._referencesGeometry=t.scriptTouchesGeometry(this._syntaxTree),this._referencesScale=this._arcade.referencesMember(this._syntaxTree,"scale")}static async create(e,t,r,n,l,c){const{arcade:p,Feature:d,Dictionary:y}=await o(),h=a.c.fromJSON(t);let m;try{m=p.parseScript(e,c)}catch(t){return i.c.getLogger("geoscene.support.arcadeOnDemand").error(new s.c("arcade-bad-expression","Failed to parse arcade script",{script:e,error:t})),null}const g=l.reduce(((e,t)=>({...e,[t]:null})),{});let f=null;null!=n&&(f=new y(n),f.immutable=!0,g.$config=null);const b=p.scriptUsesGeometryEngine(m),v=b&&p.enableGeometrySupport(),S=p.scriptUsesFeatureSet(m)&&p.enableFeatureSetSupport(),q=p.scriptIsAsync(m),w=q&&p.enableAsyncSupport(),_={vars:g,spatialReference:h,useAsync:!!w};await Promise.all([v,S,w]);const M=new Set;await p.loadDependentModules(M,m,null,q,b);const T=new y;T.immutable=!1,T.setField("scale",0);const I=p.compileScript(m,_);return new u(e,p,m,((e,t)=>{const r=e.$view?.timeZone;return"$view"in e&&e.$view&&(T.setField("scale","object"==typeof e.$view&&"scale"in e.$view?e.$view.scale:void 0),e.$view=T),f&&(e.$config=f),I({vars:e,spatialReference:h,services:t,timeZone:r})}),new d,r,h)}repurposeFeature(e){return e.geometry&&!e.geometry.spatialReference&&(e.geometry.spatialReference=this._spatialReference),this._arcadeFeature.repurposeFromGraphicLikeObject(e.geometry,e.attributes,{fields:this.fields}),this._arcadeFeature}referencesGeometry(){return this._referencesGeometry}referencesScale(){return this._referencesScale}}},21320:(e,t,r)=>{r.d(t,{u:()=>n,y:()=>a});var s=r(24832),i=r(51544);async function a(e){if(!e)return;const t=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,r=await(0,i.kB)("geoscene/t9n/basemaps");return r[e]||r[t]}const n={"tianditu-topography":{classic:true,title:"天地图-地形地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/ter_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=ter&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_6884","title":"天地图-地形地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cta_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cta&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_4525","title":"天地图-地形注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-image":{classic:true,title:"天地图-影像地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=img&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_3572","title":"天地图-影像地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cia&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_5882","title":"天地图-影像注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-vector":{classic:true,title:"天地图-矢量(含注记)(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=vec&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_8803","title":"天地图-矢量地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cva&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_2198","title":"天地图-矢量注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]}}},14812:(e,t,r)=>{r.d(t,{WW:()=>d});var s=r(20744),i=r(62088),a=r(58820),n=r(38584),o=r(71068);const l=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),c=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","media","ogc-feature","oriented-imagery","route","stream","subtype-group","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){if(t.restrictedWebMapWriting){const r=function(e){return"basemap"===e.layerContainerType?l:"operational-layers"===e.layerContainerType?c:null}(t);return null==r||r.has(e.type)&&!(0,o.O7)(e)}return!0}function p(e,t){"maxScale"in e&&(t.maxScale=(0,n.A)(e.maxScale)??void 0),"minScale"in e&&(t.minScale=(0,n.A)(e.minScale)??void 0)}function d(e,t,r){if(!e.persistenceEnabled)return null;if(!("write"in e)||!e.write)return r?.messages&&r.messages.push(new s.c("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if((0,o.O7)(e)&&!e.isTable)t=e.resourceInfo;else if(u(e,r)){const t={};return e.write(t,r)?t:null}return null!=t&&function(e,t){if(function(e,t){if(t)if((0,o.O7)(e)){const r=(0,a.YT)("featureCollection.layers",t),s=r?.[0]?.layerDefinition;s&&p(e,s)}else"group"!==e.type&&p(e,t)}(e,t),t&&(t.id=e.id,"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,n.A)(e.opacity)??void 0,t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type))if((0,o.O7)(e)){const r=t.featureCollection;r&&(r.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,i.ct)(t)),t}},82060:(e,t,r)=>{function s(e){return"number"==typeof e}function i(e){return"string"==typeof e||e instanceof String}r.d(t,{I:()=>s,c:()=>i})}}]);
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.geoscene.cn/4.29/geoscene/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{convertDateFormatToIntlOptions as t,formatDate as e,formatTimestamp as r,formatTimeOnly as i,formatDateOnly as n}from"../../intl/date.js";import{isDateField as s,isDateOnlyField as o,isTimestampOffsetField as a}from"../../layers/support/fieldUtils.js";import{loadArcade as c}from"../../support/arcadeOnDemand.js";import{getWellKnownBasemapId as l}from"../../support/basemapUtils.js";import{getTimeZoneFormattingOptions as g,utc as d}from"../../time/timeZoneUtils.js";const m=",",u={light:[
|
|
5
|
+
import{convertDateFormatToIntlOptions as t,formatDate as e,formatTimestamp as r,formatTimeOnly as i,formatDateOnly as n}from"../../intl/date.js";import{isDateField as s,isDateOnlyField as o,isTimestampOffsetField as a}from"../../layers/support/fieldUtils.js";import{loadArcade as c}from"../../support/arcadeOnDemand.js";import{getWellKnownBasemapId as l}from"../../support/basemapUtils.js";import{getTimeZoneFormattingOptions as g,utc as d}from"../../time/timeZoneUtils.js";const m=",",u={light:[],dark:[]},f="percent-of-total",p="field",y={years:365,months:30,days:1,hours:1/24,minutes:1/1440,seconds:1/86400,milliseconds:1/864e5},h=new Set(["integer","small-integer"]);let v=null;const T=["date","date-only","timestamp-offset"];function Z(t){return s(t)||o(t)||a(t)}async function $(t){const{field:e,field2:r,field3:i,normalizationField:n,valueExpression:s}=t;let o=[];if(s){if(!v){const{arcadeUtils:t}=await c();v=t}o=v.extractFieldNames(s)}return e&&o.push(e),r&&o.push(r),i&&o.push(i),n&&o.push(n),o}function w(t){let e=t.normalizationType;return e||(t.normalizationField?e=p:null!=t.normalizationTotal&&(e=f)),e??void 0}function U(t){return String(t).padStart(2,"0")}function k(t,e,r){let i;if("date"===e||"number"===e){"number"===e&&(t=new Date(t));i=`TIMESTAMP'${r?t.getFullYear():t.getUTCFullYear()}-${U((r?t.getMonth():t.getUTCMonth())+1)}-${U(r?t.getDate():t.getUTCDate())} ${U(r?t.getHours():t.getUTCHours())}:${U(r?t.getMinutes():t.getUTCMinutes())}:${U(r?t.getSeconds():t.getUTCSeconds())}'`}else i=t;return i}function D(t,e,r,i){const{hasQueryEngine:n}=t,s=`(${k(r,S(t,r),n)} - ${k(e,S(t,e),n)})`;let o=y[i],a="/";o<1&&(o=1/o,a="*");return{sqlExpression:1===o?s:`(${s} ${a} ${o})`,sqlWhere:null}}function S(t,e){if(e instanceof Date)return"date";if("number"==typeof e)return"number";if("string"==typeof e){const r=t.getField(e);if("<now>"===e.toLowerCase())return;if(s(r))return"field"}}function C(t,e=u){for(const r in e)if(e[r].includes(t))return r}function F(t,e,r=!0){let i=null;return t&&("string"==typeof t?e.includes(t)&&(i=t):i=l(t)),r?i||"gray":i}function b(t,e){const r=e&&t.getField(e);return!!r&&h.has(r.type)}function M(t){return`cast(${t} as float)`}function N(s,o){const{format:a,timeZoneOptions:c,fieldType:l}=o??{};let m,u;if(c&&({timeZone:m,timeZoneName:u}=g(c.layerTimeZone,c.datesInUnknownTimezone,c.viewTimeZone,t(a||"short-date-short-time"),l)),"string"==typeof s&&isNaN(Date.parse("time-only"===l?`1970-01-01T${s}Z`:s)))return s;switch(l){case"date-only":{const r=t(a||"short-date");return"string"==typeof s?n(s,{...r}):e(s,{...r,timeZone:d})}case"time-only":{const r=t(a||"short-time");return"string"==typeof s?i(s,r):e(s,{...r,timeZone:d})}case"timestamp-offset":{if(!m&&"string"==typeof s&&new Date(s).toISOString()!==s)return s;const i=a||c?t(a||"short-date-short-time"):void 0,n=i?{...i,timeZone:m,timeZoneName:u}:void 0;return"string"==typeof s?r(s,n):e(s,n)}default:{const r=a||c?t(a||"short-date-short-time"):void 0;return e("string"==typeof s?new Date(s):s,r?{...r,timeZone:m,timeZoneName:u}:void 0)}}}export{M as castIntegerFieldToFloat,T as dateTypes,u as defaultBasemapGroups,m as fieldDelimiter,N as formatAnyDate,C as getBasemapGroup,F as getBasemapId,D as getDateDiffSQL,S as getDateType,$ as getFieldsList,w as getNormalizationType,Z as isAnyDateField,b as isIntegerField,y as unitValueInDays};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright GeoScene, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.geoscene.cn/4.29/geoscene/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getAssetUrl as e}from"../assets.js";import{fetchMessageBundle as r}from"../intl/messages.js";async function a(e){if(!e)return;const a=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,s=await r("geoscene/t9n/basemaps");return s[e]||s[a]}const s={"
|
|
5
|
+
import{getAssetUrl as e}from"../assets.js";import{fetchMessageBundle as r}from"../intl/messages.js";async function a(e){if(!e)return;const a=e.includes("-vector")?e.slice(0,e.indexOf("-vector")):e.includes("-3d")?e.slice(0,e.indexOf("-3d")):e,s=await r("geoscene/t9n/basemaps");return s[e]||s[a]}const s={"tianditu-topography":{classic:true,title:"天地图-地形地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/ter_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=ter&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_6884","title":"天地图-地形地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cta_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cta&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_4525","title":"天地图-地形注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-image":{classic:true,title:"天地图-影像地图(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/img_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=img&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_3572","title":"天地图-影像地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cia_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cia&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_5882","title":"天地图-影像注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]},"tianditu-vector":{classic:true,title:"天地图-矢量(含注记)(球面墨卡托投影)",baseMapLayers:[{"templateUrl":"https://{subDomain}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=vec&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_8803","title":"天地图-矢量地图(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"},{"templateUrl":"https://{subDomain}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=cva&STYLE=default&FORMAT=tiles&TILEMATRIXSET=w&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=4267820f43926eaf808d61dc07269beb","copyright":"天地图","fullExtent":{"xmin":-20037508.342787,"ymin":-20037508.34278,"xmax":20037508.34278,"ymax":20037508.342787,"spatialReference":{"wkid":102100}},"subDomains":["t0","t1","t2","t3","t4","t5","t6","t7"],"opacity":1,"visibility":true,"id":"WebTiled_2198","title":"天地图-矢量注记(球面墨卡托投影)","type":"WebTiledLayer","layerType":"WebTiledLayer"}]}};export{s as esriBasemapDefinitions,a as getBasemapTitle};
|