@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([[5989,8370],{38961:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(5503),n=(r(60999),r(49186),r(53966),r(14012),r(80559)),a=r(10107),o=r(40608);let l=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.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 s.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 d=l},4902:(e,t,r)=>{r.d(t,{PH:()=>o,sA:()=>a});var i=r(90237),s=r(40608);let n=0;const a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t},o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(a(class{})){};l=(0,i._)([(0,s.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>w});var i=r(90237),s=r(69622),n=r(76953),a=r(4718),o=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[o.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.o8)(e),o.Gr.DEFAULTS)}));for(let r=o.Gr.SERVICE;r<o.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,a.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=o.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=o.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||o.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var d=r(45917),p=r(88620),u=r(40608);const y=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,d.L)(this,e,t)}getAtOrigin(e,t){const r=c(this),i=(0,o.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,o.OL)(this.originIdOf(e))}originIdOf(e){return c(this).originOf(e)}revert(e,t){const r=c(this),i=(0,o.aB)(t),s=(0,p.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,u.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function c(e){return(0,p.oY)(e).store}let h=class extends(y(s.A)){};h=(0,i._)([(0,u.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],h);var g=r(16649),m=r(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,o.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,o.aB)(r))}removeOrigin(e){const t=v(this),r=(0,o.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),o.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,o.aB)(t),s=(0,g.Jt)(this,e);for(let t=i+1;t<o.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,u.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,p.oY)(e).store}const b=e=>{let t=class extends(f(y(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,u.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(b(s.A)){};w=(0,i._)([(0,u.$)("esri.core.MultiOriginJSONSupport")],w)},36708:(e,t,r)=>{r.d(t,{C_:()=>y,OH:()=>g,Vh:()=>m,on:()=>u,pc:()=>f,wB:()=>l,z7:()=>d}),r(60999),r(5503);var i=r(37955),s=r(36563),n=r(97768),a=r(74887),o=r(14012);function l(e,t,r={}){return p(e,t,r,c)}function d(e,t,r={}){return p(e,t,r,h)}function p(e,t,r={},i){let s=null;const a=r.once?(e,r)=>{i(e)&&((0,n.xt)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,o.Cn)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return s}function u(e,t,r,a={}){let o=null,d=null,p=null;function u(){o&&d&&(d.remove(),a.onListenerRemove?.(o),o=null,d=null)}function y(e){a.once&&a.once&&(0,n.xt)(p),r(e)}const c=l(e,((e,r)=>{u(),(0,i.wb)(e)&&(o=e,d=(0,i.on)(e,t,y),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return p=(0,s.hA)((()=>{c.remove(),u()})),p}function y(e,t){return function(e,t,r){if((0,a.G4)(r))return Promise.reject((0,a.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let o=null;function l(){o=(0,n.xt)(o)}return new Promise(((i,n)=>{o=(0,s.vE)([(0,a.u7)(r,(()=>{l(),n((0,a.NK)())})),p(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??c)])}))}(e,h,t)}function c(e){return!0}function h(e){return!!e}r(80559);const g={sync:!0},m={initial:!0},f={sync:!0,initial:!0}},85989:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var i=r(90237),s=r(38961),n=r(81583),a=r(53966),o=r(92071),l=r(74887),d=r(36708),p=r(10107),u=(r(44208),r(87811),r(88620)),y=r(36005),c=r(40608),h=r(43937),g=r(35666),m=r(4146),f=r(63074),v=r(16131),b=r(8303),w=r(25036),S=r(4513),_=r(80812),L=r(5503),A=r(62885);function I(e,t,r){let i,s;if(e)for(let n=0,a=e.length;n<a;n++){if(i=e.at(n),i?.[t]===r)return i;if("group"===i?.type&&(s=I(i.layers,t,r),s))return s}}const M=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new L.A;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||a.A.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},r=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>{if(e.item===this)return e.preventDefault(),void a.A.getLogger(this).error("#add()","Cannot add layer to itself.");(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item)})),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>r(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,A.V)(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof m.A){const i=e;i.parent===this?this.reorder(i,t):r.add(i,t)}else(0,l.$X)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):a.A.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;let i=r.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(r.add(e,i),i+=1):this.reorder(e,i)}))}findLayerById(e){return I(this.layers,"id",e)}findLayerByUid(e){return I(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,i._)([(0,p.MZ)()],t.prototype,"layers",null),t=(0,i._)([(0,c.$)("esri.support.LayersMixin")],t),t};function T(e,t,r){if(e)for(let i=0,s=e.length;i<s;i++){const s=e.at(i);if(s[t]===r)return s;if("group"===s?.type){const e=T(s.tables,t,r);if(e)return e}}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new L.A,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&a.A.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.toArray();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,A.V)(e,this._get("tables")))}findTableById(e){return T(this.tables,"id",e)}findTableByUid(e){return T(this.tables,"uid",e)}};return(0,i._)([(0,p.MZ)()],t.prototype,"tables",null),t=(0,i._)([(0,c.$)("esri.support.TablesMixin")],t),t},O=Symbol("WebScene");var G=r(92935),P=r(26121),x=r(751);let C=class extends((0,f.dM)((0,w.j)((0,v.q)((0,b.A)(E(M((0,o.P)(m.A)))))))){constructor(e){var t;super(e),this.allLayers=new s.A({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.A({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group",this._debouncedSaveOperations=(0,l.sg)((async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(2958).then(r.bind(r,32958));switch(e){case G.X.SAVE:return s(this,t);case G.X.SAVE_AS:return n(this,i,t)}}))}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,d.wB)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&O in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,d.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),a.A.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")})),t))}),d.pc),(0,d.wB)((()=>this.visible),this._onVisibilityChange.bind(this),d.OH)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}get sourceIsPortalItem(){return this.portalItem&&this.originIdOf("portalItem")===g.Gr.USER}_writeLayers(e,t,r,i){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,x.CJ)(e,i.webmap?i.webmap.getLayerJSONFromResourceInfo(e):null,i);t?.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}readPortalItem(e,t,r){const{itemId:i,layerType:s}=t;if("GroupLayer"===s&&i)return new _.default({id:i,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}async beforeSave(){return(0,P.d)(this)}load(e){const t=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Group Layer","Scene Service"],layerModuleTypeMap:S.S},e).catch((e=>{if((0,l.QP)(e),this.sourceIsPortalItem)throw e}));return this.addResolvingPromise(t),Promise.resolve(this)}async loadAll(){return(0,n.g)(this,(e=>{e(this.layers,this.tables)}))}async save(e){return this._debouncedSaveOperations(G.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(G.X.SAVE_AS,t,e)}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer read to Grouplayer: uid=${e.uid}`):this.addHandles((0,d.wB)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),d.OH),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.oY)(this).initialized)return;const r=this.layers;let i=r.find((e=>e.visible));switch(e){case"exclusive":r.length&&!i&&(i=r.at(0),i.visible=!0),this._turnOffOtherLayers(i);break;case"inherited":r.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,i._)([(0,p.MZ)({readOnly:!0,dependsOn:[]})],C.prototype,"allLayers",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],C.prototype,"allTables",void 0),(0,i._)([(0,p.MZ)({json:{read:!0,write:!0}})],C.prototype,"blendMode",void 0),(0,i._)([(0,p.MZ)()],C.prototype,"fullExtent",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],C.prototype,"sourceIsPortalItem",null),(0,i._)([(0,p.MZ)({json:{read:!1,write:{ignoreOrigin:!0}}})],C.prototype,"layers",void 0),(0,i._)([(0,h.K)("layers")],C.prototype,"_writeLayers",null),(0,i._)([(0,p.MZ)({type:["GroupLayer"]})],C.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.MZ)({json:{origins:{"web-map":{read:!1,write:{overridePolicy(e,t,r){return{enabled:"Group Layer"===e?.type&&r?.initiator!==this}}}},"web-scene":{read:!1,write:!1}}}})],C.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-map","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,i._)([(0,h.K)("web-map","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,i._)([(0,p.MZ)()],C.prototype,"spatialReference",void 0),(0,i._)([(0,p.MZ)({json:{read:!1},readOnly:!0,value:"group"})],C.prototype,"type",void 0),(0,i._)([(0,p.MZ)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,r)=>{"inherited"!==e&&(t[r]=e)}}}}})],C.prototype,"visibilityMode",null),C=(0,i._)([(0,c.$)("esri.layers.GroupLayer")],C);const Z=C},4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(90237),s=(r(59456),r(78888)),n=r(49186),a=r(65529),o=r(4902),l=r(92474),d=r(53966),p=r(74887),u=r(84952),y=r(10107),c=(r(44208),r(87811),r(40608)),h=r(92602),g=r(79677),m=r(5443),f=r(16930);let v=0,b=class extends(a.A.EventedMixin((0,o.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||h.A.portalUrl;throw d.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||d.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,u.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,y.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i._)([(0,y.MZ)({type:m.A})],b.prototype,"fullExtent",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,y.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,y.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,y.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,y.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,y.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,y.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,y.MZ)({type:f.A})],b.prototype,"spatialReference",void 0),(0,i._)([(0,y.MZ)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,y.MZ)()],b.prototype,"url",void 0),(0,i._)([(0,y.MZ)({type:g.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,y.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,c.$)("esri.layers.Layer")],b);const w=b},16131:(e,t,r)=>{r.d(t,{q:()=>w});var i=r(90237),s=r(49186),n=r(84952),a=r(10107),o=r(56507),l=(r(87811),r(44208),r(36005)),d=r(40608),p=r(43937),u=r(89317),y=r(45917),c=r(49422);const h={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,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":h,"web-map/basemap":g,"web-map/tables":m,"link-chart/operational-layers":{...h,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 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,c.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 s.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=f[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 s.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 s.A&&"web-document-write:property-required"===e.name)).length;return(0,n.w8)(r?.url)?(t?.messages?.push(new s.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:u.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:u.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:u.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,d.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),s=r(92602),n=r(70333),a=r(78888),o=r(60999),l=r(49186),d=r(53966),p=r(97768),u=r(74887),y=r(84952),c=r(10107),h=(r(44208),r(87811),r(36005)),g=r(40608),m=r(43937),f=r(83531),v=r(20655),b=r(80812),w=r(41318),S=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,u.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.zf)(e)||d.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,u.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,u.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,S.It)(r);let s,a;if(i)s=r.portal.url;else try{s=await(0,f.wI)(this.url,t)}catch(e){(0,u.QP)(e)}if(!s||!(0,y.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.QP)(e)}const o=!0,l=!1,d=!1;if(!a)return{features:{edit:o,fullEdit:l},content:{updateItem:d}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,S.It)(r)}catch(e){(0,u.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=L.credential===t?L.user:await this._fetchEditingUser(e);return L.credential=t,L.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=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,y.S8)(s.restUrl)===(0,y.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,p=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));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,c.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},L={credential:null,user:null}},79677:(e,t,r)=>{r.d(t,{A:()=>c});var i,s=r(90237),n=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),p=r(43937),u=r(56400);let y=i=class extends n.oY{static get allTime(){return h}static get empty(){return g}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let s=this.end;if(s){const r=(0,a.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let a,o;return s>=t&&s<=r?a=s:t>=s&&t<=n&&(a=t),r>=s&&r<=n?o=r:n>=t&&n<=r&&(o=n),null==a||null==o||isNaN(a)||isNaN(o)?i.empty:new i({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:o}=this;return null!=n&&(s.start=(0,a.S1)(n,e,t,r)),null!=o&&(s.end=(0,a.S1)(o,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],y.prototype,"readEnd",null),(0,s._)([(0,p.K)("end")],y.prototype,"writeEnd",null),(0,s._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isAllTime",null),(0,s._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isEmpty",null),(0,s._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],y.prototype,"readStart",null),(0,s._)([(0,p.K)("start")],y.prototype,"writeStart",null),y=i=(0,s._)([(0,d.$)("esri.time.TimeExtent")],y);const c=y,h=new y,g=new y({start:void 0,end:void 0})},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},26121:(e,t,r)=>{r.d(t,{c:()=>a,d:()=>s});var i=r(49186);async function s(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const n=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function a(e,t,r){let s=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new i.A(e,t,r)));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map((e=>new i.A("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter((({name:e})=>!(n.has(e)||t.includes(e))))),i&&(s=s.filter((e=>"web-document-write:property-required"!==e.name)))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5989,8370],{38961:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),s=r(5503),n=(r(60999),r(49186),r(53966),r(14012),r(80559)),a=r(10107),o=r(40608);let l=class extends s.A{constructor(e){super(e),this.getCollections=null}initialize(){this.addHandles((0,n.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 s.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 d=l},4902:(e,t,r)=>{r.d(t,{PH:()=>o,sA:()=>a});var i=r(90237),s=r(40608);let n=0;const a=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable")],t),t},o=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:n++})}};return t=(0,i._)([(0,s.$)("esri.core.Identifiable.NumericIdentifiable")],t),t};let l=class extends(a(class{})){};l=(0,i._)([(0,s.$)("esri.core.Identifiable")],l)},92071:(e,t,r)=>{r.d(t,{P:()=>b,L:()=>w});var i=r(90237),s=r(69622),n=r(76953),a=r(4718),o=r(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(o.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new l,r=this._originStores[o.Gr.DEFAULTS];r&&r.forEach(((e,r)=>{t.set(r,(0,a.o8)(e),o.Gr.DEFAULTS)}));for(let r=o.Gr.SERVICE;r<o.AU;r++){const i=this._originStores[r];i&&i.forEach(((i,s)=>{e&&e.has(s)||t.set(s,(0,a.o8)(i),r)}))}return t}get(e,t){const r=void 0===t?this._values:this._originStores[t];return r?r.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,r=o.Gr.USER){let i=this._originStores[r];if(i||(i=new Map,this._originStores[r]=i),i.set(e,t),!this._values.has(e)||this._propertyOriginMap.get(e)<=r){const i=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,r),i!==t}return!1}delete(e,t=o.Gr.USER){const r=this._originStores[t];if(!r)return;const i=r.get(e);if(r.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let r=t-1;r>=0;r--){const t=this._originStores[r];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,r);break}}}return i}has(e,t){const r=void 0===t?this._values:this._originStores[t];return!!r&&r.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const r=this._originStores[t],i=r?.get(e),s=this._values.get(e);return this._values.set(e,i),this._propertyOriginMap.set(e,t),s!==i}originOf(e){return this._propertyOriginMap.get(e)||o.Gr.DEFAULTS}forEach(e){this._values.forEach(e)}}var d=r(45917),p=r(88620),u=r(40608);const y=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,p.oY)(this),r=t.store,i=new l;t.store=i,(0,n.k)(t,r,i)}read(e,t){(0,d.L)(this,e,t)}getAtOrigin(e,t){const r=c(this),i=(0,o.aB)(t);if("string"==typeof e)return r.get(e,i);const s={};return e.forEach((e=>{s[e]=r.get(e,i)})),s}originOf(e){return(0,o.OL)(this.originIdOf(e))}originIdOf(e){return c(this).originOf(e)}revert(e,t){const r=c(this),i=(0,o.aB)(t),s=(0,p.oY)(this);let n;n="string"==typeof e?"*"===e?r.keys(i):[e]:e,n.forEach((e=>{s.invalidate(e),r.revert(e,i),s.commit(e)}))}};return t=(0,i._)([(0,u.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function c(e){return(0,p.oY)(e).store}let h=class extends(y(s.A)){};h=(0,i._)([(0,u.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],h);var g=r(16649),m=r(49422);const f=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,o.aB)(t))}write(e,t){return(0,m.M)(this,e=e||{},t),e}setAtOrigin(e,t,r){(0,p.oY)(this).setAtOrigin(e,t,(0,o.aB)(r))}removeOrigin(e){const t=v(this),r=(0,o.aB)(e),i=t.keys(r);for(const e of i)t.originOf(e)===r&&t.set(e,t.get(e,r),o.Gr.USER)}updateOrigin(e,t){const r=v(this),i=(0,o.aB)(t),s=(0,g.Jt)(this,e);for(let t=i+1;t<o.AU;++t)r.delete(e,t);r.set(e,s,i)}toJSON(e){return this.write({},e)}};return t=(0,i._)([(0,u.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,p.oY)(e).store}const b=e=>{let t=class extends(f(y(e))){constructor(...e){super(...e)}};return t=(0,i._)([(0,u.$)("esri.core.MultiOriginJSONSupport")],t),t};let w=class extends(b(s.A)){};w=(0,i._)([(0,u.$)("esri.core.MultiOriginJSONSupport")],w)},36708:(e,t,r)=>{r.d(t,{C_:()=>y,OH:()=>g,Vh:()=>m,on:()=>u,pc:()=>f,wB:()=>l,z7:()=>d}),r(60999),r(5503);var i=r(37955),s=r(36563),n=r(97768),a=r(74887),o=r(14012);function l(e,t,r={}){return p(e,t,r,c)}function d(e,t,r={}){return p(e,t,r,h)}function p(e,t,r={},i){let s=null;const a=r.once?(e,r)=>{i(e)&&((0,n.xt)(s),t(e,r))}:(e,r)=>{i(e)&&t(e,r)};if(s=(0,o.Cn)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return s}function u(e,t,r,a={}){let o=null,d=null,p=null;function u(){o&&d&&(d.remove(),a.onListenerRemove?.(o),o=null,d=null)}function y(e){a.once&&a.once&&(0,n.xt)(p),r(e)}const c=l(e,((e,r)=>{u(),(0,i.wb)(e)&&(o=e,d=(0,i.on)(e,t,y),a.onListenerAdd?.(e))}),{sync:a.sync,initial:!0});return p=(0,s.hA)((()=>{c.remove(),u()})),p}function y(e,t){return function(e,t,r){if((0,a.G4)(r))return Promise.reject((0,a.NK)());const i=e();if(t?.(i))return Promise.resolve(i);let o=null;function l(){o=(0,n.xt)(o)}return new Promise(((i,n)=>{o=(0,s.vE)([(0,a.u7)(r,(()=>{l(),n((0,a.NK)())})),p(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??c)])}))}(e,h,t)}function c(e){return!0}function h(e){return!!e}r(80559);const g={sync:!0},m={initial:!0},f={sync:!0,initial:!0}},85989:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Z});var i=r(90237),s=r(38961),n=r(81583),a=r(53966),o=r(92071),l=r(74887),d=r(36708),p=r(10107),u=(r(44208),r(87811),r(88620)),y=r(36005),c=r(40608),h=r(43937),g=r(35666),m=r(4146),f=r(63074),v=r(16131),b=r(8303),w=r(25036),S=r(4513),_=r(80812),L=r(5503),A=r(62885);function I(e,t,r){let i,s;if(e)for(let n=0,a=e.length;n<a;n++){if(i=e.at(n),i?.[t]===r)return i;if("group"===i?.type&&(s=I(i.layers,t,r),s))return s}}const M=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new L.A;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||a.A.getLogger(this).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},r=e=>{e.parent=null,this.layerRemoved(e)};this.addHandles([this.layers.on("before-add",(e=>{if(e.item===this)return e.preventDefault(),void a.A.getLogger(this).error("#add()","Cannot add layer to itself.");(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item)})),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>r(e.item)))])}destroy(){const e=this.layers.toArray();for(const t of e)t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,A.V)(e,this._get("layers")))}add(e,t){const r=this.layers;if(t=r.getNextIndex(t),e instanceof m.A){const i=e;i.parent===this?this.reorder(i,t):r.add(i,t)}else(0,l.$X)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):a.A.getLogger(this).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const r=this.layers;let i=r.getNextIndex(t);e.slice().forEach((e=>{e.parent!==this?(r.add(e,i),i+=1):this.reorder(e,i)}))}findLayerById(e){return I(this.layers,"id",e)}findLayerByUid(e){return I(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,i._)([(0,p.MZ)()],t.prototype,"layers",null),t=(0,i._)([(0,c.$)("esri.support.LayersMixin")],t),t};function T(e,t,r){if(e)for(let i=0,s=e.length;i<s;i++){const s=e.at(i);if(s[t]===r)return s;if("group"===s?.type){const e=T(s.tables,t,r);if(e)return e}}}const E=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new L.A,this.addHandles([this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&a.A.getLogger(this).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))])}destroy(){const e=this.tables.toArray();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,A.V)(e,this._get("tables")))}findTableById(e){return T(this.tables,"id",e)}findTableByUid(e){return T(this.tables,"uid",e)}};return(0,i._)([(0,p.MZ)()],t.prototype,"tables",null),t=(0,i._)([(0,c.$)("esri.support.TablesMixin")],t),t},O=Symbol("WebScene");var G=r(92935),P=r(26121),x=r(751);let C=class extends((0,f.dM)((0,w.j)((0,v.q)((0,b.A)(E(M((0,o.P)(m.A)))))))){constructor(e){var t;super(e),this.allLayers=new s.A({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.A({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return!!t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group",this._debouncedSaveOperations=(0,l.sg)((async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(2958).then(r.bind(r,32958));switch(e){case G.X.SAVE:return s(this,t);case G.X.SAVE_AS:return n(this,i,t)}}))}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles([(0,d.wB)((()=>{let e=this.parent;for(;e&&"parent"in e&&e.parent;)e=e.parent;return e&&O in e}),(e=>{const t="prevent-adding-tables";this.removeHandles(t),e&&(this.tables.removeAll(),this.addHandles((0,d.on)((()=>this.tables),"before-add",(e=>{e.preventDefault(),a.A.getLogger(this).errorOnce("tables","tables in group layers in a webscene are not supported. Please move the tables from the group layer to the webscene if you want to persist them.")})),t))}),d.pc),(0,d.wB)((()=>this.visible),this._onVisibilityChange.bind(this),d.OH)])}destroy(){this.allLayers.destroy(),this.allTables.destroy()}get sourceIsPortalItem(){return this.portalItem&&this.originIdOf("portalItem")===g.Gr.USER}_writeLayers(e,t,r,i){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,x.CJ)(e,i.webmap?i.webmap.getLayerJSONFromResourceInfo(e):null,i);t?.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}readPortalItem(e,t,r){const{itemId:i,layerType:s}=t;if("GroupLayer"===s&&i)return new _.default({id:i,portal:r?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}async beforeSave(){return(0,P.d)(this)}load(e){const t=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Group Layer","Scene Service"],layerModuleTypeMap:S.S},e).catch((e=>{if((0,l.QP)(e),this.sourceIsPortalItem)throw e}));return this.addResolvingPromise(t),Promise.resolve(this)}async loadAll(){return(0,n.g)(this,(e=>{e(this.layers,this.tables)}))}async save(e){return this._debouncedSaveOperations(G.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(G.X.SAVE_AS,t,e)}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this.hasHandles(e.uid)?console.error(`Layer read to Grouplayer: uid=${e.uid}`):this.addHandles((0,d.wB)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),d.OH),e.uid)}layerRemoved(e){this.removeHandles(e.uid),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.oY)(this).initialized)return;const r=this.layers;let i=r.find((e=>e.visible));switch(e){case"exclusive":r.length&&!i&&(i=r.at(0),i.visible=!0),this._turnOffOtherLayers(i);break;case"inherited":r.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,i._)([(0,p.MZ)({readOnly:!0,dependsOn:[]})],C.prototype,"allLayers",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],C.prototype,"allTables",void 0),(0,i._)([(0,p.MZ)({json:{read:!0,write:!0}})],C.prototype,"blendMode",void 0),(0,i._)([(0,p.MZ)()],C.prototype,"fullExtent",void 0),(0,i._)([(0,p.MZ)({readOnly:!0})],C.prototype,"sourceIsPortalItem",null),(0,i._)([(0,p.MZ)({json:{read:!1,write:{ignoreOrigin:!0}}})],C.prototype,"layers",void 0),(0,i._)([(0,h.K)("layers")],C.prototype,"_writeLayers",null),(0,i._)([(0,p.MZ)({type:["GroupLayer"]})],C.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.MZ)({json:{origins:{"web-map":{read:!1,write:{overridePolicy(e,t,r){return{enabled:"Group Layer"===e?.type&&r?.initiator!==this}}}},"web-scene":{read:!1,write:!1}}}})],C.prototype,"portalItem",null),(0,i._)([(0,y.w)("web-map","portalItem",["itemId"])],C.prototype,"readPortalItem",null),(0,i._)([(0,h.K)("web-map","portalItem",{itemId:{type:String}})],C.prototype,"writePortalItem",null),(0,i._)([(0,p.MZ)()],C.prototype,"spatialReference",void 0),(0,i._)([(0,p.MZ)({json:{read:!1},readOnly:!0,value:"group"})],C.prototype,"type",void 0),(0,i._)([(0,p.MZ)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{type:["independent","exclusive"],write:(e,t,r)=>{"inherited"!==e&&(t[r]=e)}}}}})],C.prototype,"visibilityMode",null),C=(0,i._)([(0,c.$)("esri.layers.GroupLayer")],C);const Z=C},4146:(e,t,r)=>{r.d(t,{A:()=>w});var i=r(90237),s=(r(59456),r(78888)),n=r(49186),a=r(65529),o=r(4902),l=r(92474),d=r(53966),p=r(74887),u=r(84952),y=r(10107),c=(r(44208),r(87811),r(40608)),h=r(92602),g=r(79677),m=r(5443),f=r(16930);let v=0,b=class extends(a.A.EventedMixin((0,o.sA)(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new m.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await r.e(7982).then(r.bind(r,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:i}=await r.e(5613).then(r.bind(r,45613));try{return await i(t)}catch(e){const r=t?.portalItem,i=r?.id||"unset",s=r?.portal?.url||h.A.portalUrl;throw d.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+i+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,p.zf)(e)||d.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){const e=this.parent;if(e){const t=this;"layers"in e&&e.layers.includes(t)?e.layers.remove(t):"tables"in e&&e.tables.includes(t)?e.tables.remove(t):"baseLayers"in e&&e.baseLayers.includes(t)?e.baseLayers.remove(t):"referenceLayers"in e&&e.referenceLayers.includes(t)&&e.referenceLayers.remove(t),this._set("parent",null)}}get effectiveVisible(){let e=this.visible;const t=this.parent;return e&&t&&"effectiveVisible"in t&&(e&&=t.effectiveVisible),e}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,u.An)(this.url)}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new n.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,y.MZ)({type:String})],b.prototype,"attributionDataUrl",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],b.prototype,"effectiveVisible",null),(0,i._)([(0,y.MZ)({type:m.A})],b.prototype,"fullExtent",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],b.prototype,"hasAttributionData",null),(0,i._)([(0,y.MZ)({type:String,clonable:!1})],b.prototype,"id",void 0),(0,i._)([(0,y.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"legendEnabled",void 0),(0,i._)([(0,y.MZ)({type:["show","hide","hide-children"]})],b.prototype,"listMode",void 0),(0,i._)([(0,y.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],b.prototype,"opacity",void 0),(0,i._)([(0,y.MZ)({clonable:!1})],b.prototype,"parent",void 0),(0,i._)([(0,y.MZ)({readOnly:!0})],b.prototype,"parsedUrl",null),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],b.prototype,"persistenceEnabled",void 0),(0,i._)([(0,y.MZ)({type:Boolean})],b.prototype,"popupEnabled",void 0),(0,i._)([(0,y.MZ)({type:Boolean})],b.prototype,"attributionVisible",void 0),(0,i._)([(0,y.MZ)({type:f.A})],b.prototype,"spatialReference",void 0),(0,i._)([(0,y.MZ)({type:String})],b.prototype,"title",void 0),(0,i._)([(0,y.MZ)({readOnly:!0,json:{read:!1}})],b.prototype,"type",void 0),(0,i._)([(0,y.MZ)()],b.prototype,"url",void 0),(0,i._)([(0,y.MZ)({type:g.A})],b.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,y.MZ)({type:Boolean,nonNullable:!0})],b.prototype,"visible",void 0),b=(0,i._)([(0,c.$)("esri.layers.Layer")],b);const w=b},16131:(e,t,r)=>{r.d(t,{q:()=>w});var i=r(90237),s=r(49186),n=r(84952),a=r(10107),o=r(56507),l=(r(87811),r(44208),r(36005)),d=r(40608),p=r(43937),u=r(89317),y=r(45917),c=r(49422);const h={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":h,"web-map/basemap":g,"web-map/tables":m,"link-chart/operational-layers":{...h,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 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,c.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 s.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=f[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 s.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 s.A&&"web-document-write:property-required"===e.name)).length;return(0,n.w8)(r?.url)?(t?.messages?.push(new s.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:u.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:u.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:u.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,d.$)("esri.layers.mixins.OperationalLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>_});var i=r(90237),s=r(92602),n=r(70333),a=r(78888),o=r(60999),l=r(49186),d=r(53966),p=r(97768),u=r(74887),y=r(84952),c=r(10107),h=(r(44208),r(87811),r(36005)),g=r(40608),m=r(43937),f=r(83531),v=r(20655),b=r(80812),w=r(41318),S=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,u.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,u.zf)(e)||d.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,u.QP)(e),!0))))}async setUserPrivileges(e,t){if(!s.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,u.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,S.It)(r);let s,a;if(i)s=r.portal.url;else try{s=await(0,f.wI)(this.url,t)}catch(e){(0,u.QP)(e)}if(!s||!(0,y.b8)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,u.QP)(e)}const o=!0,l=!1,d=!1;if(!a)return{features:{edit:o,fullEdit:l},content:{updateItem:d}};try{if(i?await r.reload():(r=new b.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,S.It)(r)}catch(e){(0,u.QP)(e)}return{features:{edit:o,fullEdit:l},content:{updateItem:d}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,u.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=L.credential===t?L.user:await this._fetchEditingUser(e);return L.credential=t,L.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=n.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=v.A.getDefault();if(s&&s.loaded&&(0,y.S8)(s.restUrl)===(0,y.S8)(i))return s.user;const l=`${i}/community/self`,d=null!=e?e.signal:null,p=await(0,o.Ke)((0,a.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));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,c.MZ)({type:b.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,m.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,c.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,c.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,g.$)("esri.layers.mixins.PortalLayer")],t),t},L={credential:null,user:null}},79677:(e,t,r)=>{r.d(t,{A:()=>c});var i,s=r(90237),n=r(25482),a=r(88930),o=r(10107),l=(r(44208),r(53966),r(87811),r(36005)),d=r(40608),p=r(43937),u=r(56400);let y=i=class extends n.oY{static get allTime(){return h}static get empty(){return g}static fromArray(e){return new i({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,r=this.end?.getTime()??this.end,i=e.start?.getTime()??e.start,s=e.end?.getTime()??e.end;return t===i&&r===s}expandTo(e,t=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();let r=this.start;r&&(r=(0,a.lL)(r,e,t));let s=this.end;if(s){const r=(0,a.lL)(s,e,t);s=s.getTime()===r.getTime()?r:(0,a.S1)(r,1,e,t)}return new i({start:r,end:s})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return i.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,r=this.end?.getTime()??1/0,s=e.start?.getTime()??-1/0,n=e.end?.getTime()??1/0;let a,o;return s>=t&&s<=r?a=s:t>=s&&t<=n&&(a=t),r>=s&&r<=n?o=r:n>=t&&n<=r&&(o=n),null==a||null==o||isNaN(a)||isNaN(o)?i.empty:new i({start:a===-1/0?null:new Date(a),end:o===1/0?null:new Date(o)})}offset(e,t,r=u.qU){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:o}=this;return null!=n&&(s.start=(0,a.S1)(n,e,t,r)),null!=o&&(s.end=(0,a.S1)(o,e,t,r)),s}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return h.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,r=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:r})}};(0,s._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"end",void 0),(0,s._)([(0,l.w)("end")],y.prototype,"readEnd",null),(0,s._)([(0,p.K)("end")],y.prototype,"writeEnd",null),(0,s._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isAllTime",null),(0,s._)([(0,o.MZ)({readOnly:!0,json:{read:!1}})],y.prototype,"isEmpty",null),(0,s._)([(0,o.MZ)({type:Date,json:{write:{allowNull:!0}}})],y.prototype,"start",void 0),(0,s._)([(0,l.w)("start")],y.prototype,"readStart",null),(0,s._)([(0,p.K)("start")],y.prototype,"writeStart",null),y=i=(0,s._)([(0,d.$)("esri.time.TimeExtent")],y);const c=y,h=new y,g=new y({start:void 0,end:void 0})},92935:(e,t,r)=>{var i;r.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))},26121:(e,t,r)=>{r.d(t,{c:()=>a,d:()=>s});var i=r(49186);async function s(e){const t=[];for(const r of e.allLayers)if("beforeSave"in r&&"function"==typeof r.beforeSave){const e=r.beforeSave();e&&t.push(e)}await Promise.allSettled(t)}const n=new Set(["layer:unsupported","property:unsupported","symbol:unsupported","symbol-layer:unsupported","url:unsupported"]);function a(e,t,r){let s=(e.messages??[]).filter((({type:e})=>"error"===e)).map((({name:e,message:t,details:r})=>new i.A(e,t,r)));if(e.blockedRelativeUrls&&(s=s.concat(e.blockedRelativeUrls.map((e=>new i.A("url:unsupported",`Relative url '${e}' is not supported`))))),r){const{ignoreUnsupported:e,supplementalUnsupportedErrors:t=[],requiredPropertyChecksDisabled:i}=r;e&&(s=s.filter((({name:e})=>!(n.has(e)||t.includes(e))))),i&&(s=s.filter((e=>"web-document-write:property-required"!==e.name)))}if(s.length>0)throw new i.A(t.errorName,"Failed to save due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:s})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[659],{3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>s,Y4:()=>o});var i=r(96285);class n{}function o(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>p,Hq:()=>u,Ie:()=>h,Jt:()=>m,Ne:()=>d,RF:()=>a,aI:()=>v,fA:()=>o,hZ:()=>y,iT:()=>l,is:()=>g,qv:()=>w,vI:()=>c,v_:()=>I,vt:()=>n,w1:()=>s});var i=r(5443);function n(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,o,s,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=o,a[5]=s,a}function s(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 a(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],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,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]=o,e[2]=s,e[3]=a,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 d(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 c(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 y(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 h(e){return e?y(e,w):n(w)}function m(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 w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];n()},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var i=r(90237),n=(r(59456),r(13874)),o=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),s=r(92071),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(50498),p=r(4146),d=r(49186),c=r(92474),y=r(799),h=r(75321),m=r(4071),f=r(22671),g=r(16930);let v=class extends c.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:n,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,h.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,y.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(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:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!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,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:m.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??h.QE,r=(0,h.J0)(t);return null==r?g.A.WGS84:new g.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[h.QE],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!o.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:n,customParameters:o,fields:s,geometryType:a,hasZ:l,objectIdField:p,timeInfo:c,url:m}=e,f={fields:s?.map((e=>e.toJSON())),geometryType:u.Y.toJSON(a),hasZ:l??!1,objectIdField:p,timeInfo:c?.toJSON()},g={apiKey:i,customParameters:o,signal:r},v=await(0,h.Ki)(m,g),[w,I]=await Promise.all([(0,h.Px)(v,g),(0,h.bV)(v,g)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new d.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const S=I.collections.find((({id:e})=>e===n));if(!S)throw new d.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const M=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,h.GA)(v,g):null,T=await(0,h.GL)(S,f,g),b=this._getMaxRecordCount(M),_=this._getCapabilities(T.hasZ,b),F=this._getStorageSpatialReference(S).toJSON(),x=this._getSupportedSpatialReferences(S,I),A=new RegExp(`^${(0,y.Cj)(h.vJ)}`,"i"),Z={};for(const e of x){const t=(0,h.J0)(e);null!=t&&(Z[t]||(Z[t]=e.replace(A,"")))}this.featureDefinition={capabilities:_,collection:S,layerDefinition:T,spatialReference:F,supportedCrs:Z}}};(0,i._)([(0,a.MZ)()],v.prototype,"featureDefinition",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],v.prototype,"layer",void 0),(0,i._)([(0,a.MZ)()],v.prototype,"type",void 0),v=(0,i._)([(0,l.$)("esri.layers.graphics.sources.OGCFeatureSource")],v);var w=r(52136),I=r(63074),S=r(69208),M=r(87718),T=r(76294),b=r(16131),_=r(32756),F=r(8303),x=r(54310),A=r(25036),Z=r(82935),L=r(10873),O=r(33143),G=r(20437),R=r(17036),N=r(30524),P=r(81457),E=r(39383),j=r(61956),C=r(30291),D=r(5443);const q=(0,R.p)();let B=class extends((0,w.p)((0,S.d)((0,T.J)((0,M.F)((0,I.dM)((0,_.f)((0,Z.e)((0,A.j)((0,b.q)((0,F.A)((0,x.J)((0,s.P)(p.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new v({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,N.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,C.tn)(this,e)}createQuery(){return new j.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some((t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(j.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,N.yp)(this.renderer,this.fieldsIndex),(0,N.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,a.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],B.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],B.prototype,"collectionId",void 0),(0,i._)([(0,a.MZ)({type:String})],B.prototype,"copyright",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,i._)([(0,a.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],B.prototype,"description",void 0),(0,i._)([(0,a.MZ)({type:String})],B.prototype,"displayField",void 0),(0,i._)([(0,a.MZ)({type:Number})],B.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,a.MZ)(L.Yj)],B.prototype,"elevationInfo",void 0),(0,i._)([(0,a.MZ)({type:[G.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],B.prototype,"fields",void 0),(0,i._)([(0,a.MZ)(q.fieldsIndex)],B.prototype,"fieldsIndex",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:D.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],B.prototype,"fullExtent",void 0),(0,i._)([(0,a.MZ)({type:u.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.g.read}}}}})],B.prototype,"geometryType",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],B.prototype,"hasZ",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!0})],B.prototype,"isTable",null),(0,i._)([(0,a.MZ)({type:[P.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:E.w},write:!0}}}})],B.prototype,"labelingInfo",void 0),(0,i._)([(0,a.MZ)(L.kF)],B.prototype,"labelsVisible",void 0),(0,i._)([(0,a.MZ)(L.fV)],B.prototype,"legendEnabled",void 0),(0,i._)([(0,a.MZ)({type:Number})],B.prototype,"maxRecordCount",void 0),(0,i._)([(0,a.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],B.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({type:["OGCFeatureLayer"]})],B.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.MZ)(L.M6)],B.prototype,"popupEnabled",void 0),(0,i._)([(0,a.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,i._)([(0,a.MZ)({types:o.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:o.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],B.prototype,"renderer",null),(0,i._)([(0,a.MZ)(L.PY)],B.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],B.prototype,"source",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:g.A,json:{origins:{service:{read:!0}}}})],B.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],B.prototype,"title",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),(0,i._)([(0,a.MZ)({type:String,readOnly:!0})],B.prototype,"typeIdField",void 0),(0,i._)([(0,a.MZ)({type:[O.A]})],B.prototype,"types",void 0),(0,i._)([(0,a.MZ)(L.OZ)],B.prototype,"url",void 0),B=(0,i._)([(0,l.$)("esri.layers.OGCFeatureLayer")],B);const V=B},43334:(e,t,r)=>{r.d(t,{N3:()=>o,Om:()=>n});var i=r(92722);class n{constructor(e=null,t={},r,i){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?i.A.fromJSON(e.geometry):null,o=e.centroid?i.A.fromJSON(e.centroid):null,s=e.attributes[t];return new n(r,e.attributes,o,s)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function o(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromJSON(e){return new i(e.lengths,e.coords,e.hasIndeterminateRingOrder)}static fromRect(e){const[t,r,n,o]=e,s=n-t,a=o-r;return new i([5],[t,r,s,0,0,a,-s,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let i=0;for(const e of r){for(let r=1;r<e;r++)t[2*(i+r)]+=t[2*(i+r)-2],t[2*(i+r)+1]+=t[2*(i+r)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new i(this.lengths,e,this.hasIndeterminateRingOrder)):new i(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},99352:(e,t,r)=>{r.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},90708:(e,t,r)=>{r.d(t,{B2:()=>S,BW:()=>E,Ch:()=>ie,DF:()=>T,Di:()=>$,E2:()=>V,IE:()=>I,Nl:()=>W,Q4:()=>ne,Rk:()=>se,Ux:()=>J,Ye:()=>D,ZF:()=>Q,eY:()=>H,jH:()=>Y,jQ:()=>re,kz:()=>X,oN:()=>z,q3:()=>K,qK:()=>N,qN:()=>R,z5:()=>C,zv:()=>k});var i=r(49186),n=r(53966),o=r(97768),s=r(70328),a=r(19419),l=r(65864),u=r(43334),p=r(58512),d=r(92722);function c(e,t){return e?t?4:3:t?3:2}const y=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},m=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o},f=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o,e[r+2]=t[i+2]},g=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o,e[r+2]=t[i+3]},v=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o,e[r+2]=t[i+2],e[r+3]=t[i+3]};function w(e,t,r,i){if(e){if(r)return t&&i?v:f;if(t&&i)return g}else if(t&&i)return f;return m}function I({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function S({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function M({scale:e,translate:t},r,i){return r*e[i]+t[i]}function T(e,t,r){return e?t?r?L(e):F(e):r?A(e):b(e):null}function b(e){const t=e.coords;return{x:t[0],y:t[1]}}function _(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function F(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function x(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function A(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function Z(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function L(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function O(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function G(e,t){return e&&t?O:e?x:t?Z:_}function R(e,t,r=G(null!=t.z,null!=t.m)){return r(e,t)}function N(e,t,r){if(null==e)return null;const i=c(t,r),n=[];for(let t=0;t<e.coords.length;t+=i){const r=[];for(let n=0;n<i;n++)r.push(e.coords[t+n]);n.push(r)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function P(e,t,r=c(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let n=0;for(const e of t.points)for(let t=0;t<r;t++)i[n++]=e[t];return e}function E(e,t,r){if(!e)return null;const i=c(t,r),{coords:n,lengths:o}=e,s=[];let a=0;for(const e of o){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}s.push(t)}return t?r?{paths:s,hasZ:t,hasM:r}:{paths:s,hasZ:t}:r?{paths:s,hasM:r}:{paths:s}}function j(e,t,r=c(t.hasZ,t.hasM)){const{lengths:i,coords:n}=e;let o=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)n[o++]=t[e];i.push(e.length)}return e}function C(e,t,r){if(!e)return null;const i=c(t,r),{coords:n,lengths:o}=e,s=[];let a=0;for(const e of o){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}s.push(t)}return t?r?{rings:s,hasZ:t,hasM:r}:{rings:s,hasZ:t}:r?{rings:s,hasM:r}:{rings:s}}function D(e,t,r=t.hasZ,i=t.hasM){return function(e,t,r,i){const n=c(r,i),{lengths:o,coords:s}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<n;e++)s[a++]=t[e];o.push(e.length)}return e}(e,t.rings,r,i)}const q=[],B=[];function V(e,t,r,i,n){q[0]=e;const[o]=$(B,q,t,r,i,n);return le(q),le(B),o}function $(e,t,r,n,o,s){if(le(e),!r){for(const r of t){const t=s?r.attributes[s]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){const o=G(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?o(new d.A,r):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,o,s);case"esriGeometryMultipoint":return function(e,t,r,i,n){const o=c(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?P(new d.A,r,o):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,o,s);case"esriGeometryPolyline":return function(e,t,r,i,n){const o=c(r,i);for(const{geometry:r,attributes:i,centroid:s}of t){const t=null!=r?j(new d.A,r,o):null,a=null!=s?R(new d.A,s):null;e.push(new u.Om(t,i,a,n?i[n]:void 0))}return e}(e,t,n,o,s);case"esriGeometryPolygon":return function(e,t,r,i,n){for(const{geometry:o,centroid:s,attributes:a}of t){const t=null!=o?D(new d.A,o,r,i):null,l=n?a[n]:void 0;null!=s?e.push(new u.Om(t,a,_(new d.A,s),l)):e.push(new u.Om(t,a,null,l))}return e}(e,t,n,o,s);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function z(e,t,r,i){B[0]=e,U(q,B,t,r,i);const n=q[0];return le(q),le(B),n}function J(e,t,r){if(null==e)return null;const n=new d.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.fT)(e)?G(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):(0,l.Bi)(e)?D(n,e,t,r):(0,l.Rg)(e)?j(n,e,c(t,r)):(0,l.U9)(e)?P(n,e,c(t,r)):void y().error("convertFromGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${e}'`))}function k(e,t,r,n){const o=e&&("coords"in e?e:e.geometry);if(null==o)return null;switch(t){case"esriGeometryPoint":{let e=b;return r&&n?e=L:r?e=F:n&&(e=A),e(o)}case"esriGeometryMultipoint":return N(o,r,n);case"esriGeometryPolyline":return E(o,r,n);case"esriGeometryPolygon":return C(o,r,n);default:return y().error("convertToGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${t}'`)),null}}function U(e,t,r,n,o){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){let n=b;r&&i?n=L:r?n=F:i&&(n=A);for(const r of t){const{geometry:t,attributes:i}=r,o=null!=t?n(t):null;e.push({attributes:i,geometry:o})}return e}(e,t,n,o);case"esriGeometryMultipoint":return function(e,t,r,i){for(const{geometry:n,attributes:o}of t)e.push({attributes:o,geometry:null!=n?N(n,r,i):null});return e}(e,t,n,o);case"esriGeometryPolyline":return function(e,t,r,i){for(const{geometry:n,attributes:o}of t)e.push({attributes:o,geometry:null!=n?E(n,r,i):null});return e}(e,t,n,o);case"esriGeometryPolygon":return function(e,t,r,i){for(const{geometry:n,attributes:o,centroid:s}of t){const t=null!=n?C(n,r,i):null;if(null!=s){const r=b(s);e.push({attributes:o,centroid:r,geometry:t})}else e.push({attributes:o,geometry:t})}return e}(e,t,n,o);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`))}return e}function Q(e){const{objectIdFieldName:t,spatialReference:r,transform:i,fields:n,hasM:o,hasZ:s,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:d,queryGeometryType:c}=e,y={features:U([],a,l,s,o),fields:n,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:k(d,c,!1,!1)};return i&&(y.transform=i),u&&(y.exceededTransferLimit=u),o&&(y.hasM=o),s&&(y.hasZ=s),y}function K(e,t){const r=new p.A,{hasM:n,hasZ:o,features:s,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:d,transform:c,fields:h}=e;return h&&(r.fields=h),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(s&&$(r.features,s,u,o,n,r.objectIdFieldName),d&&(r.exceededTransferLimit=d),n&&(r.hasM=n),o&&(r.hasZ=o),c&&(r.transform=c),r):(y().error(new i.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function H(e){const{transform:t,features:r,hasM:i,hasZ:n}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ie(e.geometry,e.geometry,i,n,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,n,t);return e.transform=null,e}function Y(e,t){const{geometryType:r,features:i,hasM:n,hasZ:o}=t;if(!e)return t;for(let t=0;t<i.length;t++){const s=i[t],a=s.weakClone();a.geometry=new d.A,W(a.geometry,s.geometry,n,o,r,e),s.centroid&&(a.centroid=new d.A,W(a.centroid,s.centroid,n,o,"esriGeometryPoint",e)),i[t]=a}return t.transform=e,t}function W(e,t,r,i,n,o,s=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,d=c(r,i),y=c(r&&s,i&&a),m=w(r,i,s,a);if(!p.length)return m(e.coords,u,0,0,I(o,u[0]),S(o,u[1])),ae(e,d,0),e;let f,g,v,M,T=0,b=0,_=b;for(const t of p){if(t<l)continue;let r=0;b=_,v=f=I(o,u[T]),M=g=S(o,u[T+1]),m(e.coords,u,b,T,v,M),r++,T+=d,b+=y;for(let i=1;i<t;i++,T+=d)v=I(o,u[T]),M=S(o,u[T+1]),v===f&&M===g||(m(e.coords,u,b,T,v-f,M-g),b+=y,r++,f=v,g=M);r>=l&&(e.lengths.push(r),_=b)}return le(e.coords,_),e.coords.length?e:null}function X(e,t,r,i,n,o,s=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,d=c(r,i),y=c(r&&s,i&&a),m=w(r,i,s,a);if(!p.length)return m(e.coords,u,0,0,u[0],u[1]),ae(e,d,0),e;let f=0;const g=o*o;for(const t of p){if(t<l){f+=t*d;continue}const r=e.coords.length/y,i=f,n=f+(t-1)*d;m(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,d,g,m,i,n),m(e.coords,u,e.coords.length,n,u[n],u[n+1]);const o=e.coords.length/y-r;o>=l?e.lengths.push(o):le(e.coords,r*y),f+=t*d}return e.coords.length?e:null}function ee(e,t,r,i){const n=e[t],o=e[t+1],s=e[r],a=e[r+1],l=e[i],u=e[i+1];let p=s,d=a,c=l-p,y=u-d;if(0!==c||0!==y){const e=((n-p)*c+(o-d)*y)/(c*c+y*y);e>1?(p=l,d=u):e>0&&(p+=c*e,d+=y*e)}return c=n-p,y=o-d,c*c+y*y}function te(e,t,r,i,n,o,s){let a,l=i,u=0;for(let e=o+r;e<s;e+=r)a=ee(t,e,o,s),a>l&&(u=e,l=a);l>i&&(u-o>r&&te(e,t,r,i,n,o,u),n(e,t,e.length,u,t[u],t[u+1]),s-u>r&&te(e,t,r,i,n,u,s))}function re(e,t,r,i){if(!t?.coords?.length)return null;const n=c(r,i);let o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],i=e[t+1];o=Math.min(o,r),u=Math.max(u,r),l=Math.min(l,i),p=Math.max(p,i)}}return(0,s.is)(e)?(0,s.BI)(e,o,l,u,p):(0,a.fA)(o,l,u,p,e),e}function ie(e,t,r,i,n){const{coords:s,lengths:a}=t,l=c(r,i);if(!s.length)return e!==t&&ae(e),e;(0,o.Lw)(n);const{originPosition:u,scale:p,translate:d}=n,y=ue;y.originPosition=u;const h=y.scale;h[0]=p[0]??1,h[1]=-(p[1]??1),h[2]=p[2]??1,h[3]=p[3]??1;const m=y.translate;if(m[0]=d[0]??0,m[1]=d[1]??0,m[2]=d[2]??0,m[3]=d[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=M(y,s[t],t);return e!==t&&ae(e,l,0),e}let f=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[f+t]=M(y,s[f+t],t);let i=e.coords[f],n=e.coords[f+1];f+=l;for(let t=1;t<r;t++,f+=l){i+=s[f]*h[0],n+=s[f+1]*h[1],e.coords[f]=i,e.coords[f+1]=n;for(let t=2;t<l;++t)e.coords[f+t]=M(y,s[f+t],t)}}return e!==t&&ae(e,s.length,a.length),e}function ne(e,t,r,i,n,o){if(ae(e),e.lengths.push(...t.lengths),r===n&&i===o)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const s=c(r,i),a=w(r,i,n,o),l=t.coords;for(let t=0;t<l.length;t+=s)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function oe(e,t,r,i){let n=0,o=e[i*t],s=e[i*(t+1)];for(let a=1;a<r;a++){const r=o+e[i*(t+a)],l=s+e[i*(t+a)+1],u=(r-o)*(l+s);o=r,s=l,n+=u}return.5*n}function se(e,t){const{coords:r,lengths:i}=e;let n=0,o=0;for(let e=0;e<i.length;e++){const s=i[e];o+=oe(r,n,s,t),n+=s}return Math.abs(o)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},52136:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,r)=>{r.d(t,{q:()=>I});var i=r(90237),n=r(49186),o=r(84952),s=r(10107),a=r(56507),l=(r(87811),r(44208),r(36005)),u=r(40608),p=r(43937),d=r(89317),c=r(45917),y=r(49422);const h={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},m={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":h,"web-map/basemap":m,"web-map/tables":f,"link-chart/operational-layers":{...h,LinkChartLayer:!0},"link-chart/basemap":m,"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),w=r(79677);const I=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,y.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?w.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,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"}`,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,o.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,s.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,s.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,s.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:d.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,s.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,s.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,s.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,s.MZ)({type:w.A,json:{origins:{"web-scene":{write:{layerContainerTypes:d.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:[[a.jz,a.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:d.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u,n:()=>l});var i=r(90237),n=r(93637),o=r(10107),s=(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 i=e.find((e=>!!e.field));if(!i)return null;const n=new a.A;return n.read(i,r),[n]}},write:{writer:function(e,t,r,i){const o=e.find((e=>!!e.field));o&&(0,n.sM)(r,[o.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>M});var i=r(90237),n=r(92602),o=r(70333),s=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),I=r(41318),S=r(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,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 w.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,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.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,d.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,d.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,S.It)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,u=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.It)(r)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.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=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?I.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,c.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,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.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,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>w});var i=r(90237),n=(r(44208),r(53966)),o=r(74887),s=r(10107),a=r(79901),l=(r(87811),r(40608)),u=r(89317),p=r(5503),d=(r(60999),r(49186),r(14012),r(80559));const c=new p.A,y=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.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 v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,d.fm)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=m(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(v,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.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,o.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,s.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(69540),o=r(66552),s=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,a.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,l.$)("esri.layers.support.FeatureTemplate")],p);const d=p},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(72088),d=r(29005);let c=class extends((0,n.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,s.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],c);const y=c},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(90237),o=r(66552),s=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),d=r(40608),c=r(72088),y=r(98453);const h=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends s.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,a.MZ)()],m.prototype,"description",void 0),(0,n._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.e)(y.m)],m.prototype,"type",void 0),(0,n._)([(0,a.MZ)()],m.prototype,"valueType",void 0),(0,n._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],m);const f=m},95466:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(49186),n=r(25482),o=r(53966),s=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,s.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,d=new Map([[y(n?.creationDateField??""),l],[y(n?.editDateField??""),l],[y(o),p],[y(s),p]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(y(i??""))??a;t.set(i,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(90237),o=r(66552),s=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=i=class extends s.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const d=p},72088:(e,t,r)=>{r.d(t,{rS:()=>b,gK:()=>T}),r(44208);var i,n=r(90237),o=r(4718),s=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,l.$)("esri.layers.support.Domain")],c);const y=c;var h;let m=h=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,s.MZ)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=h=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;r(49186);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,a.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],v);const w=v;var I;let S=I=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new I({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,n._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],S.prototype,"type",void 0),S=I=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],S);const M=S,T={key:"type",base:y,typeMap:{range:S,"coded-value":f,inherited:w}};function b(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),o=r(59456),s=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),h=r(16930),m=r(65864),f=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.A.fromJSON(n),a=n.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=n.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,m.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,n._)([(0,p.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n._)([(0,p.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n._)([(0,p.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const w=v}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[659],{3330:(e,t,r)=>{r.d(t,{GB:()=>n,Qo:()=>s,Y4:()=>o});var i=r(96285);class n{}function o(e){return e instanceof i.bo?e===n.instance:"unknown"===e?.toString().toLowerCase()}function s(e){return o(e)?n.instance:e}n.instance=new i.oh("Etc/UTC")},70328:(e,t,r)=>{r.d(t,{BI:()=>f,Ej:()=>p,Hq:()=>u,Ie:()=>h,Jt:()=>m,Ne:()=>d,RF:()=>a,aI:()=>v,fA:()=>o,hZ:()=>y,iT:()=>l,is:()=>g,qv:()=>w,vI:()=>c,v_:()=>I,vt:()=>n,w1:()=>s});var i=r(5443);function n(e=I){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t,r,i,o,s,a=n()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=o,a[5]=s,a}function s(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 a(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],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),o=Math.min(o,t[r+3*e+1]),s=Math.min(s,t[r+3*e+2]),a=Math.max(a,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]=o,e[2]=s,e[3]=a,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 d(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 c(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 y(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 h(e){return e?y(e,w):n(w)}function m(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 w=[1/0,1/0,1/0,-1/0,-1/0,-1/0],I=[0,0,0,0,0,0];n()},87152:(e,t,r)=>{r.r(t),r.d(t,{default:()=>V});var i=r(90237),n=(r(59456),r(13874)),o=(r(86162),r(94409),r(65345),r(42980),r(39290),r(92438),r(96576),r(93618),r(65494),r(15036)),s=r(92071),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608)),u=r(50498),p=r(4146),d=r(49186),c=r(92474),y=r(799),h=r(75321),m=r(4071),f=r(22671),g=r(16930);let v=class extends c.A{constructor(){super(...arguments),this.featureDefinition=null,this.type="ogc-feature"}load(e){return this.addResolvingPromise(this._loadOGCServices(this.layer,e)),this.when()}getSource(){const{featureDefinition:{collection:e,layerDefinition:t,spatialReference:r,supportedCrs:i},layer:{apiKey:n,customParameters:o,effectiveMaxRecordCount:s}}=this;return{type:"ogc-source",collection:e,layerDefinition:t,maxRecordCount:s,queryParameters:{apiKey:n,customParameters:o},spatialReference:r,supportedCrs:i}}queryExtent(e,t={}){return null}queryFeatureCount(e,t={}){return null}queryFeatures(e,t={}){return this.queryFeaturesJSON(e,t).then((e=>f.A.fromJSON(e)))}queryFeaturesJSON(e,t={}){const r=this.getSource();return this.load(t).then((()=>(0,h.bW)(r,e,t)))}queryObjectIds(e,t={}){return null}serviceSupportsSpatialReference(e){return!(!e.isWGS84&&!e.isWebMercator&&!this.featureDefinition.supportedCrs[e.wkid])}_conformsToType(e,t){const r=new RegExp(`^${(0,y.Cj)(t)}$`,"i");return e.conformsTo.some((e=>r.test(e)))??!1}_getCapabilities(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:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryBins:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:t,maxRecordCountFactor:void 0,standardMaxRecordCount:void 0,supportsCacheHint:!1,supportsCentroid:!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,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsStatistics:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,supportsSqlExpression:!1,tileMaxRecordCount:void 0},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryBins:m.$,editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUploadWithItemId:!1,supportsUpdateWithoutM:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}_getMaxRecordCount(e){const t=e?.components?.parameters;return t?.limit?.schema?.maximum??t?.limitFeatures?.schema?.maximum}_getStorageSpatialReference(e){const t=e.storageCrs??h.QE,r=(0,h.J0)(t);return null==r?g.A.WGS84:new g.A({wkid:r})}_getSupportedSpatialReferences(e,t){const r="#/crs",i=e.crs??[h.QE],n=i.includes(r)?i.filter((e=>e!==r)).concat(t.crs??[]):i,o=/^http:\/\/www\.opengis.net\/def\/crs\/epsg\/.*\/3785$/i;return n.filter((e=>!o.test(e)))}async _loadOGCServices(e,t){const r=null!=t?t.signal:null,{apiKey:i,collectionId:n,customParameters:o,fields:s,geometryType:a,hasZ:l,objectIdField:p,timeInfo:c,url:m}=e,f={fields:s?.map((e=>e.toJSON())),geometryType:u.Y.toJSON(a),hasZ:l??!1,objectIdField:p,timeInfo:c?.toJSON()},g={apiKey:i,customParameters:o,signal:r},v=await(0,h.Ki)(m,g),[w,I]=await Promise.all([(0,h.Px)(v,g),(0,h.bV)(v,g)]);if(!this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson"))throw new d.A("ogc-feature-layer:no-geojson-support","Server does not support geojson");const S=I.collections.find((({id:e})=>e===n));if(!S)throw new d.A("ogc-feature-layer:collection-not-found","Server does not contain the named collection");const M=this._conformsToType(w,"http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30")?await(0,h.GA)(v,g):null,T=await(0,h.GL)(S,f,g),b=this._getMaxRecordCount(M),_=this._getCapabilities(T.hasZ,b),F=this._getStorageSpatialReference(S).toJSON(),x=this._getSupportedSpatialReferences(S,I),A=new RegExp(`^${(0,y.Cj)(h.vJ)}`,"i"),Z={};for(const e of x){const t=(0,h.J0)(e);null!=t&&(Z[t]||(Z[t]=e.replace(A,"")))}this.featureDefinition={capabilities:_,collection:S,layerDefinition:T,spatialReference:F,supportedCrs:Z}}};(0,i._)([(0,a.MZ)()],v.prototype,"featureDefinition",void 0),(0,i._)([(0,a.MZ)({constructOnly:!0})],v.prototype,"layer",void 0),(0,i._)([(0,a.MZ)()],v.prototype,"type",void 0),v=(0,i._)([(0,l.$)("esri.layers.graphics.sources.OGCFeatureSource")],v);var w=r(52136),I=r(63074),S=r(69208),M=r(87718),T=r(76294),b=r(16131),_=r(32756),F=r(8303),x=r(54310),A=r(25036),Z=r(82935),L=r(10873),O=r(33143),G=r(20437),R=r(17036),N=r(30524),P=r(81457),E=r(39383),j=r(61956),C=r(30291),D=r(5443);const q=(0,R.p)();let B=class extends((0,w.p)((0,S.d)((0,T.J)((0,M.F)((0,I.dM)((0,_.f)((0,Z.e)((0,A.j)((0,b.q)((0,F.A)((0,x.J)((0,s.P)(p.A))))))))))))){constructor(e){super(e),this.capabilities=null,this.collectionId=null,this.copyright=null,this.description=null,this.displayField=null,this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.hasZ=void 0,this.labelingInfo=null,this.labelsVisible=!0,this.legendEnabled=!0,this.maxRecordCount=null,this.objectIdField=null,this.operationalLayerType="OGCFeatureLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new v({layer:this}),this.spatialReference=null,this.title=null,this.type="ogc-feature",this.typeIdField=null,this.types=null,this.url=null}destroy(){this.source?.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["OGCFeatureServer"]},e).then((()=>this._fetchService(e)))),this.when()}get defaultPopupTemplate(){return this.createPopupTemplate()}get effectiveMaxRecordCount(){return this.maxRecordCount??this.capabilities?.query.maxRecordCount??5e3}get isTable(){return this.loaded&&null==this.geometryType}set renderer(e){(0,N.yp)(e,this.fieldsIndex),this._set("renderer",e)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return(0,C.tn)(this,e)}createQuery(){return new j.A}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let r,i=!1;const n=t?.feature?.attributes,o=this.typeIdField&&n?.[this.typeIdField];return null!=o&&this.types&&(i=this.types.some((t=>t.id==o&&(r=t.domains?.[e],"inherited"===r?.type&&(r=this._getLayerDomain(e)),!0)))),i||r||(r=this._getLayerDomain(e)),r}queryFeatures(e,t){return this.load().then((()=>this.source.queryFeatures(j.A.from(e)||this.createQuery(),t))).then((e=>(e?.features?.forEach((e=>{e.layer=e.sourceLayer=this})),e)))}serviceSupportsSpatialReference(e){return this.source?.serviceSupportsSpatialReference(e)??!1}async _fetchService(e){await this.source.load(e),this.read(this.source.featureDefinition,{origin:"service"}),(0,N.yp)(this.renderer,this.fieldsIndex),(0,N.sv)(this.timeInfo,this.fieldsIndex)}_getLayerDomain(e){if(!this.fields)return null;for(const t of this.fields)if(t.name===e&&t.domain)return t.domain;return null}};(0,i._)([(0,a.MZ)({readOnly:!0,json:{origins:{service:{read:!0}}}})],B.prototype,"capabilities",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:!0}})],B.prototype,"collectionId",void 0),(0,i._)([(0,a.MZ)({type:String})],B.prototype,"copyright",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],B.prototype,"defaultPopupTemplate",null),(0,i._)([(0,a.MZ)({readOnly:!0,type:String,json:{origins:{service:{name:"collection.description"}}}})],B.prototype,"description",void 0),(0,i._)([(0,a.MZ)({type:String})],B.prototype,"displayField",void 0),(0,i._)([(0,a.MZ)({type:Number})],B.prototype,"effectiveMaxRecordCount",null),(0,i._)([(0,a.MZ)(L.Yj)],B.prototype,"elevationInfo",void 0),(0,i._)([(0,a.MZ)({type:[G.A],json:{origins:{service:{name:"layerDefinition.fields"}}}})],B.prototype,"fields",void 0),(0,i._)([(0,a.MZ)(q.fieldsIndex)],B.prototype,"fieldsIndex",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:D.A,json:{origins:{service:{name:"layerDefinition.extent"}}}})],B.prototype,"fullExtent",void 0),(0,i._)([(0,a.MZ)({type:u.g.apiValues,json:{origins:{service:{name:"layerDefinition.geometryType",read:{reader:u.g.read}}}}})],B.prototype,"geometryType",void 0),(0,i._)([(0,a.MZ)({type:Boolean,json:{origins:{service:{name:"layerDefinition.hasZ"}}}})],B.prototype,"hasZ",void 0),(0,i._)([(0,a.MZ)({type:Boolean,readOnly:!0})],B.prototype,"isTable",null),(0,i._)([(0,a.MZ)({type:[P.A],json:{origins:{"web-document":{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:E.w},write:!0}}}})],B.prototype,"labelingInfo",void 0),(0,i._)([(0,a.MZ)(L.kF)],B.prototype,"labelsVisible",void 0),(0,i._)([(0,a.MZ)(L.fV)],B.prototype,"legendEnabled",void 0),(0,i._)([(0,a.MZ)({type:Number})],B.prototype,"maxRecordCount",void 0),(0,i._)([(0,a.MZ)({type:String,json:{origins:{service:{name:"layerDefinition.objectIdField"}}}})],B.prototype,"objectIdField",void 0),(0,i._)([(0,a.MZ)({type:["OGCFeatureLayer"]})],B.prototype,"operationalLayerType",void 0),(0,i._)([(0,a.MZ)(L.M6)],B.prototype,"popupEnabled",void 0),(0,i._)([(0,a.MZ)({type:n.A,json:{name:"popupInfo",write:!0}})],B.prototype,"popupTemplate",void 0),(0,i._)([(0,a.MZ)({types:o.H,json:{origins:{service:{name:"layerDefinition.drawingInfo.renderer",write:!1},"web-scene":{types:o.X,name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:!0}})],B.prototype,"renderer",null),(0,i._)([(0,a.MZ)(L.PY)],B.prototype,"screenSizePerspectiveEnabled",void 0),(0,i._)([(0,a.MZ)({readOnly:!0})],B.prototype,"source",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,type:g.A,json:{origins:{service:{read:!0}}}})],B.prototype,"spatialReference",void 0),(0,i._)([(0,a.MZ)({type:String,json:{write:{enabled:!0,ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"collection.title"}}}})],B.prototype,"title",void 0),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],B.prototype,"type",void 0),(0,i._)([(0,a.MZ)({type:String,readOnly:!0})],B.prototype,"typeIdField",void 0),(0,i._)([(0,a.MZ)({type:[O.A]})],B.prototype,"types",void 0),(0,i._)([(0,a.MZ)(L.OZ)],B.prototype,"url",void 0),B=(0,i._)([(0,l.$)("esri.layers.OGCFeatureLayer")],B);const V=B},43334:(e,t,r)=>{r.d(t,{N3:()=>o,Om:()=>n});var i=r(92722);class n{constructor(e=null,t={},r,i){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=i,this.displayId=0,this.geohashX=0,this.geohashY=0}static fromJSON(e,t){const r=e.geometry?i.A.fromJSON(e.geometry):null,o=e.centroid?i.A.fromJSON(e.centroid):null,s=e.attributes[t];return new n(r,e.attributes,o,s)}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}clone(){const e=this.geometry?.clone(),t=new n(e,{...this.attributes},this.centroid?.clone(),this.objectId);return t.displayId=this.displayId,t.geohashX=this.geohashX,t.geohashY=this.geohashY,t}}function o(e){return!!e.geometry?.coords?.length}},58512:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new i;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},92722:(e,t,r)=>{r.d(t,{A:()=>i});class i{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromJSON(e){return new i(e.lengths,e.coords,e.hasIndeterminateRingOrder)}static fromRect(e){const[t,r,n,o]=e,s=n-t,a=o-r;return new i([5],[t,r,s,0,0,a,-s,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const i=this.lengths[r];for(let r=0;r<i;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=i}}deltaDecode(){const e=this.clone(),{coords:t,lengths:r}=e;let i=0;for(const e of r){for(let r=1;r<e;r++)t[2*(i+r)]+=t[2*(i+r)-2],t[2*(i+r)+1]+=t[2*(i+r)-1];i+=e}return e}clone(e){if(0===this.lengths.length)return new i([],[this.coords[0],this.coords[1]]);const t=2*(0===this.lengths.length?1:this.lengths.reduce(((e,t)=>e+t))),r=this.coords.slice(0,t);return e?(e.set(r),new i(this.lengths,e,this.hasIndeterminateRingOrder)):new i(Array.from(this.lengths),Array.from(r),this.hasIndeterminateRingOrder)}}},99352:(e,t,r)=>{r.d(t,{F:()=>i});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},90708:(e,t,r)=>{r.d(t,{B2:()=>S,BW:()=>E,Ch:()=>ie,DF:()=>T,Di:()=>$,E2:()=>V,IE:()=>I,Nl:()=>W,Q4:()=>ne,Rk:()=>se,Ux:()=>J,Ye:()=>D,ZF:()=>Q,eY:()=>H,jH:()=>Y,jQ:()=>re,kz:()=>X,oN:()=>z,q3:()=>K,qK:()=>N,qN:()=>R,z5:()=>C,zv:()=>k});var i=r(49186),n=r(53966),o=r(97768),s=r(70328),a=r(19419),l=r(65864),u=r(43334),p=r(58512),d=r(92722);function c(e,t){return e?t?4:3:t?3:2}const y=()=>n.A.getLogger("esri.layers.graphics.featureConversionUtils"),h={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},m=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o},f=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o,e[r+2]=t[i+2]},g=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o,e[r+2]=t[i+3]},v=(e,t,r,i,n,o)=>{e[r]=n,e[r+1]=o,e[r+2]=t[i+2],e[r+3]=t[i+3]};function w(e,t,r,i){if(e){if(r)return t&&i?v:f;if(t&&i)return g}else if(t&&i)return f;return m}function I({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function S({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function M({scale:e,translate:t},r,i){return r*e[i]+t[i]}function T(e,t,r){return e?t?r?L(e):F(e):r?A(e):b(e):null}function b(e){const t=e.coords;return{x:t[0],y:t[1]}}function _(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function F(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function x(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function A(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function Z(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function L(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function O(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function G(e,t){return e&&t?O:e?x:t?Z:_}function R(e,t,r=G(null!=t.z,null!=t.m)){return r(e,t)}function N(e,t,r){if(null==e)return null;const i=c(t,r),n=[];for(let t=0;t<e.coords.length;t+=i){const r=[];for(let n=0;n<i;n++)r.push(e.coords[t+n]);n.push(r)}return t?r?{points:n,hasZ:t,hasM:r}:{points:n,hasZ:t}:r?{points:n,hasM:r}:{points:n}}function P(e,t,r=c(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const i=e.coords;let n=0;for(const e of t.points)for(let t=0;t<r;t++)i[n++]=e[t];return e}function E(e,t,r){if(!e)return null;const i=c(t,r),{coords:n,lengths:o}=e,s=[];let a=0;for(const e of o){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}s.push(t)}return t?r?{paths:s,hasZ:t,hasM:r}:{paths:s,hasZ:t}:r?{paths:s,hasM:r}:{paths:s}}function j(e,t,r=c(t.hasZ,t.hasM)){const{lengths:i,coords:n}=e;let o=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)n[o++]=t[e];i.push(e.length)}return e}function C(e,t,r){if(!e)return null;const i=c(t,r),{coords:n,lengths:o}=e,s=[];let a=0;for(const e of o){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<i;t++)e.push(n[a++]);t.push(e)}s.push(t)}return t?r?{rings:s,hasZ:t,hasM:r}:{rings:s,hasZ:t}:r?{rings:s,hasM:r}:{rings:s}}function D(e,t,r=t.hasZ,i=t.hasM){return function(e,t,r,i){const n=c(r,i),{lengths:o,coords:s}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<n;e++)s[a++]=t[e];o.push(e.length)}return e}(e,t.rings,r,i)}const q=[],B=[];function V(e,t,r,i,n){q[0]=e;const[o]=$(B,q,t,r,i,n);return le(q),le(B),o}function $(e,t,r,n,o,s){if(le(e),!r){for(const r of t){const t=s?r.attributes[s]:void 0;e.push(new u.Om(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,i,n){const o=G(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?o(new d.A,r):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,o,s);case"esriGeometryMultipoint":return function(e,t,r,i,n){const o=c(r,i);for(const{geometry:r,attributes:i}of t){const t=null!=r?P(new d.A,r,o):null;e.push(new u.Om(t,i,null,n?i[n]:void 0))}return e}(e,t,n,o,s);case"esriGeometryPolyline":return function(e,t,r,i,n){const o=c(r,i);for(const{geometry:r,attributes:i,centroid:s}of t){const t=null!=r?j(new d.A,r,o):null,a=null!=s?R(new d.A,s):null;e.push(new u.Om(t,i,a,n?i[n]:void 0))}return e}(e,t,n,o,s);case"esriGeometryPolygon":return function(e,t,r,i,n){for(const{geometry:o,centroid:s,attributes:a}of t){const t=null!=o?D(new d.A,o,r,i):null,l=n?a[n]:void 0;null!=s?e.push(new u.Om(t,a,_(new d.A,s),l)):e.push(new u.Om(t,a,null,l))}return e}(e,t,n,o,s);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function z(e,t,r,i){B[0]=e,U(q,B,t,r,i);const n=q[0];return le(q),le(B),n}function J(e,t,r){if(null==e)return null;const n=new d.A;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.fT)(e)?G(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(n,e):(0,l.Bi)(e)?D(n,e,t,r):(0,l.Rg)(e)?j(n,e,c(t,r)):(0,l.U9)(e)?P(n,e,c(t,r)):void y().error("convertFromGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${e}'`))}function k(e,t,r,n){const o=e&&("coords"in e?e:e.geometry);if(null==o)return null;switch(t){case"esriGeometryPoint":{let e=b;return r&&n?e=L:r?e=F:n&&(e=A),e(o)}case"esriGeometryMultipoint":return N(o,r,n);case"esriGeometryPolyline":return E(o,r,n);case"esriGeometryPolygon":return C(o,r,n);default:return y().error("convertToGeometry:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${t}'`)),null}}function U(e,t,r,n,o){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,i){let n=b;r&&i?n=L:r?n=F:i&&(n=A);for(const r of t){const{geometry:t,attributes:i}=r,o=null!=t?n(t):null;e.push({attributes:i,geometry:o})}return e}(e,t,n,o);case"esriGeometryMultipoint":return function(e,t,r,i){for(const{geometry:n,attributes:o}of t)e.push({attributes:o,geometry:null!=n?N(n,r,i):null});return e}(e,t,n,o);case"esriGeometryPolyline":return function(e,t,r,i){for(const{geometry:n,attributes:o}of t)e.push({attributes:o,geometry:null!=n?E(n,r,i):null});return e}(e,t,n,o);case"esriGeometryPolygon":return function(e,t,r,i){for(const{geometry:n,attributes:o,centroid:s}of t){const t=null!=n?C(n,r,i):null;if(null!=s){const r=b(s);e.push({attributes:o,centroid:r,geometry:t})}else e.push({attributes:o,geometry:t})}return e}(e,t,n,o);default:y().error("convertToFeatureSet:unknown-geometry",new i.A(`Unable to parse unknown geometry type '${r}'`))}return e}function Q(e){const{objectIdFieldName:t,spatialReference:r,transform:i,fields:n,hasM:o,hasZ:s,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:p,queryGeometry:d,queryGeometryType:c}=e,y={features:U([],a,l,s,o),fields:n,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:p,queryGeometry:k(d,c,!1,!1)};return i&&(y.transform=i),u&&(y.exceededTransferLimit=u),o&&(y.hasM=o),s&&(y.hasZ=s),y}function K(e,t){const r=new p.A,{hasM:n,hasZ:o,features:s,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:d,transform:c,fields:h}=e;return h&&(r.fields=h),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(s&&$(r.features,s,u,o,n,r.objectIdFieldName),d&&(r.exceededTransferLimit=d),n&&(r.hasM=n),o&&(r.hasZ=o),c&&(r.transform=c),r):(y().error(new i.A("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function H(e){const{transform:t,features:r,hasM:i,hasZ:n}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ie(e.geometry,e.geometry,i,n,t),null!=e.centroid&&ie(e.centroid,e.centroid,i,n,t);return e.transform=null,e}function Y(e,t){const{geometryType:r,features:i,hasM:n,hasZ:o}=t;if(!e)return t;for(let t=0;t<i.length;t++){const s=i[t],a=s.weakClone();a.geometry=new d.A,W(a.geometry,s.geometry,n,o,r,e),s.centroid&&(a.centroid=new d.A,W(a.centroid,s.centroid,n,o,"esriGeometryPoint",e)),i[t]=a}return t.transform=e,t}function W(e,t,r,i,n,o,s=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,d=c(r,i),y=c(r&&s,i&&a),m=w(r,i,s,a);if(!p.length)return m(e.coords,u,0,0,I(o,u[0]),S(o,u[1])),ae(e,d,0),e;let f,g,v,M,T=0,b=0,_=b;for(const t of p){if(t<l)continue;let r=0;b=_,v=f=I(o,u[T]),M=g=S(o,u[T+1]),m(e.coords,u,b,T,v,M),r++,T+=d,b+=y;for(let i=1;i<t;i++,T+=d)v=I(o,u[T]),M=S(o,u[T+1]),v===f&&M===g||(m(e.coords,u,b,T,v-f,M-g),b+=y,r++,f=v,g=M);r>=l&&(e.lengths.push(r),_=b)}return le(e.coords,_),e.coords.length?e:null}function X(e,t,r,i,n,o,s=r,a=i){if(ae(e),!t?.coords.length)return null;const l=h[n],{coords:u,lengths:p}=t,d=c(r,i),y=c(r&&s,i&&a),m=w(r,i,s,a);if(!p.length)return m(e.coords,u,0,0,u[0],u[1]),ae(e,d,0),e;let f=0;const g=o*o;for(const t of p){if(t<l){f+=t*d;continue}const r=e.coords.length/y,i=f,n=f+(t-1)*d;m(e.coords,u,e.coords.length,i,u[i],u[i+1]),te(e.coords,u,d,g,m,i,n),m(e.coords,u,e.coords.length,n,u[n],u[n+1]);const o=e.coords.length/y-r;o>=l?e.lengths.push(o):le(e.coords,r*y),f+=t*d}return e.coords.length?e:null}function ee(e,t,r,i){const n=e[t],o=e[t+1],s=e[r],a=e[r+1],l=e[i],u=e[i+1];let p=s,d=a,c=l-p,y=u-d;if(0!==c||0!==y){const e=((n-p)*c+(o-d)*y)/(c*c+y*y);e>1?(p=l,d=u):e>0&&(p+=c*e,d+=y*e)}return c=n-p,y=o-d,c*c+y*y}function te(e,t,r,i,n,o,s){let a,l=i,u=0;for(let e=o+r;e<s;e+=r)a=ee(t,e,o,s),a>l&&(u=e,l=a);l>i&&(u-o>r&&te(e,t,r,i,n,o,u),n(e,t,e.length,u,t[u],t[u+1]),s-u>r&&te(e,t,r,i,n,u,s))}function re(e,t,r,i){if(!t?.coords?.length)return null;const n=c(r,i);let o=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=n){const r=e[t],i=e[t+1];o=Math.min(o,r),u=Math.max(u,r),l=Math.min(l,i),p=Math.max(p,i)}}return(0,s.is)(e)?(0,s.BI)(e,o,l,u,p):(0,a.fA)(o,l,u,p,e),e}function ie(e,t,r,i,n){const{coords:s,lengths:a}=t,l=c(r,i);if(!s.length)return e!==t&&ae(e),e;(0,o.Lw)(n);const{originPosition:u,scale:p,translate:d}=n,y=ue;y.originPosition=u;const h=y.scale;h[0]=p[0]??1,h[1]=-(p[1]??1),h[2]=p[2]??1,h[3]=p[3]??1;const m=y.translate;if(m[0]=d[0]??0,m[1]=d[1]??0,m[2]=d[2]??0,m[3]=d[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=M(y,s[t],t);return e!==t&&ae(e,l,0),e}let f=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[f+t]=M(y,s[f+t],t);let i=e.coords[f],n=e.coords[f+1];f+=l;for(let t=1;t<r;t++,f+=l){i+=s[f]*h[0],n+=s[f+1]*h[1],e.coords[f]=i,e.coords[f+1]=n;for(let t=2;t<l;++t)e.coords[f+t]=M(y,s[f+t],t)}}return e!==t&&ae(e,s.length,a.length),e}function ne(e,t,r,i,n,o){if(ae(e),e.lengths.push(...t.lengths),r===n&&i===o)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const s=c(r,i),a=w(r,i,n,o),l=t.coords;for(let t=0;t<l.length;t+=s)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function oe(e,t,r,i){let n=0,o=e[i*t],s=e[i*(t+1)];for(let a=1;a<r;a++){const r=o+e[i*(t+a)],l=s+e[i*(t+a)+1],u=(r-o)*(l+s);o=r,s=l,n+=u}return.5*n}function se(e,t){const{coords:r,lengths:i}=e;let n=0,o=0;for(let e=0;e<i.length;e++){const s=i[e];o+=oe(r,n,s,t),n+=s}return Math.abs(o)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},52136:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,n.MZ)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.APIKeyMixin")],t),t}},69208:(e,t,r)=>{r.d(t,{d:()=>s});var i=r(90237),n=r(10107),o=(r(44208),r(53966),r(87811),r(40608));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,i._)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,i._)([(0,o.$)("esri.layers.mixins.CustomParametersMixin")],t),t}},16131:(e,t,r)=>{r.d(t,{q:()=>I});var i=r(90237),n=r(49186),o=r(84952),s=r(10107),a=r(56507),l=(r(87811),r(44208),r(36005)),u=r(40608),p=r(43937),d=r(89317),c=r(45917),y=r(49422);const h={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},m={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":h,"web-map/basemap":m,"web-map/tables":f,"link-chart/operational-layers":{...h,LinkChartLayer:!0},"link-chart/basemap":m,"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),w=r(79677);const I=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,y.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?w.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,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"}`,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,o.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,s.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,s.MZ)(v.C1)],t.prototype,"listMode",void 0),(0,i._)([(0,p.K)("listMode")],t.prototype,"writeListMode",null),(0,i._)([(0,s.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:d.K}}}}})],t.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.K)("operationalLayerType")],t.prototype,"writeOperationalLayerType",null),(0,i._)([(0,s.MZ)(v.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,s.MZ)({type:Boolean,readOnly:!1})],t.prototype,"persistenceEnabled",void 0),(0,i._)([(0,s.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,s.MZ)({type:w.A,json:{origins:{"web-scene":{write:{layerContainerTypes:d.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:[[a.jz,a.Uv]]}})],t.prototype,"writeTimeExtent",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{origins:{"web-scene":{name:"visibility",write:{enabled:!0,layerContainerTypes:d.K}}},name:"visibility",write:!0}})],t.prototype,"visible",void 0),t=(0,i._)([(0,u.$)("esri.layers.mixins.OperationalLayer")],t),t}},32756:(e,t,r)=>{r.d(t,{f:()=>u,n:()=>l});var i=r(90237),n=r(93637),o=r(10107),s=(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 i=e.find((e=>!!e.field));if(!i)return null;const n=new a.A;return n.read(i,r),[n]}},write:{writer:function(e,t,r,i){const o=e.find((e=>!!e.field));o&&(0,n.sM)(r,[o.toJSON()],t)}}}},u=e=>{let t=class extends e{constructor(){super(...arguments),this.orderBy=null}};return(0,i._)([(0,o.MZ)(l)],t.prototype,"orderBy",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.OrderedLayer")],t),t}},8303:(e,t,r)=>{r.d(t,{A:()=>M});var i=r(90237),n=r(92602),o=r(70333),s=r(78888),a=r(60999),l=r(49186),u=r(53966),p=r(97768),d=r(74887),c=r(84952),y=r(10107),h=(r(44208),r(87811),r(36005)),m=r(40608),f=r(43937),g=r(83531),v=r(20655),w=r(80812),I=r(41318),S=r(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,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 w.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,d.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,d.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,d.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,d.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,S.It)(r);let n,s;if(i)n=r.portal.url;else try{n=await(0,g.wI)(this.url,t)}catch(e){(0,d.QP)(e)}if(!n||!(0,c.b8)(n,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;s=await(o.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,d.QP)(e)}const a=!0,l=!1,u=!1;if(!s)return{features:{edit:a,fullEdit:l},content:{updateItem:u}};try{if(i?await r.reload():(r=new w.default({id:e,portal:{url:n}}),await r.load(t)),r.portal.user)return(0,S.It)(r)}catch(e){(0,d.QP)(e)}return{features:{edit:a,fullEdit:l},content:{updateItem:u}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,d.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const r=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.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=o.id?.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,n=v.A.getDefault();if(n&&n.loaded&&(0,c.S8)(n.restUrl)===(0,c.S8)(i))return n.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?I.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,c.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,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.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,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,m.$)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},54310:(e,t,r)=>{r.d(t,{J:()=>w});var i=r(90237),n=(r(44208),r(53966)),o=r(74887),s=r(10107),a=r(79901),l=(r(87811),r(40608)),u=r(89317),p=r(5503),d=(r(60999),r(49186),r(14012),r(80559));const c=new p.A,y=new WeakMap;function h(e){(function(e){return null!=e&&"object"==typeof e&&"refreshInterval"in e&&"refresh"in e})(e)&&c.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 v(){const e=Date.now();let t=!1;for(const r of c){const i=r.deref();i?i.refreshInterval&&e-(y.get(i)??0)+5>=6e4*i.refreshInterval&&(y.set(i,e),i.refresh(e)):t=!0}if(t)for(let e=c.length-1;e>=0;e--)c.at(e).deref()||c.removeAt(e)}(0,d.fm)((()=>{const e=Date.now();let t=0;for(const r of c){const i=r.deref();i&&(t=m(Math.round(6e4*i.refreshInterval),t),i.refreshInterval?y.get(i)||y.set(i,e):y.delete(i))}if(t!==g){if(g=t,clearInterval(f),0===g)return void(f=0);f=setInterval(v,g)}}));const w=e=>{let t=class extends e{constructor(...e){super(...e),this.refreshInterval=0,this.refreshTimestamp=0,this._debounceHasDataChanged=(0,o.sg)((()=>this.hasDataChanged())),this.when().then((()=>{this.destroyed||h(this)}),(()=>{}))}destroy(){!function(e){const t=c.find((t=>t.deref()===e));t&&c.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,o.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,s.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:{enabled:!0,layerContainerTypes:u.K}}}}})],t.prototype,"refreshInterval",void 0),(0,i._)([(0,a.w)("refreshInterval")],t.prototype,"castRefreshInterval",null),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"refreshTimestamp",void 0),(0,i._)([(0,s.MZ)({readOnly:!0})],t.prototype,"refreshParameters",null),t=(0,i._)([(0,l.$)("esri.layers.mixins.RefreshableLayer")],t),t}},29005:(e,t,r)=>{r.d(t,{A:()=>d});var i=r(90237),n=r(69540),o=r(66552),s=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({esriFeatureEditToolAutoCompletePolygon:"auto-complete-polygon",esriFeatureEditToolCircle:"circle",esriFeatureEditToolEllipse:"ellipse",esriFeatureEditToolFreehand:"freehand",esriFeatureEditToolLine:"line",esriFeatureEditToolNone:"none",esriFeatureEditToolPoint:"point",esriFeatureEditToolPolygon:"polygon",esriFeatureEditToolRectangle:"rectangle",esriFeatureEditToolArrow:"arrow",esriFeatureEditToolTriangle:"triangle",esriFeatureEditToolLeftArrow:"left-arrow",esriFeatureEditToolRightArrow:"right-arrow",esriFeatureEditToolUpArrow:"up-arrow",esriFeatureEditToolDownArrow:"down-arrow"});let p=class extends((0,n.O)(s.oY)){constructor(e){super(e),this.name=null,this.description=null,this.drawingTool=null,this.prototype=null,this.thumbnail=null}};(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,a.MZ)({json:{read:u.read,write:u.write}})],p.prototype,"drawingTool",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"prototype",void 0),(0,i._)([(0,a.MZ)({json:{write:!0}})],p.prototype,"thumbnail",void 0),p=(0,i._)([(0,l.$)("esri.layers.support.FeatureTemplate")],p);const d=p},33143:(e,t,r)=>{r.d(t,{A:()=>y});var i=r(90237),n=r(69540),o=r(25482),s=r(10107),a=(r(44208),r(53966),r(87811),r(36005)),l=r(40608),u=r(43937),p=r(72088),d=r(29005);let c=class extends((0,n.O)(o.oY)){constructor(e){super(e),this.id=null,this.name=null,this.domains=null,this.templates=null}readDomains(e){const t={};for(const r of Object.keys(e))t[r]=(0,p.rS)(e[r]);return t}writeDomains(e,t){const r={};for(const t of Object.keys(e))e[t]&&(r[t]=e[t]?.toJSON());t.domains=r}};(0,i._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"id",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"name",void 0),(0,i._)([(0,s.MZ)({json:{write:!0}})],c.prototype,"domains",void 0),(0,i._)([(0,a.w)("domains")],c.prototype,"readDomains",null),(0,i._)([(0,u.K)("domains")],c.prototype,"writeDomains",null),(0,i._)([(0,s.MZ)({type:[d.A],json:{write:!0}})],c.prototype,"templates",void 0),c=(0,i._)([(0,l.$)("esri.layers.support.FeatureType")],c);const y=c},20437:(e,t,r)=>{r.d(t,{A:()=>f});var i,n=r(90237),o=r(66552),s=r(25482),a=r(10107),l=r(56507),u=(r(87811),r(44208),r(93223)),p=r(36005),d=r(40608),c=r(72088),y=r(98453);const h=new o.J({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let m=i=class extends s.oY{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?h.fromJSON(r.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain?.clone()??null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"alias",void 0),(0,n._)([(0,a.MZ)({type:[String,Number],json:{write:{allowNull:!0}}})],m.prototype,"defaultValue",void 0),(0,n._)([(0,a.MZ)()],m.prototype,"description",void 0),(0,n._)([(0,p.w)("description")],m.prototype,"readDescription",null),(0,n._)([(0,a.MZ)({types:c.gK,json:{read:{reader:c.rS},write:!0}})],m.prototype,"domain",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"editable",void 0),(0,n._)([(0,a.MZ)({type:l.jz,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],m.prototype,"length",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"name",void 0),(0,n._)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"nullable",void 0),(0,n._)([(0,u.e)(y.m)],m.prototype,"type",void 0),(0,n._)([(0,a.MZ)()],m.prototype,"valueType",void 0),(0,n._)([(0,p.w)("valueType",["description"])],m.prototype,"readValueType",null),(0,n._)([(0,a.MZ)({type:Boolean,json:{read:!1}})],m.prototype,"visible",void 0),m=i=(0,n._)([(0,d.$)("esri.layers.support.Field")],m);const f=m},95466:(e,t,r)=>{r.d(t,{A:()=>c});var i=r(49186),n=r(25482),o=r(53966),s=r(91869),a=r(3330),l=r(30524),u=r(56400),p=r(96285);const d=new Map;class c{static fromJSON(e){return new c(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new c(e.fields??[],f(e))}static fromLayerJSON(e){return new c(e.fields??[],f(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;const r=[];for(const e of this.fields){const t=e?.name,i=h(t);if(t&&i){const n=y(t);this._fieldsMap.set(t,e),this._fieldsMap.set(n,e),this._normalizedFieldsMap.set(i,e),r.push(`${n}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),(0,l.te)(e)||(0,l.Xz)(e)||(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}r.sort(),this.uid=r.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(const e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){if(!e)return;let t=this._fieldsMap.get(e);return t||(t=this._fieldsMap.get(y(e))??this._normalizedFieldsMap.get(h(e)),t&&this._fieldsMap.set(e,t),t)}getTimeZone(e){const t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(o.A.getLogger("esri.layers.support.FieldsIndex").error(new i.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),u.n$):m.has(t.type)?u.L5:null:null}getLuxonTimeZone(e){const t=this.getTimeZone(e);return t?t===u.L5?a.GB.instance:t===u.n$?p.mQ.utcInstance:(0,s.tE)(d,t,(()=>p.oh.create(t))):null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map((e=>(0,n.Wj)(e)?e.toJSON():e)),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}function y(e){return e.trim().toLowerCase()}function h(e){return(0,l.rS)(e)?.toLowerCase()??""}const m=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function f(e){const t=new Map;if(!e.fields)return t;const r=!0===e.datesInUnknownTimezone,{timeInfo:i,editFieldsInfo:n}=e,o=(i?"startField"in i?i.startField:i.startTimeField:"")??"",s=(i?"endField"in i?i.endField:i.endTimeField:"")??"",a=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,u.ZS)(e.dateFieldsTimeReference):null,l=n?function(e){return"timeZone"in e}(n)?n.timeZone??a:n.dateFieldsTimeReference?(0,u.ZS)(n.dateFieldsTimeReference):a??u.n$:null,p=i?function(e){return"timeZone"in e}(i)?i.timeZone??a:i.timeReference?(0,u.ZS)(i.timeReference):a:null,d=new Map([[y(n?.creationDateField??""),l],[y(n?.editDateField??""),l],[y(o),p],[y(s),p]]);for(const{name:i,type:n}of e.fields)if(m.has(n))t.set(i,u.L5);else if("date"!==n&&"esriFieldTypeDate"!==n)t.set(i,null);else if(r)t.set(i,u.L5);else{const e=d.get(y(i??""))??a;t.set(i,e)}return t}},91880:(e,t,r)=>{r.d(t,{A:()=>d});var i,n=r(90237),o=r(66552),s=r(25482),a=r(10107),l=(r(44208),r(53966),r(87811),r(40608));const u=new o.J({asc:"ascending",desc:"descending"});let p=i=class extends s.oY{constructor(e){super(e),this.field=null,this.valueExpression=null,this.order="ascending"}clone(){return new i({field:this.field,valueExpression:this.valueExpression,order:this.order})}};(0,n._)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"field",void 0),(0,n._)([(0,a.MZ)({type:String,json:{write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],p.prototype,"valueExpression",void 0),(0,n._)([(0,a.MZ)({type:u.apiValues,json:{type:u.jsonValues,read:u.read,write:u.write}})],p.prototype,"order",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.OrderByInfo")],p);const d=p},72088:(e,t,r)=>{r.d(t,{rS:()=>b,gK:()=>T}),r(44208);var i,n=r(90237),o=r(4718),s=r(10107),a=(r(53966),r(93223)),l=r(40608),u=r(25482);r(87811);let p=i=class extends u.oY{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"name",void 0),(0,n._)([(0,s.MZ)({type:[String,Number],json:{write:!0}})],p.prototype,"code",void 0),p=i=(0,n._)([(0,l.$)("esri.layers.support.CodedValue")],p);const d=new(r(66552).J)({inherited:"inherited",codedValue:"coded-value",range:"range"});let c=class extends u.oY{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.e)(d)],c.prototype,"type",void 0),c=(0,n._)([(0,l.$)("esri.layers.support.Domain")],c);const y=c;var h;let m=h=class extends y{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new h({codedValues:(0,o.o8)(this.codedValues),name:this.name})}};(0,n._)([(0,s.MZ)({type:[p],json:{write:!0}})],m.prototype,"codedValues",void 0),(0,n._)([(0,a.e)({codedValue:"coded-value"})],m.prototype,"type",void 0),m=h=(0,n._)([(0,l.$)("esri.layers.support.CodedValueDomain")],m);const f=m;var g;r(49186);let v=g=class extends y{constructor(e){super(e),this.type="inherited"}clone(){return new g}};(0,n._)([(0,a.e)({inherited:"inherited"})],v.prototype,"type",void 0),v=g=(0,n._)([(0,l.$)("esri.layers.support.InheritedDomain")],v);const w=v;var I;let S=I=class extends y{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new I({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],S.prototype,"maxValue",void 0),(0,n._)([(0,s.MZ)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],S.prototype,"minValue",void 0),(0,n._)([(0,a.e)({range:"range"})],S.prototype,"type",void 0),S=I=(0,n._)([(0,l.$)("esri.layers.support.RangeDomain")],S);const M=S,T={key:"type",base:y,typeMap:{range:S,"coded-value":f,inherited:w}};function b(e){if(!e?.type)return null;switch(e.type){case"range":return M.fromJSON(e);case"codedValue":return f.fromJSON(e);case"inherited":return w.fromJSON(e)}return null}},98453:(e,t,r)=>{r.d(t,{m:()=>i});const i=new(r(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},22671:(e,t,r)=>{r.d(t,{A:()=>w});var i,n=r(90237),o=r(59456),s=r(52106),a=r(66552),l=r(25482),u=r(4718),p=r(10107),d=(r(44208),r(53966),r(36005)),c=r(40608),y=r(43937),h=r(16930),m=r(65864),f=r(20437);const g=new a.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let v=i=class extends l.oY{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.A.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const n=e[t],o=s.A.fromJSON(n),a=n.geometry?.spatialReference;null==o.geometry||a||(o.geometry.spatialReference=r);const l=n.aggregateGeometries,u=o.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}i.push(o)}return i}writeGeometryType(e,t,r,i){if(e)return void g.write(e,t,r,i);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,m.rS)(e);return i&&!r&&t.spatialReference&&(i.spatialReference=h.A.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,u.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e?.[r];i.geometry=t?.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((n-e)/r)));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,n],scale:[o,s]}=r;let a=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;a=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*o+i),(e=>n-e*s),a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=r(a[1]);e===i&&s===n||(o.push([e-i,s-n]),i=e,n=s)}else i=t(a[0]),n=r(a[1]),o.push([i,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,m.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=i.length;e<o;e++){const o=i[e],s=this._quantizePoints(o,t,r);s&&n.push(s)}return n.length>0?((0,m.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i&&i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,i,n){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),i&&(e.z=i(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,m.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];for(let e=0,n=i.length;e<n;e++){const n=i[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=r(a)}}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2]),r[3]=n(r[3])}}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=i(r[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=n(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),i&&null!=e.zmax&&null!=e.zmin&&(e.zmax=i(e.zmax),e.zmin=i(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,i=o.length;e<i;e++){const i=o[e];e>0?(s+=i[0],a+=i[1]):(s=i[0],a=i[1]),i[0]=t(s),i[1]=r(a)}if(i&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2]),t[3]=n(t[3])}else if(i)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=i(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],v.prototype,"displayFieldName",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"exceededTransferLimit",void 0),(0,n._)([(0,p.MZ)({type:[s.A],json:{write:!0}})],v.prototype,"features",void 0),(0,n._)([(0,d.w)("features")],v.prototype,"readFeatures",null),(0,n._)([(0,p.MZ)({type:[f.A],json:{write:!0}})],v.prototype,"fields",void 0),(0,n._)([(0,p.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],v.prototype,"geometryType",void 0),(0,n._)([(0,y.K)("geometryType")],v.prototype,"writeGeometryType",null),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasM",void 0),(0,n._)([(0,p.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],v.prototype,"hasZ",void 0),(0,n._)([(0,p.MZ)({types:o.yR,json:{write:!0}})],v.prototype,"queryGeometry",void 0),(0,n._)([(0,d.w)("queryGeometry")],v.prototype,"readQueryGeometry",null),(0,n._)([(0,p.MZ)({type:h.A,json:{write:!0}})],v.prototype,"spatialReference",void 0),(0,n._)([(0,y.K)("spatialReference")],v.prototype,"writeSpatialReference",null),(0,n._)([(0,p.MZ)({json:{write:!0}})],v.prototype,"transform",void 0),v=i=(0,n._)([(0,c.$)("esri.rest.support.FeatureSet")],v),v.prototype.toJSON.isDefaultToJSON=!0;const w=v}}]);
|