@arcgis/core 5.2.0-next.79 → 5.2.0-next.80
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/WebScene.js +1 -1
- package/arcgisGlobal.d.ts +8 -0
- package/assets/components/assets/input-date-picker/t9n/messages.ar.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.bg.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.bs.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.ca.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.cs.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.da.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.de.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.el.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.es.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.et.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.fi.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.fr.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.he.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.hr.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.hu.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.id.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.it.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.ja.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.ko.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.lt.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.lv.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.nl.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.no.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.pl.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.ro.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.ru.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.sk.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.sl.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.sr.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.sv.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.th.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.tr.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.uk.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.vi.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/input-date-picker/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
- package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
- package/assets/components/assets/input-time-zone/t9n/messages.de.json +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{c69cf08da4e4c2c824ee.js → 0179949495c87466b428.js} +12 -12
- package/assets/esri/core/workers/chunks/{ef803fb25741e9f2a0a1.js → 04105d83556409489835.js} +1 -1
- package/assets/esri/core/workers/chunks/{040a73b2a23577e1eabd.js → 24729603dcdbd95fd01e.js} +1 -1
- package/assets/esri/core/workers/chunks/2b0558c1716425974563.js +2 -0
- package/assets/esri/core/workers/chunks/{ac2ba5c3d613d7d5183a.js → 2b3f76e03b7a28fc4453.js} +1 -1
- package/assets/esri/core/workers/chunks/345510a95e893fa8040a.js +1 -0
- package/assets/esri/core/workers/chunks/{57e26a86d46e02c89c4f.js → 55dda957c79fb285185f.js} +1 -1
- package/assets/esri/core/workers/chunks/5d8d2145533a52efb7b9.js +1 -0
- package/assets/esri/core/workers/chunks/5f553da48d0ccbbfcd3c.js +2 -0
- package/assets/esri/core/workers/chunks/{cd74de12005834244a47.js → 626a715fdec93e188e0c.js} +1 -1
- package/assets/esri/core/workers/chunks/6529b5cc3ac6baa29fff.js +2 -0
- package/assets/esri/core/workers/chunks/7253a439c98200e3e748.js +1 -0
- package/assets/esri/core/workers/chunks/{4115bab15c19b4f5ae08.js → 7529c0fcfb83998e63db.js} +1 -1
- package/assets/esri/core/workers/chunks/{b37a20c5c4a4686257d4.js → 8a3289e15e0ce92e3813.js} +1 -1
- package/assets/esri/core/workers/chunks/{b82763e9401b16121f8d.js → 995a433936fc90d41634.js} +2 -2
- package/assets/esri/core/workers/chunks/9f1211d2267fb7673c4d.js +1 -0
- package/assets/esri/core/workers/chunks/{385b23d4bd5275031fb6.js → cada52d719c35d40958a.js} +1 -1
- package/assets/esri/core/workers/chunks/{f703bc002c732d1c045d.js → cfdbc48f58433a3d5fc3.js} +1 -1
- package/assets/esri/core/workers/chunks/{83556c9f6f85c2a46779.js → d8da31bfe2bc4174e5aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{8762da315cf5086167c3.js → e9e4b27ba06a29e6340c.js} +1 -1
- package/assets/esri/core/workers/chunks/{05663093b1d2a268b953.js → ebb722118a220c92efc3.js} +1 -1
- package/assets/esri/core/workers/chunks/ee63c693f2539f3bfa17.js +2 -0
- package/assets/esri/core/workers/chunks/ef9489d1dccb817460bb.js +2 -0
- package/assets/esri/core/workers/chunks/f086c6d229fb34a9d7f9.js +1 -0
- package/assets/esri/core/workers/chunks/{507b7f4c276b60ffe9d5.js → f4bae61869df1877fd3f.js} +1 -1
- package/chunks/Component.glsl.js +4 -4
- package/chunks/{FocusAreaColor.glsl.js → FocusArea.glsl.js} +1 -1
- package/chunks/HUDMaterial.glsl.js +5 -5
- package/chunks/Terrain.glsl.js +4 -4
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/list/BasemapItemCollection.d.ts +81 -0
- package/layers/list/BasemapItemCollection.js +2 -0
- package/layers/list/CatalogItemCollection.d.ts +76 -0
- package/layers/list/CatalogItemCollection.js +2 -0
- package/layers/list/Item.d.ts +262 -0
- package/layers/list/Item.js +2 -0
- package/layers/list/ItemPanel.d.ts +75 -0
- package/layers/list/ItemPanel.js +2 -0
- package/layers/list/LayerItemCollection.d.ts +106 -0
- package/layers/list/LayerItemCollection.js +2 -0
- package/layers/list/TableItem.d.ts +136 -0
- package/layers/list/TableItem.js +2 -0
- package/layers/list/TableItemCollection.d.ts +115 -0
- package/layers/list/TableItemCollection.js +2 -0
- package/layers/list/TableItemPanel.d.ts +74 -0
- package/layers/list/TableItemPanel.js +2 -0
- package/layers/list/support/layerListUtils.js +2 -0
- package/layers/list/types.d.ts +55 -0
- package/package.json +4 -4
- package/support/revision.js +1 -1
- package/views/3d/FocusAreasView.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +2 -0
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementController.js +2 -0
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +2 -0
- package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/isSupportedObject.js +1 -1
- package/views/3d/interactive/editingTools/reshape/reshapeTooltipUtils3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/support/GaussianSplatSortWorker.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +16 -7
- package/views/3d/webgl-engine/effects/focusArea/{FocusAreaColor.glsl.js → FocusArea.glsl.js} +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusArea.js +2 -0
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaMask.js +1 -1
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaTechnique.js +2 -0
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/CutFill.js +2 -0
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/webscene/support/schemaValidator.js +1 -1
- package/webscene/version.js +2 -0
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/videoViewerUtils.js +1 -1
- package/assets/esri/core/workers/chunks/06c8547521ce9c97b258.js +0 -2
- package/assets/esri/core/workers/chunks/09653bd2a31d293a10d9.js +0 -2
- package/assets/esri/core/workers/chunks/17e9324a02b69733307a.js +0 -2
- package/assets/esri/core/workers/chunks/20b9bc8d5cbe9a18a644.js +0 -1
- package/assets/esri/core/workers/chunks/29a20a37e7837142fa6b.js +0 -2
- package/assets/esri/core/workers/chunks/81cd0cb9ae1371765d32.js +0 -1
- package/assets/esri/core/workers/chunks/95956d62591d689f1135.js +0 -1
- package/assets/esri/core/workers/chunks/b2812279662f1a5f8d06.js +0 -1
- package/assets/esri/core/workers/chunks/fdd4f78facec6387cdb0.js +0 -1
- package/assets/esri/core/workers/chunks/ffd5285c7b2c83208f87.js +0 -2
- package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +0 -2
- package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +0 -2
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +0 -2
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillVisualization.js +0 -2
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorTechnique.js +0 -2
- package/views/3d/webgl-engine/effects/focusArea/FocusAreaVisualization.js +0 -2
- package/views/3d/webgl-engine/lib/CutFillVisualization.js +0 -2
- /package/assets/esri/core/workers/chunks/{09653bd2a31d293a10d9.js.LICENSE.txt → 2b0558c1716425974563.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{17e9324a02b69733307a.js.LICENSE.txt → 5f553da48d0ccbbfcd3c.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{06c8547521ce9c97b258.js.LICENSE.txt → 6529b5cc3ac6baa29fff.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{b82763e9401b16121f8d.js.LICENSE.txt → 995a433936fc90d41634.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{ffd5285c7b2c83208f87.js.LICENSE.txt → ee63c693f2539f3bfa17.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{29a20a37e7837142fa6b.js.LICENSE.txt → ef9489d1dccb817460bb.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[124,9036],{69397(e,t,r){r.d(t,{Qf:()=>o,Qh:()=>n,lM:()=>s});var i=r(34275);function s(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function n(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=c;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?n(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+p:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return c+e.length*t}const u=32,c=16,p=145},5359(e,t,r){r.d(t,{Z:()=>s});const i=Symbol("isImageryTileGraphicOrigin");function s(e){return!!e&&i in e}r.d(t,["H",0,i])},90124(e,t,r){r.r(t),r.d(t,{default:()=>K});var i,s=r(5482),n=r(37838),a=r(69540),o=r(49186),l=r(53966),u=r(97768),c=r(25728),p=r(17676),d=r(36708),h=r(91429),y=r(56507),m=r(60950),f=r(89808),g=r(99959),v=r(5359);class w extends g.A{get[(i=v.H,m.ym)](){return this.layer}get[f.Q](){return this.layer}constructor(e){super(),this[i]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var b=r(4146),R=r(18768),S=r(63074),C=r(69208),A=r(34287),O=r(8303),I=r(72545),M=r(56551),_=r(54310),F=r(25036),P=r(82935),x=r(82806),N=r(7548),T=r(23636),J=r(1003),Z=r(99235),j=r(10873),D=r(20437),V=r(74797),k=r(22796),L=r(69409);const E={instance:null,refCount:0,connectionPromise:null};async function H(){if(E.refCount++,E.instance)return E.instance;if(!E.connectionPromise){const e=new L.A;E.connectionPromise=e.initialize().then(()=>{E.instance=e})}return await E.connectionPromise,E.instance}function W(){E.refCount--,E.refCount>0||(E.instance?.destroy(),E.instance=null,E.connectionPromise=null,E.refCount=0)}var $=r(87045),z=r(24212),q=r(30291),B=r(88625),U=r(59923);let G=class extends((0,S.dM)((0,F.j)((0,A.q)((0,O.A)((0,M.H)((0,C.d)((0,x.b)((0,I.G)((0,P.e)((0,R.b)((0,_.J)((0,c.M)((0,a.OU)(b.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new w(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,p.sg)(async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(9838).then(r.bind(r,59838));switch(e){case 0:return s(this,t);case 1:return n(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=(0,u.xt)(this._releaseWorkerHandle)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,V.rZ)("Pixel Value"),(0,V.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,r=t?.attributeTable;if(r){const t=(0,V.jC)(r);e.push(...t)}const i=t?.dataType,s=t?.multidimensionalInfo;if(("vector-magdir"===i||"vector-uv"===i)&&null!=s){const t=s.variables[0].unit?.trim(),r=(0,V.DV)(t),i=(0,V.y6)();e.push(r,i)}if(s){const t=(0,V.AL)(s);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,r=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==V.F_.rawServicePixelValue)),i=(0,q.tn)({fields:t,title:this.title},{...e,visibleFieldNames:r}),{rasterInfo:s}=this.raster;return i?.fieldInfos&&s&&(0,V.h4)(i.fieldInfos,s),i}async generateRasterInfo(e,t){const r=(0,y.PZ)(k.A,e);if(await this.load(),!r||"none"===r.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:e}=await this._openFunctionRaster(r,t);return e}catch(e){if(e instanceof o.A)throw e;throw new o.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){const e=this._primaryRasters[0]??this.raster,t="RasterTileServer"===e?.datasetFormat,r=!!this.sourceJSON?.exportTilesAllowed,i=this.sourceJSON?.datasetFormat?.toLowerCase(),s=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&"Raster"===e?.tileType&&("cache/jpegplus"===i||"cache/jpegpng"===i);return t&&r&&("Map"===e?.tileType||s)}supportsWrite(){const e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):((0,U.U4)(t,this),null)}async hasDataChanged(){try{const e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:r}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set("serviceRasterInfo",e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),r&&this.read(r,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,N.qg)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:r,source:i}=this;if(!t&&!i)throw new o.A("imagery-tile-layer:open","missing url or source parameter");i?await this._openFromSource(i,e):r?await this._openFromUrlWithRasterFunction(t,r,e):await this._openFromUrl(t,e)}const r=this.raster.rasterInfo;if(!r)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?r:this._primaryRasters[0].rasterInfo),this._set("spatialReference",r.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,d.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,N.pb)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,r){const i=[e];let s;t&&(0,Z.UD)(t.toJSON(),i),i.some(e=>Q(e))&&(s=await H(),this._releaseWorkerHandle={remove:()=>W()});const n=await Promise.all(i.map(e=>J.default.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:s,signal:r}))),a=n.findIndex(e=>null==e);if(a>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${i[a]}`);return this._primaryRasters=n,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let r;Q(e)&&(r=await H(),this._releaseWorkerHandle={remove:()=>W()});const i=await J.default.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:r,signal:t});if(null==i)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const r="the tiled imagery data source is not supported",i="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!i)throw new o.A("imagery-tile-layer:open",r);"MEMORY"===i&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const s=await J.default.open({url:"",source:e,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==s)throw new o.A("imagery-tile-layer:open",r);this._primaryRasters=[s],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=s}async _openFunctionRaster(e,t){const r={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>r[e.url]=e);const i=(0,Z.vt)(e.functionDefinition?.toJSON()??e.toJSON(),r),s=new T.A({rasterFunction:i});return await s.open(t),s}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&l.A.getLogger(this).error("imagery-tile-layer:open",e.message),l.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,z.XF)(l.A.getLogger(this),(0,z.$7)("ImageryTile layers","relative-to-scene",e)),(0,z.XF)(l.A.getLogger(this),(0,z.tW)("ImageryTile layers",e))}};(0,s.Cg)([(0,h.MZ)({clonable:!1})],G.prototype,"_primaryRasters",void 0),(0,s.Cg)([(0,h.MZ)({clonable:!1})],G.prototype,"_releaseWorkerHandle",void 0),(0,s.Cg)([(0,h.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],G.prototype,"charts",void 0),(0,s.Cg)([(0,h.MZ)({type:B.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],G.prototype,"elevationInfo",null),(0,s.Cg)([(0,h.MZ)({type:$.A})],G.prototype,"tileInfo",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],G.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,h.MZ)(j.fV)],G.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],G.prototype,"isReference",void 0),(0,s.Cg)([(0,h.MZ)({type:["show","hide"]})],G.prototype,"listMode",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],G.prototype,"blendMode",void 0),(0,s.Cg)([(0,h.MZ)({type:k.A,json:{name:"renderingRule",write:!0}})],G.prototype,"rasterFunction",void 0),(0,s.Cg)([(0,h.MZ)()],G.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],G.prototype,"version",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],G.prototype,"type",void 0),(0,s.Cg)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],G.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],G.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,h.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],G.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],G.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,h.MZ)(j.PY)],G.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,type:[D.A]})],G.prototype,"fields",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,type:[D.A]})],G.prototype,"rasterFields",null),(0,s.Cg)([(0,h.MZ)({constructOnly:!0})],G.prototype,"source",void 0),G=(0,s.Cg)([(0,h.$K)("esri.layers.ImageryTileLayer")],G);const K=G;function Q(e){return/\.(jpe?g|png)$/i.test(e)}},18768(e,t,r){var i=r(5482),s=r(53966),n=r(91429),a=r(60694);r.d(t,["b",0,e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}])},56551(e,t,r){r.d(t,{H:()=>p});var i=r(5482),s=r(91429),n=r(69540),a=r(25482),o=r(56507),l=r(94359),u=r(93223);let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],c.prototype,"method",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)({type:[o.jz],json:{write:{isRequired:!0}}})],c.prototype,"bandIds",void 0),(0,i.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],c.prototype,"renderer",void 0),c=(0,i.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],c);const p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],r.prototype,"activePresetRendererName",void 0),(0,i.Cg)([(0,s.MZ)({type:[c],json:{name:"layerDefinition.presetRenderers",write:!0}})],r.prototype,"presetRenderers",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],r),r}},82371(e,t,r){r.d(t,{E9:()=>y,Tw:()=>d,X6:()=>h});var i=r(11254),s=r(5443),n=r(86738),a=r(16930),o=r(87186),l=r(20223),u=r(2272),c=r(22671);async function p(e,t,r){const p=(0,u.Dl)(e),{rasterFunction:d,sourceJSON:h}=t||{},y=d?JSON.stringify(d.rasterFunctionDefinition||d):null,m=(0,u.lF)({...p.query,renderingRule:y,f:"json"}),f=(0,u.jV)(m,r);e=p.path;const g=h||await(0,i.A)(e,f).then(e=>e.data),v=g.hasRasterAttributeTable?(0,i.A)(`${e}/rasterAttributeTable`,f):null,w=g.hasColormap?(0,i.A)(`${e}/colormap`,f):null,b=g.hasHistograms?(0,i.A)(`${e}/histograms`,f):null,R=g.currentVersion>=10.3?(0,i.A)(`${e}/keyProperties`,f):null,S=g.hasMultidimensions?(0,i.A)(`${e}/multidimensionalInfo`,f):null,C=g.currentVersion>=10.81?(0,i.A)(`${e}/statistics`,f):null,A=await Promise.allSettled([v,w,b,R,S,C]),O=s.A.fromJSON(g.extent),I=Math.ceil(O.width/g.pixelSizeX-.1),M=Math.ceil(O.height/g.pixelSizeY-.1),_=a.A.fromJSON(g.spatialReference||g.extent.spatialReference),F="fulfilled"===A[0].status?A[0].value?.data:null,P=F?.features?.length?c.A.fromJSON(F):null,x="fulfilled"===A[1].status?A[1].value?.data.colormap:null,N=x?.length?x:null,T="fulfilled"===A[2].status?A[2].value?.data.histograms:null,J=T?.[0]?.counts?.length?T:null,Z="fulfilled"===A[3].status?A[3].value?.data??{}:{},j="fulfilled"===A[4].status?A[4].value?.data.multidimensionalInfo:null,D=j?.variables?.length?j:null;D&&D.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let V=null;const k="fulfilled"===A[5].status?A[5].value?.data.statistics:null;if(k&&k.length===g.bandCount)V=k.map(e=>({avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum}));else if(g.minValues&&g.minValues.length===g.bandCount){V=[];for(let e=0;e<g.minValues.length;e++)V.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const{defaultVariable:L,serviceDataType:E}=g;L&&L!==Z.DefaultVariable&&(Z.DefaultVariable=L),E?.includes("esriImageServiceDataTypeVector")&&!E.includes(Z.DataType)&&(Z.DataType=E.replace("esriImageServiceDataType",""));let H=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some(e=>e!==H)&&(H=g.noDataValues);const W=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:_}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(I,M))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:I,height:M,bandCount:g.bandCount,extent:s.A.fromJSON(g.extent),spatialReference:_,pixelSize:new n.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:_}),pixelType:g.pixelType.toLowerCase(),statistics:V,attributeTable:P,colormap:N,histograms:J,keyProperties:Z,noDataValue:H,multidimensionalInfo:D,storageInfo:W})}function d(e,t,r){return p(e,{sourceJSON:t},r)}function h(e,t,r){return p(e,{rasterFunction:t},r)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},2272(e,t,r){r.d(t,{Dl:()=>u,gf:()=>p,jV:()=>l,lF:()=>c});var i=r(92602),s=r(70333),n=r(4718),a=r(84952),o=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,a.An)(e):(0,n.o8)(e)}function c(e,t,r){const i={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))i[s]=n.map(e=>c(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r?.[s]);i[s]=t?e:JSON.stringify(e)}else i[s]=t?n:JSON.stringify(n);else i[s]=n}return i}async function p(e,t,n){const a=function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(a)return a;!s.id&&i.A.request.useIdentity&&await Promise.all([r.e(7632),r.e(1144),r.e(148)]).then(r.bind(r,50148));const l=await s.id.getCredential(e,n);return l?.token}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[124,9036],{69397(e,t,r){r.d(t,{Qf:()=>o,Qh:()=>n,lM:()=>s});var i=r(34275);function s(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function n(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=c;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?n(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+p:Array.isArray(t)?l(t,16):0:0),0)}function l(e,t){return c+e.length*t}const u=32,c=16,p=145},5359(e,t,r){r.d(t,{Z:()=>s});const i=Symbol("isImageryTileGraphicOrigin");function s(e){return!!e&&i in e}r.d(t,["H",0,i])},90124(e,t,r){r.r(t),r.d(t,{default:()=>K});var i,s=r(5482),n=r(37838),a=r(69540),o=r(49186),l=r(53966),u=r(97768),c=r(25728),p=r(17676),d=r(36708),h=r(91429),y=r(56507),m=r(60950),f=r(89808),g=r(99959),v=r(5359);class w extends g.A{get[(i=v.H,m.ym)](){return this.layer}get[f.Q](){return this.layer}constructor(e){super(),this[i]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var b=r(4146),R=r(18768),S=r(63074),C=r(69208),A=r(34287),O=r(8303),I=r(72545),M=r(56551),_=r(54310),F=r(25036),P=r(82935),x=r(82806),N=r(7548),T=r(23636),J=r(1003),Z=r(99235),j=r(10873),D=r(20437),V=r(74797),k=r(22796),L=r(69409);const E={instance:null,refCount:0,connectionPromise:null};async function H(){if(E.refCount++,E.instance)return E.instance;if(!E.connectionPromise){const e=new L.A;E.connectionPromise=e.initialize().then(()=>{E.instance=e})}return await E.connectionPromise,E.instance}function W(){E.refCount--,E.refCount>0||(E.instance?.destroy(),E.instance=null,E.connectionPromise=null,E.refCount=0)}var $=r(87045),z=r(24212),q=r(30291),B=r(88625),U=r(59923);let G=class extends((0,S.dM)((0,F.j)((0,A.q)((0,O.A)((0,M.H)((0,C.d)((0,x.b)((0,I.G)((0,P.e)((0,R.b)((0,_.J)((0,c.M)((0,a.OU)(b.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new w(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,p.sg)(async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(9838).then(r.bind(r,59838));switch(e){case 0:return s(this,t);case 1:return n(this,i,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(p.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=(0,u.xt)(this._releaseWorkerHandle)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,V.rZ)("Pixel Value"),(0,V.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,r=t?.attributeTable;if(r){const t=(0,V.jC)(r);e.push(...t)}const i=t?.dataType,s=t?.multidimensionalInfo;if(("vector-magdir"===i||"vector-uv"===i)&&null!=s){const t=s.variables[0].unit?.trim(),r=(0,V.DV)(t),i=(0,V.y6)();e.push(r,i)}if(s){const t=(0,V.AL)(s);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,r=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==V.F_.rawServicePixelValue)),i=(0,q.tn)({fields:t,title:this.title},{...e,visibleFieldNames:r}),{rasterInfo:s}=this.raster;return i?.fieldInfos&&s&&(0,V.h4)(i.fieldInfos,s),i}async generateRasterInfo(e,t){const r=(0,y.PZ)(k.A,e);if(await this.load(),!r||"none"===r.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:e}=await this._openFunctionRaster(r,t);return e}catch(e){if(e instanceof o.A)throw e;throw new o.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){const e=this._primaryRasters[0]??this.raster,t="RasterTileServer"===e?.datasetFormat,r=!!this.sourceJSON?.exportTilesAllowed,i=this.sourceJSON?.datasetFormat?.toLowerCase(),s=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&"Raster"===e?.tileType&&("cache/jpegplus"===i||"cache/jpegpng"===i);return t&&r&&("Map"===e?.tileType||s)}supportsWrite(){const e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):((0,U.U4)(t,this),null)}async hasDataChanged(){try{const e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:r}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set("serviceRasterInfo",e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),r&&this.read(r,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,N.qg)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:r,source:i}=this;if(!t&&!i)throw new o.A("imagery-tile-layer:open","missing url or source parameter");i?await this._openFromSource(i,e):r?await this._openFromUrlWithRasterFunction(t,r,e):await this._openFromUrl(t,e)}const r=this.raster.rasterInfo;if(!r)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?r:this._primaryRasters[0].rasterInfo),this._set("spatialReference",r.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,d.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,N.pb)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,r){const i=[e];let s;t&&(0,Z.UD)(t.toJSON(),i),i.some(e=>Q(e))&&(s=await H(),this._releaseWorkerHandle={remove:()=>W()});const n=await Promise.all(i.map(e=>J.default.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:s,signal:r}))),a=n.findIndex(e=>null==e);if(a>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${i[a]}`);return this._primaryRasters=n,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let r;Q(e)&&(r=await H(),this._releaseWorkerHandle={remove:()=>W()});const i=await J.default.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:r,signal:t});if(null==i)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const r="the tiled imagery data source is not supported",i="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!i)throw new o.A("imagery-tile-layer:open",r);"MEMORY"===i&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const s=await J.default.open({url:"",source:e,datasetFormat:i,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==s)throw new o.A("imagery-tile-layer:open",r);this._primaryRasters=[s],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=s}async _openFunctionRaster(e,t){const r={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>r[e.url]=e);const i=(0,Z.vt)(e.functionDefinition?.toJSON()??e.toJSON(),r),s=new T.A({rasterFunction:i});return await s.open(t),s}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&l.A.getLogger(this).error("imagery-tile-layer:open",e.message),l.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,z.XF)(l.A.getLogger(this),(0,z.$7)("ImageryTile layers","relative-to-scene",e)),(0,z.XF)(l.A.getLogger(this),(0,z.tW)("ImageryTile layers",e))}};(0,s.Cg)([(0,h.MZ)({clonable:!1})],G.prototype,"_primaryRasters",void 0),(0,s.Cg)([(0,h.MZ)({clonable:!1})],G.prototype,"_releaseWorkerHandle",void 0),(0,s.Cg)([(0,h.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],G.prototype,"charts",void 0),(0,s.Cg)([(0,h.MZ)({type:B.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],G.prototype,"elevationInfo",null),(0,s.Cg)([(0,h.MZ)({type:$.A})],G.prototype,"tileInfo",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],G.prototype,"graphicOrigin",void 0),(0,s.Cg)([(0,h.MZ)(j.fV)],G.prototype,"legendEnabled",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],G.prototype,"isReference",void 0),(0,s.Cg)([(0,h.MZ)({type:["show","hide"]})],G.prototype,"listMode",void 0),(0,s.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],G.prototype,"blendMode",void 0),(0,s.Cg)([(0,h.MZ)({type:k.A,json:{name:"renderingRule",write:!0}})],G.prototype,"rasterFunction",void 0),(0,s.Cg)([(0,h.MZ)()],G.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],G.prototype,"version",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],G.prototype,"type",void 0),(0,s.Cg)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],G.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],G.prototype,"popupEnabled",void 0),(0,s.Cg)([(0,h.MZ)({type:n.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],G.prototype,"popupTemplate",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0})],G.prototype,"defaultPopupTemplate",null),(0,s.Cg)([(0,h.MZ)(j.PY)],G.prototype,"screenSizePerspectiveEnabled",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,type:[D.A]})],G.prototype,"fields",void 0),(0,s.Cg)([(0,h.MZ)({readOnly:!0,type:[D.A]})],G.prototype,"rasterFields",null),(0,s.Cg)([(0,h.MZ)({constructOnly:!0})],G.prototype,"source",void 0),G=(0,s.Cg)([(0,h.$K)("esri.layers.ImageryTileLayer")],G);const K=G;function Q(e){return/\.(jpe?g|png)$/i.test(e)}},18768(e,t,r){var i=r(5482),s=r(53966),n=r(91429),a=r(60694);r.d(t,["b",0,e=>{const t=e;let r=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Jf)(e,s.A.getLogger(this)))}};return(0,i.Cg)([(0,n.MZ)()],r.prototype,"title",null),(0,i.Cg)([(0,n.MZ)({type:String})],r.prototype,"url",null),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.ArcGISService")],r),r}])},56551(e,t,r){r.d(t,{H:()=>p});var i=r(5482),s=r(91429),n=r(69540),a=r(25482),o=r(56507),l=r(94359),u=r(93223);let c=class extends((0,n.OU)(a.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"name",void 0),(0,i.Cg)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],c.prototype,"method",void 0),(0,i.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"value",void 0),(0,i.Cg)([(0,s.MZ)({type:[o.jz],json:{write:{isRequired:!0}}})],c.prototype,"bandIds",void 0),(0,i.Cg)([(0,s.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],c.prototype,"renderer",void 0),c=(0,i.Cg)([(0,s.$K)("esri.renderers.support.RasterPresetRenderer")],c);const p=e=>{const t=e;let r=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,i.Cg)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],r.prototype,"activePresetRendererName",void 0),(0,i.Cg)([(0,s.MZ)({type:[c],json:{name:"layerDefinition.presetRenderers",write:!0}})],r.prototype,"presetRenderers",void 0),r=(0,i.Cg)([(0,s.$K)("esri.layers.mixins.RasterPresetRendererMixin")],r),r}},82371(e,t,r){r.d(t,{E9:()=>y,Tw:()=>d,X6:()=>h});var i=r(11254),s=r(5443),n=r(86738),a=r(16930),o=r(87186),l=r(20223),u=r(2272),c=r(22671);async function p(e,t,r){const p=(0,u.Dl)(e),{rasterFunction:d,sourceJSON:h}=t||{},y=d?JSON.stringify(d.rasterFunctionDefinition||d):null,m=(0,u.lF)({...p.query,renderingRule:y,f:"json"}),f=(0,u.jV)(m,r);e=p.path;const g=h||await(0,i.A)(e,f).then(e=>e.data),v=g.hasRasterAttributeTable?(0,i.A)(`${e}/rasterAttributeTable`,f):null,w=g.hasColormap?(0,i.A)(`${e}/colormap`,f):null,b=g.hasHistograms?(0,i.A)(`${e}/histograms`,f):null,R=g.currentVersion>=10.3?(0,i.A)(`${e}/keyProperties`,f):null,S=g.hasMultidimensions?(0,i.A)(`${e}/multidimensionalInfo`,f):null,C=g.currentVersion>=10.81?(0,i.A)(`${e}/statistics`,f):null,A=await Promise.allSettled([v,w,b,R,S,C]),O=s.A.fromJSON(g.extent),I=Math.ceil(O.width/g.pixelSizeX-.1),M=Math.ceil(O.height/g.pixelSizeY-.1),_=a.A.fromJSON(g.spatialReference||g.extent.spatialReference),F="fulfilled"===A[0].status?A[0].value?.data:null,P=F?.features?.length?c.A.fromJSON(F):null,x="fulfilled"===A[1].status?A[1].value?.data.colormap:null,N=x?.length?x:null,T="fulfilled"===A[2].status?A[2].value?.data.histograms:null,J=T?.[0]?.counts?.length?T:null,Z="fulfilled"===A[3].status?A[3].value?.data??{}:{},j="fulfilled"===A[4].status?A[4].value?.data.multidimensionalInfo:null,D=j?.variables?.length?j:null;D&&D.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});let V=null;const k="fulfilled"===A[5].status?A[5].value?.data.statistics:null;if(k&&k.length===g.bandCount)V=k.map(e=>({avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum}));else if(g.minValues&&g.minValues.length===g.bandCount){V=[];for(let e=0;e<g.minValues.length;e++)V.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const{defaultVariable:L,serviceDataType:E}=g;L&&L!==Z.DefaultVariable&&(Z.DefaultVariable=L),E?.includes("esriImageServiceDataTypeVector")&&!E.includes(Z.DataType)&&(Z.DataType=E.replace("esriImageServiceDataType",""));let H=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some(e=>e!==H)&&(H=g.noDataValues);const W=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:_}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(I,M))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:I,height:M,bandCount:g.bandCount,extent:s.A.fromJSON(g.extent),spatialReference:_,pixelSize:new n.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:_}),pixelType:g.pixelType.toLowerCase(),statistics:V,attributeTable:P,colormap:N,histograms:J,keyProperties:Z,noDataValue:H,multidimensionalInfo:D,storageInfo:W})}function d(e,t,r){return p(e,{sourceJSON:t},r)}function h(e,t,r){return p(e,{rasterFunction:t},r)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},2272(e,t,r){r.d(t,{Dl:()=>u,gf:()=>p,jV:()=>l,lF:()=>c});var i=r(92602),s=r(70333),n=r(4718),a=r(84952),o=r(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,a.An)(e):(0,n.o8)(e)}function c(e,t,r){const i={};for(const s in e){if("declaredClass"===s)continue;const n=e[s];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))i[s]=n.map(e=>c(e));else if("object"==typeof n)if(n.toJSON){const e=n.toJSON(r?.[s]);i[s]=t?e:JSON.stringify(e)}else i[s]=t?n:JSON.stringify(n);else i[s]=n}return i}async function p(e,t,n){const a=function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t);if(a)return a;!s.id&&i.A.request.useIdentity&&await Promise.all([r.e(7632),r.e(6162),r.e(148)]).then(r.bind(r,50148));const l=await s.id.getCredential(e,n);return l?.token}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{2741(e,t,r){r.d(t,{s:()=>i});var s=r(92602),n=(r(11254),r(49186)),o=r(53966),a=r(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},97159(e,t,r){r.d(t,{a:()=>g,c:()=>f,e:()=>y,f:()=>a,i:()=>p,p:()=>m,r:()=>l,t:()=>i,w:()=>u});var s=r(70333),n=r(84952),o=r(39131);function a(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,n.s2)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,n.V1)(e,t.portalItem.itemUrl);null!=r&&r.startsWith(d)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=w(e,t?.portal))&&c.test(e)?g(e):e}function i(e,t,r=0){if(null==(e=e&&c.test(e)?v(e):e))return e;!(0,n.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const o=w(r,t.portal),a=w(s,t.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=y(s,t?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),t?.resources&&t?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&0===r&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,t,r){return a(e,r)}function u(e,t,r,s){const n=i(e,s);void 0!==n&&(t[r]=n)}const c=/\/items\/([^/]+)\/resources\/(.*)/,d="./resources/";function p(e){const t=e?.match(c)??null;return t?.[1]??null}const h=/http.+\/items\/[^/]+/i;function f(e){const t=e&&c.test(e)?e.match(h):null;return t?.[0]??null}function m(e){const t=e?.match(c)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,n.xw)(r);return{prefix:null,filename:e,extension:t}}const{path:o,extension:a}=(0,n.xw)(r.slice(s+1));return{prefix:r.slice(0,s),filename:o,extension:a}}function y(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,n.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function w(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${r}`)?(0,n.T1)(e,t.portalHostname,r):(0,n.T1)(e,r,t.portalHostname)}function g(e){if(!e)return e||null;let t=e;return t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function v(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t)),t}const q=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:y,fromCDNUrl:v,fromJSON:a,itemIdFromResourceUrl:p,itemUrlFromResourceUrl:f,prefixAndFilenameFromResourceUrl:m,read:l,toCDNUrl:g,toJSON:i,write:u},Symbol.toStringTag,{value:"Module"}));r.d(t,["b",0,q])},91869(e,t,r){function s(e,t){for(const r of e.values())if(t(r))return!0;return!1}function n(e,t,r){const s=e.get(t);if(void 0!==s)return s;const n=r();return e.set(t,n),n}function o(e){const t=new Map;return r=>(t.has(r)||t.set(r,e(r)),t.get(r))}r.d(t,{Bj:()=>o,Bs:()=>s,tE:()=>n})},60694(e,t,r){r.d(t,{Fi:()=>d,HZ:()=>q,Jf:()=>v,LS:()=>b,Wo:()=>w,bd:()=>S,cr:()=>f,iz:()=>h,qg:()=>p,uV:()=>g,yG:()=>m});var s=r(84952),n=r(39131),o=r(97159);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},i=Object.values(a),l=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(?<serviceTitle>.+?)\\/(?<serverType>${i.join("|")})(?:\\/exts\\/(?<soeTitle>.+?)\\/(?<soeServerType>${i.join("|")}))?)(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),u=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/(?<serviceTitle>[^/\\n]+)\\/(?<serverType>${i.join("|")}))(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return l.test(e)}function p(e){if(null==e)return null;const t=(0,s.An)(e),r=t?.path.match(l)||t?.path.match(u);if(!r)return null;const{path:n,serviceTitle:o,serverType:i,soeTitle:c,soeServerType:d,sublayer:p}=r.groups??{},h=c||o,m=h.indexOf("/");return{title:f(-1!==m?h.slice(m+1):h),serverType:a[(d||i).toLowerCase()],sublayer:null!=p&&""!==p?parseInt(p,10):null,url:{path:n}}}function h(e){const t=(0,s.An)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const r=[];if(e){const t=p(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}const y=["services","features","tiles","elevation3d","basemaps3d"];function w(e){let t=(0,s.$z)(e,!0);return!!t&&(t=t.toLowerCase(),!!t.endsWith(".arcgis.com")&&(!!y.some(e=>t.startsWith(e))||/^[a-z\d-]+\.svcs[a-z\d-]*\./.test(t)))}function g(e){return(0,n.$E)(e)&&function(e){const t=(0,s.$z)(e);return!!t&&t.toLowerCase().endsWith(".arcgis.com")}(e)}function v(e,t){return e?(0,s.UC)((0,s.zi)(e,t)):e}function q(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.zi)(t,e.logger);const r=(0,s.An)(t),n=p(r.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=h(r.path);null!=e&&(t=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(t),layerId:o}}function b(e,t,r,n,a){(0,o.w)(t,n,"url",a),n.url&&null!=e.layerId&&(n.url=(0,s.fj)(n.url,r,e.layerId.toString()))}function S(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),s=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),o=t.includes("/wmsserver");return r&&(s||n||o)}},11254(e,t,r){r.d(t,{A:()=>w});var s=r(92602),n=r(49186),o=r(44208),a=r(17676),i=r(84952),l=r(56152),u=r(65592),c=r(91869),d=r(60694);async function p(e){const t=function(e){let t,r=!1;return"string"==typeof e?(t=(0,i.$z)(e,!0),r=(0,d.Wo)(e)):(t=e.origin,r=(0,d.Wo)(e.toString())),null==t?null:new y(t,r)}(e.parameters.url);if(!t)return null;const{QueueProcessor:s,SharedConcurrency:n}=await r.e(563).then(r.bind(r,563));return(0,c.tE)(h,t.origin,()=>{const e=(t.isHosted?(0,o.A)("request-queue-concurrency-hosted"):(0,o.A)("request-queue-concurrency-non-hosted"))??4;return f??=new n((0,o.A)("request-queue-concurrency-global")??50),new s({concurrency:e,sharedConcurrency:f,process:e=>{if((0,a.G4)(e.parameters.requestOptions))throw(0,u.YB)("",(0,a.NK)("Request canceled"),e.parameters);return(0,u.zc)(e)}})})}const h=new Map;let f,m;class y{constructor(e,t){this.origin=e,this.isHosted=t}}async function w(e,t){e instanceof URL&&(e=e.toString());const s=(0,i.DB)(e),n=(0,i.w8)(e);n||s||(e=(0,i.S8)(e));const c={url:e,requestOptions:{...t}};t?.query&&(c.requestOptions.query=t?.query instanceof URLSearchParams?(0,i.zf)(t.query.toString().replaceAll("+"," ")):t?.query);const d=e=>({data:e,getAllHeaders:v,getHeader:v,httpStatus:200,requestOptions:c.requestOptions,url:c.url}),h=(0,i.sC)(e,g.internalInterceptors);if(h){const e=await q(h,c);if(null!=e)return d(e)}let f=(0,i.sC)(e);if(f){const e=await q(f,c);if(null!=e)return d(e);f.after||f.error||(f=null)}if(e=c.url,"image"===(t=c.requestOptions).responseType&&((0,o.A)("host-webworker")||(0,o.A)("host-node")))throw(0,u.YB)("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),c);if("head"===t.method){if(t.body)throw(0,u.YB)("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),c);if(s||n)throw(0,u.YB)("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),c)}if(await async function(){(0,o.A)("host-webworker")&&(!m&&globalThis.invokeStaticMessage?m=await r.e(369).then(r.bind(r,40369)):l.i.isForeignWorker=!0)}(),m)return m.execute(e,t);const y=new AbortController,w=(0,a.u7)(t,()=>y.abort()),b={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:f,parameters:c,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=t.useQueue?async function(e){const t=await p(e);return t?t.push(e):(0,u.zc)(e)}(b):(0,u.zc)(b),T=await S.finally(()=>w?.remove());return f?.after?.(T),T}const g=s.A.request,v=()=>null;async function q(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 r,s;try{s=await e.before(t)}catch(e){r=(0,u.YB)("request:interceptor",e,t)}if((s instanceof Error||s instanceof n.A)&&(r=(0,u.YB)("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}},56152(e,t,r){r.d(t,["i",0,{corsServers:["https://server.arcgisonline.com","https://services.arcgisonline.com"],beforeFetch:void 0,afterFetch:void 0,isForeignWorker:!1}])},95117(e,t,r){r.d(t,{y:()=>n});var s=r(17676);function n(e,t,r=!1,n){return new Promise((o,a)=>{if((0,s.G4)(n))return void a((0,s.NK)());let i=()=>{c(),a(new Error(`Unable to load ${t}`))},l=async()=>{const t=e;try{await t.decode()}catch{}c(),o(t)},u=()=>{if(!e)return;const t=e;c(),t.src="",a((0,s.NK)())};const c=()=>{e&&(e.removeEventListener("error",i),e.removeEventListener("load",l),i=null,l=null,e=null,n?.removeEventListener("abort",u),u=null,r&&URL.revokeObjectURL(t))};n?.addEventListener("abort",u),e.addEventListener("error",i),e.addEventListener("load",l)})}},65592(e,t,r){r.d(t,{YB:()=>x,c8:()=>$,zc:()=>b});var s=r(92602),n=r(70333),o=r(49186),a=r(44208),i=r(4718),l=r(17676),u=r(84952),c=r(39131),d=r(56152),p=r(95117),h=r(60694);const f=new Map;function m(e,t){const r=t?.preferredHost;if(!r||(0,u.FX)(e,`https://${r}`,!0))return;const s=(0,h.qg)(e);if(!s||"FeatureServer"!==s.serverType||(0,c.$E)(e))return;const n=s.url.path.toLowerCase();f.has(n)||f.set(n,r)}function y(e){const t=(0,h.qg)(e)?.url.path.toLowerCase();if(!t)return e;const r=f.get(t);return r?(0,u.hf)(e,r):e}const w="FormData"in globalThis,g=new Set([499,498,403,401]),v=new Set(["COM_0056","COM_0057","SB_0008"]),q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function b(e){let t,o;await async function(e){const t=e.parameters.url,o=e.parameters.requestOptions,a=e.controller.signal,i=o.body;let u=null,c=null;if(w&&"HTMLFormElement"in globalThis&&(i instanceof FormData?u=i:i instanceof HTMLFormElement&&(u=new FormData(i))),"string"==typeof i&&(c=i),e.fetchOptions={cache:o.cacheMode??(o.cacheBust?"no-cache":"default"),credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??s.A.request.priority,redirect:"follow",signal:a},(u||c)&&(e.fetchOptions.body=u||c),(d.i.isForeignWorker||"anonymous"===o.authMode)&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||o.query?.token||u?.get("token")),!e.hasToken){const{getApiKey:s,getSessionToken:n}=await r.e(926).then(r.bind(r,926)),a=await n(t)??s(t);a&&(o.query??={},o.query.token=a,e.hasToken=!0)}if(e.useIdentity&&!e.hasToken&&!e.credential&&!e.credentialToken&&!O(t)&&!(0,l.G4)(a)){let r;"immediate"===o.authMode?(await A(),r=await n.id.getCredential(t,{signal:a})):"no-prompt"===o.authMode?(await A(),r=await n.id.getCredential(t,{prompt:!1,signal:a}).catch(()=>{})):n.id&&(r=n.id.findCredential(t)),r&&(e.credential=r,e.credentialToken=r.token,e.useSSL=!!r.ssl)}}(e);try{do{[t,o]=await S(e)}while(!await L(e,t,o))}catch(r){const s=x("request:server",r,e.parameters,t);throw s.details.ssl=e.useSSL,e.interceptor?.error?.(s),s}const a=e.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!e.hasToken&&!e.credentialToken&&o.user?.username&&!(0,u.FL)(a)){const e=(0,u.$z)(a,!0);e&&s.A.request.trustedServers.push(e)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&function(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const t=s.A.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,u.$z)(r)??""]=0:(t[(0,u.$z)("http://"+r)??""]=0,t[(0,u.$z)("https://"+r)??""]=0)}(o.authorizedCrossOriginNoCorsDomains)}else"json"===(e.parameters.requestOptions.responseType||"json")&&m(a,o);const i=e.credential;if(i&&n.id){const e=n.id.findServerInfo(i.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=n.id.findCredential(t,i.userId);e&&-1===n.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:o,getAllHeaders:t?()=>Array.from(t.headers):E,getHeader:t?e=>t.headers.get(e):E,httpStatus:t?.status??200,requestOptions:e.parameters.requestOptions,ssl:e.useSSL,url:e.parameters.url}}async function S(e){let t=e.parameters.url,r=y(t);const o=e.parameters.requestOptions,i=e.fetchOptions??{},p=(0,u.w8)(t)||(0,u.DB)(t),h=o.responseType??"json",f=p?0:null!=o.timeout?o.timeout:s.A.request.timeout;let m=!1;if(!p){e.useSSL&&(t=(0,u.lM)(t));let l={...o.query};e.credentialToken&&(l.token=e.credentialToken);let d=(0,u.x0)(l);(0,a.A)("esri-url-encodes-apostrophe")&&(d=d.replaceAll("'","%27"));const p=r.length+1+d.length;let h;m="delete"===o.method||"post"===o.method||"put"===o.method||!!o.body||p>s.A.request.maxUrlLength;const f=o.useProxy||!!(0,u.zs)(t);if(f){const e=(0,u.s_)(t);h=e.path,!m&&h.length+1+p>s.A.request.maxUrlLength&&(m=!0),e.query&&(l={...e.query,...l})}if("HEAD"===i.method&&(m||f)){if(m){if(p>s.A.request.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.parameters);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.parameters)}if(f)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.parameters)}if(m?(i.method="delete"===o.method?"DELETE":"put"===o.method?"PUT":"POST",o.body?t=(0,u.a6)(t,l):(i.body=(0,u.x0)(l),i.headers||(i.headers={}),i.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,u.a6)(t,l),f&&(e.useProxy=!0,t=`${h}?${t}`),l.token&&w&&i.body instanceof FormData&&!(0,c.$E)(t)&&i.body.set("token",l.token),o.hasOwnProperty("withCredentials"))e.withCredentials=o.withCredentials;else if(!(0,u.FX)(t,(0,u.Xq)()))if((0,u.FL)(t))e.withCredentials=!0;else if(n.id){const r=n.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(i.credentials="include",function(e){const t=s.A.request.crossOriginNoCorsDomains;if(t){let r=(0,u.$z)(e);if(r)return r=r.toLowerCase(),!(0,u.FX)(r,(0,u.Xq)())&&t[r]<Date.now()-36e5}return!1}(t)&&await async function(e){const t=(0,u.An)(e);e=t.path,"json"===t.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const r=s.A.request.crossOriginNoCorsDomains,n=(0,u.$z)(e);r&&n&&(r[n.toLowerCase()]=Date.now())}(m?(0,u.a6)(t,l):t)),r=y(t)}let g,v,q=0,b=!1;f>0&&(q=setTimeout(()=>{b=!0,e.controller.abort()},f));try{if("native-request-init"===o.responseType)v=i,v.url=r,o.signal?v.signal=o.signal:delete v.signal;else if("image"!==o.responseType||"default"!==i.cache||i.keepalive||"GET"!==i.method||m||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(o.headers)||!p&&!e.useProxy&&s.A.request.proxyUrl&&!C(t)){if(await(d.i.beforeFetch?.(t,i)),g=await fetch(r,i),await(d.i.afterFetch?.(g)),e.useProxy||function(e){const t=(0,u.$z)(e);t&&!d.i.corsServers.includes(t)&&d.i.corsServers.push(t)}(t),"native"===o.responseType)v=g;else if("HEAD"!==i.method)if(g.ok){switch(h){case"array-buffer":v=await g.arrayBuffer();break;case"blob":case"image":v=await g.blob();break;default:v=await g.text()}if(q&&(clearTimeout(q),q=0),"json"===h||"xml"===h||"document"===h)if(v)switch(h){case"json":v=JSON.parse(v);break;case"xml":v=k(v,"application/xml");break;case"document":v=k(v,"text/html")}else v=null;if(v){if(("array-buffer"===h||"blob"===h)&&v["blob"===h?"size":"byteLength"]<=750)try{const e=await new Response(v).json();e.error&&(v=e)}catch{}"image"===h&&v instanceof Blob&&(v=await T(URL.createObjectURL(v),e,!0))}}else{v=await g.text();try{v=JSON.parse(v)}catch{}}}else v=await T(r,e)}catch(r){if("AbortError"===r.name){if(b)throw new Error(P);throw(0,l.NK)("Request canceled")}if(!(!g&&r instanceof TypeError&&s.A.request.proxyUrl)||o.body||"delete"===o.method||"head"===o.method||"post"===o.method||"put"===o.method||e.useProxy||C(t))throw r;e.redoRequest=!0,(0,u.oy)({proxyUrl:s.A.request.proxyUrl,urlPrefix:(0,u.$z)(t)??""})}finally{q&&clearTimeout(q)}return[g,v]}function T(e,t,r=!1){const n=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=s.A.request.priority,o.src=e,(0,p.y)(o,e,r,n)}function C(e){const t=(0,u.$z)(e);return!t||t.endsWith(".arcgis.com")||d.i.corsServers.includes(t)||(0,u.FL)(t)}async function A(){n.id||await Promise.all([r.e(7632),r.e(6408),r.e(1144),r.e(6977),r.e(148),r.e(8094)]).then(r.bind(r,50148))}function O(e){return q.some(t=>t.test(e))}function k(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function L(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.parameters.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(r&&(r.error&&"object"==typeof r.error?o=r.error:"error"===r.status&&Array.isArray(r.messages)&&(o={...r},o[U]=r,o.details=r.messages)),!o&&!t.ok)throw o=new Error(`Unable to load ${t.url} status: ${t.status}`),o[U]=r,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const u=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&g.has(a)&&!O(e.parameters.url)&&(403!==a||(!i||!v.has(i))&&(null==l||2===l&&e.credentialToken))){await A();try{const t=await n.id.getCredential(e.parameters.url,{error:x("request:server",o,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,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"===u)return e.credential=void 0,e.credentialToken=void 0,!1;o=t}}if(o)throw o;return!0}function x(e,t,r,s){let n;const a={url:r.url,requestOptions:r.requestOptions,getAllHeaders:E,getHeader:E,ssl:!1};if(t instanceof o.A)return t.details?(t.details=(0,i.o8)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(()=>Array.from(s.headers)),r=s&&(e=>s.headers.get(e)),o=s?.status,i=t.message;i&&(n=i),e&&r&&(a.getAllHeaders=e,a.getHeader=r),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||o||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?(a.messages=[t.details],n??=t.details):(a.messages=t.details,n??=a.messages?.[0]),a.raw=U in t?t[U]:t}return n??="Error",(0,l.zf)(t)?(0,l.NK)():new o.A(e,n,a)}const U=Symbol(),E=()=>null,P="Timeout exceeded";function $(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===P}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{2741(e,t,r){r.d(t,{s:()=>i});var s=r(92602),n=(r(11254),r(49186)),o=r(53966),a=r(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},97159(e,t,r){r.d(t,{a:()=>g,c:()=>f,e:()=>y,f:()=>a,i:()=>p,p:()=>m,r:()=>l,t:()=>i,w:()=>u});var s=r(70333),n=r(84952),o=r(39131);function a(e,t){const r=t?.url?.path;if(e&&r&&(e=(0,n.s2)(e,r,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const r=(0,n.V1)(e,t.portalItem.itemUrl);null!=r&&r.startsWith(d)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(r).path)}return(e=w(e,t?.portal))&&c.test(e)?g(e):e}function i(e,t,r=0){if(null==(e=e&&c.test(e)?v(e):e))return e;!(0,n.oP)(e)&&t?.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(t){const r=t.verifyItemRelativeUrls?.rootPath||t.url?.path;if(r){const o=w(r,t.portal),a=w(s,t.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=y(s,t?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),t?.resources&&t?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&0===r&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,t,r){return a(e,r)}function u(e,t,r,s){const n=i(e,s);void 0!==n&&(t[r]=n)}const c=/\/items\/([^/]+)\/resources\/(.*)/,d="./resources/";function p(e){const t=e?.match(c)??null;return t?.[1]??null}const h=/http.+\/items\/[^/]+/i;function f(e){const t=e&&c.test(e)?e.match(h):null;return t?.[0]??null}function m(e){const t=e?.match(c)??null;if(null==t)return null;const r=t[2],s=r.lastIndexOf("/");if(-1===s){const{path:e,extension:t}=(0,n.xw)(r);return{prefix:null,filename:e,extension:t}}const{path:o,extension:a}=(0,n.xw)(r.slice(s+1));return{prefix:r.slice(0,s),filename:o,extension:a}}function y(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,n.T1)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function w(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const r=`${t.urlKey}.${t.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${r}`)?(0,n.T1)(e,t.portalHostname,r):(0,n.T1)(e,r,t.portalHostname)}function g(e){if(!e)return e||null;let t=e;return t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t),t=t.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),t=t.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),t=t.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),t}function v(e){if(!e)return e||null;let t=e;return t=t.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),t=t.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),t=t.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),t&&s.id&&!s.id.findCredential(t)&&(t=(0,o.qG)(t)),t}const q=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:y,fromCDNUrl:v,fromJSON:a,itemIdFromResourceUrl:p,itemUrlFromResourceUrl:f,prefixAndFilenameFromResourceUrl:m,read:l,toCDNUrl:g,toJSON:i,write:u},Symbol.toStringTag,{value:"Module"}));r.d(t,["b",0,q])},91869(e,t,r){function s(e,t){for(const r of e.values())if(t(r))return!0;return!1}function n(e,t,r){const s=e.get(t);if(void 0!==s)return s;const n=r();return e.set(t,n),n}function o(e){const t=new Map;return r=>(t.has(r)||t.set(r,e(r)),t.get(r))}r.d(t,{Bj:()=>o,Bs:()=>s,tE:()=>n})},60694(e,t,r){r.d(t,{Fi:()=>d,HZ:()=>q,Jf:()=>v,LS:()=>b,Wo:()=>w,bd:()=>S,cr:()=>f,iz:()=>h,qg:()=>p,uV:()=>g,yG:()=>m});var s=r(84952),n=r(39131),o=r(97159);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},i=Object.values(a),l=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(?<serviceTitle>.+?)\\/(?<serverType>${i.join("|")})(?:\\/exts\\/(?<soeTitle>.+?)\\/(?<soeServerType>${i.join("|")}))?)(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),u=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/(?<serviceTitle>[^/\\n]+)\\/(?<serverType>${i.join("|")}))(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return l.test(e)}function p(e){if(null==e)return null;const t=(0,s.An)(e),r=t?.path.match(l)||t?.path.match(u);if(!r)return null;const{path:n,serviceTitle:o,serverType:i,soeTitle:c,soeServerType:d,sublayer:p}=r.groups??{},h=c||o,m=h.indexOf("/");return{title:f(-1!==m?h.slice(m+1):h),serverType:a[(d||i).toLowerCase()],sublayer:null!=p&&""!==p?parseInt(p,10):null,url:{path:n}}}function h(e){const t=(0,s.An)(e).path.match(c);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function f(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,t){const r=[];if(e){const t=p(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=f(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}const y=["services","features","tiles","elevation3d","basemaps3d"];function w(e){let t=(0,s.$z)(e,!0);return!!t&&(t=t.toLowerCase(),!!t.endsWith(".arcgis.com")&&(!!y.some(e=>t.startsWith(e))||/^[a-z\d-]+\.svcs[a-z\d-]*\./.test(t)))}function g(e){return(0,n.$E)(e)&&function(e){const t=(0,s.$z)(e);return!!t&&t.toLowerCase().endsWith(".arcgis.com")}(e)}function v(e,t){return e?(0,s.UC)((0,s.zi)(e,t)):e}function q(e){let{url:t}=e;if(!t)return{url:t};t=(0,s.zi)(t,e.logger);const r=(0,s.An)(t),n=p(r.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=h(r.path);null!=e&&(t=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(t),layerId:o}}function b(e,t,r,n,a){(0,o.w)(t,n,"url",a),n.url&&null!=e.layerId&&(n.url=(0,s.fj)(n.url,r,e.layerId.toString()))}function S(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),s=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),o=t.includes("/wmsserver");return r&&(s||n||o)}},11254(e,t,r){r.d(t,{A:()=>w});var s=r(92602),n=r(49186),o=r(44208),a=r(17676),i=r(84952),l=r(56152),u=r(65592),c=r(91869),d=r(60694);async function p(e){const t=function(e){let t,r=!1;return"string"==typeof e?(t=(0,i.$z)(e,!0),r=(0,d.Wo)(e)):(t=e.origin,r=(0,d.Wo)(e.toString())),null==t?null:new y(t,r)}(e.parameters.url);if(!t)return null;const{QueueProcessor:s,SharedConcurrency:n}=await r.e(563).then(r.bind(r,563));return(0,c.tE)(h,t.origin,()=>{const e=(t.isHosted?(0,o.A)("request-queue-concurrency-hosted"):(0,o.A)("request-queue-concurrency-non-hosted"))??4;return f??=new n((0,o.A)("request-queue-concurrency-global")??50),new s({concurrency:e,sharedConcurrency:f,process:e=>{if((0,a.G4)(e.parameters.requestOptions))throw(0,u.YB)("",(0,a.NK)("Request canceled"),e.parameters);return(0,u.zc)(e)}})})}const h=new Map;let f,m;class y{constructor(e,t){this.origin=e,this.isHosted=t}}async function w(e,t){e instanceof URL&&(e=e.toString());const s=(0,i.DB)(e),n=(0,i.w8)(e);n||s||(e=(0,i.S8)(e));const c={url:e,requestOptions:{...t}};t?.query&&(c.requestOptions.query=t?.query instanceof URLSearchParams?(0,i.zf)(t.query.toString().replaceAll("+"," ")):t?.query);const d=e=>({data:e,getAllHeaders:v,getHeader:v,httpStatus:200,requestOptions:c.requestOptions,url:c.url}),h=(0,i.sC)(e,g.internalInterceptors);if(h){const e=await q(h,c);if(null!=e)return d(e)}let f=(0,i.sC)(e);if(f){const e=await q(f,c);if(null!=e)return d(e);f.after||f.error||(f=null)}if(e=c.url,"image"===(t=c.requestOptions).responseType&&((0,o.A)("host-webworker")||(0,o.A)("host-node")))throw(0,u.YB)("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),c);if("head"===t.method){if(t.body)throw(0,u.YB)("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),c);if(s||n)throw(0,u.YB)("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),c)}if(await async function(){(0,o.A)("host-webworker")&&(!m&&globalThis.invokeStaticMessage?m=await r.e(369).then(r.bind(r,40369)):l.i.isForeignWorker=!0)}(),m)return m.execute(e,t);const y=new AbortController,w=(0,a.u7)(t,()=>y.abort()),b={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:f,parameters:c,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=t.useQueue?async function(e){const t=await p(e);return t?t.push(e):(0,u.zc)(e)}(b):(0,u.zc)(b),T=await S.finally(()=>w?.remove());return f?.after?.(T),T}const g=s.A.request,v=()=>null;async function q(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 r,s;try{s=await e.before(t)}catch(e){r=(0,u.YB)("request:interceptor",e,t)}if((s instanceof Error||s instanceof n.A)&&(r=(0,u.YB)("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}},56152(e,t,r){r.d(t,["i",0,{corsServers:["https://server.arcgisonline.com","https://services.arcgisonline.com"],beforeFetch:void 0,afterFetch:void 0,isForeignWorker:!1}])},95117(e,t,r){r.d(t,{y:()=>n});var s=r(17676);function n(e,t,r=!1,n){return new Promise((o,a)=>{if((0,s.G4)(n))return void a((0,s.NK)());let i=()=>{c(),a(new Error(`Unable to load ${t}`))},l=async()=>{const t=e;try{await t.decode()}catch{}c(),o(t)},u=()=>{if(!e)return;const t=e;c(),t.src="",a((0,s.NK)())};const c=()=>{e&&(e.removeEventListener("error",i),e.removeEventListener("load",l),i=null,l=null,e=null,n?.removeEventListener("abort",u),u=null,r&&URL.revokeObjectURL(t))};n?.addEventListener("abort",u),e.addEventListener("error",i),e.addEventListener("load",l)})}},65592(e,t,r){r.d(t,{YB:()=>x,c8:()=>$,zc:()=>b});var s=r(92602),n=r(70333),o=r(49186),a=r(44208),i=r(4718),l=r(17676),u=r(84952),c=r(39131),d=r(56152),p=r(95117),h=r(60694);const f=new Map;function m(e,t){const r=t?.preferredHost;if(!r||(0,u.FX)(e,`https://${r}`,!0))return;const s=(0,h.qg)(e);if(!s||"FeatureServer"!==s.serverType||(0,c.$E)(e))return;const n=s.url.path.toLowerCase();f.has(n)||f.set(n,r)}function y(e){const t=(0,h.qg)(e)?.url.path.toLowerCase();if(!t)return e;const r=f.get(t);return r?(0,u.hf)(e,r):e}const w="FormData"in globalThis,g=new Set([499,498,403,401]),v=new Set(["COM_0056","COM_0057","SB_0008"]),q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function b(e){let t,o;await async function(e){const t=e.parameters.url,o=e.parameters.requestOptions,a=e.controller.signal,i=o.body;let u=null,c=null;if(w&&"HTMLFormElement"in globalThis&&(i instanceof FormData?u=i:i instanceof HTMLFormElement&&(u=new FormData(i))),"string"==typeof i&&(c=i),e.fetchOptions={cache:o.cacheMode??(o.cacheBust?"no-cache":"default"),credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??s.A.request.priority,redirect:"follow",signal:a},(u||c)&&(e.fetchOptions.body=u||c),(d.i.isForeignWorker||"anonymous"===o.authMode)&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||o.query?.token||u?.get("token")),!e.hasToken){const{getApiKey:s,getSessionToken:n}=await r.e(926).then(r.bind(r,926)),a=await n(t)??s(t);a&&(o.query??={},o.query.token=a,e.hasToken=!0)}if(e.useIdentity&&!e.hasToken&&!e.credential&&!e.credentialToken&&!O(t)&&!(0,l.G4)(a)){let r;"immediate"===o.authMode?(await A(),r=await n.id.getCredential(t,{signal:a})):"no-prompt"===o.authMode?(await A(),r=await n.id.getCredential(t,{prompt:!1,signal:a}).catch(()=>{})):n.id&&(r=n.id.findCredential(t)),r&&(e.credential=r,e.credentialToken=r.token,e.useSSL=!!r.ssl)}}(e);try{do{[t,o]=await S(e)}while(!await L(e,t,o))}catch(r){const s=x("request:server",r,e.parameters,t);throw s.details.ssl=e.useSSL,e.interceptor?.error?.(s),s}const a=e.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!e.hasToken&&!e.credentialToken&&o.user?.username&&!(0,u.FL)(a)){const e=(0,u.$z)(a,!0);e&&s.A.request.trustedServers.push(e)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&function(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const t=s.A.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,u.$z)(r)??""]=0:(t[(0,u.$z)("http://"+r)??""]=0,t[(0,u.$z)("https://"+r)??""]=0)}(o.authorizedCrossOriginNoCorsDomains)}else"json"===(e.parameters.requestOptions.responseType||"json")&&m(a,o);const i=e.credential;if(i&&n.id){const e=n.id.findServerInfo(i.server);let t=e?.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=n.id.findCredential(t,i.userId);e&&-1===n.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:o,getAllHeaders:t?()=>Array.from(t.headers):E,getHeader:t?e=>t.headers.get(e):E,httpStatus:t?.status??200,requestOptions:e.parameters.requestOptions,ssl:e.useSSL,url:e.parameters.url}}async function S(e){let t=e.parameters.url,r=y(t);const o=e.parameters.requestOptions,i=e.fetchOptions??{},p=(0,u.w8)(t)||(0,u.DB)(t),h=o.responseType??"json",f=p?0:null!=o.timeout?o.timeout:s.A.request.timeout;let m=!1;if(!p){e.useSSL&&(t=(0,u.lM)(t));let l={...o.query};e.credentialToken&&(l.token=e.credentialToken);let d=(0,u.x0)(l);(0,a.A)("esri-url-encodes-apostrophe")&&(d=d.replaceAll("'","%27"));const p=r.length+1+d.length;let h;m="delete"===o.method||"post"===o.method||"put"===o.method||!!o.body||p>s.A.request.maxUrlLength;const f=o.useProxy||!!(0,u.zs)(t);if(f){const e=(0,u.s_)(t);h=e.path,!m&&h.length+1+p>s.A.request.maxUrlLength&&(m=!0),e.query&&(l={...e.query,...l})}if("HEAD"===i.method&&(m||f)){if(m){if(p>s.A.request.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.parameters);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.parameters)}if(f)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.parameters)}if(m?(i.method="delete"===o.method?"DELETE":"put"===o.method?"PUT":"POST",o.body?t=(0,u.a6)(t,l):(i.body=(0,u.x0)(l),i.headers||(i.headers={}),i.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,u.a6)(t,l),f&&(e.useProxy=!0,t=`${h}?${t}`),l.token&&w&&i.body instanceof FormData&&!(0,c.$E)(t)&&i.body.set("token",l.token),o.hasOwnProperty("withCredentials"))e.withCredentials=o.withCredentials;else if(!(0,u.FX)(t,(0,u.Xq)()))if((0,u.FL)(t))e.withCredentials=!0;else if(n.id){const r=n.id.findServerInfo(t);r?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(i.credentials="include",function(e){const t=s.A.request.crossOriginNoCorsDomains;if(t){let r=(0,u.$z)(e);if(r)return r=r.toLowerCase(),!(0,u.FX)(r,(0,u.Xq)())&&t[r]<Date.now()-36e5}return!1}(t)&&await async function(e){const t=(0,u.An)(e);e=t.path,"json"===t.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const r=s.A.request.crossOriginNoCorsDomains,n=(0,u.$z)(e);r&&n&&(r[n.toLowerCase()]=Date.now())}(m?(0,u.a6)(t,l):t)),r=y(t)}let g,v,q=0,b=!1;f>0&&(q=setTimeout(()=>{b=!0,e.controller.abort()},f));try{if("native-request-init"===o.responseType)v=i,v.url=r,o.signal?v.signal=o.signal:delete v.signal;else if("image"!==o.responseType||"default"!==i.cache||i.keepalive||"GET"!==i.method||m||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(o.headers)||!p&&!e.useProxy&&s.A.request.proxyUrl&&!C(t)){if(await(d.i.beforeFetch?.(t,i)),g=await fetch(r,i),await(d.i.afterFetch?.(g)),e.useProxy||function(e){const t=(0,u.$z)(e);t&&!d.i.corsServers.includes(t)&&d.i.corsServers.push(t)}(t),"native"===o.responseType)v=g;else if("HEAD"!==i.method)if(g.ok){switch(h){case"array-buffer":v=await g.arrayBuffer();break;case"blob":case"image":v=await g.blob();break;default:v=await g.text()}if(q&&(clearTimeout(q),q=0),"json"===h||"xml"===h||"document"===h)if(v)switch(h){case"json":v=JSON.parse(v);break;case"xml":v=k(v,"application/xml");break;case"document":v=k(v,"text/html")}else v=null;if(v){if(("array-buffer"===h||"blob"===h)&&v["blob"===h?"size":"byteLength"]<=750)try{const e=await new Response(v).json();e.error&&(v=e)}catch{}"image"===h&&v instanceof Blob&&(v=await T(URL.createObjectURL(v),e,!0))}}else{v=await g.text();try{v=JSON.parse(v)}catch{}}}else v=await T(r,e)}catch(r){if("AbortError"===r.name){if(b)throw new Error(P);throw(0,l.NK)("Request canceled")}if(!(!g&&r instanceof TypeError&&s.A.request.proxyUrl)||o.body||"delete"===o.method||"head"===o.method||"post"===o.method||"put"===o.method||e.useProxy||C(t))throw r;e.redoRequest=!0,(0,u.oy)({proxyUrl:s.A.request.proxyUrl,urlPrefix:(0,u.$z)(t)??""})}finally{q&&clearTimeout(q)}return[g,v]}function T(e,t,r=!1){const n=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=s.A.request.priority,o.src=e,(0,p.y)(o,e,r,n)}function C(e){const t=(0,u.$z)(e);return!t||t.endsWith(".arcgis.com")||d.i.corsServers.includes(t)||(0,u.FL)(t)}async function A(){n.id||await Promise.all([r.e(7632),r.e(6408),r.e(6162),r.e(6977),r.e(148),r.e(8094)]).then(r.bind(r,50148))}function O(e){return q.some(t=>t.test(e))}function k(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function L(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.parameters.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(r&&(r.error&&"object"==typeof r.error?o=r.error:"error"===r.status&&Array.isArray(r.messages)&&(o={...r},o[U]=r,o.details=r.messages)),!o&&!t.ok)throw o=new Error(`Unable to load ${t.url} status: ${t.status}`),o[U]=r,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const u=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&g.has(a)&&!O(e.parameters.url)&&(403!==a||(!i||!v.has(i))&&(null==l||2===l&&e.credentialToken))){await A();try{const t=await n.id.getCredential(e.parameters.url,{error:x("request:server",o,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,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"===u)return e.credential=void 0,e.credentialToken=void 0,!1;o=t}}if(o)throw o;return!0}function x(e,t,r,s){let n;const a={url:r.url,requestOptions:r.requestOptions,getAllHeaders:E,getHeader:E,ssl:!1};if(t instanceof o.A)return t.details?(t.details=(0,i.o8)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(()=>Array.from(s.headers)),r=s&&(e=>s.headers.get(e)),o=s?.status,i=t.message;i&&(n=i),e&&r&&(a.getAllHeaders=e,a.getHeader=r),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||o||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?(a.messages=[t.details],n??=t.details):(a.messages=t.details,n??=a.messages?.[0]),a.raw=U in t?t[U]:t}return n??="Error",(0,l.zf)(t)?(0,l.NK)():new o.A(e,n,a)}const U=Symbol(),E=()=>null,P="Timeout exceeded";function $(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===P}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see 2b0558c1716425974563.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3670],{16233(t,e,i){i.d(e,{t:()=>n});var o=i(89108);function a(t){return t[t.openProp||"open"]}async function n(t){await t.updateComplete,a(t)?t.onBeforeOpen():t.onBeforeClose(),await t.updateComplete;const e=function(t){return"transitionRef"in t}(t)?t.transitionRef.value:t.transitionEl;e&&await(0,o.q)(e,t.transitionProp),a(t)?t.onOpen():t.onClose()}},24521(t,e,i){i.d(e,{i:()=>n});const o="calcite-action",a={button:t=>`${o}-${t}-button`,indicator:t=>`${o}-${t}-indicator`};function n(t){return"CALCITE-ACTION"===t?.tagName}i.d(e,["C",0,{button:"button",buttonTextVisible:"button--text-visible",buttonCompact:"button--compact",iconContainer:"icon-container",slotContainer:"slot-container",slotContainerHidden:"slot-container--hidden",textContainer:"text-container",textContainerVisible:"text-container--visible",indicatorWithIcon:"indicator-with-icon",indicatorWithoutIcon:"indicator-without-icon"},"I",0,a])},36522(t,e,i){i(22289),i(14795);var o=i(7924),a=i(46913),n=i(1715),c=i(19313),r=i(5576),l=i(45975),s=i(77383),d=i(52035),h=i(94176),u=i(83807),p=i(7115),b=i(32313),g=i(24521);const v=a.AH`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]){--calcite-internal-action-font-size: var(--calcite-font-size--2);--calcite-internal-action-min-height: var(--calcite-size-sm);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-font-size: var(--calcite-font-size--1);--calcite-internal-action-min-height: var(--calcite-size-md);--calcite-internal-action-line-height: 1rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-font-size: var(--calcite-font-size-0);--calcite-internal-action-min-height: var(--calcite-size-lg);--calcite-internal-action-line-height: 1.25rem;--calcite-internal-action-spacing: var(--calcite-spacing-sm-plus)}:host{display:flex;cursor:pointer;background-color:transparent;--calcite-internal-action-text-color: var(--calcite-color-text-3);border-radius:var(--calcite-action-corner-radius, var(--calcite-action-corner-radius-start-start, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-start-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-end, var(--calcite-corner-radius-xs)) var(--calcite-action-corner-radius-end-start, var(--calcite-corner-radius-xs)))}.interaction-container{border-radius:inherit}:host([width=full]){flex:1 0 auto}:host([width=full]) .button{justify-content:center}:host([width=full]) .button .text-container--visible{flex:none}:host([drag-handle]){cursor:move;--calcite-internal-action-text-color: var(--calcite-color-border-input);--calcite-internal-action-padding-inline: var(--calcite-spacing-xxs)}.button{position:relative;margin:0;display:flex;inline-size:auto;align-items:center;justify-content:flex-start;border-style:none;outline-color:transparent;box-sizing:border-box;background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1));border-radius:inherit;color:var(--calcite-action-text-color, var(--calcite-internal-action-text-color));cursor:inherit;flex:1 0 auto;font-family:inherit;font-size:var(--calcite-internal-action-font-size);font-weight:var(--calcite-font-weight-normal);line-height:var(--calcite-internal-action-line-height);min-block-size:var(--calcite-internal-action-height, var(--calcite-internal-action-min-height));max-block-size:var(--calcite-internal-action-height, none);padding-block:var(--calcite-internal-action-padding-block, var(--calcite-internal-action-spacing));padding-inline:var(--calcite-internal-action-padding-inline, var(--calcite-internal-action-spacing));text-align:start}.button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}.button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}.button--text-visible{gap:var(--calcite-internal-action-spacing);inline-size:100%}.icon-container{pointer-events:none;margin:0;display:flex;align-items:center;justify-content:center}.text-container{margin:0;inline-size:0px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;opacity:0;transition-property:opacity;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:inline-size}.text-container--visible{inline-size:auto;flex:1 1 auto;opacity:1}:host([active]) .button{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-3));color:var(--calcite-action-text-color-press, var(--calcite-action-text-color-pressed, var(--calcite-color-text-1)))}:host([active]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-foreground-3))}:host([active]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-foreground-3)))}:host([loading]) .button:hover,:host([loading]) .button:focus{background-color:var(--calcite-action-background-color, var(--calcite-color-foreground-1))}:host([loading]) calcite-loader[inline]{margin-inline-end:0px;--calcite-loader-progress-color-inline: var(--calcite-action-loader-color)}:host([appearance=transparent]):host([active]) .button{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([appearance=transparent]) .button{transition-property:box-shadow;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);background-color:var(--calcite-action-background-color, var(--calcite-color-transparent))}:host([appearance=transparent]) .button:hover{background-color:var(--calcite-action-background-color-hover, var(--calcite-color-transparent-hover))}:host([appearance=transparent]) .button:active{background-color:var(--calcite-action-background-color-press, var(--calcite-action-background-color-pressed, var(--calcite-color-transparent-press)))}:host([selection-appearance=highlight]):host([active]) .button{background-color:var(--calcite-color-surface-highlight);color:var(--calcite-color-text-highlight)}:host([active-descendant]) .button{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([alignment=center]) .button{justify-content:center}:host([alignment=end]) .button{justify-content:flex-end}:host([alignment=center]) .button .text-container--visible,:host([alignment=end]) .button .text-container--visible{flex:0 1 auto}:host([scale=s][compact]) .button,:host([scale=m][compact]) .button,:host([scale=l][compact]) .button{padding-inline:0px}.slot-container{display:flex}.slot-container--hidden{display:none}.indicator-with-icon{position:relative}.indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}.indicator-without-icon{margin-inline:.25rem;inline-size:1rem;position:relative}.indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.275rem;inset-inline-end:-.275rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand))}:host([scale=s]) .indicator-with-icon{position:relative}:host([scale=s]) .indicator-with-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.125rem;inset-inline-end:-.125rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([scale=s]) .indicator-without-icon{position:relative}:host([scale=s]) .indicator-without-icon:after{content:"";position:absolute;block-size:.5rem;inline-size:.5rem;border-radius:9999px;inset-block-end:-.175rem;inset-inline-end:-.175rem;background-color:var(--calcite-action-indicator-color, var(--calcite-color-brand));block-size:.375rem;inline-size:.375rem}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,f=a.AH`.screen-reader-text{position:absolute;inline-size:1px;block-size:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}`;class m extends r.WF{constructor(){super(...arguments),this.guid=(0,l.g)(),this.buttonRef=(0,c._)(),this.buttonId=g.I.button(this.guid),this.mutationObserver=(0,s.c)("mutation",()=>this.requestUpdate()),this.messages=(0,h.u)({blocking:!0}),this.focusSetter=(0,u.u)()(this),this.indicatorRef=(0,c._)(),this.interactiveContainer=(0,p.u)(this),this.formTrigger=(0,b.u)()(this),this.labelElRef=(0,c._)(),this.active=!1,this.activeDescendant=!1,this.appearance="transparent",this.compact=!1,this.disabled=!1,this.dragHandle=!1,this.iconFlipRtl=!1,this.indicator=!1,this.loading=!1,this.overflowDisabled=!1,this.scale="m",this.width="auto",this.textEnabled=!1,this.type="button"}static{this.properties={aria:[0,{},{attribute:!1}],active:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],alignment:[3,{},{reflect:!0}],appearance:[3,{},{reflect:!0}],compact:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],dragHandle:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],indicator:[7,{},{reflect:!0,type:Boolean}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overflowDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}],type:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.formAssociated=!0}static{this.styles=[v,f]}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}getAccessibleLabel(){const t=this.label||this.text||"";return this.indicator?this.messages.indicatorLabel.replace("{label}",t):t}getLabelledByElements(){const t=[...this.labelElRef.value?[this.labelElRef.value]:[],...this.aria?.labelledByElements??[]];return t.length?t:void 0}renderTextContainer(){const{text:t,textEnabled:e}=this,i={[g.C.textContainer]:!0,[g.C.textContainerVisible]:e};return t?(0,n.D)("text-container",a.qy`<div aria-hidden=true class=${(0,r.CP)(i)}>${t}</div>`):null}renderIndicatorText(){const{indicator:t,messages:e,buttonId:i}=this;return a.qy`<div aria-labelledby=${i??r.s6} aria-live=polite class=${(0,r.CP)(o.C.screenReaderText)} role=region ${(0,c.K)(this.indicatorRef)}>${t?e.indicator:null}</div>`}renderIconContainer(){const{loading:t,icon:e,scale:i,el:o,iconFlipRtl:c,indicator:l}=this,s="l"===i?"l":"m",h=t?a.qy`<calcite-loader inline .label=${this.messages.loading} .scale=${s}></calcite-loader>`:null,u=e?a.qy`<calcite-icon class=${(0,r.CP)({[g.C.indicatorWithIcon]:l})} .flipRtl=${c} .icon=${e} .scale=${(0,d.g)(this.scale)}></calcite-icon>`:null,p=h||u,b=p||o.children?.length,v=a.qy`<div class=${(0,r.CP)({[g.C.slotContainer]:!0,[g.C.slotContainerHidden]:t})}><slot></slot></div>`;return b?(0,n.D)("icon-container",a.qy`<div aria-hidden=true class=${(0,r.CP)(g.C.iconContainer)}>${p}${v}</div>`):null}renderLabel(){const t=this.getAccessibleLabel();return t?a.qy`<span class=${(0,r.CP)(o.C.screenReaderText)} ${(0,c.K)(this.labelElRef)}>${t}</span>`:null}renderButton(){const{compact:t,disabled:e,icon:i,loading:o,textEnabled:l,indicator:s,indicatorRef:d,buttonId:h}=this,u=this.getLabelledByElements(),p={[g.C.button]:!0,[g.C.buttonTextVisible]:l,[g.C.buttonCompact]:t},b=a.qy`${this.renderIconContainer()}${this.renderTextContainer()}${!i&&s&&(0,n.D)("indicator-no-icon",a.qy`<div class=${(0,r.CP)(g.C.indicatorWithoutIcon)}></div>`)||""}${this.renderLabel()}`,v=s&&d.value?[d.value]:[],f=[...this.aria?.controlsElements??[],...v];return this.dragHandle?a.qy`<span .ariaBusy=${o} .ariaControlsElements=${f} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${u} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,r.CP)(p)} id=${h??r.s6} role=button tabindex=${(this.disabled?void 0:0)??r.s6} ${(0,c.K)(this.buttonRef)}>${b}</span>`:a.qy`<button .ariaBusy=${o} .ariaChecked=${this.aria?.checked} .ariaControlsElements=${f} .ariaDescribedByElements=${this.aria?.describedByElements} .ariaExpanded=${this.aria?.expanded} .ariaHasPopup=${this.aria?.hasPopup} .ariaLabelledByElements=${u} .ariaOwnsElements=${this.aria?.ownsElements} .ariaPressed=${this.aria?.pressed} class=${(0,r.CP)(p)} .disabled=${e} id=${h??r.s6} .role=${this.aria?.role} type=${this.type??r.s6} ${(0,c.K)(this.buttonRef)}>${b}</button>`}render(){return this.interactiveContainer({disabled:this.disabled,children:a.qy`${this.renderButton()}${this.renderIndicatorText()}`})}}(0,o.c)("calcite-action",m)},33670(t,e,i){i.r(e),i.d(e,{Notice:()=>g}),i(36522),i(14795);var o=i(7924),a=i(46913),n=i(19313),c=i(5576),r=i(10225),l=i(89108);const s={danger:"exclamationMarkTriangleF",info:"informationF",success:"checkCircleF",warning:"exclamationMarkTriangleF"};var d=i(16233),h=i(52035),u=i(94176),p=i(83807);const b=a.AH`:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) ::slotted(calcite-link){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .notice-close{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=l]) .actions-end{margin-inline-end:var(--calcite-spacing-sm);gap:var(--calcite-spacing-sm)}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-radius:var(--calcite-notice-corner-radius, var(--calcite-corner-radius-sm));box-shadow:var(--calcite-notice-shadow, var(--calcite-shadow-none))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;overflow:visible}@starting-style{:host([open]) .container{opacity:0;max-block-size:0}}:host([open][appearance=outline-fill]) .container{border:var(--calcite-border-width-sm) solid}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=title]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=title]){color:var(--calcite-notice-title-text-color, var(--calcite-color-text-inverse))}:host(:not([kind=neutral])[appearance=solid]) .container slot[name=message]::slotted(*),:host(:not([kind=neutral])[appearance=solid]) .container *::slotted([slot=message]){color:var(--calcite-notice-content-text-color, var(--calcite-color-text-inverse))}.notice-content{box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-large)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;padding-inline:var(--calcite-notice-spacing-token-small)}.notice-close{box-sizing:border-box;display:flex;cursor:pointer;align-items:center;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);--calcite-action-background-color: var(--calcite-notice-close-background-color);--calcite-action-background-color-hover: var( --calcite-notice-close-background-color-hover, var(--calcite-notice-close-background-color-focus) );--calcite-action-background-color-press: var(--calcite-notice-close-background-color-press);--calcite-action-text-color: var(--calcite-notice-close-icon-color, var(--calcite-color-text-3));--calcite-action-text-color-press: var(--calcite-notice-close-icon-color-hover)}.actions-end{display:flex;align-items:center;flex:0 0 auto;margin-inline-end:var(--calcite-spacing-xs);gap:var(--calcite-spacing-xs)}:host([kind=brand][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-brand) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-brand) 5%, var(--calcite-color-foreground-1)))}:host([kind=brand][appearance=outline-fill]) .notice-icon,:host([kind=brand][appearance=transparent]) .notice-icon{color:var(--calcite-color-brand)}:host([kind=info][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-info) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-info) 5%, var(--calcite-color-foreground-1)))}:host([kind=info][appearance=outline-fill]) .notice-icon,:host([kind=info][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-danger) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-danger) 5%, var(--calcite-color-foreground-1)))}:host([kind=danger][appearance=outline-fill]) .notice-icon,:host([kind=danger][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-success) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-success) 5%, var(--calcite-color-foreground-1)))}:host([kind=success][appearance=outline-fill]) .notice-icon,:host([kind=success][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning][appearance=outline-fill]) .container{border-color:var(--calcite-notice-border-color, rgb(from var(--calcite-color-status-warning) r g b/var(--calcite-opacity-half)));background-color:var(--calcite-notice-background-color, color-mix(in srgb, var(--calcite-color-status-warning) 5%, var(--calcite-color-foreground-1)))}:host([kind=warning][appearance=outline-fill]) .notice-icon,:host([kind=warning][appearance=transparent]) .notice-icon{color:var(--calcite-color-status-warning)}:host([kind=neutral][appearance=outline-fill]) .container{border-color:var(--calcite-color-border-2);background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}:host([kind=neutral]) .notice-icon{color:var(--calcite-color-text-3)}:host([appearance=transparent]) .container{background-color:transparent}:host([hidden]){display:none}[hidden]{display:none}`;class g extends c.WF{constructor(){super(...arguments),this.closeButtonRef=(0,n._)(),this.transitionProp="opacity",this.transitionRef=(0,n._)(),this.messages=(0,u.u)(),this.focusSetter=(0,p.u)()(this),this.hasActionEnd=!1,this.appearance="outline-fill",this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=(0,r.c)({cancelable:!1}),this.calciteNoticeBeforeOpen=(0,r.c)({cancelable:!1}),this.calciteNoticeClose=(0,r.c)({cancelable:!1}),this.calciteNoticeOpen=(0,r.c)({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:c.pf},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(t){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,t)}async load(){this.kindIcons={...s,brand:"lightbulb"},this.requestedIcon=(0,l.e)(this.kindIcons,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||!1!==this.open)&&(0,d.t)(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||"brand"!==this.kind))&&(this.requestedIcon=(0,l.e)(this.kindIcons,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(t){this.hasActionEnd=(0,l.s)(t)}render(){const t=a.qy`<calcite-action class=${(0,c.CP)("notice-close")} icon=x @click=${this.close} .scale=${this.scale} .text=${this.messages.close} ${(0,n.K)(this.closeButtonRef)}></calcite-action>`;return a.qy`<div class=${(0,c.CP)("container")} ${(0,n.K)(this.transitionRef)}>${this.requestedIcon?a.qy`<div class=${(0,c.CP)("notice-icon")}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${(0,h.g)(this.scale)}></calcite-icon></div>`:null}<div class=${(0,c.CP)("notice-content")}><slot name=${"title"}></slot><slot name=${"message"}></slot><slot name=${"link"}></slot></div><div class=${(0,c.CP)("actions-end")} .hidden=${!this.hasActionEnd}><slot name=${"actions-end"} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}}(0,o.c)("calcite-notice",g)},1715(t,e,i){i.d(e,{D:()=>c});var o=i(60496),a=i(43356),n=i(38632);const c=(0,a.u$)(class extends a.WL{constructor(){super(...arguments),this.key=o.s6}render(t,e){return this.key=t,e}update(t,[e,i]){return e!==this.key&&((0,n.mY)(t),this.key=e),i}})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2387],{69052(e,t,n){n.d(t,{hr:()=>o});var r=n(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return s(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return s(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function s(e,t,n,r,o=0,s=!1){return(r-=o)<t?r+=i(e,t-r):r>n&&(r-=i(e,r-n)),s&&r===n&&(r=t),r+o}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const a=new o(0,2*Math.PI),l=(new o(-Math.PI,Math.PI),new o(0,360));n.d(t,["ie",0,l,"uC",0,a])},93146(e,t,n){n.d(t,{z:()=>o});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function o(e){return new r(async()=>{const t=await e();return!1===t.isLoaded?.()&&await t.load(),t})}},52039(e,t,n){n.d(t,{O7:()=>f,el:()=>l});var r=n(69052),o=(n(49186),n(17676)),s=(n(5443),n(39829),n(82799),n(16930)),i=n(93146),a=(n(80754),n(21325));async function l(e,t,n){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(n=t);let r=null;for(const t of e)r??=t?.spatialReference;if(!r)return e;const s=(0,a.Vp)(r);if(!s)return e;const[i,l]=s.valid;let f=!1;for(const t of e){if(!t)continue;if("point"===t.type){f||=t.x>=l,f||=t.x<=i;continue}const{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=l,f||=e.xmin<=i,f||=e.xmax>=l,f||=e.xmax<=i}if(!f)return e;const[{foldInto360Range:p},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),c.getImportPromise()]),n),y=m.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=m.fromGeometry(e),n=m.toGeometry(p(t,y),r);return"extent"===e.type&&1===n?.rings.length?n.extent:n})}const u=(0,i.z)(()=>n.e(4144).then(n.bind(n,4144))),c=(0,i.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(5756),n.e(3299),n.e(1550)]).then(n.bind(n,78125)));function f(e,t,n){const r=(0,a.Vp)(n);if(null==r)return e;const[o,s]=r.valid,i=2*s;let l=0,u=0;t>s?l=Math.ceil(Math.abs(t-s)/i):t<o&&(l=-Math.ceil(Math.abs(t-o)/i)),e>s?u=Math.ceil(Math.abs(e-s)/i):e<o&&(u=-Math.ceil(Math.abs(e-o)/i));let c=e+(l-u)*i;const f=c-t;return f>s?c-=i:f<o&&(c+=i),c}function p(e){const t=(0,a.Vp)(e);if(null==t)return null;const[n,o]=t.valid;return new r.hr(n,o)}const m=p(s.A.WGS84);p(s.A.WebMercator),n.d(t,["Y_",0,m])},80754(e,t,n){n.d(t,{kS:()=>u,kd:()=>l});var r=n(82799),o=n(16930),s=n(60408),i=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,i.Ed)(e))for(const n of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,i.aO)(e)){const[n,r]=e.c;n[0]+=t,r[0]+=t;continue}if((0,i.FG)(e)){const[n,r]=e.a;n[0]+=t,r[0]+=t;continue}if((0,i.n1)(e)){const[n,r,o]=e.b;n[0]+=t,r[0]+=t,o[0]+=t;continue}e[0]+=t}for(const n of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(const e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},41653(e,t,n){n.r(t),n.d(t,{queryModel:()=>g,queryModels:()=>d});var r=n(11254),o=n(4576),s=n(49186),i=n(91869),a=n(84952),l=n(5482),u=n(69622),c=n(91429);let f=class extends u.A{constructor(e){super(e),this.name="",this.size=0}arrayBuffer(e){return this.loadArrayBuffer(e)}};(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"flags",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"loadArrayBuffer",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"name",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"size",void 0),f=(0,l.Cg)([(0,c.$K)("esri.layers.scene.ModelFileInfo")],f);let p=class extends u.A{constructor(e){super(e),this.files=[],this.format="",this.isSource=!1,this.name="",this.size=0}};(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"files",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"format",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"isSource",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"name",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"size",void 0),p=(0,l.Cg)([(0,c.$K)("esri.layers.scene.ModelInfo")],p);var m=n(20557),y=n(99199),h=n(97552);async function d(e,t,n,r){const l=e.infoFor3D;if(!l)throw new s.A("scenelayer:query-models-not-available","Model queries are not available without 3D object metadata",{layer:e});const{objectIdField:u,globalIdField:c}=t;if(!u||!c)throw new s.A("scenelayer:query-models-not-available","Missing required fields for model queries",{layer:e});const f=function(e,t,n,r){const o=function(e,t){const n=h.A.from(t)?.clone()??e.createQuery();return n.outFields=null,n.formatOf3DObjects=null,n.returnGeometry=!1,n}(e,t);return o.outFields=[n,r],o.returnGeometry=!1,o}(e,n,u,c),p=await t.queryFeatures(f,r);return await async function(e){const{infoFor3D:t,associatedLayer:n,options:r}=e,s=n.globalIdField,l=n.parsedUrl;if(!s||!l)return new Map;const u=await async function(e){const{options:t,infoFor3D:n,featureInfos:r}=e,s=[...r.keys()];if(t?.requestedFormat){const e=(0,m.fE)(t.requestedFormat,n.supportedFormats);return e?[{formatId:e,objectIds:s}]:[]}const l=(0,o.Am)([...n.queryFormats,...n.editFormats]);return await async function({options:e,infoFor3D:t,featureInfos:n,requestQuery:r,associatedLayer:s},l){const u=t.assetMapFieldRoles.parentGlobalId,c=t.assetMapFieldRoles.assetType,f=t.assetMapFieldRoles.flags,p=new Map;for(const[e,{globalId:t}]of n)t&&p.set(e,t);const d=(0,o.Am)(p.values()),g=(0,m.JZ)(t);if(!g||!d.length)return[];const w=(0,a.fj)(s.parsedUrl?.path??"",`../${g.id}`),M=!!e?.sourceOnly,b=new h.A({where:`${u} IN (${d.map(x).join(",")})`,outFields:M?[u,c,f]:[u,c],returnDistinctValues:!0,returnGeometry:!1}),{features:F}=await(0,y.s)(w,b,{query:r,signal:e?.signal}),A=new Set(l),v=new Map;for(const e of F){const t=e.getAttribute(u),n=e.getAttribute(c),r=e.getAttribute(f)??0;n&&A.has(n)&&t&&!(1&r)&&(0,i.tE)(v,t,()=>new Set).add(n)}const q=new Map;for(const[e,t]of p)for(const n of v.get(t)??[])(0,i.tE)(q,n,()=>[]).push(e);return l.map(e=>({formatId:e,objectIds:q.get(e)??[]})).filter(({objectIds:e})=>e.length>0)}(e,l)}(e),c=new Map,f=await Promise.all(u.map(async({formatId:o,objectIds:i})=>{const a=(0,m.be)(o,t.supportedFormats),l=n.parsedUrl;if(null==a||!l||!i.length)return null;const u=(0,m._h)(o,t.supportedFormats),c=(0,m.qv)(u),f=n.createQuery();return f.objectIds=i,f.outFields=[s],f.formatOf3DObjects=o,f.returnGeometry=!0,{modelFormat:a,modelFileExtensions:c,featureSetJSON:await(0,y.e)(l.path,f,{query:e.requestQuery,signal:r?.signal},{uniqueIdFields:n.uniqueIdFields})}}));for(const t of f)t&&w(e,t.modelFormat,t.modelFileExtensions,t.featureSetJSON,c);return c}(new A(e,t,function(e){const t=new Map;for(const n of e.features){const e=n.getObjectId(),r=n.getGlobalId();null!=e&&null!=r&&t.set(e,{globalId:r})}return t}(p),l,r))}async function g(e,t,n,r){const o=r?.format;return((await d(e,t,{objectIds:[n]},{...r,requestedFormat:o,sourceOnly:null==o})).get(n)??[]).find(e=>o&&e.format===o||!o&&e.isSource)}function w({featureInfos:e,requestQuery:t,infoFor3D:n},r,o,s,a){const l=new Map;for(const e of s.assetMaps??[])(0,i.tE)(l,e.parentGlobalId,()=>[]).push(e);for(const[s,u]of e){const e=l.get(u.globalId);if(!e?.length)continue;const c=M(e,t,n);if(!c.length)continue;const f=c.reduce((e,t)=>e+t.size,0),m=F(c,o),y=!m.flags.includes("DERIVED");(0,i.tE)(a,s,()=>[]).push(new p({name:m.name,size:f,format:r,isSource:y,files:c}))}}function M(e,t,n){const r=new Map,o=({assetType:e})=>null!=(0,m.be)(e,n.supportedFormats),s=e.some(e=>o(e)&&!e.flags.includes("DERIVED"));for(const t of e)s&&o(t)&&t.flags.includes("DERIVED")||(0,i.tE)(r,t.assetName,()=>[]).push(t);const a=[];for(const[e,n]of r){n.sort((e,t)=>e.seqNo-t.seqNo);const r=n.reduce((e,t)=>e+t.size,0),o=n.map(({assetURL:e})=>e).filter(e=>!!e);o.length&&a.push(new f({name:e,size:r,flags:n[0].flags,loadArrayBuffer:e=>b(o,t,e)}))}return a}async function b(e,t,n){const o=await Promise.all(e.map(e=>(0,r.A)(e,{responseType:"array-buffer",query:t,signal:n?.signal}).then(({data:e})=>e)));return 1===o.length?o[0]:function(e){const t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(new Uint8Array(t),r),r+=t.byteLength;return n.buffer}(o)}function F(e,t){return e.find(({name:e})=>t.some(t=>e.toLowerCase().endsWith(`.${t}`)))??e[0]}function x(e){return`'${e.replaceAll("'","''")}'`}class A{constructor(e,t,n,r,o){this.layer=e,this.associatedLayer=t,this.featureInfos=n,this.infoFor3D=r,this.options=o,this.requestQuery={...t.parsedUrl?.query,...e.customParameters,...e.apiKey?{token:e.apiKey}:{}}}}},99199(e,t,n){n.d(t,{e:()=>l,s:()=>a});var r=n(2272),o=n(80893),s=n(22671),i=n(97552);async function a(e,t,n,r){const o=await l(e,t,n,r);return s.A.fromJSON(o)}function l(e,t,n,s){const a=(0,r.Dl)(e),l={...n},u=i.A.from(t);return(0,o.eW)(a,u,u.sourceSpatialReference,l,s)}},22671(e,t,n){n.d(t,{A:()=>w});var r,o=n(5482),s=n(52106),i=n(66552),a=n(25482),l=n(4718),u=n(91429),c=n(16930),f=n(60408),p=n(65864),m=n(50498),y=n(20437),h=n(36005),d=n(43937);const g=new i.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=r=class extends a.o{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){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,p.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=c.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,l.o8)({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 n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((o-e)/n));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,o],scale:[s,i]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const u=this._getHydrationFunction(e,e=>e*s+r,e=>o-e*i,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,n){const r=c.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],i=n.fromJSON(s),a=s.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=s.aggregateGeometries,u=i.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}o.push(i)}return o}_quantizePoints(e,t,n){let r,o;const s=[];for(let i=0,a=e.length;i<a;i++){const a=e[i];if(i>0){const e=t(a[0]),i=n(a[1]);e===r&&i===o||(s.push([e-r,i-o]),r=e,o=i)}else r=t(a[0]),o=n(a[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],i=this._quantizePoints(s,t,n);i&&o.push(i)}return o.length>0?((0,f.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let i,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(i+=o[0],a+=o[1]):(i=o[0],a=o[1]),o[0]=t(i),o[1]=n(a)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=o(n[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(i+=r[0],a+=r[1]):(i=r[0],a=r[1]),r[0]=t(i),r[1]=n(a)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],w.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o.Cg)([(0,d.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o.Cg)([(0,d.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=r=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},2272(e,t,n){n.d(t,{Dl:()=>u,gf:()=>f,jV:()=>l,lF:()=>c});var r=n(92602),o=n(70333),s=n(4718),i=n(84952),a=n(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,i.An)(e):(0,s.o8)(e)}function c(e,t,n){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map(e=>c(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}async function f(e,t,s){const i=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??o.id?.findCredential(e)?.token:null}(e,t);if(i)return i;!o.id&&r.A.request.useIdentity&&await Promise.all([n.e(7632),n.e(1144),n.e(148)]).then(n.bind(n,50148));const l=await o.id.getCredential(e,s);return l?.token}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2387],{69052(e,t,n){n.d(t,{hr:()=>o});var r=n(34727);class o{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,n=!1){return s(this.range,this.min,this.max,e,t,n)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,n){return e<t?t:t+i(this.range,e-t,n)}minimalMonotonic(e,t,n){return s(this.range,e,e+this.range,t,n)}center(e,t,n){return t=this.monotonic(e,t,n),this.normalize((e+t)/2,n)}diff(e,t,n){return this.monotonic(e,t,n)-e}shortestSignedDiff(e,t){e=this.normalize(e);const n=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(n)<Math.abs(r)?n:r}contains(e,t,n){return t=this.minimalMonotonic(e,t),(n=this.minimalMonotonic(e,n))>e&&n<t}}function s(e,t,n,r,o=0,s=!1){return(r-=o)<t?r+=i(e,t-r):r>n&&(r-=i(e,r-n)),s&&r===n&&(r=t),r+o}function i(e,t,n=0){return Math.ceil((t-n)/e)*e+n}const a=new o(0,2*Math.PI),l=(new o(-Math.PI,Math.PI),new o(0,360));n.d(t,["ie",0,l,"uC",0,a])},93146(e,t,n){n.d(t,{z:()=>o});class r{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return null==this._promise&&(this._promise=this._import().then(async e=>(this.module=e,e))),this._promise}}function o(e){return new r(async()=>{const t=await e();return!1===t.isLoaded?.()&&await t.load(),t})}},52039(e,t,n){n.d(t,{O7:()=>f,el:()=>l});var r=n(69052),o=(n(49186),n(17676)),s=(n(5443),n(39829),n(82799),n(16930)),i=n(93146),a=(n(80754),n(21325));async function l(e,t,n){Array.isArray(e)||(e=[e]),null!=t&&"object"==typeof t&&"authMode"in t&&(n=t);let r=null;for(const t of e)r??=t?.spatialReference;if(!r)return e;const s=(0,a.Vp)(r);if(!s)return e;const[i,l]=s.valid;let f=!1;for(const t of e){if(!t)continue;if("point"===t.type){f||=t.x>=l,f||=t.x<=i;continue}const{extent:e}=t;if(null==e){f=!0;break}f||=e.xmin>=l,f||=e.xmin<=i,f||=e.xmax>=l,f||=e.xmax<=i}if(!f)return e;const[{foldInto360Range:p},m]=await(0,o.qr)(Promise.all([u.getImportPromise(),c.getImportPromise()]),n),y=m.fromSpatialReference(r);return e.map(e=>{if(null==e||"mesh"===e.type)return e;const t=m.fromGeometry(e),n=m.toGeometry(p(t,y),r);return"extent"===e.type&&1===n?.rings.length?n.extent:n})}const u=(0,i.z)(()=>n.e(4144).then(n.bind(n,4144))),c=(0,i.z)(()=>Promise.all([n.e(9187),n.e(8885),n.e(5756),n.e(3299),n.e(1550)]).then(n.bind(n,78125)));function f(e,t,n){const r=(0,a.Vp)(n);if(null==r)return e;const[o,s]=r.valid,i=2*s;let l=0,u=0;t>s?l=Math.ceil(Math.abs(t-s)/i):t<o&&(l=-Math.ceil(Math.abs(t-o)/i)),e>s?u=Math.ceil(Math.abs(e-s)/i):e<o&&(u=-Math.ceil(Math.abs(e-o)/i));let c=e+(l-u)*i;const f=c-t;return f>s?c-=i:f<o&&(c+=i),c}function p(e){const t=(0,a.Vp)(e);if(null==t)return null;const[n,o]=t.valid;return new r.hr(n,o)}const m=p(s.A.WGS84);p(s.A.WebMercator),n.d(t,["Y_",0,m])},80754(e,t,n){n.d(t,{kS:()=>u,kd:()=>l});var r=n(82799),o=n(16930),s=n(60408),i=n(52006);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:o.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:o.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:o.A.WGS84})}};function l(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){if((0,i.Ed)(e))for(const n of function(e){return(0,s.Bi)(e)?e.curveRings:e.curvePaths}(e))for(const e of n){if((0,i.aO)(e)){const[n,r]=e.c;n[0]+=t,r[0]+=t;continue}if((0,i.FG)(e)){const[n,r]=e.a;n[0]+=t,r[0]+=t;continue}if((0,i.n1)(e)){const[n,r,o]=e.b;n[0]+=t,r[0]+=t,o[0]+=t;continue}e[0]+=t}for(const n of function(e){return(0,s.Bi)(e)?e.rings:e.paths}(e))for(const e of n)e[0]+=t;return e}n.d(t,["j7",0,a])},41653(e,t,n){n.r(t),n.d(t,{queryModel:()=>g,queryModels:()=>d});var r=n(11254),o=n(4576),s=n(49186),i=n(91869),a=n(84952),l=n(5482),u=n(69622),c=n(91429);let f=class extends u.A{constructor(e){super(e),this.name="",this.size=0}arrayBuffer(e){return this.loadArrayBuffer(e)}};(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"flags",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"loadArrayBuffer",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"name",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],f.prototype,"size",void 0),f=(0,l.Cg)([(0,c.$K)("esri.layers.scene.ModelFileInfo")],f);let p=class extends u.A{constructor(e){super(e),this.files=[],this.format="",this.isSource=!1,this.name="",this.size=0}};(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"files",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"format",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"isSource",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"name",void 0),(0,l.Cg)([(0,c.MZ)({constructOnly:!0})],p.prototype,"size",void 0),p=(0,l.Cg)([(0,c.$K)("esri.layers.scene.ModelInfo")],p);var m=n(20557),y=n(99199),h=n(97552);async function d(e,t,n,r){const l=e.infoFor3D;if(!l)throw new s.A("scenelayer:query-models-not-available","Model queries are not available without 3D object metadata",{layer:e});const{objectIdField:u,globalIdField:c}=t;if(!u||!c)throw new s.A("scenelayer:query-models-not-available","Missing required fields for model queries",{layer:e});const f=function(e,t,n,r){const o=function(e,t){const n=h.A.from(t)?.clone()??e.createQuery();return n.outFields=null,n.formatOf3DObjects=null,n.returnGeometry=!1,n}(e,t);return o.outFields=[n,r],o.returnGeometry=!1,o}(e,n,u,c),p=await t.queryFeatures(f,r);return await async function(e){const{infoFor3D:t,associatedLayer:n,options:r}=e,s=n.globalIdField,l=n.parsedUrl;if(!s||!l)return new Map;const u=await async function(e){const{options:t,infoFor3D:n,featureInfos:r}=e,s=[...r.keys()];if(t?.requestedFormat){const e=(0,m.fE)(t.requestedFormat,n.supportedFormats);return e?[{formatId:e,objectIds:s}]:[]}const l=(0,o.Am)([...n.queryFormats,...n.editFormats]);return await async function({options:e,infoFor3D:t,featureInfos:n,requestQuery:r,associatedLayer:s},l){const u=t.assetMapFieldRoles.parentGlobalId,c=t.assetMapFieldRoles.assetType,f=t.assetMapFieldRoles.flags,p=new Map;for(const[e,{globalId:t}]of n)t&&p.set(e,t);const d=(0,o.Am)(p.values()),g=(0,m.JZ)(t);if(!g||!d.length)return[];const w=(0,a.fj)(s.parsedUrl?.path??"",`../${g.id}`),M=!!e?.sourceOnly,b=new h.A({where:`${u} IN (${d.map(x).join(",")})`,outFields:M?[u,c,f]:[u,c],returnDistinctValues:!0,returnGeometry:!1}),{features:F}=await(0,y.s)(w,b,{query:r,signal:e?.signal}),A=new Set(l),v=new Map;for(const e of F){const t=e.getAttribute(u),n=e.getAttribute(c),r=e.getAttribute(f)??0;n&&A.has(n)&&t&&!(1&r)&&(0,i.tE)(v,t,()=>new Set).add(n)}const q=new Map;for(const[e,t]of p)for(const n of v.get(t)??[])(0,i.tE)(q,n,()=>[]).push(e);return l.map(e=>({formatId:e,objectIds:q.get(e)??[]})).filter(({objectIds:e})=>e.length>0)}(e,l)}(e),c=new Map,f=await Promise.all(u.map(async({formatId:o,objectIds:i})=>{const a=(0,m.be)(o,t.supportedFormats),l=n.parsedUrl;if(null==a||!l||!i.length)return null;const u=(0,m._h)(o,t.supportedFormats),c=(0,m.qv)(u),f=n.createQuery();return f.objectIds=i,f.outFields=[s],f.formatOf3DObjects=o,f.returnGeometry=!0,{modelFormat:a,modelFileExtensions:c,featureSetJSON:await(0,y.e)(l.path,f,{query:e.requestQuery,signal:r?.signal},{uniqueIdFields:n.uniqueIdFields})}}));for(const t of f)t&&w(e,t.modelFormat,t.modelFileExtensions,t.featureSetJSON,c);return c}(new A(e,t,function(e){const t=new Map;for(const n of e.features){const e=n.getObjectId(),r=n.getGlobalId();null!=e&&null!=r&&t.set(e,{globalId:r})}return t}(p),l,r))}async function g(e,t,n,r){const o=r?.format;return((await d(e,t,{objectIds:[n]},{...r,requestedFormat:o,sourceOnly:null==o})).get(n)??[]).find(e=>o&&e.format===o||!o&&e.isSource)}function w({featureInfos:e,requestQuery:t,infoFor3D:n},r,o,s,a){const l=new Map;for(const e of s.assetMaps??[])(0,i.tE)(l,e.parentGlobalId,()=>[]).push(e);for(const[s,u]of e){const e=l.get(u.globalId);if(!e?.length)continue;const c=M(e,t,n);if(!c.length)continue;const f=c.reduce((e,t)=>e+t.size,0),m=F(c,o),y=!m.flags.includes("DERIVED");(0,i.tE)(a,s,()=>[]).push(new p({name:m.name,size:f,format:r,isSource:y,files:c}))}}function M(e,t,n){const r=new Map,o=({assetType:e})=>null!=(0,m.be)(e,n.supportedFormats),s=e.some(e=>o(e)&&!e.flags.includes("DERIVED"));for(const t of e)s&&o(t)&&t.flags.includes("DERIVED")||(0,i.tE)(r,t.assetName,()=>[]).push(t);const a=[];for(const[e,n]of r){n.sort((e,t)=>e.seqNo-t.seqNo);const r=n.reduce((e,t)=>e+t.size,0),o=n.map(({assetURL:e})=>e).filter(e=>!!e);o.length&&a.push(new f({name:e,size:r,flags:n[0].flags,loadArrayBuffer:e=>b(o,t,e)}))}return a}async function b(e,t,n){const o=await Promise.all(e.map(e=>(0,r.A)(e,{responseType:"array-buffer",query:t,signal:n?.signal}).then(({data:e})=>e)));return 1===o.length?o[0]:function(e){const t=e.reduce((e,t)=>e+t.byteLength,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(new Uint8Array(t),r),r+=t.byteLength;return n.buffer}(o)}function F(e,t){return e.find(({name:e})=>t.some(t=>e.toLowerCase().endsWith(`.${t}`)))??e[0]}function x(e){return`'${e.replaceAll("'","''")}'`}class A{constructor(e,t,n,r,o){this.layer=e,this.associatedLayer=t,this.featureInfos=n,this.infoFor3D=r,this.options=o,this.requestQuery={...t.parsedUrl?.query,...e.customParameters,...e.apiKey?{token:e.apiKey}:{}}}}},99199(e,t,n){n.d(t,{e:()=>l,s:()=>a});var r=n(2272),o=n(80893),s=n(22671),i=n(97552);async function a(e,t,n,r){const o=await l(e,t,n,r);return s.A.fromJSON(o)}function l(e,t,n,s){const a=(0,r.Dl)(e),l={...n},u=i.A.from(t);return(0,o.eW)(a,u,u.sourceSpatialReference,l,s)}},22671(e,t,n){n.d(t,{A:()=>w});var r,o=n(5482),s=n(52106),i=n(66552),a=n(25482),l=n(4718),u=n(91429),c=n(16930),f=n(60408),p=n(65864),m=n(50498),y=n(20437),h=n(36005),d=n(43937);const g=new i.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=r=class extends a.o{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){return this.readFeaturesWithClass(e,t,s.A)}writeGeometryType(e,t,n,r){if(e)return void g.write(e,t,n,r);const{features:o}=this;if(o)for(const e of o)if(null!=e?.geometry)return void g.write(e.geometry.type,t,n,r)}readQueryGeometry(e,t){if(!e)return null;const n=!!e.spatialReference,r=(0,p.rS)(e);return r&&!n&&t.spatialReference&&(r.spatialReference=c.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:n}=this;if(n)for(const e of n)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,l.o8)({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 n=0;n<t.features.length;n++){const r=t.features[n];if(r.geometry){const t=e?.[n];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,n],translate:[r,o]}=e,s=this.features,i=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((o-e)/n));for(let e=0,t=s.length;e<t;e++)i?.(s[e].geometry)||(s.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:n}=this;if(!n)return this;const{translate:[r,o],scale:[s,i]}=n;let a=null,l=null;if(this.hasZ&&null!=n?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=n;a=n=>n*t+e}if(this.hasM&&null!=n?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=n;l=n=>null==n?n:n*t+e}const u=this._getHydrationFunction(e,e=>e*s+r,e=>o-e*i,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,n){const r=c.A.fromJSON(t.spatialReference),o=[];for(let t=0;t<e.length;t++){const s=e[t],i=n.fromJSON(s),a=s.geometry?.spatialReference;null==i.geometry||a||(i.geometry.spatialReference=r);const l=s.aggregateGeometries,u=i.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],n=l[e],o=n?.spatialReference;null==t||o||(t.spatialReference=r)}o.push(i)}return o}_quantizePoints(e,t,n){let r,o;const s=[];for(let i=0,a=e.length;i<a;i++){const a=e[i];if(i>0){const e=t(a[0]),i=n(a[1]);e===r&&i===o||(s.push([e-r,i-o]),r=e,o=i)}else r=t(a[0]),o=n(a[1]),s.push([r,o])}return s.length>0?s:null}_getQuantizationFunction(e,t,n){return"point"===e?e=>(e.x=t(e.x),e.y=n(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,f.Bi)(e)?e.rings:e.paths,o=[];for(let e=0,s=r.length;e<s;e++){const s=r[e],i=this._quantizePoints(s,t,n);i&&o.push(i)}return o.length>0?((0,f.Bi)(e)?e.rings=o:e.paths=o,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,n);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,n,r,o){return"point"===e?e=>{e.x=t(e.x),e.y=n(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const s=(0,f.Bi)(e)?e.rings:e.paths;let i,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];for(let e=0,o=r.length;e<o;e++){const o=r[e];e>0?(i+=o[0],a+=o[1]):(i=o[0],a=o[1]),o[0]=t(i),o[1]=n(a)}}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2]),n[3]=o(n[3])}}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=r(n[2])}}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];for(let e=0,n=t.length;e<n;e++){const n=t[e];n[2]=o(n[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=n(e.ymin),e.xmax=t(e.xmax),e.ymax=n(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),o&&null!=e.mmax&&null!=e.mmin&&(e.mmax=o(e.mmax),e.mmin=o(e.mmin))}:"multipoint"===e?e=>{const s=e.points;let i,a;for(let e=0,r=s.length;e<r;e++){const r=s[e];e>0?(i+=r[0],a+=r[1]):(i=r[0],a=r[1]),r[0]=t(i),r[1]=n(a)}if(r&&o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2]),t[3]=o(t[3])}else if(r)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=r(t[2])}else if(o)for(let e=0,t=s.length;e<t;e++){const t=s[e];t[2]=o(t[2])}}:null}};(0,o.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,o.Cg)([(0,u.MZ)({type:[s.A],json:{write:!0}})],w.prototype,"features",void 0),(0,o.Cg)([(0,h.w)("features")],w.prototype,"readFeatures",null),(0,o.Cg)([(0,u.MZ)({type:[y.A],json:{write:!0}})],w.prototype,"fields",void 0),(0,o.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],w.prototype,"geometryType",void 0),(0,o.Cg)([(0,d.K)("geometryType")],w.prototype,"writeGeometryType",null),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,o.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,o.Cg)([(0,u.MZ)({types:m.yR,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,o.Cg)([(0,h.w)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,o.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,o.Cg)([(0,d.K)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,o.Cg)([(0,u.MZ)({json:{write:!0}})],w.prototype,"transform",void 0),w=r=(0,o.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0},2272(e,t,n){n.d(t,{Dl:()=>u,gf:()=>f,jV:()=>l,lF:()=>c});var r=n(92602),o=n(70333),s=n(4718),i=n(84952),a=n(926);function l(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,i.An)(e):(0,s.o8)(e)}function c(e,t,n){const r={};for(const o in e){if("declaredClass"===o)continue;const s=e[o];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))r[o]=s.map(e=>c(e));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(n?.[o]);r[o]=t?e:JSON.stringify(e)}else r[o]=t?s:JSON.stringify(s);else r[o]=s}return r}async function f(e,t,s){const i=function(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.getApiKey)(e)??o.id?.findCredential(e)?.token:null}(e,t);if(i)return i;!o.id&&r.A.request.useIdentity&&await Promise.all([n.e(7632),n.e(6162),n.e(148)]).then(n.bind(n,50148));const l=await o.id.getCredential(e,s);return l?.token}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[148],{36708(e,t,r){r.d(t,{C_:()=>u,on:()=>c,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(17676),a=r(14012);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,g)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(d),r(e)}const p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{l(),n((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,g,t)}function p(e){return!0}function g(e){return!!e}r(80559),r.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},16494(e,t,r){var s=r(17632);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),n=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(n.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1);r.d(t,["Nd",0,a,"W5",0,o])},13069(e,t,r){r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},50148(e,t,r){r.r(t),r.d(t,{default:()=>ht});var s=r(70333),i=r(92602),n=r(11254),o=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(17676),u=r(84952),p=r(5482),g=r(91429),f=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,g.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,g.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,f.$)("esri.identity.Credential")],m);const v=m;var _=r(79783),y=r(25512);function w(e){return function(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,y.u)(e??document.body)}function S(e){return function(e){return`calcite-mode-${e}`}(w(e))}r(44208);var I=r(53966),A=r(97768),k=r(61893),U=r(36708),C=r(13069),T=r(62788),b=r(71429),x=r(16494);const P="http://www.w3.org/",R=`${P}2000/svg`,O=`${P}1999/xlink`;let M=[],D=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},N=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),L=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},E=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(N(e[s],t))return s;return-1},j=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(N(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},q=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},Z=[],$=!1,F=e=>{(e.children||[]).forEach(F),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{$=!1,Z.forEach(F),Z.length=0},B=e=>{Z.push(e),$||($=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},z=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),B(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),B(e))},H=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)K(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(L(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===R?"href"===n?e.setAttributeNS(O,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=x.W5.sanitize(a):W(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)Y(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),H(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},Y=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=D(s,{namespace:R})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}G(i,e,s)}},K=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},X=(e,t,r,s,i)=>{if(r===s)return!1;s=s||M;let n,o=(r=r||M).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&N(a,c))d=J(a,c,i)||d,l++;else{let a=E(r,c,l+1);if(a>=0){for(n=l;n<a;n++)z(r[n]),j(r,n,e,"removed");d=J(r[a],c,i)||d,l=a+1}else Y(c,t,l<o?r[l].domNode:void 0,i),q(c),j(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)z(r[n]),j(r,n,e,"removed");return d};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=D(r,{namespace:R})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=X(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(K(e,h,!1),K(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(L(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||W(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===R?"href"===o?e.setAttributeNS(O,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=x.W5.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):W(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let Q=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>D(ee,e),se=(e,t,r)=>(r=re(r),Y(t,e,void 0,r),Q(t,r)),ie=(e,t,r)=>(r=re(r),Y(t,e.parentNode,e,r),Q(t,r)),ne=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),Q(t,r)),oe=(e,t,r)=>(r=re(r),Y(t,e.parentNode,e,r),e.parentNode.removeChild(e),Q(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;r&&!n&&i!==t.length-1||(s=n)}),s};var de=r(84649),ce=r(2741);let ue;ue="components/assets";var pe=r(36563);const ge=Symbol("widget"),fe=Symbol("widget-test-data"),me=[],ve={},_e=new Map;function ye(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=ye(e,r[t]);else r=me;const s=t.vnodeSelector;if(Ae(s)){const i=t.properties||ve,n=i.key||s,o={key:n,afterCreate:we,afterUpdate:Se,afterRemoved:Ie,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function we(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,_e.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,pe.hA)(()=>Ie(e))),queueMicrotask(()=>{o[fe].projector?.renderNow()})}function Se(e,t,r,{widgetProperties:s}){const i=_e.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ie(e){const t=_e.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),_e.delete(e))}function Ae(e){return"function"==typeof e&&e[ge]}const ke=new Set;new Map;const Ue=new Map;function Ce(){Ue.clear()}function Te(e){Ue.delete(e)}var be=r(98291),xe=r(76030);function Pe(e){return e.matches(":focus-within")||document.activeElement===e}(()=>{const e=new Map;new ResizeObserver(t=>{Ce();for(const r of t)e.get(r.target)?.(r)})})();var Re=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Oe=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Oe(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=Re(i)),t.push(i))}};const Me=function(...e){const t=be.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return be.A.release(t),r},De=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Ne(e,t,...r){return"function"!=typeof e||Ae(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Oe(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var Le,Ee;let je=0;function qe(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?qe(e[s],t[s]):e[s]=t[s]);return e}const Ze=(e=>{let t;const r={...ae,...e},s=(n=r,{...le,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=he(a.getLastRender(),r,!0)}else n.reverse(),s=he(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(se,e,t)},insertBefore:(e,t)=>{c(ie,e,t)},merge:(e,t)=>{c(ne,e,t)},replace:(e,t)=>{c(oe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(Ce(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let $e=!1,Fe=class extends((0,k.g)(a.nJ)){static{this[Le]=!0}constructor(e,t){super(e,t),this[Ee]=!0,this._attached=!1,this._projector=Ze,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this.topLayerDisabled=!1,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,_.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=qe((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&I.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,pe.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));const r="esri-widget-uid-"+(0,C.lk)(),s=this.render.bind(this);this._trackingTarget=new b.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,Ae(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach(e=>{Ae(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)}),ye(this,e)};this.render=()=>{if($e)return n();let e=(t=this,Ue.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),$e=!0;try{e=(0,T.a)(this._trackingTarget,n)}catch(t){throw I.A.getLogger(this).error(t),t}finally{$e=!1}return e&&function(e,t){Ue.set(e,t)}(this,e),e};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){ke.add(e),e.finally(()=>ke.delete(e)).catch(()=>{})}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),this.viewModel?.destroyed||this.viewModel?.destroying||(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,Te(this))}get container(){return this._get("container")}set container(e){this._get("container")||this._set("container",function(e){return"string"==typeof e?document.getElementById(e):e??null}(e))}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+je++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(Le=ge,Ee=ge,fe)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}removeContainer(){this._set("container",null)}scheduleRender(){this.destroyed||(Te(this),this._projector.scheduleRender())}classes(...e){return Me.apply(this,e)}renderNow(){Te(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,U.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},U.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,_.oQ)(e),(0,U.wB)(()=>this.uiStrings,e)]),this.addHandles((0,U.z7)(()=>this.container,e=>{this.destroyed||(e.closest("[arcgis-widget-wrapped]")||(this.topLayerDisabled=!0,this.announceDeprecation?.()),this._attach(e))},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,g.MZ)({value:null})],Fe.prototype,"container",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"icon",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"id",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"label",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"renderable",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"uiStrings",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"viewModel",void 0),(0,p.Cg)([(0,g.MZ)({value:!0})],Fe.prototype,"visible",null),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"key",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"children",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"afterCreate",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"afterRemoved",void 0),(0,p.Cg)([(0,g.MZ)()],Fe.prototype,"topLayerDisabled",void 0),Fe=(0,p.Cg)([(0,g.$K)("esri.widgets.Widget")],Fe);const Ve=Fe,Be="esri-identity-modal",ze={base:Be,info:`${Be}__info`,notice:`${Be}__notice`};let He=class extends Ve{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(8270),r.e(9071),r.e(3136)]).then(r.bind(r,3136)),dialog:()=>Promise.all([r.e(8270),r.e(9071),r.e(7001)]).then(r.bind(r,47001)),input:()=>Promise.all([r.e(8270),r.e(9071),r.e(4159)]).then(r.bind(r,66540)),label:()=>Promise.all([r.e(8270),r.e(892)]).then(r.bind(r,50892)),notice:()=>Promise.all([r.e(8270),r.e(9071),r.e(3670)]).then(r.bind(r,33670))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:d,invalidUser:c,noAuthService:u,lblUser:p,lblPwd:g,lblCancel:f,lblSigning:m,lblOk:v}=r;return Ne("div",{class:this.classes(ze.base,S(this.container))},Ne("form",{bind:this,onsubmit:this._submit},Ne("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",width:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Ne("div",{class:ze.info},(0,_.V2)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||d})`})),a?Ne("calcite-notice",{class:ze.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Ne("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[Ne("calcite-label",null,p,Ne("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Ne("calcite-label",null,g,Ne("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Ne("calcite-button",{appearance:"outline",bind:this,slot:"footer-end",type:"button",onclick:this._cancel},f),Ne("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e,t){const r=(0,c.YL)(t,1e4),s=(0,c.Mq)(r);await(0,xe.$m)(s);const i=e();if(!i)return;const n=async()=>{"setFocus"in i&&"function"==typeof i.setFocus?await i.setFocus():i instanceof HTMLElement&&i.focus()};for(true;!Pe(i)&&!(0,c.G4)(r);)await(0,xe.$m)(s),await n()}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,g.MZ)({readOnly:!0})],He.prototype,"container",void 0),(0,p.Cg)([(0,g.MZ)(),De("esri/t9n/common")],He.prototype,"commonMessages",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"error",void 0),(0,p.Cg)([(0,g.MZ)(),De("esri/identity/t9n/identity")],He.prototype,"messages",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"open",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"signingIn",void 0),(0,p.Cg)([(0,g.MZ)()],He.prototype,"server",void 0),(0,p.Cg)([(0,g.MZ)({readOnly:!0})],He.prototype,"title",null),(0,p.Cg)([(0,g.MZ)()],He.prototype,"resource",void 0),He=(0,p.Cg)([(0,g.$K)("esri.identity.IdentityModal")],He);const We=He,Je="esriJSAPIOAuth";class Ge{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,n.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}}).catch(()=>{})}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(Je,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(Je);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}Ge.prototype.declaredClass="esri.identity.OAuthCredential";var Ye,Ke=r(25482);let Xe=class extends Ke.o{static{Ye=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Ye.fromJSON(this.toJSON())}};(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"appId",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"authNamespace",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"expiration",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"flowType",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"forceLogin",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"forceUserId",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"locale",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"popup",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"portalUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],Xe.prototype,"userId",void 0),Xe=Ye=(0,p.Cg)([(0,g.$K)("esri.identity.OAuthInfo")],Xe);const Qe=Xe;let et=class extends Ke.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"currentVersion",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"hasPortal",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"hasServer",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"owningTenant",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"server",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,g.MZ)({json:{write:!0}})],et.prototype,"webTierAuth",void 0),et=(0,p.Cg)([(0,g.$K)("esri.identity.ServerInfo")],et);const tt=et;var rt=r(39131);const st={},it=e=>{const t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},nt=(e,t)=>!!(it(e)&&t&&t.some(t=>t.test(e.server)));let ot=null,at=null;try{ot=window.localStorage,at=window.sessionStorage}catch{}class lt extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer|3DTilesServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new tt,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new tt(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Qe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,a=Promise.withResolvers();if(t.signal&&(0,c.u7)(t.signal,()=>{n.abort()}),(0,c.u7)(n,()=>{a.reject(new o.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(n))return a.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let d;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return d=new o.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(d),a.promise;const p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let g=this.findServerInfo(e);if(g)!g.hasPortal&&g.server&&g.owningSystemUrl&&this._hasSameServerInstance(g.server,g.owningSystemUrl)&&(g.hasPortal=!0),!g.hasServer&&this._isServerRsrc(e)&&(g._restInfoPms=this._getTokenSvcUrl(e),g.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new o.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(d),a.promise;g=new tt,g.server=this._getServerInstanceRoot(e),"string"==typeof t?(g.tokenServiceUrl=t,g.hasPortal=!0):(g._restInfoPms=t,g.hasServer=!0),this.registerServers([g])}return g.hasPortal&&void 0===g._selfReq&&(i||(0,u.FX)(g.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===g.tokenServiceUrl))&&(g._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(g.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,g,t,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new u.s0(this._appOrigin),a=e.shortLivedTokenValidity;let l,h,d,c,p,g,f,m;t&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,g=r.signal,f=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,p=new u.s0(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!f&&"http"===i.scheme&&((0,u.FX)(i.uri,c,!0)||"https"===p.scheme&&i.host===p.host&&"7080"===i.port&&"7443"===p.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:m,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:g};return s||(v.withCredentials=!1),(0,n.A)(c,v).then(r=>{const s=r.data;if(!s?.token)return new o.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return st[i]||(st[i]={}),t&&(st[i][t.username]=t.password),s.validity=m,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(i=>{let a;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};a=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};a=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,n.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new o.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new o.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new o.A("identity-manager:invalid-request","Bad request");return{credential:i}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=Promise.withResolvers(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new o.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{n()});const a=new We({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",n),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(n=>{i();const o=new v({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=Promise.withResolvers();const i=this._oAuthDfd;let n;s?.signal&&(0,c.u7)(s.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,u.$1)(e),a.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=n=null)}else a.codeVerifier=null;let l,h;this._getCodeChallenge(n).then(i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new We({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),h=o.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});const d=()=>{p(),this._oAuthDfd=null,i.reject(new o.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&nt(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=st[e.server],l=a?.[e.userId];let h,d=e.resources&&e.resources[0],c=s?this.findServerInfo(r):null,u={username:e.userId,password:l};if(n&&!o)return;s&&!c&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(c=e),!!c));const p=c?this.findCredential(c.server,e.userId):null;if(!s||p){if(!i){if(s)h={serverUrl:d,token:p?.token,ssl:p?.ssl};else if(o)u=null,h={ssl:e.ssl};else{if(!l){let r;return d&&(d=this._sanitizeUrl(d),e._enqueued=1,r=this._enqueue(d,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(h={isAdmin:!0})}return this.generateToken(s?c:t,s?null:u,h).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(nt(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=(0,u.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=(0,u.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,n.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new o.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new u.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,rt.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,rt.qG)(e),t=(0,rt.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(i.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new u.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||i.A.portalUrl&&(s=(0,u.FX)(t,i.A.portalUrl,!0)),s||(s=this._portals.some(e=>this._hasSameServerInstance(e,t.uri))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&it(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,n.A)(e=s+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new v({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?ot:at,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?ot:at,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new o.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,n.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,n.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,n.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new o.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=Promise.withResolvers()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,a,h)=>{const d=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,g=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let f,m;if(i)t(new v({userId:i,server:d.server??void 0,token:a??void 0,expires:null!=h?Number(h):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(o.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(g){let i=g._oAuthCred;if(!i){const e=new Ge(g,ot),t=new Ge(g,at);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,g._oAuthCred=i}if(i.isValid()){f=new v({userId:i.userId??void 0,server:d.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=g.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then(e=>(f.expires=Date.now()+1e3*e.expires_in,f.token=e.access_token,f)):Promise.resolve(f),e._pendingDfd.then(e=>n?this._exchangeToken(e.server,g.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(f)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(g.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,g,d).then(e=>{t(e)}).catch(r)}else{const s=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,g,e.options_).then(t,r):(m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,g.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(f=new v({userId:e.username,server:d.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(f)):s()}).catch(s):s()}}else if(p){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l;if(n&&(o=n.token,a=n.prompt),l=this._findCredential(i,{resource:e.resUrl_}),!l)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){l=e;break}if(l){const i=this.findCredential(e.resUrl_,l.userId);if(i)t(i);else if(nt(s,this._legacyFed)){const e=l.toJSON();e.server=s.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(l.server),null,{serverUrl:e.resUrl_,token:l.token,signal:e.options_.signal,ssl:l.ssl})).then(r=>{t(new v({userId:l?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,prompt:a})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;const t=new o.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,n.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Qe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,n.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),i.codeVerifier&&(a.code_challenge=s||i.codeVerifier,a.code_challenge_method=s?"S256":"plain");const h=this._getAuthorizeUrl(r.portalUrl),d=h+"?"+(0,u.x0)(a);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new o.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new o.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getAuthorizeUrl(e){let t=e.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize";const r=(0,rt.py)(t);if(r?.portalHostname){const{customBaseUrl:e,portalHostname:t,urlKey:s}=r}return t}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){const e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}lt.prototype.declaredClass="esri.identity.IdentityManagerBase";const ht=new lt;(0,s.Aq)(ht)},79783(e,t,r){r.d(t,{ud:()=>w,JK:()=>S,oQ:()=>I,V2:()=>k});var s=r(2741),i=r(97770),n=r(73444),o=r(10838),a=r(18047),l=r(53966),h=r(93637),d=r(799);const c=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return c().warn("missing format descriptor for key {key}"),g(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return c().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):g(e)}}function g(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}var f=r(11254),m=r(49186);async function v(e){if(null!=y.fetchBundleAsset)return y.fetchBundleAsset(e);const t=await(0,f.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const i=t.exec(r);if(!i)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const n=i[1]?`${i[1]}/`:"",a=i[2],l=(0,o.xO)(s),h=`${n}${a}.json`,d=l?`${n}${a}_${l}.json`:h;let c;try{c=await v(e(d))}catch(t){if(d===h)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{c=await v(e(h))}catch(e){throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return c}(this.getAssetUrl,this.matcher,e,t)}}const y={},w=o.ud,S=n.JK,I=n.oQ,A=o.ao,k=function(e,t,r={}){const{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),i=e.slice(n+1).trim()),!s)return"";const o=(0,h.wc)(s,t);if(null==o)return"";const a=(i?r?.[i]:null)??r?.[s];return a?u(o,a):i?p(o,i):g(o)}(e,t,s))};var U;A((U={pattern:"esri/",location:s.s},new _(U)))},97770(e,t,r){r.d(t,{Ey:()=>O,F8:()=>R,J2:()=>T,Yq:()=>x,_m:()=>b,iS:()=>P,wj:()=>M});var s=r(66552),i=r(73444),n=r(98623),o=r(92647);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},h={timeZone:"UTC"},d={year:"numeric",month:"numeric",day:"numeric"},c={year:"numeric",month:"long",day:"numeric"},u={year:"numeric",month:"short",day:"numeric"},p={year:"numeric",month:"long",weekday:"long",day:"numeric"},g={hour:"numeric",minute:"numeric"},f={...g,second:"numeric"},m={hourCycle:"h23"},v={...g,...m},_={...f,...m},y={"short-date":d,"short-date-short-time":{...d,...g},"short-date-short-time-24":{...d,...v},"short-date-long-time":{...d,...f},"short-date-long-time-24":{...d,..._},"short-date-le":d,"short-date-le-short-time":{...d,...g},"short-date-le-short-time-24":{...d,...v},"short-date-le-long-time":{...d,...f},"short-date-le-long-time-24":{...d,..._},"long-month-day-year":c,"long-month-day-year-short-time":{...c,...g},"long-month-day-year-short-time-24":{...c,...v},"long-month-day-year-long-time":{...c,...f},"long-month-day-year-long-time-24":{...c,..._},"day-short-month-year":u,"day-short-month-year-short-time":{...u,...g},"day-short-month-year-short-time-24":{...u,...v},"day-short-month-year-long-time":{...u,...f},"day-short-month-year-long-time-24":{...u,..._},"long-date":p,"long-date-short-time":{...p,...g},"long-date-short-time-24":{...p,...v},"long-date-long-time":{...p,...f},"long-date-long-time-24":{...p,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":g,"long-time":f},w=(0,s.O)()({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"}),S={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},I=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),A=I.find(({type:e})=>"month"===e)?.value.toLowerCase();function k(){const e=(0,i.lR)();return(e&&S[e])??(0,i.QC)()}"mart"!==A&&(S.bs="sr-Latn-CS");let U=new WeakMap;const C=y["short-date-short-time"];function T(e){return y[e]}function b(e){const{dateStyle:t,timeStyle:r,hour12:s,year:i,month:n}=e,o={};return t?o.dateStyle=t:i&&(o.year=i,o.month=n||void 0),r&&!o.year&&(o.timeStyle=r,o.hour12="auto"===s?void 0:"always"===s),o}function x(e,t=C){return function(e){let t=U.get(e);if(!t){const r=k(),s=M(e.timeZone??"system"),i={...e,timeZone:s};t=new Intl.DateTimeFormat(r,i),U.set(e,t)}return t}(t).format(e)}function P(e,t=C){return x(new Date(e),{...t,...h,...l})}function R(e,t=C){return x(new Date(`1970-01-01T${e}Z`),{...t,...h,...a})}function O(e,t=C){const r=o.c9.fromISO(e,{setZone:!0});if(!r.isValid)return e;if(t.timeZone)return x(r.toJSDate(),t);const s=0===r.offset?"UTC":t.timeZone,i={...t,timeZone:s};return r.toLocaleString(i,{locale:k()})}function M(e){switch(e){case"system":return n.N;case n.L:return"UTC";default:return e}}(0,i.Ml)(()=>{U=new WeakMap}),r.d(t,["_v",0,w])},10838(e,t,r){r.d(t,{ao:()=>c,ud:()=>u,xO:()=>p});var s=r(49186),i=r(36563),n=r(73444);const o={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:"no",nl:!0,no:!0,nn:"no",pl:!0,pt:"pt-BR","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:"zh-CN","zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function a(e){if(function(e){return e in o}(e)){const t=o[e];return!0===t?e:t}return null}const l=[],h=new Map;function d(e){for(const t of h.keys())g(e.pattern,t)&&h.delete(t)}function c(e){return l.includes(e)||(d(e),l.unshift(e)),(0,i.hA)(()=>{const t=l.indexOf(e);t>-1&&(l.splice(t,1),d(e))})}async function u(e){const t=(0,n.JK)();h.has(e)||h.set(e,async function(e,t){const r=[];for(const s of l)if(g(s.pattern,e))try{return await s.fetchMessageBundle(e,t)}catch(e){r.push(e)}if(r.length)throw new s.A("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:r});throw new s.A("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const r=h.get(e);return r&&await f.add(r),r}function p(e){const t=(0,n.lR)(e);return t?a(e)??a(t):null}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,n.Ml)(()=>{h.clear()});const f=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=Promise.withResolvers())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},18047(e,t,r){r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){const{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.lR)(),o=r&&i[r]||(0,s.QC)();n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ml)(()=>{n=new WeakMap,o={}}),new Map}}]);
|