@arcgis/core 4.27.0-rc.2 → 4.27.0-rc.3
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.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{a8565d1c676f3bfbcebb.js → 002fe1ec63ea33e6972d.js} +1 -1
- package/assets/esri/core/workers/chunks/{0610691a0c0d9fbbd6d2.js → 013de5c2955801b329b3.js} +1 -1
- package/assets/esri/core/workers/chunks/07163dcbb871f927a580.js +1 -0
- package/assets/esri/core/workers/chunks/0e46687004392c493c06.js +1 -0
- package/assets/esri/core/workers/chunks/0e65e00173b66c7fec2e.js +1 -0
- package/assets/esri/core/workers/chunks/1aa8dd317ecd3c41e0ea.js +1 -0
- package/assets/esri/core/workers/chunks/21328f3dd26abe84a10d.js +1 -0
- package/assets/esri/core/workers/chunks/28c67c98039503b62e6e.js +1 -0
- package/assets/esri/core/workers/chunks/{da57eba2fe25495ea217.js → 2faa8f08f2fdaac3f4af.js} +1 -1
- package/assets/esri/core/workers/chunks/{0407bf97ad621c89a734.js → 3160af63b860b52db389.js} +1 -1
- package/assets/esri/core/workers/chunks/3767b9e7660873b018c2.js +1 -0
- package/assets/esri/core/workers/chunks/39ae4b9b766f674bc6f2.js +1 -0
- package/assets/esri/core/workers/chunks/45629ff775e77234b227.js +1 -0
- package/assets/esri/core/workers/chunks/4a4f14a3d8da270059c4.js +1 -0
- package/assets/esri/core/workers/chunks/{3e239bfad611985e50fb.js → 50f910797c17c3028521.js} +1 -1
- package/assets/esri/core/workers/chunks/642c5a93c0a454bdd115.js +1 -0
- package/assets/esri/core/workers/chunks/{14145959a3dab1437818.js → 6627f1bc9ee6b620e3aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{170bdbdb4e21bf91a17f.js → 6eaa7a51efde2dd4a5a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{2bdc63395c7466ce1641.js → 7053c2f5a958d4c8629b.js} +1 -1
- package/assets/esri/core/workers/chunks/{4c35c663528f710e8c78.js → 79cb672c85ea29e8484a.js} +1 -1
- package/assets/esri/core/workers/chunks/82939ead43848a13f765.js +1 -0
- package/assets/esri/core/workers/chunks/89001ee8d3f69fa03cc1.js +1 -0
- package/assets/esri/core/workers/chunks/8b6b963230df56850580.js +1 -0
- package/assets/esri/core/workers/chunks/9472184ef1432fc55d6b.js +1 -0
- package/assets/esri/core/workers/chunks/a6ddf80eb324c35076e1.js +1 -0
- package/assets/esri/core/workers/chunks/a80a6267d88246ede5d3.js +1 -0
- package/assets/esri/core/workers/chunks/{f505ebd4bd3bfb6c790d.js → b6a55fdfe16795ebf02c.js} +1 -1
- package/assets/esri/core/workers/chunks/bf9e1fde9f6b2b4f10c0.js +1 -0
- package/assets/esri/core/workers/chunks/cfa3b2b1e184681e9af4.js +1 -0
- package/assets/esri/core/workers/chunks/{1f69fb9687de9ebfcf90.js → d4ba894a2583f3930a4f.js} +1 -1
- package/assets/esri/core/workers/chunks/d5dfd3d693d5e393a542.js +1 -0
- package/assets/esri/core/workers/chunks/{74fd2059ddda9083cbcc.js → dc6c97a43d642eeaf477.js} +1 -1
- package/assets/esri/core/workers/chunks/{2154d395f405be3cd3ba.js → eca0c3d57b3a1e3a14ee.js} +1 -1
- package/assets/esri/core/workers/chunks/f36697f6aac782007d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f52054f27619a98b7bb7.js +1 -0
- package/assets/esri/core/workers/chunks/fb7fe307a583b6a22218.js +1 -0
- package/assets/esri/core/workers/chunks/fbd3c78ee8e2219a6c7a.js +1 -0
- package/assets/esri/core/workers/chunks/ff42585e1b1d0c5497af.js +1 -0
- package/assets/esri/images/portal/livestreamvideolayer16.png +0 -0
- package/assets/esri/images/portal/{mediaservice16.png → videolayer16.png} +0 -0
- package/assets/esri/themes/base/widgets/_FeatureForm.scss +19 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/geometry/support/DoubleArray.js +1 -1
- package/interfaces.d.ts +84 -0
- package/kernel.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/support/editableLayers.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/request.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/I3SMeshWorkerHandle.js +1 -1
- package/views/3d/layers/SceneLayerWorker.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js +2 -2
- package/webmap/initialViewPropertiesUtils.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/CreateWorkflow.js +1 -1
- package/widgets/Editor/EditorViewModel.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/UpdateWorkflowData.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/FeatureForm/RelationshipInput.js +1 -1
- package/widgets/FeatureForm/css.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
- package/widgets/UtilityNetworkValidateTopology/UtilityNetworkValidateTopologyViewModel.d.ts +4 -0
- package/widgets/UtilityNetworkValidateTopology.d.ts +4 -0
- package/widgets/support/geolocationUtils.js +1 -1
- package/assets/esri/core/workers/chunks/0fcb8d408696075338e2.js +0 -1
- package/assets/esri/core/workers/chunks/16e459b16bdd6e1a821b.js +0 -1
- package/assets/esri/core/workers/chunks/1b8074269800b384ecf6.js +0 -1
- package/assets/esri/core/workers/chunks/2b55295590b4a0503749.js +0 -1
- package/assets/esri/core/workers/chunks/3ba2fcb9110230f8790c.js +0 -1
- package/assets/esri/core/workers/chunks/5576858f56314afcb4d5.js +0 -1
- package/assets/esri/core/workers/chunks/5706edf45402dff279a6.js +0 -1
- package/assets/esri/core/workers/chunks/659b7bad7281c0e2aed3.js +0 -1
- package/assets/esri/core/workers/chunks/6cd248d065f6d1616294.js +0 -1
- package/assets/esri/core/workers/chunks/9326120c750799eb2d28.js +0 -1
- package/assets/esri/core/workers/chunks/99e0cec47e3ef72c1de4.js +0 -1
- package/assets/esri/core/workers/chunks/9c0e1e87790424f42d7e.js +0 -1
- package/assets/esri/core/workers/chunks/9e66af3b1c70cf25fb32.js +0 -1
- package/assets/esri/core/workers/chunks/a1c31bb8c12831539328.js +0 -1
- package/assets/esri/core/workers/chunks/b0cda39b53ecd6c44cd0.js +0 -1
- package/assets/esri/core/workers/chunks/c08e03165043df67c11b.js +0 -1
- package/assets/esri/core/workers/chunks/c26148d4bfab3b3dfab2.js +0 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +0 -1
- package/assets/esri/core/workers/chunks/eeaf8010e38b65a101ac.js +0 -1
- package/assets/esri/core/workers/chunks/f235392c56063fbf89c6.js +0 -1
- package/assets/esri/core/workers/chunks/fdd0d3616c97e408b104.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8522],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(92036),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(){this._resolver=(0,a.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.hh)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},48522:(t,e,r)=>{r.d(e,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171);let b;var C=r(41253),f=r(92036);let g=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],g.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"total",void 0),g=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],g);const S=g;var P,O=r(86082),w=r(71058);let G;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=P=class extends((0,a.eC)(u.Z)){constructor(t){super(t),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.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=s.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){U.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||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 t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),G=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),U.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(8346),r.e(4547),r.e(5235),r.e(6486),r.e(1596),r.e(9393)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return b&&!b.destroyed||(b=new P),b}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===P.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===P.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new C.Z;r.query=t||(s.default.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const i=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(r,e);return l.total?l.results.filter((t=>"Web Map"===t.type)).map((t=>new G({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const o=new C.Z({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new G({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=G.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=P=(0,o._)([(0,m.j)("esri.portal.Portal")],D);const E=D,U=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),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.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(92036),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),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(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(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(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),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 t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8522],{83379:(t,e,r)=>{r.d(e,{Z:()=>m});var o=r(43697),s=r(20102),i=r(70586),l=r(609),n=r(95330),a=r(20941),u=r(5600),p=r(52011);const d="loaded",h=t=>{let e=class extends t{constructor(...t){super(...t),this._loadController=null,this.loadError=null,this.loadStatus="not-loaded",this._set("loadWarnings",[]),this.addResolvingPromise(new Promise((t=>{const e=this.load.bind(this);this.load=r=>{const o=new Promise(((t,e)=>{const o=(0,n.$F)(r,e);this.destroyed&&e(new s.Z("load:instance-destroyed",`Instance of '${this.declaredClass||this.constructor.name}' is already destroyed`,{instance:this})),this.when(t,e).finally((()=>{o&&o.remove()}))}));if("not-loaded"===this.loadStatus){this._set("loadStatus","loading");const t=this._loadController=new AbortController;e({signal:t.signal}),(0,n.fu)(t.signal,(()=>{this._promiseProps.abort()}))}return t(),o}}))),this.when((()=>{this._set("loadStatus",d),this._loadController=null}),(t=>{this._set("loadStatus","failed"),this._set("loadError",t),this._loadController=null}))}destroy(){this._loadController=(0,i.IM)(this._loadController),this._set("loadError",null),this._set("loadWarnings",[])}get loaded(){return this.loadStatus===d}get loadWarnings(){return this._get("loadWarnings")}load(){return null}cancelLoad(){return this.isFulfilled()||(this._set("loadError",new s.Z("load:cancelled","Cancelled")),this._loadController?.abort()),this}};return(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loaded",null),(0,o._)([(0,u.Cb)({readOnly:!0})],e.prototype,"loadError",void 0),(0,o._)([(0,u.Cb)({clonable:!1})],e.prototype,"loadStatus",void 0),(0,o._)([(0,u.Cb)({type:[a.Z],readOnly:!0})],e.prototype,"loadWarnings",null),e=(0,o._)([(0,p.j)("esri.core.Loadable")],e),e};let c=class extends(h(l.D)){};var y;c=(0,o._)([(0,p.j)("esri.core.Loadable")],c),(y=c||(c={})).LoadableMixin=h,y.isLoadable=function(t){return!(!t||!t.load)};const m=c},609:(t,e,r)=>{r.d(e,{D:()=>h,v:()=>d});var o,s,i=r(43697),l=r(92036),n=r(70586),a=r(95330),u=r(52011);(s=o||(o={}))[s.PENDING=0]="PENDING",s[s.RESOLVED=1]="RESOLVED",s[s.REJECTED=2]="REJECTED";class p{constructor(){this._resolver=(0,a.hh)(),this._status=o.PENDING,this._resolvingPromises=[],this._resolver.promise.then((()=>{this._status=o.RESOLVED,this._cleanUp()}),(()=>{this._status=o.REJECTED,this._cleanUp()})),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(t){this._resolvingPromises.push(t),this._tryResolve()}isResolved(){return this._status===o.RESOLVED}isRejected(){return this._status===o.REJECTED}isFulfilled(){return this._status!==o.PENDING}abort(){this._resolver.reject((0,a.zE)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const t=(0,a.hh)(),e=[...this._resolvingPromises,(0,n.j0)(t.promise)],r=this._allPromise=Promise.all(e);r.then((()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()}),(t=>{this.isFulfilled()||this._allPromise!==r||(0,a.D_)(t)||this._resolver.reject(t)})),t.resolve()}}const d=t=>{let e=class extends t{constructor(...t){super(...t),this._promiseProps=new p,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps?.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(t,e){return this._promiseProps.promise.then((()=>this)).then(t,e)}catch(t){return this.when(null,t)}addResolvingPromise(t){t&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in t?t.when():t)}};return e=(0,i._)([(0,u.j)("esri.core.Promise")],e),e};let h=class extends(d(l.Z)){};h=(0,i._)([(0,u.j)("esri.core.Promise")],h)},70171:(t,e,r)=>{let o;r.d(e,{Kd:()=>l,Ze:()=>p,qe:()=>a});const s=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function i(){return s??globalThis.navigator?.language??"en"}function l(){return void 0===o&&(o=i()),o}const n=[];function a(t){return n.push(t),{remove(){n.splice(n.indexOf(t),1)}}}const u=[];function p(t){return u.push(t),{remove(){n.splice(u.indexOf(t),1)}}}globalThis.addEventListener?.("languagechange",(function(){const t=i();o!==t&&(o=t,[...u].forEach((e=>{e.call(null,t)})),[...n].forEach((e=>{e.call(null,t)})))}))},48522:(t,e,r)=>{r.d(e,{Z:()=>E});var o=r(43697),s=r(68773),i=r(40330),l=r(3172),n=r(20102),a=r(96674),u=r(83379),p=r(70586),d=r(95330),h=r(5600),c=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),_=r(6570),v=r(70171);let b;var C=r(41253),f=r(92036);let g=class extends f.Z{constructor(t){super(t),this.nextQueryParams=null,this.queryParams=null,this.results=null,this.total=null}};(0,o._)([(0,h.Cb)()],g.prototype,"nextQueryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"queryParams",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"results",void 0),(0,o._)([(0,h.Cb)()],g.prototype,"total",void 0),g=(0,o._)([(0,m.j)("esri.portal.PortalQueryResult")],g);const S=g;var P,O=r(86082),w=r(71058);let G;const q={PortalGroup:()=>Promise.resolve().then(r.bind(r,68916)),PortalItem:()=>Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)),PortalUser:()=>Promise.resolve().then(r.bind(r,86082))};let D=P=class extends((0,a.eC)(u.Z)){constructor(t){super(t),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.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=s.default.portalUrl,this.urlKey=null,this.user=null,this.use3dBasemaps=!0,this.useStandardizedQuery=!1,this.useVectorBasemaps=!1,this.vectorBasemapGalleryGroupQuery=null}normalizeCtorArgs(t){return"string"==typeof t?{url:t}:t}destroy(){U.unregister(this),this.defaultBasemap=(0,p.SC)(this.defaultBasemap),this.defaultDevBasemap=(0,p.SC)(this.defaultDevBasemap),this.defaultVectorBasemap=(0,p.SC)(this.defaultVectorBasemap),this._esriIdCredentialCreateHandle=(0,p.hw)(this._esriIdCredentialCreateHandle)}readAuthorizedCrossOriginDomains(t){if(t)for(const e of t)s.default.request.trustedServers.includes(e)||s.default.request.trustedServers.push(e);return t}readDefaultBasemap(t){return this._readBasemap(t)}readDefaultDevBasemap(t){return this._readBasemap(t)}readDefaultVectorBasemap(t){return this._readBasemap(t)}get extraQuery(){const t=!(this.user&&this.user.orgId)||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 t=this.url;if(t){const e=t.indexOf("/sharing");t=e>0?t.substring(0,e):this.url.replace(/\/+$/,""),t+="/sharing/rest"}return t}get thumbnailUrl(){const t=this.restUrl,e=this.thumbnail;return t&&e?this._normalizeSSL(t+"/portals/self/resources/"+e):null}readUrlKey(t){return t?t.toLowerCase():t}readUser(t){let e=null;return t&&(e=O.default.fromJSON(t),e.portal=this),e}load(t){const e=Promise.all([r.e(5235),r.e(3668)]).then(r.bind(r,93668)).then((({default:e})=>{(0,d.k_)(t),G=e})).then((()=>this.sourceJSON?this.sourceJSON:this.fetchSelf(this.authMode,!1,t))).then((t=>{if(i.id){const t=i.id;this.credential=t.findCredential(this.restUrl),this.credential||this.authMode!==P.AUTH_MODE_AUTO||(this._esriIdCredentialCreateHandle?.remove(),this._esriIdCredentialCreateHandle=t.on("credential-create",function(t){const e=i.id;return()=>{const r=t.deref();r&&e.findCredential(r.restUrl)&&r.signIn().catch((()=>{}))}}(new WeakRef(this))),U.register(this,this._esriIdCredentialCreateHandle,this))}this.sourceJSON=t,this.read(t)}));return this.addResolvingPromise(e),Promise.resolve(this)}async createElevationLayers(){await this.load();const t=this._getHelperService("defaultElevationLayers"),e=(await Promise.all([r.e(163),r.e(8346),r.e(4547),r.e(5235),r.e(4565),r.e(6486),r.e(2920)]).then(r.bind(r,65665))).default;return t?t.map((t=>new e({id:t.id,url:t.url}))):[]}async fetchBasemaps(t,e){const r=await this._fetchBasemaps(t,e);if(!0===e?.include3d&&!1!==this.use3dBasemaps){const o=await this._fetchBasemaps3D(t,e);r.unshift(...o)}return r}fetchCategorySchema(t){return this.hasCategorySchema?this.request(this.restUrl+"/portals/self/categorySchema",t).then((t=>t.categorySchema)):(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchFeaturedGroups(t){const e=this.featuredGroups,r=new C.Z;if(r.num=100,r.sortField="title",e&&e.length){const o=[];for(const t of e)o.push(`(title:"${t.title}" AND owner:${t.owner})`);return r.query=o.join(" OR "),this.queryGroups(r,t).then((t=>t.results))}return(0,d.Hc)(t)?Promise.reject((0,d.zE)()):Promise.resolve([])}fetchRegions(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/regions",{...t,query:{culture:e}})}fetchSettings(t){const e=this.user?.culture||this.culture||(0,v.Kd)();return this.request(this.restUrl+"/portals/self/settings",{...t,query:{culture:e}})}static getDefault(){return b&&!b.destroyed||(b=new P),b}queryGroups(t,e){return this.queryPortal("/community/groups",t,"PortalGroup",e)}queryItems(t,e){return this.queryPortal("/search",t,"PortalItem",e)}queryUsers(t,e){return t.sortField||(t.sortField="username"),this.queryPortal("/community/users",t,"PortalUser",e)}fetchSelf(t=this.authMode,e=!1,r){const o=this.restUrl+"/portals/self",s={authMode:t,query:{culture:(0,v.Kd)().toLowerCase()},...r};return"auto"===s.authMode&&(s.authMode="no-prompt"),e&&(s.query.default=!0),this.request(o,s)}queryPortal(t,e,r,o){const s=(0,c.se)(C.Z,e),i=e=>this.request(this.restUrl+t,{...s.toRequestOptions(this),...o}).then((t=>{const r=s.clone();return r.start=t.nextStart,new S({nextQueryParams:r,queryParams:s,total:t.total,results:P._resultsToTypedArray(e,{portal:this},t,o)})})).then((t=>Promise.all(t.results.map((e=>"function"==typeof e.when?e.when():t))).then((()=>t),(e=>((0,d.r9)(e),t)))));return r&&q[r]?q[r]().then((({default:t})=>((0,d.k_)(o),i(t)))):i()}signIn(){if(this.authMode===P.AUTH_MODE_ANONYMOUS)return Promise.reject(new n.Z("portal:invalid-auth-mode",`Current "authMode"' is "${this.authMode}"`));if("failed"===this.loadStatus)return Promise.reject(this.loadError);const t=t=>Promise.resolve().then((()=>"not-loaded"===this.loadStatus?(t||(this.authMode="immediate"),this.load().then((()=>null))):"loading"===this.loadStatus?this.load().then((()=>this.credential?null:(this.credential=t,this.fetchSelf("immediate")))):this.user&&this.credential===t?null:(this.credential=t,this.fetchSelf("immediate")))).then((t=>{t&&(this.sourceJSON=t,this.read(t))}));return i.id?i.id.getCredential(this.restUrl).then((e=>t(e))):t(this.credential)}normalizeUrl(t){const e=this.credential&&this.credential.token;return this._normalizeSSL(e?t+(t.includes("?")?"&":"?")+"token="+e:t)}requestToTypedArray(t,e,r){return this.request(t,e).then((t=>{const e=P._resultsToTypedArray(r,{portal:this},t);return Promise.all(e.map((e=>"function"==typeof e.when?e.when():t))).then((()=>e),(()=>e))}))}request(t,e={}){const r={f:"json",...e.query},{authMode:o=(this.authMode===P.AUTH_MODE_ANONYMOUS?"anonymous":"auto"),body:s=null,cacheBust:i=!1,method:n="auto",responseType:a="json",signal:u}=e,p={authMode:o,body:s,cacheBust:i,method:n,query:r,responseType:a,timeout:0,signal:u};return(0,l.default)(this._normalizeSSL(t),p).then((t=>t.data))}toJSON(){throw new n.Z("internal:not-yet-implemented","Portal.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");return new P({sourceJSON:t})}_getHelperService(t){const e=this.helperServices&&this.helperServices[t];if(!e)throw new n.Z("portal:service-not-found",`The \`helperServices\` do not include an entry named "${t}"`);return e}async _fetchBasemaps(t,e){const r=new C.Z;r.query=t||(s.default.apiKey&&(0,w.r)(this.url)?this.devBasemapGalleryGroupQuery:this.useVectorBasemaps?this.vectorBasemapGalleryGroupQuery:this.basemapGalleryGroupQuery),r.disableExtraQuery=!0;const o=await this.queryGroups(r,e);if(!o.total)return[];const i=o.results[0];r.num=100,r.query='type:"Web Map" -type:"Web Application"',r.sortField=i.sortField||"name",r.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(r,e);return l.total?l.results.filter((t=>"Web Map"===t.type)).map((t=>new G({portalItem:t}))):[]}async _fetchBasemaps3D(t,e){const r=t||this.basemapGalleryGroupQuery3D;if(!r)return[];const o=new C.Z({query:r,disableExtraQuery:!0}),s=await this.queryGroups(o,e);if(!s.total)return[];const i=s.results[0];o.num=100,o.query='type:"Web Scene"',o.sortField=i.sortField||"name",o.sortOrder=i.sortOrder||"desc";const l=await i.queryItems(o,e);return l.total?l.results.filter((t=>"Web Scene"===t.type)).map((t=>new G({portalItem:t}))):[]}_normalizeSSL(t){return t.replace(/^http:/i,"https:").replace(":7080",":7443")}_readBasemap(t){if(t){const e=G.fromJSON(t);return e.portalItem={portal:this},e}return null}static _resultsToTypedArray(t,e,r,o){let s=[];if(r){const i=null!=o?o.signal:null;s=r.listings||r.notifications||r.userInvitations||r.tags||r.items||r.groups||r.comments||r.provisions||r.results||r.relatedItems||r,(t||e)&&(s=s.map((r=>{const o=Object.assign(t?t.fromJSON(r):r,e);return"function"==typeof o.load&&o.load(i),o})))}else s=[];return s}};D.AUTH_MODE_ANONYMOUS="anonymous",D.AUTH_MODE_AUTO="auto",D.AUTH_MODE_IMMEDIATE="immediate",(0,o._)([(0,h.Cb)()],D.prototype,"access",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"allSSL",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"authorizedCrossOriginDomains",void 0),(0,o._)([(0,y.r)("authorizedCrossOriginDomains")],D.prototype,"readAuthorizedCrossOriginDomains",null),(0,o._)([(0,h.Cb)()],D.prototype,"basemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)({json:{name:"3DBasemapGalleryGroupQuery"}})],D.prototype,"basemapGalleryGroupQuery3D",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"bingKey",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListApps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListData",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canListPreProvisionedItems",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canProvisionDirectPurchase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSearchPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canShareBingPublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSharePublic",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInArcGIS",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"canSignInIDP",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"colorSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"commentsEnabled",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"created",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"credential",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"culture",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"currentVersion",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"customBaseUrl",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultBasemap",void 0),(0,o._)([(0,y.r)("defaultBasemap")],D.prototype,"readDefaultBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"defaultDevBasemap",void 0),(0,o._)([(0,y.r)("defaultDevBasemap")],D.prototype,"readDefaultDevBasemap",null),(0,o._)([(0,h.Cb)({type:_.Z})],D.prototype,"defaultExtent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"defaultVectorBasemap",void 0),(0,o._)([(0,y.r)("defaultVectorBasemap")],D.prototype,"readDefaultVectorBasemap",null),(0,o._)([(0,h.Cb)()],D.prototype,"description",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"devBasemapGalleryGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"eueiEnabled",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"extraQuery",null),(0,o._)([(0,h.Cb)()],D.prototype,"featuredGroups",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"featuredItemsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"galleryTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"livingAtlasGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"hasCategorySchema",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpBase",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helperServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"helpMap",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContent",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"homePageFeaturedContentCount",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"httpsPort",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"id",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"ipCntryCode",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"isOrganization",null),(0,o._)([(0,h.Cb)()],D.prototype,"isPortal",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"isReadOnly",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"itemPageUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"layerTemplatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"maxTokenExpirationMinutes",void 0),(0,o._)([(0,h.Cb)({type:Date})],D.prototype,"modified",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"name",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalHostname",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalMode",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"portalProperties",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"region",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"restUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"rotatorPanels",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"showHomePageDescription",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"sourceJSON",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"staticImagesUrl",void 0),(0,o._)([(0,h.Cb)({json:{name:"2DStylesGroupQuery"}})],D.prototype,"stylesGroupQuery2d",void 0),(0,o._)([(0,h.Cb)({json:{name:"stylesGroupQuery"}})],D.prototype,"stylesGroupQuery3d",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"supportsHostedServices",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"symbolSetsGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"templatesGroupQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"thumbnail",void 0),(0,o._)([(0,h.Cb)({readOnly:!0})],D.prototype,"thumbnailUrl",null),(0,o._)([(0,h.Cb)()],D.prototype,"units",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"url",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"urlKey",void 0),(0,o._)([(0,y.r)("urlKey")],D.prototype,"readUrlKey",null),(0,o._)([(0,h.Cb)()],D.prototype,"user",void 0),(0,o._)([(0,y.r)("user")],D.prototype,"readUser",null),(0,o._)([(0,h.Cb)()],D.prototype,"use3dBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useStandardizedQuery",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"useVectorBasemaps",void 0),(0,o._)([(0,h.Cb)()],D.prototype,"vectorBasemapGalleryGroupQuery",void 0),D=P=(0,o._)([(0,m.j)("esri.portal.Portal")],D);const E=D,U=new FinalizationRegistry((t=>{t.remove()}))},68916:(t,e,r)=>{r.r(e),r.d(e,{default:()=>h});var o=r(43697),s=r(20102),i=r(96674),l=r(70586),n=r(5600),a=r(75215),u=(r(67676),r(80442),r(52011)),p=r(41253);let d=class extends i.wq{constructor(t){super(t),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.tags=null,this.title=null}get thumbnailUrl(){const t=this.url,e=this.thumbnail;return t&&e&&this.portal?this.portal?.normalizeUrl(`${t}/info/${e}?f=json`):null}get url(){const t=this.get("portal.restUrl");return t?t+"/community/groups/"+this.id:null}fetchCategorySchema(t){return(0,l.s3)(this.portal).request(this.url+"/categorySchema",t).then((e=>{const r=e.categorySchema||[];return r.some((t=>"contentCategorySetsGroupQuery.LivingAtlas"===t.source))?this._fetchCategorySchemaSet("LivingAtlas",t):r}))}fetchMembers(t){return(0,l.s3)(this.portal).request(this.url+"/users",t)}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}queryItems(t,e){let r=(0,a.se)(p.Z,t);const o=(0,l.s3)(this.portal);return parseFloat(o.currentVersion)>5?(r=r||new p.Z,o.queryPortal(`/content/groups/${this.id}/search`,r,"PortalItem",e)):(r=r?r.clone():new p.Z,r.query="group:"+this.id+(r.query?" "+r.query:""),o.queryItems(r,e))}_fetchCategorySchemaSet(t,e){const r=(0,l.s3)(this.portal);return r.fetchSelf(r.authMode,!0,e).then((t=>{const o=t.contentCategorySetsGroupQuery;if(o){const t=new p.Z;return t.disableExtraQuery=!0,t.num=1,t.query=o,r.queryGroups(t,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery value not found")})).then((r=>{if(r.total){const o=r.results[0],s=new p.Z;return s.num=1,s.query=`typekeywords:"${t}"`,o.queryItems(s,e)}throw new s.Z("portal-group:fetchCategorySchema","contentCategorySetsGroupQuery group not found")})).then((t=>t.total?t.results[0].fetchData("json",e).then((t=>{const e=t&&t.categorySchema;return e&&e.length?e:[]})):[]))}};(0,o._)([(0,n.Cb)()],d.prototype,"access",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"created",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"description",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"id",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"isInvitationOnly",void 0),(0,o._)([(0,n.Cb)({type:Date})],d.prototype,"modified",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"owner",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"portal",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"snippet",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortField",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"sortOrder",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"tags",void 0),(0,o._)([(0,n.Cb)()],d.prototype,"thumbnail",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"thumbnailUrl",null),(0,o._)([(0,n.Cb)()],d.prototype,"title",void 0),(0,o._)([(0,n.Cb)({readOnly:!0})],d.prototype,"url",null),d=(0,o._)([(0,u.j)("esri.portal.PortalGroup")],d);const h=d},41253:(t,e,r)=>{r.d(e,{Z:()=>m});var o,s=r(43697),i=r(92036),l=r(35454),n=r(22974),a=r(5600),u=(r(75215),r(52011)),p=r(6570),d=r(82971),h=r(40488);const c=new l.X({avgRating:"avg-rating",numRatings:"num-ratings",numComments:"num-comments",numViews:"num-views"});let y=o=class extends i.Z{constructor(t){super(t),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(t){"asc"!==t&&"desc"!==t||this._set("sortOrder",t)}clone(){return new o({categories:this.categories?(0,n.d9)(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(t,e){let r=[];this.categories&&(r=this.categories.map((t=>Array.isArray(t)?JSON.stringify(t):t)));let o="";if(this.extent){const t=(0,h.iV)(this.extent,d.Z.WGS84);null!=t&&(o=`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`)}let s=this.query;!this.disableExtraQuery&&t.extraQuery&&(s="("+s+")"+t.extraQuery);const i={categories:r,bbox:o,q:s,filter:this.filter,num:this.num,sortField:null,sortOrder:null,start:this.start};return this.sortField&&(i.sortField=this.sortField.split(",").map((t=>c.toJSON(t.trim()))).join(","),i.sortOrder=this.sortOrder),{query:{...e,...i}}}};(0,s._)([(0,a.Cb)()],y.prototype,"categories",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"disableExtraQuery",void 0),(0,s._)([(0,a.Cb)({type:p.Z})],y.prototype,"extent",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"filter",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"num",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"query",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortField",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"sortOrder",null),(0,s._)([(0,a.Cb)()],y.prototype,"start",void 0),y=o=(0,s._)([(0,u.j)("esri.portal.PortalQueryParams")],y);const m=y},86082:(t,e,r)=>{r.r(e),r.d(e,{default:()=>c});var o=r(43697),s=r(20102),i=r(96674),l=r(5600),n=(r(75215),r(67676),r(80442),r(52011));let a=class extends i.wq{constructor(t){super(t),this.created=null,this.id=null,this.portal=null,this.title=null,this.username=null}get url(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}/${this.id}`:null}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalFolder.toJSON is not yet implemented")}};(0,o._)([(0,l.Cb)({type:Date})],a.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"id",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],a.prototype,"title",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],a.prototype,"url",null),(0,o._)([(0,l.Cb)()],a.prototype,"username",void 0),a=(0,o._)([(0,n.j)("esri.portal.PortalFolder")],a);const u=a;var p,d=r(68916);let h=p=class extends i.wq{constructor(...t){super(...t),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 t=this.url,e=this.thumbnail;return t&&e?this.portal.normalizeUrl(`${t}/info/${e}?f=json`):null}get userContentUrl(){const t=this.get("portal.restUrl");return t?`${t}/content/users/${this.username}`:null}get url(){const t=this.get("portal.restUrl");return t?`${t}/community/users/${this.username}`:null}addItem(t){const e=t&&t.item,r=t&&t.data,o=t&&t.folder,s={method:"post"};e&&(s.query=e.createPostQuery(),null!=r&&("string"==typeof r?s.query.text=r:"object"==typeof r&&(s.query.text=JSON.stringify(r))));let i=this.userContentUrl;return o&&(i+="/"+("string"==typeof o?o:o.id)),this.portal.request(i+"/addItem",s).then((t=>(e.id=t.id,e.portal=this.portal,e.loaded?e.reload():e.load())))}deleteItem(t){let e=this.userContentUrl;return t.ownerFolder&&(e+="/"+t.ownerFolder),this.portal.request(e+`/items/${t.id}/delete`,{method:"post"}).then((()=>{t.id=null,t.portal=null}))}deleteItems(t){const e=this.userContentUrl+"/deleteItems",r=t.map((t=>t.id));if(r.length){const o={method:"post",query:{items:r.join(",")}};return this.portal.request(e,o).then((()=>{t.forEach((t=>{t.id=null,t.portal=null}))}))}return Promise.resolve(void 0)}fetchFolders(){return this.portal.request(this.userContentUrl??"",{query:{num:1}}).then((t=>{let e;return e=t&&t.folders?t.folders.map((t=>{const e=u.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchGroups(){return this.portal.request(this.url??"").then((t=>{let e;return e=t&&t.groups?t.groups.map((t=>{const e=d.default.fromJSON(t);return e.portal=this.portal,e})):[],e}))}fetchItems(t){const e=t??{};let o,s=this.userContentUrl??"";return e.folder&&(s+="/"+e.folder.id),Promise.all([r.e(5235),r.e(9880)]).then(r.bind(r,15235)).then((({default:t})=>{o=t;const r={folders:!1,num:e.num||10,start:e.start||1,sortField:e.sortField||"created",sortOrder:e.sortOrder||"asc"};return this.portal.request(s,{query:r})})).then((t=>{let e;return t&&t.items?(e=t.items.map((t=>{const e=o.fromJSON(t);return e.portal=this.portal,e})),Promise.all(e.map((t=>t.load()))).catch((t=>t)).then((()=>({items:e,nextStart:t.nextStart,total:t.total})))):{items:[],nextStart:-1,total:0}}))}fetchTags(){return this.portal.request(this.url+"/tags").then((t=>t.tags))}getThumbnailUrl(t){let e=this.thumbnailUrl;return e&&t&&(e+=`&w=${t}`),e}queryFavorites(t){return this.favGroupId?(this._favGroup||(this._favGroup=new d.default({id:this.favGroupId,portal:this.portal})),this._favGroup.queryItems(t)):Promise.reject(new s.Z("internal:unknown","Unknown internal error",{internalError:"Unknown favGroupId"}))}toJSON(){throw new s.Z("internal:not-yet-implemented","PortalGroup.toJSON is not yet implemented")}static fromJSON(t){if(!t)return null;if(t.declaredClass)throw new Error("JSON object is already hydrated");const e=new p;return e.sourceJSON=t,e.read(t),e}};(0,o._)([(0,l.Cb)()],h.prototype,"access",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"created",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"culture",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"description",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"email",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"favGroupId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"fullName",void 0),(0,o._)([(0,l.Cb)({type:Date})],h.prototype,"modified",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"orgId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"portal",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"preferredView",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"privileges",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"region",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"role",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"roleId",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"sourceJSON",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"thumbnail",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"thumbnailUrl",null),(0,o._)([(0,l.Cb)()],h.prototype,"units",void 0),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"userContentUrl",null),(0,o._)([(0,l.Cb)({readOnly:!0})],h.prototype,"url",null),(0,o._)([(0,l.Cb)()],h.prototype,"username",void 0),(0,o._)([(0,l.Cb)()],h.prototype,"userType",void 0),h=p=(0,o._)([(0,n.j)("esri.portal.PortalUser")],h);const c=h}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2975],{10699:(e,t,r)=>{r.d(t,{IG:()=>s,iv:()=>l});var n=r(43697),o=r(52011);let i=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return t=(0,n._)([(0,o.j)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:i++})}};return t=(0,n._)([(0,o.j)("esri.core.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,n._)([(0,o.j)("esri.core.Identifiable")],a)},66643:(e,t,r)=>{r.d(t,{Ed:()=>u,UI:()=>c,mt:()=>f,q6:()=>y,vr:()=>h});var n=r(43697),o=r(92036),i=r(70586),s=r(95330),l=r(5600),a=r(52011);function u(e,t,r){return(0,s.as)(e.map(((e,n)=>t.apply(r,[e,n]))))}async function c(e,t,r){return(await(0,s.as)(e.map(((e,n)=>t.apply(r,[e,n]))))).map((e=>e.value))}function p(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function y(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return d(e)}}async function f(e){try{return p(await e)}catch(e){return(0,s.r9)(e),d(e)}}function h(e,t){return new m(e,t)}let m=class extends o.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=p(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,s.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.hw)(this._abortHandle),this._abortController=null}};(0,n._)([(0,l.Cb)()],m.prototype,"value",null),(0,n._)([(0,l.Cb)()],m.prototype,"error",null),(0,n._)([(0,l.Cb)()],m.prototype,"finished",null),(0,n._)([(0,l.Cb)()],m.prototype,"promise",void 0),(0,n._)([(0,l.Cb)()],m.prototype,"_result",void 0),m=(0,n._)([(0,a.j)("esri.core.asyncUtils.ReactiveTask")],m)},94443:(e,t,r)=>{r.d(t,{ME:()=>y,Su:()=>f,tz:()=>d});var n=r(20102),o=r(95330),i=r(70171);const s=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(e){return e in l}Object.keys(l);const u=[],c=new Map;function p(e){for(const t of c.keys())h(e.pattern,t)&&c.delete(t)}function d(e){return u.includes(e)||(p(e),u.unshift(e)),{remove(){const t=u.indexOf(e);t>-1&&(u.splice(t,1),p(e))}}}async function y(e){const t=(0,i.Kd)();c.has(e)||c.set(e,async function(e,t){const r=[];for(const n of u)if(h(n.pattern,e))try{return await n.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new n.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new n.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=c.get(e);return r&&await m.add(r),r}function f(e){if(!s.test(e))return null;const t=s.exec(e);if(null===t)return null;const[,r,n]=t,o=r+(n?"-"+n.toUpperCase():"");return a(o)?o:a(r)?r:null}function h(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,i.Ze)((()=>{c.clear()}));const m=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,o.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},87085:(e,t,r)=>{r.d(t,{Z:()=>_});var n=r(43697),o=(r(66577),r(3172)),i=r(20102),s=r(32448),l=r(10699),a=r(83379),u=r(92604),c=r(95330),p=r(81271),d=r(5600),y=(r(75215),r(67676),r(80442),r(52011)),f=r(68773),h=r(6570),m=r(82971);let b=0,g=class extends(s.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await r.e(8008).then(r.bind(r,28008));try{return await n(t)}catch(e){const r=t&&t.portalItem,n=r&&r.id||"unset",o=r&&r.portal&&r.portal.url||f.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.D_)(e)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,n._)([(0,d.Cb)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,n._)([(0,d.Cb)({type:h.Z})],g.prototype,"fullExtent",void 0),(0,n._)([(0,d.Cb)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,n._)([(0,d.Cb)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,n._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,n._)([(0,d.Cb)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,n._)([(0,d.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,n._)([(0,d.Cb)({clonable:!1})],g.prototype,"parent",void 0),(0,n._)([(0,d.Cb)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,n._)([(0,d.Cb)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,n._)([(0,d.Cb)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,n._)([(0,d.Cb)({type:m.Z})],g.prototype,"spatialReference",void 0),(0,n._)([(0,d.Cb)({type:String})],g.prototype,"title",void 0),(0,n._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,n._)([(0,d.Cb)()],g.prototype,"url",void 0),(0,n._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,n._)([(0,y.j)("esri.layers.Layer")],g);const _=g},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),c=r(72729),p=r(70082);let d=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,l.r)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,a.j)("esri.layers.support.FeatureType")],d);const y=d},84230:(e,t,r)=>{r.d(t,{A2:()=>s,S1:()=>c,fb:()=>i,ln:()=>p,oP:()=>u,rQ:()=>l,y2:()=>a});var n=r(40330),o=r(3172);const i={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function s(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function a(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}async function u(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const i=e.toLowerCase().indexOf("/rest/services");if(-1===i)return null;const s=`${e.substring(0,i)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,o.default)(s,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){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)}},14661:(e,t,r)=>{r.d(t,{$o:()=>c,Fj:()=>a,Kz:()=>p,Ss:()=>d,_$:()=>l,ck:()=>u,qj:()=>s});var n=r(44547),o=r(82971),i=r(40488);function s(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,p.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,i.Sx)(e);const r=o.Z.WGS84;return await(0,n.iQ)(t,r),(0,n.iV)(e,r)}(r)}const p={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function d(e){const{portal:t,isOrgItem:r,itemControl:n}=e,o=t.user?.privileges;let i=!o||o.includes("features:user:edit"),s=!!r&&!!o?.includes("features:user:fullEdit");const l="update"===n||"admin"===n;return l?s=i=!0:s&&(i=!0),{features:{edit:i,fullEdit:s},content:{updateItem:l}}}},74889:(e,t,r)=>{r.d(t,{Z:()=>_});var n,o=r(43697),i=r(66577),s=r(38171),l=r(35454),a=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(82971),h=r(33955),m=r(1231);const b=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=n=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],i=s.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;null==i.geometry||l||(i.geometry.spatialReference=r);const a=o.aggregateGeometries,u=i.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],n=a[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}n.push(i)}return n}writeGeometryType(e,t,r,n){if(e)return void b.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,i=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)s?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[i,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*i+n),(e=>o-e*s),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,o;const i=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===n&&s===o||(i.push([e-n,s-o]),n=e,o=s)}else n=t(l[0]),o=r(l[1]),i.push([n,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],s=this._quantizePoints(i,t,r);s&&o.push(s)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths;let s,l;for(let e=0,n=i.length;e<n;e++){const n=i[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(s+=o[0],l+=o[1]):(s=o[0],l=o[1]),o[0]=t(s),o[1]=r(l)}}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let s,l;for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,c.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,c.Cb)({type:[s.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,c.Cb)({types:i.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,c.Cb)({type:f.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,c.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=n=(0,o._)([(0,d.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const _=g}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2975],{10699:(e,t,r)=>{r.d(t,{IG:()=>s,iv:()=>l});var n=r(43697),o=r(52011);let i=0;const s=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return t=(0,n._)([(0,o.j)("esri.core.Identifiable")],t),t},l=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:i++})}};return t=(0,n._)([(0,o.j)("esri.core.NumericIdentifiable")],t),t};let a=class extends(s(class{})){};a=(0,n._)([(0,o.j)("esri.core.Identifiable")],a)},66643:(e,t,r)=>{r.d(t,{Ed:()=>u,UI:()=>c,mt:()=>f,q6:()=>y,vr:()=>h});var n=r(43697),o=r(92036),i=r(70586),s=r(95330),l=r(5600),a=r(52011);function u(e,t,r){return(0,s.as)(e.map(((e,n)=>t.apply(r,[e,n]))))}async function c(e,t,r){return(await(0,s.as)(e.map(((e,n)=>t.apply(r,[e,n]))))).map((e=>e.value))}function p(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function y(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return p(await e)}catch(e){return d(e)}}async function f(e){try{return p(await e)}catch(e){return(0,s.r9)(e),d(e)}}function h(e,t){return new m(e,t)}let m=class extends o.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,i.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=p(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,s.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,i.hw)(this._abortHandle),this._abortController=null}};(0,n._)([(0,l.Cb)()],m.prototype,"value",null),(0,n._)([(0,l.Cb)()],m.prototype,"error",null),(0,n._)([(0,l.Cb)()],m.prototype,"finished",null),(0,n._)([(0,l.Cb)()],m.prototype,"promise",void 0),(0,n._)([(0,l.Cb)()],m.prototype,"_result",void 0),m=(0,n._)([(0,a.j)("esri.core.asyncUtils.ReactiveTask")],m)},94443:(e,t,r)=>{r.d(t,{ME:()=>y,Su:()=>f,tz:()=>d});var n=r(20102),o=r(95330),i=r(70171);const s=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,l={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(e){return e in l}Object.keys(l);const u=[],c=new Map;function p(e){for(const t of c.keys())h(e.pattern,t)&&c.delete(t)}function d(e){return u.includes(e)||(p(e),u.unshift(e)),{remove(){const t=u.indexOf(e);t>-1&&(u.splice(t,1),p(e))}}}async function y(e){const t=(0,i.Kd)();c.has(e)||c.set(e,async function(e,t){const r=[];for(const n of u)if(h(n.pattern,e))try{return await n.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new n.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new n.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=c.get(e);return r&&await m.add(r),r}function f(e){if(!s.test(e))return null;const t=s.exec(e);if(null===t)return null;const[,r,n]=t,o=r+(n?"-"+n.toUpperCase():"");return a(o)?o:a(r)?r:null}function h(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,i.Ze)((()=>{c.clear()}));const m=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,o.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},87085:(e,t,r)=>{r.d(t,{Z:()=>_});var n=r(43697),o=(r(66577),r(3172)),i=r(20102),s=r(32448),l=r(10699),a=r(83379),u=r(92604),c=r(95330),p=r(81271),d=r(5600),y=(r(75215),r(67676),r(80442),r(52011)),f=r(68773),h=r(6570),m=r(82971);let b=0,g=class extends(s.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new h.Z(-180,-90,180,90,m.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await r.e(8008).then(r.bind(r,28008));try{return await n(t)}catch(e){const r=t&&t.portalItem,n=r&&r.id||"unset",o=r&&r.portal&&r.portal.url||f.default.portalUrl;throw u.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+o+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,c.D_)(e)||u.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,p.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,o.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new i.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,n._)([(0,d.Cb)({type:String})],g.prototype,"attributionDataUrl",void 0),(0,n._)([(0,d.Cb)({type:h.Z})],g.prototype,"fullExtent",void 0),(0,n._)([(0,d.Cb)({readOnly:!0})],g.prototype,"hasAttributionData",null),(0,n._)([(0,d.Cb)({type:String,clonable:!1})],g.prototype,"id",void 0),(0,n._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],g.prototype,"legendEnabled",void 0),(0,n._)([(0,d.Cb)({type:["show","hide","hide-children"]})],g.prototype,"listMode",void 0),(0,n._)([(0,d.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],g.prototype,"opacity",void 0),(0,n._)([(0,d.Cb)({clonable:!1})],g.prototype,"parent",void 0),(0,n._)([(0,d.Cb)({readOnly:!0})],g.prototype,"parsedUrl",null),(0,n._)([(0,d.Cb)({type:Boolean})],g.prototype,"popupEnabled",void 0),(0,n._)([(0,d.Cb)({type:Boolean})],g.prototype,"attributionVisible",void 0),(0,n._)([(0,d.Cb)({type:m.Z})],g.prototype,"spatialReference",void 0),(0,n._)([(0,d.Cb)({type:String})],g.prototype,"title",void 0),(0,n._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],g.prototype,"type",void 0),(0,n._)([(0,d.Cb)()],g.prototype,"url",void 0),(0,n._)([(0,d.Cb)({type:Boolean,nonNullable:!0})],g.prototype,"visible",void 0),g=(0,n._)([(0,y.j)("esri.layers.Layer")],g);const _=g},16451:(e,t,r)=>{r.d(t,{Z:()=>y});var n=r(43697),o=r(2368),i=r(96674),s=r(5600),l=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),u=r(30556),c=r(72729),p=r(70082);let d=class extends((0,o.J)(i.wq)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,c.im)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"id",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,s.Cb)({json:{write:!0}})],d.prototype,"domains",void 0),(0,n._)([(0,l.r)("domains")],d.prototype,"readDomains",null),(0,n._)([(0,u.c)("domains")],d.prototype,"writeDomains",null),(0,n._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"templates",void 0),d=(0,n._)([(0,a.j)("esri.layers.support.FeatureType")],d);const y=d},84230:(e,t,r)=>{r.d(t,{A2:()=>s,S1:()=>c,fb:()=>i,ln:()=>p,oP:()=>u,rQ:()=>l,y2:()=>a});var n=r(40330),o=r(3172);const i={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function s(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function l(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function a(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}async function u(e,t){const r=n.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const i=e.toLowerCase().indexOf("/rest/services");if(-1===i)return null;const s=`${e.substring(0,i)}/rest/info`,l=null!=t?t.signal:null,{data:a}=await(0,o.default)(s,{query:{f:"json"},responseType:"json",signal:l});return a?.owningSystemUrl||null}function c(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){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)}},14661:(e,t,r)=>{r.d(t,{$o:()=>c,Fj:()=>a,Kz:()=>p,Ss:()=>d,_$:()=>l,ck:()=>u,qj:()=>s});var n=r(44547),o=r(82971),i=r(40488);function s(e,t){if(!l(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function l(e,t){return!!e.typeKeywords?.includes(t)}function a(e){return l(e,p.HOSTED_SERVICE)}function u(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}async function c(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,i.Sx)(e);const r=o.Z.WGS84;return await(0,n.initializeProjection)(t,r),(0,n.iV)(e,r)}(r)}const p={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function d(e){const{portal:t,isOrgItem:r,itemControl:n}=e,o=t.user?.privileges;let i=!o||o.includes("features:user:edit"),s=!!r&&!!o?.includes("features:user:fullEdit");const l="update"===n||"admin"===n;return l?s=i=!0:s&&(i=!0),{features:{edit:i,fullEdit:s},content:{updateItem:l}}}},74889:(e,t,r)=>{r.d(t,{Z:()=>_});var n,o=r(43697),i=r(66577),s=r(38171),l=r(35454),a=r(96674),u=r(22974),c=r(5600),p=(r(75215),r(71715)),d=r(52011),y=r(30556),f=r(82971),h=r(33955),m=r(1231);const b=new l.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let g=n=class extends a.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=f.Z.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],i=s.Z.fromJSON(o),l=o.geometry&&o.geometry.spatialReference;null==i.geometry||l||(i.geometry.spatialReference=r);const a=o.aggregateGeometries,u=i.aggregateGeometries;if(a&&null!=u)for(const e in u){const t=u[e],n=a[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}n.push(i)}return n}writeGeometryType(e,t,r,n){if(e)return void b.write(e,t,r,n);const{features:o}=this;if(o)for(const e of o)if(e&&null!=e.geometry)return void b.write(e.geometry.type,t,r,n)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,n=(0,h.im)(e);return n&&!r&&t.spatialReference&&(n.spatialReference=f.Z.fromJSON(t.spatialReference)),n}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new n(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const n=t.features[r];if(n.geometry){const t=e&&e[r];n.geometry=t&&t.toJSON()||n.geometry}}return t}quantize(e){const{scale:[t,r],translate:[n,o]}=e,i=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-n)/t)),(e=>Math.round((o-e)/r)));for(let e=0,t=i.length;e<t;e++)s?.(i[e].geometry)||(i.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[n,o],scale:[i,s]}=r;let l=null,a=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;l=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;a=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*i+n),(e=>o-e*s),l,a);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let n,o;const i=[];for(let s=0,l=e.length;s<l;s++){const l=e[s];if(s>0){const e=t(l[0]),s=r(l[1]);e===n&&s===o||(i.push([e-n,s-o]),n=e,o=s)}else n=t(l[0]),o=r(l[1]),i.push([n,o])}return i.length>0?i:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const n=(0,h.oU)(e)?e.rings:e.paths,o=[];for(let e=0,i=n.length;e<i;e++){const i=n[e],s=this._quantizePoints(i,t,r);s&&o.push(s)}return o.length>0?((0,h.oU)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const n=this._quantizePoints(e.points,t,r);return n&&n.length>0?(e.points=n,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,n,o){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),n&&(e.z=n(e.z))}:"polyline"===e||"polygon"===e?e=>{const i=(0,h.oU)(e)?e.rings:e.paths;let s,l;for(let e=0,n=i.length;e<n;e++){const n=i[e];for(let e=0,o=n.length;e<o;e++){const o=n[e];e>0?(s+=o[0],l+=o[1]):(s=o[0],l=o[1]),o[0]=t(s),o[1]=r(l)}}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2]),r[3]=o(r[3])}}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=o(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),n&&null!=e.zmax&&null!=e.zmin&&(e.zmax=n(e.zmax),e.zmin=n(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const i=e.points;let s,l;for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],l+=n[1]):(s=n[0],l=n[1]),n[0]=t(s),n[1]=r(l)}if(n&&o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2]),t[3]=o(t[3])}else if(n)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=n(t[2])}else if(o)for(let e=0,t=i.length;e<t;e++){const t=i[e];t[2]=o(t[2])}}:null}};(0,o._)([(0,c.Cb)({type:String,json:{write:!0}})],g.prototype,"displayFieldName",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"exceededTransferLimit",void 0),(0,o._)([(0,c.Cb)({type:[s.Z],json:{write:!0}})],g.prototype,"features",void 0),(0,o._)([(0,p.r)("features")],g.prototype,"readFeatures",null),(0,o._)([(0,c.Cb)({type:[m.Z],json:{write:!0}})],g.prototype,"fields",void 0),(0,o._)([(0,c.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:b.read}}})],g.prototype,"geometryType",void 0),(0,o._)([(0,y.c)("geometryType")],g.prototype,"writeGeometryType",null),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasM",void 0),(0,o._)([(0,c.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],g.prototype,"hasZ",void 0),(0,o._)([(0,c.Cb)({types:i.qM,json:{write:!0}})],g.prototype,"queryGeometry",void 0),(0,o._)([(0,p.r)("queryGeometry")],g.prototype,"readQueryGeometry",null),(0,o._)([(0,c.Cb)({type:f.Z,json:{write:!0}})],g.prototype,"spatialReference",void 0),(0,o._)([(0,y.c)("spatialReference")],g.prototype,"writeSpatialReference",null),(0,o._)([(0,c.Cb)({json:{write:!0}})],g.prototype,"transform",void 0),g=n=(0,o._)([(0,d.j)("esri.rest.support.FeatureSet")],g),g.prototype.toJSON.isDefaultToJSON=!0;const _=g}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2920,661,5234,9880,1596],{92835:(e,t,r)=>{r.d(t,{Z:()=>g});var i,s=r(43697),n=r(96674),o=r(70586),a=r(35463),l=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),d=r(30556);let c=i=class extends n.wq{static get allTime(){return p}static get empty(){return m}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,r=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,s=null!=e.end?e.end.getTime():e.end;return t===i&&r===s}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),r=(0,o.yw)(this.end,(t=>{const r=(0,a.JE)(t,e);return t.getTime()===r.getTime()?r:(0,a.Nm)(r,1,e)}));return new i({start:t,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let o,a;if(s>=t&&s<=r?o=s:t>=s&&t<=n&&(o=t),r>=s&&r<=n?a=r:n>=t&&n<=r&&(a=n),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:n}=this;return null!=s&&(r.start=(0,a.Nm)(s,e,t)),null!=n&&(r.end=(0,a.Nm)(n,e,t)),r}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"end",void 0),(0,s._)([(0,h.r)("end")],c.prototype,"readEnd",null),(0,s._)([(0,d.c)("end")],c.prototype,"writeEnd",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isAllTime",null),(0,s._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],c.prototype,"isEmpty",null),(0,s._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],c.prototype,"start",void 0),(0,s._)([(0,h.r)("start")],c.prototype,"readStart",null),(0,s._)([(0,d.c)("start")],c.prototype,"writeStart",null),c=i=(0,s._)([(0,u.j)("esri.TimeExtent")],c);const p=new c,m=new c({start:void 0,end:void 0}),g=c},99880:(e,t,r)=>{r.d(t,{V:()=>l});var i=r(68773),s=(r(3172),r(20102)),n=r(92604),o=r(81271);const a=n.Z.getLogger("esri.assets");function l(e){if(!i.default.assetsPath)throw a.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,o.v_)(i.default.assetsPath,e)}},32448:(e,t,r)=>{r.d(t,{Z:()=>l});var i=r(43697),s=r(92036),n=r(50758),o=r(52011);class a{constructor(){this._emitter=new a.EventEmitter(this)}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}}!function(e){class t{constructor(e=null){this._target=e,this._listenersMap=null}clear(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clear()}emit(e,t){const r=this._listenersMap&&this._listenersMap.get(e);if(!r)return!1;const i=this._target||this;return[...r].forEach((e=>{e.call(i,t)})),r.length>0}on(e,t){if(Array.isArray(e)){const r=e.map((e=>this.on(e,t)));return(0,n.AL)(r)}if(e.includes(","))throw new TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap||(this._listenersMap=new Map);const r=this._listenersMap.get(e)||[];return r.push(t),this._listenersMap.set(e,r),{remove:()=>{const r=this._listenersMap&&this._listenersMap.get(e)||[],i=r.indexOf(t);i>=0&&r.splice(i,1)}}}once(e,t){const r=this.on(e,(e=>{r.remove(),t.call(null,e)}));return r}hasEventListener(e){const t=this._listenersMap&&this._listenersMap.get(e);return null!=t&&t.length>0}}e.EventEmitter=t,e.EventedMixin=e=>{let r=class extends e{constructor(){super(...arguments),this._emitter=new t}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};return r=(0,i._)([(0,o.j)("esri.core.Evented")],r),r};let r=class extends s.Z{constructor(){super(...arguments),this._emitter=new a.EventEmitter(this)}destroy(){this._emitter.clear()}emit(e,t){return this._emitter.emit(e,t)}on(e,t){return this._emitter.on(e,t)}once(e,t){return this._emitter.once(e,t)}hasEventListener(e){return this._emitter.hasEventListener(e)}};r=(0,i._)([(0,o.j)("esri.core.Evented")],r),e.EventedAccessor=r}(a||(a={}));const l=a},10699:(e,t,r)=>{r.d(t,{IG:()=>o,iv:()=>a});var i=r(43697),s=r(52011);let n=0;const o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.j)("esri.core.Identifiable")],t),t},a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.j)("esri.core.NumericIdentifiable")],t),t};let l=class extends(o(class{})){};l=(0,i._)([(0,s.j)("esri.core.Identifiable")],l)},13867:(e,t,r)=>{r.d(t,{z:()=>s});var i=r(69801);class s{constructor(e,t){this._storage=new i.WJ,this.id="",this.name="",this.size=0,this._storage.maxSize=e,this._storage.register(this),t&&this._storage.registerRemoveFunc("",t)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,r=1){this._storage.put(this,e,t,r,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},69801:(e,t,r)=>{r.d(t,{WJ:()=>a,Xq:()=>o});var i,s,n=r(44553);(s=i||(i={}))[s.ALL=0]="ALL",s[s.SOME=1]="SOME";class o{constructor(e,t,r){this.name=e,this._storage=t,this.id=l+++":",this.size=0,this.maxSize=0,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),r&&(this._storage.registerRemoveFunc(this.id,r),this._removeFunc=!0)}destroy(){this._storage.clear(this),this._removeFunc&&this._storage.deregisterRemoveFunc(this.id),this._storage.deregister(this),this._storage=null}get hitRate(){return this._hit/(this._hit+this._miss)}get sizeAll(){return this._storage.size}resetHitRate(){this._hit=this._miss=0}put(e,t,r,i=0){this._storage.put(this,e,t,r,i)}get(e){const t=this._storage.get(this,e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this,e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,r){this._storage.updateSize(this,e,t,r)}clear(){this._storage.clear(this)}clearAll(){this._storage.clearAll()}get performanceInfo(){return this._storage.performanceInfo}resetStats(){this._storage.resetStats()}}class a{get size(){return this._size}constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new n.Z,this._users=new n.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimits()}put(e,t,r,s,n){t=e.id+t;const o=this._db.get(t);if(o&&(this._size-=o.size,e.size-=o.size,this._db.delete(t),o.entry!==r&&this._notifyRemove(t,o.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(t,r,i.ALL);if(void 0===r)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const a=1+Math.max(n,-3)- -3;this._db.set(t,{entry:r,size:s,lifetime:a,lives:a}),this._size+=s,e.size+=s,this._checkSizeLimits()}updateSize(e,t,r,s){t=e.id+t;const n=this._db.get(t);if(n&&n.entry===r){for(this._size-=n.size,e.size-=n.size;s>this._maxSize;){const e=this._notifyRemove(t,r,i.SOME);if(!(null!=e&&e>0))return void this._db.delete(t);s=e}n.size=s,this._size+=s,e.size+=s,this._checkSizeLimits()}}pop(e,t){t=e.id+t;const r=this._db.get(t);if(r)return this._size-=r.size,e.size-=r.size,this._db.delete(t),++this._hit,r.entry;++this._miss}get(e,t){t=e.id+t;const r=this._db.get(t);if(void 0!==r)return this._db.delete(t),r.lives=r.lifetime,this._db.set(t,r),++this._hit,r.entry;++this._miss}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},r=new Array;this._db.forEach(((e,i)=>{const s=e.lifetime;r[s]=(r[s]||0)+e.size,this._users.forAll((r=>{const{id:s,name:n}=r;if(i.startsWith(s)){const r=t[n]||0;t[n]=r+e.size}}))}));const i={};this._users.forAll((e=>{const r=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const s=t[r]||0;t[r]=s,i[r]=Math.round(100*e.hitRate)+"%"}else i[r]="0%"}));const s=Object.keys(t);s.sort(((e,r)=>t[r]-t[e])),s.forEach((r=>e[r]=Math.round(t[r]/2**20)+"MB / "+i[r]));for(let t=r.length-1;t>=0;--t){const i=r[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){const t=e.id;this._db.forEach(((e,r)=>{r.startsWith(t)&&(this._size-=e.size,this._db.delete(r),this._notifyRemove(r,e.entry,i.ALL))})),e.size=0}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._users.forEach((e=>e.size=0)),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,r){let i;return this._removeFuncs.some((s=>{if(e.startsWith(s[0])){const e=s[1](t,r);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimits(){if(this._size>this._maxSize)for(const[e,t]of this._db)if(this._purgeItem(e,t),this._size<=.9*this.maxSize)return;this._users.forEach((e=>{if(e.maxSize>0&&e.size>e.maxSize)for(const[t,r]of this._db)if(t.startsWith(e.id)&&(this._purgeItem(t,r,e),e.size<=.9*e.maxSize))return}))}_purgeItem(e,t,r=this._users.find((t=>e.startsWith(t.id)))){if(this._db.delete(e),t.lives<=1){this._size-=t.size,r&&(r.size-=t.size);const s=this._notifyRemove(e,t.entry,i.SOME);null!=s&&s>0&&(this._size+=s,r&&(r.size+=s),t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}let l=0},10661:(e,t,r)=>{r.d(t,{s:()=>s});var i=r(42100);class s extends i.s{notify(){const e=this._observers;if(e&&e.length>0){const t=e.slice();for(const e of t)e.onInvalidated(),e.onCommitted()}}}},66643:(e,t,r)=>{r.d(t,{Ed:()=>h,UI:()=>u,mt:()=>m,q6:()=>p,vr:()=>g});var i=r(43697),s=r(92036),n=r(70586),o=r(95330),a=r(5600),l=r(52011);function h(e,t,r){return(0,o.as)(e.map(((e,i)=>t.apply(r,[e,i]))))}async function u(e,t,r){return(await(0,o.as)(e.map(((e,i)=>t.apply(r,[e,i]))))).map((e=>e.value))}function d(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return d(await e)}catch(e){return c(e)}}async function m(e){try{return d(await e)}catch(e){return(0,o.r9)(e),c(e)}}function g(e,t){return new y(e,t)}let y=class extends s.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,n.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:r}=this._abortController;this.promise=e(r),this.promise.then((e=>{this._result=d(e),this._cleanup()}),(e=>{this._result=c(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,n.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],y.prototype,"value",null),(0,i._)([(0,a.Cb)()],y.prototype,"error",null),(0,i._)([(0,a.Cb)()],y.prototype,"finished",null),(0,i._)([(0,a.Cb)()],y.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],y.prototype,"_result",void 0),y=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],y)},17445:(e,t,r)=>{r.d(t,{N1:()=>c,YP:()=>l,Z_:()=>g,gx:()=>h,nn:()=>y,on:()=>d,tX:()=>f});var i=r(91460),s=r(50758),n=r(70586),o=r(95330),a=r(26258);function l(e,t,r={}){return u(e,t,r,p)}function h(e,t,r={}){return u(e,t,r,m)}function u(e,t,r={},i){let s=null;const o=r.once?(e,r)=>{i(e)&&((0,n.hw)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,a.aQ)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return s}function d(e,t,r,o={}){let a=null,h=null,u=null;function d(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function c(e){o.once&&o.once&&(0,n.hw)(u),r(e)}const p=l(e,((e,r)=>{d(),(0,i.vT)(e)&&(a=e,h=(0,i.on)(e,t,c),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return u=(0,s.kB)((()=>{p.remove(),d()})),u}function c(e,t){return function(e,t,r){if((0,o.Hc)(r))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,n.hw)(a)}return new Promise(((i,n)=>{a=(0,s.AL)([(0,o.fu)(r,(()=>{l(),n((0,o.zE)())})),u(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,m,t)}function p(e){return!0}function m(e){return!!e}r(87538);const g={sync:!0},y={initial:!0},f={sync:!0,initial:!0}},35463:(e,t,r)=>{r.d(t,{JE:()=>o,Nm:()=>n,rJ:()=>a}),r(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},s={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function n(e,t,r){const i=new Date(e.getTime());if(t&&r){const e=s[r],{getter:n,setter:o,multiplier:a}=e;if("months"===r){const e=function(e,t){const r=new Date(e,t+1,1);return r.setDate(0),r.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[n]()+t*a)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,r){return 0===e?0:e*i[t]/i[r]}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,s=r(43697),n=r(67676),o=r(35454),a=r(96674),l=r(67900),h=r(20941),u=r(5600),d=(r(75215),r(80442),r(71715)),c=r(52011),p=r(30556);const m=(0,o.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=m.jsonValues.slice();(0,n.e$)(g,"orthometric");const y=(0,o.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let f=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return m.write(e,t,r)}readHeightModel(e,t,r){return m.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new h.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(_(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||y.read(e)||(r&&r.messages&&r.messages.push(_(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function _(e,t){return new h.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,s._)([(0,u.Cb)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal"}}}})],f.prototype,"heightModel",void 0),(0,s._)([(0,p.c)("web-scene","heightModel")],f.prototype,"writeHeightModel",null),(0,s._)([(0,d.r)(["web-scene","service"],"heightModel")],f.prototype,"readHeightModel",null),(0,s._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:y.jsonValues,write:y.write}}}})],f.prototype,"heightUnit",void 0),(0,s._)([(0,d.r)("web-scene","heightUnit")],f.prototype,"readHeightUnit",null),(0,s._)([(0,d.r)("service","heightUnit")],f.prototype,"readHeightUnitService",null),(0,s._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],f.prototype,"vertCRS",void 0),(0,s._)([(0,d.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],f.prototype,"readVertCRS",null),f=i=(0,s._)([(0,c.j)("esri.geometry.HeightModelInfo")],f);const v=f},90344:(e,t,r)=>{r.d(t,{LJ:()=>M,Xr:()=>f,Ze:()=>w,cZ:()=>h,i$:()=>D,o8:()=>E,p6:()=>S});var i=r(35454),s=r(70171),n=r(17126);const o={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},h={timeZone:"Etc/UTC"},u={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},g={...m,second:"numeric"},y={"short-date":u,"short-date-short-time":{...u,...m},"short-date-short-time-24":{...u,...m,hour12:!1},"short-date-long-time":{...u,...g},"short-date-long-time-24":{...u,...g,hour12:!1},"short-date-le":u,"short-date-le-short-time":{...u,...m},"short-date-le-short-time-24":{...u,...m,hour12:!1},"short-date-le-long-time":{...u,...g},"short-date-le-long-time-24":{...u,...g,hour12:!1},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...m},"long-month-day-year-short-time-24":{...d,...m,hour12:!1},"long-month-day-year-long-time":{...d,...g},"long-month-day-year-long-time-24":{...d,...g,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...m},"day-short-month-year-short-time-24":{...c,...m,hour12:!1},"day-short-month-year-long-time":{...c,...g},"day-short-month-year-long-time-24":{...c,...g,hour12:!1},"long-date":p,"long-date-short-time":{...p,...m},"long-date-short-time-24":{...p,...m,hour12:!1},"long-date-long-time":{...p,...g},"long-date-long-time-24":{...p,...g,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":g},f=(0,i.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),_={ar:"ar-u-nu-latn-ca-gregory"};let v=new WeakMap,b=y["short-date-short-time"];function w(e){return y[e]}function S(e,t){return function(e){const t=e||b;let r=v.get(t);if(!r){const e=(0,s.Kd)(),i=_[e]||e;r=new Intl.DateTimeFormat(i,t),v.set(t,r)}return r}(t).format(e)}function E(e,t=y["short-date"]){return S(new Date(e),{...t,...h,...a})}function M(e,t=y["short-time"]){return S(new Date(`1970-01-01T${e}Z`),{...t,...h,...o})}function D(e,t=y["short-date-short-time"]){const r=n.ou.fromISO(e,{setZone:!0}),i=(0,s.Kd)(),o=_[i]??i;return r.toLocaleString({...l,...t},{locale:o})}(0,s.Ze)((()=>{v=new WeakMap,b=y["short-date-short-time"]}))},94443:(e,t,r)=>{r.d(t,{ME:()=>p,Su:()=>m,tz:()=>c});var i=r(20102),s=r(95330),n=r(70171);const o=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,a={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){return e in a}Object.keys(a);const h=[],u=new Map;function d(e){for(const t of u.keys())g(e.pattern,t)&&u.delete(t)}function c(e){return h.includes(e)||(d(e),h.unshift(e)),{remove(){const t=h.indexOf(e);t>-1&&(h.splice(t,1),d(e))}}}async function p(e){const t=(0,n.Kd)();u.has(e)||u.set(e,async function(e,t){const r=[];for(const i of h)if(g(i.pattern,e))try{return await i.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new i.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new i.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=u.get(e);return r&&await y.add(r),r}function m(e){if(!o.test(e))return null;const t=o.exec(e);if(null===t)return null;const[,r,i]=t,s=r+(i?"-"+i.toUpperCase():"");return l(s)?s:l(r)?r:null}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ze)((()=>{u.clear()}));const y=new class{constructor(){this._numLoading=0,this._dfd=null}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,s.hh)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18848:(e,t,r)=>{r.d(t,{sh:()=>l,uf:()=>h});var i=r(70586),s=r(70171);const n={ar:"ar-u-nu-latn"};let o=new WeakMap,a={};function l(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||a;if(!o.has(t)){const r=(0,s.Kd)(),i=n[(0,s.Kd)()]||r;o.set(t,new Intl.NumberFormat(i,e))}return(0,i.j0)(o.get(t))}(t).format(e)}(0,s.Ze)((()=>{o=new WeakMap,a={}}))},65665:(e,t,r)=>{r.r(t),r.d(t,{default:()=>z});var i=r(43697),s=r(3172),n=r(20102),o=r(70586),a=r(16453),l=r(95330),h=r(81271),u=r(5600),d=(r(75215),r(67676)),c=(r(80442),r(71715)),p=r(52011),m=r(79235),g=r(87085),y=r(46486),f=r(17287),_=r(38009),v=r(16859),b=r(21506);class w{constructor(e,t,r,i){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=r,this.noDataValue=i)}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let r=1/0,i=-1/0,s=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(r=n<r?n:r,i=n>i?n:i,s=!1);s?(this._minValue=0,this._maxValue=0):(this._minValue=r,this._maxValue=i>-3e38?i:0)}}var S=r(50758),E=r(92604),M=r(78346);class D{constructor(e,t,r,i,s={}){this._mainMethod=t,this._transferLists=r,this._listeners=[],this._promise=(0,M.bA)(e,{...s,schedule:i}).then((e=>{if(void 0===this._thread){this._thread=e,this._promise=null,s.hasInitialize&&this.broadcast({},"initialize");for(const e of this._listeners)this._connectListener(e)}else e.close()})),this._promise.catch((t=>E.Z.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`)))}on(e,t){const r={removed:!1,eventName:e,callback:t,threadHandle:null};return this._listeners.push(r),this._connectListener(r),(0,S.kB)((()=>{r.removed=!0,(0,d.Od)(this._listeners,r),this._thread&&null!=r.threadHandle&&r.threadHandle.remove()}))}destroy(){this._thread&&(this._thread.close(),this._thread=null),this._promise=null,this._listeners.length=0,this._transferLists={}}invoke(e,t){return this.invokeMethod(this._mainMethod,e,t)}invokeMethod(e,t,r){if(this._thread){const i=this._transferLists[e],s=i?i(t):[];return this._thread.invoke(e,t,{transferList:s,signal:r})}return this._promise?this._promise.then((()=>((0,l.k_)(r),this.invokeMethod(e,t,r)))):Promise.reject(null)}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then((()=>{})):this._promise?this._promise.then((()=>this.broadcast(e,t))):Promise.reject()}get promise(){return this._promise}_connectListener(e){this._thread&&this._thread.on(e.eventName,e.callback).then((t=>{e.removed||(e.threadHandle=t)}))}}class T extends D{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(L.forEach(((e,t)=>{e===this&&L.delete(t)})),this.destroy())}}const L=new Map;let C=class extends((0,y.Z)((0,f.Y)((0,_.q)((0,v.I)((0,a.R)(g.Z)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=L.get(e);return t||(null!=e?(t=new T((t=>e.immediate.schedule(t))),L.set(e,t)):(t=new T,L.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.RY)(this._lercDecoder)}readCapabilities(e,t){const r=t.capabilities&&t.capabilities.split(",").map((e=>e.toLowerCase().trim()));return r?{operations:{supportsTileMap:r.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let r=t.currentVersion;return r||(r=9.3),r}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new n.Z("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.r9).then((()=>this._fetchImageService(t)))),Promise.resolve(this)}fetchTile(e,t,r,i){const n=null!=(i=i||{signal:null}).signal?i.signal:i.signal=(new AbortController).signal,o={responseType:"array-buffer",signal:n},a={noDataValue:i.noDataValue,returnFileInfo:!0};return this.load().then((()=>this._fetchTileAvailability(e,t,r,i))).then((()=>(0,s.default)(this.getTileUrl(e,t,r),o))).then((e=>this._lercDecoder.decode(e.data,a,n))).then((e=>new w(e)))}getTileUrl(e,t,r){const i=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,s=(0,h.B7)({...this.parsedUrl.query,blankTile:!i&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${r}${s?"?"+s:""}`}async queryElevation(e,t){const{ElevationQuery:i}=await r.e(5642).then(r.bind(r,55642));return(0,l.k_)(t),(new i).query(this,e,t)}async createElevationSampler(e,t){const{ElevationQuery:i}=await r.e(5642).then(r.bind(r,55642));return(0,l.k_)(t),(new i).createSampler(this,e,t)}_fetchTileAvailability(e,t,r,i){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,r,i):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},r=await(0,s.default)(this.parsedUrl.path,t);r.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=r.data,this.read(r.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[I]}};(0,i._)([(0,u.Cb)({readOnly:!0})],C.prototype,"capabilities",void 0),(0,i._)([(0,c.r)("service","capabilities",["capabilities"])],C.prototype,"readCapabilities",null),(0,i._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],C.prototype,"copyright",void 0),(0,i._)([(0,u.Cb)({readOnly:!0,type:m.Z})],C.prototype,"heightModelInfo",void 0),(0,i._)([(0,u.Cb)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],C.prototype,"path",void 0),(0,i._)([(0,u.Cb)({type:["show","hide"]})],C.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],C.prototype,"minScale",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],C.prototype,"maxScale",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],C.prototype,"opacity",void 0),(0,i._)([(0,u.Cb)({type:["ArcGISTiledElevationServiceLayer"]})],C.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)()],C.prototype,"sourceJSON",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},value:"elevation",readOnly:!0})],C.prototype,"type",void 0),(0,i._)([(0,u.Cb)(b.HQ)],C.prototype,"url",void 0),(0,i._)([(0,u.Cb)()],C.prototype,"version",void 0),(0,i._)([(0,c.r)("version",["currentVersion"])],C.prototype,"readVersion",null),C=(0,i._)([(0,p.j)("esri.layers.ElevationLayer")],C);const I=Symbol("default-fetch-tile");C.prototype.fetchTile[I]=!0;const z=C},87085:(e,t,r)=>{r.d(t,{Z:()=>v});var i=r(43697),s=(r(66577),r(3172)),n=r(20102),o=r(32448),a=r(10699),l=r(83379),h=r(92604),u=r(95330),d=r(81271),c=r(5600),p=(r(75215),r(67676),r(80442),r(52011)),m=r(68773),g=r(6570),y=r(82971);let f=0,_=class extends(o.Z.EventedMixin((0,a.IG)(l.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new g.Z(-180,-90,180,90,y.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+f++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=y.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(3529).then(r.bind(r,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(8008).then(r.bind(r,28008));try{return await i(t)}catch(e){const r=t&&t.portalItem,i=r&&r.id||"unset",s=r&&r.portal&&r.portal.url||m.default.portalUrl;throw h.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||h.Z.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.mN)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,c.Cb)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,i._)([(0,c.Cb)({type:g.Z})],_.prototype,"fullExtent",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,i._)([(0,c.Cb)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,i._)([(0,c.Cb)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,i._)([(0,c.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,i._)([(0,c.Cb)({clonable:!1})],_.prototype,"parent",void 0),(0,i._)([(0,c.Cb)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,i._)([(0,c.Cb)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,i._)([(0,c.Cb)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,i._)([(0,c.Cb)({type:y.Z})],_.prototype,"spatialReference",void 0),(0,i._)([(0,c.Cb)({type:String})],_.prototype,"title",void 0),(0,i._)([(0,c.Cb)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,i._)([(0,c.Cb)()],_.prototype,"url",void 0),(0,i._)([(0,c.Cb)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,i._)([(0,p.j)("esri.layers.Layer")],_);const v=_},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>S});var i=r(43697),s=r(68773),n=r(40330),o=r(3172),a=r(66643),l=r(20102),h=r(92604),u=r(70586),d=r(95330),c=r(81271),p=r(5600),m=(r(75215),r(67676),r(80442),r(71715)),g=r(52011),y=r(30556),f=r(84230),_=r(48522),v=r(15235),b=r(86082),w=r(14661);const S=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,u.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,d.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.D_)(e)||h.Z.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,d.r9)(e),!0))))}async _setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,d.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,w.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,f.oP)(this.url,t)}catch(e){(0,d.r9)(e)}if(!s||!(0,c.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,w.Ss)(r)}catch(e){(0,d.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=E.credential===t?E.user:await this._fetchEditingUser(e);return E.credential=t,E.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=_.Z.getDefault();if(s&&s.loaded&&(0,c.Fv)(s.restUrl)===(0,c.Fv)(i))return s.user;const l=`${i}/community/self`,h=null!=e?e.signal:null,u=await(0,a.q6)((0,o.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:h}));return u.ok?b.default.fromJSON(u.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||_.Z.getDefault());return r&&i&&!(0,c.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,p.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,p.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,p.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.j)("esri.layers.mixins.PortalLayer")],t),t},E={credential:null,user:null}},84230:(e,t,r)=>{r.d(t,{A2:()=>o,S1:()=>u,fb:()=>n,ln:()=>d,oP:()=>h,rQ:()=>a,y2:()=>l});var i=r(40330),s=r(3172);const n={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function o(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function a(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function l(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}async function h(e,t){const r=i.id?.findServerInfo(e);if(null!=r?.currentVersion)return r.owningSystemUrl||null;const n=e.toLowerCase().indexOf("/rest/services");if(-1===n)return null;const o=`${e.substring(0,n)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,s.default)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function u(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){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 d(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)}},14661:(e,t,r)=>{r.d(t,{$o:()=>u,Fj:()=>l,Kz:()=>d,Ss:()=>c,_$:()=>a,ck:()=>h,qj:()=>o});var i=r(44547),s=r(82971),n=r(40488);function o(e,t){if(!a(e,t)){const r=e.typeKeywords;r?r.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function h(e,t){const r=e.typeKeywords;if(r){const e=r.indexOf(t);e>-1&&r.splice(e,1)}}async function u(e){const t=e.clone().normalize();let r;if(t.length>1)for(const e of t)r?e.width>r.width&&(r=e):r=e;else r=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,n.Sx)(e);const r=s.Z.WGS84;return await(0,i.initializeProjection)(t,r),(0,i.iV)(e,r)}(r)}const d={DEVELOPER_BASEMAP:"DeveloperBasemap",JSAPI:"ArcGIS API for JavaScript",METADATA:"Metadata",MULTI_LAYER:"Multilayer",SINGLE_LAYER:"Singlelayer",TABLE:"Table",HOSTED_SERVICE:"Hosted Service"};function c(e){const{portal:t,isOrgItem:r,itemControl:i}=e,s=t.user?.privileges;let n=!s||s.includes("features:user:edit"),o=!!r&&!!s?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?o=n=!0:o&&(n=!0),{features:{edit:n,fullEdit:o},content:{updateItem:a}}}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6188,3172,9880],{99880:(e,t,n)=>{n.d(t,{V:()=>l});var r=n(68773),s=(n(3172),n(20102)),i=n(92604),a=n(81271);const o=i.Z.getLogger("esri.assets");function l(e){if(!r.default.assetsPath)throw o.errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new s.Z("assets:path-not-set","config.assetsPath is not set");return(0,a.v_)(r.default.assetsPath,e)}},46851:(e,t,n)=>{n.d(t,{R:()=>i,a:()=>c,g:()=>s,t:()=>l});let r=1e-6;function s(){return r}const i=Math.random,a=Math.PI/180,o=180/Math.PI;function l(e){return e*a}function c(e){return e*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:i,equals:function(e,t){return Math.abs(e-t)<=r*Math.max(1,Math.abs(e),Math.abs(t))},getEpsilon:s,setEpsilon:function(e){r=e},toDegree:c,toRadian:l},Symbol.toStringTag,{value:"Module"}))},17896:(e,t,n)=>{n.d(t,{A:()=>d,C:()=>h,D:()=>u,a:()=>l,b:()=>c,c:()=>a,d:()=>y,e:()=>_,f:()=>m,g:()=>f,h:()=>b,i:()=>p,j:()=>A,k:()=>v,l:()=>i,m:()=>I,n:()=>x,p:()=>g,q:()=>M,r:()=>P,s:()=>o,t:()=>w,u:()=>B});var r=n(65617),s=n(46851);function i(e){const t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}function a(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function o(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}function l(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}function c(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}function h(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}function u(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}function f(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function d(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}function p(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return Math.sqrt(n*n+r*r+s*s)}function y(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2];return n*n+r*r+s*s}function g(e){const t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}function x(e,t){const n=t[0],r=t[1],s=t[2];let i=n*n+r*r+s*s;return i>0&&(i=1/Math.sqrt(i),e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i),e}function _(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function m(e,t,n){const r=t[0],s=t[1],i=t[2],a=n[0],o=n[1],l=n[2];return e[0]=s*l-i*o,e[1]=i*a-r*l,e[2]=r*o-s*a,e}function b(e,t,n,r){const s=t[0],i=t[1],a=t[2];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e}function I(e,t,n){const r=t[0],s=t[1],i=t[2];return e[0]=n[0]*r+n[4]*s+n[8]*i+n[12],e[1]=n[1]*r+n[5]*s+n[9]*i+n[13],e[2]=n[2]*r+n[6]*s+n[10]*i+n[14],e}function w(e,t,n){const r=t[0],s=t[1],i=t[2];return e[0]=r*n[0]+s*n[3]+i*n[6],e[1]=r*n[1]+s*n[4]+i*n[7],e[2]=r*n[2]+s*n[5]+i*n[8],e}function M(e,t,n){const r=n[0],s=n[1],i=n[2],a=n[3],o=t[0],l=t[1],c=t[2];let h=s*c-i*l,u=i*o-r*c,f=r*l-s*o,d=s*f-i*u,p=i*h-r*f,y=r*u-s*h;const g=2*a;return h*=g,u*=g,f*=g,d*=2,p*=2,y*=2,e[0]=o+h+d,e[1]=l+u+p,e[2]=c+f+y,e}const T=(0,r.c)(),k=(0,r.c)();function v(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function P(e,t,n){const r=n[0]-t[0],s=n[1]-t[1],i=n[2]-t[2];let a=r*r+s*s+i*i;return a>0?(a=1/Math.sqrt(a),e[0]=r*a,e[1]=s*a,e[2]=i*a,e):(e[0]=0,e[1]=0,e[2]=0,e)}const L=c,E=h,D=u,A=p,S=y,B=i,V=g;Object.freeze(Object.defineProperty({__proto__:null,abs:function(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e},add:l,angle:function(e,t){a(T,e),a(k,t),x(T,T),x(k,k);const n=_(T,k);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(e,t,n,r,s,i){const a=1-i,o=a*a,l=i*i,c=o*a,h=3*i*o,u=3*l*a,f=l*i;return e[0]=t[0]*c+n[0]*h+r[0]*u+s[0]*f,e[1]=t[1]*c+n[1]*h+r[1]*u+s[1]*f,e[2]=t[2]*c+n[2]*h+r[2]*u+s[2]*f,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},copy:a,cross:m,direction:P,dist:A,distance:p,div:D,divide:u,dot:_,equals:function(e,t){if(e===t)return!0;const n=e[0],r=e[1],i=e[2],a=t[0],o=t[1],l=t[2],c=(0,s.g)();return Math.abs(n-a)<=c*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=c*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-l)<=c*Math.max(1,Math.abs(i),Math.abs(l))},exactEquals:v,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,n,r,s,i){const a=i*i,o=a*(2*i-3)+1,l=a*(i-2)+i,c=a*(i-1),h=a*(3-2*i);return e[0]=t[0]*o+n[0]*l+r[0]*c+s[0]*h,e[1]=t[1]*o+n[1]*l+r[1]*c+s[1]*h,e[2]=t[2]*o+n[2]*l+r[2]*c+s[2]*h,e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e},len:B,length:i,lerp:b,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e},mul:E,multiply:h,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e},normalize:x,random:function(e,t){t=t||1;const n=s.R,r=2*n()*Math.PI,i=2*n()-1,a=Math.sqrt(1-i*i)*t;return e[0]=Math.cos(r)*a,e[1]=Math.sin(r)*a,e[2]=i*t,e},rotateX:function(e,t,n,r){const s=[],i=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],i[0]=s[0],i[1]=s[1]*Math.cos(r)-s[2]*Math.sin(r),i[2]=s[1]*Math.sin(r)+s[2]*Math.cos(r),e[0]=i[0]+n[0],e[1]=i[1]+n[1],e[2]=i[2]+n[2],e},rotateY:function(e,t,n,r){const s=[],i=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],i[0]=s[2]*Math.sin(r)+s[0]*Math.cos(r),i[1]=s[1],i[2]=s[2]*Math.cos(r)-s[0]*Math.sin(r),e[0]=i[0]+n[0],e[1]=i[1]+n[1],e[2]=i[2]+n[2],e},rotateZ:function(e,t,n,r){const s=[],i=[];return s[0]=t[0]-n[0],s[1]=t[1]-n[1],s[2]=t[2]-n[2],i[0]=s[0]*Math.cos(r)-s[1]*Math.sin(r),i[1]=s[0]*Math.sin(r)+s[1]*Math.cos(r),i[2]=s[2],e[0]=i[0]+n[0],e[1]=i[1]+n[1],e[2]=i[2]+n[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:f,scaleAndAdd:d,set:o,sign:function(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e},sqrDist:S,sqrLen:V,squaredDistance:y,squaredLength:g,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:L,subtract:c,transformMat3:w,transformMat4:I,transformQuat:M},Symbol.toStringTag,{value:"Module"}))},65617:(e,t,n)=>{function r(){return[0,0,0]}function s(e){return[e[0],e[1],e[2]]}function i(e,t,n){return[e,t,n]}function a(e){const t=[0,0,0],n=Math.min(3,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function o(e,t){return new Float64Array(e,t,3)}function l(){return i(1,1,1)}function c(){return i(1,0,0)}function h(){return i(0,1,0)}function u(){return i(0,0,1)}n.d(t,{O:()=>d,U:()=>g,Z:()=>f,a:()=>s,b:()=>o,c:()=>r,d:()=>p,e:()=>y,f:()=>i,g:()=>a});const f=[0,0,0],d=l(),p=c(),y=h(),g=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:p,UNIT_Y:y,UNIT_Z:g,ZEROS:f,clone:s,create:r,createView:o,fromArray:a,fromValues:i,ones:l,unitX:c,unitY:h,unitZ:u,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"}))},98766:(e,t,n)=>{n.d(t,{a:()=>a,b:()=>h,c:()=>s,d:()=>g,e:()=>d,f:()=>p,g:()=>_,h:()=>m,l:()=>x,n:()=>y,s:()=>i});var r=n(46851);function s(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function i(e,t,n,r,s){return e[0]=t,e[1]=n,e[2]=r,e[3]=s,e}function a(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}function o(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}function l(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}function c(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}function h(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}function u(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return Math.sqrt(n*n+r*r+s*s+i*i)}function f(e,t){const n=t[0]-e[0],r=t[1]-e[1],s=t[2]-e[2],i=t[3]-e[3];return n*n+r*r+s*s+i*i}function d(e){const t=e[0],n=e[1],r=e[2],s=e[3];return Math.sqrt(t*t+n*n+r*r+s*s)}function p(e){const t=e[0],n=e[1],r=e[2],s=e[3];return t*t+n*n+r*r+s*s}function y(e,t){const n=t[0],r=t[1],s=t[2],i=t[3];let a=n*n+r*r+s*s+i*i;return a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=s*a,e[3]=i*a),e}function g(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function x(e,t,n,r){const s=t[0],i=t[1],a=t[2],o=t[3];return e[0]=s+r*(n[0]-s),e[1]=i+r*(n[1]-i),e[2]=a+r*(n[2]-a),e[3]=o+r*(n[3]-o),e}function _(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function m(e,t){const n=e[0],s=e[1],i=e[2],a=e[3],o=t[0],l=t[1],c=t[2],h=t[3],u=(0,r.g)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))&&Math.abs(i-c)<=u*Math.max(1,Math.abs(i),Math.abs(c))&&Math.abs(a-h)<=u*Math.max(1,Math.abs(a),Math.abs(h))}const b=o,I=l,w=c,M=u,T=f,k=d,v=p;Object.freeze(Object.defineProperty({__proto__:null,add:a,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:s,dist:M,distance:u,div:w,divide:c,dot:g,equals:m,exactEquals:_,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:k,length:d,lerp:x,max:function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e},min:function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e},mul:I,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:y,random:function(e,t){const n=r.R;let s,i,a,o,l,c;t=t||1;do{s=2*n()-1,i=2*n()-1,l=s*s+i*i}while(l>=1);do{a=2*n()-1,o=2*n()-1,c=a*a+o*o}while(c>=1);const h=Math.sqrt((1-l)/c);return e[0]=t*s,e[1]=t*i,e[2]=t*a*h,e[3]=t*o*h,e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e},scale:h,scaleAndAdd:function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e},set:i,sqrDist:T,sqrLen:v,squaredDistance:f,squaredLength:p,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:b,subtract:o,transformMat4:function(e,t,n){const r=t[0],s=t[1],i=t[2],a=t[3];return e[0]=n[0]*r+n[4]*s+n[8]*i+n[12]*a,e[1]=n[1]*r+n[5]*s+n[9]*i+n[13]*a,e[2]=n[2]*r+n[6]*s+n[10]*i+n[14]*a,e[3]=n[3]*r+n[7]*s+n[11]*i+n[15]*a,e},transformQuat:function(e,t,n){const r=t[0],s=t[1],i=t[2],a=n[0],o=n[1],l=n[2],c=n[3],h=c*r+o*i-l*s,u=c*s+l*r-a*i,f=c*i+a*s-o*r,d=-a*r-o*s-l*i;return e[0]=h*c+d*-a+u*-l-f*-o,e[1]=u*c+d*-o+f*-a-h*-l,e[2]=f*c+d*-l+h*-o-u*-a,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},3894:(e,t,n)=>{n.d(t,{Z:()=>i});var r=n(71143);function s(e){e.length=0}class i{constructor(e=50,t=50){this._pool=new r.Z(Array,void 0,s,t,e)}acquire(){return this._pool.acquire()}release(e){this._pool.release(e)}prune(){this._pool.prune(0)}static acquire(){return a.acquire()}static release(e){return a.release(e)}static prune(){a.prune()}}const a=new i(100)},30175:(e,t,n)=>{function r(e,t,n){const r=e.get(t);if(void 0!==r)return r;const s=n();return e.set(t,s),s}n.d(t,{s1:()=>r})},71143:(e,t,n)=>{n.d(t,{Z:()=>r});class r{constructor(e,t,n,r=1,s=0){if(this._ctor=e,this._acquireFunction=t,this._releaseFunction=n,this.allocationSize=r,this._pool=new Array(s),this._initialSize=s,this._ctor)for(let e=0;e<s;e++)this._pool[e]=new this._ctor;this.allocationSize=Math.max(r,1)}destroy(){this.prune(0)}acquire(...e){let t;if(r.test.disabled)t=new this._ctor;else{if(0===this._pool.length){const e=this.allocationSize;for(let t=0;t<e;t++)this._pool[t]=new this._ctor}t=this._pool.pop()}return this._acquireFunction?this._acquireFunction(t,...e):function(e){return e&&e.acquire&&"function"==typeof e.acquire}(t)&&t.acquire(...e),t}release(e){var t;e&&!r.test.disabled&&(this._releaseFunction?this._releaseFunction(e):(t=e)&&t.release&&"function"==typeof t.release&&e.release(),this._pool.push(e))}prune(e=this._initialSize){if(!(e>=this._pool.length)){for(let t=e;t<this._pool.length;++t){const e=this._pool[t];this._dispose(e)}this._pool.length=e}}_dispose(e){e.dispose&&"function"==typeof e.dispose&&e.dispose()}}r.test={disabled:!1}},75215:(e,t,n)=>{n.d(t,{AY:()=>D,Iu:()=>M,Ls:()=>b,N7:()=>P,TJ:()=>g,V5:()=>E,Zs:()=>l,di:()=>T,gB:()=>k,i$:()=>v,q9:()=>c,rY:()=>I,sY:()=>A,se:()=>m,vU:()=>h,z8:()=>L}),n(80442);var r=n(92604),s=n(30175);const i=r.Z.getLogger("esri.core.accessorSupport.ensureTypes");function a(e){return null==e?e:new Date(e)}function o(e){return null==e?e:!!e}function l(e){return null==e?e:e.toString()}function c(e){return null==e?e:(e=parseFloat(e),isNaN(e)?0:e)}function h(e){return null==e?e:Math.round(parseFloat(e))}function u(e){return e&&e.constructor&&void 0!==e.constructor.__accessorMetadata__}function f(e,t){return null!=t&&e&&!(t instanceof e)}function d(e){return e&&"isCollection"in e}function p(e){return e&&e.Type?"function"==typeof e.Type?e.Type:e.Type.base:null}function y(e,t){return!!u(t)&&(i.error("Accessor#set","Assigning an instance of '"+(t.declaredClass||"unknown")+"' which is not a subclass of '"+x(e)+"'"),!0)}function g(e,t){return null==t?t:d(e)?function(e,t){if(!t||!t.constructor||!d(t.constructor))return y(e,t)?t:new e(t);const n=p(e.prototype.itemType),r=p(t.constructor.prototype.itemType);return n?r?n===r?t:n.prototype.isPrototypeOf(r.prototype)?new e(t):(y(e,t),t):new e(t):t}(e,t):f(e,t)?y(e,t)?t:new e(t):t}function x(e){return e&&e.prototype&&e.prototype.declaredClass||"unknown"}const _=new WeakMap;function m(e,t){const n=function(e){switch(e){case Number:return c;case L:return h;case Boolean:return o;case String:return l;case Date:return a;default:return(0,s.s1)(_,e,(()=>g.bind(null,e)))}}(e);return 1===arguments.length?n:n(t)}function b(e,t,n){return 1===arguments.length?b.bind(null,e):t?Array.isArray(t)?t.map((t=>e(t,n))):[e(t,n)]:t}function I(e,t){return 1===arguments.length?b((t=>m(e,t))):b((t=>m(e,t)),t)}function w(e,t,n){return 0!==t&&Array.isArray(n)?n.map((n=>w(e,t-1,n))):e(n)}function M(e,t,n){if(2===arguments.length)return n=>M(e,t,n);if(!n)return n;n=w(e,t,n);let r=t,s=n;for(;r>0&&Array.isArray(s);)r--,s=s[0];if(void 0!==s)for(let e=0;e<r;e++)n=[n];return n}function T(e,t,n){return 2===arguments.length?M((t=>m(e,t)),t):M((t=>m(e,t)),t,n)}function k(e){return!!Array.isArray(e)&&!e.some((t=>{const n=typeof t;return!("string"===n||"number"===n||"function"===n&&e.length>1)}))}function v(e,t){if(2===arguments.length)return v(e).call(null,t);const n=new Set,r=e.filter((e=>"function"!=typeof e)),s=e.filter((e=>"function"==typeof e));for(const t of e)"string"!=typeof t&&"number"!=typeof t||n.add(t);let a=null,o=null;return(e,t)=>{if(null==e)return e;const l=typeof e,c="string"===l||"number"===l;return c&&(n.has(e)||s.some((e=>"string"===l&&e===String||"number"===l&&e===Number)))||"object"===l&&s.some((t=>!f(e,t)))?e:(c&&r.length?(a||(a=r.map((e=>"string"==typeof e?`'${e}'`:`${e}`)).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, only the following values are valid: ${a}`)):"object"==typeof e&&s.length?(o||(o=s.map((e=>x(e))).join(", ")),i.error("Accessor#set",`'${e}' is not a valid value for this property, value must be one of ${o}`)):i.error("Accessor#set",`'${e}' is not a valid value for this property`),t&&(t.valid=!1),null)}}function P(e,t){if(2===arguments.length)return P(e).call(null,t);const n={},r=[],s=[];for(const t in e.typeMap){const i=e.typeMap[t];n[t]=m(i),r.push(x(i)),s.push(t)}const a=()=>`'${r.join("', '")}'`,o=()=>`'${s.join("', '")}'`,l="string"==typeof e.key?t=>t[e.key]:e.key;return t=>{if(e.base&&!f(e.base,t))return t;if(null==t)return t;const r=l(t)||e.defaultKeyValue,s=n[r];if(!s)return i.error("Accessor#set",`Invalid property value, value needs to be one of ${a()}, or a plain object that can autocast (having .type = ${o()})`),null;if(!f(e.typeMap[r],t))return t;if("string"==typeof e.key&&!u(t)){const n={};for(const r in t)r!==e.key&&(n[r]=t[r]);return s(n)}return s(t)}}class L{}const E={native:e=>({type:"native",value:e}),array:e=>({type:"array",value:e}),oneOf:e=>({type:"one-of",values:e})};function D(e){if(!e||!("type"in e))return!1;switch(e.type){case"native":case"array":case"one-of":return!0}return!1}function A(e){switch(e.type){case"native":return m(e.value);case"array":return b(A(e.value));case"one-of":return function(e){let t=null;return(n,r)=>B(n,e)?n:(null==t&&(t=S(e)),i.error("Accessor#set",`Invalid property value, value needs to be of type ${t}`),r&&(r.valid=!1),null)}(e);default:return null}}function S(e){switch(e.type){case"native":switch(e.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case L:return"integer";case Date:return"date";default:return x(e.value)}case"array":return`array of ${S(e.value)}`;case"one-of":{const t=e.values.map((e=>S(e)));return`one of ${t.slice(0,t.length-1)} or ${t[t.length-1]}`}}return"unknown"}function B(e,t){if(null==e)return!0;switch(t.type){case"native":switch(t.value){case Number:case L:return"number"==typeof e;case Boolean:return"boolean"==typeof e;case String:return"string"==typeof e}return e instanceof t.value;case"array":return!!Array.isArray(e)&&!e.some((e=>!B(e,t.value)));case"one-of":return t.values.some((t=>B(e,t)))}}},22021:(e,t,n)=>{n.d(t,{BV:()=>h,Kt:()=>f,Sf:()=>i,Vl:()=>c,ZF:()=>u,_3:()=>b,jE:()=>_,oK:()=>g,oc:()=>m,t7:()=>l,uZ:()=>a,wt:()=>o});var r=n(17896);n(98766);const s=new Float32Array(1);function i(e){--e;for(let t=1;t<32;t<<=1)e|=e>>t;return e+1}function a(e,t,n){return Math.min(Math.max(e,t),n)}function o(e){return 0==(e&e-1)}function l(e,t,n){return e+(t-e)*n}function c(e){return e*Math.PI/180}function h(e){return 180*e/Math.PI}function u(e){return Math.acos(a(e,-1,1))}function f(e){return Math.asin(a(e,-1,1))}function d(e,t,n=1e-6){return e===t||!(!Number.isFinite(e)||!Number.isFinite(t))&&(e>t?e-t:t-e)<=n}const p=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));const y=BigInt("1000000");function g(e){return x(Math.max(-b,Math.min(e,b)))}function x(e){return s[0]=e,s[0]}function _(e,t){const n=(0,r.l)(e),s=f(e[2]/n),i=Math.atan2(e[1]/n,e[0]/n);return(0,r.s)(t,n,s,i),t}function m(e){const t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[3]*e[3]+e[4]*e[4]+e[5]*e[5],r=e[6]*e[6]+e[7]*e[7]+e[8]*e[8];return!(d(t,1)&&d(n,1)&&d(r,1))}!function(e){const t=function(e){return p.setFloat64(0,e),p.getBigInt64(0)}(e=Math.abs(e)),n=function(e){return p.setBigInt64(0,e),p.getFloat64(0)}(t<=y?y:t-y);Math.abs(e-n)}(1);const b=x(34028234663852886e22)},45091:(e,t,n)=>{n.d(t,{Z:()=>h});var r,s,i=n(80442),a=n(71143);(s=r||(r={}))[s.varint=0]="varint",s[s.fixed64=1]="fixed64",s[s.delimited=2]="delimited",s[s.fixed32=5]="fixed32",s[s.unknown=99]="unknown";const o=4294967296,l=new TextDecoder("utf-8"),c=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class h{constructor(e,t,n=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=r.unknown,this._init(e,t,n,s)}_init(e,t,n,r){this._data=e,this._dataView=t,this._pos=n,this._end=r}asUnsafe(){return this}clone(){return new h(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),n}getSFixed64(){const e=this._dataView,t=this._pos,n=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),n}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,n=this._toString(this._data,t,t+e);return this._skip(e),n}getBytes(){const e=this._getLength(),t=this._pos,n=this._toBytes(this._data,t,t+e);return this._skip(e),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,n,r){const s=this.getMessage(),i=e(s,t,n,r);return s.release(),i}processMessage(e){const t=this.getMessage(),n=e(t);return t.release(),n}getMessage(){const e=this._getLength(),t=h.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){h.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case r.varint:this._decodeVarint();break;case r.fixed64:this._skip(8);break;case r.delimited:this._skip(this._getLength());break;case r.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,n=0,r=0;if(this._end-t>=10)do{if(r=e[t++],n|=127&r,0==(128&r))break;if(r=e[t++],n|=(127&r)<<7,0==(128&r))break;if(r=e[t++],n|=(127&r)<<14,0==(128&r))break;if(r=e[t++],n|=(127&r)<<21,0==(128&r))break;if(r=e[t++],n+=268435456*(127&r),0==(128&r))break;if(r=e[t++],n+=34359738368*(127&r),0==(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),0==(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),0==(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),0==(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),0==(128&r))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(r=e[t],0!=(128&r));)++t,n+=(127&r)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*s}return this._pos=t,n}_decodeSVarint(){const e=this._data;let t=this._pos,n=0,r=0;const s=1&e[t];if(this._end-t>=10)do{if(r=e[t++],n|=127&r,0==(128&r))break;if(r=e[t++],n|=(127&r)<<7,0==(128&r))break;if(r=e[t++],n|=(127&r)<<14,0==(128&r))break;if(r=e[t++],n|=(127&r)<<21,0==(128&r))break;if(r=e[t++],n+=268435456*(127&r),0==(128&r))break;if(r=e[t++],n+=34359738368*(127&r),0==(128&r))break;if(r=e[t++],n+=4398046511104*(127&r),0==(128&r))break;if(r=e[t++],n+=562949953421312*(127&r),0==(128&r))break;if(r=e[t++],n+=72057594037927940*(127&r),0==(128&r))break;if(r=e[t++],n+=0x8000000000000000*(127&r),0==(128&r))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(r=e[t],0!=(128&r));)++t,n+=(127&r)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,n+=r*s}return this._pos=t,s?-(n+1)/2:n/2}_getLength(){if(this._dataType!==r.delimited)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,n){if((n=Math.min(this._end,n))-t>c){const r=e.subarray(t,n);return l.decode(r)}let r="",s="";for(let i=t;i<n;++i){const t=e[i];128&t?s+="%"+t.toString(16):(r+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(r+=decodeURIComponent(s)),r}_toBytes(e,t,n){return n=Math.min(this._end,n),new Uint8Array(e.buffer,t,n-t)}}h.pool=new a.Z(h,void 0,(e=>{e._data=null,e._dataView=null}))},3172:(e,t,n)=>{n.r(t),n.d(t,{default:()=>d});var r=n(68773),s=n(40330),i=n(20102),a=n(80442),o=n(22974),l=n(95330),c=n(81271),h=n(19745),u=n(71058),f=n(85958);async function d(e,t){e instanceof URL&&(e=e.toString()),t?.query instanceof URLSearchParams&&(t.query=(0,c.u0)(t.query.toString().replaceAll("+"," ")));const o=(0,c.HK)(e),h=(0,c.jc)(e);h||o||(e=(0,c.Fv)(e));const x={url:e,requestOptions:{...t}};let _=(0,c.oh)(e);if(_){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let n,r;try{r=await e.before(t)}catch(e){n=M("request:interceptor",e,t)}if((r instanceof Error||r instanceof i.Z)&&(n=M("request:interceptor",r,t)),n)throw e.error&&e.error(n),n;return r}}(_,x);if(null!=e)return{data:e,getHeader:b,httpStatus:200,requestOptions:x.requestOptions,url:x.url};_.after||_.error||(_=null)}if(e=x.url,"image"===(t=x.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw M("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),x);if("head"===t.method){if(t.body)throw M("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),x);if(o||h)throw M("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),x)}if(await async function(){(0,a.Z)("host-webworker")?p||(p=await n.e(9884).then(n.bind(n,29884))):d._abortableFetch||(d._abortableFetch=globalThis.fetch.bind(globalThis))}(),p)return p.execute(e,t);const m=new AbortController;(0,l.fu)(t,(()=>m.abort()));const I={controller:m,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:_,params:x,redoRequest:!1,useIdentity:y.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},w=await async function(e){let t,n;await async function(e){const t=e.params.url,n=e.params.requestOptions,i=e.controller.signal,a=n.body;let o=null,c=null;if(g&&"HTMLFormElement"in globalThis&&(a instanceof FormData?o=a:a instanceof HTMLFormElement&&(o=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:n.cacheBust&&!("polyfill"in d._abortableFetch)?"no-cache":"default",credentials:"same-origin",headers:n.headers||{},method:"head"===n.method?"HEAD":"GET",mode:"cors",priority:y.priority,redirect:"follow",signal:i},(o||c)&&(e.fetchOptions.body=o||c),"anonymous"===n.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||n.query?.token||o?.get("token")),!e.hasToken&&r.default.apiKey&&(0,u.r)(t)&&(n.query||(n.query={}),n.query.token=r.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!k(t)&&!(0,l.Hc)(i)){let r;"immediate"===n.authMode?(await T(),r=await s.id.getCredential(t,{signal:i}),e.credential=r):"no-prompt"===n.authMode?(await T(),r=await s.id.getCredential(t,{prompt:!1,signal:i}).catch((()=>{})),e.credential=r):s.id&&(r=s.id.findCredential(t)),r&&(e.credentialToken=r.token,e.useSSL=!!r.ssl)}}(e);try{do{[t,n]=await v(e)}while(!await L(e,t,n))}catch(n){const r=M("request:server",n,e.params,t);throw r.details.ssl=e.useSSL,e.interceptor?.error&&e.interceptor.error(r),r}const i=e.params.url;if(n&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(i)){if(!e.hasToken&&!e.credentialToken&&n.user?.username&&!(0,c.kl)(i)){const e=(0,c.P$)(i,!0);e&&y.trustedServers.push(e)}Array.isArray(n.authorizedCrossOriginNoCorsDomains)&&(0,f.Hu)(n.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&s.id){const e=s.id.findServerInfo(a.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=s.id.findCredential(t,a.userId);e&&-1===s.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:n,getHeader:t?e=>t?.headers.get(e):b,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(I);return _?.after?.(w),w}let p;const y=r.default.request,g="FormData"in globalThis,x=[499,498,403,401],_=["COM_0056","COM_0057","SB_0008"],m=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],b=()=>null,I=Symbol();function w(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||d._corsServers.includes(t)||(0,c.kl)(t)}function M(e,t,n,r){let s="Error";const a={url:n.url,requestOptions:n.requestOptions,getHeader:b,ssl:!1};if(t instanceof i.Z)return t.details?(t.details=(0,o.d9)(t.details),t.details.url=n.url,t.details.requestOptions=n.requestOptions):t.details=a,t;if(t){const e=r&&(e=>r.headers.get(e)),n=r?.status,i=t.message;i&&(s=i),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||n||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=I in t?t[I]:t}return(0,l.D_)(t)?(0,l.zE)():new i.Z(e,s,a)}async function T(){s.id||await Promise.all([n.e(7126),n.e(6261),n.e(9255),n.e(1400),n.e(450)]).then(n.bind(n,73660))}function k(e){return m.some((t=>t.test(e)))}async function v(e){let t=e.params.url;const n=e.params.requestOptions,r=e.fetchOptions??{},i=(0,c.jc)(t)||(0,c.HK)(t),o=n.responseType||"json",u=i?0:null!=n.timeout?n.timeout:y.timeout;let p=!1;if(!i){e.useSSL&&(t=(0,c.hO)(t)),n.cacheBust&&"default"===r.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let i={...n.query};e.credentialToken&&(i.token=e.credentialToken);let o=(0,c.B7)(i);(0,a.Z)("esri-url-encodes-apostrophe")&&(o=o.replaceAll("'","%27"));const l=t.length+1+o.length;let u;p="delete"===n.method||"post"===n.method||"put"===n.method||!!n.body||l>y.maxUrlLength;const d=n.useProxy||!!(0,c.ed)(t);if(d){const e=(0,c.b7)(t);u=e.path,!p&&u.length+1+l>y.maxUrlLength&&(p=!0),e.query&&(i={...e.query,...i})}if("HEAD"===r.method&&(p||d)){if(p){if(l>y.maxUrlLength)throw M("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw M("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(d)throw M("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(p?(r.method="delete"===n.method?"DELETE":"put"===n.method?"PUT":"POST",n.body?t=(0,c.fl)(t,i):(r.body=(0,c.B7)(i),r.headers||(r.headers={}),r.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,i),d&&(e.useProxy=!0,t=`${u}?${t}`),i.token&&g&&r.body instanceof FormData&&!(0,h.P)(t)&&r.body.set("token",i.token),n.hasOwnProperty("withCredentials"))e.withCredentials=n.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(s.id){const n=s.id.findServerInfo(t);n?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(r.credentials="include",(0,f.jH)(t)&&await(0,f.jz)(p?(0,c.fl)(t,i):t))}let x,_,m=0,b=!1;u>0&&(m=setTimeout((()=>{b=!0,e.controller.abort()}),u));try{if("native-request-init"===n.responseType)_=r,_.url=t;else if("image"!==n.responseType||"default"!==r.cache||"GET"!==r.method||p||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(n.headers)||!i&&!e.useProxy&&y.proxyUrl&&!w(t)){if(x=await d._abortableFetch(t,r),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!d._corsServers.includes(t)&&d._corsServers.push(t)}(t),"native"===n.responseType)_=x;else if("HEAD"!==r.method)if(x.ok){switch(o){case"array-buffer":_=await x.arrayBuffer();break;case"blob":case"image":_=await x.blob();break;default:_=await x.text()}if(m&&(clearTimeout(m),m=0),"json"===o||"xml"===o||"document"===o)if(_)switch(o){case"json":_=JSON.parse(_);break;case"xml":_=P(_,"application/xml");break;case"document":_=P(_,"text/html")}else _=null;if(_){if("array-buffer"===o||"blob"===o){const e=x.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&_["blob"===o?"size":"byteLength"]<=750)try{const e=await new Response(_).json();e.error&&(_=e)}catch{}}"image"===o&&_ instanceof Blob&&(_=await E(URL.createObjectURL(_),e,!0))}}else{_=await x.text();try{_=JSON.parse(_)}catch{}}}else _=await E(t,e)}catch(r){if("AbortError"===r.name){if(b)throw(0,f.Tf)();throw(0,l.zE)("Request canceled")}if(!(!x&&r instanceof TypeError&&y.proxyUrl)||n.body||"delete"===n.method||"head"===n.method||"post"===n.method||"put"===n.method||e.useProxy||w(t))throw r;e.redoRequest=!0,(0,c.tD)({proxyUrl:y.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{m&&clearTimeout(m)}return[x,_]}function P(e,t){let n;try{n=(new DOMParser).parseFromString(e,t)}catch{}if(!n||n.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return n}async function L(e,t,n){if(e.redoRequest)return e.redoRequest=!1,!1;const r=e.params.requestOptions;if(!t||"native"===r.responseType||"native-request-init"===r.responseType)return!0;let i,a;if(n&&(n.error?i=n.error:"error"===n.status&&Array.isArray(n.messages)&&(i={...n},i[I]=n,i.details=n.messages)),!i&&!t.ok)throw i=new Error(`Unable to load ${t.url} status: ${t.status}`),i[I]=n,i;let o,l=null;i&&(a=Number(i.code),l=i.hasOwnProperty("subcode")?Number(i.subcode):null,o=i.messageCode,o=o?.toUpperCase());const c=r.authMode;if(403===a&&(4===l||i.message?.toLowerCase().includes("ssl")&&!i.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&x.includes(a)&&!k(e.params.url)&&(403!==a||o&&!_.includes(o)&&(null==l||2===l&&e.credentialToken))){await T();try{const t=await s.id.getCredential(e.params.url,{error:M("request:server",i,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;i=t}}if(i)throw i;return!0}function E(e,t,n=!1){const r=t.controller.signal,s=new Image;return t.withCredentials?s.crossOrigin="use-credentials":s.crossOrigin="anonymous",s.alt="",s.fetchPriority=y.priority,s.src=e,(0,f.fY)(s,e,n,r)}d._abortableFetch=null,d._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,n)=>{n.d(t,{r:()=>i});var r=n(81271);const s=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function i(e){const t=(0,r.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!s.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,n)=>{n.d(t,{Hu:()=>u,Tf:()=>h,fY:()=>o,jH:()=>f,jz:()=>d});var r=n(68773),s=n(80442),i=n(95330),a=n(81271);function o(e,t,n=!1,r){return new Promise(((a,o)=>{if((0,i.Hc)(r))return void o(l());let c=()=>{f(),o(new Error(`Unable to load ${t}`))},h=()=>{const t=e;f(),a(t)},u=()=>{if(!e)return;const t=e;f(),t.src="",o(l())};const f=()=>{(0,s.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",h)),c=null,h=null,e=null,null!=r&&r.removeEventListener("abort",u),u=null,n&&URL.revokeObjectURL(t)};null!=r&&r.addEventListener("abort",u),(0,s.Z)("esri-image-decode")?e.decode().then(h,c):(e.addEventListener("error",c),e.addEventListener("load",h))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}const c="Timeout exceeded";function h(){return new Error(c)}function u(e){r.default.request.crossOriginNoCorsDomains||(r.default.request.crossOriginNoCorsDomains={});const t=r.default.request.crossOriginNoCorsDomains;for(let n of e)n=n.toLowerCase(),/^https?:\/\//.test(n)?t[(0,a.P$)(n)??""]=0:(t[(0,a.P$)("http://"+n)??""]=0,t[(0,a.P$)("https://"+n)??""]=0)}function f(e){const t=r.default.request.crossOriginNoCorsDomains;if(t){let n=(0,a.P$)(e);if(n)return n=n.toLowerCase(),!(0,a.D6)(n,(0,a.TI)())&&t[n]<Date.now()-36e5}return!1}async function d(e){const t=r.default.request.crossOriginNoCorsDomains,n=(0,a.P$)(e);t&&n&&(t[n.toLowerCase()]=Date.now());const s=(0,a.mN)(e);e=s.path,"json"===s.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}},56456:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Q});var r=n(95330),s=n(4215),i=n(59255),a=n(31363);function o(e){return 746===e||747===e||!(e<4352)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103&&!(e>=65097&&e<=65103)||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351&&!(e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=12592&&e<=12687||e>=43360&&e<=43391||e>=55216&&e<=55295||e>=4352&&e<=4607||e>=44032&&e<=55215||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12688&&e<=12703||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543&&12540!==e||e>=65280&&e<=65519&&!(65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||e>=65104&&e<=65135&&!(e>=65112&&e<=65118||e>=65123&&e<=65126)||e>=5120&&e<=5759||e>=6320&&e<=6399||e>=65040&&e<=65055||e>=19904&&e<=19967||e>=40960&&e<=42127||e>=42128&&e<=42191)}function l(e){return!(e<11904)&&(e>=12704&&e<=12735||e>=12544&&e<=12591||e>=65072&&e<=65103||e>=63744&&e<=64255||e>=13056&&e<=13311||e>=11904&&e<=12031||e>=12736&&e<=12783||e>=12288&&e<=12351||e>=13312&&e<=19903||e>=19968&&e<=40959||e>=12800&&e<=13055||e>=65280&&e<=65519||e>=12352&&e<=12447||e>=12272&&e<=12287||e>=12032&&e<=12255||e>=12784&&e<=12799||e>=12448&&e<=12543||e>=65040&&e<=65055||e>=42128&&e<=42191||e>=40960&&e<=42127)}function c(e){switch(e){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function h(e){switch(e){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(87893);const f=24;class d{constructor(e,t,n,r,s,i,a){this._glyphItems=e,this._maxWidth=t,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=s,this._vAnchor=i,this._justify=a}getShaping(e,t,n){const r=this._letterSpacing,s=this._lineHeight,i=this._justify,a=this._maxWidth,u=[];let f=0,d=0;for(const t of e){const e=t.codePointAt(0);if(null==e)continue;const s=n&&o(e);let i;for(const t of this._glyphItems)if(i=t[e],i)break;u.push({codePoint:e,x:f,y:d,vertical:s,glyphMosaicItem:i}),i&&(f+=i.metrics.advance+r)}let p=f;a>0&&(p=f/Math.max(1,Math.ceil(f/a)));const y=e.includes(""),g=[],x=u.length;for(let e=0;e<x-1;e++){const t=u[e].codePoint,n=l(t);if(c(t)||n){let r=0;if(10===t)r-=1e4;else if(n&&y)r+=150;else{40!==t&&65288!==t||(r+=50);const n=u[e+1].codePoint;41!==n&&65289!==n||(r+=50)}g.push(this._buildBreak(e+1,u[e].x,p,g,r,!1))}}const _=this._optimalBreaks(this._buildBreak(x,f,p,g,0,!0));let m=0;const b=t?-s:s;let I=0;for(let e=0;e<_.length;e++){const t=_[e];let n=I;for(;n<t&&h(u[n].codePoint);)u[n].glyphMosaicItem=null,++n;let r=t-1;for(;r>n&&h(u[r].codePoint);)u[r].glyphMosaicItem=null,--r;if(n<=r){const e=u[n].x;for(let t=n;t<=r;t++)u[t].x-=e,u[t].y=d;let t=u[r].x;u[r].glyphMosaicItem&&(t+=u[r].glyphMosaicItem.metrics.advance),m=Math.max(t,m),i&&this._applyJustification(u,n,r)}I=t,d+=b}if(u.length>0){const e=_.length-1,n=(i-this._hAnchor)*m;let r=(-this._vAnchor*(e+1)+.5)*s;t&&e&&(r+=e*s);for(const e of u)e.x+=n,e.y+=r}return u.filter((e=>e.glyphMosaicItem))}static getTextBox(e,t){if(!e.length)return null;let n=1/0,r=1/0,s=0,i=0;for(const a of e){const e=a.glyphMosaicItem.metrics.advance,o=a.x,l=a.y-17,c=o+e,h=l+t;n=Math.min(n,o),s=Math.max(s,c),r=Math.min(r,l),i=Math.max(i,h)}return{x:n,y:r,width:s-n,height:i-r}}static getBox(e){if(!e.length)return null;let t=1/0,n=1/0,r=0,s=0;for(const i of e){const{height:e,left:a,top:o,width:l}=i.glyphMosaicItem.metrics,c=i.x,h=i.y-(e-Math.abs(o)),u=c+l+a,f=h+e;t=Math.min(t,c),r=Math.max(r,u),n=Math.min(n,h),s=Math.max(s,f)}return{x:t,y:n,width:r-t,height:s-n}}static addDecoration(e,t){const n=e.length;if(0===n)return;let r=e[0].x+e[0].glyphMosaicItem.metrics.left,s=e[0].y;for(let i=1;i<n;i++){const n=e[i];if(n.y!==s){const a=e[i-1].x+e[i-1].glyphMosaicItem.metrics.left+e[i-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:a-r,height:8,left:0,top:0,advance:0},page:0,code:0}}),s=n.y,r=n.x+n.glyphMosaicItem.metrics.left}}const i=e[n-1].x+e[n-1].glyphMosaicItem.metrics.left+e[n-1].glyphMosaicItem.metrics.width;e.push({codePoint:0,x:r,y:s+t-3,vertical:!1,glyphMosaicItem:{sdf:!0,rect:new u.Z(4,0,4,8),metrics:{width:i-r,height:8,left:0,top:0,advance:0},page:0,code:0}})}_breakScore(e,t,n,r){const s=(e-t)*(e-t);return r?e<t?s/2:2*s:s+Math.abs(n)*n}_buildBreak(e,t,n,r,s,i){let a=null,o=this._breakScore(t,n,s,i);for(const e of r){const r=t-e.x,l=this._breakScore(r,n,s,i)+e.score;l<=o&&(a=e,o=l)}return{index:e,x:t,score:o,previousBreak:a}}_optimalBreaks(e){return e?this._optimalBreaks(e.previousBreak).concat(e.index):[]}_applyJustification(e,t,n){const r=e[n],s=r.vertical?f:r.glyphMosaicItem?r.glyphMosaicItem.metrics.advance:0,i=(r.x+s)*this._justify;for(let r=t;r<=n;r++)e[r].x-=i}}var p=n(21315);const y=.5;class g{constructor(e,t,n=0,r=-1,s=y){this.x=e,this.y=t,this.angle=n,this.segment=r,this.minzoom=s}}class x{constructor(e,t,n,r,s,i=y,o=a.B1){this.anchor=e,this.labelAngle=t,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=s,this.minzoom=i,this.maxzoom=o}}class _{constructor(e,t,n,r,s,i,a,o,l,c,h,u){this.tl=e,this.tr=t,this.bl=n,this.br=r,this.mosaicRect=s,this.labelAngle=i,this.minAngle=a,this.maxAngle=o,this.anchor=l,this.minzoom=c,this.maxzoom=h,this.page=u}}class m{constructor(e){this.shapes=e}}class b{getIconPlacement(e,t,n){const r=new i.E9(e.x,e.y),s=n.rotationAlignment===p.aF.MAP,o=n.keepUpright;let l=n.rotate*a.DT;s&&(l+=e.angle);const c=new m([]);return n.allowOverlap&&n.ignorePlacement||(c.iconColliders=[]),this._addIconPlacement(c,r,t,n,l),s&&o&&this._addIconPlacement(c,r,t,n,l+a.JJ),c}_addIconPlacement(e,t,n,r,s){const o=n.pixelRatio,l=n.width/o,c=n.height/o,h=r.offset;let u=h[0],f=h[1];switch(r.anchor){case p.nR.CENTER:u-=l/2,f-=c/2;break;case p.nR.LEFT:f-=c/2;break;case p.nR.RIGHT:u-=l,f-=c/2;break;case p.nR.TOP:u-=l/2;break;case p.nR.BOTTOM:u-=l/2,f-=c;break;case p.nR.TOP_LEFT:break;case p.nR.BOTTOM_LEFT:f-=c;break;case p.nR.TOP_RIGHT:u-=l;break;case p.nR.BOTTOM_RIGHT:u-=l,f-=c}const d=n.rect,g=2/o,x=u-g,m=f-g,b=x+d.width/o,I=m+d.height/o,w=new i.E9(x,m),M=new i.E9(b,I),T=new i.E9(x,I),k=new i.E9(b,m);if(0!==s){const e=Math.cos(s),t=Math.sin(s);w.rotate(e,t),M.rotate(e,t),T.rotate(e,t),k.rotate(e,t)}const v=new _(w,k,T,M,d,s,0,256,t,y,a.B1,0);if(e.shapes.push(v),!r.allowOverlap||!r.ignorePlacement){const n=r.size,i=r.padding,o={xTile:t.x,yTile:t.y,dxPixels:u*n-i,dyPixels:f*n-i,hard:!r.optional,partIndex:0,width:l*n+2*i,height:c*n+2*i,angle:s,minLod:y,maxLod:a.B1};e.iconColliders.push(o)}}getTextPlacement(e,t,n,r){const s=new i.E9(e.x,e.y),o=r.rotate*a.DT,l=r.rotationAlignment===p.aF.MAP,c=r.keepUpright,h=r.padding;let u=y;const g=l?e.angle:0,b=e.segment>=0&&l,I=r.allowOverlap&&r.ignorePlacement?null:[],w=[],M=!b;let T=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,v=T,P=k;const L=(b||l)&&c,E=r.size/f;let D=!1;for(const e of t)if(e.vertical){D=!0;break}let A,S=0,B=0;if(!b&&D){const e=d.getTextBox(t,r.lineHeight*f);switch(r.anchor){case p.nR.LEFT:S=e.height/2,B=-e.width/2;break;case p.nR.RIGHT:S=-e.height/2,B=e.width/2;break;case p.nR.TOP:S=e.height/2,B=e.width/2;break;case p.nR.BOTTOM:S=-e.height/2,B=-e.width/2;break;case p.nR.TOP_LEFT:S=e.height;break;case p.nR.BOTTOM_LEFT:B=-e.width;break;case p.nR.TOP_RIGHT:B=e.width;break;case p.nR.BOTTOM_RIGHT:S=-e.height}}S+=r.offset[0]*f,B+=r.offset[1]*f;for(const f of t){const t=f.glyphMosaicItem;if(!t||t.rect.isEmpty)continue;const d=t.rect,p=t.metrics,m=t.page;if(I&&M){if(void 0!==A&&A!==f.y){let t,n,s,i;D?(t=-P+S,n=T+B,s=P-v,i=k-T):(t=T+S,n=v+B,s=k-T,i=P-v);const l={xTile:e.x,yTile:e.y,dxPixels:t*E-h,dyPixels:n*E-h,hard:!r.optional,partIndex:1,width:s*E+2*h,height:i*E+2*h,angle:o,minLod:y,maxLod:a.B1};I.push(l),T=Number.POSITIVE_INFINITY,k=Number.NEGATIVE_INFINITY,v=T,P=k}A=f.y}const V=[];if(b){const r=.5*t.metrics.width,s=(f.x+p.left-4+r)*E*8;if(u=this._placeGlyph(e,u,s,n,e.segment,1,f.vertical,m,V),c&&(u=this._placeGlyph(e,u,s,n,e.segment,-1,f.vertical,m,V)),u>=2)break}else V.push(new x(s,g,g,m,!1)),l&&c&&V.push(new x(s,g+a.JJ,g+a.JJ,m,!1));const C=f.x+p.left,R=f.y-17-p.top,O=C+p.width,F=R+p.height;let q,U,N,z,Z,j,G,H;if(!b&&D)if(f.vertical){const e=(C+O)/2-p.height/2,t=(R+F)/2+p.width/2;q=new i.E9(-t-4+S,e-4+B),U=new i.E9(q.x+d.width,q.y+d.height),N=new i.E9(q.x,U.y),z=new i.E9(U.x,q.y)}else q=new i.E9(4-R+S,C-4+B),U=new i.E9(q.x-d.height,q.y+d.width),N=new i.E9(U.x,q.y),z=new i.E9(q.x,U.y);else q=new i.E9(C-4+S,R-4+B),U=new i.E9(q.x+d.width,q.y+d.height),N=new i.E9(q.x,U.y),z=new i.E9(U.x,q.y);for(const t of V){let n,s,a,l;if(t.alternateVerticalGlyph){if(!Z){const e=(R+F)/2+B;Z=new i.E9((C+O)/2+S-p.height/2-4,e+p.width/2+4),j=new i.E9(Z.x+d.height,Z.y-d.width),G=new i.E9(j.x,Z.y),H=new i.E9(Z.x,j.y)}n=Z,s=G,a=H,l=j}else n=q,s=N,a=z,l=U;const c=R,u=F,y=t.glyphAngle+o;if(0!==y){const e=Math.cos(y),t=Math.sin(y);n=n.clone(),s=s?.clone(),a=a?.clone(),l=l?.clone(),n.rotate(e,t),l?.rotate(e,t),s?.rotate(e,t),a?.rotate(e,t)}let g=0,x=256;if(b&&D?f.vertical?t.alternateVerticalGlyph?(g=32,x=96):(g=224,x=32):(g=224,x=96):(g=192,x=64),w.push(new _(n,a,s,l,d,t.labelAngle,g,x,t.anchor,t.minzoom,t.maxzoom,t.page)),I&&(!L||this._legible(t.labelAngle)))if(M)C<T&&(T=C),c<v&&(v=c),O>k&&(k=O),u>P&&(P=u);else if(t.minzoom<2){const n={xTile:e.x,yTile:e.y,dxPixels:(C+S)*E-h,dyPixels:(c+S)*E-h,hard:!r.optional,partIndex:1,width:(O-C)*E+2*h,height:(u-c)*E+2*h,angle:y,minLod:t.minzoom,maxLod:t.maxzoom};I.push(n)}}}if(u>=2)return null;if(I&&M){let t,n,s,i;D?(t=-P+S,n=T+B,s=P-v,i=k-T):(t=T+S,n=v+B,s=k-T,i=P-v);const l={xTile:e.x,yTile:e.y,dxPixels:t*E-h,dyPixels:n*E-h,hard:!r.optional,partIndex:1,width:s*E+2*h,height:i*E+2*h,angle:o,minLod:y,maxLod:a.B1};I.push(l)}const V=new m(w);return I&&I.length>0&&(V.textColliders=I),V}_legible(e){const t=(0,a.Or)(e);return t<65||t>=193}_placeGlyph(e,t,n,r,s,o,l,c,h){let u=o;const f=u<0?(0,a.DQ)(e.angle+a.JJ,a._U):e.angle;let d=0;n<0&&(u*=-1,n*=-1,d=a.JJ),u>0&&++s;let p=new i.E9(e.x,e.y),y=r[s],g=a.B1;if(r.length<=s)return g;for(;;){const e=y.x-p.x,i=y.y-p.y,o=Math.sqrt(e*e+i*i),_=Math.max(n/o,t),m=e/o,b=i/o,I=(0,a.DQ)(Math.atan2(b,m)+d,a._U);if(h.push(new x(p,f,I,c,!1,_,g)),l&&h.push(new x(p,f,I,c,!0,_,g)),_<=t)return _;p=y.clone();do{if(s+=u,r.length<=s||s<0)return _;y=r[s]}while(p.isEqual(y));let w=y.x-p.x,M=y.y-p.y;const T=Math.sqrt(w*w+M*M);w*=o/T,M*=o/T,p.x-=w,p.y-=M,g=_}}}var I,w,M=n(45091),T=n(65390);(w=I||(I={}))[w.moveTo=1]="moveTo",w[w.lineTo=2]="lineTo",w[w.close=7]="close";class k{constructor(e,t){this.values={},this._geometry=void 0,this._pbfGeometry=null;const n=t.keys,r=t.values,s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const e=s.getMessage().asUnsafe(),t=this.values;for(;!e.empty();){const s=e.getUInt32(),i=e.getUInt32();t[n[s]]=r[i]}e.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(e){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const t=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,e?e.reset(this.type):n=[];let s,a=I.moveTo,o=0,l=0,c=0;for(;!t.empty();){if(0===o){const e=t.getUInt32();a=7&e,o=e>>3}switch(o--,a){case I.moveTo:l+=t.getSInt32(),c+=t.getSInt32(),e?e.moveTo(l,c):n&&(r&&n.push(r),r=[],r.push(new i.E9(l,c)));break;case I.lineTo:l+=t.getSInt32(),c+=t.getSInt32(),e?e.lineTo(l,c):r&&r.push(new i.E9(l,c));break;case I.close:e?e.close():r&&!r[0].equals(l,c)&&r.push(r[0].clone());break;default:throw t.release(),new Error("Invalid path operation")}}return e?s=e.result():n&&(r&&n.push(r),s=n),t.release(),this._geometry=s,s}}var v=n(26084);class P extends v.Z{constructor(){super(12)}add(e,t,n){const r=this.array;r.push(e),r.push(t),r.push(n)}}class L{constructor(e){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=e.clone();const t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:this.name=t.getString();break;case 3:this.keys.push(t.getString());break;case 4:this.values.push(t.processMessage(L._parseValue));break;case 5:this.extent=t.getUInt32();break;default:t.skip()}}getData(){return this._pbfLayer}static _parseValue(e){for(;e.next();)switch(e.tag()){case 1:return e.getString();case 2:return e.getFloat();case 3:return e.getDouble();case 4:return e.getInt64();case 5:return e.getUInt64();case 6:return e.getSInt64();case 7:return e.getBool();default:e.skip()}return null}}class E extends v.Z{constructor(e){super(e)}add(e,t,n,r,s,i,a,o,l,c,h,u){const f=this.array;let d=v.Z.i1616to32(e,t);f.push(d);const p=31;d=v.Z.i8888to32(Math.round(p*n),Math.round(p*r),Math.round(p*s),Math.round(p*i)),f.push(d),d=v.Z.i8888to32(Math.round(p*a),Math.round(p*o),Math.round(p*l),Math.round(p*c)),f.push(d),d=v.Z.i1616to32(h,0),f.push(d),u&&f.push(...u)}}class D extends v.Z{constructor(e){super(e)}add(e,t,n){const r=this.array;r.push(v.Z.i1616to32(e,t)),n&&r.push(...n)}}class A extends v.Z{constructor(e){super(e)}add(e,t,n,r,s,i,a){const o=this.array,l=this.index;let c=v.Z.i1616to32(e,t);return o.push(c),c=v.Z.i8888to32(Math.round(15*n),Math.round(15*r),s,i),o.push(c),a&&o.push(...a),l}}class S extends v.Z{constructor(e){super(e)}add(e,t,n,r,s,i,o,l,c,h,u,f){const d=this.array;let p=v.Z.i1616to32(e,t);d.push(p),p=v.Z.i1616to32(Math.round(8*n),Math.round(8*r)),d.push(p),p=v.Z.i8888to32(s/4,i/4,l,c),d.push(p),p=v.Z.i8888to32(0,(0,a.Or)(o),10*h,Math.min(10*u,255)),d.push(p),f&&d.push(...f)}}class B extends v.Z{constructor(e){super(e)}add(e,t,n,r,s){const i=this.array,a=v.Z.i1616to32(2*e+n,2*t+r);i.push(a),s&&i.push(...s)}}class V{constructor(e,t,n){this.layerExtent=4096,this._features=[],this.layer=e,this.zoom=t,this._spriteInfo=n,this._filter=e.getFeatureFilter()}pushFeature(e){this._filter&&!this._filter.filter(e,this.zoom)||this._features.push(e)}hasFeatures(){return this._features.length>0}getResources(e,t,n){}}class C extends V{constructor(e,t,n,r,i){super(e,t,n),this.type=s.al.CIRCLE,this._circleVertexBuffer=r,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(e){const t=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);for(const i of this._features){const a=i.getGeometry(e);if(!a)continue;const o=r.circleMaterial.encodeAttributes(i,s,r);for(const e of a)if(e)for(const r of e){const e=t.index;t.add(r.x,r.y,0,0,o),t.add(r.x,r.y,0,1,o),t.add(r.x,r.y,1,0,o),t.add(r.x,r.y,1,1,o),n.add(e,e+1,e+2),n.add(e+1,e+2,e+3),this._circleIndexCount+=6}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this._circleVertexBuffer.array.length,e+=this._circleIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._circleIndexStart,t[r++]=this._circleIndexCount,t[r++]=this._circleVertexBuffer.array.length;for(let e=0;e<this._circleVertexBuffer.array.length;e++)n[r++]=this._circleVertexBuffer.array[e];t[r++]=this._circleIndexBuffer.array.length;for(let e=0;e<this._circleIndexBuffer.array.length;e++)t[r++]=this._circleIndexBuffer.array[e];return t.buffer}}var R=n(3894),O=n(95401);class F extends V{constructor(e,t,n,r,i,a,o){super(e,t,n),this.type=s.al.FILL,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=i,this._outlineVertexBuffer=a,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("fill-pattern");if(i)if(i.isDataDriven)for(const e of this._features)t(i.getValue(s,e),!0);else t(i.getValue(s),!0)}processFeatures(e){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const t=this.layer,n=this.zoom,{fillMaterial:r,outlineMaterial:s,hasDataDrivenFill:i,hasDataDrivenOutline:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("fill-pattern"),l=o?.isDataDriven;let c=!o&&t.getPaintValue("fill-antialias",n);if(t.outlineUsesFillColor){if(c&&!t.hasDataDrivenOpacity){const e=t.getPaintValue("fill-opacity",n),r=t.getPaintValue("fill-opacity",n+1);e<1&&r<1&&(c=!1)}if(c&&!t.hasDataDrivenColor){const e=t.getPaintValue("fill-color",n),r=t.getPaintValue("fill-color",n+1);e[3]<1&&r[3]<1&&(c=!1)}}const h=this._features,u=e?.validateTessellation;if(l){const i=[];for(const l of h){const h=o.getValue(n,l),f=this._spriteInfo[h];if(!f||!f.rect)continue;const d=r.encodeAttributes(l,n,t,f),p=c&&a?s.encodeAttributes(l,n,t):[],y=l.getGeometry(e);i.push({ddFillAttributes:d,ddOutlineAttributes:p,page:f.page,geometry:y}),i.sort(((e,t)=>e.page-t.page));for(const{ddFillAttributes:e,ddOutlineAttributes:n,page:r,geometry:s}of i)this._processFeature(s,c,t.outlineUsesFillColor,e,n,u,r)}}else for(const o of h){const l=i?r.encodeAttributes(o,n,t):null,h=c&&a?s.encodeAttributes(o,n,t):null,f=o.getGeometry(e);this._processFeature(f,c,t.outlineUsesFillColor,l,h,u)}}serialize(){let e=10;e+=this.layerUIDs.length,e+=this._fillVertexBuffer.array.length,e+=this._fillIndexBuffer.array.length,e+=this._outlineVertexBuffer.array.length,e+=this._outlineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._fillIndexStart,t[r++]=this._fillIndexCount,t[r++]=this._outlineIndexStart,t[r++]=this._outlineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this._fillVertexBuffer.array.length;for(let e=0;e<this._fillVertexBuffer.array.length;e++)n[r++]=this._fillVertexBuffer.array[e];t[r++]=this._fillIndexBuffer.array.length;for(let e=0;e<this._fillIndexBuffer.array.length;e++)t[r++]=this._fillIndexBuffer.array[e];t[r++]=this._outlineVertexBuffer.array.length;for(let e=0;e<this._outlineVertexBuffer.array.length;e++)n[r++]=this._outlineVertexBuffer.array[e];t[r++]=this._outlineIndexBuffer.array.length;for(let e=0;e<this._outlineIndexBuffer.array.length;e++)t[r++]=this._outlineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n,r,s,i,a){if(!e)return;const o=e.length,l=!s||0===s.length;if(t&&(!n||l))for(let t=0;t<o;t++)this._processOutline(e[t],s);let c;for(let t=0;t<o;t++){const n=F._area(e[t]);n>32?(void 0!==c&&this._processFill(e,c,r,i,a),c=[t]):n<-32&&void 0!==c&&c.push(t)}void 0!==c&&this._processFill(e,c,r,i,a)}_processOutline(e,t){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,s=r.index;let a,o,l;const c=new i.E9(0,0),h=new i.E9(0,0),u=new i.E9(0,0);let f=-1,d=-1,p=-1,y=-1,g=-1,x=!1,_=e.length;if(_<2)return;const m=e[0];let b=e[_-1];for(;_&&b.isEqual(m);)--_,b=e[_-1];if(!(_-0<2)){for(let s=0;s<_;++s){0===s?(a=e[_-1],o=e[0],l=e[1],c.assignSub(o,a),c.normalize(),c.rightPerpendicular()):(a=o,o=l,l=s!==_-1?e[s+1]:e[0],c.assign(h));const i=this._isClipEdge(a,o);-1===y&&(x=i),h.assignSub(l,o),h.normalize(),h.rightPerpendicular();const m=c.x*h.y-c.y*h.x;u.assignAdd(c,h),u.normalize();const b=-u.x*-c.x+-u.y*-c.y;let I=Math.abs(0!==b?1/b:1);I>8&&(I=8),m>=0?(p=n.add(o.x,o.y,c.x,c.y,0,1,t),-1===y&&(y=p),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),d=n.add(o.x,o.y,I*-u.x,I*-u.y,0,-1,t),-1===g&&(g=d),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),f=d,d=p,p=n.add(o.x,o.y,u.x,u.y,0,1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),d=n.add(o.x,o.y,h.x,h.y,0,1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p)):(p=n.add(o.x,o.y,I*u.x,I*u.y,0,1,t),-1===y&&(y=p),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),d=n.add(o.x,o.y,-c.x,-c.y,0,-1,t),-1===g&&(g=d),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),f=d,d=p,p=n.add(o.x,o.y,-u.x,-u.y,0,-1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p),f=n.add(o.x,o.y,-h.x,-h.y,0,-1,t),f>=0&&d>=0&&p>=0&&!i&&r.add(f,d,p))}f>=0&&d>=0&&y>=0&&!x&&r.add(f,d,y),f>=0&&y>=0&&g>=0&&!x&&r.add(f,g,y),this._outlineIndexCount+=3*(r.index-s)}}_processFill(e,t,n,r,s){let i;t.length>1&&(i=[]);let a=0;for(const n of t)0!==a&&i.push(a),a+=e[n].length;const o=2*a,l=R.Z.acquire();for(const n of t){const t=e[n],r=t.length;for(let e=0;e<r;++e)l.push(t[e].x,t[e].y)}const c=(0,O.e)(l,i,2);if(O.e.deviation(l,i,2,c)>0){const r=t.map((t=>e[t].length)),{buffer:i,vertexCount:a}=(0,T.b)(l,r);if(a>0){const e=this._fillVertexBuffer.index;for(let e=0;e<a;e++)this._fillVertexBuffer.add(i[2*e],i[2*e+1],n);for(let t=0;t<a;t+=3){const n=e+t;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==s){const e=this._patternMap,t=e.get(s);t?t[1]+=a:e.set(s,[this._fillIndexStart+this._fillIndexCount,a])}this._fillIndexCount+=a}}else{const e=c.length;if(e>0){const t=this._fillVertexBuffer.index;let r=0;for(;r<o;)this._fillVertexBuffer.add(l[r++],l[r++],n);let i=0;for(;i<e;)this._fillIndexBuffer.add(t+c[i++],t+c[i++],t+c[i++]);if(void 0!==s){const t=this._patternMap,n=t.get(s);n?n[1]+=e:t.set(s,[this._fillIndexStart+this._fillIndexCount,e])}this._fillIndexCount+=e}}R.Z.release(l)}_isClipEdge(e,t){return e.x===t.x?e.x<=-64||e.x>=4160:e.y===t.y&&(e.y<=-64||e.y>=4160)}static _area(e){let t=0;const n=e.length-1;for(let r=0;r<n;r++)t+=(e[r].x-e[r+1].x)*(e[r].y+e[r+1].y);return t+=(e[n].x-e[0].x)*(e[n].y+e[0].y),.5*t}}var q=n(67327);class U extends V{constructor(e,t,n,r,i){super(e,t,n),this.type=s.al.LINE,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=r,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new q.z(N(this.tessellationProperties),z(this.tessellationProperties),e.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(e,t,n){const r=this.layer,s=this.zoom,i=r.getPaintProperty("line-pattern"),a=r.getPaintProperty("line-dasharray"),o=r.getLayoutProperty("line-cap");if(!i&&!a)return;const l=o?.getValue(s)||0,c=o?.isDataDriven,h=i?.isDataDriven,u=a?.isDataDriven;if(h||u)for(const e of this._features)t(h?i.getValue(s,e):this._getDashArrayKey(e,s,r,a,c,o,l));else if(i)t(i.getValue(s));else if(a){const e=a.getValue(s);t(r.getDashKey(e,l))}}processFeatures(e){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const t=this.layer,n=this.zoom,r=this._features,s=this._tessellationOptions,{hasDataDrivenLine:i,lineMaterial:a}=t;e&&e.setExtent(this.layerExtent);const o=t.getPaintProperty("line-pattern"),l=t.getPaintProperty("line-dasharray"),c=o?.isDataDriven,h=l?.isDataDriven;let u;u=t.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:t.getLayoutValue("line-cap",n),p=d||0,y=!!f;u=t.getLayoutProperty("line-join");const g=u?.isDataDriven?u:null,x=g?null:t.getLayoutValue("line-join",n);u=t.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:t.getLayoutValue("line-miter-limit",n);u=t.getLayoutProperty("line-round-limit");const b=u?.isDataDriven?u:null,I=b?null:t.getLayoutValue("line-round-limit",n);u=t.getPaintProperty("line-width");const w=u?.isDataDriven?u:null,M=w?null:t.getPaintValue("line-width",n);u=t.getPaintProperty("line-offset");const T=u?.isDataDriven?u:null,k=T?null:t.getPaintValue("line-offset",n);if(c||h){const i=[];for(const s of r){const r=c?o.getValue(n,s):this._getDashArrayKey(s,n,t,l,y,f,p),h=this._spriteInfo[r];if(!h||!h.rect)continue;const u=a.encodeAttributes(s,n,t,h),v=s.getGeometry(e);i.push({ddAttributes:u,page:h.page,cap:f?f.getValue(n,s):d,join:g?g.getValue(n,s):x,miterLimit:_?_.getValue(n,s):m,roundLimit:b?b.getValue(n,s):I,halfWidth:.5*(w?w.getValue(n,s):M),offset:T?T.getValue(n,s):k,geometry:v})}i.sort(((e,t)=>e.page-t.page)),s.textured=!0;for(const{ddAttributes:e,page:t,cap:n,join:r,miterLimit:a,roundLimit:o,halfWidth:l,offset:c,geometry:h}of i)s.capType=n,s.joinType=r,s.miterLimit=a,s.roundLimit=o,s.halfWidth=l,s.offset=c,this._processFeature(h,e,t)}else{if(o){const e=o.getValue(n),t=this._spriteInfo[e];if(!t||!t.rect)return}s.textured=!(!o&&!l),s.capType=d,s.joinType=x,s.miterLimit=m,s.roundLimit=I,s.halfWidth=.5*M,s.offset=k;for(const o of r){const r=i?a.encodeAttributes(o,n,t):null;f&&(s.capType=f.getValue(n,o)),g&&(s.joinType=g.getValue(n,o)),_&&(s.miterLimit=_.getValue(n,o)),b&&(s.roundLimit=b.getValue(n,o)),w&&(s.halfWidth=.5*w.getValue(n,o)),T&&(s.offset=T.getValue(n,o));const l=o.getGeometry(e);this._processFeature(l,r)}}}serialize(){let e=6;e+=this.layerUIDs.length,e+=this.tessellationProperties._lineVertexBuffer.array.length,e+=this.tessellationProperties._lineIndexBuffer.array.length,e+=3*this._patternMap.size+1;const t=new Uint32Array(e),n=new Int32Array(t.buffer);let r=0;t[r++]=this.type,t[r++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[r++]=this.layerUIDs[e];t[r++]=this._lineIndexStart,t[r++]=this._lineIndexCount;const s=this._patternMap,i=s.size;if(t[r++]=i,i>0)for(const[e,[n,i]]of s)t[r++]=e,t[r++]=n,t[r++]=i;t[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineVertexBuffer.array.length;e++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[e];t[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let e=0;e<this.tessellationProperties._lineIndexBuffer.array.length;e++)t[r++]=this.tessellationProperties._lineIndexBuffer.array[e];return t.buffer}_processFeature(e,t,n){if(!e)return;const r=e.length;for(let s=0;s<r;s++)this._processGeometry(e[s],t,n)}_processGeometry(e,t,n){if(e.length<2)return;let r,s,i=e[0],a=1;for(;a<e.length;)r=e[a].x-i.x,s=e[a].y-i.y,r*r+s*s<1e-6?e.splice(a,1):(i=e[a],++a);if(e.length<2)return;const o=this.tessellationProperties._lineIndexBuffer,l=3*o.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=t,this._lineTessellator.tessellate(e,this._tessellationOptions);const c=3*o.index-l;if(void 0!==n){const e=this._patternMap,t=e.get(n);t?t[1]+=c:e.set(n,[l+this._lineIndexCount,c])}this._lineIndexCount+=c}_getDashArrayKey(e,t,n,r,s,i,a){const o=s?i.getValue(t,e):a,l=r.getValue(t,e);return n.getDashKey(l,o)}}const N=e=>(t,n,r,s,i,a,o,l,c,h,u)=>(e._lineVertexBuffer.add(t,n,o,l,r,s,i,a,c,h,u,e._ddValues),e._lineVertexBuffer.index-1),z=e=>(t,n,r)=>{e._lineIndexBuffer.add(t,n,r)};var Z,j=n(79087),G=n(70586),H=n(19153),$=n(7333);function K(e,t){return e.iconMosaicItem&&t.iconMosaicItem?e.iconMosaicItem.page===t.iconMosaicItem.page?0:e.iconMosaicItem.page-t.iconMosaicItem.page:e.iconMosaicItem&&!t.iconMosaicItem?1:!e.iconMosaicItem&&t.iconMosaicItem?-1:0}class W extends V{constructor(e,t,n,r,i,a,o,l){super(e,t,l.getSpriteItems()),this.type=s.al.SYMBOL,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._iconVertexBuffer=n,this._iconIndexBuffer=r,this._textVertexBuffer=i,this._textIndexBuffer=a,this._placementEngine=o,this._workerTileHandler=l}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}getResources(e,t,n){const r=this.layer,s=this.zoom;e&&e.setExtent(this.layerExtent);const i=r.getLayoutProperty("icon-image"),a=r.getLayoutProperty("text-field");let o=r.getLayoutProperty("text-transform"),l=r.getLayoutProperty("text-font");const c=[];let h,u,f,d;i&&!i.isDataDriven&&(h=i.getValue(s)),a&&!a.isDataDriven&&(u=a.getValue(s)),o&&o.isDataDriven||(f=r.getLayoutValue("text-transform",s),o=null),l&&l.isDataDriven||(d=r.getLayoutValue("text-font",s),l=null);for(const y of this._features){const g=y.getGeometry(e);if(!g||0===g.length)continue;let x,_;i&&(x=i.isDataDriven?i.getValue(s,y):this._replaceKeys(h,y.values),x&&t(x));let m=!1;if(a&&(_=a.isDataDriven?a.getValue(s,y):this._replaceKeys(u,y.values),_)){switch(_=_.replaceAll("\\n","\n"),o&&(f=o.getValue(s,y)),f){case p._5.LOWERCASE:_=_.toLowerCase();break;case p._5.UPPERCASE:_=_.toUpperCase()}if(W._bidiEngine.hasBidiChar(_)){let e;e="rtl"===W._bidiEngine.checkContextual(_)?"IDNNN":"ICNNN",_=W._bidiEngine.bidiTransform(_,e,"VLYSN"),m=!0}if(_.length>0){l&&(d=l.getValue(s,y));for(const e of d){let t=n[e];t||(t=n[e]=new Set);for(const e of _){const n=e.codePointAt(0);null!=n&&t.add(n)}}}}if(!x&&!_)continue;const b=r.getLayoutValue("symbol-sort-key",s,y),I={feature:y,sprite:x,label:_,rtl:m,geometry:g,hash:(_?(0,H.hP)(_):0)^(x?(0,H.hP)(x):0),priority:b,textFont:d};c.push(I)}this._symbolFeatures=c}processFeatures(e){e&&e.setExtent(this.layerExtent);const t=this.layer,n=this.zoom,r=t.getLayoutValue("symbol-placement",n),s=r!==p.R.POINT,o=8*t.getLayoutValue("symbol-spacing",n),l=t.getLayoutProperty("icon-image"),c=t.getLayoutProperty("text-field"),h=l?new $._L(t,n,s):null,u=c?new $.nj(t,n,s):null,y=this._workerTileHandler;let x;l&&(x=y.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const _=[];let m=1;u&&u.size&&(m=u.size/f);const b=u?u.maxAngle*a.DT:0,I=u?8*u.size:0;for(const e of this._symbolFeatures){let t,a;h&&x&&e.sprite&&(t=x[e.sprite],t&&t.sdf&&(this._isIconSDF=!0)),t&&h.update(n,e.feature);let l=0;const c=e.label;if(c){(0,G.O3)(u),u.update(n,e.feature);const t=s&&u.rotationAlignment===p.aF.MAP?u.keepUpright:u.writingMode&&u.writingMode.includes(p.r1.VERTICAL);let r=.5;switch(u.anchor){case p.nR.TOP_LEFT:case p.nR.LEFT:case p.nR.BOTTOM_LEFT:r=0;break;case p.nR.TOP_RIGHT:case p.nR.RIGHT:case p.nR.BOTTOM_RIGHT:r=1}let i=.5;switch(u.anchor){case p.nR.TOP_LEFT:case p.nR.TOP:case p.nR.TOP_RIGHT:i=0;break;case p.nR.BOTTOM_LEFT:case p.nR.BOTTOM:case p.nR.BOTTOM_RIGHT:i=1}let o=.5;switch(u.justify){case p.vL.AUTO:o=r;break;case p.vL.LEFT:o=0;break;case p.vL.RIGHT:o=1}const h=u.letterSpacing*f,g=s?0:u.maxWidth*f,x=u.lineHeight*f,_=e.textFont.map((e=>y.getGlyphItems(e)));if(a=new d(_,g,x,h,r,i,o).getShaping(c,e.rtl,t),a&&a.length>0){let e=1e30,t=-1e30;for(const n of a)e=Math.min(e,n.x),t=Math.max(t,n.x);l=(t-e+48)*m*8}}for(let n of e.geometry){const c=[];if(r===p.R.LINE){if(a?.length&&u?.size){const e=8*u.size*(2+Math.min(2,4*Math.abs(u.offset[1])));n=W._smoothVertices(n,e)}W._pushAnchors(c,n,o,l)}else r===p.R.LINE_CENTER?W._pushCenterAnchor(c,n):e.feature.type===i.Vl.Polygon?W._pushCentroid(c,n):c.push(new g(n[0].x,n[0].y));for(const r of c){if(r.x<0||r.x>4096||r.y<0||r.y>4096)continue;if(s&&l>0&&u?.rotationAlignment===p.aF.MAP&&!W._honorsTextMaxAngle(n,r,l,b,I))continue;const i={shaping:a,line:n,iconMosaicItem:t,anchor:r,symbolFeature:e,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};_.push(i),this._processFeature(i,h,u)}}}_.sort(K),this._addPlacedGlyphs(),this._symbolInstances=_}serialize(){let e=11;e+=this.layerUIDs.length,e+=3*this.markerPageMap.size,e+=3*this.glyphsPageMap.size,e+=W._symbolsSerializationLength(this._symbolInstances),e+=this._iconVertexBuffer.array.length,e+=this._iconIndexBuffer.array.length,e+=this._textVertexBuffer.array.length,e+=this._textIndexBuffer.array.length;const t=new Uint32Array(e),n=new Int32Array(t.buffer),r=new Float32Array(t.buffer);let s=0;t[s++]=this.type,t[s++]=this.layerUIDs.length;for(let e=0;e<this.layerUIDs.length;e++)t[s++]=this.layerUIDs[e];t[s++]=this._isIconSDF?1:0,t[s++]=this.markerPageMap.size;for(const[e,[n,r]]of this.markerPageMap)t[s++]=e,t[s++]=n,t[s++]=r;t[s++]=this.glyphsPageMap.size;for(const[e,[n,r]]of this.glyphsPageMap)t[s++]=e,t[s++]=n,t[s++]=r;t[s++]=this._iconVertexBuffer.index/4,t[s++]=this._textVertexBuffer.index/4,s=W.serializeSymbols(t,n,r,s,this._symbolInstances),t[s++]=this._iconVertexBuffer.array.length;for(let e=0;e<this._iconVertexBuffer.array.length;e++)n[s++]=this._iconVertexBuffer.array[e];t[s++]=this._iconIndexBuffer.array.length;for(let e=0;e<this._iconIndexBuffer.array.length;e++)t[s++]=this._iconIndexBuffer.array[e];t[s++]=this._textVertexBuffer.array.length;for(let e=0;e<this._textVertexBuffer.array.length;e++)n[s++]=this._textVertexBuffer.array[e];t[s++]=this._textIndexBuffer.array.length;for(let e=0;e<this._textIndexBuffer.array.length;e++)t[s++]=this._textIndexBuffer.array[e];return t.buffer}static _symbolsSerializationLength(e){let t=0;t+=1;for(const n of e||[]){t+=4,t+=1;for(const e of n.textColliders)t+=10;for(const e of n.iconColliders)t+=10;t+=1,t+=2*n.textVertexRanges.length,t+=1,t+=2*n.iconVertexRanges.length}return t}static serializeSymbols(e,t,n,r,s){s=s||[],t[r++]=s.length;for(const e of s){t[r++]=e.anchor.x,t[r++]=e.anchor.y,t[r++]=e.symbolFeature.hash,t[r++]=e.symbolFeature.priority,t[r++]=e.textColliders.length+e.iconColliders.length;for(const s of e.textColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;for(const s of e.iconColliders)t[r++]=s.xTile,t[r++]=s.yTile,t[r++]=s.dxPixels,t[r++]=s.dyPixels,t[r++]=s.hard?1:0,t[r++]=s.partIndex,n[r++]=s.minLod,n[r++]=s.maxLod,t[r++]=s.width,t[r++]=s.height;t[r++]=e.textVertexRanges.length;for(const[n,s]of e.textVertexRanges)t[r++]=n,t[r++]=s;t[r++]=e.iconVertexRanges.length;for(const[n,s]of e.iconVertexRanges)t[r++]=n,t[r++]=s}return r}_replaceKeys(e,t){return e.replaceAll(/{([^{}]+)}/g,((e,n)=>n in t?t[n]:""))}_processFeature(e,t,n){const{line:r,iconMosaicItem:s,shaping:i,anchor:o}=e,l=this.zoom,c=this.layer,h=!!s;let u=!0;h&&(u=t?.optional||!s);const f=i&&i.length>0,d=!f||n?.optional;let y,g;if(h&&(y=this._placementEngine.getIconPlacement(o,s,t)),(y||u)&&(f&&(g=this._placementEngine.getTextPlacement(o,i,r,n)),g||d)){if(y&&g||(d||u?d||g?u||y||(g=null):y=null:(y=null,g=null)),g){const t=c.hasDataDrivenText?c.textMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._storePlacedGlyphs(e,g.shapes,l,n.rotationAlignment,t),g.textColliders){e.textColliders=g.textColliders;for(const e of g.textColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,c=e.dxPixels*r+(e.dyPixels+e.height)*n,h=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),y=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=y-p}}}}if(y){const n=c.hasDataDrivenIcon?c.iconMaterial.encodeAttributes(e.symbolFeature.feature,l,c):null;if(this._addPlacedIcons(e,y.shapes,l,s.page,t.rotationAlignment===p.aF.VIEWPORT,n),y.iconColliders){e.iconColliders=y.iconColliders;for(const e of y.iconColliders){e.minLod=Math.max(l+(0,a.k3)(e.minLod),0),e.maxLod=Math.min(l+(0,a.k3)(e.maxLod),25);const t=e.angle;if(t){const n=Math.cos(t),r=Math.sin(t),s=e.dxPixels*n-e.dyPixels*r,i=e.dxPixels*r+e.dyPixels*n,a=(e.dxPixels+e.width)*n-e.dyPixels*r,o=(e.dxPixels+e.width)*r+e.dyPixels*n,l=e.dxPixels*n-(e.dyPixels+e.height)*r,c=e.dxPixels*r+(e.dyPixels+e.height)*n,h=(e.dxPixels+e.width)*n-(e.dyPixels+e.height)*r,u=(e.dxPixels+e.width)*r+(e.dyPixels+e.height)*n,f=Math.min(s,a,l,h),d=Math.max(s,a,l,h),p=Math.min(i,o,c,u),y=Math.max(i,o,c,u);e.dxPixels=f,e.dyPixels=p,e.width=d-f,e.height=y-p}}}}}}_addPlacedIcons(e,t,n,r,s,i){const o=Math.max(n-1,0),l=this._iconVertexBuffer,c=this._iconIndexBuffer,h=this._markerMap;for(const u of t){const t=s?0:Math.max(n+(0,a.k3)(u.minzoom),o),f=s?25:Math.min(n+(0,a.k3)(u.maxzoom),25);if(f<=t)continue;const d=u.tl,p=u.tr,y=u.bl,g=u.br,x=u.mosaicRect,_=u.labelAngle,m=u.minAngle,b=u.maxAngle,I=u.anchor,w=l.index,M=x.x,T=x.y,k=M+x.width,v=T+x.height,P=l.index;l.add(I.x,I.y,d.x,d.y,M,T,_,m,b,t,f,i),l.add(I.x,I.y,p.x,p.y,k,T,_,m,b,t,f,i),l.add(I.x,I.y,y.x,y.y,M,v,_,m,b,t,f,i),l.add(I.x,I.y,g.x,g.y,k,v,_,m,b,t,f,i),e.iconVertexRanges.length>0&&e.iconVertexRanges[0][0]+e.iconVertexRanges[0][1]===P?e.iconVertexRanges[0][1]+=4:e.iconVertexRanges.push([P,4]),c.add(w,w+1,w+2),c.add(w+1,w+2,w+3),h.has(r)?h.get(r)[1]+=6:h.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const e=this._textVertexBuffer,t=this._textIndexBuffer,n=this._glyphMap;for(const[r,s]of this._glyphBufferDataStorage)for(const i of s){const s=e.index,a=i.symbolInstance,o=i.ddAttributes,l=e.index;e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tl[0],i.tl[1],i.xmin,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.tr[0],i.tr[1],i.xmax,i.ymin,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.bl[0],i.bl[1],i.xmin,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),e.add(i.glyphAnchor[0],i.glyphAnchor[1],i.br[0],i.br[1],i.xmax,i.ymax,i.labelAngle,i.minAngle,i.maxAngle,i.minLod,i.maxLod,o),a.textVertexRanges.length>0&&a.textVertexRanges[0][0]+a.textVertexRanges[0][1]===l?a.textVertexRanges[0][1]+=4:a.textVertexRanges.push([l,4]),t.add(s,s+1,s+2),t.add(s+1,s+2,s+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(e,t,n,r,s){const i=Math.max(n-1,0),o=r===p.aF.VIEWPORT;let l,c,h,u,f,d,y,g,x,_,m;for(const r of t)l=o?0:Math.max(n+(0,a.k3)(r.minzoom),i),c=o?25:Math.min(n+(0,a.k3)(r.maxzoom),25),c<=l||(h=r.tl,u=r.tr,f=r.bl,d=r.br,y=r.labelAngle,g=r.minAngle,x=r.maxAngle,_=r.anchor,m=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[_.x,_.y],tl:[h.x,h.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:m.x,ymin:m.y,xmax:m.x+m.width,ymax:m.y+m.height,labelAngle:y,minAngle:g,maxAngle:x,minLod:l,maxLod:c,placementLod:i,symbolInstance:e,ddAttributes:s}))}static _pushAnchors(e,t,n,r){n+=r;let s=0;const o=t.length-1;for(let e=0;e<o;e++)s+=i.E9.distance(t[e],t[e+1]);let l=r||n;if(l*=.5,s<=l)return;const c=l/s;let h=0,u=-(n=s/Math.max(Math.round(s/n),1))/2;const f=t.length-1;for(let r=0;r<f;r++){const s=t[r],i=t[r+1],o=i.x-s.x,l=i.y-s.y,f=Math.sqrt(o*o+l*l);let d;for(;u+n<h+f;){u+=n;const t=(u-h)/f,p=(0,a.sX)(s.x,i.x,t),y=(0,a.sX)(s.y,i.y,t);void 0===d&&(d=Math.atan2(l,o)),e.push(new g(p,y,d,r,c))}h+=f}}static _pushCenterAnchor(e,t){let n=0;const r=t.length-1;for(let e=0;e<r;e++)n+=i.E9.distance(t[e],t[e+1]);const s=n/2;let o=0;const l=t.length-1;for(let n=0;n<l;n++){const r=t[n],i=t[n+1],l=i.x-r.x,c=i.y-r.y,h=Math.sqrt(l*l+c*c);if(s<o+h){const t=(s-o)/h,u=(0,a.sX)(r.x,i.x,t),f=(0,a.sX)(r.y,i.y,t),d=Math.atan2(c,l);return void e.push(new g(u,f,d,n,0))}o+=h}}static _deviation(e,t,n){const r=(t.x-e.x)*(n.x-t.x)+(t.y-e.y)*(n.y-t.y),s=(t.x-e.x)*(n.y-t.y)-(t.y-e.y)*(n.x-t.x);return Math.atan2(s,r)}static _honorsTextMaxAngle(e,t,n,r,s){let a=0;const o=n/2;let l=new i.E9(t.x,t.y),c=t.segment+1;for(;a>-o;){if(--c,c<0)return!1;a-=i.E9.distance(e[c],l),l=e[c]}a+=i.E9.distance(e[c],e[c+1]);const h=[];let u=0;const f=e.length;for(;a<o;){const t=e[c];let n,o=c;do{if(++o,o===f)return!1;n=e[o]}while(n.isEqual(t));let l,d=o;do{if(++d,d===f)return!1;l=e[d]}while(l.isEqual(n));const p=this._deviation(t,n,l);for(h.push({deviation:p,distToAnchor:a}),u+=p;a-h[0].distToAnchor>s;)u-=h.shift().deviation;if(Math.abs(u)>r)return!1;a+=i.E9.distance(n,l),c=o}return!0}static _smoothVertices(e,t){if(t<=0)return e;let n=e.length;if(n<3)return e;const r=[];let s=0,a=0;r.push(0);for(let t=1;t<n;t++){const n=i.E9.distance(e[t],e[t-1]);n>0&&(s+=n,r.push(s),a++,a!==t&&(e[a]=e[t]))}if(n=a+1,n<3)return e;t=Math.min(t,.2*s);const o=e[0].x,l=e[0].y,c=e[n-1].x,h=e[n-1].y,u=i.E9.sub(e[0],e[1]);u.normalize(),e[0].x+=t*u.x,e[0].y+=t*u.y,u.assignSub(e[n-1],e[n-2]),u.normalize(),e[n-1].x+=t*u.x,e[n-1].y+=t*u.y,r[0]-=t,r[n-1]+=t;const f=[];f.push(new i.E9(o,l));const d=1e-6,p=.5*t;for(let s=1;s<n-1;s++){let a=0,o=0,l=0;for(let n=s-1;n>=0;n--){const i=p+r[n+1]-r[s];if(i<0)break;const c=r[n+1]-r[n],h=r[s]-r[n]<p?1:i/c;if(h<d)break;const u=h*h,f=h*i-.5*u*c,y=h*c/t,g=e[n+1],x=e[n].x-g.x,_=e[n].y-g.y;a+=y/f*(g.x*h*i+.5*u*(i*x-c*g.x)-u*h*c*x/3),o+=y/f*(g.y*h*i+.5*u*(i*_-c*g.y)-u*h*c*_/3),l+=y}for(let i=s+1;i<n;i++){const n=p-r[i-1]+r[s];if(n<0)break;const c=r[i]-r[i-1],h=r[i]-r[s]<p?1:n/c;if(h<d)break;const u=h*h,f=h*n-.5*u*c,y=h*c/t,g=e[i-1],x=e[i].x-g.x,_=e[i].y-g.y;a+=y/f*(g.x*h*n+.5*u*(n*x-c*g.x)-u*h*c*x/3),o+=y/f*(g.y*h*n+.5*u*(n*_-c*g.y)-u*h*c*_/3),l+=y}f.push(new i.E9(a/l,o/l))}return f.push(new i.E9(c,h)),e[0].x=o,e[0].y=l,e[n-1].x=c,e[n-1].y=h,f}static _pushCentroid(e,t){const n=4096,r=4096,s=t.length-1;let i=0,a=0,o=0,l=t[0].x,c=t[0].y;l>n&&(l=n),l<0&&(l=0),c>r&&(c=r),c<0&&(c=0);for(let e=1;e<s;e++){let s=t[e].x,h=t[e].y,u=t[e+1].x,f=t[e+1].y;s>n&&(s=n),s<0&&(s=0),h>r&&(h=r),h<0&&(h=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(s-l)*(f-c)-(u-l)*(h-c);i+=d*(l+s+u),a+=d*(c+h+f),o+=d}i/=3*o,a/=3*o,isNaN(i)||isNaN(a)||e.push(new g(i,a))}}W._bidiEngine=new j.Z,function(e){e[e.INITIALIZED=0]="INITIALIZED",e[e.NO_DATA=1]="NO_DATA",e[e.READY=2]="READY",e[e.MODIFIED=3]="MODIFIED",e[e.INVALID=4]="INVALID"}(Z||(Z={}));class Y{constructor(e,t,n,r,s){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=t,s){this._styleLayerUIDs=new Set;for(const e of s)this._styleLayerUIDs.add(e)}this._styleRepository=r,this._layers=this._styleRepository?.layers??[];const[a,o,l]=t.tileKey.split("/").map(parseFloat);this._level=a;const c=8+Math.max(5*(this._level-14),0);for(const t of Object.keys(e)){const n=e[t];if(this._pbfTiles[t]=new M.Z(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[e]=n.refKey.split("/").map(parseFloat),r=a-e;if(r>0){const e=(1<<r)-1,n=o&e,s=l&e;this._tileClippers[t]=new i.bN(r,n,s,8,c)}}this._tileClippers[t]||(this._tileClippers[t]=new i.I6)}}_canParseStyleLayer(e){return!this._styleLayerUIDs||this._styleLayerUIDs.has(e)}async parse(e){const t=(0,T.j)(),n=this._initialize(e),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const s=[],i=new Set,a=(e,t)=>{i.has(e)||(s.push({name:e,repeat:t}),i.add(e))},o={};for(const e of r)e.getResources(e.tileClipper,a,o);if(this._tile.status===Z.INVALID)return[];const l=this._fetchResources(s,o,e);return Promise.all([...l,t]).then((()=>this._processFeatures(n.returnedBuckets)))}_initialize(e){return{signal:e&&e.signal,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(e){const{sourceNameToTileData:t,layers:n,zoom:r,sourceNameToTileClipper:s,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:a,returnedBuckets:o,layerIdToBucket:l,referencerUIDToReferencedId:c}=e;for(let e=n.length-1;e>=0;e--){const h=n[e];if(!this._canParseStyleLayer(h.uid)||h.minzoom&&r<Math.floor(h.minzoom)||h.maxzoom&&r>=h.maxzoom||h.type===p.fR.BACKGROUND)continue;if(!t[h.source]||!s[h.source])continue;const u=t[h.source],f=s[h.source],d=h.sourceLayer,y=u[d];if(y){let e=a[h.source];if(e||(e=a[h.source]=new Set),e.add(h.sourceLayer),h.refLayerId)c.set(h.uid,h.refLayerId);else{const e=this._createBucket(h);if(e){e.layerUIDs=[h.uid],e.layerExtent=y.extent,e.tileClipper=f;let t=i[h.source];t||(t=i[h.source]={});let n=t[d];n||(n=t[d]=[]),n.push(e),o.push(e),l[h.id]=e}}}}}_linkReferences(e){const{layerIdToBucket:t,referencerUIDToReferencedId:n}=e;n.forEach(((e,n)=>{t[e]&&t[e].layerUIDs.push(n)}))}_filterFeatures(e){const{signal:t,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:i}=e,a=10*this._level,o=10*(this._level+1),l=[],c=[];for(const e of Object.keys(i))i[e].forEach((t=>{l.push(t),c.push(e)}));for(let e=0;e<l.length;e++){const i=c[e],h=l[e];if(!n[i]||!s[i])continue;const u=n[i][h],f=s[i][h];if(!f||0===f.length)continue;if((0,r.Hc)(t))return;const d=u.getData();for(;d.nextTag(2);){const e=d.getMessage(),t=new k(e,u);e.release();const n=t.values;if(n){const e=n._minzoom;if(e&&e>=o)continue;const t=n._maxzoom;if(t&&t<=a)continue}for(const e of f)e.pushFeature(t)}}}_fetchResources(e,t,n){const r=[],s=this._tile.getWorkerTileHandler();let i,a;e.length>0&&(i=s.fetchSprites(e,this._client,n),r.push(i));for(const e in t){const i=t[e];i.size>0&&(a=s.fetchGlyphs(this._tile.tileKey,e,i,this._client,n),r.push(a))}return r}_processFeatures(e){const t=e.filter((e=>e.hasFeatures()||this._canParseStyleLayer(e.layer.uid)));for(const e of t)e.processFeatures(e.tileClipper);return t}_parseTileData(e){const t={};for(const n of Object.keys(e)){const r=e[n],s={};for(;r.next();)switch(r.tag()){case 3:{const e=r.getMessage(),t=new L(e);e.release(),s[t.name]=t;break}default:r.skip()}t[n]=s}return t}_createBucket(e){switch(e.type){case p.fR.BACKGROUND:return null;case p.fR.FILL:return this._createFillBucket(e);case p.fR.LINE:return this._createLineBucket(e);case p.fR.CIRCLE:return this._createCircleBucket(e);case p.fR.SYMBOL:return this._createSymbolBucket(e)}}_createFillBucket(e){return new F(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new D(e.fillMaterial.getStride()),new P,new A(e.outlineMaterial.getStride()),new P)}_createLineBucket(e){return new U(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new E(e.lineMaterial.getStride()),new P)}_createCircleBucket(e){return new C(e,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new B(e.circleMaterial.getStride()),new P)}_createSymbolBucket(e){const t=this._tile;return new W(e,this._level,new S(e.iconMaterial.getStride()),new P,new S(e.textMaterial.getStride()),new P,t.placementEngine,t.getWorkerTileHandler())}}class J{constructor(e,t,n,r){this.status=Z.INITIALIZED,this.placementEngine=new b,this.tileKey=e,this.refKeys=t,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=Z.INITIALIZED,this._workerTileHandler=null}async parse(e,t){const n=t&&t.signal;if(null!=n){const e=()=>{n.removeEventListener("abort",e),this.status=Z.INVALID};n.addEventListener("abort",e)}let s;const i={bucketsWithData:[],emptyBuckets:null};try{s=await this._parse(e,t)}catch(e){if((0,r.D_)(e))throw e;return{result:i,transferList:[]}}this.status=Z.READY;const a=i.bucketsWithData,o=[];for(const e of s)if(e.hasFeatures()){const t=e.serialize();a.push(t)}else o.push(e.layer.uid);const l=[...a];let c=null;return o.length>0&&(c=Uint32Array.from(o),l.push(c.buffer)),i.emptyBuckets=c,{result:i,transferList:l}}setObsolete(){this.status=Z.INVALID}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(e,t){const n=e.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=Z.MODIFIED,new Y(n,this,t.client,this._styleRepository,e.styleLayerUIDs).parse(t))}}var X=n(51785);class Q{constructor(){this._spriteInfo={},this._glyphInfo={}}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(e,t){const{key:n}=e,s={};for(const t of Object.keys(e.sourceName2DataAndRefKey)){const n=e.sourceName2DataAndRefKey[t];s[t]=n.refKey}const i=new J(n,s,this,this._styleRepository);try{return await i.parse(e,t)}catch(e){if(i.setObsolete(),i.release(),!(0,r.D_)(e))throw e;return null}}updateStyle(e){if(!e||0===e.length||!this._styleRepository)return;const t=this._styleRepository;for(const n of e){const e=n.type,r=n.data;switch(e){case s.Fr.PAINTER_CHANGED:t.setPaintProperties(r.layer,r.paint);break;case s.Fr.LAYOUT_CHANGED:t.setLayoutProperties(r.layer,r.layout);break;case s.Fr.LAYER_REMOVED:t.deleteStyleLayer(r.layer);break;case s.Fr.LAYER_CHANGED:t.setStyleLayer(r.layer,r.index);break;case s.Fr.SPRITES_CHANGED:this._spriteInfo={}}}}setStyle(e){this._styleRepository=new X.Z(e),this._spriteInfo={},this._glyphInfo={}}fetchSprites(e,t,n){const r=[],s=this._spriteInfo;for(const t of e)void 0===s[t.name]&&r.push(t);return 0===r.length?Promise.resolve():t.invoke("getSprites",r,{signal:n&&n.signal}).then((e=>{for(const t in e){const n=e[t];s[t]=n}}))}getSpriteItems(){return this._spriteInfo}fetchGlyphs(e,t,n,r,s){const i=[];let a=this._glyphInfo[t];return a?n.forEach((e=>{a[e]||i.push(e)})):(a=this._glyphInfo[t]=[],n.forEach((e=>i.push(e)))),0===i.length?Promise.resolve():r.invoke("getGlyphs",{tileID:e,font:t,codePoints:i},s).then((e=>{for(let t=0;t<e.length;t++)e[t]&&(a[t]=e[t])}))}getGlyphItems(e){return this._glyphInfo[e]}}}}]);
|