@arcgis/core 4.27.0-next.20230420 → 4.27.0-next.20230421
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/WebMap.js +1 -1
- package/WebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{f64f95623d9296a91f95.js → 059ec6fd9b971de4b4c1.js} +1 -1
- package/assets/esri/core/workers/chunks/{1fe31a412479815e5e2d.js → 10770939900946feb20d.js} +1 -1
- package/assets/esri/core/workers/chunks/{5252f3cc244204edc299.js → 1216e939d363f96b6cc6.js} +1 -1
- package/assets/esri/core/workers/chunks/156dad2b7fed6749bae7.js +1 -0
- package/assets/esri/core/workers/chunks/15a97d3e42b00ac42984.js +1 -0
- package/assets/esri/core/workers/chunks/{d72c0c97cc4e30f1e4f2.js → 18704903814b9d73c708.js} +1 -1
- package/assets/esri/core/workers/chunks/{852b4a6c0f3feb57cf54.js → 1db5e4c8244dbc21590c.js} +1 -1
- package/assets/esri/core/workers/chunks/{f0953e41d1653e66ba57.js → 2a1a5a1969e80a10dcca.js} +1 -1
- package/assets/esri/core/workers/chunks/33b735faa582e6f39e9a.js +1 -0
- package/assets/esri/core/workers/chunks/34025ac04ca02531923a.js +1 -0
- package/assets/esri/core/workers/chunks/3e9f3479fd8558d9e3e3.js +1 -0
- package/assets/esri/core/workers/chunks/{d59274ac695dfcff1143.js → 46090b69e9161bc05141.js} +1 -1
- package/assets/esri/core/workers/chunks/{1b647446a6a27798c5cf.js → 47bf38d910e71ac39bb8.js} +1 -1
- package/assets/esri/core/workers/chunks/{3978f4f68ada540ee3a3.js → 4f8a09b61267e5e26712.js} +1 -1
- package/assets/esri/core/workers/chunks/5183ecab7eddae7b70e8.js +1 -0
- package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js → 51a0d1dabe7415515c77.js} +2 -2
- package/assets/esri/core/workers/chunks/541e6efc3b491e507410.js +1 -0
- package/assets/esri/core/workers/chunks/5c64fd3bf057a1a5527f.js +1 -0
- package/assets/esri/core/workers/chunks/6047bdaf4855506f8fdb.js +1 -0
- package/assets/esri/core/workers/chunks/{b2358c2e27be7a5709cf.js → 6adb58f1bffc5d1c03bd.js} +1 -1
- package/assets/esri/core/workers/chunks/770940417e6ddbdbb9d6.js +1 -0
- package/assets/esri/core/workers/chunks/{1c1d8be85297c483a606.js → 77c98121223a144170e3.js} +1 -1
- package/assets/esri/core/workers/chunks/80117007d86be4eb3bc3.js +1 -0
- package/assets/esri/core/workers/chunks/838849b751805615833a.js +1 -0
- package/assets/esri/core/workers/chunks/{9ca395f7bc8d397b5240.js → 88197520501fcc20b6e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{89e8ba4fc325838bf1a9.js → 88f9dededcf60fd011ef.js} +1 -1
- package/assets/esri/core/workers/chunks/88fdd288ef799a7ac48a.js +1 -0
- package/assets/esri/core/workers/chunks/{f11ec68ceb7c973cde74.js → 8ae7fea9f7fda38dd207.js} +1 -1
- package/assets/esri/core/workers/chunks/{0d080dd1ca6a71597409.js → 9265d4e9cfab2c7bbce5.js} +1 -1
- package/assets/esri/core/workers/chunks/{8d41305509fedb3603ac.js → 94041a9ced04aa281d40.js} +1 -1
- package/assets/esri/core/workers/chunks/98540791fcef86069e44.js +1 -0
- package/assets/esri/core/workers/chunks/9c1b2f82877ff79969f5.js +1 -0
- package/assets/esri/core/workers/chunks/a7b3cd537c9127b5e65e.js +1 -0
- package/assets/esri/core/workers/chunks/{3d1c697182237807ab49.js → abea316f2eac0f3086ab.js} +1 -1
- package/assets/esri/core/workers/chunks/ad85ade6a2cfb56cf328.js +1 -0
- package/assets/esri/core/workers/chunks/{25862269952c1bda910f.js → b833b4ea2973bb16792e.js} +1 -1
- package/assets/esri/core/workers/chunks/{e50d1afdc878258c437e.js → be4aa835a7abfc809126.js} +1 -1
- package/assets/esri/core/workers/chunks/{4fed7c08b5f4de23bb75.js → c2ec6e904f96173a7b83.js} +1 -1
- package/assets/esri/core/workers/chunks/{c25aa08b869f2777dc26.js → c4488a8d857c765da30e.js} +1 -1
- package/assets/esri/core/workers/chunks/c5c56b6d99db96a6755a.js +2 -0
- package/assets/esri/core/workers/chunks/{b28883e2a13f360310b3.js → c727d38f71e52bee17e1.js} +1 -1
- package/assets/esri/core/workers/chunks/cf315d255f0dc8d50f21.js +1 -0
- package/assets/esri/core/workers/chunks/cf7676fdc09ad4835680.js +1 -0
- package/assets/esri/core/workers/chunks/cfad34c949cbe8a31ef8.js +1 -0
- package/assets/esri/core/workers/chunks/{a2c9cb23f3e35e88da1d.js → d399b1b9cbf0737d1735.js} +1 -1
- package/assets/esri/core/workers/chunks/{df7dcd035997881cf2ef.js → d5c8119d6d34628d3126.js} +1 -1
- package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +1 -0
- package/assets/esri/core/workers/chunks/{8dfa32cc8453f85faab0.js → dd1f8bade9c5c3b7929b.js} +1 -1
- package/assets/esri/core/workers/chunks/e11e60759821746259c6.js +1 -0
- package/assets/esri/core/workers/chunks/{e4b65c5a4575a5c1c49f.js → e356c576f9a7521a49b3.js} +1 -1
- package/assets/esri/core/workers/chunks/f02edf71645eb33bf92f.js +1 -0
- package/assets/esri/core/workers/chunks/{3dff550c29115dd625fa.js → f1a4165c2710ca90e5ea.js} +1 -1
- package/assets/esri/core/workers/chunks/f57a3ee17869ced3dd33.js +1 -0
- package/assets/esri/core/workers/chunks/fc07f6e103d7f69a9909.js +1 -0
- package/chunks/WaterSurface.glsl.js +35 -20
- package/chunks/index.js +1 -1
- package/core/Loadable.js +1 -1
- package/core/Promise.js +1 -1
- package/core/accessorSupport/ensureType.js +1 -1
- package/core/accessorSupport/watch.js +1 -1
- package/core/accessorSupport/write.js +1 -1
- package/core/promiseUtils.js +1 -1
- package/core/watchUtils.js +1 -1
- package/core/workers/Connection.js +1 -1
- package/core/workers/RemoteClient.js +1 -1
- package/geometry/support/geodesicUtils.js +1 -1
- package/intl/messages.js +1 -1
- package/layers/graphics/data/attributeSupport.js +1 -1
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/layers/support/PromiseQueue.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/TileKey.js +1 -1
- package/layers/support/rasterFormats/TiffDecoder.js +1 -1
- package/networks/Network.js +1 -1
- package/package.json +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/request.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/previewSymbol3D.js +1 -1
- package/symbols/support/styleUtils.js +1 -1
- package/symbols/support/symbolLayerUtils.js +1 -1
- package/symbols/support/utils.js +1 -1
- package/symbols/support/webStyleSymbolUtils.js +1 -1
- package/views/2d/engine/webgl/TextureManager.js +1 -1
- package/views/2d/layers/support/webStyleUtils.js +1 -1
- package/views/3d/input/SceneInputManager.js +1 -1
- package/views/3d/interactive/manipulatorUtils.js +1 -1
- package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
- package/views/3d/layers/graphics/ElevationQuery.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/polygonUtils.js +1 -1
- package/views/3d/layers/graphics/symbolComplexity.js +1 -1
- package/views/3d/layers/graphics/webStyleUtils.js +5 -0
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/LayerViewManager.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/ViewAnimation.js +1 -1
- package/views/input/BrowserEventSource.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
- package/views/support/QueueProcessor.js +1 -1
- package/views/ui/DefaultUI.js +1 -1
- package/views/ui/UI.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/Upload.js +1 -1
- package/widgets/Editor/deprecationUtils.js +1 -1
- package/widgets/Editor/modelUploadUtils.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/Popup.js +1 -1
- package/assets/esri/core/workers/chunks/0cec1c16b25406858ae6.js +0 -1
- package/assets/esri/core/workers/chunks/27353056c3e4e8d8b8d3.js +0 -1
- package/assets/esri/core/workers/chunks/337d59d624ef8a89aae5.js +0 -1
- package/assets/esri/core/workers/chunks/4b6a903d4aeeb4eeb615.js +0 -1
- package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +0 -1
- package/assets/esri/core/workers/chunks/5ec4fedbbcbb0053cf74.js +0 -2
- package/assets/esri/core/workers/chunks/60e29d172a2dcf45e8d0.js +0 -1
- package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +0 -1
- package/assets/esri/core/workers/chunks/778ecf61f07dafc51bbc.js +0 -1
- package/assets/esri/core/workers/chunks/7e67e071789c6d264280.js +0 -1
- package/assets/esri/core/workers/chunks/80d335bec34d60b7bbdc.js +0 -1
- package/assets/esri/core/workers/chunks/810da30f13151b72a293.js +0 -1
- package/assets/esri/core/workers/chunks/81485a5056aed94b3d8d.js +0 -1
- package/assets/esri/core/workers/chunks/8ebda132068f6b962dd9.js +0 -1
- package/assets/esri/core/workers/chunks/914a0c78c80aa897b1a1.js +0 -1
- package/assets/esri/core/workers/chunks/979ea2e3b1b164334634.js +0 -1
- package/assets/esri/core/workers/chunks/a0e92dd27c8f6b642dbf.js +0 -1
- package/assets/esri/core/workers/chunks/a6240bf258b3886a6661.js +0 -1
- package/assets/esri/core/workers/chunks/b1a8024bf8cdd0cd3884.js +0 -1
- package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +0 -1
- package/assets/esri/core/workers/chunks/c564055cb906857c8641.js +0 -1
- package/assets/esri/core/workers/chunks/c646dc9da08b509e39d6.js +0 -1
- package/assets/esri/core/workers/chunks/db5598944b691e43f13e.js +0 -1
- package/assets/esri/core/workers/chunks/eb163a2ddeb27c690308.js +0 -1
- package/assets/esri/core/workers/chunks/f05634909c9449533193.js +0 -1
- package/assets/esri/core/workers/chunks/fcebd70b089dea833c75.js +0 -1
- /package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js.LICENSE.txt → 51a0d1dabe7415515c77.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{5ec4fedbbcbb0053cf74.js.LICENSE.txt → c5c56b6d99db96a6755a.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3660,5732],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,n=s(43697),r=s(96674),o=s(70586),a=s(35463),l=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),c=s(30556);let d=i=class extends r.wq{static get allTime(){return p}static get empty(){return _}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,n=null!=e.end?e.end.getTime():e.end;return t===i&&s===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),s=(0,o.yw)(this.end,(t=>{const s=(0,a.JE)(t,e);return t.getTime()===s.getTime()?s:(0,a.Nm)(s,1,e)}));return new i({start:t,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,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;if(n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:r}=this;return null!=n&&(s.start=(0,a.Nm)(n,e,t)),null!=r&&(s.end=(0,a.Nm)(r,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,u.r)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,u.r)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,h.j)("esri.TimeExtent")],d);const p=new d,_=new d({start:void 0,end:void 0}),f=d},5732:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},25929:(e,t,s)=>{s.d(t,{M:()=>_,a:()=>g,e:()=>d,f:()=>n,i:()=>h,p:()=>c,r:()=>o,t:()=>r,w:()=>a});var i=s(17452);function n(e,t){const s=t&&t.url&&t.url.path;if(e&&s&&(e=(0,i.hF)(e,s,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const s=(0,i.PF)(e,t.portalItem.itemUrl);null!=s&&u.test(s)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(s).path)}return p(e,t&&t.portal)}function r(e,t,s=_.YES){if(null==e)return e;!(0,i.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let n=(0,i.hF)(e);if(t){const s=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(s){const r=p(s,t.portal),o=p(n,t.portal);n=(0,i.PF)(o,r,r),null!=n&&n!==o&&n!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=d(n,t?.portal),(0,i.YP)(n)&&(n=(0,i.Fv)(n)),t?.resources&&t?.portalItem&&!(0,i.YP)(n)&&!(0,i.HK)(n)&&s===_.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n),compress:!1}),n}function o(e,t,s){return n(e,s)}function a(e,t,s,i){const n=r(e,i);void 0!==n&&(t[s]=n)}const l=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function h(e){const t=e?.match(l)??null;return t?.[1]??null}function c(e){const t=e?.match(l)??null;if(null==t)return null;const s=t[2],n=s.lastIndexOf("/");if(-1===n){const{path:e,extension:t}=(0,i.fZ)(s);return{prefix:null,filename:e,extension:t}}const{path:r,extension:o}=(0,i.fZ)(s.slice(n+1));return{prefix:s.slice(0,n),filename:r,extension:o}}function d(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function p(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const s=`${t.urlKey}.${t.customBaseUrl}`,n=(0,i.TI)();return(0,i.D6)(n,`${n.scheme}://${s}`)?(0,i.Ie)(e,t.portalHostname,s):(0,i.Ie)(e,s,t.portalHostname)}var _,f;(f=_||(_={}))[f.YES=0]="YES",f[f.NO=1]="NO";const g=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return _},ensureMainOnlineDomain:d,fromJSON:n,itemIdFromResourceUrl:h,prefixAndFilenameFromResourceUrl:c,read:o,toJSON:r,write:a},Symbol.toStringTag,{value:"Module"}))},91303:(e,t,s)=>{var i;s.d(t,{Y:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},2368:(e,t,s)=>{s.d(t,{J:()=>h,j:()=>c});var i=s(43697),n=s(15923),r=(s(80442),s(22974)),o=(s(92604),s(70586)),a=s(31263),l=s(1153),u=s(52011);const h=e=>{let t=class extends e{clone(){const e=(0,o.s3)((0,l.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const h=this[e];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,r.Vo)(h),null!=h&&null==c||(l===a.s3.DEFAULTS?n.set(e,c):i[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.vw)(u)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.s3.DEFAULTS)}return u}};return t=(0,i._)([(0,u.j)("esri.core.Clonable")],t),t};let c=class extends(h(n.Z)){};c=(0,i._)([(0,u.j)("esri.core.Clonable")],c)},3920:(e,t,s)=>{s.d(t,{p:()=>u,r:()=>h});var i=s(43697),n=s(15923),r=s(61247),o=s(5600),a=s(52011),l=s(72762);const u=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new r.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,a.j)("esri.core.HandleOwner")],t),t};let h=class extends(u(n.Z)){};h=(0,i._)([(0,a.j)("esri.core.HandleOwner")],h)},13867:(e,t,s)=>{s.d(t,{Z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t,s){this._storage.put(e,t,s,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",s&&(this._storage.registerRemoveFunc(this._namespace,s),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this._namespace+e,t,s,i)}get(e){const t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this._namespace+e,t,s)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class a{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get size(){return this._size}get sizeMB(){return this._size/1024/1024}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}put(e,t,s,n){const r=this._db.get(e);if(r&&(this._size-=r.size,this._db.delete(e),r.entry!==t&&this._notifyRemove(e,r.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,t,i.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const o=1+Math.max(n,-3)- -3;this._db.set(e,{entry:t,size:s,lifetime:o,lives:o}),this._size+=s,this._checkSizeLimit()}updateSize(e,t,s){const n=this._db.get(e);if(n&&n.entry===t){for(this._size-=n.size;s>this._maxSize;){const n=this._notifyRemove(e,t,i.SOME);if(!(null!=n&&n>0))return void this._db.delete(e);s=n}n.size=s,this._size+=s,this._checkSizeLimit()}}pop(e){const t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}get(e){const t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}getStats(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const n=s.namespace;if(i.startsWith(n)){const s=t[n]||0;t[n]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))}))}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[e,t]of this._db){if(this._db.delete(e),t.lives<=1){this._size-=t.size;const s=this._notifyRemove(e,t.entry,i.SOME);null!=s&&s>0&&(this._size+=s,t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},66643:(e,t,s)=>{s.d(t,{Ed:()=>u,UI:()=>h,mt:()=>_,q6:()=>p,vr:()=>f});var i=s(43697),n=s(15923),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function u(e,t,s){return(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))}async function h(e,t,s){return(await(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function _(e){try{return c(await e)}catch(e){return(0,o.r9)(e),d(e)}}function f(e,t){return new g(e,t)}let g=class extends n.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then((e=>{this._result=c(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],g.prototype,"value",null),(0,i._)([(0,a.Cb)()],g.prototype,"error",null),(0,i._)([(0,a.Cb)()],g.prototype,"finished",null),(0,i._)([(0,a.Cb)()],g.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],g.prototype,"_result",void 0),g=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],g)},43090:(e,t,s)=>{function i(e){return 32+e.length}function n(e){if(!e)return 0;let t=l;for(const s in e)if(e.hasOwnProperty(s)){const n=e[s];switch(typeof n){case"string":t+=i(n);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function r(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let s=u;for(let i=0;i<t;i++)s+=o(e[i]);return s}(e);let t=l;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s]));return t}function o(e){switch(typeof e){case"object":return r(e);case"string":return i(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(e,t){return u+e.length*t}s.d(t,{Ul:()=>r,do:()=>a,f2:()=>n});const l=32,u=32},24133:(e,t,s)=>{s.d(t,{Q:()=>a});var i=s(67676),n=s(70586),r=s(44553),o=s(88764);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),w.prune(),x.prune(),E.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):m(e,o)?this._all(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||m(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,s=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(x.clear(),E.clear();s||x.length>0;){if(s||(s=(0,n.j0)(x.pop()),r=x.data[x.length-1],o=E.pop()??0,a=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),x.push(s),this._condense(x),this;a||s.leaf||!m(s,l)?r?(o++,s=r.children[o],a=!1):s=null:(x.push(s),E.push(o),o=0,r=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else w.pushArray(s.children);s=w.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new T(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new F([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));v(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);v(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=f(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);x.clear();const r=this._chooseSubtree(n,this._data,t,x);for(r.children.push(e),h(r,n);t>=0&&x.data[t].children.length>this._maxEntries;)this._split(x,t),t--;this._adjustParentBBoxes(n,x,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),a=s.leaf?new T(o):new F(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=g(t,a),h=p(t)+p(a);l<i?(i=l,r=o,n=h<n?h:n):l===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=_(r)+_(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=_(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=_(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new T([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,r){const a=[t,s];for(;a.length;){const t=(0,n.j0)(a.pop()),s=(0,n.j0)(a.pop());if(t-s<=i)continue;const l=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,l,s,t,r),a.push(s,l,l,t)}}const b=new r.Z,w=new r.Z,x=new r.Z,E=new r.Z({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>l,Z_:()=>f,gx:()=>u,nn:()=>g,on:()=>c,tX:()=>m});var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,_)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.hw)(h),s(e)}const p=l(e,((e,s)=>{c(),(0,i.vT)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.kB)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,_,t)}function p(e){return!0}function _(e){return!!e}s(87538);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},72762:(e,t,s)=>{s.d(t,{t:()=>h});var i=s(43697),n=s(15923),r=s(61247),o=s(17445),a=s(1654),l=s(5600),u=s(52011);let h=class extends n.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,s={}){return this._installWatch(e,t,s,o.YP)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.gx)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this._handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),{remove:()=>this._handles.remove(n)}}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this._handles.remove(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const r=i(e,t,s);return this._handles.add(r,n),{remove:()=>this._handles.remove(n)}}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.YP)(e,s,{sync:!0,equals:()=>!1});return this._handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,i._)([(0,l.Cb)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,i._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],h);const c=-42},35463:(e,t,s)=>{s.d(t,{JE:()=>o,Nm:()=>r,rJ:()=>a}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=n[s],{getter:r,setter:o,multiplier:a}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[r]()+t*a)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,s){return 0===e?0:e*i[t]/i[s]}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,s)=>{s.d(t,{Z:()=>g});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),u=s(37549),h=s(29730),c=s(70272),d=s(5428);const p={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,h.Y)(new d.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var _=s(11490);const f=(0,o.Ue)();class g{constructor(e){this.geometryInfo=e,this._boundsStore=new u.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=p}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,_.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,o.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let n;if(this._markedIds.add(t),s?(e.displayId=s.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,l.$)(null!=n?n:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},1231:(e,t,s)=>{s.d(t,{Z:()=>g});var i,n=s(43697),r=s(35454),o=s(96674),a=s(5600),l=s(75215),u=(s(67676),s(80442),s(36030)),h=s(71715),c=s(52011),d=s(72729),p=s(86719);const _=new r.X({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 f=i=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?_.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.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.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,n._)([(0,h.r)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.J)(p.v)],f.prototype,"type",void 0),(0,n._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,n._)([(0,h.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,c.j)("esri.layers.support.Field")],f);const g=f},39450:(e,t,s)=>{s.d(t,{Z:()=>h});var i,n=s(43697),r=s(96674),o=s(5600),a=s(75215),l=(s(67676),s(80442),s(52011));let u=i=class extends r.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,n._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,n._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,s)=>{s.d(t,{Z:()=>C});var i,n=s(43697),r=s(35454),o=s(96674),a=s(67900),l=s(5600),u=s(75215),h=(s(67676),s(80442),s(71715)),c=s(52011),d=s(30556),p=s(94139),_=s(82971),f=s(24470),g=s(8744),m=s(40488),y=s(39450),v=s(43077);const b=new r.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=i=class extends o.wq{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=_.Z.WebMercator,numLODs:o=24}=e;if(!(0,g.JY)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.Z({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.Z({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.Z(0,0,r),size:[n,n],spatialReference:r})}const l=(0,g.C5)(r),u=e.origin?new p.Z({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.Z(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),h=1/(39.37*(0,a.c9)(r)*96),c=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*h;c.push(new y.Z({level:e,scale:t,resolution:i}))}else{let e=(0,g.sT)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);c.push(new y.Z({level:0,scale:e,resolution:e*h}));for(let i=1;i<s;i++){const s=e/2**t,n=s*h;c.push(new y.Z({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:c,origin:u,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.C5)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("minScale",t),this._set("maxScale",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,g.fS)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,m.iV)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.f(null,0,0,0,(0,f.Ue)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.Ue)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],n=this.lods.length;for(let e=0;e<n;e++){const i=this.lods[e],n=i.resolution*t;s.push(new y.Z({level:i.level,scale:i.scale,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var x,E;(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,n._)([(0,l.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"isWrappable",null),(0,n._)([(0,l.Cb)({type:p.Z,json:{write:!0}})],w.prototype,"origin",void 0),(0,n._)([(0,h.r)("origin")],w.prototype,"readOrigin",null),(0,n._)([(0,l.Cb)({type:[y.Z],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"minScale",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"maxScale",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"scales",void 0),(0,n._)([(0,l.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,n._)([(0,h.r)("size",["rows","cols"])],w.prototype,"readSize",null),(0,n._)([(0,d.c)("size",{cols:{type:u.z8},rows:{type:u.z8}})],w.prototype,"writeSize",null),(0,n._)([(0,l.Cb)({type:_.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=i=(0,n._)([(0,c.j)("esri.layers.support.TileInfo")],w),x=w||(w={}),(E=x.ExtrapolateOptions||(x.ExtrapolateOptions={}))[E.NONE=0]="NONE",E[E.POWER_OF_TWO=1]="POWER_OF_TWO";const C=w},43077:(e,t,s)=>{s.d(t,{f:()=>i});class i{constructor(e,t,s,i,n=undefined){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},66677:(e,t,s)=>{s.d(t,{B5:()=>h,DR:()=>d,G:()=>v,M8:()=>f,Nm:()=>g,Qc:()=>c,XG:()=>m,a7:()=>_,ld:()=>p,wH:()=>y});var i=s(17452),n=s(25929);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),s=t.path.match(a)||t.path.match(l);if(!s)return null;const[,n,o,u,h]=s,c=o.indexOf("/");return{title:p(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:n}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function _(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function f(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const s=(0,i.mN)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.v_)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},72729:(e,t,s)=>{s.d(t,{im:()=>C,V5:()=>E}),s(80442);var i,n=s(43697),r=s(22974),o=s(5600),a=(s(75215),s(36030)),l=s(52011),u=s(96674);s(67676);let h=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=i=(0,n._)([(0,l.j)("esri.layers.support.CodedValue")],h);const c=new(s(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,a.J)(c)],d.prototype,"type",void 0),d=(0,n._)([(0,l.j)("esri.layers.support.Domain")],d);const p=d;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,r.d9)(this.codedValues),name:this.name})}};(0,n._)([(0,o.Cb)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,n._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const g=f;var m;s(92604),s(20102);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,n._)([(0,a.J)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,n._)([(0,l.j)("esri.layers.support.InheritedDomain")],y);const v=y;var b;let w=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,n._)([(0,a.J)({range:"range"})],w.prototype,"type",void 0),w=b=(0,n._)([(0,l.j)("esri.layers.support.RangeDomain")],w);const x=w,E={key:"type",base:p,typeMap:{range:w,"coded-value":g,inherited:v}};function C(e){if(!e||!e.type)return null;switch(e.type){case"range":return x.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,s)=>{s.d(t,{v:()=>i});const i=new(s(35454).X)({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"})},99282:(e,t,s)=>{s.d(t,{a:()=>r});var i=s(67900),n=s(68441);const r={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",n.sv.radius)}},28694:(e,t,s)=>{s.d(t,{p:()=>n});var i=s(69285);function n(e,t,s){if(!s||!s.features||!s.hasZ)return;const n=(0,i.k)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},86787:(e,t,s)=>{s.d(t,{Z:()=>b});var i,n=s(43697),r=s(35454),o=s(96674),a=s(70586),l=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),c=s(30556),d=s(35671);let p=i=class extends o.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,h.j)("esri.layers.support.FeatureExpressionInfo")],p);const _=p;var f,g=s(12541);const m=(0,r.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=f=class extends o.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.Cb)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,u.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,c.c)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.Cb)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.Cb)({type:g.f9,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=f=(0,n._)([(0,h.j)("esri.layers.support.ElevationInfo")],v);const b=v},12541:(e,t,s)=>{s.d(t,{Z7:()=>n,f9:()=>r});var i=s(99282);function n(e){return 1/(i.a[e]||1)}const r=function(){const e=Object.keys(i.a);return e.sort(),e}()},65967:(e,t,s)=>{s.r(t),s.d(t,{default:()=>we});var i=s(43697),n=s(32448),r=s(61247),o=s(95330),a=s(17445),l=s(5600),u=(s(75215),s(67676)),h=(s(80442),s(52011)),c=s(72762),d=s(82971),p=s(57191),_=s(4136),f=s(11145),g=s(14165),m=s(86787),y=s(13867),v=s(30175),b=s(67900),w=s(12541);function x(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s,spatialReference:i}=t;return new C(e,s,i)}return new E}class E{async alignCandidates(e,t){return e}notifyElevationSourceChange(){}}class C{constructor(e,t,s){this._elevationInfo=e,this._alignPointsInFeatures=t,this.spatialReference=s,this._alignmentsCache=new y.Z(1024),this._cacheVersion=0,this._metersPerVerticalUnit=(0,b._R)(s)}async alignCandidates(e,t){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t):(this._alignAbsoluteElevationCandidates(e,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}_alignAbsoluteElevationCandidates(e,t){const{offset:s,unit:i}=t;if(null==s)return;const n=s*((0,w.Z7)(i??"meters")/this._metersPerVerticalUnit);for(const t of e)switch(t.type){case"edge":t.start.z+=n,t.end.z+=n;continue;case"vertex":t.target.z+=n;continue}}async _alignComputedElevationCandidates(e,t){const s=new Map;for(const t of e)(0,v.s1)(s,t.objectId,F).push(t);const[i,n,r]=this._prepareQuery(s),a=await this._alignPointsInFeatures(i,t);if((0,o.k_)(t),r!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t);this._applyCacheAndResponse(i,a,n);const{drapedObjectIds:l,failedObjectIds:u}=a,h=[];for(const t of e){const{objectId:e}=t;l.has(e)&&"edge"===t.type&&(t.draped=!0),u.has(e)||h.push(t)}return h}_prepareQuery(e){const t=[],s=[];for(const[i,n]of e){const e=[];for(const t of n)this._addToQueriesOrCachedResult(i,t.target,e,s),"edge"===t.type&&(this._addToQueriesOrCachedResult(i,t.start,e,s),this._addToQueriesOrCachedResult(i,t.end,e,s));0!==e.length&&t.push({objectId:i,points:e})}return[t,s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=T(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new S(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=T(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function T(e,{x:t,y:s,z:i}){return`${e}-${t}-${s}-${i??0}}`}function F(){return[]}class I{filter(e,t){return t}notifyElevationSourceChange(){}}class O{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(M);return o.sort(B),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":z(i,t,s);continue;case"vertex":A(i,t,s);continue}return e}}function M(e){return e.distance<=1}function R(e=!1){return e?new O:new I}function z(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+n*u,c=s.y+r*u,d=s.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,r,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function A(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function B(e,t){return e.distance-t.distance}var D=s(22974),j=s(19153);function P(e=!1,t){return e?new H(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class H{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new y.Z(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=U(t),r=n.get(e);if(r)for(const e of r)i.push((0,D.d9)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const r=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,o.k_)(t),r!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=U(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),u.push((0,D.d9)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function U(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,j.hP)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,j.hP)(n).toString()}default:return""}}var k=s(15923);let Y=class extends k.Z{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,l.Cb)()],Y.prototype,"updating",void 0),Y=(0,i._)([(0,h.j)("esri.core.AsyncSequence")],Y);var Z,L=s(66643),V=s(3920),X=s(50758),q=s(92604),J=s(6570),G=s(24470),W=s(98732),$=s(66677),Q=s(78760),K=s(34599);class ee{constructor(e,t){this.data=e,this.resolution=t,this.state={type:Z.CREATED},this.alive=!0}process(e){switch(this.state.type){case Z.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Z.FETCH_COUNT:break;case Z.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Z.FETCH_FEATURES:break;case Z.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case Z.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case Z.CREATED:case Z.FETCH_COUNT:return 0;case Z.FETCHED_COUNT:return this.state.featureCount;case Z.FETCH_FEATURES:return this.state.previous.featureCount;case Z.FETCHED_FEATURES:return this.state.features.length;case Z.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case Z.CREATED:return"created";case Z.FETCH_COUNT:return"fetch-count";case Z.FETCHED_COUNT:return"fetched-count";case Z.FETCH_FEATURES:return"fetch-features";case Z.FETCHED_FEATURES:return"fetched-features";case Z.DONE:return"done"}}_gotoFetchCount(e,t){return{type:Z.FETCH_COUNT,previous:e,task:(0,L.vr)((async e=>{const s=await(0,L.mt)(t.fetchCount(this,e));this.state.type===Z.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:Z.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:Z.FETCH_FEATURES,previous:e,task:(0,L.vr)((async s=>{const i=await(0,L.mt)(t.fetchFeatures(this,e.featureCount,s));this.state.type===Z.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,i.ok?i.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:Z.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:Z.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:Z.CREATED},e.type){case Z.CREATED:case Z.FETCHED_COUNT:case Z.FETCHED_FEATURES:case Z.DONE:break;case Z.FETCH_COUNT:case Z.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,G.oJ)(e,te),(0,G.kK)(this.data.extent,te))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(Z||(Z={}));const te=(0,G.Ue)();let se=class extends V.r{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this.updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._pendingEdits=new Y,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,u.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),a.Z_)}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.M8)(this.url))return;const e=(0,L.vr)((async e=>{try{const t=await(0,K.Vr)(this.url,new g.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=J.Z.fromJSON(t.data?.extent)}catch(e){(0,o.r9)(e),q.Z.getLogger(this.declaredClass).warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,X.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)));null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<re}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(oe/(s*s))<ae}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<Z.FETCHED_COUNT&&this.updatingHandles.addPromise(s.process(e)),s.state.type<=Z.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new ee(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ne,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.qp)(this.url,e,new Q.J({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ne,signal:t});return(0,W.lM)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.JT)(this.url,e,s,{query:this._configuration.customParameters,timeout:ne,signal:t});return(0,W.h_)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new g.Z({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,G.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?g.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||ie);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"url",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"objectIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"globalIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"capabilities",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"store",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,l.Cb)()],se.prototype,"filter",null),(0,i._)([(0,l.Cb)()],se.prototype,"customParameters",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_configuration",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileInfo",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileSize",null),(0,i._)([(0,l.Cb)()],se.prototype,"tilesOfInterest",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"availability",void 0),(0,i._)([(0,l.Cb)()],se.prototype,"hasZ",null),se=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],se);const ie=2e3,ne=6e5,re=1e6,oe=25,ae=1;var le=s(43090),ue=s(91303),he=s(37549),ce=s(43077);class de{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let pe=class extends k.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*ue.Y.MEGABYTES,this._tileBounds=new he.H,this._tiles=new de,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,G.Ue)()}add(e,t){const s=[];for(const e of t)this._referenceFeature(e.objectId)===ve.ADDED&&s.push(e);this._addTileStorage(e,new Set(t.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,le.do)(e.lengths,4);return 32+(0,le.do)(e.coords,8)+t}(e.geometry)+(0,le.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(s),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new _e(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ve.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,W.$)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0)){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,G.kK)((0,G.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new ge(e);if(this._tiles.has(e.id))return new ge(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,K.hH)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new fe(e.level,e.row,e.col);return t.updateTileInfo(s,f.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&this._tilesAreRelated(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const n=new fe(e.level+1,r,o);s.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<ye&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s=0;this._forEachLeaf(e,(e=>{const i=this._tiles.get(e.id);if(i){s+=i.byteSize;for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,s),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s){const i=new me(s,e,this.extent);return this._collectMissingTilesRecurse(t,i,1),i.info}_collectMissingTilesRecurse(e,t,s){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,s);const i=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),i):this._collectMissingTilesRecurse(n,t,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ve.ADDED:ve.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ve.REMOVED):(t>0&&this._refCounts.set(e,t),ve.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,l.Cb)({constructOnly:!0})],pe.prototype,"featureStore",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"tileInfo",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"extent",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"maximumByteSize",void 0),pe=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],pe);class _e{constructor(e,t,s){this.data=e,this.objectIds=t,this.byteSize=s}}class fe{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class ge{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,G.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class me{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new ge(t),null!=s&&(this._extent=(0,G.oJ)(s))}addMissing(e,t,s,i){const n=new ce.f(null,e,t,s);this._tileInfo.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,G.kK)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,G.SO)(n.extent))}}const ye=.18751;var ve;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ve||(ve={}));let be=class extends n.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,o.dD)(),this._elevationAligner=x(),this._elevationFilter=R(),this._symbologyCandidatesFetcher=P(),this._handles=new r.Z,this._updatingHandles=new c.t,this._editsUpdatingHandles=new c.t,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={points:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,o.k_)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,o.k_)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear(),this._handles?.destroy()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fields:n}=e.serviceInfo,{hasZ:r}=e,o=d.Z.fromJSON(e.spatialReference);this._spatialReference=o,this._featureStore=new p.Z({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new _.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fields:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new se({store:new pe({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:o,sourceSpatialReference:d.Z.fromJSON(e.serviceInfo.spatialReference)});const l="3d"===e.configuration.viewType;return this._elevationAligner=x(l,{elevationInfo:null!=e.elevationInfo?m.Z.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures,spatialReference:o}),this._elevationFilter=R(l),this._handles.add([(0,a.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),a.Z_),(0,a.YP)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){await this._whenSetup.promise,(0,o.k_)(t);const s=function(e){return{point:e.point,mode:e.mode,distance:e.distance,types:e.types,query:null!=e.filter?e.filter:{where:"1=1"}}}(e),i=null!=t?t.signal:null,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,o.k_)(i);const r=await this._elevationAligner.alignCandidates(n.candidates,i);(0,o.k_)(i);const a=await this._symbologyCandidatesFetcher.fetch(r,i);(0,o.k_)(i);const l=0===a.length?r:r.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.Z.fromJSON(e.tileInfo):null,xe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.refresh(),xe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),await(0,a.N1)((()=>!this.updatingExcludingEdits),t),(0,o.k_)(t),xe}async getDebugInfo(e,t){return(0,o.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t);const s=(0,o.dD)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),xe}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,o.k_)(t),xe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),xe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),xe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=P(e,this._getSymbologyCandidates),xe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)()],be.prototype,"_isInitializing",void 0),be=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],be);const we=be,xe={result:{}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3660,5732],{92835:(e,t,s)=>{s.d(t,{Z:()=>f});var i,n=s(43697),r=s(96674),o=s(70586),a=s(35463),l=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),c=s(30556);let d=i=class extends r.wq{static get allTime(){return p}static get empty(){return _}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?e.getTime():null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?e.getTime():null}clone(){return new i({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=null!=this.start?this.start.getTime():this.start,s=null!=this.end?this.end.getTime():this.end,i=null!=e.start?e.start.getTime():e.start,n=null!=e.end?e.end.getTime():e.end;return t===i&&s===n}expandTo(e){if(this.isEmpty||this.isAllTime)return this.clone();const t=(0,o.yw)(this.start,(t=>(0,a.JE)(t,e))),s=(0,o.yw)(this.end,(t=>{const s=(0,a.JE)(t,e);return t.getTime()===s.getTime()?s:(0,a.Nm)(s,1,e)}));return new i({start:t,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,s=this.end?.getTime()??1/0,n=e.start?.getTime()??-1/0,r=e.end?.getTime()??1/0;let o,a;if(n>=t&&n<=s?o=n:t>=n&&t<=r&&(o=t),s>=n&&s<=r?a=s:r>=t&&r<=s&&(a=r),null!=o&&null!=a&&!isNaN(o)&&!isNaN(a)){const e=new i;return e.start=o===-1/0?null:new Date(o),e.end=a===1/0?null:new Date(a),e}return i.empty}offset(e,t){if(this.isEmpty||this.isAllTime)return this.clone();const s=new i,{start:n,end:r}=this;return null!=n&&(s.start=(0,a.Nm)(n,e,t)),null!=r&&(s.end=(0,a.Nm)(r,e,t)),s}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return p.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,s=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new i({start:t,end:s})}};(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"end",void 0),(0,n._)([(0,u.r)("end")],d.prototype,"readEnd",null),(0,n._)([(0,c.c)("end")],d.prototype,"writeEnd",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isAllTime",null),(0,n._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],d.prototype,"isEmpty",null),(0,n._)([(0,l.Cb)({type:Date,json:{write:{allowNull:!0}}})],d.prototype,"start",void 0),(0,n._)([(0,u.r)("start")],d.prototype,"readStart",null),(0,n._)([(0,c.c)("start")],d.prototype,"writeStart",null),d=i=(0,n._)([(0,h.j)("esri.TimeExtent")],d);const p=new d,_=new d({start:void 0,end:void 0}),f=d},5732:(e,t,s)=>{s.d(t,{c:()=>i,g:()=>n});var i="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}},25929:(e,t,s)=>{s.d(t,{M:()=>_,a:()=>g,e:()=>d,f:()=>n,i:()=>h,p:()=>c,r:()=>o,t:()=>r,w:()=>a});var i=s(17452);function n(e,t){const s=t&&t.url&&t.url.path;if(e&&s&&(e=(0,i.hF)(e,s,{preserveProtocolRelative:!0}),t.portalItem&&t.readResourcePaths)){const s=(0,i.PF)(e,t.portalItem.itemUrl);null!=s&&u.test(s)&&t.readResourcePaths.push(t.portalItem.resourceFromPath(s).path)}return p(e,t&&t.portal)}function r(e,t,s=_.YES){if(null==e)return e;!(0,i.YP)(e)&&t&&t.blockedRelativeUrls&&t.blockedRelativeUrls.push(e);let n=(0,i.hF)(e);if(t){const s=t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.rootPath||t.url&&t.url.path;if(s){const r=p(s,t.portal),o=p(n,t.portal);n=(0,i.PF)(o,r,r),null!=n&&n!==o&&n!==e&&t.verifyItemRelativeUrls&&t.verifyItemRelativeUrls.writtenUrls.push(n)}}return n=d(n,t?.portal),(0,i.YP)(n)&&(n=(0,i.Fv)(n)),t?.resources&&t?.portalItem&&!(0,i.YP)(n)&&!(0,i.HK)(n)&&s===_.YES&&t.resources.toKeep.push({resource:t.portalItem.resourceFromPath(n),compress:!1}),n}function o(e,t,s){return n(e,s)}function a(e,t,s,i){const n=r(e,i);void 0!==n&&(t[s]=n)}const l=/\/items\/([^\/]+)\/resources\/(.*)/,u=/^\.\/resources\//;function h(e){const t=e?.match(l)??null;return t?.[1]??null}function c(e){const t=e?.match(l)??null;if(null==t)return null;const s=t[2],n=s.lastIndexOf("/");if(-1===n){const{path:e,extension:t}=(0,i.fZ)(s);return{prefix:null,filename:e,extension:t}}const{path:r,extension:o}=(0,i.fZ)(s.slice(n+1));return{prefix:s.slice(0,n),filename:r,extension:o}}function d(e,t){return t&&!t.isPortal&&t.urlKey&&t.customBaseUrl?(0,i.Ie)(e,`${t.urlKey}.${t.customBaseUrl}`,t.portalHostname):e}function p(e,t){if(!t||t.isPortal||!t.urlKey||!t.customBaseUrl)return e;const s=`${t.urlKey}.${t.customBaseUrl}`,n=(0,i.TI)();return(0,i.D6)(n,`${n.scheme}://${s}`)?(0,i.Ie)(e,t.portalHostname,s):(0,i.Ie)(e,s,t.portalHostname)}var _,f;(f=_||(_={}))[f.YES=0]="YES",f[f.NO=1]="NO";const g=Object.freeze(Object.defineProperty({__proto__:null,get MarkKeep(){return _},ensureMainOnlineDomain:d,fromJSON:n,itemIdFromResourceUrl:h,prefixAndFilenameFromResourceUrl:c,read:o,toJSON:r,write:a},Symbol.toStringTag,{value:"Module"}))},91303:(e,t,s)=>{var i;s.d(t,{Y:()=>i}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(i||(i={}))},2368:(e,t,s)=>{s.d(t,{J:()=>h,j:()=>c});var i=s(43697),n=s(15923),r=(s(80442),s(22974)),o=(s(92604),s(70586)),a=s(31263),l=s(1153),u=s(52011);const h=e=>{let t=class extends e{clone(){const e=(0,o.s3)((0,l.vw)(this),"unable to clone instance of non-accessor class"),t=e.metadatas,s=e.store,i={},n=new Map;for(const e in t){const o=t[e],l=s?.originOf(e),u=o.clonable;if(o.readOnly||!1===u||l!==a.s3.USER&&l!==a.s3.DEFAULTS&&l!==a.s3.WEB_MAP&&l!==a.s3.WEB_SCENE)continue;const h=this[e];let c=null;c="function"==typeof u?u(h):"reference"===u?h:(0,r.Vo)(h),null!=h&&null==c||(l===a.s3.DEFAULTS?n.set(e,c):i[e]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(n.size){const e=(0,l.vw)(u)?.store;if(e)for(const[t,s]of n)e.set(t,s,a.s3.DEFAULTS)}return u}};return t=(0,i._)([(0,u.j)("esri.core.Clonable")],t),t};let c=class extends(h(n.Z)){};c=(0,i._)([(0,u.j)("esri.core.Clonable")],c)},3920:(e,t,s)=>{s.d(t,{p:()=>u,r:()=>h});var i=s(43697),n=s(15923),r=s(61247),o=s(5600),a=s(52011),l=s(72762);const u=e=>{let t=class extends e{constructor(){super(...arguments),this._handles=new r.Z,this._updatingHandles=new l.t}destroy(){this.destroyed||(this._handles.destroy(),this._updatingHandles.destroy())}get handles(){return this._handles}get updatingHandles(){return this._updatingHandles}};return(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"handles",null),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"updatingHandles",null),t=(0,i._)([(0,a.j)("esri.core.HandleOwner")],t),t};let h=class extends(u(n.Z)){};h=(0,i._)([(0,a.j)("esri.core.HandleOwner")],h)},13867:(e,t,s)=>{s.d(t,{Z:()=>n});var i=s(69801);class n{constructor(e,t){this._storage=new i.WJ,this._storage.maxSize=e,t&&this._storage.registerRemoveFunc("",t)}put(e,t,s){this._storage.put(e,t,s,1)}pop(e){return this._storage.pop(e)}get(e){return this._storage.get(e)}clear(){this._storage.clearAll()}destroy(){this._storage.destroy()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}}},69801:(e,t,s)=>{s.d(t,{WJ:()=>a,Xq:()=>o});var i,n,r=s(44553);(n=i||(i={}))[n.ALL=0]="ALL",n[n.SOME=1]="SOME";class o{constructor(e,t,s){this._namespace=e,this._storage=t,this._removeFunc=!1,this._hit=0,this._miss=0,this._storage.register(this),this._namespace+=":",s&&(this._storage.registerRemoveFunc(this._namespace,s),this._removeFunc=!0)}destroy(){this._storage.clear(this._namespace),this._removeFunc&&this._storage.deregisterRemoveFunc(this._namespace),this._storage.deregister(this),this._storage=null}get namespace(){return this._namespace.slice(0,-1)}get hitRate(){return this._hit/(this._hit+this._miss)}get size(){return this._storage.size}get maxSize(){return this._storage.maxSize}resetHitRate(){this._hit=this._miss=0}put(e,t,s,i=0){this._storage.put(this._namespace+e,t,s,i)}get(e){const t=this._storage.get(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}pop(e){const t=this._storage.pop(this._namespace+e);return void 0===t?++this._miss:++this._hit,t}updateSize(e,t,s){this._storage.updateSize(this._namespace+e,t,s)}clear(){this._storage.clear(this._namespace)}clearAll(){this._storage.clearAll()}getStats(){return this._storage.getStats()}resetStats(){this._storage.resetStats()}}class a{constructor(e=10485760){this._maxSize=e,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._removeFuncs=new r.Z,this._users=new r.Z}destroy(){this.clearAll(),this._removeFuncs.clear(),this._users.clear(),this._db=null}register(e){this._users.push(e)}deregister(e){this._users.removeUnordered(e)}registerRemoveFunc(e,t){this._removeFuncs.push([e,t])}deregisterRemoveFunc(e){this._removeFuncs.filterInPlace((t=>t[0]!==e))}get size(){return this._size}get sizeMB(){return this._size/1024/1024}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,0),this._checkSizeLimit()}put(e,t,s,n){const r=this._db.get(e);if(r&&(this._size-=r.size,this._db.delete(e),r.entry!==t&&this._notifyRemove(e,r.entry,i.ALL)),s>this._maxSize)return void this._notifyRemove(e,t,i.ALL);if(void 0===t)return void console.warn("Refusing to cache undefined entry ");if(!s||s<0)return void console.warn("Refusing to cache entry with invalid size "+s);const o=1+Math.max(n,-3)- -3;this._db.set(e,{entry:t,size:s,lifetime:o,lives:o}),this._size+=s,this._checkSizeLimit()}updateSize(e,t,s){const n=this._db.get(e);if(n&&n.entry===t){for(this._size-=n.size;s>this._maxSize;){const n=this._notifyRemove(e,t,i.SOME);if(!(null!=n&&n>0))return void this._db.delete(e);s=n}n.size=s,this._size+=s,this._checkSizeLimit()}}pop(e){const t=this._db.get(e);if(t)return this._size-=t.size,this._db.delete(e),++this._hit,t.entry;++this._miss}get(e){const t=this._db.get(e);if(void 0!==t)return this._db.delete(e),t.lives=t.lifetime,this._db.set(e,t),++this._hit,t.entry;++this._miss}getStats(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},s=new Array;this._db.forEach(((e,i)=>{const n=e.lifetime;s[n]=(s[n]||0)+e.size,this._users.forAll((s=>{const n=s.namespace;if(i.startsWith(n)){const s=t[n]||0;t[n]=s+e.size}}))}));const i={};this._users.forAll((e=>{const s=e.namespace;if(!isNaN(e.hitRate)&&e.hitRate>0){const n=t[s]||0;t[s]=n,i[s]=Math.round(100*e.hitRate)+"%"}else i[s]="0%"}));const n=Object.keys(t);n.sort(((e,s)=>t[s]-t[e])),n.forEach((s=>e[s]=Math.round(t[s]/2**20)+"MB / "+i[s]));for(let t=s.length-1;t>=0;--t){const i=s[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this.size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._users.forAll((e=>e.resetHitRate()))}clear(e){this._db.forEach(((t,s)=>{s.startsWith(e)&&(this._size-=t.size,this._db.delete(s),this._notifyRemove(s,t.entry,i.ALL))}))}clearAll(){this._db.forEach(((e,t)=>this._notifyRemove(t,e.entry,i.ALL))),this._size=0,this._db.clear()}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,s){let i;return this._removeFuncs.some((n=>{if(e.startsWith(n[0])){const e=n[1](t,s);return"number"==typeof e&&(i=e),!0}return!1})),i}_checkSizeLimit(){if(!(this._size<=this._maxSize))for(const[e,t]of this._db){if(this._db.delete(e),t.lives<=1){this._size-=t.size;const s=this._notifyRemove(e,t.entry,i.SOME);null!=s&&s>0&&(this._size+=s,t.lives=t.lifetime,t.size=s,this._db.set(e,t))}else--t.lives,this._db.set(e,t);if(this._size<=.9*this.maxSize)return}}}},66643:(e,t,s)=>{s.d(t,{Ed:()=>u,UI:()=>h,mt:()=>_,q6:()=>p,vr:()=>f});var i=s(43697),n=s(15923),r=s(70586),o=s(95330),a=s(5600),l=s(52011);function u(e,t,s){return(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))}async function h(e,t,s){return(await(0,o.as)(e.map(((e,i)=>t.apply(s,[e,i]))))).map((e=>e.value))}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function p(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function _(e){try{return c(await e)}catch(e){return(0,o.r9)(e),d(e)}}function f(e,t){return new g(e,t)}let g=class extends n.Z{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:s}=this._abortController;this.promise=e(s),this.promise.then((e=>{this._result=c(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,o.fu)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.hw)(this._abortHandle),this._abortController=null}};(0,i._)([(0,a.Cb)()],g.prototype,"value",null),(0,i._)([(0,a.Cb)()],g.prototype,"error",null),(0,i._)([(0,a.Cb)()],g.prototype,"finished",null),(0,i._)([(0,a.Cb)()],g.prototype,"promise",void 0),(0,i._)([(0,a.Cb)()],g.prototype,"_result",void 0),g=(0,i._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],g)},43090:(e,t,s)=>{function i(e){return 32+e.length}function n(e){if(!e)return 0;let t=l;for(const s in e)if(e.hasOwnProperty(s)){const n=e[s];switch(typeof n){case"string":t+=i(n);break;case"number":t+=16;break;case"boolean":t+=4}}return t}function r(e){if(!e)return 0;if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return 32+8*t;let s=u;for(let i=0;i<t;i++)s+=o(e[i]);return s}(e);let t=l;for(const s in e)e.hasOwnProperty(s)&&(t+=o(e[s]));return t}function o(e){switch(typeof e){case"object":return r(e);case"string":return i(e);case"number":return 16;case"boolean":return 4;default:return 8}}function a(e,t){return u+e.length*t}s.d(t,{Ul:()=>r,do:()=>a,f2:()=>n});const l=32,u=32},24133:(e,t,s)=>{s.d(t,{Q:()=>a});var i=s(67676),n=s(70586),r=s(44553),o=s(88764);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=d,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),b.prune(),w.prune(),x.prune(),E.prune()}all(e){this._all(this._data,e)}search(e,t){let s=this._data;const i=this._toBBox;if(y(e,s))for(b.clear();s;){for(let n=0,r=s.children.length;n<r;n++){const r=s.children[n],o=s.leaf?i(r):r;y(e,o)&&(s.leaf?t(r):m(e,o)?this._all(r,t):b.push(r))}s=b.pop()}}collides(e){let t=this._data;const s=this._toBBox;if(!y(e,t))return!1;for(b.clear();t;){for(let i=0,n=t.children.length;i<n;i++){const n=t.children[i],r=t.leaf?s(n):n;if(y(e,r)){if(t.leaf||m(e,r))return!0;b.push(n)}}t=b.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,s=e.length;t<s;t++)this.insert(e[t]);return this}let t=this._build(e.slice(0,e.length),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,s=this._data,r=null,o=0,a=!1;const l=this._toBBox(e);for(x.clear(),E.clear();s||x.length>0;){if(s||(s=(0,n.j0)(x.pop()),r=x.data[x.length-1],o=E.pop()??0,a=!0),s.leaf&&(t=(0,i.cq)(s.children,e,s.children.length,s.indexHint),-1!==t))return s.children.splice(t,1),x.push(s),this._condense(x),this;a||s.leaf||!m(s,l)?r?(o++,s=r.children[o],a=!1):s=null:(x.push(s),E.push(o),o=0,r=s,s=s.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_all(e,t){let s=e;for(w.clear();s;){if(!0===s.leaf)for(const e of s.children)t(e);else w.pushArray(s.children);s=w.pop()??null}}_build(e,t,s,i){const n=s-t+1;let r=this._maxEntries;if(n<=r){const i=new T(e.slice(t,s+1));return l(i,this._toBBox),i}i||(i=Math.ceil(Math.log(n)/Math.log(r)),r=Math.ceil(n/r**(i-1)));const o=new F([]);o.height=i;const a=Math.ceil(n/r),u=a*Math.ceil(Math.sqrt(r));v(e,t,s,u,this._compareMinX);for(let n=t;n<=s;n+=u){const t=Math.min(n+u-1,s);v(e,n,t,a,this._compareMinY);for(let s=n;s<=t;s+=a){const n=Math.min(s+a-1,t);o.children.push(this._build(e,s,n,i-1))}}return l(o,this._toBBox),o}_chooseSubtree(e,t,s,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==s;){let s,i=1/0,n=1/0;for(let r=0,o=t.children.length;r<o;r++){const o=t.children[r],a=p(o),l=f(e,o)-a;l<n?(n=l,i=a<i?a:i,s=o):l===n&&a<i&&(i=a,s=o)}t=s||t.children[0]}return t}_insert(e,t,s){const i=this._toBBox,n=s?e:i(e);x.clear();const r=this._chooseSubtree(n,this._data,t,x);for(r.children.push(e),h(r,n);t>=0&&x.data[t].children.length>this._maxEntries;)this._split(x,t),t--;this._adjustParentBBoxes(n,x,t)}_split(e,t){const s=e.data[t],i=s.children.length,n=this._minEntries;this._chooseSplitAxis(s,n,i);const r=this._chooseSplitIndex(s,n,i);if(!r)return void console.log(" Error: assertion failed at PooledRBush._split: no valid split index");const o=s.children.splice(r,s.children.length-r),a=s.leaf?new T(o):new F(o);a.height=s.height,l(s,this._toBBox),l(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(s,a)}_splitRoot(e,t){this._data=new F([e,t]),this._data.height=e.height+1,l(this._data,this._toBBox)}_chooseSplitIndex(e,t,s){let i,n,r;i=n=1/0;for(let o=t;o<=s-t;o++){const t=u(e,0,o,this._toBBox),a=u(e,o,s,this._toBBox),l=g(t,a),h=p(t)+p(a);l<i?(i=l,r=o,n=h<n?h:n):l===i&&h<n&&(n=h,r=o)}return r}_chooseSplitAxis(e,t,s){const i=e.leaf?this._compareMinX:c,n=e.leaf?this._compareMinY:d;this._allDistMargin(e,t,s,i)<this._allDistMargin(e,t,s,n)&&e.children.sort(i)}_allDistMargin(e,t,s,i){e.children.sort(i);const n=this._toBBox,r=u(e,0,t,n),o=u(e,s-t,s,n);let a=_(r)+_(o);for(let i=t;i<s-t;i++){const t=e.children[i];h(r,e.leaf?n(t):t),a+=_(r)}for(let i=s-t-1;i>=t;i--){const t=e.children[i];h(o,e.leaf?n(t):t),a+=_(o)}return a}_adjustParentBBoxes(e,t,s){for(let i=s;i>=0;i--)h(t.data[i],e)}_condense(e){for(let t=e.length-1;t>=0;t--){const s=e.data[t];if(0===s.children.length)if(t>0){const n=e.data[t-1],r=n.children;r.splice((0,i.cq)(r,s,r.length,n.indexHint),1)}else this.clear();else l(s,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){u(e,0,e.children.length,t,e)}function u(e,t,s,i,n){n||(n=new T([])),n.minX=1/0,n.minY=1/0,n.maxX=-1/0,n.maxY=-1/0;for(let r,o=t;o<s;o++)r=e.children[o],h(n,e.leaf?i(r):r);return n}function h(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function d(e,t){return e.minY-t.minY}function p(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function _(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const s=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),n=Math.min(e.maxX,t.maxX),r=Math.min(e.maxY,t.maxY);return Math.max(0,n-s)*Math.max(0,r-i)}function m(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function y(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function v(e,t,s,i,r){const a=[t,s];for(;a.length;){const t=(0,n.j0)(a.pop()),s=(0,n.j0)(a.pop());if(t-s<=i)continue;const l=s+Math.ceil((t-s)/i/2)*i;(0,o.q)(e,l,s,t,r),a.push(s,l,l,t)}}const b=new r.Z,w=new r.Z,x=new r.Z,E=new r.Z({deallocator:void 0});class C{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class S extends C{constructor(){super(...arguments),this.height=1,this.indexHint=new i.SO}}class T extends S{constructor(e){super(),this.children=e,this.leaf=!0}}class F extends S{constructor(e){super(),this.children=e,this.leaf=!1}}},17445:(e,t,s)=>{s.d(t,{N1:()=>d,YP:()=>l,Z_:()=>f,gx:()=>u,nn:()=>g,on:()=>c,tX:()=>m});var i=s(91460),n=s(50758),r=s(70586),o=s(95330),a=s(26258);function l(e,t,s={}){return h(e,t,s,p)}function u(e,t,s={}){return h(e,t,s,_)}function h(e,t,s={},i){let n=null;const o=s.once?(e,s)=>{i(e)&&((0,r.hw)(n),t(e,s))}:(e,s)=>{i(e)&&t(e,s)};if(n=(0,a.aQ)(e,o,s.sync,s.equals),s.initial){const t=e();o(t,t)}return n}function c(e,t,s,o={}){let a=null,u=null,h=null;function c(){a&&u&&(u.remove(),o.onListenerRemove?.(a),a=null,u=null)}function d(e){o.once&&o.once&&(0,r.hw)(h),s(e)}const p=l(e,((e,s)=>{c(),(0,i.vT)(e)&&(a=e,u=(0,i.on)(e,t,d),o.onListenerAdd?.(e))}),{sync:o.sync,initial:!0});return h=(0,n.kB)((()=>{p.remove(),c()})),h}function d(e,t){return function(e,t,s){if((0,o.Hc)(s))return Promise.reject((0,o.zE)());const i=e();if(t?.(i))return Promise.resolve(i);let a=null;function l(){a=(0,r.hw)(a)}return new Promise(((i,r)=>{a=(0,n.AL)([(0,o.fu)(s,(()=>{l(),r((0,o.zE)())})),h(e,(e=>{l(),i(e)}),{sync:!1,once:!0},t??p)])}))}(e,_,t)}function p(e){return!0}function _(e){return!!e}s(87538);const f={sync:!0},g={initial:!0},m={sync:!0,initial:!0}},72762:(e,t,s)=>{s.d(t,{t:()=>h});var i=s(43697),n=s(15923),r=s(61247),o=s(17445),a=s(1654),l=s(5600),u=s(52011);let h=class extends n.Z{constructor(){super(...arguments),this.updating=!1,this._handleId=0,this._handles=new r.Z,this._scheduleHandleId=0,this._pendingPromises=new Set}destroy(){this.removeAll(),this._handles.destroy()}add(e,t,s={}){return this._installWatch(e,t,s,o.YP)}addWhen(e,t,s={}){return this._installWatch(e,t,s,o.gx)}addOnCollectionChange(e,t,{initial:s=!1,final:i=!1}={}){const n=++this._handleId;return this._handles.add([(0,o.on)(e,"after-changes",this._createSyncUpdatingCallback(),o.Z_),(0,o.on)(e,"change",t,{onListenerAdd:s?e=>t({added:e.toArray(),removed:[]}):void 0,onListenerRemove:i?e=>t({added:[],removed:e.toArray()}):void 0})],n),{remove:()=>this._handles.remove(n)}}addPromise(e){if(null==e)return e;const t=++this._handleId;this._handles.add({remove:()=>{this._pendingPromises.delete(e)&&(0!==this._pendingPromises.size||this._handles.has(c)||this._set("updating",!1))}},t),this._pendingPromises.add(e),this._set("updating",!0);const s=()=>this._handles.remove(t);return e.then(s,s),e}removeAll(){this._pendingPromises.clear(),this._handles.removeAll(),this._set("updating",!1)}_installWatch(e,t,s={},i){const n=++this._handleId;s.sync||this._installSyncUpdatingWatch(e,n);const r=i(e,t,s);return this._handles.add(r,n),{remove:()=>this._handles.remove(n)}}_installSyncUpdatingWatch(e,t){const s=this._createSyncUpdatingCallback(),i=(0,o.YP)(e,s,{sync:!0,equals:()=>!1});return this._handles.add(i,t),i}_createSyncUpdatingCallback(){return()=>{this._handles.remove(c),++this._scheduleHandleId;const e=this._scheduleHandleId;this._get("updating")||this._set("updating",!0),this._handles.add((0,a.Os)((()=>{e===this._scheduleHandleId&&(this._set("updating",this._pendingPromises.size>0),this._handles.remove(c))})),c)}}};(0,i._)([(0,l.Cb)({readOnly:!0})],h.prototype,"updating",void 0),h=(0,i._)([(0,u.j)("esri.core.support.WatchUpdatingTracking")],h);const c=-42},35463:(e,t,s)=>{s.d(t,{JE:()=>o,Nm:()=>r,rJ:()=>a}),s(80442);const i={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8},n={milliseconds:{getter:"getMilliseconds",setter:"setMilliseconds",multiplier:1},seconds:{getter:"getSeconds",setter:"setSeconds",multiplier:1},minutes:{getter:"getMinutes",setter:"setMinutes",multiplier:1},hours:{getter:"getHours",setter:"setHours",multiplier:1},days:{getter:"getDate",setter:"setDate",multiplier:1},weeks:{getter:"getDate",setter:"setDate",multiplier:7},months:{getter:"getMonth",setter:"setMonth",multiplier:1},years:{getter:"getFullYear",setter:"setFullYear",multiplier:1},decades:{getter:"getFullYear",setter:"setFullYear",multiplier:10},centuries:{getter:"getFullYear",setter:"setFullYear",multiplier:100}};function r(e,t,s){const i=new Date(e.getTime());if(t&&s){const e=n[s],{getter:r,setter:o,multiplier:a}=e;if("months"===s){const e=function(e,t){const s=new Date(e,t+1,1);return s.setDate(0),s.getDate()}(i.getFullYear(),i.getMonth()+t);i.getDate()>e&&i.setDate(e)}i[o](i[r]()+t*a)}return i}function o(e,t){switch(t){case"milliseconds":return new Date(e.getTime());case"seconds":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds());case"minutes":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes());case"hours":return new Date(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours());case"days":return new Date(e.getFullYear(),e.getMonth(),e.getDate());case"weeks":return new Date(e.getFullYear(),e.getMonth(),e.getDate()-e.getDay());case"months":return new Date(e.getFullYear(),e.getMonth(),1);case"years":return new Date(e.getFullYear(),0,1);case"decades":return new Date(e.getFullYear()-e.getFullYear()%10,0,1);case"centuries":return new Date(e.getFullYear()-e.getFullYear()%100,0,1);default:return new Date}}function a(e,t,s){return 0===e?0:e*i[t]/i[s]}},37549:(e,t,s)=>{s.d(t,{H:()=>a});var i=s(80442),n=s(24133),r=s(24470);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new n.Q(9,(0,i.Z)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach(((s,i)=>{e[t++]=i})),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter((e=>this._idByBounds.has(e)))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,r.cS)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,s){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,s)}(this._index,e,(e=>t(this._idByBounds.get(e))))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},57191:(e,t,s)=>{s.d(t,{Z:()=>g});var i=s(20102),n=s(32448),r=s(92604),o=s(60437),a=s(24470),l=s(98732),u=s(37549),h=s(29730),c=s(70272),d=s(5428);const p={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new c.u_(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>(null==e.centroid&&(e.centroid=(0,h.Y)(new d.Z,e.geometry,t.hasZ,t.hasM)),e.centroid)};var _=s(11490);const f=(0,o.Ue)();class g{constructor(e){this.geometryInfo=e,this._boundsStore=new u.H,this._featuresById=new Map,this._markedIds=new Set,this.events=new n.Z,this.featureAdapter=p}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach((t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)})),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,s,i,n]=this.fullBounds;return{xmin:t,ymin:s,xmax:i,ymax:n,spatialReference:(0,_.S2)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged()}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const s of e){const e=this._boundsStore.get(s.objectId);e&&t((0,o.JR)(f,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach((t=>e(t)))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,(e=>{t(this._featuresById.get(e))}))}startMarkingUsedFeatures(){this._boundsStore.invalidateIndex(),this._markedIds.clear()}sweep(){let e=!1;this._featuresById.forEach(((t,s)=>{this._markedIds.has(s)||(e=!0,this._remove(t))})),this._markedIds.clear(),e&&this._emitChanged()}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void r.Z.getLogger("esri.layers.graphics.data.FeatureStore").error(new i.Z("featurestore:invalid-feature","feature id is missing",{feature:e}));const s=this._featuresById.get(t);let n;if(this._markedIds.add(t),s?(e.displayId=s.displayId,n=this._boundsStore.get(t),this._boundsStore.delete(t)):null!=this.onFeatureAdd&&this.onFeatureAdd(e),null==e.geometry||!e.geometry.coords||!e.geometry.coords.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);n=(0,l.$)(null!=n?n:(0,a.Ue)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=n&&this._boundsStore.set(t,n),this._featuresById.set(t,e)}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._markedIds.delete(t),this._boundsStore.delete(t),this._featuresById.delete(t),e}}},1231:(e,t,s)=>{s.d(t,{Z:()=>g});var i,n=s(43697),r=s(35454),o=s(96674),a=s(5600),l=s(75215),u=(s(67676),s(80442),s(36030)),h=s(71715),c=s(52011),d=s(72729),p=s(86719);const _=new r.X({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 f=i=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=-1,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?.value??null}readValueType(e,{description:t}){let s=null;try{s=t?JSON.parse(t):null}catch(e){}return s?_.fromJSON(s.fieldValueType):null}clone(){return new i({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.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.Cb)({type:String,json:{write:!0}})],f.prototype,"alias",void 0),(0,n._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],f.prototype,"defaultValue",void 0),(0,n._)([(0,a.Cb)()],f.prototype,"description",void 0),(0,n._)([(0,h.r)("description")],f.prototype,"readDescription",null),(0,n._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],f.prototype,"domain",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"editable",void 0),(0,n._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],f.prototype,"length",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],f.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],f.prototype,"nullable",void 0),(0,n._)([(0,u.J)(p.v)],f.prototype,"type",void 0),(0,n._)([(0,a.Cb)()],f.prototype,"valueType",void 0),(0,n._)([(0,h.r)("valueType",["description"])],f.prototype,"readValueType",null),(0,n._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],f.prototype,"visible",void 0),f=i=(0,n._)([(0,c.j)("esri.layers.support.Field")],f);const g=f},39450:(e,t,s)=>{s.d(t,{Z:()=>h});var i,n=s(43697),r=s(96674),o=s(5600),a=s(75215),l=(s(67676),s(80442),s(52011));let u=i=class extends r.wq{constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new i({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"cols",void 0),(0,n._)([(0,o.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"level",void 0),(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],u.prototype,"levelValue",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"origin",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"resolution",void 0),(0,n._)([(0,o.Cb)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],u.prototype,"rows",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{write:!0}})],u.prototype,"scale",void 0),u=i=(0,n._)([(0,l.j)("esri.layers.support.LOD")],u);const h=u},11145:(e,t,s)=>{s.d(t,{Z:()=>C});var i,n=s(43697),r=s(35454),o=s(96674),a=s(67900),l=s(5600),u=s(75215),h=(s(67676),s(80442),s(71715)),c=s(52011),d=s(30556),p=s(94139),_=s(82971),f=s(24470),g=s(8744),m=s(40488),y=s(39450),v=s(43077);const b=new r.X({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=i=class extends o.wq{static create(e={}){const{resolutionFactor:t=1,scales:s,size:n=256,spatialReference:r=_.Z.WebMercator,numLODs:o=24}=e;if(!(0,g.JY)(r)){const e=[];if(s)for(let t=0;t<s.length;t++){const i=s[t];e.push(new y.Z({level:t,scale:i,resolution:i}))}else{let t=5e-4;for(let s=o-1;s>=0;s--)e.unshift(new y.Z({level:s,scale:t,resolution:t})),t*=2}return new i({dpi:96,lods:e,origin:new p.Z(0,0,r),size:[n,n],spatialReference:r})}const l=(0,g.C5)(r),u=e.origin?new p.Z({x:e.origin.x,y:e.origin.y,spatialReference:r}):new p.Z(l?{x:l.origin[0],y:l.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),h=1/(39.37*(0,a.c9)(r)*96),c=[];if(s)for(let e=0;e<s.length;e++){const t=s[e],i=t*h;c.push(new y.Z({level:e,scale:t,resolution:i}))}else{let e=(0,g.sT)(r)?512/n*591657527.5917094:256/n*591657527.591555;const s=Math.ceil(o/t);c.push(new y.Z({level:0,scale:e,resolution:e*h}));for(let i=1;i<s;i++){const s=e/2**t,n=s*h;c.push(new y.Z({level:i,scale:s,resolution:n})),e=s}}return new i({dpi:96,lods:c,origin:u,size:[n,n],spatialReference:r})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.minScale=0,this.maxScale=0,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const s=(0,g.C5)(e);return e.isWrappable&&!!s&&Math.abs(s.origin[0]-t.x)<=s.dx}return!1}readOrigin(e,t){return p.Z.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,s=0;const i=[],n=this._levelToLOD={};e&&(t=-1/0,s=1/0,e.forEach((e=>{i.push(e.scale),t=e.scale>t?e.scale:t,s=e.scale<s?e.scale:s,n[e.level]=e}))),this._set("scales",i),this._set("minScale",t),this._set("maxScale",s),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const s=Math.floor(e),i=s+1;return t[s]/(t[s]/t[i])**(e-s)}scaleToZoom(e){const t=this.scales,s=t.length-1;let i=0;for(;i<s;i++){const s=t[i],n=t[i+1];if(s<=e)return i;if(n===e)return i+1;if(s>e&&n<e)return i+Math.log(s/e)/Math.log(s/n)}return i}snapScale(e,t=.95){const s=this.scaleToZoom(e);return s%Math.floor(s)>=t?this.zoomToScale(Math.ceil(s)):this.zoomToScale(Math.floor(s))}tileAt(e,t,s,i){const n=this.lodAt(e);if(!n)return null;let r,o;if("number"==typeof t)r=t,o=s;else if((0,g.fS)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,i=s;else{const e=(0,m.iV)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,i=s}const a=n.resolution*this.size[0],l=n.resolution*this.size[1];return i||(i=new v.f(null,0,0,0,(0,f.Ue)())),i.level=e,i.row=Math.floor((this.origin.y-o)/l+.001),i.col=Math.floor((r-this.origin.x)/a+.001),this.updateTileInfo(i),i}updateTileInfo(e,t=i.ExtrapolateOptions.NONE){let s=this.lodAt(e.level);if(!s&&t===i.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(s=t)}if(!s)return;const n=e.level-s.level,r=s.resolution*this.size[0]/2**n,o=s.resolution*this.size[1]/2**n;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,f.Ue)()),e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*o,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+o}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const s=this.lodAt(t.level);if(null==s)return null;const{resolution:i}=s,n=i*this.size[0],r=i*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+n,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return i.fromJSON(this.write({}))}getOrCreateCompatible(e,t){if(256===this.size[0]&&256===this.size[1])return 256===e?this:null;const s=[],n=this.lods.length;for(let e=0;e<n;e++){const i=this.lods[e],n=i.resolution*t;s.push(new y.Z({level:i.level,scale:i.scale,resolution:n}))}return new i({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:s})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let s=0;s<e.length;s++){const i=e[s];this._upsampleLevels[i.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/i.resolution:0},t=i}}};var x,E;(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,n._)([(0,l.Cb)({type:String,json:{read:b.read,write:b.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"isWrappable",null),(0,n._)([(0,l.Cb)({type:p.Z,json:{write:!0}})],w.prototype,"origin",void 0),(0,n._)([(0,h.r)("origin")],w.prototype,"readOrigin",null),(0,n._)([(0,l.Cb)({type:[y.Z],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"minScale",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"maxScale",void 0),(0,n._)([(0,l.Cb)({readOnly:!0})],w.prototype,"scales",void 0),(0,n._)([(0,l.Cb)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,n._)([(0,h.r)("size",["rows","cols"])],w.prototype,"readSize",null),(0,n._)([(0,d.c)("size",{cols:{type:u.z8},rows:{type:u.z8}})],w.prototype,"writeSize",null),(0,n._)([(0,l.Cb)({type:_.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=i=(0,n._)([(0,c.j)("esri.layers.support.TileInfo")],w),x=w||(w={}),(E=x.ExtrapolateOptions||(x.ExtrapolateOptions={}))[E.NONE=0]="NONE",E[E.POWER_OF_TWO=1]="POWER_OF_TWO";const C=w},43077:(e,t,s)=>{s.d(t,{f:()=>i});class i{constructor(e,t,s,i,n=void 0){this.id=e,this.level=t,this.row=s,this.col=i,this.extent=n}}},66677:(e,t,s)=>{s.d(t,{B5:()=>h,DR:()=>d,G:()=>v,M8:()=>f,Nm:()=>g,Qc:()=>c,XG:()=>m,a7:()=>_,ld:()=>p,wH:()=>y});var i=s(17452),n=s(25929);const r={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(r),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function h(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),s=t.path.match(a)||t.path.match(l);if(!s)return null;const[,n,o,u,h]=s,c=o.indexOf("/");return{title:p(-1!==c?o.slice(c+1):o),serverType:r[u.toLowerCase()],sublayer:null!=h&&""!==h?parseInt(h,10):null,url:{path:n}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function p(e){return(e=e.replace(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function _(e,t){const s=[];if(e){const t=c(e);null!=t&&t.title&&s.push(t.title)}if(t){const e=p(t);s.push(e)}if(2===s.length){if(s[0].toLowerCase().includes(s[1].toLowerCase()))return s[0];if(s[1].toLowerCase().includes(s[0].toLowerCase()))return s[1]}return s.join(" - ")}function f(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),s=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&s}function g(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function m(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const s=(0,i.mN)(t),n=c(s.path);let r;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(r=n.sublayer),t=n.url.path;else if(e.nonStandardUrlAllowed){const e=d(s.path);null!=e&&(t=e.serviceUrl,r=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:r}}function y(e,t,s,r,o){(0,n.w)(t,r,"url",o),r.url&&null!=e.layerId&&(r.url=(0,i.v_)(r.url,s,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),s=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),n=t.includes("/imageserver/wmsserver"),r=t.includes("/wmsserver");return s&&(i||n||r)}},72729:(e,t,s)=>{s.d(t,{im:()=>C,V5:()=>E}),s(80442);var i,n=s(43697),r=s(22974),o=s(5600),a=(s(75215),s(36030)),l=s(52011),u=s(96674);s(67676);let h=i=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new i({name:this.name,code:this.code})}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],h.prototype,"name",void 0),(0,n._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],h.prototype,"code",void 0),h=i=(0,n._)([(0,l.j)("esri.layers.support.CodedValue")],h);const c=new(s(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,n._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,n._)([(0,a.J)(c)],d.prototype,"type",void 0),d=(0,n._)([(0,l.j)("esri.layers.support.Domain")],d);const p=d;var _;let f=_=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const s=String(e);this.codedValues.some((e=>(String(e.code)===s&&(t=e.name),!!t)))}return t}clone(){return new _({codedValues:(0,r.d9)(this.codedValues),name:this.name})}};(0,n._)([(0,o.Cb)({type:[h],json:{write:!0}})],f.prototype,"codedValues",void 0),(0,n._)([(0,a.J)({codedValue:"coded-value"})],f.prototype,"type",void 0),f=_=(0,n._)([(0,l.j)("esri.layers.support.CodedValueDomain")],f);const g=f;var m;s(92604),s(20102);let y=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,n._)([(0,a.J)({inherited:"inherited"})],y.prototype,"type",void 0),y=m=(0,n._)([(0,l.j)("esri.layers.support.InheritedDomain")],y);const v=y;var b;let w=b=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new b({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,n._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,s){t[s]=[this.minValue||0,e]}}}})],w.prototype,"maxValue",void 0),(0,n._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range&&t.range[0]},write:{target:"range",writer(e,t,s){t[s]=[e,this.maxValue||0]}}}})],w.prototype,"minValue",void 0),(0,n._)([(0,a.J)({range:"range"})],w.prototype,"type",void 0),w=b=(0,n._)([(0,l.j)("esri.layers.support.RangeDomain")],w);const x=w,E={key:"type",base:p,typeMap:{range:w,"coded-value":g,inherited:v}};function C(e){if(!e||!e.type)return null;switch(e.type){case"range":return x.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return v.fromJSON(e)}return null}},86719:(e,t,s)=>{s.d(t,{v:()=>i});const i=new(s(35454).X)({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"})},99282:(e,t,s)=>{s.d(t,{a:()=>r});var i=s(67900),n=s(68441);const r={unknown:1,inches:(0,i.En)(1,"meters","inches"),feet:(0,i.En)(1,"meters","feet"),"us-feet":(0,i.En)(1,"meters","us-feet"),yards:(0,i.En)(1,"meters","yards"),miles:(0,i.En)(1,"meters","miles"),"nautical-miles":(0,i.En)(1,"meters","nautical-miles"),millimeters:(0,i.En)(1,"meters","millimeters"),centimeters:(0,i.En)(1,"meters","centimeters"),decimeters:(0,i.En)(1,"meters","decimeters"),meters:(0,i.En)(1,"meters","meters"),kilometers:(0,i.En)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.ty)(1,"meters",n.sv.radius)}},28694:(e,t,s)=>{s.d(t,{p:()=>n});var i=s(69285);function n(e,t,s){if(!s||!s.features||!s.hasZ)return;const n=(0,i.k)(s.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of s.features)n(e.geometry)}},86787:(e,t,s)=>{s.d(t,{Z:()=>b});var i,n=s(43697),r=s(35454),o=s(96674),a=s(70586),l=s(5600),u=(s(75215),s(67676),s(80442),s(71715)),h=s(52011),c=s(30556),d=s(35671);let p=i=class extends o.wq{constructor(e){super(e)}async collectRequiredFields(e,t){return(0,d.io)(e,t,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"expression",void 0),(0,n._)([(0,l.Cb)({type:String,json:{write:!0}})],p.prototype,"title",void 0),p=i=(0,n._)([(0,h.j)("esri.layers.support.FeatureExpressionInfo")],p);const _=p;var f,g=s(12541);const m=(0,r.w)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),y=new r.X({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let v=f=class extends o.wq{constructor(e){super(e),this.offset=null}readFeatureExpressionInfo(e,t){return null!=e?e:t.featureExpression&&0===t.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,t,s,i){t[s]=e.write({},i),"0"===e.expression&&(t.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:t}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||t?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,t){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,t):null}clone(){return new f({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,a._W)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.Cb)({type:_,json:{write:!0}})],v.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,u.r)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],v.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,c.c)("featureExpressionInfo",{featureExpressionInfo:{type:_},"featureExpression.value":{type:[0]}})],v.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.Cb)({type:m.apiValues,nonNullable:!0,json:{type:m.jsonValues,read:m.read,write:{writer:m.write,isRequired:!0}}})],v.prototype,"mode",null),(0,n._)([(0,l.Cb)({type:Number,json:{write:!0}})],v.prototype,"offset",void 0),(0,n._)([(0,l.Cb)({type:g.f9,json:{type:String,read:y.read,write:y.write}})],v.prototype,"unit",null),v=f=(0,n._)([(0,h.j)("esri.layers.support.ElevationInfo")],v);const b=v},12541:(e,t,s)=>{s.d(t,{Z7:()=>n,f9:()=>r});var i=s(99282);function n(e){return 1/(i.a[e]||1)}const r=function(){const e=Object.keys(i.a);return e.sort(),e}()},65967:(e,t,s)=>{s.r(t),s.d(t,{default:()=>we});var i=s(43697),n=s(32448),r=s(61247),o=s(95330),a=s(17445),l=s(5600),u=(s(75215),s(67676)),h=(s(80442),s(52011)),c=s(72762),d=s(82971),p=s(57191),_=s(4136),f=s(11145),g=s(14165),m=s(86787),y=s(13867),v=s(30175),b=s(67900),w=s(12541);function x(e=!1,t){if(e){const{elevationInfo:e,alignPointsInFeatures:s,spatialReference:i}=t;return new C(e,s,i)}return new E}class E{async alignCandidates(e,t){return e}notifyElevationSourceChange(){}}class C{constructor(e,t,s){this._elevationInfo=e,this._alignPointsInFeatures=t,this.spatialReference=s,this._alignmentsCache=new y.Z(1024),this._cacheVersion=0,this._metersPerVerticalUnit=(0,b._R)(s)}async alignCandidates(e,t){const s=this._elevationInfo;return null==s||"absolute-height"!==s.mode||s.featureExpressionInfo?this._alignComputedElevationCandidates(e,t):(this._alignAbsoluteElevationCandidates(e,s),e)}notifyElevationSourceChange(){this._alignmentsCache.clear(),this._cacheVersion++}_alignAbsoluteElevationCandidates(e,t){const{offset:s,unit:i}=t;if(null==s)return;const n=s*((0,w.Z7)(i??"meters")/this._metersPerVerticalUnit);for(const t of e)switch(t.type){case"edge":t.start.z+=n,t.end.z+=n;continue;case"vertex":t.target.z+=n;continue}}async _alignComputedElevationCandidates(e,t){const s=new Map;for(const t of e)(0,v.s1)(s,t.objectId,F).push(t);const[i,n,r]=this._prepareQuery(s),a=await this._alignPointsInFeatures(i,t);if((0,o.k_)(t),r!==this._cacheVersion)return this._alignComputedElevationCandidates(e,t);this._applyCacheAndResponse(i,a,n);const{drapedObjectIds:l,failedObjectIds:u}=a,h=[];for(const t of e){const{objectId:e}=t;l.has(e)&&"edge"===t.type&&(t.draped=!0),u.has(e)||h.push(t)}return h}_prepareQuery(e){const t=[],s=[];for(const[i,n]of e){const e=[];for(const t of n)this._addToQueriesOrCachedResult(i,t.target,e,s),"edge"===t.type&&(this._addToQueriesOrCachedResult(i,t.start,e,s),this._addToQueriesOrCachedResult(i,t.end,e,s));0!==e.length&&t.push({objectId:i,points:e})}return[t,s,this._cacheVersion]}_addToQueriesOrCachedResult(e,t,s,i){const n=T(e,t),r=this._alignmentsCache.get(n);null==r?s.push(t):i.push(new S(t,r))}_applyCacheAndResponse(e,{elevations:t,drapedObjectIds:s,failedObjectIds:i},n){for(const e of n)e.apply();let r=0;const o=this._alignmentsCache;for(const{objectId:n,points:a}of e){if(i.has(n)){r+=a.length;continue}const e=!s.has(n);for(const s of a){const i=T(n,s),a=t[r++];s.z=a,e&&o.put(i,a,1)}}}}class S{constructor(e,t){this.point=e,this.z=t}apply(){this.point.z=this.z}}function T(e,{x:t,y:s,z:i}){return`${e}-${t}-${s}-${i??0}}`}function F(){return[]}class I{filter(e,t){return t}notifyElevationSourceChange(){}}class O{filter(e,t){const{point:s,distance:i}=e,{z:n}=s;if(null==n)return t;if(0===t.length)return t;const r=function(e){return"number"==typeof e?{x:e,y:e,z:e}:e}(i),o=this._updateCandidatesTo3D(t,s,r).filter(M);return o.sort(B),o}_updateCandidatesTo3D(e,t,s){for(const i of e)switch(i.type){case"edge":z(i,t,s);continue;case"vertex":A(i,t,s);continue}return e}}function M(e){return e.distance<=1}function R(e=!1){return e?new O:new I}function z(e,t,{x:s,y:i,z:n}){const{start:r,end:o,target:a}=e;e.draped||function(e,t,s,i){const n=i.x-s.x,r=i.y-s.y,o=i.z-s.z,a=n*n+r*r+o*o,l=(t.x-s.x)*n+(t.y-s.y)*r+o*(t.z-s.z),u=Math.min(1,Math.max(0,l/a)),h=s.x+n*u,c=s.y+r*u,d=s.z+o*u;e.x=h,e.y=c,e.z=d}(a,t,r,o);const l=(t.x-a.x)/s,u=(t.y-a.y)/i,h=(t.z-a.z)/n;e.distance=Math.sqrt(l*l+u*u+h*h)}function A(e,t,{x:s,y:i,z:n}){const{target:r}=e,o=(t.x-r.x)/s,a=(t.y-r.y)/i,l=(t.z-r.z)/n,u=Math.sqrt(o*o+a*a+l*l);e.distance=u}function B(e,t){return e.distance-t.distance}var j=s(22974),D=s(19153);function P(e=!1,t){return e?new H(t):new N}class N{async fetch(){return[]}notifySymbologyChange(){}}class H{constructor(e){this._getSymbologyCandidates=e,this._candidatesCache=new y.Z(1024),this._cacheVersion=0}async fetch(e,t){if(0===e.length)return[];const s=[],i=[],n=this._candidatesCache;for(const t of e){const e=U(t),r=n.get(e);if(r)for(const e of r)i.push((0,j.d9)(e));else s.push(t),n.put(e,[],1)}if(0===s.length)return i;const r=this._cacheVersion,{candidates:a,sourceCandidateIndices:l}=await this._getSymbologyCandidates(s,t);if((0,o.k_)(t),r!==this._cacheVersion)return this.fetch(e,t);const u=[],{length:h}=a;for(let e=0;e<h;++e){const t=a[e],i=U(s[l[e]]),r=n.get(i);r.push(t),n.put(i,r,r.length),u.push((0,j.d9)(t))}return i.concat(u)}notifySymbologyChange(){this._candidatesCache.clear(),this._cacheVersion++}}function U(e){switch(e.type){case"vertex":{const{objectId:t,target:s}=e,i=`${t}-vertex-${s.x}-${s.y}-${s.z??0}`;return(0,D.hP)(i).toString()}case"edge":{const{objectId:t,start:s,end:i}=e,n=`${t}-edge-${s.x}-${s.y}-${s.z??0}-to-${i.x}-${i.y}-${i.z??0}`;return(0,D.hP)(n).toString()}default:return""}}var k=s(15923);let Y=class extends k.Z{constructor(){super(...arguments),this.updating=!1,this._pending=[]}push(e,t){this._pending.push({promise:e,callback:t}),1===this._pending.length&&this._process()}_process(){if(!this._pending.length)return void(this.updating=!1);this.updating=!0;const e=this._pending[0];e.promise.then((t=>e.callback(t))).catch((()=>{})).then((()=>{this._pending.shift(),this._process()}))}};(0,i._)([(0,l.Cb)()],Y.prototype,"updating",void 0),Y=(0,i._)([(0,h.j)("esri.core.AsyncSequence")],Y);var Z,L=s(66643),V=s(3920),X=s(50758),q=s(92604),J=s(6570),G=s(24470),W=s(98732),$=s(66677),Q=s(78760),K=s(34599);class ee{constructor(e,t){this.data=e,this.resolution=t,this.state={type:Z.CREATED},this.alive=!0}process(e){switch(this.state.type){case Z.CREATED:return this.state=this._gotoFetchCount(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Z.FETCH_COUNT:break;case Z.FETCHED_COUNT:return this.state=this._gotoFetchFeatures(this.state,e),this.state.task.promise.then(e.resume,e.resume);case Z.FETCH_FEATURES:break;case Z.FETCHED_FEATURES:this.state=this._goToDone(this.state,e);case Z.DONE:}return null}get debugInfo(){return{data:this.data,featureCount:this._featureCount,state:this._stateToString}}get _featureCount(){switch(this.state.type){case Z.CREATED:case Z.FETCH_COUNT:return 0;case Z.FETCHED_COUNT:return this.state.featureCount;case Z.FETCH_FEATURES:return this.state.previous.featureCount;case Z.FETCHED_FEATURES:return this.state.features.length;case Z.DONE:return this.state.previous.features.length}}get _stateToString(){switch(this.state.type){case Z.CREATED:return"created";case Z.FETCH_COUNT:return"fetch-count";case Z.FETCHED_COUNT:return"fetched-count";case Z.FETCH_FEATURES:return"fetch-features";case Z.FETCHED_FEATURES:return"fetched-features";case Z.DONE:return"done"}}_gotoFetchCount(e,t){return{type:Z.FETCH_COUNT,previous:e,task:(0,L.vr)((async e=>{const s=await(0,L.mt)(t.fetchCount(this,e));this.state.type===Z.FETCH_COUNT&&(this.state=this._gotoFetchedCount(this.state,s.ok?s.value:1/0))}))}}_gotoFetchedCount(e,t){return{type:Z.FETCHED_COUNT,featureCount:t,previous:e}}_gotoFetchFeatures(e,t){return{type:Z.FETCH_FEATURES,previous:e,task:(0,L.vr)((async s=>{const i=await(0,L.mt)(t.fetchFeatures(this,e.featureCount,s));this.state.type===Z.FETCH_FEATURES&&(this.state=this._gotoFetchedFeatures(this.state,i.ok?i.value:[]))}))}}_gotoFetchedFeatures(e,t){return{type:Z.FETCHED_FEATURES,previous:e,features:t}}_goToDone(e,t){return t.finish(this,e.features),{type:Z.DONE,previous:e}}reset(){const e=this.state;switch(this.state={type:Z.CREATED},e.type){case Z.CREATED:case Z.FETCHED_COUNT:case Z.FETCHED_FEATURES:case Z.DONE:break;case Z.FETCH_COUNT:case Z.FETCH_FEATURES:e.task.abort()}}intersects(e){return null==e||!this.data.extent||((0,G.oJ)(e,te),(0,G.kK)(this.data.extent,te))}}!function(e){e[e.CREATED=0]="CREATED",e[e.FETCH_COUNT=1]="FETCH_COUNT",e[e.FETCHED_COUNT=2]="FETCHED_COUNT",e[e.FETCH_FEATURES=3]="FETCH_FEATURES",e[e.FETCHED_FEATURES=4]="FETCHED_FEATURES",e[e.DONE=5]="DONE"}(Z||(Z={}));const te=(0,G.Ue)();let se=class extends V.r{get _minimumVerticesPerFeature(){switch(this.store?.featureStore.geometryType){case"esriGeometryPoint":case"esriGeometryMultipoint":return 1;case"esriGeometryPolygon":return 4;case"esriGeometryPolyline":return 2}}set filter(e){const t=this._get("filter"),s=this._filterProperties(e);JSON.stringify(t)!==JSON.stringify(s)&&this._set("filter",s)}set customParameters(e){const t=this._get("customParameters");JSON.stringify(t)!==JSON.stringify(e)&&this._set("customParameters",e)}get _configuration(){return{filter:this.filter,customParameters:this.customParameters,tileInfo:this.tileInfo,tileSize:this.tileSize}}set tileInfo(e){const t=this._get("tileInfo");t!==e&&(null!=e&&null!=t&&JSON.stringify(e)===JSON.stringify(t)||(this._set("tileInfo",e),this.store.tileInfo=e))}set tileSize(e){this._get("tileSize")!==e&&this._set("tileSize",e)}get updating(){return this.updatingExcludingEdits||this._pendingEdits.updating}get updatingExcludingEdits(){return this.updatingHandles.updating}get hasZ(){return this.store.featureStore.hasZ}constructor(e){super(e),this.tilesOfInterest=[],this.availability=0,this._pendingTiles=new Map,this._pendingEdits=new Y,this._pendingEditsAbortController=new AbortController}initialize(){this._initializeFetchExtent(),this.updatingHandles.add((()=>this._configuration),(()=>this.refresh())),this.updatingHandles.add((()=>this.tilesOfInterest),((e,t)=>{(0,u.fS)(e,t,(({id:e},{id:t})=>e===t))||this._process()}),a.Z_)}destroy(){this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._pendingTiles.clear(),this.store.destroy(),this.tilesOfInterest.length=0,this._pendingEditsAbortController.abort(),this._pendingEditsAbortController=null}refresh(){this.store.refresh(),this._pendingTiles.forEach((e=>this._deletePendingTile(e))),this._process()}applyEdits(e){this._pendingEdits.push(e,(async e=>{if(0===e.addedFeatures.length&&0===e.updatedFeatures.length&&0===e.deletedFeatures.length)return;for(const[,e]of this._pendingTiles)e.reset();const t={...e,deletedFeatures:e.deletedFeatures.map((({objectId:e,globalId:t})=>e&&-1!==e?e:this._lookupObjectIdByGlobalId(t)))};await this.updatingHandles.addPromise(this.store.processEdits(t,((e,t)=>this._queryFeaturesById(e,t)),this._pendingEditsAbortController.signal)),this._processPendingTiles()}))}_initializeFetchExtent(){if(!this.capabilities.query.supportsExtent||!(0,$.M8)(this.url))return;const e=(0,L.vr)((async e=>{try{const t=await(0,K.Vr)(this.url,new g.Z({where:"1=1",outSpatialReference:this.spatialReference,cacheHint:this.capabilities.query.supportsCacheHint??void 0}),{query:this._configuration.customParameters,signal:e});this.store.extent=J.Z.fromJSON(t.data?.extent)}catch(e){(0,o.r9)(e),q.Z.getLogger(this.declaredClass).warn("Failed to fetch data extent",e)}}));this.updatingHandles.addPromise(e.promise.then((()=>this._process()))),this.handles.add((0,X.kB)((()=>e.abort())))}get debugInfo(){return{numberOfFeatures:this.store.featureStore.numFeatures,tilesOfInterest:this.tilesOfInterest,pendingTiles:Array.from(this._pendingTiles.values()).map((e=>e.debugInfo)),storedTiles:this.store.debugInfo}}_process(){this._markTilesNotAlive(),this._createPendingTiles(),this._deletePendingTiles(),this._processPendingTiles()}_markTilesNotAlive(){for(const[,e]of this._pendingTiles)e.alive=!1}_createPendingTiles(){const e=this._collectMissingTilesInfo();if(this._setAvailability(null==e?1:e.coveredArea/e.fullArea),null!=e)for(const{data:t,resolution:s}of e.missingTiles){const e=this._pendingTiles.get(t.id);e?(e.resolution=s,e.alive=!0):this._createPendingTile(t,s)}}_collectMissingTilesInfo(){let e=null;for(let t=this.tilesOfInterest.length-1;t>=0;t--){const s=this.tilesOfInterest[t],i=this.store.process(s,((e,t)=>this._verifyTileComplexity(e,t)));null==e?e=i:e.prepend(i)}return e}_deletePendingTiles(){for(const[,e]of this._pendingTiles)e.alive||this._deletePendingTile(e)}_processPendingTiles(){const e={fetchCount:(e,t)=>this._fetchCount(e,t),fetchFeatures:(e,t,s)=>this._fetchFeatures(e,t,s),finish:(e,t)=>this._finishPendingTile(e,t),resume:()=>this._processPendingTiles()};if(this._ensureFetchAllCounts(e))for(const[,t]of this._pendingTiles)this._verifyTileComplexity(this.store.getFeatureCount(t.data),t.resolution)&&this.updatingHandles.addPromise(t.process(e))}_verifyTileComplexity(e,t){return this._verifyVertexComplexity(e)&&this._verifyFeatureDensity(e,t)}_verifyVertexComplexity(e){return e*this._minimumVerticesPerFeature<re}_verifyFeatureDensity(e,t){if(null==this.tileInfo)return!1;const s=this.tileSize*t;return e*(oe/(s*s))<ae}_ensureFetchAllCounts(e){let t=!0;for(const[,s]of this._pendingTiles)s.state.type<Z.FETCHED_COUNT&&this.updatingHandles.addPromise(s.process(e)),s.state.type<=Z.FETCH_COUNT&&(t=!1);return t}_finishPendingTile(e,t){this.store.add(e.data,t),this._deletePendingTile(e),this._updateAvailability()}_updateAvailability(){const e=this._collectMissingTilesInfo();this._setAvailability(null==e?1:e.coveredArea/e.fullArea)}_setAvailability(e){this._set("availability",e)}_createPendingTile(e,t){const s=new ee(e,t);return this._pendingTiles.set(e.id,s),s}_deletePendingTile(e){e.reset(),this._pendingTiles.delete(e.data.id)}async _fetchCount(e,t){return this.store.fetchCount(e.data,this.url,this._createCountQuery(e),{query:this.customParameters,timeout:ne,signal:t})}async _fetchFeatures(e,t,s){let i=0;const n=[];let r=0,o=t;for(;;){const a=this._createFeaturesQuery(e),l=this._setPagingParameters(a,i,o),{features:u,exceededTransferLimit:h}=await this._queryFeatures(a,s);l&&(i+=a.num),r+=u.length;for(const e of u)n.push(e);if(o=t-r,!l||!h||o<=0)return n}}_filterProperties(e){return null==e?{where:"1=1",gdbVersion:void 0,timeExtent:void 0}:{where:e.where||"1=1",timeExtent:e.timeExtent,gdbVersion:e.gdbVersion}}_lookupObjectIdByGlobalId(e){const t=this.globalIdField,s=this.objectIdField;if(null==t)throw new Error("Expected globalIdField to be defined");let i=null;if(this.store.featureStore.forEach((n=>{e===n.attributes[t]&&(i=n.objectId??n.attributes[s])})),null==i)throw new Error(`Expected to find a feature with globalId ${e}`);return i}_queryFeaturesById(e,t){const s=this._createFeaturesQuery();return s.objectIds=e,this._queryFeatures(s,t)}_queryFeatures(e,t){return this.capabilities.query.supportsFormatPBF?this._queryFeaturesPBF(e,t):this._queryFeaturesJSON(e,t)}async _queryFeaturesPBF(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.qp)(this.url,e,new Q.J({sourceSpatialReference:s}),{query:this._configuration.customParameters,timeout:ne,signal:t});return(0,W.lM)(i)}async _queryFeaturesJSON(e,t){const{sourceSpatialReference:s}=this,{data:i}=await(0,K.JT)(this.url,e,s,{query:this._configuration.customParameters,timeout:ne,signal:t});return(0,W.h_)(i,this.objectIdField)}_createCountQuery(e){const t=this._createBaseQuery(e);return this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0),t}_createFeaturesQuery(e=null){const t=this._createBaseQuery(e);return t.outFields=this.globalIdField?[this.globalIdField,this.objectIdField]:[this.objectIdField],t.returnGeometry=!0,null!=e&&(this.capabilities.query.supportsResultType?t.resultType="tile":this.capabilities.query.supportsCacheHint&&(t.cacheHint=!0)),t}_createBaseQuery(e){const t=new g.Z({returnZ:this.hasZ,returnM:!1,geometry:null!=this.tileInfo&&null!=e?(0,G.HH)(e.data.extent,this.tileInfo.spatialReference):void 0}),s=this._configuration.filter;return null!=s&&(t.where=s.where,t.gdbVersion=s.gdbVersion,t.timeExtent=s.timeExtent),t.outSpatialReference=this.spatialReference,t}_setPagingParameters(e,t,s){if(!this.capabilities.query.supportsPagination)return!1;const{supportsMaxRecordCountFactor:i,supportsCacheHint:n,tileMaxRecordCount:r,maxRecordCount:o,supportsResultType:a}=this.capabilities.query,l=i?g.Z.MAX_MAX_RECORD_COUNT_FACTOR:1,u=l*((a||n)&&r?r:o||ie);return e.start=t,i?(e.maxRecordCountFactor=Math.min(l,Math.ceil(s/u)),e.num=Math.min(s,e.maxRecordCountFactor*u)):e.num=Math.min(s,u),!0}};(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"url",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"objectIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"globalIdField",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"capabilities",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"sourceSpatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({constructOnly:!0})],se.prototype,"store",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_minimumVerticesPerFeature",null),(0,i._)([(0,l.Cb)()],se.prototype,"filter",null),(0,i._)([(0,l.Cb)()],se.prototype,"customParameters",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"_configuration",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileInfo",null),(0,i._)([(0,l.Cb)()],se.prototype,"tileSize",null),(0,i._)([(0,l.Cb)()],se.prototype,"tilesOfInterest",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)({readOnly:!0})],se.prototype,"availability",void 0),(0,i._)([(0,l.Cb)()],se.prototype,"hasZ",null),se=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTiledFetcher")],se);const ie=2e3,ne=6e5,re=1e6,oe=25,ae=1;var le=s(43090),ue=s(91303),he=s(37549),ce=s(43077);class de{constructor(){this._store=new Map,this._byteSize=0}set(e,t){this.delete(e),this._store.set(e,t),this._byteSize+=t.byteSize}delete(e){const t=this._store.get(e);return!!this._store.delete(e)&&(null!=t&&(this._byteSize-=t.byteSize),!0)}get(e){return this._used(e),this._store.get(e)}has(e){return this._used(e),this._store.has(e)}clear(){this._store.clear()}applyByteSizeLimit(e,t){for(const[s,i]of this._store){if(this._byteSize<=e)break;this.delete(s),t(i)}}values(){return this._store.values()}[Symbol.iterator](){return this._store[Symbol.iterator]()}_used(e){const t=this._store.get(e);t&&(this._store.delete(e),this._store.set(e,t))}}let pe=class extends k.Z{constructor(e){super(e),this.tileInfo=null,this.extent=null,this.maximumByteSize=10*ue.Y.MEGABYTES,this._tileBounds=new he.H,this._tiles=new de,this._refCounts=new Map,this._tileFeatureCounts=new Map,this._tmpBoundingRect=(0,G.Ue)()}add(e,t){const s=[];for(const e of t)this._referenceFeature(e.objectId)===ve.ADDED&&s.push(e);this._addTileStorage(e,new Set(t.map((e=>e.objectId))),function(e){return e.reduce(((e,t)=>e+function(e){return 32+function(e){if(null==e)return 0;const t=(0,le.do)(e.lengths,4);return 32+(0,le.do)(e.coords,8)+t}(e.geometry)+(0,le.f2)(e.attributes)}(t)),0)}(t)),this.featureStore.addMany(s),this._tiles.applyByteSizeLimit(this.maximumByteSize,(e=>this._removeTileStorage(e)))}destroy(){this.clear(),this._tileFeatureCounts.clear()}clear(){this.featureStore.clear(),this._tileBounds.clear(),this._tiles.clear(),this._refCounts.clear()}refresh(){this.clear(),this._tileFeatureCounts.clear()}processEdits(e,t,s){return this._processEditsDelete(e.deletedFeatures.concat(e.updatedFeatures)),this._processEditsRefetch(e.addedFeatures.concat(e.updatedFeatures),t,s)}_addTileStorage(e,t,s){const i=e.id;this._tiles.set(i,new _e(e,t,s)),this._tileBounds.set(i,e.extent),this._tileFeatureCounts.set(i,t.size)}_remove({id:e}){const t=this._tiles.get(e);t&&this._removeTileStorage(t)}_removeTileStorage(e){const t=[];for(const s of e.objectIds)this._unreferenceFeature(s)===ve.REMOVED&&t.push(s);this.featureStore.removeManyById(t);const s=e.data.id;this._tiles.delete(s),this._tileBounds.delete(s)}_processEditsDelete(e){this.featureStore.removeManyById(e);for(const[,t]of this._tiles){for(const s of e)t.objectIds.delete(s);this._tileFeatureCounts.set(t.data.id,t.objectIds.size)}for(const t of e)this._refCounts.delete(t)}async _processEditsRefetch(e,t,s){const i=(await t(e,s)).features,{hasZ:n,hasM:r}=this.featureStore;for(const e of i){const t=(0,W.$)(this._tmpBoundingRect,e.geometry,n,r);null!=t&&this._tileBounds.forEachInBounds(t,(t=>{const s=this._tiles.get(t);this.featureStore.add(e);const i=e.objectId;s.objectIds.has(i)||(s.objectIds.add(i),this._referenceFeature(i),this._tileFeatureCounts.set(s.data.id,s.objectIds.size))}))}}process(e,t=(()=>!0)){if(null==this.tileInfo||!e.extent||null!=this.extent&&!(0,G.kK)((0,G.oJ)(this.extent,this._tmpBoundingRect),e.extent))return new ge(e);if(this._tiles.has(e.id))return new ge(e);const s=this._createTileTree(e,this.tileInfo);return this._simplify(s,t,null,0,1),this._collectMissingTiles(e,s,this.tileInfo)}get debugInfo(){return Array.from(this._tiles.values()).map((({data:e})=>({data:e,featureCount:this._tileFeatureCounts.get(e.id)||0})))}getFeatureCount(e){return this._tileFeatureCounts.get(e.id)??0}async fetchCount(e,t,s,i){const n=this._tileFeatureCounts.get(e.id);if(null!=n)return n;const r=await(0,K.hH)(t,s,i);return this._tileFeatureCounts.set(e.id,r.data.count),r.data.count}_createTileTree(e,t){const s=new fe(e.level,e.row,e.col);return t.updateTileInfo(s,f.Z.ExtrapolateOptions.POWER_OF_TWO),this._tileBounds.forEachInBounds(e.extent,(i=>{const n=this._tiles.get(i)?.data;n&&this._tilesAreRelated(e,n)&&this._populateChildren(s,n,t,this._tileFeatureCounts.get(n.id)||0)})),s}_tilesAreRelated(e,t){if(!e||!t)return!1;if(e.level===t.level)return e.row===t.row&&e.col===t.col;const s=e.level<t.level,i=s?e:t,n=s?t:e,r=1<<n.level-i.level;return Math.floor(n.row/r)===i.row&&Math.floor(n.col/r)===i.col}_populateChildren(e,t,s,i){const n=t.level-e.level-1;if(n<0)return void(e.isLeaf=!0);const r=t.row>>n,o=t.col>>n,a=e.row<<1,l=o-(e.col<<1)+(r-a<<1),u=e.children[l];if(null!=u)this._populateChildren(u,t,s,i);else{const n=new fe(e.level+1,r,o);s.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),e.children[l]=n,this._populateChildren(n,t,s,i)}}_simplify(e,t,s,i,n){const r=n*n;if(e.isLeaf)return t(this.getFeatureCount(e),n)?0:(this._remove(e),null!=s&&(s.children[i]=null),r);const o=n/2,a=o*o;let l=0;for(let s=0;s<e.children.length;s++){const i=e.children[s];l+=null!=i?this._simplify(i,t,e,s,o):a}return 0===l?this._mergeChildren(e):1-l/r<ye&&(this._purge(e),null!=s&&(s.children[i]=null),l=r),l}_mergeChildren(e){const t=new Set;let s=0;this._forEachLeaf(e,(e=>{const i=this._tiles.get(e.id);if(i){s+=i.byteSize;for(const e of i.objectIds)t.has(e)||(t.add(e),this._referenceFeature(e));this._remove(e)}})),this._addTileStorage(e,t,s),e.isLeaf=!0,e.children[0]=e.children[1]=e.children[2]=e.children[3]=null,this._tileFeatureCounts.set(e.id,t.size)}_forEachLeaf(e,t){for(const s of e.children)null!=s&&(s.isLeaf?t(s):this._forEachLeaf(s,t))}_purge(e){if(null!=e)if(e.isLeaf)this._remove(e);else for(let t=0;t<e.children.length;t++){const s=e.children[t];this._purge(s),e.children[t]=null}}_collectMissingTiles(e,t,s){const i=new me(s,e,this.extent);return this._collectMissingTilesRecurse(t,i,1),i.info}_collectMissingTilesRecurse(e,t,s){if(e.isLeaf)return;if(!e.hasChildren)return void t.addMissing(e.level,e.row,e.col,s);const i=s/2;for(let s=0;s<e.children.length;s++){const n=e.children[s];null==n?t.addMissing(e.level+1,(e.row<<1)+((2&s)>>1),(e.col<<1)+(1&s),i):this._collectMissingTilesRecurse(n,t,i)}}_referenceFeature(e){const t=(this._refCounts.get(e)||0)+1;return this._refCounts.set(e,t),1===t?ve.ADDED:ve.UNCHANGED}_unreferenceFeature(e){const t=(this._refCounts.get(e)||0)-1;return 0===t?(this._refCounts.delete(e),ve.REMOVED):(t>0&&this._refCounts.set(e,t),ve.UNCHANGED)}get test(){return{tiles:Array.from(this._tiles.values()).map((e=>`${e.data.id}:[${Array.from(e.objectIds)}]`)),featureReferences:Array.from(this._refCounts.keys()).map((e=>`${e}:${this._refCounts.get(e)}`))}}};(0,i._)([(0,l.Cb)({constructOnly:!0})],pe.prototype,"featureStore",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"tileInfo",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"extent",void 0),(0,i._)([(0,l.Cb)()],pe.prototype,"maximumByteSize",void 0),pe=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceTileStore")],pe);class _e{constructor(e,t,s){this.data=e,this.objectIds=t,this.byteSize=s}}class fe{constructor(e,t,s){this.level=e,this.row=t,this.col=s,this.isLeaf=!1,this.extent=null,this.children=[null,null,null,null]}get hasChildren(){return!this.isLeaf&&(null!=this.children[0]||null!=this.children[1]||null!=this.children[2]||null!=this.children[3])}}class ge{constructor(e,t=[]){this.missingTiles=t,this.fullArea=0,this.coveredArea=0,this.fullArea=(0,G.SO)(e.extent),this.coveredArea=this.fullArea}prepend(e){this.missingTiles=e.missingTiles.concat(this.missingTiles),this.coveredArea+=e.coveredArea,this.fullArea+=e.fullArea}}class me{constructor(e,t,s){this._tileInfo=e,this._extent=null,this.info=new ge(t),null!=s&&(this._extent=(0,G.oJ)(s))}addMissing(e,t,s,i){const n=new ce.f(null,e,t,s);this._tileInfo.updateTileInfo(n,f.Z.ExtrapolateOptions.POWER_OF_TWO),null==n.extent||null!=this._extent&&!(0,G.kK)(this._extent,n.extent)||(this.info.missingTiles.push({data:n,resolution:i}),this.info.coveredArea-=(0,G.SO)(n.extent))}}const ye=.18751;var ve;!function(e){e[e.ADDED=0]="ADDED",e[e.REMOVED=1]="REMOVED",e[e.UNCHANGED=2]="UNCHANGED"}(ve||(ve={}));let be=class extends n.Z.EventedAccessor{constructor(){super(...arguments),this._isInitializing=!0,this.remoteClient=null,this._whenSetup=(0,o.hh)(),this._elevationAligner=x(),this._elevationFilter=R(),this._symbologyCandidatesFetcher=P(),this._handles=new r.Z,this._updatingHandles=new c.t,this._editsUpdatingHandles=new c.t,this._pendingApplyEdits=new Map,this._alignPointsInFeatures=async(e,t)=>{const s={points:e},i=await this.remoteClient.invoke("alignElevation",s,{signal:t});return(0,o.k_)(t),i},this._getSymbologyCandidates=async(e,t)=>{const s={candidates:e,spatialReference:this._spatialReference.toJSON()},i=await this.remoteClient.invoke("getSymbologyCandidates",s,{signal:t});return(0,o.k_)(t),i}}get updating(){return this.updatingExcludingEdits||this._editsUpdatingHandles.updating||this._featureFetcher.updating}get updatingExcludingEdits(){return this._featureFetcher.updatingExcludingEdits||this._isInitializing||this._updatingHandles.updating}destroy(){this._featureFetcher?.destroy(),this._queryEngine?.destroy(),this._featureStore?.clear(),this._handles?.destroy()}async setup(e){if(this.destroyed)return{result:{}};const{geometryType:t,objectIdField:s,timeInfo:i,fields:n}=e.serviceInfo,{hasZ:r}=e,o=d.Z.fromJSON(e.spatialReference);this._spatialReference=o,this._featureStore=new p.Z({...e.serviceInfo,hasZ:r,hasM:!1}),this._queryEngine=new _.q({spatialReference:e.spatialReference,featureStore:this._featureStore,geometryType:t,fields:n,hasZ:r,hasM:!1,objectIdField:s,timeInfo:i}),this._featureFetcher=new se({store:new pe({featureStore:this._featureStore}),url:e.serviceInfo.url,objectIdField:e.serviceInfo.objectIdField,globalIdField:e.serviceInfo.globalIdField,capabilities:e.serviceInfo.capabilities,spatialReference:o,sourceSpatialReference:d.Z.fromJSON(e.serviceInfo.spatialReference)});const l="3d"===e.configuration.viewType;return this._elevationAligner=x(l,{elevationInfo:null!=e.elevationInfo?m.Z.fromJSON(e.elevationInfo):null,alignPointsInFeatures:this._alignPointsInFeatures,spatialReference:o}),this._elevationFilter=R(l),this._handles.add([(0,a.YP)((()=>this._featureFetcher.availability),(e=>this.emit("notify-availability",{availability:e})),a.Z_),(0,a.YP)((()=>this.updating),(()=>this._notifyUpdating()))]),this._whenSetup.resolve(),this._isInitializing=!1,this.configure(e.configuration)}async configure(e){return await this._updatingHandles.addPromise(this._whenSetup.promise),this._updateFeatureFetcherConfiguration(e),{result:{}}}async fetchCandidates(e,t){await this._whenSetup.promise,(0,o.k_)(t);const s=function(e){return{point:e.point,mode:e.mode,distance:e.distance,types:e.types,query:null!=e.filter?e.filter:{where:"1=1"}}}(e),i=null!=t?t.signal:null,n=await this._queryEngine.executeQueryForSnapping(s,i);(0,o.k_)(i);const r=await this._elevationAligner.alignCandidates(n.candidates,i);(0,o.k_)(i);const a=await this._symbologyCandidatesFetcher.fetch(r,i);(0,o.k_)(i);const l=0===a.length?r:r.concat(a);return{result:{candidates:this._elevationFilter.filter(s,l)}}}async updateTiles(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.tileSize=e.tileSize,this._featureFetcher.tilesOfInterest=e.tiles,this._featureFetcher.tileInfo=null!=e.tileInfo?f.Z.fromJSON(e.tileInfo):null,xe}async refresh(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),this._featureFetcher.refresh(),xe}async whenNotUpdating(e,t){return await this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t),await(0,a.N1)((()=>!this.updatingExcludingEdits),t),(0,o.k_)(t),xe}async getDebugInfo(e,t){return(0,o.k_)(t),{result:this._featureFetcher.debugInfo}}async beginApplyEdits(e,t){this._updatingHandles.addPromise(this._whenSetup.promise),(0,o.k_)(t);const s=(0,o.hh)();return this._pendingApplyEdits.set(e.id,s),this._featureFetcher.applyEdits(s.promise),this._editsUpdatingHandles.addPromise(s.promise),xe}async endApplyEdits(e,t){const s=this._pendingApplyEdits.get(e.id);return s&&s.resolve(e.edits),(0,o.k_)(t),xe}async notifyElevationSourceChange(e,t){return this._elevationAligner.notifyElevationSourceChange(),xe}async notifySymbologyChange(e,t){return this._symbologyCandidatesFetcher.notifySymbologyChange(),xe}async setSymbologySnappingSupported(e){return this._symbologyCandidatesFetcher=P(e,this._getSymbologyCandidates),xe}_updateFeatureFetcherConfiguration(e){this._featureFetcher.filter=null!=e.filter?g.Z.fromJSON(e.filter):null,this._featureFetcher.customParameters=e.customParameters}_notifyUpdating(){this.emit("notify-updating",{updating:this.updating})}};(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updating",null),(0,i._)([(0,l.Cb)({readOnly:!0})],be.prototype,"updatingExcludingEdits",null),(0,i._)([(0,l.Cb)()],be.prototype,"_isInitializing",void 0),be=(0,i._)([(0,h.j)("esri.views.interactive.snapping.featureSources.featureServiceSource.FeatureServiceSnappingSourceWorker")],be);const we=be,xe={result:{}}}}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! For license information please see c5c56b6d99db96a6755a.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[576],{20576:(e,t,s)=>{s.r(t),s.d(t,{scopeCss:()=>T});const r="-shadowcsshost",c="-shadowcssslotted",o="-shadowcsscontext",n=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",l=new RegExp("("+r+n,"gim"),i=new RegExp("("+o+n,"gim"),a=new RegExp("("+c+n,"gim"),p=r+"-no-combinator",h=/-shadowcsshost-no-combinator([^\s]*)/,u=[/::shadow/g,/::content/g],g=/-shadowcsshost/gim,d=/:host/gim,m=/::slotted/gim,f=/:host-context/gim,$=/\/\*\s*[\s\S]*?\*\//g,x=/\/\*\s*#\s*source(Mapping)?URL=[\s\S]+?\*\//g,_=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,w=/([{}])/g,b=/(^.*?[^\\])??((:+)(.*)|$)/,S="%BLOCK%",W=(e,t)=>{const s=k(e);let r=0;return s.escapedString.replace(_,((...e)=>{const c=e[2];let o="",n=e[4],l="";n&&n.startsWith("{"+S)&&(o=s.blocks[r++],n=n.substring(8),l="{");const i=t({selector:c,content:o});return`${e[1]}${i.selector}${e[3]}${l}${i.content}${n}`}))},k=e=>{const t=e.split(w),s=[],r=[];let c=0,o=[];for(let e=0;e<t.length;e++){const n=t[e];"}"===n&&c--,c>0?o.push(n):(o.length>0&&(r.push(o.join("")),s.push(S),o=[]),s.push(n)),"{"===n&&c++}return o.length>0&&(r.push(o.join("")),s.push(S)),{escapedString:s.join(""),blocks:r}},O=(e,t,s)=>e.replace(t,((...e)=>{if(e[2]){const t=e[2].split(","),r=[];for(let c=0;c<t.length;c++){const o=t[c].trim();if(!o)break;r.push(s(p,o,e[3]))}return r.join(",")}return p+e[3]})),R=(e,t,s)=>e+t.replace(r,"")+s,C=(e,t,s)=>t.indexOf(r)>-1?R(e,t,s):e+t+s+", "+t+" "+e+s,j=(e,t)=>e.replace(b,((e,s="",r,c="",o="")=>s+t+c+o)),E=(e,t,s,r,c)=>W(e,(e=>{let c=e.selector,o=e.content;return"@"!==e.selector[0]?c=((e,t,s,r)=>e.split(",").map((e=>r&&e.indexOf("."+r)>-1?e.trim():((e,t)=>!(e=>(e=e.replace(/\[/g,"\\[").replace(/\]/g,"\\]"),new RegExp("^("+e+")([>\\s~+[.,{:][\\s\\S]*)?$","m")))(t).test(e))(e,t)?((e,t,s)=>{const r="."+(t=t.replace(/\[is=([^\]]*)\]/g,((e,...t)=>t[0]))),c=e=>{let c=e.trim();if(!c)return"";if(e.indexOf(p)>-1)c=((e,t,s)=>{if(g.lastIndex=0,g.test(e)){const t=`.${s}`;return e.replace(h,((e,s)=>j(s,t))).replace(g,t+" ")}return t+" "+e})(e,t,s);else{const t=e.replace(g,"");t.length>0&&(c=j(t,r))}return c},o=(e=>{const t=[];let s=0;return{content:(e=e.replace(/(\[[^\]]*\])/g,((e,r)=>{const c=`__ph-${s}__`;return t.push(r),s++,c}))).replace(/(:nth-[-\w]+)(\([^)]+\))/g,((e,r,c)=>{const o=`__ph-${s}__`;return t.push(c),s++,r+o})),placeholders:t}})(e);let n,l="",i=0;const a=/( |>|\+|~(?!=))\s*/g;let u=!((e=o.content).indexOf(p)>-1);for(;null!==(n=a.exec(e));){const t=n[1],s=e.slice(i,n.index).trim();u=u||s.indexOf(p)>-1,l+=`${u?c(s):s} ${t} `,i=a.lastIndex}const d=e.substring(i);return u=u||d.indexOf(p)>-1,l+=u?c(d):d,m=o.placeholders,l.replace(/__ph-(\d+)__/g,((e,t)=>m[+t]));var m})(e,t,s).trim():e.trim())).join(", "))(e.selector,t,s,r):(e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document"))&&(o=E(e.content,t,s,r)),{selector:c.replace(/\s{2,}/g," ").trim(),content:o}})),T=(e,t,s)=>{const n=t+"-h",h=t+"-s",g=e.match(x)||[];e=e.replace($,"");const _=[];if(s){const t=e=>{const t=`/*!@___${_.length}___*/`,s=`/*!@${e.selector}*/`;return _.push({placeholder:t,comment:s}),e.selector=t+e.selector,e};e=W(e,(e=>"@"!==e.selector[0]?t(e):e.selector.startsWith("@media")||e.selector.startsWith("@supports")||e.selector.startsWith("@page")||e.selector.startsWith("@document")?(e.content=W(e.content,t),e):e))}const w=((e,t,s,n,h)=>{const g=((e,t)=>{const s="."+t+" > ",r=[];return e=e.replace(a,((...e)=>{if(e[2]){const t=e[2].trim(),c=e[3],o=s+t+c;let n="";for(let t=e[4]-1;t>=0;t--){const s=e[5][t];if("}"===s||","===s)break;n=s+n}const l=n+o,i=`${n.trimRight()}${o.trim()}`;if(l.trim()!==i.trim()){const e=`${i}, ${l}`;r.push({orgSelector:l,updatedSelector:e})}return o}return p+e[3]})),{selectors:r,cssText:e}})(e=(e=>O(e,i,C))(e=(e=>O(e,l,R))(e=e.replace(f,o).replace(d,r).replace(m,c))),n);return e=(e=>u.reduce(((e,t)=>e.replace(t," ")),e))(e=g.cssText),t&&(e=E(e,t,s,n)),{cssText:(e=(e=e.replace(/-shadowcsshost-no-combinator/g,`.${s}`)).replace(/>\s*\*\s+([^{, ]+)/gm," $1 ")).trim(),slottedSelectors:g.selectors}})(e,t,n,h);return e=[w.cssText,...g].join("\n"),s&&_.forEach((({placeholder:t,comment:s})=>{e=e.replace(t,s)})),w.slottedSelectors.forEach((t=>{e=e.replace(t.orgSelector,t.updatedSelector)})),e}}}]);
|