@arcgis/core 4.31.0-next.20240819 → 4.31.0-next.20240821
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{d2fa4d2887692a1ec9b1.js → 0553357f4cdf4deb13d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{b21db356f243d097ab3e.js → 122f3f294b8f95619f27.js} +1 -1
- package/assets/esri/core/workers/chunks/{dc03a639c97a6f99dbc9.js → 1ac47b7a77818c372e1a.js} +1 -1
- package/assets/esri/core/workers/chunks/{23a6700a3278d2cfcd75.js → 203cf58345df86caf4ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{a2c40517266fe420017c.js → 25fa59544c13db8cee30.js} +1 -1
- package/assets/esri/core/workers/chunks/29545cd255b763d393d0.js +1 -0
- package/assets/esri/core/workers/chunks/3f75b7ed24b440b4508a.js +1 -0
- package/assets/esri/core/workers/chunks/40e4224f700206c67053.js +1 -0
- package/assets/esri/core/workers/chunks/48ab5ce08a97e5dac709.js +1 -0
- package/assets/esri/core/workers/chunks/{56bb7b589a0c040263ff.js → 4f1d44ce2f68e2ec2b60.js} +1 -1
- package/assets/esri/core/workers/chunks/5429c2e1d2f159f332f9.js +1 -0
- package/assets/esri/core/workers/chunks/{d8f416440963b77595e3.js → 58c476c8f6c274d77c0c.js} +1 -1
- package/assets/esri/core/workers/chunks/5c4173205f885cd21422.js +1 -0
- package/assets/esri/core/workers/chunks/5cb07fa227b7fd06499f.js +1 -0
- package/assets/esri/core/workers/chunks/6f7c2d02fbd29870f6ee.js +1 -0
- package/assets/esri/core/workers/chunks/75ac4dfa3c8feeb82de2.js +1 -0
- package/assets/esri/core/workers/chunks/7fda3d3b211b6da5b0e5.js +1 -0
- package/assets/esri/core/workers/chunks/{1e7ce327435e0f4a4bec.js → 8224351edd777843180d.js} +1 -1
- package/assets/esri/core/workers/chunks/949cbb667531527e6918.js +1 -0
- package/assets/esri/core/workers/chunks/{6e966c885e2ac9dff46b.js → 991295637f51e8207efe.js} +1 -1
- package/assets/esri/core/workers/chunks/{252ff37bf5e12dae0b18.js → 9acc02df376d5bdfac87.js} +1 -1
- package/assets/esri/core/workers/chunks/9bbf7129579fe04ab268.js +1 -0
- package/assets/esri/core/workers/chunks/{492137ecf03ad2b2c2e3.js → a0fdb0fa96680ac758c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ab02b7660e751cffe1c.js → a4b0e6084971989c526b.js} +1 -1
- package/assets/esri/core/workers/chunks/a6834f66d8da628c3fb2.js +1 -0
- package/assets/esri/core/workers/chunks/{238936d241e76c4c0343.js → ace8b6351ed35b03499b.js} +1 -1
- package/assets/esri/core/workers/chunks/b08689e5b0d1449877f5.js +1 -0
- package/assets/esri/core/workers/chunks/b686d70586623f7bf9a6.js +1 -0
- package/assets/esri/core/workers/chunks/b6dffcacd8b02384d6e2.js +1 -0
- package/assets/esri/core/workers/chunks/{bf7253f7e5d6d63333c3.js → b765a72c9d4f092855f5.js} +1 -1
- package/assets/esri/core/workers/chunks/b9490d5cc65cce2f2948.js +1 -0
- package/assets/esri/core/workers/chunks/{4706798c58398447d79f.js → bbd5477944da39234c30.js} +1 -1
- package/assets/esri/core/workers/chunks/cd8d595d577b74817623.js +1 -0
- package/assets/esri/core/workers/chunks/{145592dc516b86fbda63.js → cfc93bbd35cc4bfde7c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{48aeb087a1b10a8f4c0b.js → d5d70b3ecc0aca2ac184.js} +1 -1
- package/assets/esri/core/workers/chunks/{a784222a7f9dc40ed67c.js → e2a6f77c05d0818e3f74.js} +1 -1
- package/assets/esri/core/workers/chunks/{1ee365125c9fb9d9cafe.js → e5474bcde5b8fa037b56.js} +11 -11
- package/assets/esri/core/workers/chunks/{f7ab24d3dfc0ba9bf760.js → ea561b2460e634a643fc.js} +1 -1
- package/assets/esri/core/workers/chunks/{cf7be98af841fadacf50.js → fc5129c825bc3c78b112.js} +1 -1
- package/chunks/BloomComposition.glsl.js +45 -0
- package/chunks/Centroid-DZi-eb9F.js +5 -0
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
- package/chunks/OperatorGeodeticDistance.js +5 -0
- package/chunks/OperatorProximity.js +5 -0
- package/chunks/OperatorShapePreservingDensify.js +1 -1
- package/chunks/Polyline.js +1 -1
- package/core/mathUtils.js +1 -1
- package/geometry/Mesh.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +5 -0
- package/geometry/operators/gx/operatorClip.js +1 -1
- package/geometry/operators/gx/operatorCut.js +1 -1
- package/geometry/operators/gx/operatorDensify.js +1 -1
- package/geometry/operators/gx/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDensifyByLength.js +1 -1
- package/geometry/operators/gx/operatorGeodeticDistance.js +5 -0
- package/geometry/operators/gx/operatorIntersection.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +5 -0
- package/geometry/operators/gx/operatorOffset.js +5 -0
- package/geometry/operators/gx/operatorShapePreservingDensify.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/operatorAutoComplete.js +5 -0
- package/geometry/operators/operatorCentroid.js +5 -0
- package/geometry/operators/operatorContains.js +1 -1
- package/geometry/operators/operatorCrosses.js +1 -1
- package/geometry/operators/operatorCut.js +1 -1
- package/geometry/operators/operatorDensify.js +1 -1
- package/geometry/operators/operatorDifference.js +1 -1
- package/geometry/operators/operatorDisjoint.js +1 -1
- package/geometry/operators/operatorEquals.js +1 -1
- package/geometry/operators/operatorGeodesicBuffer.js +1 -1
- package/geometry/operators/operatorGeodeticDensifyByLength.js +1 -1
- package/geometry/operators/operatorGeodeticDistance.js +5 -0
- package/geometry/operators/operatorIntersection.js +1 -1
- package/geometry/operators/operatorIntersects.js +1 -1
- package/geometry/operators/operatorLabelPoint.js +5 -0
- package/geometry/operators/operatorOffset.js +5 -0
- package/geometry/operators/operatorOverlaps.js +1 -1
- package/geometry/operators/operatorProximity.js +5 -0
- package/geometry/operators/operatorRelate.js +1 -1
- package/geometry/operators/operatorReshape.js +5 -0
- package/geometry/operators/operatorShapePreservingDensify.js +1 -1
- package/geometry/operators/operatorTouches.js +1 -1
- package/geometry/operators/operatorWithin.js +1 -1
- package/geometry/operators/support/converterAPI.js +1 -1
- package/geometry/support/spatialReferenceUtils.js +1 -1
- package/geometry/support/webMercatorUtils.js +1 -1
- package/interfaces.d.ts +34 -6
- package/layers/LinkChartLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/sources/geojson/geojson.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphLayerDataManager.js +1 -1
- package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/layers/knowledgeGraph/layerUtils.js +1 -1
- package/layers/mixins/operationalLayers.js +1 -1
- package/layers/orientedImagery/core/ElevationSourceDefinitions.js +1 -1
- package/layers/orientedImagery/core/utils.js +1 -1
- package/layers/support/layersCreator.js +1 -1
- package/libs/linkchartlayout/LinkChartLayout.js +1 -1
- package/package.json +1 -1
- package/portal/PortalItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/rest/versionManagement/gdbVersion/differences.js +5 -0
- package/rest/versionManagement/gdbVersion/support/DifferencesParameters.js +5 -0
- package/rest/versionManagement/gdbVersion/support/DifferencesResult.js +5 -0
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/views/2d/engine/webgl/mesh/MultiTileMeshData.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/2d/support/highlightGroupUtils.js +1 -1
- package/views/2d/tiling/LODInfo.js +1 -1
- package/views/2d/tiling/TileKey.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/viewpointUtils.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +3 -3
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +5 -0
- package/views/3d/webgl-engine/effects/bloom/BloomTechnique.js +5 -0
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/assets/esri/core/workers/chunks/0c6411a08d8b40fc7f4c.js +0 -1
- package/assets/esri/core/workers/chunks/22128034bf3b5aa713fc.js +0 -1
- package/assets/esri/core/workers/chunks/2dddb8a989b9c96572fe.js +0 -1
- package/assets/esri/core/workers/chunks/31f931de94414f13bd13.js +0 -1
- package/assets/esri/core/workers/chunks/370dd36904acad113842.js +0 -1
- package/assets/esri/core/workers/chunks/5f93a59c92f464925f9c.js +0 -1
- package/assets/esri/core/workers/chunks/6a04b6c7a5ec2389a768.js +0 -1
- package/assets/esri/core/workers/chunks/6f1853ab502bebefd3c3.js +0 -1
- package/assets/esri/core/workers/chunks/8a37c5b110665c8ff5a7.js +0 -1
- package/assets/esri/core/workers/chunks/945a3cc2191606f3a917.js +0 -1
- package/assets/esri/core/workers/chunks/9661398ce832137461f6.js +0 -1
- package/assets/esri/core/workers/chunks/b09bc516b7a7bf5a44a8.js +0 -1
- package/assets/esri/core/workers/chunks/b370dae404d8ff733a54.js +0 -1
- package/assets/esri/core/workers/chunks/c2ba052733e8ccae82e1.js +0 -1
- package/assets/esri/core/workers/chunks/d7d2552ff3e2d44319c7.js +0 -1
- package/assets/esri/core/workers/chunks/f2c3b68f00f88700e698.js +0 -1
- package/assets/esri/core/workers/chunks/f4d9689194d8d2547bb1.js +0 -1
- package/assets/esri/core/workers/chunks/f91b811fa044a01b6bb3.js +0 -1
- package/chunks/SimpleGeometryCursor.js +0 -5
- package/geometry/operators/support/cursorUtils.js +0 -5
- package/views/2d/layers/features/support/tileUtils.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5181],{52106:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(90237),s=r(59456),a=r(13874),o=r(61147),l=r(69540),u=r(51447),p=r(25482),c=r(53966),y=r(36708),d=r(24326),m=r(10107),h=(r(44208),r(87811),r(40608)),f=r(65864);function g(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let v=i=class extends((0,l.O)(p.oY)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,u.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,p.Wj)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,y.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,y.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,n._)([(0,m.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,n._)([(0,m.MZ)({value:null})],v.prototype,"attributes",null),(0,n._)([(0,m.MZ)({value:null,types:s.yR,json:{read:f.rS}})],v.prototype,"geometry",null),(0,n._)([(0,m.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,n._)([(0,m.MZ)({clonable:"reference"})],v.prototype,"layer",void 0),(0,n._)([(0,m.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,n._)([(0,m.MZ)({type:a.A})],v.prototype,"popupTemplate",void 0),(0,n._)([(0,m.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,n._)([(0,m.MZ)({value:null,types:o.Es})],v.prototype,"symbol",null),(0,n._)([(0,m.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,n._)([(0,m.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=i=(0,n._)([(0,h.$)("esri.Graphic")],v);const b=v},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),n=r(5503),s=(r(60999),r(49186),r(53966),r(14012),r(80559)),a=r(10107),o=r(40608);let l=class extends n.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.fm)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,a.MZ)()],l.prototype,"getCollections",void 0),(0,i._)([(0,a.MZ)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,a.MZ)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,o.$)("esri.core.CollectionFlattener")],l);const u=l},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>p,Hq:()=>u,Ie:()=>m,Jt:()=>h,Ne:()=>c,RF:()=>o,aI:()=>v,fA:()=>s,hZ:()=>d,iT:()=>l,is:()=>g,qv:()=>b,vI:()=>y,v_:()=>w,vt:()=>n,w1:()=>a});var i=r(5443);function n(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,a,o=n()){return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=s,o[5]=a,o}function a(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),a=Math.min(a,t[r+3*e+2]),o=Math.max(o,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?d(e,b):n(b)}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];n()},83960:(e,t,r)=>{r.d(t,{X_:()=>a,zx:()=>o});var i=r(34727),n=r(83047);const s=96;function a(e,t){const r=t||e.extent,i=e.width,a=(0,n.GA)(r?.spatialReference);return r&&i?r.width/i*a*n.dy*s:0}function o(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var i=r(90237),n=r(92602),s=r(52106),a=r(13874),o=r(78888),l=r(5503),u=r(38961),p=r(66552),c=r(4718),y=r(92071),d=r(74887),m=r(36708),h=r(84952),f=r(10107),g=r(56507),v=r(36005),b=r(40608),w=r(43937),I=r(49422),_=r(5443),M=r(16930),S=r(83960),x=r(21325),A=r(4146),T=r(63074),L=r(16131),E=r(8303),O=r(54310),F=r(25036),N=r(82935),Z=r(38458),P=r(60694),C=r(10873),R=r(69622);r(44208),r(53966),r(87811);const U={visible:"visibleSublayers"};let j=class extends R.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(U[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,i=[],n=e=>{const{minScale:r,maxScale:s,sublayers:a,visible:o}=e;o&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(a?a.forEach(n):i.push(e))};return r?.forEach(n),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:n}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:n,layers:t}}};(0,i._)([(0,f.MZ)()],j.prototype,"layer",null),(0,i._)([(0,f.MZ)({readOnly:!0})],j.prototype,"layers",null),(0,i._)([(0,f.MZ)({type:Number})],j.prototype,"scale",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],j.prototype,"version",null),(0,i._)([(0,f.MZ)({readOnly:!0})],j.prototype,"visibleSublayers",null),j=(0,i._)([(0,b.$)("esri.layers.support.ExportWMSImageParameters")],j);var G,$=r(33446),B=r(4902),H=r(79901);let V=0,q=G=class extends((0,B.sA)(y.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,m.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),m.OH),(0,m.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),m.OH),(0,m.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),m.OH),(0,m.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),m.OH)])}get id(){return this._get("id")??V++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,g.dp)(l.A.ofType(G),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new G;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,i._)([(0,f.MZ)()],q.prototype,"description",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],q.prototype,"dimensions",void 0),(0,i._)([(0,f.MZ)({type:_.A,json:{name:"extent"}})],q.prototype,"fullExtent",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"fullExtents",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],q.prototype,"id",null),(0,i._)([(0,f.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],q.prototype,"legendUrl",void 0),(0,i._)([(0,v.w)("legendUrl",["legendUrl","legendURL"])],q.prototype,"readLegendUrl",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],q.prototype,"legendEnabled",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"layer",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"maxScale",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"minScale",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],q.prototype,"effectiveScaleRange",null),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],q.prototype,"name",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"parent",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],q.prototype,"popupEnabled",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],q.prototype,"queryable",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"sublayers",void 0),(0,i._)([(0,H.w)("sublayers")],q.prototype,"castSublayers",null),(0,i._)([(0,f.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],q.prototype,"spatialReferences",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],q.prototype,"title",void 0),(0,i._)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],q.prototype,"visible",null),q=G=(0,i._)([(0,b.$)("esri.layers.support.WMSSublayer")],q);const D=q;var k=r(4576),W=r(49186),J=r(96285);const K={84:4326,83:4269,27:4267};function z(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new W.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const i=ee("Capability",r),n=ee("Service",r),s=i&&ee("Request",i);if(!i||!n||!s)return null;const a=ee("Layer",i);if(!a)return null;const o="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",l=re("Title",n,"")||re("Name",n,""),u=re("AccessConstraints",n,""),p=/^none$/i.test(u)?"":u,c=re("Abstract",n,""),y=parseInt(re("MaxWidth",n,"5000"),10),d=parseInt(re("MaxHeight",n,"5000"),10),m=se(s,"GetMap"),h=ne(s,"GetMap"),f=oe(a,o,t);if(!f)return null;let g,v=0;const b=Array.prototype.slice.call(i.childNodes),w=f.sublayers??[],I=e=>{null!=e&&w.push(e)};b.forEach((e=>{"Layer"===e.nodeName&&(0===v?g=e:1===v?(f.name&&(f.name="",I(oe(g,o,t))),I(oe(e,o,t))):I(oe(e,o,t)),v++)}));let M=f.sublayers,S=f.extent;const x=f.fullExtents??[];if(M||(M=[]),0===M.length&&M.push(f),!S){const e=new _.A(M[0].extent);f.extent=e.toJSON(),S=f.extent}const A=f.spatialReferences.length>0?f.spatialReferences:X(f),T=ne(s,"GetFeatureInfo"),L=T?se(s,"GetFeatureInfo"):null,E=Q(M),O=f.minScale||0,F=f.maxScale||0,N=f.dimensions??[],Z=E.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),P=N.concat(Z).filter(ue);let C=null;if(P.length){const e=P.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(k.Ru);C={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:p,description:c,dimensions:N,extent:S,fullExtents:x,featureInfoFormats:L,featureInfoUrl:T,mapUrl:h,maxWidth:y,maxHeight:d,maxScale:F,minScale:O,layers:E,spatialReferences:A,supportedImageFormatTypes:m,timeInfo:C,title:l,version:o}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function Q(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(Q(r.sublayers)),delete r.sublayers);return t}function Y(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(le(i)&&i.nodeName===e)return i}return null}function te(e,t){if(null==t)return[];const r=[];for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];le(n)&&n.nodeName===e&&r.push(n)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function ie(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),n=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),a=parseFloat(e.getAttribute("maxy"));let o,l,u,p;r?(o=isNaN(n)?-Number.MAX_VALUE:n,l=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(a)?Number.MAX_VALUE:a,p=isNaN(s)?Number.MAX_VALUE:s):(o=isNaN(i)?-Number.MAX_VALUE:i,l=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(a)?Number.MAX_VALUE:a);const c=new M.A({wkid:t});return new _.A({xmin:o,ymin:l,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r){const i=ee("OnlineResource",r);return i?Y("xlink:href",i,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],i=(0,h.An)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function se(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(k.Ru);const i=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&i.push(e)}return i}function ae(e,t,r){const i=ee(t,e);if(!i)return r;const{textContent:n}=i;if(null==n||""===n)return r;const s=Number(n);return isNaN(s)?r:s}function oe(e,t,r){if(!e)return null;const i={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},n=ee("LatLonBoundingBox",e),s=ee("EX_GeographicBoundingBox",e);let a=null;n&&(a=ie(n,4326)),s&&(a=new _.A(0,0,0,0,new M.A({wkid:4326})),a.xmin=parseFloat(re("westBoundLongitude",s,"0")),a.ymin=parseFloat(re("southBoundLatitude",s,"0")),a.xmax=parseFloat(re("eastBoundLongitude",s,"0")),a.ymax=parseFloat(re("northBoundLatitude",s,"0"))),n||s||(a=new _.A(-180,-90,180,90,new M.A({wkid:4326}))),i.minScale=ae(e,"MaxScaleDenominator",0),i.maxScale=ae(e,"MinScaleDenominator",0);const o=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)i.name=e.textContent||"";else if("Title"===e.nodeName)i.title=e.textContent||"";else if("Abstract"===e.nodeName)i.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(o);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.slice(5),10);0===i||isNaN(i)||a||(a="1.3.0"===t?ie(e,i,(0,Z.m)(i)):ie(e,i))}const n=r?.indexOf(":");if(n&&n>-1){let s=parseInt(r.slice(n+1),10);0===s||isNaN(s)||(s=K[s]??s);const a="1.3.0"===t?ie(e,s,(0,Z.m)(s)):ie(e,s);a&&i.fullExtents&&i.fullExtents.push(a)}}else if(e.nodeName===o)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=K[t]??t;i.spatialReferences.includes(e)||i.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||i.legendUrl){if("Layer"===e.nodeName){const n=oe(e,t,r);n&&(n.parentLayerId=i.id,i.sublayers||(i.sublayers=[]),i.sublayers.push(n))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(i.legendUrl=e.getAttribute("xlink:href"))}}})),i.extent=a?.toJSON(),i.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,n=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,a="0"!==Y("default",e,"0"),o="0"!==Y("nearestValue",e,"0"),l="0"!==Y("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:ye(i),default:ye(s),multipleValues:a,nearestValue:o,current:l}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:pe(i),unitSymbol:n,default:pe(s),multipleValues:a,nearestValue:o}:{name:t,units:r,extent:ce(i),unitSymbol:n,default:ce(s),multipleValues:a,nearestValue:o}})),i}function le(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(k.Ru):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(k.Ru):r}function ye(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:de(t[0]),max:de(t[1]),resolution:t.length>=3&&"0"!==t[2]?me(t[2]):void 0}})).filter(k.Ru):r.map((e=>de(e)))}function de(e){return J.c9.fromISO(e,{zone:J.mQ.utcInstance}).toJSDate()}function me(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:he(t[1]),months:he(t[2]),days:he(t[3]),hours:he(t[4]),minutes:he(t[5]),seconds:he(t[6])}:null}function he(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function ge(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${fe(t)}`:`${t?fe(t):"0000-01-01T00:00:00Z"}/${r?fe(r):"9999-12-31T23:59:59Z"}`}const ve=new Set([102100,3857,102113,900913]),be=new Set([3395,54004]),we=new p.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function Ie(e){return"text/html"===e}function _e(e){return"text/plain"===e}let Me=class extends((0,T.dM)((0,N.e)((0,O.J)((0,F.j)((0,L.q)((0,E.A)((0,y.P)(A.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,m.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),m.OH),(0,m.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),m.OH),(0,m.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),m.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(d.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new _.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(Ie)??this.featureInfoFormats.find(_e)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(Ie(e)||_e(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new M.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Se(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Se(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const n=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=n.get(e.parent.id);null!=t?t.push(e.id):n.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...i},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(n.has(e.id)&&(s.sublayerIds=n.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,h.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const i=(0,h.a6)(t,r??{});this._set("url",i)}createExportImageParameters(e,t,r,i){const n=i?.pixelRatio??1,s=(0,S.X_)({extent:e,width:t})*n,a=new j({layer:this,scale:s}),{xmin:o,ymin:l,xmax:u,ymax:p,spatialReference:c}=e,y=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ve.has(r)?t.find((e=>ve.has(e)))||t.find((e=>be.has(e)))||102100:r)}(c,this.spatialReferences),d="1.3.0"===this.version&&(0,Z.m)(y)?`${l},${o},${p},${u}`:`${o},${l},${u},${p}`,m=a.toJSON(),h="1.3.0"===this.version?"crs":"srs";return{bbox:d,[h]:null==y||isNaN(y)?void 0:"EPSG:"+y,...m}}async fetchImage(e,t,r,i){const n=this.mapUrl,s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const a=ge(i?.timeExtent),l={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:a,...this.refreshParameters}),signal:i?.signal};return(0,o.A)(n??"",l).then((e=>e.data))}async fetchImageBitmap(e,t,r,i){const n=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const a=ge(i?.timeExtent),l={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:a,...this.refreshParameters}),signal:i?.signal},{data:u}=await(0,o.A)(n,l);return(0,$.m)(u,n,i?.signal)}fetchFeatureInfo(e,t,r,i,n){const s=(0,S.X_)({extent:e,width:t}),a=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new j({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==a)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const o="1.3.0"===this.version?{I:i,J:n}:{x:i,y:n},l={query_layers:a,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...o},u={...this.createExportImageParameters(e,t,r),...l},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,h.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,P.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?M.A.WebMercator:new M.A({wkid:t});return(0,x.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,h.yM)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new a.A({title:this.title,content:t}),i=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([i])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:i}=await(0,o.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=z(i)}if(this.parsedUrl){const e=new h.s0(this.parsedUrl.path),{httpsDomains:t}=n.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Se(e,t,r){e=e??[];const i=new Map;e.every((e=>null==e.id))&&(e=(0,c.o8)(e)).forEach(((e,t)=>e.id=t));for(const n of e){const e=new D;e.read(n,t),r&&!r.includes(e.name)&&(e.visible=!1),i.set(e.id,e)}const n=[];for(const t of e){const e=null!=t.id?i.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new l.A),r.sublayers.push(e)}else n.push(e)}return n}(0,i._)([(0,f.MZ)({readOnly:!0})],Me.prototype,"allSublayers",void 0),(0,i._)([(0,f.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customParameters",void 0),(0,i._)([(0,f.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customLayerParameters",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],Me.prototype,"copyright",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"description",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Me.prototype,"dimensions",void 0),(0,i._)([(0,f.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Me.prototype,"fullExtent",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"fullExtent",["extent"])],Me.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,w.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Me.prototype,"writeFullExtent",null),(0,i._)([(0,f.MZ)()],Me.prototype,"fullExtents",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoFormat",null),(0,i._)([(0,f.MZ)({type:[String],readOnly:!0})],Me.prototype,"featureInfoFormats",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoUrl",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"fetchFeatureInfoFunction",void 0),(0,i._)([(0,f.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:we.jsonValues,read:{reader:we.read,source:"format"},write:{writer:we.write,target:"format"}}}}})],Me.prototype,"imageFormat",void 0),(0,i._)([(0,v.w)("imageFormat",["supportedImageFormatTypes"])],Me.prototype,"readImageFormat",null),(0,i._)([(0,f.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Me.prototype,"imageMaxHeight",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Me.prototype,"imageMaxWidth",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"imageTransparency",void 0),(0,i._)([(0,f.MZ)(C.fV)],Me.prototype,"legendEnabled",void 0),(0,i._)([(0,f.MZ)({type:["show","hide","hide-children"]})],Me.prototype,"listMode",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"mapUrl",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Me.prototype,"isReference",void 0),(0,i._)([(0,f.MZ)({type:["WMS"]})],Me.prototype,"operationalLayerType",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"resourceInfo",void 0),(0,i._)([(0,f.MZ)({type:M.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Me.prototype,"spatialReference",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Me.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,f.MZ)({type:[g.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Me.prototype,"spatialReferences",void 0),(0,i._)([(0,w.K)(["web-document","portal-item"],"spatialReferences")],Me.prototype,"writeSpatialReferences",null),(0,i._)([(0,f.MZ)({type:l.A.ofType(D),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,I.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Me.prototype,"sublayers",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Me.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,v.w)("service","sublayers",["layers"])],Me.prototype,"readSublayers",null),(0,i._)([(0,w.K)("sublayers",{layers:{type:[D]},visibleLayers:{type:[String]}})],Me.prototype,"writeSublayers",null),(0,i._)([(0,f.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],Me.prototype,"type",void 0),(0,i._)([(0,f.MZ)(C.OZ)],Me.prototype,"url",null),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"version",void 0),Me=(0,i._)([(0,b.$)("esri.layers.WMSLayer")],Me);const xe=Me},16131:(e,t,r)=>{r.d(t,{q:()=>w});var i=r(90237),n=r(49186),s=r(84952),a=r(10107),o=r(56507),l=(r(87811),r(44208),r(36005)),u=r(40608),p=r(43937),c=r(89317),y=r(45917),d=r(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},h={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},g={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":h,"web-map/tables":f,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":h,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var v=r(10873),b=r(79677);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,d.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?b.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new n.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,y.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=g[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof n.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new n.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,a.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:c.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,a.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,p.K)("title"),(0,p.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,a.MZ)({type:b.A,json:{origins:{"web-scene":{write:{layerContainerTypes:c.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,p.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:c.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),n=r(92602),s=r(70333),a=r(78888),o=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),y=r(84952),d=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(83531),v=r(20655),b=r(80812),w=r(41318),I=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,I.It)(r);let n,a;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,y.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const o=!0,l=!1,u=!1;if(!a)return{features:{edit:o,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,I.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,y.S8)(n.restUrl)===(0,y.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,y.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var i=r(90237),n=(r(44208),r(53966)),s=r(74887),a=r(10107),o=r(79901),l=(r(87811),r(40608)),u=r(89317),p=r(5503),c=(r(60999),r(49186),r(14012),r(80559));const y=new p.A,d=new WeakMap;function m(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let f=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of y){const i=r.deref();i?i.refreshInterval&&e-(d.get(i)??0)+5>=6e4*i.refreshInterval&&(d.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,c.fm)((()=>{const e=Date.now();let t=0;for(const r of y){const i=r.deref();i&&(t=h(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?d.get(i)||d.set(i,e):d.delete(i))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(v,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||m(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,i._)([(0,a.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,o.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,a.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},82935:(e,t,r)=>{r.d(t,{B:()=>d,e:()=>m});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),o=r(89317),l=r(30524),u=r(96184),p=r(73133),c=r(79677),y=r(10184);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:o.K}}},m=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new y.A({value:i,unit:n}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.MZ)({type:c.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.MZ)({type:y.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.MZ)(d)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.$)("esri.layers.mixins.TemporalLayer")],t),t}},38458:(e,t,r)=>{r.d(t,{m:()=>n});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function n(e){return null!=e&&i.some((([t,r])=>e>=t&&e<=r))}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(90237),n=r(69540),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(79677),c=r(10184),y=r(56400);function d(e,t){return c.A.fromJSON({value:e,unit:t})}let m=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,i._)([(0,a.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,i._)([(0,a.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,i._)([(0,o.w)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.K)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,i._)([(0,a.MZ)({type:c.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,i._)([(0,o.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,i._)([(0,u.K)("interval")],m.prototype,"writeInterval",null),(0,i._)([(0,a.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,i._)([(0,a.MZ)((0,y.P6)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),(0,i._)([(0,a.MZ)({type:[Date],json:{read:!1}})],m.prototype,"stops",void 0),m=(0,i._)([(0,l.$)("esri.layers.support.TimeInfo")],m);const h=m},33446:(e,t,r)=>{r.d(t,{C:()=>a,m:()=>s});var i=r(49186),n=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.Te)(r),s}async function a(e,t,r,s,a){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.Te)(a),o}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},10184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let c=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,a.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(p.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.$)("esri.time.TimeInterval")],c);const y=c}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5181],{52106:(e,t,r)=>{r.d(t,{A:()=>b});var i,n=r(90237),s=r(59456),a=r(13874),o=r(61147),l=r(69540),u=r(51447),p=r(25482),c=r(53966),y=r(36708),d=r(24326),m=r(10107),h=(r(44208),r(87811),r(40608)),f=r(65864);function g(e){if(null==e)return null;const t={};for(const r in e){const i=e[r];i&&(t[r]=i.toJSON())}return 0!==Object.keys(t).length?t:null}let v=i=class extends((0,l.O)(p.oY)){constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.popupTemplate=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,u.eF)(c.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new i({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const r of[t,this.sourceLayer,this.layer])if(r){if("popupTemplate"in r&&r.popupTemplate)return r.popupTemplate;if(e&&"defaultPopupTemplate"in r&&null!=r.defaultPopupTemplate)return r.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t},this._notifyLayer("attributes",void 0,t,e)}getObjectId(){return this.sourceLayer&&"objectIdField"in this.sourceLayer&&this.sourceLayer.objectIdField?this.getAttribute(this.sourceLayer.objectIdField):null}toJSON(){return{aggregateGeometries:g(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,p.Wj)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,i){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=i),"attributes"===e&&(n.attributeName=i),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,y.z7)((()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0),(({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())})),(0,y.z7)((()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0),(()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)}),{equals:(e,t)=>e===t,sync:!0})])}};(0,n._)([(0,m.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const i=(0,f.rS)(e[r]);i&&(t[r]=i)}return 0!==Object.keys(t).length?t:null}}})],v.prototype,"aggregateGeometries",null),(0,n._)([(0,m.MZ)({value:null})],v.prototype,"attributes",null),(0,n._)([(0,m.MZ)({value:null,types:s.yR,json:{read:f.rS}})],v.prototype,"geometry",null),(0,n._)([(0,m.MZ)({type:Boolean})],v.prototype,"isAggregate",void 0),(0,n._)([(0,m.MZ)({clonable:"reference"})],v.prototype,"layer",void 0),(0,n._)([(0,m.MZ)({clonable:"reference"})],v.prototype,"origin",void 0),(0,n._)([(0,m.MZ)({type:a.A})],v.prototype,"popupTemplate",void 0),(0,n._)([(0,m.MZ)({clonable:"reference"})],v.prototype,"sourceLayer",void 0),(0,n._)([(0,m.MZ)({value:null,types:o.Es})],v.prototype,"symbol",null),(0,n._)([(0,m.MZ)({clonable:!1,json:{read:!1,write:!1}})],v.prototype,"_version",void 0),(0,n._)([(0,m.MZ)({type:Boolean,value:!0})],v.prototype,"visible",null),v=i=(0,n._)([(0,h.$)("esri.Graphic")],v);const b=v},38961:(e,t,r)=>{r.d(t,{A:()=>u});var i=r(90237),n=r(5503),s=(r(60999),r(49186),r(53966),r(14012),r(80559)),a=r(10107),o=r(40608);let l=class extends n.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,s.fm)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=null!=this.getCollections?this.getCollections():null;if(null==e)return void this.removeAll();let t=0;for(const r of e)null!=r&&(t=this._processCollection(t,r));this.splice(t,this.length)}_createNewInstance(e){return new n.A(e)}_processCollection(e,t){if(!t)return e;const r=this.itemFilterFunction??(e=>!!e);for(const i of t)if(i){if(r(i)){const t=this.indexOf(i,e);t>=0?t!==e&&this.reorder(i,e):this.add(i,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(i);if(Array.isArray(t))for(const r of t)e=this._processCollection(e,r);else e=this._processCollection(e,t)}}return e}};(0,i._)([(0,a.MZ)()],l.prototype,"getCollections",void 0),(0,i._)([(0,a.MZ)()],l.prototype,"getChildrenFunction",void 0),(0,i._)([(0,a.MZ)()],l.prototype,"itemFilterFunction",void 0),l=(0,i._)([(0,o.$)("esri.core.CollectionFlattener")],l);const u=l},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>p,Hq:()=>u,Ie:()=>m,Jt:()=>h,Ne:()=>c,RF:()=>o,aI:()=>v,fA:()=>s,hZ:()=>d,iT:()=>l,is:()=>g,qv:()=>b,vI:()=>y,v_:()=>w,vt:()=>n,w1:()=>a});var i=r(5443);function n(e=w){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,r,i,s,a,o=n()){return o[0]=e,o[1]=t,o[2]=r,o[3]=i,o[4]=s,o[5]=a,o}function a(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new i.A(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function o(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],a=e[2],o=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),a=Math.min(a,t[r+3*e+2]),o=Math.max(o,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=a,e[3]=o,e[4]=l,e[5]=u}function p(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function y(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function m(e){return e?d(e,b):n(b)}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function f(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=i,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function v(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(19419);const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],w=[0,0,0,0,0,0];n()},83960:(e,t,r)=>{r.d(t,{X_:()=>a,zx:()=>o});var i=r(34727),n=r(83047);const s=96;function a(e,t){const r=t||e.extent,i=e.width,a=(0,n.GA)(r?.spatialReference);return r&&i?r.width/i*a*n.dy*s:0}function o(e,t,r){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,r)}},51904:(e,t,r)=>{r.r(t),r.d(t,{default:()=>xe});var i=r(90237),n=r(92602),s=r(52106),a=r(13874),o=r(78888),l=r(5503),u=r(38961),p=r(66552),c=r(4718),y=r(92071),d=r(74887),m=r(36708),h=r(84952),f=r(10107),g=r(56507),v=r(36005),b=r(40608),w=r(43937),I=r(49422),_=r(5443),M=r(16930),S=r(83960),x=r(21325),A=r(4146),T=r(63074),L=r(16131),E=r(8303),O=r(54310),F=r(25036),N=r(82935),Z=r(38458),P=r(60694),C=r(10873),R=r(69622);r(44208),r(53966),r(87811);const U={visible:"visibleSublayers"};let j=class extends R.A{constructor(e){super(e),this.scale=0}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.sublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("wms-sublayer-update",(e=>this.notifyChange(U[e.propertyName])))],"layer"))}get layers(){return this.visibleSublayers.filter((({name:e})=>e)).map((({name:e})=>e)).join()}get version(){this.commitProperty("layers");const e=this.layer;return e&&e.commitProperty("imageTransparency"),(this._get("version")||0)+1}get visibleSublayers(){const{layer:e,scale:t}=this,r=e?.sublayers,i=[],n=e=>{const{minScale:r,maxScale:s,sublayers:a,visible:o}=e;o&&(0===t||(0===r||t<=r)&&(0===s||t>=s))&&(a?a.forEach(n):i.push(e))};return r?.forEach(n),i}toJSON(){const{layer:e,layers:t}=this,{imageFormat:r,imageTransparency:i,version:n}=e;return{format:r,request:"GetMap",service:"WMS",styles:"",transparent:i?"TRUE":"FALSE",version:n,layers:t}}};(0,i._)([(0,f.MZ)()],j.prototype,"layer",null),(0,i._)([(0,f.MZ)({readOnly:!0})],j.prototype,"layers",null),(0,i._)([(0,f.MZ)({type:Number})],j.prototype,"scale",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],j.prototype,"version",null),(0,i._)([(0,f.MZ)({readOnly:!0})],j.prototype,"visibleSublayers",null),j=(0,i._)([(0,b.$)("esri.layers.support.ExportWMSImageParameters")],j);var G,$=r(33446),B=r(4902),H=r(79901);let V=0,q=G=class extends((0,B.sA)(y.L)){constructor(e){super(e),this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.legendUrl=null,this.legendEnabled=!0,this.layer=null,this.maxScale=0,this.minScale=0,this.name=null,this.parent=null,this.popupEnabled=!1,this.queryable=!1,this.sublayers=null,this.spatialReferences=null,this.title=null,this.addHandles([(0,m.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=this,e.layer=this.layer}),m.OH),(0,m.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),m.OH),(0,m.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=this,t.layer=this.layer}),m.OH),(0,m.wB)((()=>this.layer),(e=>{if(this.sublayers)for(const t of this.sublayers)t.layer=e}),m.OH)])}get id(){return this._get("id")??V++}set id(e){this._set("id",e)}readLegendUrl(e,t){return t.legendUrl??t.legendURL??null}get effectiveScaleRange(){const{minScale:e,maxScale:t}=this;return{minScale:e,maxScale:t}}castSublayers(e){return(0,g.dp)(l.A.ofType(G),e)}set visible(e){this._setAndNotifyLayer("visible",e)}clone(){const e=new G;return this.hasOwnProperty("description")&&(e.description=this.description),this.hasOwnProperty("fullExtent")&&(e.fullExtent=this.fullExtent.clone()),this.hasOwnProperty("fullExtents")&&(e.fullExtents=this.fullExtents?.map((e=>e.clone()))??null),this.hasOwnProperty("legendUrl")&&(e.legendUrl=this.legendUrl),this.hasOwnProperty("legendEnabled")&&(e.legendEnabled=this.legendEnabled),this.hasOwnProperty("layer")&&(e.layer=this.layer),this.hasOwnProperty("name")&&(e.name=this.name),this.hasOwnProperty("parent")&&(e.parent=this.parent),this.hasOwnProperty("queryable")&&(e.queryable=this.queryable),this.hasOwnProperty("sublayers")&&(e.sublayers=this.sublayers?.map((e=>e.clone()))),this.hasOwnProperty("spatialReferences")&&(e.spatialReferences=this.spatialReferences?.map((e=>e))),this.hasOwnProperty("visible")&&(e.visible=this.visible),this.hasOwnProperty("title")&&(e.title=this.title),e}_setAndNotifyLayer(e,t){const r=this.layer;this._get(e)!==t&&(this._set(e,t),r&&r.emit("wms-sublayer-update",{propertyName:e,id:this.id}))}};(0,i._)([(0,f.MZ)()],q.prototype,"description",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],q.prototype,"dimensions",void 0),(0,i._)([(0,f.MZ)({type:_.A,json:{name:"extent"}})],q.prototype,"fullExtent",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"fullExtents",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{write:{enabled:!1,overridePolicy:()=>({ignoreOrigin:!0,enabled:!0})}}})],q.prototype,"id",null),(0,i._)([(0,f.MZ)({type:String,json:{name:"legendUrl",write:{ignoreOrigin:!0}}})],q.prototype,"legendUrl",void 0),(0,i._)([(0,v.w)("legendUrl",["legendUrl","legendURL"])],q.prototype,"readLegendUrl",null),(0,i._)([(0,f.MZ)({type:Boolean,json:{name:"showLegend",origins:{"web-map":{read:!1,write:!1},"web-scene":{read:!1,write:!1}}}})],q.prototype,"legendEnabled",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"layer",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"maxScale",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"minScale",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],q.prototype,"effectiveScaleRange",null),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],q.prototype,"name",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"parent",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{read:{source:"showPopup"},write:{ignoreOrigin:!0,target:"showPopup"}}})],q.prototype,"popupEnabled",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{write:{ignoreOrigin:!0}}})],q.prototype,"queryable",void 0),(0,i._)([(0,f.MZ)()],q.prototype,"sublayers",void 0),(0,i._)([(0,H.w)("sublayers")],q.prototype,"castSublayers",null),(0,i._)([(0,f.MZ)({type:[Number],json:{read:{source:"spatialReferences"}}})],q.prototype,"spatialReferences",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],q.prototype,"title",void 0),(0,i._)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"defaultVisibility"}}})],q.prototype,"visible",null),q=G=(0,i._)([(0,b.$)("esri.layers.support.WMSSublayer")],q);const D=q;var k=r(4576),W=r(49186),J=r(96285);const K={84:4326,83:4269,27:4267};function z(e){if(!e)return null;const t={idCounter:-1};"string"==typeof e&&(e=(new DOMParser).parseFromString(e,"text/xml"));const r=e.documentElement;if("ServiceExceptionReport"===r.nodeName){const e=Array.prototype.slice.call(r.childNodes).map((e=>e.textContent)).join("\r\n");throw new W.A("wmslayer:wms-capabilities-xml-is-not-valid","The server returned errors when the WMS capabilities were requested.",e)}const i=ee("Capability",r),n=ee("Service",r),s=i&&ee("Request",i);if(!i||!n||!s)return null;const a=ee("Layer",i);if(!a)return null;const o="WMS_Capabilities"===r.nodeName||"WMT_MS_Capabilities"===r.nodeName?r.getAttribute("version"):"1.3.0",l=re("Title",n,"")||re("Name",n,""),u=re("AccessConstraints",n,""),p=/^none$/i.test(u)?"":u,c=re("Abstract",n,""),y=parseInt(re("MaxWidth",n,"5000"),10),d=parseInt(re("MaxHeight",n,"5000"),10),m=se(s,"GetMap"),h=ne(s,"GetMap"),f=oe(a,o,t);if(!f)return null;let g,v=0;const b=Array.prototype.slice.call(i.childNodes),w=f.sublayers??[],I=e=>{null!=e&&w.push(e)};b.forEach((e=>{"Layer"===e.nodeName&&(0===v?g=e:1===v?(f.name&&(f.name="",I(oe(g,o,t))),I(oe(e,o,t))):I(oe(e,o,t)),v++)}));let M=f.sublayers,S=f.extent;const x=f.fullExtents??[];if(M||(M=[]),0===M.length&&M.push(f),!S){const e=new _.A(M[0].extent);f.extent=e.toJSON(),S=f.extent}const A=f.spatialReferences.length>0?f.spatialReferences:X(f),T=ne(s,"GetFeatureInfo"),L=T?se(s,"GetFeatureInfo"):null,E=Q(M),O=f.minScale||0,F=f.maxScale||0,N=f.dimensions??[],Z=E.reduce(((e,t)=>e.concat(t.dimensions??[])),[]),P=N.concat(Z).filter(ue);let C=null;if(P.length){const e=P.map((e=>{const{extent:t}=e;return function(e){return Array.isArray(e)&&e.length>0&&e[0]instanceof Date}(t)?t.map((e=>e.getTime())):t?.map((e=>[e.min.getTime(),e.max.getTime()]))})).flat(2).filter(k.Ru);C={startTimeField:null,endTimeField:null,trackIdField:void 0,timeExtent:[Math.min(...e),Math.max(...e)]}}return{copyright:p,description:c,dimensions:N,extent:S,fullExtents:x,featureInfoFormats:L,featureInfoUrl:T,mapUrl:h,maxWidth:y,maxHeight:d,maxScale:F,minScale:O,layers:E,spatialReferences:A,supportedImageFormatTypes:m,timeInfo:C,title:l,version:o}}function X(e){if(e.spatialReferences.length>0)return e.spatialReferences;if(e.sublayers)for(const t of e.sublayers){const e=X(t);if(e.length>0)return e}return[]}function Q(e){let t=[];for(const r of e)t.push(r),r.sublayers?.length&&(t=t.concat(Q(r.sublayers)),delete r.sublayers);return t}function Y(e,t,r){return t.getAttribute(e)??r}function ee(e,t){for(let r=0;r<t.childNodes.length;r++){const i=t.childNodes[r];if(le(i)&&i.nodeName===e)return i}return null}function te(e,t){if(null==t)return[];const r=[];for(let i=0;i<t.childNodes.length;i++){const n=t.childNodes[i];le(n)&&n.nodeName===e&&r.push(n)}return r}function re(e,t,r){return ee(e,t)?.textContent??r}function ie(e,t,r){if(!e)return null;const i=parseFloat(e.getAttribute("minx")),n=parseFloat(e.getAttribute("miny")),s=parseFloat(e.getAttribute("maxx")),a=parseFloat(e.getAttribute("maxy"));let o,l,u,p;r?(o=isNaN(n)?-Number.MAX_VALUE:n,l=isNaN(i)?-Number.MAX_VALUE:i,u=isNaN(a)?Number.MAX_VALUE:a,p=isNaN(s)?Number.MAX_VALUE:s):(o=isNaN(i)?-Number.MAX_VALUE:i,l=isNaN(n)?-Number.MAX_VALUE:n,u=isNaN(s)?Number.MAX_VALUE:s,p=isNaN(a)?Number.MAX_VALUE:a);const c=new M.A({wkid:t});return new _.A({xmin:o,ymin:l,xmax:u,ymax:p,spatialReference:c})}function ne(e,t){const r=ee(t,e);if(r){const e=ee("DCPType",r);if(e){const t=ee("HTTP",e);if(t){const e=ee("Get",t);if(e){let t=function(e,t,r){const i=ee("OnlineResource",r);return i?Y("xlink:href",i,null):null}(0,0,e);if(t){const e=t.indexOf("&");return-1!==e&&e===t.length-1&&(t=t.slice(0,-1)),function(e,t){const r=[],i=(0,h.An)(e);for(const e in i.query)i.query.hasOwnProperty(e)&&(t.includes(e.toLowerCase())||r.push(e+"="+i.query[e]));return i.path+(r.length?"?"+r.join("&"):"")}(t,["service","request"])}}}}}return null}function se(e,t){const r=te("Operation",e);if(!r.length)return te("Format",ee(t,e)).map((({textContent:e})=>e)).filter(k.Ru);const i=[];for(const e of r)if(e.getAttribute("name")===t){const t=te("Format",e);for(const{textContent:e}of t)null!=e&&i.push(e)}return i}function ae(e,t,r){const i=ee(t,e);if(!i)return r;const{textContent:n}=i;if(null==n||""===n)return r;const s=Number(n);return isNaN(s)?r:s}function oe(e,t,r){if(!e)return null;const i={id:r.idCounter++,fullExtents:[],parentLayerId:null,queryable:"1"===e.getAttribute("queryable"),spatialReferences:[],sublayers:null},n=ee("LatLonBoundingBox",e),s=ee("EX_GeographicBoundingBox",e);let a=null;n&&(a=ie(n,4326)),s&&(a=new _.A(0,0,0,0,new M.A({wkid:4326})),a.xmin=parseFloat(re("westBoundLongitude",s,"0")),a.ymin=parseFloat(re("southBoundLatitude",s,"0")),a.xmax=parseFloat(re("eastBoundLongitude",s,"0")),a.ymax=parseFloat(re("northBoundLatitude",s,"0"))),n||s||(a=new _.A(-180,-90,180,90,new M.A({wkid:4326}))),i.minScale=ae(e,"MaxScaleDenominator",0),i.maxScale=ae(e,"MinScaleDenominator",0);const o=["1.0.0","1.1.0","1.1.1"].includes(t)?"SRS":"CRS";return Array.prototype.slice.call(e.childNodes).forEach((e=>{if("Name"===e.nodeName)i.name=e.textContent||"";else if("Title"===e.nodeName)i.title=e.textContent||"";else if("Abstract"===e.nodeName)i.description=e.textContent||"";else if("BoundingBox"===e.nodeName){const r=e.getAttribute(o);if(r&&0===r.indexOf("EPSG:")){const i=parseInt(r.slice(5),10);0===i||isNaN(i)||a||(a="1.3.0"===t?ie(e,i,(0,Z.m)(i)):ie(e,i))}const n=r?.indexOf(":");if(n&&n>-1){let s=parseInt(r.slice(n+1),10);0===s||isNaN(s)||(s=K[s]??s);const a="1.3.0"===t?ie(e,s,(0,Z.m)(s)):ie(e,s);a&&i.fullExtents&&i.fullExtents.push(a)}}else if(e.nodeName===o)(e.textContent?.split(" ")??[]).forEach((e=>{const t=e.includes(":")?parseInt(e.split(":")[1],10):parseInt(e,10);if(0!==t&&!isNaN(t)){const e=K[t]??t;i.spatialReferences.includes(e)||i.spatialReferences.push(e)}}));else if("Style"!==e.nodeName||i.legendUrl){if("Layer"===e.nodeName){const n=oe(e,t,r);n&&(n.parentLayerId=i.id,i.sublayers||(i.sublayers=[]),i.sublayers.push(n))}}else{const t=ee("LegendURL",e);if(t){const e=ee("OnlineResource",t);e&&(i.legendUrl=e.getAttribute("xlink:href"))}}})),i.extent=a?.toJSON(),i.dimensions=te("Dimension",e).filter((e=>e.getAttribute("name")&&e.getAttribute("units")&&e.textContent)).map((e=>{const t=e.getAttribute("name"),r=e.getAttribute("units"),i=e.textContent,n=e.getAttribute("unitSymbol")??void 0,s=e.getAttribute("default")??void 0,a="0"!==Y("default",e,"0"),o="0"!==Y("nearestValue",e,"0"),l="0"!==Y("current",e,"0");return ue({name:t,units:r})?{name:"time",units:"ISO8601",extent:ye(i),default:ye(s),multipleValues:a,nearestValue:o,current:l}:function(e){return/^elevation$/i.test(e.name)&&/^(epsg|crs):\d+$/i.test(e.units)}({name:t,units:r})?{name:"elevation",units:r,extent:pe(i),unitSymbol:n,default:pe(s),multipleValues:a,nearestValue:o}:{name:t,units:r,extent:ce(i),unitSymbol:n,default:ce(s),multipleValues:a,nearestValue:o}})),i}function le(e){return e.nodeType===Node.ELEMENT_NODE}function ue(e){return/^time$/i.test(e.name)&&/^iso8601$/i.test(e.units)}function pe(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:parseFloat(t[0]),max:parseFloat(t[1]),resolution:t.length>=3&&"0"!==t[2]?parseFloat(t[2]):void 0}})).filter(k.Ru):r.map((e=>parseFloat(e)))}function ce(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:t[0],max:t[1],resolution:t.length>=3&&"0"!==t[2]?t[2]:void 0}})).filter(k.Ru):r}function ye(e){if(!e)return;const t=e.includes("/"),r=e.split(",");return t?r.map((e=>{const t=e.split("/");return t.length<2?null:{min:de(t[0]),max:de(t[1]),resolution:t.length>=3&&"0"!==t[2]?me(t[2]):void 0}})).filter(k.Ru):r.map((e=>de(e)))}function de(e){return J.c9.fromISO(e,{zone:J.mQ.utcInstance}).toJSDate()}function me(e){const t=e.match(/(?:p(\d+y|\d+(?:\.|,)\d+y)?(\d+m|\d+(?:\.|,)\d+m)?(\d+d|\d+(?:\.|,)\d+d)?)?(?:t(\d+h|\d+(?:\.|,)\d+h)?(\d+m|\d+(?:\.|,)\d+m)?(\d+s|\d+(?:\.|,)\d+s)?)?/i);return t?{years:he(t[1]),months:he(t[2]),days:he(t[3]),hours:he(t[4]),minutes:he(t[5]),seconds:he(t[6])}:null}function he(e){if(!e)return 0;const t=e.match(/(?:\d+(?:\.|,)\d+|\d+)/);if(!t)return 0;const r=t[0].replace(",",".");return Number(r)}function fe(e){return e.toISOString().replace(/\.[0-9]{3}/,"")}function ge(e){if(!e||e.isAllTime||e.isEmpty)return;const{start:t,end:r}=e;return t&&r&&t.getTime()===r.getTime()?`${fe(t)}`:`${t?fe(t):"0000-01-01T00:00:00Z"}/${r?fe(r):"9999-12-31T23:59:59Z"}`}const ve=new Set([102100,3857,102113,900913]),be=new Set([3395,54004]),we=new p.J({bmp:"image/bmp",gif:"image/gif",jpg:"image/jpeg",png:"image/png",svg:"image/svg+xml"},{ignoreUnknown:!1});function Ie(e){return"text/html"===e}function _e(e){return"text/plain"===e}let Me=class extends((0,T.dM)((0,N.e)((0,O.J)((0,F.j)((0,L.q)((0,E.A)((0,y.P)(A.A)))))))){constructor(...e){super(...e),this.allSublayers=new u.A({getCollections:()=>[this.sublayers],getChildrenFunction:e=>e.sublayers}),this.customParameters=null,this.customLayerParameters=null,this.copyright=null,this.description=null,this.dimensions=null,this.fullExtent=null,this.fullExtents=null,this.featureInfoFormats=null,this.featureInfoUrl=null,this.fetchFeatureInfoFunction=null,this.imageFormat=null,this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.legendEnabled=!0,this.mapUrl=null,this.isReference=null,this.operationalLayerType="WMS",this.spatialReference=null,this.spatialReferences=null,this.sublayers=null,this.type="wms",this.version=null,this.addHandles([(0,m.on)((()=>this.sublayers),"after-add",(({item:e})=>{e.parent=e.layer=this}),m.OH),(0,m.on)((()=>this.sublayers),"after-remove",(({item:e})=>{e.layer=e.parent=null}),m.OH),(0,m.wB)((()=>this.sublayers),((e,t)=>{if(t)for(const e of t)e.layer=e.parent=null;if(e)for(const t of e)t.parent=t.layer=this}),m.OH)])}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this.allSublayers.destroy()}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WMS"]},e).catch(d.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}readFullExtentFromItemOrMap(e,t){const r=t.extent;return r?new _.A({xmin:r[0][0],ymin:r[0][1],xmax:r[1][0],ymax:r[1][1]}):null}writeFullExtent(e,t){t.extent=[[e.xmin,e.ymin],[e.xmax,e.ymax]]}get featureInfoFormat(){return null==this.featureInfoFormats?null:this.featureInfoFormats.find(Ie)??this.featureInfoFormats.find(_e)??null}set featureInfoFormat(e){null==e?(this.revert("featureInfoFormat","service"),this._clearOverride("featureInfoFormat")):(Ie(e)||_e(e))&&this._override("featureInfoFormat",e)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("image/png")?"image/png":r&&r[0]}readSpatialReferenceFromItemOrDocument(e,t){return new M.A(t.spatialReferences[0])}writeSpatialReferences(e,t){const r=this.spatialReference?.wkid;e&&r?(t.spatialReferences=e.filter((e=>e!==r)),t.spatialReferences.unshift(r)):t.spatialReferences=e}readSublayersFromItemOrMap(e,t,r){return Se(t.layers,r,t.visibleLayers)}readSublayers(e,t,r){return Se(t.layers,r)}writeSublayers(e,t,r,i){t.layers=[];const n=new Map,s=e.flatten((({sublayers:e})=>e??[]));for(const e of s)if("number"==typeof e.parent?.id){const t=n.get(e.parent.id);null!=t?t.push(e.id):n.set(e.parent.id,[e.id])}for(const e of s){const r={sublayer:e,...i},s=e.write({parentLayerId:"number"==typeof e.parent?.id?e.parent.id:-1},r);if(n.has(e.id)&&(s.sublayerIds=n.get(e.id)),!e.sublayers&&e.name){const i=e.write({},r);delete i.id,t.layers.push(i)}}t.visibleLayers=s.filter((({visible:e,sublayers:t})=>e&&!t)).map((({name:e})=>e)).toArray()}set url(e){if(!e)return void this._set("url",e);const{path:t,query:r}=(0,h.An)(e);for(const e in r)/^(request|service)$/i.test(e)&&delete r[e];const i=(0,h.a6)(t,r??{});this._set("url",i)}createExportImageParameters(e,t,r,i){const n=i?.pixelRatio??1,s=(0,S.X_)({extent:e,width:t})*n,a=new j({layer:this,scale:s}),{xmin:o,ymin:l,xmax:u,ymax:p,spatialReference:c}=e,y=function(e,t){let r=e.wkid;return null==t?r:(null!=r&&t.includes(r)||!e.latestWkid||(r=e.latestWkid),null!=r&&ve.has(r)?t.find((e=>ve.has(e)))||t.find((e=>be.has(e)))||102100:r)}(c,this.spatialReferences),d="1.3.0"===this.version&&(0,Z.m)(y)?`${l},${o},${p},${u}`:`${o},${l},${u},${p}`,m=a.toJSON(),h="1.3.0"===this.version?"crs":"srs";return{bbox:d,[h]:null==y||isNaN(y)?void 0:"EPSG:"+y,...m}}async fetchImage(e,t,r,i){const n=this.mapUrl,s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const a=ge(i?.timeExtent),l={responseType:"image",query:this._mixCustomParameters({width:t,height:r,...s,time:a,...this.refreshParameters}),signal:i?.signal};return(0,o.A)(n??"",l).then((e=>e.data))}async fetchImageBitmap(e,t,r,i){const n=this.mapUrl??"",s=this.createExportImageParameters(e,t,r,i);if(!s.layers){const e=document.createElement("canvas");return e.width=t,e.height=r,e}const a=ge(i?.timeExtent),l={responseType:"blob",query:this._mixCustomParameters({width:t,height:r,...s,time:a,...this.refreshParameters}),signal:i?.signal},{data:u}=await(0,o.A)(n,l);return(0,$.m)(u,n,i?.signal)}fetchFeatureInfo(e,t,r,i,n){const s=(0,S.X_)({extent:e,width:t}),a=function(e){const t=e.filter((e=>e.popupEnabled&&e.name&&e.queryable));return t.length?t.map((({name:e})=>e)).join():null}(new j({layer:this,scale:s}).visibleSublayers);if(null==this.featureInfoUrl||null==a)return Promise.resolve([]);if(null==this.fetchFeatureInfoFunction&&null==this.featureInfoFormat)return Promise.resolve([]);const o="1.3.0"===this.version?{I:i,J:n}:{x:i,y:n},l={query_layers:a,request:"GetFeatureInfo",info_format:this.featureInfoFormat,feature_count:25,width:t,height:r,...o},u={...this.createExportImageParameters(e,t,r),...l},p=this._mixCustomParameters(u);return null!=this.fetchFeatureInfoFunction?this.fetchFeatureInfoFunction(p):this._defaultFetchFeatureInfoFunction((0,h.a6)(this.featureInfoUrl,p))}findSublayerById(e){return this.allSublayers.find((t=>t.id===e))}findSublayerByName(e){return this.allSublayers.find((t=>t.name===e))}serviceSupportsSpatialReference(e){return(0,P.bd)(this.url)||null!=this.spatialReferences&&this.spatialReferences.some((t=>{const r=900913===t?M.A.WebMercator:new M.A({wkid:t});return(0,x.aI)(r,e)}))}_defaultFetchFeatureInfoFunction(e){const t=document.createElement("iframe");t.src=(0,h.yM)(e),t.style.border="none",t.style.margin="0",t.style.width="100%",t.setAttribute("sandbox","");const r=new a.A({title:this.title,content:t}),i=new s.A({sourceLayer:this,popupTemplate:r});return Promise.resolve([i])}async _fetchService(e){if(!this.resourceInfo&&this.parsedUrl?.path){const{path:t,query:r}=this.parsedUrl,{data:i}=await(0,o.A)(t,{query:{SERVICE:"WMS",REQUEST:"GetCapabilities",...r,...this.customParameters},responseType:"xml",signal:e});this.resourceInfo=z(i)}if(this.parsedUrl){const e=new h.s0(this.parsedUrl.path),{httpsDomains:t}=n.A.request;"https"!==e.scheme||e.port&&"443"!==e.port||!e.host||t.includes(e.host)||t.push(e.host)}this.read(this.resourceInfo,{origin:"service"})}_mixCustomParameters(e){if(!this.customLayerParameters&&!this.customParameters)return e;const t={...this.customParameters,...this.customLayerParameters};for(const r in t)e[r.toLowerCase()]=t[r];return e}};function Se(e,t,r){e=e??[];const i=new Map;e.every((e=>null==e.id))&&(e=(0,c.o8)(e)).forEach(((e,t)=>e.id=t));for(const n of e){const e=new D;e.read(n,t),r&&!r.includes(e.name)&&(e.visible=!1),i.set(e.id,e)}const n=[];for(const t of e){const e=null!=t.id?i.get(t.id):null;if(e)if(null!=t.parentLayerId&&t.parentLayerId>=0){const r=i.get(t.parentLayerId);if(!r)continue;r.sublayers||(r.sublayers=new l.A),r.sublayers.push(e)}else n.push(e)}return n}(0,i._)([(0,f.MZ)({readOnly:!0})],Me.prototype,"allSublayers",void 0),(0,i._)([(0,f.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customParameters",void 0),(0,i._)([(0,f.MZ)({json:{type:Object,write:!0}})],Me.prototype,"customLayerParameters",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:!0}})],Me.prototype,"copyright",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"description",void 0),(0,i._)([(0,f.MZ)({readOnly:!0})],Me.prototype,"dimensions",void 0),(0,i._)([(0,f.MZ)({json:{type:[[Number]],read:{source:"extent"},write:{target:"extent"},origins:{"web-document":{write:{ignoreOrigin:!0}},"portal-item":{write:{ignoreOrigin:!0}}}}})],Me.prototype,"fullExtent",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"fullExtent",["extent"])],Me.prototype,"readFullExtentFromItemOrMap",null),(0,i._)([(0,w.K)(["web-document","portal-item"],"fullExtent",{extent:{type:[[Number]]}})],Me.prototype,"writeFullExtent",null),(0,i._)([(0,f.MZ)()],Me.prototype,"fullExtents",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoFormat",null),(0,i._)([(0,f.MZ)({type:[String],readOnly:!0})],Me.prototype,"featureInfoFormats",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"featureInfoUrl",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"fetchFeatureInfoFunction",void 0),(0,i._)([(0,f.MZ)({type:String,json:{origins:{"web-document":{default:"image/png",type:we.jsonValues,read:{reader:we.read,source:"format"},write:{writer:we.write,target:"format"}}}}})],Me.prototype,"imageFormat",void 0),(0,i._)([(0,v.w)("imageFormat",["supportedImageFormatTypes"])],Me.prototype,"readImageFormat",null),(0,i._)([(0,f.MZ)({type:Number,json:{read:{source:"maxHeight"},write:{target:"maxHeight"}}})],Me.prototype,"imageMaxHeight",void 0),(0,i._)([(0,f.MZ)({type:Number,json:{read:{source:"maxWidth"},write:{target:"maxWidth"}}})],Me.prototype,"imageMaxWidth",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"imageTransparency",void 0),(0,i._)([(0,f.MZ)(C.fV)],Me.prototype,"legendEnabled",void 0),(0,i._)([(0,f.MZ)({type:["show","hide","hide-children"]})],Me.prototype,"listMode",void 0),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"mapUrl",void 0),(0,i._)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Me.prototype,"isReference",void 0),(0,i._)([(0,f.MZ)({type:["WMS"]})],Me.prototype,"operationalLayerType",void 0),(0,i._)([(0,f.MZ)()],Me.prototype,"resourceInfo",void 0),(0,i._)([(0,f.MZ)({type:M.A,json:{origins:{service:{read:{source:"extent.spatialReference"}}},write:!1}})],Me.prototype,"spatialReference",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"spatialReference",["spatialReferences"])],Me.prototype,"readSpatialReferenceFromItemOrDocument",null),(0,i._)([(0,f.MZ)({type:[g.jz],json:{read:!1,origins:{service:{read:!0},"web-document":{read:!1,write:{ignoreOrigin:!0}},"portal-item":{read:!1,write:{ignoreOrigin:!0}}}}})],Me.prototype,"spatialReferences",void 0),(0,i._)([(0,w.K)(["web-document","portal-item"],"spatialReferences")],Me.prototype,"writeSpatialReferences",null),(0,i._)([(0,f.MZ)({type:l.A.ofType(D),json:{write:{target:"layers",overridePolicy(e,t,r){if(function(e,t){return e.some((e=>{for(const r in e)if((0,I.R)(e,r,null,t))return!0;return!1}))}(this.allSublayers,r))return{ignoreOrigin:!0}}}}})],Me.prototype,"sublayers",void 0),(0,i._)([(0,v.w)(["web-document","portal-item"],"sublayers",["layers","visibleLayers"])],Me.prototype,"readSublayersFromItemOrMap",null),(0,i._)([(0,v.w)("service","sublayers",["layers"])],Me.prototype,"readSublayers",null),(0,i._)([(0,w.K)("sublayers",{layers:{type:[D]},visibleLayers:{type:[String]}})],Me.prototype,"writeSublayers",null),(0,i._)([(0,f.MZ)({json:{read:!1},readOnly:!0,value:"wms"})],Me.prototype,"type",void 0),(0,i._)([(0,f.MZ)(C.OZ)],Me.prototype,"url",null),(0,i._)([(0,f.MZ)({type:String,json:{write:{ignoreOrigin:!0}}})],Me.prototype,"version",void 0),Me=(0,i._)([(0,b.$)("esri.layers.WMSLayer")],Me);const xe=Me},16131:(e,t,r)=>{r.d(t,{q:()=>w});var i=r(90237),n=r(49186),s=r(84952),a=r(10107),o=r(56507),l=(r(87811),r(44208),r(36005)),u=r(40608),p=r(43937),c=r(89317),y=r(45917),d=r(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},h={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},f={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},g={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":h,"web-map/tables":f,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":h,"link-chart/tables":f,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var v=r(10873),b=r(79677);const w=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,r){return"Group Layer"===r?.portalItem?.type?void 0:e}writeListMode(e,t,r,i){(i&&"ground"===i.layerContainerType||e&&(0,d.R)(this,r,{},i))&&(t[r]=e)}writeOperationalLayerType(e,t,r,i){e&&"tables"!==i?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?b.A.fromArray(e):null}writeTimeExtent(e,t,r,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new n.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[r]=e.toArray())}read(e,t){t&&(t.layer=this),(0,y.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,r=g[e];let i=!!r?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return t.messages?.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const r=super.write(e,{...t,layer:this}),i=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof n.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(r?.url)?(t?.messages?.push(new n.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:r}beforeSave(){}};return(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,i._)([(0,a.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,a.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:c.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,a.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,i._)([(0,p.K)("title"),(0,p.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,i._)([(0,a.MZ)({type:b.A,json:{origins:{"web-scene":{write:{layerContainerTypes:c.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,i._)([(0,p.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:c.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),n=r(92602),s=r(70333),a=r(78888),o=r(60999),l=r(49186),u=r(53966),p=r(97768),c=r(74887),y=r(84952),d=r(10107),m=(r(44208),r(87811),r(36005)),h=r(40608),f=r(43937),g=r(83531),v=r(20655),b=r(80812),w=r(41318),I=r(10407);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new b.default({id:t.itemId,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await Promise.all([r.e(5356),r.e(1204)]).then(r.bind(r,41204));return(0,c.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.QP)(e),!0))))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,c.QP)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,I.It)(r);let n,a;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,c.QP)(e)}if(!n||!(0,y.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.QP)(e)}const o=!0,l=!1,u=!1;if(!a)return{features:{edit:o,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,I.It)(r)}catch(e){(0,c.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const r=M.credential===t?M.user:await this._fetchEditingUser(e);return M.credential=t,M.user=r,null==r?.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=s.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,y.S8)(n.restUrl)===(0,y.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.A.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||v.A.getDefault());return r&&i&&!(0,y.ut)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,i._)([(0,d.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,m.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,d.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,d.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,h.$)("esri.layers.mixins.PortalLayer")],t),t},M={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var i=r(90237),n=(r(44208),r(53966)),s=r(74887),a=r(10107),o=r(79901),l=(r(87811),r(40608)),u=r(89317),p=r(5503),c=(r(60999),r(49186),r(14012),r(80559));const y=new p.A,d=new WeakMap;function m(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&y.push(new WeakRef(e))}function h(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:h(t,e%t):0}let f=0,g=0;function v(){const e=Date.now();let t=!1;for(const r of y){const i=r.deref();i?i.refreshInterval&&e-(d.get(i)??0)+5>=6e4*i.refreshInterval&&(d.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=y.length-1;e>=0;e--)y.at(e).deref()||y.removeAt(e)}(0,c.fm)((()=>{const e=Date.now();let t=0;for(const r of y){const i=r.deref();i&&(t=h(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?d.get(i)||d.set(i,e):d.delete(i))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(v,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,s.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||m(this)}),(()=>{}))}destroy(){!function(e){const t=y.find((t=>t.deref()===e));t&&y.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,s.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,i._)([(0,a.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,o.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,a.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},82935:(e,t,r)=>{r.d(t,{B:()=>d,e:()=>m});var i=r(90237),n=r(10107),s=(r(44208),r(53966),r(87811),r(36005)),a=r(40608),o=r(89317),l=r(30524),u=r(96184),p=r(73133),c=r(79677),y=r(10184);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:o.K}}},m=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,n=p.j.fromJSON(r.timeOffsetUnits);return i&&n?new y.A({value:i,unit:n}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.MZ)({type:c.A,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.MZ)({type:y.A})],t.prototype,"timeOffset",void 0),(0,i._)([(0,s.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.MZ)(d)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,a.$)("esri.layers.mixins.TemporalLayer")],t),t}},38458:(e,t,r)=>{r.d(t,{m:()=>n});const i=[[3819,3819],[3821,3824],[3889,3889],[3906,3906],[4001,4025],[4027,4036],[4039,4047],[4052,4055],[4074,4075],[4080,4081],[4120,4176],[4178,4185],[4188,4216],[4218,4289],[4291,4304],[4306,4319],[4322,4326],[4463,4463],[4470,4470],[4475,4475],[4483,4483],[4490,4490],[4555,4558],[4600,4646],[4657,4765],[4801,4811],[4813,4821],[4823,4824],[4901,4904],[5013,5013],[5132,5132],[5228,5229],[5233,5233],[5246,5246],[5252,5252],[5264,5264],[5324,5340],[5354,5354],[5360,5360],[5365,5365],[5370,5373],[5381,5381],[5393,5393],[5451,5451],[5464,5464],[5467,5467],[5489,5489],[5524,5524],[5527,5527],[5546,5546],[2044,2045],[2081,2083],[2085,2086],[2093,2093],[2096,2098],[2105,2132],[2169,2170],[2176,2180],[2193,2193],[2200,2200],[2206,2212],[2319,2319],[2320,2462],[2523,2549],[2551,2735],[2738,2758],[2935,2941],[2953,2953],[3006,3030],[3034,3035],[3038,3051],[3058,3059],[3068,3068],[3114,3118],[3126,3138],[3150,3151],[3300,3301],[3328,3335],[3346,3346],[3350,3352],[3366,3366],[3389,3390],[3416,3417],[3833,3841],[3844,3850],[3854,3854],[3873,3885],[3907,3910],[4026,4026],[4037,4038],[4417,4417],[4434,4434],[4491,4554],[4839,4839],[5048,5048],[5105,5130],[5253,5259],[5269,5275],[5343,5349],[5479,5482],[5518,5519],[5520,5520],[20004,20032],[20064,20092],[21413,21423],[21473,21483],[21896,21899],[22171,22177],[22181,22187],[22191,22197],[25884,25884],[27205,27232],[27391,27398],[27492,27492],[28402,28432],[28462,28492],[30161,30179],[30800,30800],[31251,31259],[31275,31279],[31281,31290],[31466,31700]];function n(e){return null!=e&&i.some((([t,r])=>e>=t&&e<=r))}},96184:(e,t,r)=>{r.d(t,{A:()=>h});var i=r(90237),n=r(69540),s=r(25482),a=r(10107),o=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(79677),c=r(10184),y=r(56400);function d(e,t){return c.A.fromJSON({value:e,unit:t})}let m=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?p.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,i._)([(0,a.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,i._)([(0,a.MZ)({type:p.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,i._)([(0,o.w)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.K)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,i._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,i._)([(0,a.MZ)({type:c.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,i._)([(0,o.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,i._)([(0,u.K)("interval")],m.prototype,"writeInterval",null),(0,i._)([(0,a.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,i._)([(0,a.MZ)((0,y.P6)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),(0,i._)([(0,a.MZ)({type:[Date],json:{read:!1}})],m.prototype,"stops",void 0),m=(0,i._)([(0,l.$)("esri.layers.support.TimeInfo")],m);const h=m},33446:(e,t,r)=>{r.d(t,{C:()=>a,m:()=>s});var i=r(49186),n=r(74887);async function s(e,t,r){let s;try{s=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.Te)(r),s}async function a(e,t,r,s,a){let o;try{o=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${s}`,{error:e,level:t,row:r,col:s})}return(0,n.Te)(a),o}},73133:(e,t,r)=>{r.d(t,{j:()=>i});const i=(0,r(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},10184:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),s=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(93223)),u=r(40608),p=r(73133);let c=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,a.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(p.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,i._)([(0,o.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,i._)([(0,u.$)("esri.time.TimeInterval")],c);const y=c}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5242],{9775:(e,t,r)=>{r.d(t,{A:()=>i});var s=r(62788),n=r(95488);class i{constructor(e=e=>e.values().next().value){this._peeker=e,this._observable=new n.I,this._items=new Set}get length(){return(0,s.gc)(this._observable),this._items.size}clear(){0!==this.length&&(this._items.clear(),this._observable.notify())}last(){if(0===this.length)return;let e;for(e of this._items);return e}peek(){if(0!==this.length)return this._peeker(this._items)}push(e){this.contains(e)||(this._items.add(e),this._observable.notify())}contains(e){return(0,s.gc)(this._observable),this._items.has(e)}pop(){if(0===this.length)return;const e=this.peek();return this._items.delete(e),this._observable.notify(),e}popLast(){if(0===this.length)return;const e=this.last();return this._items.delete(e),this._observable.notify(),e}remove(e){this.contains(e)&&(this._items.delete(e),this._observable.notify())}filter(e){const t=this.length;return this._items.forEach((t=>{e(t)||this._items.delete(t)})),t!==this._items.size&&this._observable.notify(),this}*[Symbol.iterator](){(0,s.gc)(this._observable),yield*this._items}}},75503:(e,t,r)=>{r.d(t,{E:()=>M,w:()=>o});var s=r(4576),n=(r(44208),r(3694)),i=r(11006);class o{constructor(e=9,t){this._compareMinX=u,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),w.prune(),v.prune(),I.prune(),T.prune()}all(e){a(this._data,e)}search(e,t){let r=this._data;const s=this._toBBox;if(_(e,r))for(w.clear();r;){for(let n=0,i=r.children.length;n<i;n++){const i=r.children[n],o=r.leaf?s(i):i;_(e,o)&&(r.leaf?t(i):g(e,o)?a(i,t):w.push(i))}r=w.pop()}}collides(e){let t=this._data;const r=this._toBBox;if(!_(e,t))return!1;for(w.clear();t;){for(let s=0,n=t.children.length;s<n;s++){const n=t.children[s],i=t.leaf?r(n):n;if(_(e,i)){if(t.leaf||g(e,i))return!0;w.push(n)}}t=w.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,r=e.length;t<r;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,r=this._data,n=null,i=0,o=!1;const a=this._toBBox(e);for(I.clear(),T.clear();r||I.length>0;){if(r||(r=I.pop(),n=I.data[I.length-1],i=T.pop()??0,o=!0),r.leaf&&(t=(0,s.qh)(r.children,e,r.children.length,r.indexHint),-1!==t))return r.children.splice(t,1),I.push(r),this._condense(I),this;o||r.leaf||!g(r,a)?n?(i++,r=n.children[i],o=!1):r=null:(I.push(r),T.push(i),i=0,n=r,r=r.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,r,s){const n=r-t+1;let i=this._maxEntries;if(n<=i){const s=new A(e.slice(t,r+1));return l(s,this._toBBox),s}s||(s=Math.ceil(Math.log(n)/Math.log(i)),i=Math.ceil(n/i**(s-1)));const o=new x([]);o.height=s;const a=Math.ceil(n/i),p=a*Math.ceil(Math.sqrt(i));b(e,t,r,p,this._compareMinX);for(let n=t;n<=r;n+=p){const t=Math.min(n+p-1,r);b(e,n,t,a,this._compareMinY);for(let r=n;r<=t;r+=a){const n=Math.min(r+a-1,t);o.children.push(this._build(e,r,n,s-1))}}return l(o,this._toBBox),o}_insert(e,t,r){const s=this._toBBox,n=r?e:s(e);I.clear();const i=function(e,t,r,s){for(;s.push(t),!0!==t.leaf&&s.length-1!==r;){let r,s=1/0,n=1/0;for(let i=0,o=t.children.length;i<o;i++){const o=t.children[i],a=c(o),l=m(e,o)-a;l<n?(n=l,s=a<s?a:s,r=o):l===n&&a<s&&(s=a,r=o)}t=r||t.children[0]}return t}(n,this._data,t,I);for(i.children.push(e),d(i,n);t>=0&&I.data[t].children.length>this._maxEntries;)this._split(I,t),t--;!function(e,t,r){for(let s=r;s>=0;s--)d(t.data[s],e)}(n,I,t)}_split(e,t){const r=e.data[t],s=r.children.length,n=this._minEntries;this._chooseSplitAxis(r,n,s);const i=this._chooseSplitIndex(r,n,s);if(!i)return;const o=r.children.splice(i,r.children.length-i),a=r.leaf?new A(o):new x(o);a.height=r.height,l(r,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(r,a)}_splitRoot(e,t){this._data=new x([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,r){let s,n,i;s=n=1/0;for(let o=t;o<=r-t;o++){const t=p(e,0,o,this._toBBox),a=p(e,o,r,this._toBBox),l=f(t,a),d=c(t)+c(a);l<s?(s=l,i=o,n=d<n?d:n):l===s&&d<n&&(n=d,i=o)}return i}_chooseSplitAxis(e,t,r){const s=e.leaf?this._compareMinX:u,n=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,r,s)<this._allDistMargin(e,t,r,n)&&e.children.sort(s)}_allDistMargin(e,t,r,s){e.children.sort(s);const n=this._toBBox,i=p(e,0,t,n),o=p(e,r-t,r,n);let a=y(i)+y(o);for(let s=t;s<r-t;s++){const t=e.children[s];d(i,e.leaf?n(t):t),a+=y(i)}for(let s=r-t-1;s>=t;s--){const t=e.children[s];d(o,e.leaf?n(t):t),a+=y(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const r=e.data[t];if(0===r.children.length)if(t>0){const n=e.data[t-1],i=n.children;i.splice((0,s.qh)(i,r,i.length,n.indexHint),1)}else this.clear();else l(r,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function a(e,t){let r=e;for(v.clear();r;){if(!0===r.leaf)for(const e of r.children)t(e);else v.pushArray(r.children);r=v.pop()??null}}function l(e,t){p(e,0,e.children.length,t,e)}function p(e,t,r,s,n){n||(n=new A([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let i,o=t;o<r;o++)i=e.children[o],d(n,e.leaf?s(i):i);return n}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function u(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function c(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function y(e){return e.maxX-e.minX+(e.maxY-e.minY)}function m(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function f(e,t){const r=Math.max(e.minX,t.minX),s=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),i=Math.min(e.maxY,t.maxY);return Math.max(0,n-r)*Math.max(0,i-s)}function g(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function _(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,r,s,n){const o=[t,r];for(;o.length;){const t=o.pop(),r=o.pop();if(t-r<=s)continue;const a=r+Math.ceil((t-r)/s/2)*s;(0,i.q)(e,a,r,t,n),o.push(r,a,a,t)}}const w=new n.A,v=new n.A,I=new n.A,T=new n.A({deallocator:void 0});class M{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class E extends M{constructor(){super(...arguments),this.height=1,this.indexHint=new s.vW}}class A extends E{constructor(e){super(),this.children=e,this.leaf=!0}}class x extends E{constructor(e){super(),this.children=e,this.leaf=!1}}},10382:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(36563),n=(r(44208),r(74887)),i=r(9775),o=r(72457),a=r(52268),l=r(61322);class p{constructor(){this._inUseClients=new Array,this._clients=new Array,this._clientPromises=new Array,this._ongoingJobsQueue=new i.A}destroy(){this.close()}get closed(){return!this._clients?.length}open(e,t){return new Promise(((r,s)=>{let i=!0;const o=e=>{(0,n.Te)(t.signal),i&&(i=!1,e())};this._clients.length=e.length,this._clientPromises.length=e.length,this._inUseClients.length=e.length;for(let i=0;i<e.length;++i){const a=e[i];(0,n.$X)(a)?this._clientPromises[i]=a.then((e=>(this._clients[i]=new l.default(e,t,this._ongoingJobsQueue),o(r),this._clients[i])),(()=>(o(s),null))):(this._clients[i]=new l.default(a,t,this._ongoingJobsQueue),this._clientPromises[i]=Promise.resolve(this._clients[i]),o(r))}}))}broadcast(e,t,r){const s=new Array(this._clientPromises.length);for(let n=0;n<this._clientPromises.length;++n){const i=this._clientPromises[n];s[n]=i.then((s=>s?.invoke(e,t,r)))}return s}close(){let e;for(;e=this._ongoingJobsQueue.pop();)e.resolver.reject((0,n.NK)(`Worker closing, aborting job calling '${e.methodName}'`));for(const e of this._clientPromises)e.then((e=>e?.close()));this._clients.length=0,this._clientPromises.length=0,this._inUseClients.length=0,(0,o.h)(this)}invoke(e,t,r){return this.apply(e,[t],r)}apply(e,t,r){const s=(0,n.Tw)();this._ongoingJobsQueue.push({methodName:e,data:t,invokeOptions:r,resolver:s});for(let e=0;e<this._clientPromises.length;e++){const t=this._clients[e];t?t.jobAdded():this._clientPromises[e].then((e=>e?.jobAdded()))}return s.promise}createInvokeProxy(e){return(0,a.L)(this,e)}on(e,t){return Promise.all(this._clientPromises).then((()=>(0,s.vE)(this._clients.map((r=>r.on(e,t))))))}openPorts(){return new Promise((e=>{const t=new Array(this._clientPromises.length);let r=t.length;for(let s=0;s<this._clientPromises.length;++s)this._clientPromises[s].then((n=>{n&&(t[s]=n.openPort()),0==--r&&e(t)}))}))}get test(){}}},72457:(e,t,r)=>{r.d(t,{h:()=>i,k:()=>n});const s=new FinalizationRegistry((e=>{e.close()}));function n(e,t){s.register(e,t,t)}function i(e){s.unregister(e)}},29953:(e,t,r)=>{r.d(t,{ho:()=>G});var s=r(49186),n=r(44208),i=r(74887),o=r(10382),a=r(72457),l=r(61322),p=r(53966),d=r(97768),u=r(78888),h=r(84952);const c={async request(e,t){const r=e.options,s=r.responseType;r.signal=t?.signal,r.responseType="native"===s||"native-request-init"===s?"native-request-init":s&&["blob","json","text"].includes(s)&&(0,h.sC)(e.url)?.after?s:"array-buffer";const n=await(0,u.A)(e.url,r),i={data:n.data,httpStatus:n.httpStatus,ssl:n.ssl};switch(n.requestOptions?.responseType){case"native-request-init":return delete i.data.signal,i;case"blob":i.data=await i.data.arrayBuffer();break;case"json":i.data=(new TextEncoder).encode(JSON.stringify(i.data)).buffer;break;case"text":i.data=(new TextEncoder).encode(i.data).buffer}return{result:i,transferList:[i.data]}}};var y=r(8341),m=r(2741),f=r(92602),g=(r(47566),r(70333));const _={};var b=r(26390);class w{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class v{constructor(){this._dispatcher=new w,this._workerPostMessage({type:y.Go.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,b.d)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,b.d)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,y.VI)(e);if(t&&t.type===y.Go.OPEN){const{modulePath:e,jobId:r}=t;let s=await l.default.loadWorker(e);s||(s=await import(e));const n=l.default.connect(s);this._workerPostMessage({type:y.Go.OPENED,jobId:r,data:n})}}}var I=r(73444),T=r(18357);const M=()=>p.A.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:E}=y.Go;let A,x;const k="Failed to create Worker. Fallback to execute module in main thread";async function S(e){return new Promise((t=>{function r(n){const i=(0,y.VI)(n);i&&i.type===E&&(e.removeEventListener("message",r),e.removeEventListener("error",s),t(e))}function s(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",s),M().warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new v).addEventListener("message",r),e.addEventListener("error",s)}e.addEventListener("message",r),e.addEventListener("error",s)}))}let C=0;const{ABORT:L,INVOKE:N,OPEN:D,OPENED:R,RESPONSE:B}=y.Go;class O{static async create(e){const t=await async function(){if(!(0,n.A)("esri-workers"))return S(new v);if(!A&&!x)try{const e='let globalId=0;const outgoing=new Map,configuration={CONFIGURATION};self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;let s=null;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());s=()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))},t.addEventListener("abort",s)}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})})).finally((()=>{t&&t.removeEventListener("abort",s)}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,fullVersion:r}=configuration.kernelInfo,{revision:t,fullVersion:n,version:s}=e.kernelInfo;esriConfig.assetsPath!==esriConfig.defaultAssetsPath&&o!==t&&console.warn(`Version mismatch detected between ArcGIS Maps SDK for JavaScript modules and assets. For more information visit https://bit.ly/3QnsuSo.\nModules version: ${r}\nAssets version: ${n??s}\nAssets path: ${esriConfig.assetsPath}`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let n;function t(e){const o=n.connect(e);self.postMessage({type:2,jobId:r,data:o},[o])}"function"==typeof define&&define.amd?require([workerPath],(e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((e=>(n=e.default,checkWorkerRevision(n),n.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((e=>{n=e.default||e,checkWorkerRevision(n),n.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),n=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(n),n.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const s=outgoing.get(r);outgoing.delete(r),o.error?s.reject(JSON.parse(o.error)):s.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.split("{CONFIGURATION}").join(function(){let e;if(null!=f.A.default){const t={...f.A};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(f.A));e.assetsPath=(0,h.s2)(e.assetsPath),e.defaultAssetsPath=e.defaultAssetsPath?(0,h.s2)(e.defaultAssetsPath):void 0,e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,I.JK)(),e.has={"esri-csp-restrictions":(0,n.A)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,n.A)("esri-2d-update-debug"),"esri-2d-log-updating":(0,n.A)("esri-2d-log-updating"),"featurelayer-pbf":(0,n.A)("featurelayer-pbf"),"featurelayer-fast-triangulation-enabled":(0,n.A)("featurelayer-fast-triangulation-enabled"),"featurelayer-simplify-thresholds":(0,n.A)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,n.A)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,n.A)("featurelayer-simplify-mobile-factor"),"featurelayer-query-max-depth":(0,n.A)("featurelayer-query-max-depth"),"featurelayer-query-pausing-enabled":(0,n.A)("featurelayer-query-pausing-enabled"),"featurelayer-snapshot-enabled":(0,n.A)("featurelayer-snapshot-enabled"),"esri-atomics":(0,n.A)("esri-atomics"),"esri-shared-array-buffer":(0,n.A)("esri-shared-array-buffer"),"esri-tiles-debug":(0,n.A)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,n.A)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,n.A)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,h.s2)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,h.s2)(e.workers.workerPath):e.workers.workerPath=(0,h.s2)((0,m.s)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=f.A.workers.loaderConfig,r=function(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages?.slice()||[],paths:{..._.paths,...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=_.baseUrl),t}({baseUrl:t?.baseUrl,locale:(0,I.JK)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),s={buildDate:T.$,fullVersion:g.ol,revision:T.u};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:s})}());A=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){x=e||{}}let e;if(A)try{e=new Worker(A,{name:"esri-worker-"+C++})}catch(t){M().warn(k,x),e=new v}else M().warn(k,x),e=new v;return S(e)}();return new O(t,e)}constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),p.A.getLogger("esri.core.workers.WorkerOwner").error(e)}))}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,s=(0,y.Jc)();return new Promise(((t,n)=>{const o={resolve:t,reject:n,abortHandle:(0,i.NY)(r,(()=>{this._outJobs.delete(s),this._post({type:L,jobId:s})}))};this._outJobs.set(s,o),this._post({type:D,jobId:s,modulePath:e})}))}_onMessage(e){const t=(0,y.VI)(e);if(t)switch(t.type){case R:this._onOpenedMessage(t);break;case B:this._onResponseMessage(t);break;case L:this._onAbortMessage(t);break;case N:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,s=t.get(r);s&&(s.controller&&s.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:s,abortable:n}=e,o=n?new AbortController:null,a=this._inJobs,l=c[t];let p;try{if("function"!=typeof l)throw new TypeError(`${t} is not a function`);p=l.call(null,s,{signal:o?o.signal:null})}catch(e){return void this._post({type:B,jobId:r,error:(0,y.mF)(e)})}(0,i.$X)(p)?(a.set(r,{controller:o,promise:p}),p.then((e=>{a.has(r)&&(a.delete(r),this._post({type:B,jobId:r},e))}),(e=>{a.has(r)&&(a.delete(r),e||(e={message:"Error encountered at method"+t}),(0,i.zf)(e)||this._post({type:B,jobId:r,error:(0,y.mF)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:B,jobId:r},p)}_onOpenedMessage(e){const{jobId:t,data:r}=e,s=this._outJobs.get(t);s&&(this._outJobs.delete(t),(0,d.xt)(s.abortHandle),s.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:n}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,d.xt)(i.abortHandle),r?i.reject(s.A.fromJSON(JSON.parse(r))):i.resolve(n))}_post(e,t,r){return(0,y.u1)(this.worker,e,t,r)}}const j=(0,n.A)("host-browser")?Math.min(navigator.hardwareConcurrency-1,(0,n.A)("workers-pool-size")):0;let P=(0,n.A)("esri-mobile")?Math.min(j,3):j;P||(P=(0,n.A)("safari")&&(0,n.A)("mac")?7:2);let F=0;const q=[];async function Z(e,t){const r=new o.A,{registryTarget:s,...n}=t;return await r.open(e,n),s&&(0,a.k)(s,r),r}async function G(e,t={}){if("string"!=typeof e)throw new s.A("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,n.A)("host-webworker")&&!(0,n.A)("esri-workers")&&(r="local"),"local"===r){let r=await l.default.loadWorker(e);r||(r=await import(e)),(0,i.Te)(t.signal);const s=t.client||r;return Z([l.default.connect(r,t.schedule)],{...t,client:s})}if(await async function(){if(Q)return Q;$=new AbortController;const e=[];for(let t=0;t<P;t++){const r=O.create(t).then((e=>(q[t]=e,e)));e.push(r)}return Q=Promise.all(e),Q}(),(0,i.Te)(t.signal),"dedicated"===r){const r=F++%P;return Z([await q[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,P);if(r<P){const s=new Array(r);for(let n=0;n<r;++n){const r=F++%P;s[n]=q[r].open(e,t)}return Z(s,t)}}return Z(q.map((r=>r.open(e,t))),t)}let $,Q=null},6518:(e,t,r)=>{r.d(t,{F:()=>a});var s=r(44208),n=r(75503),i=r(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.w(9,(0,s.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((r,s)=>{e[t++]=s})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,i.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,r){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,r)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221:(e,t,r)=>{r.d(t,{A:()=>y});var s=r(4576),n=r(49186),i=r(65529),o=r(53966),a=r(70328),l=r(19419),p=r(90708),d=r(6518),u=r(51441),h=r(37730);const c=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._markedIds=new Set,this.events=new i.A,this.featureAdapter=h.T}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,r,s,n]=this.fullBounds;return{xmin:t,ymin:r,xmax:s,ymax:n,spatialReference:(0,u.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map((e=>this._upsert(e)));return this._emitChanged(),t.filter(s.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const r of e){const e=this._boundsStore.get(r.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,r)=>{this._markedIds.has(r)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const r=this._featuresById.get(t);let s;if(this._markedIds.add(t),r?(e.displayId=r.displayId,s=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);s=(0,p.jQ)(null!=s?s:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=s&&this._boundsStore.set(t,s),this._featuresById.set(t,e)}_upsert(e){const t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new n.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const r=this._featuresById.get(t);if(!r)return this._add(e),e;this._markedIds.add(t);const{geometry:s,attributes:i}=e;for(const e in i)r.attributes[e]=i[e];return s&&(r.geometry=s,this._boundsStore.set(t,(0,p.jQ)((0,l.vt)(),s,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),r}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},37730:(e,t,r)=>{r.d(t,{T:()=>o});var s=r(27647),n=r(43334),i=r(92722);const o={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new n.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,s.Q)(new i.A,e.geometry,t.hasZ,t.hasM)),e.centroid)}},64714:(e,t,r)=>{r.d(t,{F0:()=>l,Vx:()=>u,e2:()=>c,f:()=>y});var s=r(44208),n=r(4718),i=r(99352),o=r(4071),a=r(93470);function l(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a.Cb:"esriGeometryPolyline"===e?a.yM:a.WR}}}const p=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let d=1;function u(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this${h(t)} = null;`;for(const t in e)r+=`this${h(t)} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${d++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function h(e){return p.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(e)}}]}function y(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:o.$,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},61184:(e,t,r)=>{r.d(t,{P:()=>M});var s=r(90237),n=(r(59456),r(69622)),i=r(49186),o=r(53966),a=r(91869),l=r(39516),p=r(10107),d=(r(44208),r(87811),r(40608)),u=r(39829),h=r(57251),c=r(21325),y=r(85342),m=r(90708),f=r(43334),g=r(65864);class _{constructor(){this._featureLookup=new Map}static getInstance(){return _.instance||(_.instance=new _),_.instance}static resetInstance(){_.instance&&(_.instance=null)}deleteFromStore(e){e.forEach((e=>{this._featureLookup.delete(e)}))}readFromStoreByList(e){const t=[];return e.forEach((e=>{const r=this.readFromStoreById(e);r&&t.push(r)})),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,r){const s=[];return e.forEach((e=>{if(!e?.id)return;e.properties||(e.properties=[]);let n,i=null;if(r&&e.properties[r]&&(i=(0,m.Ux)(e.properties[r])),"originId"in e&&"destinationId"in e&&(e.properties[y.Cz]=e.originId,e.properties[y.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const s=this._featureLookup.get(e.id),o=JSON.parse(JSON.stringify(Object.assign(s.attributes,e.properties)));r&&e.properties[r]&&(o[r]=(0,g.rS)(e.properties[r])),n=new f.Om(i?JSON.parse(JSON.stringify(i)):s?.geometry?JSON.parse(JSON.stringify(s.geometry)):null,o,null,e.properties[t])}else n=new f.Om(i?JSON.parse(JSON.stringify(i)):null,e.properties,null,e.properties[t]);this._featureLookup.set(e.id,n),s.push(n)})),s}}var b=r(45654),w=r(71402),v=r(42538),I=r(61956),T=r(5443);let M=class extends n.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach((r=>{r.name&&(t.set(r.name,"entity"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.knowledgeGraph.dataModel.relationshipTypes?.forEach((r=>{r.name&&(t.set(r.name,"relationship"),this._processingCacheUpdatesLookup.set(r.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(r.name),r.properties?.forEach((e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(r.name,{name:e.name??"",geometryType:e.geometryType})})))})),e.inclusionModeDefinition?.namedTypeDefinitions.forEach(((r,s)=>{if("entity"===t.get(s))this.entityTypeNames.add(s);else{if("relationship"!==t.get(s))return o.A.getLogger(this).warn(`A named type, ${s}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(s);this.relationshipTypeNames.add(s)}const n=new Map;r.members?.forEach((e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,(()=>new Set)).add(s);const t=this.getById(e.id);t&&n.set(e.id,t)})),this.sublayerCaches.set(s,n)}))}addToLayer(e){e.forEach((({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new i.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const r=this.inclusionModeDefinition.namedTypeDefinitions.get(e);r.members||(r.members=new Map),r.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}else{const r=new Map;r.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:r}),(0,a.tE)(this.memberIdTypeLookup,t,(()=>new Set)).add(e)}}))}getById(e){return _.getInstance().readFromStoreById(e)}async getData(e,t,r){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let s;if(s=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,r=this._processingCacheUpdatesLookup.get(t.objectType.name??""),n=s.outFields;n&&1===n.length&&n[0]===y.dr&&"1=1"===s.where||await Promise.all(r??[]);const i=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],o=[];return i.forEach((r=>{if(this.relationshipTypeNames.has(t.objectType.name)){r.geometry=e.relationshipLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.memberIdTypeLookup.get(r.attributes[y.Cz]),n=this.memberIdTypeLookup.get(r.attributes[y.KQ]),i=this._isEndEntitySpatial(s,r,y.Cz),o=this._isEndEntitySpatial(n,r,y.KQ);r.attributes[y.BL]=Number(i&&o)}else{r.geometry=e.entityLinkChartDiagramLookup.get(r.attributes[t.objectIdField]);const s=this.geographicLookup.get(t.objectType.name);s&&r.attributes[s.name]?r.attributes[y.BL]=1:r.attributes[y.BL]=0}r.attributes[y.T1]=r.geometry,o.push(r)})),o}return this.retrieveDataFromService(s,t,r)}async getConnectedRecordIds(e,t){const r=[];let s="";const n=[],i=new Map;if(e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(t))return;i.has(t)?i.get(t)?.push(e):i.set(t,[e])}})),t&&0!==t?.length){for(const e of t)s=s+e+"|";s=s.slice(0,-1)}const a={};let l="",p=-1;for(const[e,r]of i){p++,0!==p&&(l+=" UNION ");const n=`${e}_ids`;a[n]=r,l+=t&&0!==t?.length?`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r:${s}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`:`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`}const d=new Promise((e=>{(async()=>{const e=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new v.A({openCypherQuery:l,bindParameters:a}))).resultRowsStream.getReader();try{for(;;){const{done:t,value:s}=await e.read();if(t)break;for(let e=0;e<s.length;e++){const t=s[e];r.push({id:t[0],typeName:t[1]}),r.push({id:t[2],typeName:t[3]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}})().then((()=>{e()}))}));return n.push(d),this.refreshCacheContent(),await Promise.all(n),r}async getRelationshipsBetweenNodes(e,t){const r=[],s=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new v.A({openCypherQuery:"MATCH (n)-[r]->(m) WHERE id(n) IN $nodeIds AND id(m) in $nodeIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{nodeIds:e,relationshipExclusionIds:t}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await s.read();if(e)break;for(let e=0;e<t.length;e++){const s=t[e];r.push({id:s[0],typeName:s[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return r}async getRelationshipsFromNodes(e,t,r){const s=[],n=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,new v.A({openCypherQuery:"MATCH (n)-[r]-(m) WHERE id(n) IN $targetEntityIds AND id(m) in $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds return id(r), type(r)",bindParameters:{targetEntityIds:e,possibleConnectionEntityIds:t,relationshipExclusionIds:r}}))).resultRowsStream.getReader();try{for(;;){const{done:e,value:t}=await n.read();if(e)break;for(let e=0;e<t.length;e++){const r=t[e];s.push({id:r[0],typeName:r[1]})}}}catch(e){if("AbortError"!==e.name)throw e;o.A.getLogger(this).info("Request aborted as expected")}return s}async refreshCacheContent(e,t,r,s=!0){const n=_.getInstance(),o=[],l=new Map,p=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&p.set(e.name,e)})),this.knowledgeGraph.dataModel.relationshipTypes?.forEach((e=>{e.name&&p.set(e.name,e)})),e||this.inclusionModeDefinition?e?e.forEach((e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))l.has(t)?l.get(t)?.push(e):l.set(t,[e])})):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{e.useAllData?l.set(t,null):e.members&&e.members.forEach((e=>{l.has(t)&&null!==l.get(t)?l.get(t)?.push(e.id):l.set(t,[e.id])}))})):(this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})),this.knowledgeGraph.dataModel.entityTypes?.forEach((e=>{e.name&&l.set(e.name,null)})));for(const[e,d]of l){const l=new Promise((o=>{(async()=>{const o=new Set,l=[];let u,h="",c=!1;if(t||p.get(e)?.properties?.forEach((e=>{e.name&&o.add(e.name)})),r&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&o.add(t)}if(this.entityTypeNames.has(e))h=`MATCH (n:${e}) ${d?"WHERE id(n) IN $ids ":""}return ID(n)`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}));else{if(!this.relationshipTypeNames.has(e))throw new i.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);c=!0,h=`MATCH ()-[n:${e}]->() ${d?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,o.forEach((e=>{h+=`, n.${e}`,l.push(e)}))}u=new v.A(d?{openCypherQuery:h,bindParameters:{ids:d}}:{openCypherQuery:h});const m=(await(0,w.executeQueryStreaming)(this.knowledgeGraph,u)).resultRowsStream.getReader();for(;;){const{done:t,value:r}=await m.read();if(t)break;const i=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,n=0;const o={properties:{}};for(o.id=t[s],s++,n++,c&&(o.originId=t[s],s++,n++,o.destinationId=t[s],s++,n++,(0,a.tE)(this.nodeConnectionsLookup,o.originId,(()=>new Set)).add(o.id),(0,a.tE)(this.nodeConnectionsLookup,o.destinationId,(()=>new Set)).add(o.id),(0,a.tE)(this.relationshipConnectionsLookup,o.id,(()=>[o.originId,o.destinationId])));s<t.length;s++)o.properties[l[s-n]]=t[s];i.push(o)}const o=n.writeToStore(i,y.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const p=this.sublayerCaches.get(e);o.forEach((t=>{p?.set(t.attributes[y.dr],t),s&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[y.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[y.dr],{id:t.attributes[y.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[y.dr],(()=>new Set)).add(e))}))}})().then((()=>{o(null)}))}));o.push(l),this._processingCacheUpdatesLookup.get(e)?.push(l)}await Promise.all(o)}removeFromLayer(e){const t=new Set,r=new Set(e.map((e=>e.id)));for(const r of e)t.add(r.typeName),1===this.memberIdTypeLookup.get(r.id)?.size?this.memberIdTypeLookup.delete(r.id):this.memberIdTypeLookup.get(r.id)?.delete(r.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach(((e,t)=>{t===r.typeName&&e.members?.has(r.id)&&e.members.delete(r.id)}));t.forEach((e=>{this.sublayerCaches.get(e)?.forEach(((t,s)=>{r.has(s)&&this.sublayerCaches.get(e)?.delete(s)}))}))}async retrieveDataFromService(e,t,r){const s=_.getInstance(),n=new Set,o=[];let a,p="",d=[];const m="relationship"===t.graphType,f=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,g=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let I=!f&&g?Array.from(g).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(I=e.objectIds);else if(null!=e.objectIds&&I&&I.length>0){const t=e.objectIds;e.objectIds=I.filter((e=>t.includes(e)))}else if(null!=e.objectIds)I=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=I}if(null!=e.outFields){const r=e.outFields;r.includes("*")?t.fields.forEach((e=>{n.add(e.name)})):r.forEach((e=>{e!==y.dr&&e!==t.geometryFieldName&&n.add(e)}))}if(null!=e.geometry){const r=e.geometry;let s;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,y=d?.spatialReference,f=d?.serviceCapabilities?.geometryCapabilities;let g=f?.geometryMaxBoundingRectangleSizeX,_=f?.geometryMaxBoundingRectangleSizeY;if("point"===r.type){let e=r;e.spatialReference?.isWGS84||(await(0,h.initializeProjection)(e.spatialReference,c.KK),e=(0,h.project)(e,c.KK)),s=new T.A({spatialReference:c.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else r?.extent?.spatialReference&&!r.spatialReference?.isWGS84?(await(0,h.initializeProjection)(r.extent.spatialReference,c.KK),s=(0,h.project)(r.extent,c.KK)):s=r.extent;if(g&&_&&y){if(4326!==y.wkid){const e=new T.A({spatialReference:y,xmax:g,ymax:_}),t=(0,h.project)(e,c.KK);g=t.xmax,_=t.ymax}if(s.xmax-s.xmin>g)throw new i.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${g}° latitude, limit exceeded`);if(s.ymax-s.ymin>_)throw new i.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${_}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const r=await(0,l.G)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach((e=>{r.fieldNames.includes(e.name)&&n.add(e.name)}))}p=m?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{p+=`, n.${e}`,o.push(e)})),a=new v.A({openCypherQuery:p,bindParameters:{param_filter_geom:new u.A({rings:(0,b.DX)(s)})}})}else{let r="";if(null!=e.where&&"1=1"!==e.where){const s=await(0,l.G)(e.where,t.fieldsIndex);t.fields.forEach((e=>{s.fieldNames.includes(e.name)&&n.add(e.name)}));const i=new Set(["column-reference","string","number","binary-expression"]),o=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const p=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&i.has(e.left.type)&&i.has(e.right.type)&&o.has(e.operator))return`${p(e.left)} ${e.operator} ${p(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let r=e.right.value;"%"===r.charAt(0)&&(r=r.slice(1)),"%"===r.charAt(r.length-1)&&(r=r.slice(0,-1)),t+=`'${r.toLowerCase()}')`}return t}return a=!0,""};r=p(s.parseTree),a&&(r="")}let s="";s=m?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let i=!1;I&&(i=!0,s+=" WHERE ID(n) IN $ids"),r&&(s+=i?" AND":" WHERE",s+=` ${r}`),s+=" return ID(n)",m&&(s+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&n.add(t.geometryFieldName),n.forEach((e=>{s+=`, n.${e}`,o.push(e)})),a=new v.A(I?{openCypherQuery:s,bindParameters:{ids:I}}:{openCypherQuery:s})}const M=(await(0,w.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,r)).resultRowsStream.getReader();for(;;){const{done:e,value:r}=await M.read();if(e)break;const n=[];for(let e=0;e<r.length;e++){const t=r[e];let s=0,i=0;const a={properties:{}};for(a.id=t[s],s++,i++,m&&(a.originId=t[s],s++,i++,a.destinationId=t[s],s++,i++);s<t.length;s++)a.properties[o[s-i]]=t[s];n.push(a)}d=d.concat(s.writeToStore(n,y.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,r){for(const s of e??[])if(this.entityTypeNames.has(s)){const e=this.geographicLookup.get(s),n=e&&this.sublayerCaches.get(s)?.get(t.attributes[r]);if(e&&n?.attributes[e.name])return!0}return!1}};(0,s._)([(0,p.MZ)()],M.prototype,"knowledgeGraph",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"inclusionModeDefinition",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"entityTypeNames",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"relationshipTypeNames",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"geographicLookup",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"sublayerCaches",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"nodeConnectionsLookup",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"relationshipConnectionsLookup",void 0),(0,s._)([(0,p.MZ)()],M.prototype,"memberIdTypeLookup",void 0),M=(0,s._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],M)},70643:(e,t,r)=>{r.d(t,{A:()=>V});var s=r(90237),n=(r(59456),r(13874)),i=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494)),o=r(15036),a=r(4718),l=r(92071),p=(r(29953),r(10107)),d=(r(44208),r(53966),r(40608)),u=r(43937),h=r(35666),c=r(57251),y=r(16930),m=r(21325),f=r(4146),g=r(83221),_=r(17970),b=r(64714);r(87811);const w=(0,r(17036).p)(),v=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,s._)([(0,p.MZ)(w.fields)],t.prototype,"fields",void 0),(0,s._)([(0,p.MZ)(w.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,s._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var I=r(85342),T=r(63074),M=r(87718),E=r(76294),A=r(32756),x=r(54310),k=r(25036),S=r(82935),C=r(10873),L=r(13213),N=r(20437),D=r(30524),R=r(81457),B=r(39383),O=r(96184),j=r(22671),P=r(61956),F=r(30291),q=r(61322),Z=r(5443),G=r(39829),$=r(82799),Q=r(86738),H=r(50498);function U(e){if(!e.json)return e;e.json.write=Y(e.json.write);const t=e.json.origins;if(!t)return e;let r;for(r in t){const e=t[r];e&&(e.write=Y(e.write))}return e}function Y(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:r,overridePolicy:s,...n}=e;return function(e,t){const r=z.call(this,e,t);return r.enabled?{...n,...r}:r}}(e)),e):!0===e?J():e}function J(){return{overridePolicy:z}}function z(e,t){const r=!!this.geometryType;let s={enabled:r};return r&&(s={...s,...W.call(this,e,t)}),s}function W(e,t){return{ignoreOrigin:this.originIdOf(t)>h.Gr.DEFAULTS}}let X=class extends(v((0,E.J)((0,M.F)((0,T.dM)((0,A.f)((0,S.e)((0,k.j)((0,x.J)((0,l.P)(f.A)))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,b.f)(!1,!1),this.charts=null,this.definitionExpression=null,this.displayField="",this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.labelingInfo=null,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=I.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then((()=>{const e=new MessageChannel;return new q.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const r=P.A.fromJSON(e);return this.queryFeaturesJSON(r,t)}}}),[e.port2]}))},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach((t=>{const r="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(N.A.fromJSON({name:t.name,type:r,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))})),e.push(N.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),N.A.fromJSON({name:I.M1,type:"esriFieldTypeInteger",alias:I.M1,editable:!1}),N.A.fromJSON({name:I.BL,type:"esriFieldTypeInteger",alias:I.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?H.g.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return I.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,r=t?this.objectType?.properties?.[t]:null;return r?.hasZ??!1}set renderer(e){(0,D.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){return this._isOverridden("renderer")?this._get("renderer"):"link-chart"===this.parentCompositeLayer?.type?"relationship"===this.graphType?(0,i.r)((0,b.F0)(H.g.toJSON("polyline")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON("point")).renderer):(0,i.r)((0,b.F0)(H.g.toJSON(this.geometryType)).renderer)}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??y.A.WGS84}set timeInfo(e){(0,D.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,F.tn)(this,e)}createQuery(){return new P.A({where:"1=1",outFields:["*"]})}getField(e){for(let t=0;t<this.fields.length;t++)if(this.fields[t].name===e)return this.fields[t];return null}getFieldDomain(e,t){return null}async queryFeatures(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e),n=j.A.fromJSON(await s.executeQuery(r.toJSON(),t?.signal));return n.features.forEach((e=>{e.sourceLayer=this})),n}async queryFeaturesJSON(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return await s.executeQuery(r.toJSON(),t?.signal)}async queryFeatureCount(e,t){const{resolvedQuery:r,queryEngine:s}=await this._setupQueryObjects(e);return s.executeQueryForCount(r.toJSON(),t?.signal)}async queryExtent(e={},t){const r={...e,returnGeometry:!0},{resolvedQuery:s,queryEngine:n}=await this._setupQueryObjects(r),i=await n.executeQueryForExtent(s.toJSON(),t?.signal);let o;return o=null!=i.extent?.xmin&&null!=i.extent?.xmax&&null!=i.extent?.ymin&&null!=i.extent?.ymax?new Z.A(i.extent):new Z.A,{count:i.count,extent:o}}async queryObjectIds(e,t){const r=P.A.from(e);let s;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)s=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);s=this.loadQueryEngine(e)}return s.executeQueryForIds(r.toJSON(),t?.signal)}loadQueryEngine(e){const t=new g.A({geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),r=new _.d({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:H.g.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,objectIdField:this.objectIdField,spatialReference:this.spatialReference.toJSON(),timeInfo:null,featureStore:t});return r.featureStore.addMany(e),r}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new P.A({where:"1=1",outFields:[I.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}async _setupQueryObjects(e,t){const r=P.A.from(e),s=r.geometry;let n;if(s&&!s.spatialReference?.isWGS84&&(await(0,c.initializeProjection)(s.spatialReference,m.KK),r.geometry=(0,c.project)(s instanceof G.A||s instanceof $.A||s instanceof Q.A?s:s.extent,m.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)n=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(r,this,t);n=this.loadQueryEngine(e)}return{resolvedQuery:r,queryEngine:n}}};(0,s._)([(0,p.MZ)(U((0,a.o8)(T.sU)))],X.prototype,"blendMode",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"capabilities",void 0),(0,s._)([(0,p.MZ)({json:{origins:{"web-scene":{write:!1}},write:J()}})],X.prototype,"charts",void 0),(0,s._)([(0,p.MZ)({readOnly:!0})],X.prototype,"defaultPopupTemplate",null),(0,s._)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],X.prototype,"definitionExpression",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"displayField",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(T.LF)))],X.prototype,"effect",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"elevationInfo",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(M.Y)))],X.prototype,"featureEffect",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(L.d)))],X.prototype,"featureReduction",null),(0,s._)([(0,p.MZ)()],X.prototype,"fields",null),(0,s._)([(0,p.MZ)()],X.prototype,"geometryType",null),(0,s._)([(0,p.MZ)()],X.prototype,"geometryFieldName",null),(0,s._)([(0,p.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphType",void 0),(0,s._)([(0,p.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],X.prototype,"graphTypeName",null),(0,s._)([(0,p.MZ)()],X.prototype,"hasM",null),(0,s._)([(0,p.MZ)()],X.prototype,"hasZ",null),(0,s._)([(0,p.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],X.prototype,"id",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.kF)))],X.prototype,"labelsVisible",void 0),(0,s._)([(0,p.MZ)({type:[R.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:B.w,write:J()}})],X.prototype,"labelingInfo",void 0),(0,s._)([(0,p.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"layerType",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.fV)))],X.prototype,"legendEnabled",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.hG)))],X.prototype,"maxScale",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.hn)))],X.prototype,"minScale",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"objectIdField",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"objectType",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.ke)))],X.prototype,"opacity",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(A.n)))],X.prototype,"orderBy",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"parentCompositeLayer",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(C.M6)))],X.prototype,"popupEnabled",void 0),(0,s._)([(0,p.MZ)({type:n.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],X.prototype,"popupTemplate",void 0),(0,s._)([(0,p.MZ)({type:Number,json:{write:{overridePolicy:W}}})],X.prototype,"refreshInterval",void 0),(0,s._)([(0,p.MZ)({types:o.H,json:{name:"layerDefinition.drawingInfo.renderer",write:J()}})],X.prototype,"renderer",null),(0,s._)([(0,p.MZ)()],X.prototype,"source",void 0),(0,s._)([(0,p.MZ)()],X.prototype,"spatialReference",null),(0,s._)([(0,p.MZ)({type:O.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],X.prototype,"timeInfo",null),(0,s._)([(0,p.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],X.prototype,"title",null),(0,s._)([(0,u.K)("title")],X.prototype,"writeTitle",null),(0,s._)([(0,p.MZ)({json:{read:!1}})],X.prototype,"type",void 0),(0,s._)([(0,p.MZ)(U((0,a.o8)(S.B)))],X.prototype,"useViewTime",void 0),(0,s._)([(0,p.MZ)({type:Boolean,json:{name:"visibility",write:J()}})],X.prototype,"visible",void 0),X=(0,s._)([(0,d.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],X);const V=X},85342:(e,t,r)=>{r.d(t,{BL:()=>p,Cz:()=>i,KQ:()=>o,M1:()=>l,T1:()=>a,dr:()=>n,qN:()=>h});var s=r(71402);const n="ESRI__ID",i="ESRI__OriginID",o="ESRI__DestID",a="ESRI__LayoutGeometry",l="ESRI__AggregationCount",p="LC.ESRI__IsSpatial",d={initializeLayersFromClientData:async(e,t)=>{if(t||(t=[...e.layers,...e.tables].map((e=>e.graphTypeName))),0===t?.length)return;const r=new Map;for(const s of t)r.set(s,u(e,s));const n=await(0,s.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(r.values()));for(const t of[...e.layers,...e.tables]){const r=t.objectType.name;if(null===r)continue;const s=n.get(u(e,r));if(s){const e=JSON.parse(s);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},u=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function h(e,t){return d.initializeLayersFromClientData(e,t)}},45654:(e,t,r)=>{r.d(t,{DX:()=>_,_s:()=>w,aq:()=>b,fe:()=>v}),r(59456),r(52106);var s,n,i,o,a=r(78888),l=(r(61147),r(49186)),p=r(91869),d=(r(94194),r(90708),r(8460),r(71402)),u=r(42538);r(16930),(n=s||(s={})).ELEMENTUID="ELEMENTUID",n.TYPENAME="TYPENAME",s.ELEMENTUID,s.TYPENAME,function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(i||(i={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(o||(o={}));var h,c,y,m,f,g=r(45724);function _(e){if(!e.spatialReference.isWGS84)throw new l.A("knowledge-graph:layer-support-utils","The extentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map((e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]))}async function b(e,t){const r=[],s=new Map,n=[];if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&s.set(e.name,[]);for(const t of e)s.has(t.typeName)&&s.get(t.typeName)?.push(t.id);for(const[e,i]of s){if(i.length<1)continue;const s=new u.A({openCypherQuery:`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $ids RETURN id(n), labels(n)[0], id(m), labels(m)[0]`,bindParameters:{ids:i}});n.push((0,d.executeQueryStreaming)(t,s).then((async e=>{const t=e.resultRowsStream.getReader();for(;;){const{done:e,value:s}=await t.read();if(e)break;for(const e of s)r.push({id:e[0],typeName:e[1]}),r.push({id:e[2],typeName:e[3]})}})))}return await Promise.all(n),r}async function w(e,t){t??=!1;const r={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,a.A)(e,{responseType:"array-buffer"}),r=await t.data;return async function(e){const t=new((await(0,g.I)()).MapOfObjectIdentifierSetsDecoder),r=t.decode(new Uint8Array(e)),s=new Map;if(0!==r.error_code)throw new l.A("knowledge-graph:layer-support-utils",r.error_message);const n=t.get_map_of_identifier_sets(),i=n.keys,o=i.size();for(let e=0;e<o;e++){const t=i.get(e),r=n.query_identifier_set(t),o=[];if(r.id_array_type.value===m.GLOBALID_ARRAY){const e=r.get_globalid_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_globalid_at(r))}else{if(r.id_array_type.value!==m.IDENTIFIER_ARRAY)throw new l.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=r.get_identifier_array(),t=e.count();for(let r=0;r<t;r++)o.push(e.get_identifier_at(r).toString())}}s.set(t,o)}return t.delete(),s}(new Uint8Array(r))}(e).then((e=>{!function(e,t){for(const[r,s]of e){const e=(0,p.tE)(t.namedTypeDefinitions,r,(()=>({useAllData:!1,members:new Map})));for(const t of s)e.members.has(t)||e.members.set(t,{id:t})}}(e,r)})),r}async function v(e){const t=await(0,g.I)(),r=new t.MapOfObjectIdentifierSets;!function(e,t,r){for(const[s,n]of r.namedTypeDefinitions){if(!n.members||n.useAllData)continue;const r=n.members.keys(),i=new t.GlobalIdArray,o=new t.ObjectIdentifierSet;for(const e of r)i.add_globalid(e);o.set_globalid_array(i),i.delete(),e.put_identifier_set(s,o),o.delete()}}(r,t,e);const s=new t.MapOfObjectIdentifierSetsEncoder;try{s.set_map_of_identifier_sets(r),s.encode();const e=s.get_encoding_result();if(0!==e.error.error_code)throw new l.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return s.delete(),t}finally{r.delete()}}r(35448),(f=h||(h={}))[f.featureResult=0]="featureResult",f[f.countResult=1]="countResult",f[f.idsResult=2]="idsResult",function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(c||(c={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(y||(y={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(m||(m={})),r(40863),r(82799),r(94985),r(39829),r(68249),r(86738)},32756:(e,t,r)=>{r.d(t,{f:()=>p,n:()=>l});var s=r(90237),n=r(93637),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(91880);const l={type:[a.A],json:{origins:{"web-scene":{write:!1,read:!1}},name:"layerDefinition.orderBy",read:{reader:function(e,t,r){if(!e)return null;const s=e.find((e=>!!e.field));if(!s)return null;const n=new a.A;return n.read(s,r),[n]}},write:{writer:function(e,t,r,s){const i=e.find((e=>!!e.field));i&&(0,n.sM)(r,[i.toJSON()],t)}}}},p=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,s._)([(0,i.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,s._)([(0,o.$)("esri.layers.mixins.OrderedLayer")],t),t}},54310:(e,t,r)=>{r.d(t,{J:()=>b});var s=r(90237),n=(r(44208),r(53966)),i=r(74887),o=r(10107),a=r(79901),l=(r(87811),r(40608)),p=r(89317),d=r(5503),u=(r(60999),r(49186),r(14012),r(80559));const h=new d.A,c=new WeakMap;function y(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&h.push(new WeakRef(e))}function m(e,t){return Number.isFinite(e)&&Number.isFinite(t)?t<=0?e:m(t,e%t):0}let f=0,g=0;function _(){const e=Date.now();let t=!1;for(const r of h){const s=r.deref();s?s.refreshInterval&&e-(c.get(s)??0)+5>=6e4*s.refreshInterval&&(c.set(s,e),s.refresh(e)):t=!0}if(t)for(let e=h.length-1;e>=0;e--)h.at(e).deref()||h.removeAt(e)}(0,u.fm)((()=>{const e=Date.now();let t=0;for(const r of h){const s=r.deref();s&&(t=m(Math.round(6e4*s.refreshInterval),t),s.refreshInterval?c.get(s)||c.set(s,e):c.delete(s))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(_,g)}}));const b=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,i.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||y(this)}),(()=>{}))}destroy(){!function(e){const t=h.find((t=>t.deref()===e));t&&h.remove(t)}(this)}castRefreshInterval(e){return e>=.1?e:e<=0?0:.1}get refreshParameters(){return{_ts:this.refreshTimestamp||null}}refresh(e=Date.now()){(0,i.QZ)(this._debounceHasDataChanged()).then((t=>{t&&this._set("refreshTimestamp",e),this.emit("refresh",{dataChanged:t})}),(e=>{n.A.getLogger(this).error(e),this.emit("refresh",{dataChanged:!1,error:e})}))}async hasDataChanged(){return!0}get test(){}};return(0,s._)([(0,o.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:p.K}}}}})],t.prototype,"refreshInterval",void 0),(0,s._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,s._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,s._)([(0,o.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,s._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},91880:(e,t,r)=>{r.d(t,{A:()=>u});var s,n=r(90237),i=r(66552),o=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const p=new i.J({asc:"ascending",desc:"descending"});let d=s=class extends o.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new s({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],d.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:p.apiValues,json:{type:p.jsonValues,read:p.read,write:p.write}})],d.prototype,"order",void 0),d=s=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],d);const u=d},4071:(e,t,r)=>{r.d(t,{$:()=>s,P:()=>n});const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportedStatistics:void 0},n={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsResize:!1},data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCompactGeometry:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}}},8460:(e,t,r)=>{r.d(t,{$C:()=>m,Hh:()=>o,J:()=>l,Tu:()=>c,Wg:()=>y,Xq:()=>g,i6:()=>_,pM:()=>h,tx:()=>a,vJ:()=>f});var s=r(2741);let n,i=null;function o(){return n||(n=r.e(3666).then(r.bind(r,3666)).then((e=>e.l)).then((({default:e})=>e({locateFile:e=>(0,s.s)(`esri/libs/linkchartlayout/${e}`)}))).then((e=>{!function(e){i=e}(e)})),n)}var a,l,p,d,u,h,c,y,m,f,g,_,b,w;function v(e){const t=Object.keys(p).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.timeDirection),r=Object.keys(d).filter((e=>isNaN(parseInt(e,10)))).indexOf(e.eventsTicksVisualization);return{timeDirection:{value:t>-1?t:p.right},timeBannerUTCOffsetInMinutes:e.timeBannerUTCOffsetInMinutes,eventsTicksVisualization:{value:r>-1?r:d.startAndEnd},showDurationLineForNonZeroDurationEntityEvents:e.showDurationLineForNonZeroDurationEntityEvents,durationLineWidth:e.durationLineWidth,entityPositionAtDurationRatio:e.entityPositionAtDurationRatio,showNonZeroDurationIntervalBounds:e.showNonZeroDurationIntervalBounds,separateTimeOverlaps:e.separateTimeOverlaps,separateTimelineOverlaps:e.separateTimelineOverlaps,moveFirstBends:e.moveFirstBends,secondBendRatio:e.secondBendRatio,lineSeparationMultiplier:e.lineSeparationMultiplier,spaceSeparatedLinesEvenly:e.spaceSeparatedLinesEvenly,useBezierCurves:e.useBezierCurves,separatedLineShapeRatio:e.separatedLineShapeRatio}}function I(e,t,r,s,n,o){const a=r.length,l=n.length,p=Float64Array.BYTES_PER_ELEMENT,d=Uint32Array.BYTES_PER_ELEMENT,u=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(u+2*p)+l*(2*d),c=i._malloc(h);try{const u=c+16-c%16,h=u+a*p,y=h+a*p,m=y+l*d,f=m+l*d,g=()=>[i.HEAPF64.subarray(u>>3,(u>>3)+a),i.HEAPF64.subarray(h>>3,(h>>3)+a),i.HEAPU32.subarray(y>>2,(y>>2)+l),i.HEAPU32.subarray(m>>2,(m>>2)+l),i.HEAPU8.subarray(f,f+a)],[_,b,w,v,I]=g();_.set(r),b.set(s),w.set(n),v.set(o),I.set(t);let T=e(a,f,u,h,l,y,m),M=null,E=null;if(T){const e=i.getLayoutLinksTypes(),t=i.getLayoutLinksVerticesEndIndices(),r=i.getLayoutLinksVertices(),s=i.countLayoutLinksVertices();!l||e&&t?s&&!r?T=!1:(M={types:new Uint8Array(i.HEAPU8.subarray(e,e+l)),vertexEndIndex:new Uint32Array(i.HEAPU32.subarray(t>>2,(t>>2)+l)),vertices:new Float64Array(i.HEAPF64.subarray(r>>3,(r>>3)+2*s))},E=i.getAuxiliaryGraphicElements()):T=!1}const[A,x,k,S,C]=g();return r.set(A),s.set(x),n.set(k),o.set(S),t.set(C),{success:T,links:M,graphics:E}}finally{i._free(c),i.cleanupLayout()}}(u=a||(a={}))[u.None=0]="None",u[u.IsMovable=1]="IsMovable",u[u.IsGeographic=2]="IsGeographic",u[u.IsRoot=4]="IsRoot",u[u.IsOld=8]="IsOld",function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(l||(l={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.up=2]="up",e[e.down=3]="down"}(p||(p={})),function(e){e[e.none=0]="none",e[e.startOnly=1]="startOnly",e[e.startAndEnd=2]="startAndEnd"}(d||(d={})),function(e){e.getMinIdealEdgeLength=function(){return i.getMinIdealEdgeLength()},e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return I(((e,t,r,s,n,p,d)=>i.applyForceDirectedLayout(e,t,r,s,n,p,d,o,a,l)),e,t,r,s,n)}}(h||(h={})),function(e){e.apply=function(e,t,r,s,n,o=2,a=1,l=-1){return I(((e,t,r,s,n,p,d)=>i.applyCommunityLayout(e,t,r,s,n,p,d,o,a,l)),e,t,r,s,n)}}(c||(c={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applySimpleLayout,e,t,r,s,n)}}(y||(y={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applyHierarchicalLayout,e,t,r,s,n)}}(m||(m={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applyRadialTreeLayout,e,t,r,s,n)}}(f||(f={})),function(e){e.apply=function(e,t,r,s,n){return I(i.applySmartTreeLayout,e,t,r,s,n)}}(g||(g={})),function(e){e.apply=function(e,t,r,s,n,o,a,l,u,h,c){const y={timeDirection:p.right,timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:d.startAndEnd,showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0};return I(((e,t,r,o,a,p,d)=>{if(s.length!==e)return!1;if(n.length!==e)return!1;if(l.length!==a)return!1;if(u.length!==a)return!1;const m=Float64Array.BYTES_PER_ELEMENT,f=16,g=i._malloc(f+e*m),_=i._malloc(f+e*m),b=i._malloc(f+a*m),w=i._malloc(f+a*m),I=g+f-g%f,T=_+f-_%f,M=b+f-b%f,E=w+f-w%f;try{i.HEAPF64.subarray(I>>3,(I>>3)+e).set(s),i.HEAPF64.subarray(T>>3,(T>>3)+e).set(n),i.HEAPF64.subarray(M>>3,(M>>3)+a).set(l),i.HEAPF64.subarray(E>>3,(E>>3)+a).set(u);const m=v(Object.assign(y,c));return i.applyChronologicalLayout(e,t,r,o,I,T,a,p,d,M,E,h,m)}finally{i._free(g),i._free(_),i._free(b),i._free(w)}}),e,t,r,o,a)}}(_||(_={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(b||(b={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(w||(w={}))},25927:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(86738);let l=class extends o.A{constructor(e){super(e),this.layoutGeometry=null}};(0,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Entity")],l);const p=l},54238:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(77901);let a=class extends o.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a);const l=a},77901:(e,t,r)=>{r.d(t,{A:()=>l});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608));let a=class extends n.oY{constructor(e){super(e),this.properties=null}};(0,s._)([(0,i.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.GraphObject")],a);const l=a},42538:(e,t,r)=>{r.d(t,{A:()=>d});var s=r(90237),n=r(10107),i=(r(44208),r(53966),r(87811),r(40608)),o=r(69622);let a=class extends o.A{constructor(e){super(e),this.openCypherQuery=""}};(0,s._)([(0,n.MZ)()],a.prototype,"openCypherQuery",void 0),a=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQuery")],a);const l=a;let p=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,s._)([(0,n.MZ)()],p.prototype,"bindParameters",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"bindGeometryQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"outputQuantizationParameters",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"outputSpatialReference",void 0),(0,s._)([(0,n.MZ)()],p.prototype,"provenanceBehavior",void 0),p=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],p);const d=p},40662:(e,t,r)=>{r.d(t,{A:()=>a});var s=r(90237),n=(r(53966),r(44208),r(87811),r(49186),r(40608)),i=r(77901);let o=class extends i.A{constructor(e){super(e)}};o=(0,s._)([(0,n.$)("esri.rest.knowledgeGraph.ObjectValue")],o);const a=o},42095:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=r(25482),i=r(10107),o=(r(44208),r(53966),r(87811),r(40608)),a=r(77901);let l=class extends n.oY{constructor(e){super(e),this.path=null}};(0,s._)([(0,i.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,s._)([(0,o.$)("esri.rest.knowledgeGraph.Path")],l);const p=l},23150:(e,t,r)=>{r.d(t,{A:()=>p});var s=r(90237),n=(r(59456),r(10107)),i=(r(44208),r(53966),r(87811),r(40608)),o=r(54238),a=r(82799);let l=class extends o.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,s._)([(0,n.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,s._)([(0,n.MZ)({type:a.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,s._)([(0,i.$)("esri.rest.knowledgeGraph.Relationship")],l);const p=l}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692,3069],{13069:(e,t,i)=>{i.d(t,{lk:()=>a,vD:()=>n,yS:()=>s});const r="randomUUID"in crypto;function a(){if(r)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 s(){return`{${a().toUpperCase()}}`}function n(){return`{${a()}}`}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>O});var r=i(90237),a=i(5503),s=i(49186),n=i(53966),o=i(91869),l=i(92071),p=i(74887),d=i(84952),y=i(13069),c=i(10107),h=(i(44208),i(87811),i(36005)),u=i(40608),g=i(43937),m=i(35666),f=i(4146),w=i(61184),S=i(70643),b=i(85342),L=i(45654),M=i(18768),v=i(63074),I=i(69208),T=i(16131),_=i(8303),A=i(54310),G=i(25036),E=i(10873),D=i(71402),P=i(97159);let C=class extends((0,v.dM)((0,G.j)((0,A.J)((0,M.b)((0,T.q)((0,_.A)((0,l.P)((0,I.d)(f.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(a.A.ofType(S.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(a.A.ofType(S.A)),this.type="knowledge-graph",this.url=null}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,p.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),await(0,b.qN)(this)}async _fetchMetadata(){if(!this.url)throw new s.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,D.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}))}async _initializeLayerProperties(){this.originIdOf("inclusionModeDefinition")===m.Gr.USER?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new w.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,L._s)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach((t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})})),this.setAtOrigin("inclusionModeDefinition",e,(0,m.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach(((e,i)=>{const r=this._graphTypeLookup.get(i);if(!r)return n.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==r.type&&"entity"!==r.type&&(n.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))}));else if(!e.generateAllSublayers)throw new s.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,r=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):r&&r.size>0&&r.forEach(((i,r)=>{const a=this._graphTypeLookup.get(r);switch(a?.type){case"relationship":t.push(a);break;case"entity":e.push(a)}})),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach((t=>{e(t)}))}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const i of e)this.sublayerIdsCache.has(i.typeName)||(this.sublayerIdsCache.set(i.typeName,new Set),t.push(i.typeName)),this.sublayerIdsCache.get(i.typeName).add(i.id);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.sublayerCaches.set(e,new Map))}await(0,b.qN)(this,t),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach((e=>{const r=this._createSublayer(e);i(r)&&t.push(r),this._updateSublayerCaches(e)}))}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new S.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const i=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));i&&(t.objectType=i,this._updateSublayerCaches(i))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}_saveUrlAsNewResource(e,t,i,r){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,L.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then((a=>{const s=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,d.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(r);e[t]=s.itemRelativeUrl,i.toAdd.push({resource:s,content:{type:"blob",blob:a},compress:!1,finish:e=>{this.definitionSetMap=e.url}})})))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}readDefinitionSetMap(e,t,i){return(0,P.f)(e,i)}writeDefinitionSetMap(e,t,i,r){const a=r?.portalItem,s=r?.resources,n=(0,m.aB)(r?.origin);if(!a||!s||null==n)return void(e&&(t[i]=(0,P.t)(e,r)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(l===m.Gr.USER||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,s,a);else if(n===l&&e){const n=(0,P.t)(e,r);(0,d.oP)(n)?this._saveUrlAsNewResource(t,i,s,a):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):n.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.originIdOf("layers")===m.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===m.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const i=(0,o.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{i.add(e.id)}))}))}async addRecords(e){await this._handleNewRecords(e)}async removeRecords(e){const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,r._)([(0,c.MZ)()],C.prototype,"dataManager",void 0),(0,r._)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],C.prototype,"definitionSetMap",void 0),(0,r._)([(0,h.w)("definitionSetMap")],C.prototype,"readDefinitionSetMap",null),(0,r._)([(0,g.K)("definitionSetMap")],C.prototype,"writeDefinitionSetMap",null),(0,r._)([(0,c.MZ)()],C.prototype,"inclusionModeDefinition",null),(0,r._)([(0,c.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,r._)([(0,c.MZ)({type:a.A.ofType(S.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"layers",void 0),(0,r._)([(0,c.MZ)()],C.prototype,"memberEntityTypes",void 0),(0,r._)([(0,c.MZ)()],C.prototype,"memberRelationshipTypes",void 0),(0,r._)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],C.prototype,"operationalLayerType",void 0),(0,r._)([(0,c.MZ)()],C.prototype,"sublayerIdsCache",void 0),(0,r._)([(0,c.MZ)({type:a.A.ofType(S.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"tables",void 0),(0,r._)([(0,c.MZ)({json:{read:!1}})],C.prototype,"type",void 0),(0,r._)([(0,c.MZ)(E.OZ)],C.prototype,"url",void 0),C=(0,r._)([(0,u.$)("esri.layers.KnowledgeGraphLayer")],C);const O=C},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),a=i(53966),s=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,a.A.getLogger(this)))}};return(0,r._)([(0,s.MZ)()],t.prototype,"title",null),(0,r._)([(0,s.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},69208:(e,t,i)=>{i.d(t,{d:()=>n});var r=i(90237),a=i(10107),s=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,r._)([(0,a.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,r._)([(0,s.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,i)=>{i.d(t,{q:()=>b});var r=i(90237),a=i(49186),s=i(84952),n=i(10107),o=i(56507),l=(i(87811),i(44208),i(36005)),p=i(40608),d=i(43937),y=i(89317),c=i(45917),h=i(49422);const u={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},g={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},m={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},f={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,Voxel:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":u,"web-map/basemap":g,"web-map/tables":m,"link-chart/operational-layers":{...u,LinkChartLayer:!0},"link-chart/basemap":g,"link-chart/tables":m,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0}};var w=i(10873),S=i(79677);const b=e=>{let t=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,t,i){return"Group Layer"===i?.portalItem?.type?void 0:e}writeListMode(e,t,i,r){(r&&"ground"===r.layerContainerType||e&&(0,h.R)(this,i,{},r))&&(t[i]=e)}writeOperationalLayerType(e,t,i,r){e&&"tables"!==r?.layerContainerType&&(t.layerType=e)}writeTitle(e,t){t.title=e??"Layer"}readTimeExtent(e){return e?S.A.fromArray(e):null}writeTimeExtent(e,t,i,r){e&&"tables"!==r.layerContainerType&&(e.isEmpty?r?.messages&&r.messages.push(new a.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):t[i]=e.toArray())}read(e,t){t&&(t.layer=this),(0,c.t)(this,e,(t=>super.read(e,t)),t)}write(e,t){if(!this.persistenceEnabled&&!t?.ignorePersistenceEnabled)return null;if(t?.origin){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`,i=f[e];let r=!!i?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(r=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(r=!1),!r)return t.messages?.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const i=super.write(e,{...t,layer:this}),r=!!t&&!!t.messages&&!!t.messages.filter((e=>e instanceof a.A&&"web-document-write:property-required"===e.name)).length;return(0,s.w8)(i?.url)?(t?.messages?.push(new a.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&r?null:i}beforeSave(){}};return(0,r._)([(0,n.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],t.prototype,"id",void 0),(0,r._)([(0,l.w)("id",["id"])],t.prototype,"readId",null),(0,r._)([(0,n.MZ)(w.C1)],t.prototype,"listMode",void 0),(0,r._)([(0,d.K)("listMode")],t.prototype,"writeListMode",null),(0,r._)([(0,n.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:y.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,r._)([(0,n.MZ)(w.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,n.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,r._)([(0,n.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],t.prototype,"title",void 0),(0,r._)([(0,d.K)("title"),(0,d.K)(["web-scene"],"title")],t.prototype,"writeTitle",null),(0,r._)([(0,n.MZ)({type:S.A,json:{origins:{"web-scene":{write:{layerContainerTypes:y.K}}}}})],t.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,l.w)("visibilityTimeExtent")],t.prototype,"readTimeExtent",null),(0,r._)([(0,d.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,r._)([(0,n.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:y.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,r._)([(0,p.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,i)=>{i.d(t,{A:()=>M});var r=i(90237),a=i(92602),s=i(70333),n=i(78888),o=i(60999),l=i(49186),p=i(53966),d=i(97768),y=i(74887),c=i(84952),h=i(10107),u=(i(44208),i(87811),i(36005)),g=i(40608),m=i(43937),f=i(83531),w=i(20655),S=i(80812),b=i(41318),L=i(10407);const M=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new S.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await Promise.all([i.e(5356),i.e(1204)]).then(i.bind(i,41204));return(0,y.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,y.zf)(e)||p.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.QP)(e),!0))))}async setUserPrivileges(e,t){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:a}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,y.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=e===i.id;if(r&&i.portal.user)return(0,L.It)(i);let a,n;if(r)a=i.portal.url;else try{a=await(0,f.wI)(this.url,t)}catch(e){(0,y.QP)(e)}if(!a||!(0,c.b8)(a,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;n=await(s.id?.getCredential(`${a}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,y.QP)(e)}const o=!0,l=!1,p=!1;if(!n)return{features:{edit:o,fullEdit:l},content:{updateItem:p}};try{if(r?await i.reload():(i=new S.default({id:e,portal:{url:a}}),await i.load(t)),i.portal.user)return(0,L.It)(i)}catch(e){(0,y.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:p}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,y.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=v.credential===t?v.user:await this._fetchEditingUser(e);return v.credential=t,v.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,a=w.A.getDefault();if(a&&a.loaded&&(0,c.S8)(a.restUrl)===(0,c.S8)(r))return a.user;const l=`${r}/community/self`,p=null!=e?e.signal:null,d=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return d.ok?b.A.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||w.A.getDefault());return i&&r&&!(0,c.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,h.MZ)({type:S.default})],t.prototype,"portalItem",null),(0,r._)([(0,u.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,r._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},v={credential:null,user:null}}}]);
|