@arcgis/core 4.33.0-next.20250414 → 4.33.0-next.20250415
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/arcade/featureset/support/FeatureSet.js +1 -1
- package/arcade/functions/geomasync.js +1 -1
- package/arcade/functions/geomsync.js +1 -1
- package/arcade/geometry/functions.js +1 -1
- package/arcade/geometry/operatorsWorker.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0252d853419adc203f04.js +1 -0
- package/assets/esri/core/workers/chunks/{fe1ad9ed0d32f557e5a3.js → 029705c229ccf2e6b78d.js} +28 -28
- package/assets/esri/core/workers/chunks/030f5b9a9757eead436b.js +1 -0
- package/assets/esri/core/workers/chunks/{4403b3f08907e88d0d91.js → 0b34c8356b8492ce7b16.js} +1 -1
- package/assets/esri/core/workers/chunks/{fb65796296b0422cf266.js → 272a309760dacb13dee3.js} +1 -1
- package/assets/esri/core/workers/chunks/2bdbf678d4f013543dbb.js +1 -0
- package/assets/esri/core/workers/chunks/321f6f6d268755482c27.js +1 -0
- package/assets/esri/core/workers/chunks/{b7a1185ac49480fc1410.js → 35a59f0df087e3c588a9.js} +1 -1
- package/assets/esri/core/workers/chunks/{083548c5eea5aca6404c.js → 45d64b72b7e93e9c64d7.js} +1 -1
- package/assets/esri/core/workers/chunks/{626e33ece2c49d40f6cd.js → 4e711f4fa1cbedf4dae5.js} +1 -1
- package/assets/esri/core/workers/chunks/56fdbe61ac84b036a1a2.js +1 -0
- package/assets/esri/core/workers/chunks/57fd5a52be41ddd6a11b.js +1 -0
- package/assets/esri/core/workers/chunks/5fb9bb3ac2f60dbd59c4.js +1 -0
- package/assets/esri/core/workers/chunks/{0a675f9f69b8b13b7443.js → 601fc99426f0213b0769.js} +1 -1
- package/assets/esri/core/workers/chunks/68d7babbe7e0d934e056.js +1 -0
- package/assets/esri/core/workers/chunks/6fc39a58f3011291c602.js +1 -0
- package/assets/esri/core/workers/chunks/8221f2e540abe1e0f048.js +1 -0
- package/assets/esri/core/workers/chunks/83e13baab4b90a88d967.js +1 -0
- package/assets/esri/core/workers/chunks/851baab753d9c8e967bd.js +1 -0
- package/assets/esri/core/workers/chunks/8ba7d44eff348004f084.js +1 -0
- package/assets/esri/core/workers/chunks/{9050dad7e4f093568026.js → 97267911d03c2426d319.js} +1 -1
- package/assets/esri/core/workers/chunks/984c5047ab1fa632ca09.js +1 -0
- package/assets/esri/core/workers/chunks/{5aae4e127e888f69435a.js → 9a1c058d3ecd1db0e996.js} +1 -1
- package/assets/esri/core/workers/chunks/9b21dc4659922cc577cb.js +1 -0
- package/assets/esri/core/workers/chunks/{ff62b813fff4a015a8a6.js → a4239e301728d594afa5.js} +1 -1
- package/assets/esri/core/workers/chunks/aca3ccb9599bcc444617.js +1 -0
- package/assets/esri/core/workers/chunks/{a3421383e48379012c9c.js → b6dd25bccb9f6e19c18e.js} +1 -1
- package/assets/esri/core/workers/chunks/bf4947fe446dcb477031.js +1 -0
- package/assets/esri/core/workers/chunks/d053c23fce77fb77cc00.js +1 -0
- package/assets/esri/core/workers/chunks/e31bb256921807464715.js +1 -0
- package/assets/esri/core/workers/chunks/{8aae03e347ab18ae6ee2.js → e3d25d027885eb1a415f.js} +1 -1
- package/assets/esri/core/workers/chunks/ed517687b3728fd2eb64.js +1 -0
- package/assets/esri/themes/base/widgets/_Expand.scss +6 -1
- package/assets/esri/themes/base/widgets/_TimeSlider.scss +97 -107
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ar.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bg.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bs.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ca.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_cs.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_da.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_de.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_el.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_en.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_es.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_et.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fi.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_he.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hu.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_id.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_it.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ja.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ko.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lt.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lv.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_nl.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pl.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-BR.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-PT.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ro.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ru.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sk.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sl.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sv.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_th.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_tr.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_uk.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_vi.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-CN.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-HK.json +1 -1
- package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-TW.json +1 -1
- package/chunks/BloomComposition.glsl.js +4 -13
- package/chunks/Theme.js +1 -1
- package/chunks/Tick.js +1 -1
- package/geometry/support/HalfFloatArray.js +1 -1
- package/geometry/support/buffer/BufferView.js +1 -1
- package/geometry/support/float16.js +1 -1
- package/interfaces.d.ts +222 -139
- package/layers/FeatureLayer.js +1 -1
- package/layers/WCSLayer.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/views/3d/layers/DrapedSubView3D.js +1 -1
- package/views/3d/layers/DynamicLayerView3D.js +1 -1
- package/views/3d/layers/FlowSubView3D.js +5 -0
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/WMSLayerView3D.js +1 -1
- package/views/3d/support/buffer/InterleavedLayout.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomComposition.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/bloom/BloomRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
- package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/widgets/Search/types.d.ts +10 -0
- package/widgets/Search/types.js +5 -0
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider/css.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/widgets/support/SelectionList/FeatureItem.js +5 -0
- package/widgets/support/SelectionList/GroupLayerItem.js +5 -0
- package/widgets/support/SelectionList/{SelectionListItemBase.js → ItemBase.js} +1 -1
- package/widgets/support/SelectionList/LayerItem.js +5 -0
- package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
- package/widgets/support/SelectionList/selectionListUtils.js +1 -1
- package/widgets/support/SelectionList.js +1 -1
- package/assets/esri/core/workers/chunks/0db4c0071282dd94f3b2.js +0 -1
- package/assets/esri/core/workers/chunks/10631680abe7607616ca.js +0 -1
- package/assets/esri/core/workers/chunks/277b61af8982092a4c81.js +0 -1
- package/assets/esri/core/workers/chunks/290aed587aa647226b46.js +0 -1
- package/assets/esri/core/workers/chunks/345f428dfcaa594ee617.js +0 -1
- package/assets/esri/core/workers/chunks/358a3a9326615d5e6d3b.js +0 -1
- package/assets/esri/core/workers/chunks/39fbac918ebd1b0e3a18.js +0 -1
- package/assets/esri/core/workers/chunks/544771f64a86b541d5bb.js +0 -1
- package/assets/esri/core/workers/chunks/6275114e8ed9dd31465d.js +0 -1
- package/assets/esri/core/workers/chunks/72b5e43741ce3a0da8f7.js +0 -1
- package/assets/esri/core/workers/chunks/7e63e3d759c874077b52.js +0 -1
- package/assets/esri/core/workers/chunks/7f8c7e3e41e51ab4d612.js +0 -1
- package/assets/esri/core/workers/chunks/80a5fd4fb79e90086538.js +0 -1
- package/assets/esri/core/workers/chunks/80aaf31c8eec3cff2add.js +0 -1
- package/assets/esri/core/workers/chunks/b6361cec92003997bfe5.js +0 -1
- package/assets/esri/core/workers/chunks/bbbb1aa2569ebf01ad8b.js +0 -1
- package/assets/esri/core/workers/chunks/d59aeb46bf2fb0931a9b.js +0 -1
- package/assets/esri/core/workers/chunks/ee277dd58aa69281163f.js +0 -1
- package/assets/esri/core/workers/chunks/f718d41f665d5df25f79.js +0 -1
- package/assets/esri/core/workers/chunks/fa9ef9e8eae505371965.js +0 -1
- package/assets/esri/core/workers/chunks/fb5b852d0f72df014377.js +0 -1
- package/assets/esri/core/workers/chunks/fb603edd374e24f366ff.js +0 -1
- package/widgets/support/SelectionList/SelectionListFeatureItem.js +0 -5
- package/widgets/support/SelectionList/SelectionListGroupLayerItem.js +0 -5
- package/widgets/support/SelectionList/SelectionListLayerItem.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4731],{9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>o});var r=n(37539);function o(e,t,n,o,i,l,a=Math.floor(e.length/3)){const u=(0,r.jd)(t,i);if(null==u)return!1;if(u===r.pO){if(e===o&&n===l)return!0;const t=n+3*a;for(let r=n,i=l;r<t;r++,i++)o[i]=e[r];return!0}const s=n+3*a;for(let t=n,r=l;t<s;t+=3,r+=3)u(e,t,o,r);return!0}},34142:(e,t,n)=>{n.r(t),n.d(t,{default:()=>w});var r=n(4576),o=n(34275),i=n(67026),l=n(82534),a=n(38954),u=n(72385),s=n(16930),c=n(9762),f=(n(44208),n(63531)),d=n(69846),C=n(48425),A=n(59418),h=n(37203);function g(e,t,n){return e?.attributeInfo.useElevation?t?function(e,t){const n=new Float64Array(t);for(let r=0;r<t;r++)n[r]=e[3*r+2];return n}(t,n):null:e?.attributeInfo.storageInfo?(0,A.m0)(e.attributeInfo.storageInfo,e.buffer,n,!0):null}function E(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function b(e){let t=0;for(const n of e||[])t|=1<<n;return t}var p=n(57005);class S{transform(e){const t=this._transform(e),n=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&n.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.mw)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&n.push(e.values.buffer);return Promise.resolve({result:t,transferList:n})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const n=(0,A.wH)(t,e);if(null==n.vertexAttributes.position)return;const r=(0,A.MA)(t,n.vertexAttributes.position),o=n.header.fields,i=[o.offsetX,o.offsetY,o.offsetZ],l=[o.scaleX,o.scaleY,o.scaleZ],a=r.length/3,u=new Float64Array(3*a);for(let e=0;e<a;e++)u[3*e]=r[3*e]*l[0]+i[0],u[3*e+1]=r[3*e+1]*l[1]+i[1],u[3*e+2]=r[3*e+2]*l[2]+i[2];return u}if("lepcc-xyz"===e.encoding)return(0,h.Me)(t).result}(e.schema,e.geometryBuffer);let n=t.length/3,o=null;const i=new Array,l=g(e.primaryAttributeData,t,n);null!=e.primaryAttributeData&&l&&i.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:l});const a=g(e.modulationAttributeData,t,n);null!=e.modulationAttributeData&&a&&i.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:a});let u=function(e,t,n,r){const{rendererJSON:o,isRGBRenderer:i}=e;let l=null,a=null;if(t&&i)l=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){a=C.A.fromJSON(o);const e=a.colorUniqueValueInfos;l=new Uint8Array(3*r);const n=E(a.fieldTransformType);for(let o=0;o<r;o++){const r=(n?n(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(r)){l[3*o]=e[t].color.r,l[3*o+1]=e[t].color.g,l[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){a=d.A.fromJSON(o);const e=a.stops;l=new Uint8Array(3*r);const n=E(a.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o],i=e.length-1;if(r<e[0].value)l[3*o]=e[0].color.r,l[3*o+1]=e[0].color.g,l[3*o+2]=e[0].color.b;else if(r>=e[i].value)l[3*o]=e[i].color.r,l[3*o+1]=e[i].color.g,l[3*o+2]=e[i].color.b;else for(let t=1;t<e.length;t++)if(r<e[t].value){const n=(r-e[t-1].value)/(e[t].value-e[t-1].value);l[3*o]=e[t].color.r*n+e[t-1].color.r*(1-n),l[3*o+1]=e[t].color.g*n+e[t-1].color.g*(1-n),l[3*o+2]=e[t].color.b*n+e[t-1].color.b*(1-n);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){a=f.A.fromJSON(o);const e=a.colorClassBreakInfos;l=new Uint8Array(3*r);const n=E(a.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o];for(let t=0;t<e.length;t++)if(r>=e[t].minValue&&r<=e[t].maxValue){l[3*o]=e[t].color.r,l[3*o+1]=e[t].color.g,l[3*o+2]=e[t].color.b;break}}}else l=new Uint8Array(3*r).fill(255);if(n&&a?.colorModulation){const e=a.colorModulation.minValue,t=a.colorModulation.maxValue,o=.3;for(let i=0;i<r;i++){const r=n[i],a=r>=t?1:r<=e?o:o+(1-o)*(r-e)/(t-e);l[3*i]=a*l[3*i],l[3*i+1]=a*l[3*i+1],l[3*i+2]=a*l[3*i+2]}}return l}(e.rendererInfo,l,a,n);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const l=e.filterAttributesData.filter(r.Ru).map((e=>{const r=g(e,t,n),o={attributeInfo:e.attributeInfo,values:r};return i.push(o),o}));o=new Uint32Array(n),n=function(e,t,n,r,o){const i=e.length/3;let l=0;for(let a=0;a<i;a++){let i=!0;for(let e=0;e<r.length&&i;e++){const{filterJSON:t}=r[e],n=o[e].values[a];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(n)===e&&(i=!1);break}case"pointCloudBitfieldFilter":{const e=b(t.requiredSetBits),r=b(t.requiredClearBits);((n&e)!==e||n&r)&&(i=!1);break}case"pointCloudReturnFilter":{const e=15&n,r=n>>>4&15,o=r>1,l=1===e,a=e===r;let u=!1;for(const e of t.includedReturns)if("last"===e&&a||"firstOfMany"===e&&l&&o||"lastOfMany"===e&&a&&o||"single"===e&&!o){u=!0;break}u||(i=!1);break}}}i&&(n[l]=a,e[3*l]=e[3*a],e[3*l+1]=e[3*a+1],e[3*l+2]=e[3*a+2],t[3*l]=t[3*a],t[3*l+1]=t[3*a+1],t[3*l+2]=t[3*a+2],l++)}return l}(t,u,o,e.filterInfo,l)}for(const r of e.userAttributesData){const e=g(r,t,n);i.push({attributeInfo:r.attributeInfo,values:e})}3*n<u.length&&(u=new Uint8Array(u.buffer.slice(0,3*n))),function(e,t,n){if(0!==n)for(let r=0;r<t;r++)e[3*r+2]+=n}(t,n,e.elevationOffset);const c=y(t,n,p.ab.fromData(e.obbData),s.A.fromJSON(e.inSR),s.A.fromJSON(e.outSR));return{obbData:e.obbData,points:c,rgb:u,attributes:i,pointIdFilterMap:o}}}function y(e,t,n,r,o){if(!(0,c.projectBuffer)(e,r,0,e,o,0,t))throw new Error("Can't reproject");const l=(0,u.o8)(n.center),s=(0,u.vt)(),f=(0,u.vt)(),d=(0,u.o8)(n.halfSize);(0,i.Xr)(R,n.quaternion);const C=new Float32Array(3*t);for(let n=0;n<t;n++){let t=3*n;s[0]=e[t]-l[0],s[1]=e[t+1]-l[1],s[2]=e[t+2]-l[2],(0,a.w)(f,s,R),d[0]=Math.max(d[0],Math.abs(f[0])),d[1]=Math.max(d[1],Math.abs(f[1])),d[2]=Math.max(d[2],Math.abs(f[2])),C[t++]=s[0],C[t++]=s[1],C[t]=s[2]}return n.halfSize=d,C}const R=(0,l.vt)();function w(){return new S}},37203:(e,t,n)=>{n.d(t,{Ax:()=>E,Me:()=>s,mb:()=>A});var r=n(49186);const o=!0,i={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function l(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+i.identifierOffset,i.identifierLength)),version:t.getUint16(n+i.versionOffset,o),checksum:t.getUint32(n+i.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,o),sizeHi:e.getUint32(t+a.sizeHi,o),minX:e.getFloat64(t+a.minX,o),minY:e.getFloat64(t+a.minY,o),minZ:e.getFloat64(t+a.minZ,o),maxX:e.getFloat64(t+a.maxX,o),maxY:e.getFloat64(t+a.maxY,o),maxZ:e.getFloat64(t+a.maxZ,o),errorX:e.getFloat64(t+a.errorX,o),errorY:e.getFloat64(t+a.errorY,o),errorZ:e.getFloat64(t+a.errorZ,o),count:e.getUint32(t+a.count,o),reserved:e.getUint32(t+a.reserved,o)}}function s(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:s}=l(e,t,n);if(n+=i.byteCount,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const f=u(t,n);if(n+=a.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),C=[],A=[],h=[],g=[];if(n=c(e,n,C),n=c(e,n,A),n=c(e,n,h),n=c(e,n,g),n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let E=0,b=0;for(let e=0;e<C.length;e++){b+=C[e];let t=0;for(let n=0;n<A[e];n++){t+=h[E];const e=g[E];d[3*E]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*E+1]=Math.min(f.maxY,f.minY+2*f.errorY*b),d[3*E+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),E++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,n){const r=[];t=f(e,t,r);const o=[];for(let i=0;i<r.length;i++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[i])}return t}function f(e,t,n){const i=new DataView(e,t),l=i.getUint8(0),a=31&l,u=!!(32&l),s=(192&l)>>6;let c=0;if(0===s)c=i.getUint32(1,o),t+=5;else if(1===s)c=i.getUint16(1,o),t+=3;else{if(2!==s)throw new r.A("lepcc-decode-error","Bad count type");c=i.getUint8(1),t+=2}if(u)throw new r.A("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*a/8),d=new Uint8Array(e,t,f);let C=0,A=0,h=0;const g=-1>>>32-a;for(let e=0;e<c;e++){for(;A<a;)C|=d[h]<<A,A+=8,h+=1;n[e]=C&g,C>>>=a,A-=a,A+a>32&&(C|=d[h-1]>>8-A)}return t+h}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function C(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function A(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:a}=l(e,t,n);if(n+=i.byteCount,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=C(t,n);if(n+=d.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+n!==e.byteLength||u.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*u.colorMapCount),o=new Uint8Array(e,n+3*u.colorMapCount,u.count),i=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++){const n=o[e];i[3*e]=t[3*n],i[3*e+1]=t[3*n+1],i[3*e+2]=t[3*n+2]}return i}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+n!==e.byteLength||0!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(n+3!==e.byteLength||1!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=t.getUint8(n),i=t.getUint8(n+1),l=t.getUint8(n+2),a=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++)a[3*e]=o,a[3*e+1]=i,a[3*e+2]=l;return a}throw new r.A("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const h={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function g(e,t){return{sizeLo:e.getUint32(t+h.sizeLo,o),sizeHi:e.getUint32(t+h.sizeHi,o),count:e.getUint32(t+h.count,o),scaleFactor:e.getUint16(t+h.scaleFactor,o),bitsPerPoint:e.getUint8(t+h.bitsPerPoint),reserved:e.getUint8(t+h.reserved)}}function E(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:a}=l(e,t,n);if(n+=i.byteCount,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=g(t,n);if(n+=h.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const s=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,u.count);for(let e=0;e<u.count;e++)s[e]=t[e]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,u.count);for(let e=0;e<u.count;e++)s[e]=t[e]*u.scaleFactor}else{const t=[];if(f(e,n,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<u.count;e++)s[e]=t[e]*u.scaleFactor}return s}},37539:(e,t,n)=>{n.d(t,{rz:()=>c,pO:()=>E,jd:()=>A,Tp:()=>h,w5:()=>C});var r=n(34727),o=n(83047),i=n(73941),l=n(79258);Math.PI;const a=l.$O.radius,u=l.$O.eccentricitySquared,s={a1:a*u,a2:a*u*a*u,a3:a*u*u/2,a4:a*u*a*u*2.5,a5:a*u+a*u*u/2,a6:1-u};l.$O.radius,l.$O.flattening,l.Sw.radius,l.Sw.flattening,l.sH.radius,l.sH.flattening,l.sH.radius;var c,f=n(21325),d=n(19936);!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",e[e.WGS84=2]="WGS84",e[e.WEB_MERCATOR=3]="WEB_MERCATOR",e[e.WGS84_ECEF=4]="WGS84_ECEF",e[e.CGCS2000=5]="CGCS2000",e[e.SPHERICAL_MARS_PCPF=6]="SPHERICAL_MARS_PCPF",e[e.GCSMARS2000=7]="GCSMARS2000",e[e.SPHERICAL_MOON_PCPF=8]="SPHERICAL_MOON_PCPF",e[e.GCSMOON2000=9]="GCSMOON2000",e[e.LON_LAT=10]="LON_LAT",e[e.PLATE_CARREE=11]="PLATE_CARREE"}(c||(c={}));const C={[c.WGS84]:{[c.CGCS2000]:E,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:M,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:p,[c.PLATE_CARREE]:S,[c.WGS84]:E,[c.WGS84_ECEF]:I},[c.CGCS2000]:{[c.CGCS2000]:E,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:M,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:p,[c.PLATE_CARREE]:S,[c.WGS84]:E,[c.WGS84_ECEF]:I},[c.GCSMARS2000]:{[c.CGCS2000]:null,[c.GCSMARS2000]:E,[c.GCSMOON2000]:null,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:O,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.GCSMOON2000]:{[c.CGCS2000]:null,[c.GCSMARS2000]:null,[c.GCSMOON2000]:E,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:w,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.WEB_MERCATOR]:{[c.CGCS2000]:b,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:b,[c.SPHERICAL_ECEF]:function(e,t,n,r){const o=e[t]/G,i=T-2*Math.atan(Math.exp(-e[t+1]/G)),l=G+e[t+2],a=Math.cos(i)*l;n[r]=Math.cos(o)*a,n[r+1]=Math.sin(o)*a,n[r+2]=Math.sin(i)*l},[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:E,[c.PLATE_CARREE]:function(e,t,n,r){b(e,t,n,r),S(n,r,n,r)},[c.WGS84]:b,[c.WGS84_ECEF]:function(e,t,n,r){b(e,t,n,r),I(n,r,n,r)}},[c.WGS84_ECEF]:{[c.CGCS2000]:L,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:L,[c.SPHERICAL_ECEF]:function(e,t,n,r){L(e,t,n,r),M(n,r,n,r)},[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:function(e,t,n,r){L(e,t,n,r),p(n,r,n,r)},[c.PLATE_CARREE]:function(e,t,n,r){L(e,t,n,r),S(n,r,n,r)},[c.WGS84]:L,[c.WGS84_ECEF]:E},[c.SPHERICAL_ECEF]:{[c.CGCS2000]:N,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:N,[c.SPHERICAL_ECEF]:E,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:function(e,t,n,r){N(e,t,n,r),p(n,r,n,r)},[c.PLATE_CARREE]:function(e,t,n,r){N(e,t,n,r),S(n,r,n,r)},[c.WGS84]:N,[c.WGS84_ECEF]:function(e,t,n,r){N(e,t,n,r),I(n,r,n,r)}},[c.SPHERICAL_MARS_PCPF]:{[c.CGCS2000]:null,[c.GCSMARS2000]:P,[c.GCSMOON2000]:null,[c.LON_LAT]:P,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:E,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.SPHERICAL_MOON_PCPF]:{[c.CGCS2000]:null,[c.GCSMARS2000]:null,[c.GCSMOON2000]:_,[c.LON_LAT]:_,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:E,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.UNKNOWN]:{[c.CGCS2000]:null,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:null,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:E,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.LON_LAT]:{[c.CGCS2000]:E,[c.GCSMARS2000]:E,[c.GCSMOON2000]:E,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:M,[c.SPHERICAL_MARS_PCPF]:O,[c.SPHERICAL_MOON_PCPF]:w,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:p,[c.PLATE_CARREE]:S,[c.WGS84]:E,[c.WGS84_ECEF]:I},[c.PLATE_CARREE]:{[c.CGCS2000]:y,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:y,[c.SPHERICAL_ECEF]:function(e,t,n,r){y(e,t,n,r),M(n,r,n,r)},[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:function(e,t,n,r){y(e,t,n,r),p(n,r,n,r)},[c.PLATE_CARREE]:E,[c.WGS84]:y,[c.WGS84_ECEF]:function(e,t,n,r){y(e,t,n,r),I(n,r,n,r)}}};function A(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(F.source.spatialReference===e&&F.dest.spatialReference===t)return F;const n=g(e,F.source),r=g(t,F.dest);return n===c.UNKNOWN&&r===c.UNKNOWN?(0,f.aI)(e,t)?F.projector=E:F.projector=null:F.projector=C[n][r],F}function g(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,o.GA)(e,1)),(0,i.jA)(e)?t.spatialReferenceId=c.SPHERICAL_ECEF:(0,f.oT)(e)?t.spatialReferenceId=c.WGS84:(0,f.K8)(e)?t.spatialReferenceId=c.WEB_MERCATOR:(0,f.r1)(e)?t.spatialReferenceId=c.PLATE_CARREE:e.wkt===i.Ro.wkt?t.spatialReferenceId=c.WGS84_ECEF:e.wkid===d.Y.CGCS2000?t.spatialReferenceId=c.CGCS2000:e.wkt===i.FY.wkt?t.spatialReferenceId=c.SPHERICAL_MARS_PCPF:e.wkt===i.LJ.wkt?t.spatialReferenceId=c.SPHERICAL_MOON_PCPF:(0,f.q8)(e)?t.spatialReferenceId=c.GCSMARS2000:(0,f.KQ)(e)?t.spatialReferenceId=c.GCSMOON2000:t.spatialReferenceId=c.UNKNOWN):c.UNKNOWN}function E(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function b(e,t,n,r){n[r]=v*(e[t]/G),n[r+1]=v*(T-2*Math.atan(Math.exp(-e[t+1]/G))),n[r+2]=e[t+2]}function p(e,t,n,o){!function(e,t,n,o,i){const l=.4999999*Math.PI,a=(0,r.qE)(U*e[t+1],-l,l),u=Math.sin(a);n[o++]=U*e[t]*i.radius,n[o++]=i.halfSemiMajorAxis*Math.log((1+u)/(1-u)),n[o]=e[t+2]}(e,t,n,o,l.$O)}function S(e,t,n,r){n[r]=e[t]*W,n[r+1]=e[t+1]*W,n[r+2]=e[t+2]}function y(e,t,n,r){n[r]=e[t]*k,n[r+1]=e[t+1]*k,n[r+2]=e[t+2]}function R(e,t,n,r,o){const i=o+e[t+2],l=U*e[t+1],a=U*e[t],u=Math.cos(l)*i;n[r]=Math.cos(a)*u,n[r+1]=Math.sin(a)*u,n[r+2]=Math.sin(l)*i}function w(e,t,n,r){R(e,t,n,r,l.Sw.radius)}function O(e,t,n,r){R(e,t,n,r,l.sH.radius)}function M(e,t,n,r){R(e,t,n,r,l.$O.radius)}function m(e,t,n,o,i){const l=e[t],a=e[t+1],u=e[t+2],s=Math.sqrt(l*l+a*a+u*u),c=(0,r.YN)(u/(0===s?1:s)),f=Math.atan2(a,l);n[o++]=v*f,n[o++]=v*c,n[o]=s-i}function _(e,t,n,r){m(e,t,n,r,l.Sw.radius)}function P(e,t,n,r){m(e,t,n,r,l.sH.radius)}function N(e,t,n,r){m(e,t,n,r,l.$O.radius)}function I(e,t,n,r){!function(e,t,n,r,o){const i=U*e[t],l=U*e[t+1],a=e[t+2],u=Math.sin(l),s=Math.cos(l),c=o.radius/Math.sqrt(1-o.eccentricitySquared*u*u);n[r++]=(c+a)*s*Math.cos(i),n[r++]=(c+a)*s*Math.sin(i),n[r++]=(c*(1-o.eccentricitySquared)+a)*u}(e,t,n,r,l.$O)}function L(e,t,n,r){const o=s,i=e[t],a=e[t+1],u=e[t+2];let c,f,d,C,A,h,g,E,b,p,S,y,R,w,O,M,m,_,P,N,I;c=Math.abs(u),f=i*i+a*a,d=Math.sqrt(f),C=f+u*u,A=Math.sqrt(C),N=Math.atan2(a,i),h=u*u/C,g=f/C,w=o.a2/A,O=o.a3-o.a4/A,g>.3?(E=c/A*(1+g*(o.a1+w+h*O)/A),P=Math.asin(E),p=E*E,b=Math.sqrt(1-p)):(b=d/A*(1-h*(o.a5-w-g*O)/A),P=Math.acos(b),p=1-b*b,E=Math.sqrt(p)),S=1-l.$O.eccentricitySquared*p,y=l.$O.radius/Math.sqrt(S),R=o.a6*y,w=d-y*b,O=c-R*E,m=b*w+E*O,M=b*O-E*w,_=M/(R/S+m),P+=_,I=m+M*_/2,u<0&&(P=-P),n[r++]=v*N,n[r++]=v*P,n[r]=I}const F={source:{spatialReference:null,spatialReferenceId:c.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:c.UNKNOWN,metersPerUnit:1},projector:E},U=(0,r.kU)(1),v=(0,r.KJ)(1),T=.5*Math.PI,G=l.$O.radius,W=G*Math.PI/180,k=180/(G*Math.PI)},40876:(e,t,n)=>{n.d(t,{Eq:()=>C,G1:()=>h,TS:()=>i,Tf:()=>b,V6:()=>o,Vm:()=>A,ay:()=>u,c1:()=>g,c4:()=>l,j5:()=>s,lT:()=>f,oW:()=>c});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!r[e]||!!r[e.toLowerCase()]}function i(e){return r[e]??r[e.toLowerCase()]}function l(e){return[...i(e)]}function a(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function u(e,t,n,r=1){const o=(e%360+360)%360/360,i=n<=.5?n*(t+1):n+t-n*t,l=2*n-i;return[Math.round(255*a(l,i,o+1/3)),Math.round(255*a(l,i,o)),Math.round(255*a(l,i,o-1/3)),r]}function s(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,o=t?1:17,i=t?9===e.length:5===e.length;let l=Number("0x"+e.slice(1));if(isNaN(l))return null;const a=[0,0,0,1];let u;return i&&(u=l&r,l>>=n,a[3]=o*u/255),u=l&r,l>>=n,a[2]=o*u,u=l&r,l>>=n,a[1]=o*u,u=l&r,l>>=n,a[0]=o*u,a}function c(e){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),o=5===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function f(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const t=e[0];if("%"===t.charAt(t.length-1)){const t=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map((e=>parseFloat(e))))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return u(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?h(e[3]):1,e}function C(e){let t=o(e)?i(e):null;return t??=f(e),t??=c(e),t}function A(e){const t=C(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function h(e){return E(e,0,1)}function g(e){return Math.round(E(e,0,255))}function E(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const b=2.2},59418:(e,t,n)=>{n.d(t,{wH:()=>g,MA:()=>C,E5:()=>A,m0:()=>b});var r=n(49186),o=n(4718),i=n(53966),l=n(34275),a=n(37203),u=n(46540);const s=()=>i.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(e,t,n){let o="",i=0;for(;i<n;){const l=e[t+i];if(l<128)o+=String.fromCharCode(l),i++;else if(l>=192&&l<224){if(i+1>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&l)<<6|63&e[t+i+1];o+=String.fromCharCode(a),i+=2}else if(l>=224&&l<240){if(i+2>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&l)<<12|(63&e[t+i+1])<<6|63&e[t+i+2];o+=String.fromCharCode(a),i+=3}else{if(!(l>=240&&l<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(i+3>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&l)<<18|(63&e[t+i+1])<<12|(63&e[t+i+2])<<6|63&e[t+i+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(a);i+=4}}}return o}function f(e,t){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<t.length;o++){const i=t[o],l=i.valueType||i.type,a=S[l];n.fields[i.property]=a(e,r),r+=p[l].BYTES_PER_ELEMENT}return n.byteCount=r,n}function d(e,t,n){const o=[];let i,l,a=0;for(l=0;l<e;l+=1){if(i=t[l],i>0){if(o.push(c(n,a,i-1)),0!==n[a+i-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=i}return o}function C(e,t){return new(0,p[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function A(e,t){if(!e)return null;const n=e[t];return(0,l.IY)(e)?n===l.PI?null:n:(0,l._G)(e)?n===l.h2?null:n:n!=n?null:n}function h(e,t,n){if(t!==e&&s().error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const n=f(e,t&&t.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},i=n.fields,l=null!=i.vertexCount?i.vertexCount:i.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const n={...t.vertexAttributes[e],byteOffset:r,count:l},i=E[e]||"_"+e;o.vertexAttributes[i]=n,r+=R(n.valueType)*n.valuesPerElement*l}const a=i.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const n={...t.faces[e],byteOffset:r,count:a};o.faces[e]=n,r+=R(n.valueType)*n.valuesPerElement*a}}const u=i.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&u){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const n={...t.featureAttributes[e],byteOffset:r,count:u};o.featureAttributes[e]=n,r+=("UInt64"===n.valueType?8:R(n.valueType))*n.valuesPerElement*u}}return h(r,e.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const E={position:u.r.POSITION,normal:u.r.NORMAL,color:u.r.COLOR,uv0:u.r.UV0,region:u.r.UVREGION};function b(e,t,n,i=!1){if("lepcc-rgb"===e.encoding)return i?(0,a.mb)(t):function(e){return Array.isArray(e)?e.length<l.y9?e:new Uint8Array(e):e.length<l.y9?Array.from(e):e}((0,a.mb)(t));if("lepcc-intensity"===e.encoding)return i?(0,a.Ax)(t):function(e){return Array.isArray(e)?e.length<l.y9?e:new Uint16Array(e):e.length<l.y9?Array.from(e):e}((0,a.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(s().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(s().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const u=function(e,t,n){const i=null!=t.header?f(e,t.header):{byteOffset:0,byteCount:0,fields:{count:n}},l={header:i,byteOffset:i.byteCount,byteCount:0,entries:Object.create(null)};let a=i.byteCount;for(let e=0;e<t.ordering.length;e++){const n=t.ordering[e],u=(0,o.o8)(t[n]);if(u.count=i.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=i.fields[n+"ByteCount"],"UTF-8"!==u.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!y(u.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const e=R(u.valueType);a+=a%e!=0?e-a%e:0,u.byteOffset=a,u.byteCount=e*u.valuesPerElement*u.count}}a+=u.byteCount??0,l.entries[n]=u}return l.byteCount=a-l.byteOffset,l}(t,e,n);h(u.byteOffset+u.byteCount,t.byteLength,"attribute");const c=u.entries.attributeValues||u.entries.objectIds;if(c){if("String"===c.valueType){const e=u.entries.attributeByteCounts,n=C(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,c);return c.timeEncoding?function(e,t,n){return d(e,t,n).map((e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t}))}(e.count,n,r):d(e.count,n,r)}return i?C(t,c):function(e,t){const n=C(e,t);if(n.length>=l.y9)return n;const r=new Array;return n.forEach(((e,t)=>r.push(A(n,t)))),r}(t,c)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const p={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},S={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function y(e){return p.hasOwnProperty(e)}function R(e){return y(e)?p[e].BYTES_PER_ELEMENT:0}},72385:(e,t,n)=>{function r(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function i(e,t,n){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}function l(){return r()}function a(){return i(1,1,1)}function u(){return i(1,0,0)}function s(){return i(0,1,0)}function c(){return i(0,0,1)}n.d(t,{fA:()=>i,o8:()=>o,vt:()=>r});const f=l(),d=a(),C=u(),A=s(),h=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:C,UNIT_Y:A,UNIT_Z:h,ZEROS:f,clone:o,create:r,fromValues:i,ones:a,unitX:u,unitY:s,unitZ:c,zeros:l},Symbol.toStringTag,{value:"Module"}))},91829:(e,t,n)=>{function r(){return[0,0,0,0]}function o(e,t,n,r){return[e,t,n,r]}function i(e,t,n,r){return[e,t,n,r]}function l(e,t=[0,0,0,0]){const n=Math.min(4,e.length);for(let r=0;r<n;++r)t[r]=e[r];return t}function a(){return o(1,1,1,1)}function u(){return o(1,0,0,0)}function s(){return o(0,1,0,0)}function c(){return o(0,0,1,0)}function f(){return o(0,0,0,1)}n.d(t,{CN:()=>i,Un:()=>C,ci:()=>l,fA:()=>o,uY:()=>d,vt:()=>r});const d=[0,0,0,0],C=a(),A=u(),h=s(),g=c(),E=f();Object.freeze(Object.defineProperty({__proto__:null,ONES:C,UNIT_W:E,UNIT_X:A,UNIT_Y:h,UNIT_Z:g,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:r,freeze:i,fromArray:l,fromValues:o,ones:a,unitW:f,unitX:u,unitY:s,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},93223:(e,t,n)=>{n.d(t,{e:()=>i});var r=n(66552),o=n(10107);function i(e,t={}){const n=e instanceof r.J?e:new r.J(e,t),{alwaysWriteDefaults:i,default:l,ignoreUnknown:a=!0,name:u,nonNullable:s,readOnly:c=!1}=t;return(0,o.MZ)({type:a?n.apiValues:String,json:{type:n.jsonValues,default:l,name:u,read:!c&&{reader:n.read},write:{writer:n.write,alwaysWriteDefaults:i}},nonNullable:s,readOnly:c})}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5853],{9762:(e,t,n)=>{n.r(t),n.d(t,{projectBuffer:()=>o});var r=n(37539);function o(e,t,n,o,l,i,a=Math.floor(e.length/3)){const u=(0,r.jd)(t,l);if(null==u)return!1;if(u===r.pO){if(e===o&&n===i)return!0;const t=n+3*a;for(let r=n,l=i;r<t;r++,l++)o[l]=e[r];return!0}const s=n+3*a;for(let t=n,r=i;t<s;t+=3,r+=3)u(e,t,o,r);return!0}},34142:(e,t,n)=>{n.r(t),n.d(t,{default:()=>R});var r=n(4576),o=n(34275),l=n(67026),i=n(82534),a=n(38954),u=n(72385),s=n(16930),c=n(9762),f=(n(44208),n(63531)),d=n(69846),C=n(48425),A=n(59418),h=n(37203);function g(e,t,n){return e?.attributeInfo.useElevation?t?function(e,t){const n=new Float64Array(t);for(let r=0;r<t;r++)n[r]=e[3*r+2];return n}(t,n):null:e?.attributeInfo.storageInfo?(0,A.m0)(e.attributeInfo.storageInfo,e.buffer,n,!0):null}function E(e){switch(e){default:case null:case"none":return e=>e;case"low-four-bit":return e=>15&e;case"high-four-bit":return e=>(240&e)>>4;case"absolute-value":return e=>Math.abs(e);case"modulo-ten":return e=>e%10}}function b(e){let t=0;for(const n of e||[])t|=1<<n;return t}var p=n(57005);class S{transform(e){const t=this._transform(e),n=[t.points.buffer,t.rgb.buffer];null!=t.pointIdFilterMap&&n.push(t.pointIdFilterMap.buffer);for(const e of t.attributes)"buffer"in e.values&&(0,o.mw)(e.values.buffer)&&e.values.buffer!==t.rgb.buffer&&n.push(e.values.buffer);return Promise.resolve({result:t,transferList:n})}_transform(e){const t=function(e,t){if(null==e.encoding||""===e.encoding){const n=(0,A.wH)(t,e);if(null==n.vertexAttributes.position)return;const r=(0,A.MA)(t,n.vertexAttributes.position),o=n.header.fields,l=[o.offsetX,o.offsetY,o.offsetZ],i=[o.scaleX,o.scaleY,o.scaleZ],a=r.length/3,u=new Float64Array(3*a);for(let e=0;e<a;e++)u[3*e]=r[3*e]*i[0]+l[0],u[3*e+1]=r[3*e+1]*i[1]+l[1],u[3*e+2]=r[3*e+2]*i[2]+l[2];return u}if("lepcc-xyz"===e.encoding)return(0,h.Me)(t).result}(e.schema,e.geometryBuffer);let n=t.length/3,o=null;const l=new Array,i=g(e.primaryAttributeData,t,n);null!=e.primaryAttributeData&&i&&l.push({attributeInfo:e.primaryAttributeData.attributeInfo,values:i});const a=g(e.modulationAttributeData,t,n);null!=e.modulationAttributeData&&a&&l.push({attributeInfo:e.modulationAttributeData.attributeInfo,values:a});let u=function(e,t,n,r){const{rendererJSON:o,isRGBRenderer:l}=e;let i=null,a=null;if(t&&l)i=t;else if(t&&"pointCloudUniqueValueRenderer"===o?.type){a=C.A.fromJSON(o);const e=a.colorUniqueValueInfos;i=new Uint8Array(3*r);const n=E(a.fieldTransformType);for(let o=0;o<r;o++){const r=(n?n(t[o]):t[o])+"";for(let t=0;t<e.length;t++)if(e[t].values.includes(r)){i[3*o]=e[t].color.r,i[3*o+1]=e[t].color.g,i[3*o+2]=e[t].color.b;break}}}else if(t&&"pointCloudStretchRenderer"===o?.type){a=d.A.fromJSON(o);const e=a.stops;i=new Uint8Array(3*r);const n=E(a.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o],l=e.length-1;if(r<e[0].value)i[3*o]=e[0].color.r,i[3*o+1]=e[0].color.g,i[3*o+2]=e[0].color.b;else if(r>=e[l].value)i[3*o]=e[l].color.r,i[3*o+1]=e[l].color.g,i[3*o+2]=e[l].color.b;else for(let t=1;t<e.length;t++)if(r<e[t].value){const n=(r-e[t-1].value)/(e[t].value-e[t-1].value);i[3*o]=e[t].color.r*n+e[t-1].color.r*(1-n),i[3*o+1]=e[t].color.g*n+e[t-1].color.g*(1-n),i[3*o+2]=e[t].color.b*n+e[t-1].color.b*(1-n);break}}}else if(t&&"pointCloudClassBreaksRenderer"===o?.type){a=f.A.fromJSON(o);const e=a.colorClassBreakInfos;i=new Uint8Array(3*r);const n=E(a.fieldTransformType);for(let o=0;o<r;o++){const r=n?n(t[o]):t[o];for(let t=0;t<e.length;t++)if(r>=e[t].minValue&&r<=e[t].maxValue){i[3*o]=e[t].color.r,i[3*o+1]=e[t].color.g,i[3*o+2]=e[t].color.b;break}}}else i=new Uint8Array(3*r).fill(255);if(n&&a?.colorModulation){const e=a.colorModulation.minValue,t=a.colorModulation.maxValue,o=.3;for(let l=0;l<r;l++){const r=n[l],a=r>=t?1:r<=e?o:o+(1-o)*(r-e)/(t-e);i[3*l]=a*i[3*l],i[3*l+1]=a*i[3*l+1],i[3*l+2]=a*i[3*l+2]}}return i}(e.rendererInfo,i,a,n);if(e.filterInfo&&e.filterInfo.length>0&&null!=e.filterAttributesData){const i=e.filterAttributesData.filter(r.Ru).map((e=>{const r=g(e,t,n),o={attributeInfo:e.attributeInfo,values:r};return l.push(o),o}));o=new Uint32Array(n),n=function(e,t,n,r,o){const l=e.length/3;let i=0;for(let a=0;a<l;a++){let l=!0;for(let e=0;e<r.length&&l;e++){const{filterJSON:t}=r[e],n=o[e].values[a];switch(t.type){case"pointCloudValueFilter":{const e="exclude"===t.mode;t.values.includes(n)===e&&(l=!1);break}case"pointCloudBitfieldFilter":{const e=b(t.requiredSetBits),r=b(t.requiredClearBits);((n&e)!==e||n&r)&&(l=!1);break}case"pointCloudReturnFilter":{const e=15&n,r=n>>>4&15,o=r>1,i=1===e,a=e===r;let u=!1;for(const e of t.includedReturns)if("last"===e&&a||"firstOfMany"===e&&i&&o||"lastOfMany"===e&&a&&o||"single"===e&&!o){u=!0;break}u||(l=!1);break}}}l&&(n[i]=a,e[3*i]=e[3*a],e[3*i+1]=e[3*a+1],e[3*i+2]=e[3*a+2],t[3*i]=t[3*a],t[3*i+1]=t[3*a+1],t[3*i+2]=t[3*a+2],i++)}return i}(t,u,o,e.filterInfo,i)}for(const r of e.userAttributesData){const e=g(r,t,n);l.push({attributeInfo:r.attributeInfo,values:e})}3*n<u.length&&(u=new Uint8Array(u.buffer.slice(0,3*n))),function(e,t,n){if(0!==n)for(let r=0;r<t;r++)e[3*r+2]+=n}(t,n,e.elevationOffset);const c=y(t,n,p.ab.fromData(e.obbData),s.A.fromJSON(e.inSR),s.A.fromJSON(e.outSR));return{obbData:e.obbData,points:c,rgb:u,attributes:l,pointIdFilterMap:o}}}function y(e,t,n,r,o){if(!(0,c.projectBuffer)(e,r,0,e,o,0,t))throw new Error("Can't reproject");const i=(0,u.o8)(n.center),s=(0,u.vt)(),f=(0,u.vt)(),d=(0,u.o8)(n.halfSize);(0,l.Xr)(w,n.quaternion);const C=new Float32Array(3*t);for(let n=0;n<t;n++){let t=3*n;s[0]=e[t]-i[0],s[1]=e[t+1]-i[1],s[2]=e[t+2]-i[2],(0,a.w)(f,s,w),d[0]=Math.max(d[0],Math.abs(f[0])),d[1]=Math.max(d[1],Math.abs(f[1])),d[2]=Math.max(d[2],Math.abs(f[2])),C[t++]=s[0],C[t++]=s[1],C[t]=s[2]}return n.halfSize=d,C}const w=(0,i.vt)();function R(){return new S}},37203:(e,t,n)=>{n.d(t,{Ax:()=>E,Me:()=>s,mb:()=>A});var r=n(49186);const o=!0,l={identifierOffset:0,identifierLength:10,versionOffset:10,checksumOffset:12,byteCount:16};function i(e,t,n){return{identifier:String.fromCharCode.apply(null,new Uint8Array(e,n+l.identifierOffset,l.identifierLength)),version:t.getUint16(n+l.versionOffset,o),checksum:t.getUint32(n+l.checksumOffset,o)}}const a={sizeLo:0,sizeHi:4,minX:8,minY:16,minZ:24,maxX:32,maxY:40,maxZ:48,errorX:56,errorY:64,errorZ:72,count:80,reserved:84,byteCount:88};function u(e,t){return{sizeLo:e.getUint32(t+a.sizeLo,o),sizeHi:e.getUint32(t+a.sizeHi,o),minX:e.getFloat64(t+a.minX,o),minY:e.getFloat64(t+a.minY,o),minZ:e.getFloat64(t+a.minZ,o),maxX:e.getFloat64(t+a.maxX,o),maxY:e.getFloat64(t+a.maxY,o),maxZ:e.getFloat64(t+a.maxZ,o),errorX:e.getFloat64(t+a.errorX,o),errorY:e.getFloat64(t+a.errorY,o),errorZ:e.getFloat64(t+a.errorZ,o),count:e.getUint32(t+a.count,o),reserved:e.getUint32(t+a.reserved,o)}}function s(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:s}=i(e,t,n);if(n+=l.byteCount,"LEPCC "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(s>1)throw new r.A("lepcc-decode-error","Unknown version");const f=u(t,n);if(n+=a.byteCount,f.sizeHi*2**32+f.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const d=new Float64Array(3*f.count),C=[],A=[],h=[],g=[];if(n=c(e,n,C),n=c(e,n,A),n=c(e,n,h),n=c(e,n,g),n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad length");let E=0,b=0;for(let e=0;e<C.length;e++){b+=C[e];let t=0;for(let n=0;n<A[e];n++){t+=h[E];const e=g[E];d[3*E]=Math.min(f.maxX,f.minX+2*f.errorX*t),d[3*E+1]=Math.min(f.maxY,f.minY+2*f.errorY*b),d[3*E+2]=Math.min(f.maxZ,f.minZ+2*f.errorZ*e),E++}}return{errorX:f.errorX,errorY:f.errorY,errorZ:f.errorZ,result:d}}function c(e,t,n){const r=[];t=f(e,t,r);const o=[];for(let l=0;l<r.length;l++){o.length=0,t=f(e,t,o);for(let e=0;e<o.length;e++)n.push(o[e]+r[l])}return t}function f(e,t,n){const l=new DataView(e,t),i=l.getUint8(0),a=31&i,u=!!(32&i),s=(192&i)>>6;let c=0;if(0===s)c=l.getUint32(1,o),t+=5;else if(1===s)c=l.getUint16(1,o),t+=3;else{if(2!==s)throw new r.A("lepcc-decode-error","Bad count type");c=l.getUint8(1),t+=2}if(u)throw new r.A("lepcc-decode-error","LUT not implemented");const f=Math.ceil(c*a/8),d=new Uint8Array(e,t,f);let C=0,A=0,h=0;const g=-1>>>32-a;for(let e=0;e<c;e++){for(;A<a;)C|=d[h]<<A,A+=8,h+=1;n[e]=C&g,C>>>=a,A-=a,A+a>32&&(C|=d[h-1]>>8-A)}return t+h}const d={sizeLo:0,sizeHi:4,count:8,colorMapCount:12,lookupMethod:14,compressionMethod:15,byteCount:16};function C(e,t){return{sizeLo:e.getUint32(t+d.sizeLo,o),sizeHi:e.getUint32(t+d.sizeHi,o),count:e.getUint32(t+d.count,o),colorMapCount:e.getUint16(t+d.colorMapCount,o),lookupMethod:e.getUint8(t+d.lookupMethod),compressionMethod:e.getUint8(t+d.compressionMethod)}}function A(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:a}=i(e,t,n);if(n+=l.byteCount,"ClusterRGB"!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=C(t,n);if(n+=d.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");if((2===u.lookupMethod||1===u.lookupMethod)&&0===u.compressionMethod){if(3*u.colorMapCount+u.count+n!==e.byteLength||u.colorMapCount>256)throw new r.A("lepcc-decode-error","Bad count");const t=new Uint8Array(e,n,3*u.colorMapCount),o=new Uint8Array(e,n+3*u.colorMapCount,u.count),l=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++){const n=o[e];l[3*e]=t[3*n],l[3*e+1]=t[3*n+1],l[3*e+2]=t[3*n+2]}return l}if(0===u.lookupMethod&&0===u.compressionMethod){if(3*u.count+n!==e.byteLength||0!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");return new Uint8Array(e,n).slice()}if(u.lookupMethod<=2&&1===u.compressionMethod){if(n+3!==e.byteLength||1!==u.colorMapCount)throw new r.A("lepcc-decode-error","Bad count");const o=t.getUint8(n),l=t.getUint8(n+1),i=t.getUint8(n+2),a=new Uint8Array(3*u.count);for(let e=0;e<u.count;e++)a[3*e]=o,a[3*e+1]=l,a[3*e+2]=i;return a}throw new r.A("lepcc-decode-error","Bad method "+u.lookupMethod+","+u.compressionMethod)}const h={sizeLo:0,sizeHi:4,count:8,scaleFactor:12,bitsPerPoint:14,reserved:15,byteCount:16};function g(e,t){return{sizeLo:e.getUint32(t+h.sizeLo,o),sizeHi:e.getUint32(t+h.sizeHi,o),count:e.getUint32(t+h.count,o),scaleFactor:e.getUint16(t+h.scaleFactor,o),bitsPerPoint:e.getUint8(t+h.bitsPerPoint),reserved:e.getUint8(t+h.reserved)}}function E(e){const t=new DataView(e,0);let n=0;const{identifier:o,version:a}=i(e,t,n);if(n+=l.byteCount,"Intensity "!==o)throw new r.A("lepcc-decode-error","Bad identifier");if(a>1)throw new r.A("lepcc-decode-error","Unknown version");const u=g(t,n);if(n+=h.byteCount,u.sizeHi*2**32+u.sizeLo!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const s=new Uint16Array(u.count);if(8===u.bitsPerPoint){if(u.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint8Array(e,n,u.count);for(let e=0;e<u.count;e++)s[e]=t[e]*u.scaleFactor}else if(16===u.bitsPerPoint){if(2*u.count+n!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");const t=new Uint16Array(e,n,u.count);for(let e=0;e<u.count;e++)s[e]=t[e]*u.scaleFactor}else{const t=[];if(f(e,n,t)!==e.byteLength)throw new r.A("lepcc-decode-error","Bad size");for(let e=0;e<u.count;e++)s[e]=t[e]*u.scaleFactor}return s}},37539:(e,t,n)=>{n.d(t,{rz:()=>c,pO:()=>E,jd:()=>A,Tp:()=>h,w5:()=>C});var r=n(34727),o=n(83047),l=n(73941),i=n(79258);Math.PI;const a=i.$O.radius,u=i.$O.eccentricitySquared,s={a1:a*u,a2:a*u*a*u,a3:a*u*u/2,a4:a*u*a*u*2.5,a5:a*u+a*u*u/2,a6:1-u};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius;var c,f=n(21325),d=n(19936);!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.SPHERICAL_ECEF=1]="SPHERICAL_ECEF",e[e.WGS84=2]="WGS84",e[e.WEB_MERCATOR=3]="WEB_MERCATOR",e[e.WGS84_ECEF=4]="WGS84_ECEF",e[e.CGCS2000=5]="CGCS2000",e[e.SPHERICAL_MARS_PCPF=6]="SPHERICAL_MARS_PCPF",e[e.GCSMARS2000=7]="GCSMARS2000",e[e.SPHERICAL_MOON_PCPF=8]="SPHERICAL_MOON_PCPF",e[e.GCSMOON2000=9]="GCSMOON2000",e[e.LON_LAT=10]="LON_LAT",e[e.PLATE_CARREE=11]="PLATE_CARREE"}(c||(c={}));const C={[c.WGS84]:{[c.CGCS2000]:E,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:M,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:p,[c.PLATE_CARREE]:S,[c.WGS84]:E,[c.WGS84_ECEF]:I},[c.CGCS2000]:{[c.CGCS2000]:E,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:M,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:p,[c.PLATE_CARREE]:S,[c.WGS84]:E,[c.WGS84_ECEF]:I},[c.GCSMARS2000]:{[c.CGCS2000]:null,[c.GCSMARS2000]:E,[c.GCSMOON2000]:null,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:O,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.GCSMOON2000]:{[c.CGCS2000]:null,[c.GCSMARS2000]:null,[c.GCSMOON2000]:E,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:R,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.WEB_MERCATOR]:{[c.CGCS2000]:b,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:b,[c.SPHERICAL_ECEF]:function(e,t,n,r){const o=e[t]/G,l=T-2*Math.atan(Math.exp(-e[t+1]/G)),i=G+e[t+2],a=Math.cos(l)*i;n[r]=Math.cos(o)*a,n[r+1]=Math.sin(o)*a,n[r+2]=Math.sin(l)*i},[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:E,[c.PLATE_CARREE]:function(e,t,n,r){b(e,t,n,r),S(n,r,n,r)},[c.WGS84]:b,[c.WGS84_ECEF]:function(e,t,n,r){b(e,t,n,r),I(n,r,n,r)}},[c.WGS84_ECEF]:{[c.CGCS2000]:L,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:L,[c.SPHERICAL_ECEF]:function(e,t,n,r){L(e,t,n,r),M(n,r,n,r)},[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:function(e,t,n,r){L(e,t,n,r),p(n,r,n,r)},[c.PLATE_CARREE]:function(e,t,n,r){L(e,t,n,r),S(n,r,n,r)},[c.WGS84]:L,[c.WGS84_ECEF]:E},[c.SPHERICAL_ECEF]:{[c.CGCS2000]:N,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:N,[c.SPHERICAL_ECEF]:E,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:function(e,t,n,r){N(e,t,n,r),p(n,r,n,r)},[c.PLATE_CARREE]:function(e,t,n,r){N(e,t,n,r),S(n,r,n,r)},[c.WGS84]:N,[c.WGS84_ECEF]:function(e,t,n,r){N(e,t,n,r),I(n,r,n,r)}},[c.SPHERICAL_MARS_PCPF]:{[c.CGCS2000]:null,[c.GCSMARS2000]:_,[c.GCSMOON2000]:null,[c.LON_LAT]:_,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:E,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.SPHERICAL_MOON_PCPF]:{[c.CGCS2000]:null,[c.GCSMARS2000]:null,[c.GCSMOON2000]:P,[c.LON_LAT]:P,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:E,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.UNKNOWN]:{[c.CGCS2000]:null,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:null,[c.SPHERICAL_ECEF]:null,[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:E,[c.WEB_MERCATOR]:null,[c.PLATE_CARREE]:null,[c.WGS84]:null,[c.WGS84_ECEF]:null},[c.LON_LAT]:{[c.CGCS2000]:E,[c.GCSMARS2000]:E,[c.GCSMOON2000]:E,[c.LON_LAT]:E,[c.SPHERICAL_ECEF]:M,[c.SPHERICAL_MARS_PCPF]:O,[c.SPHERICAL_MOON_PCPF]:R,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:p,[c.PLATE_CARREE]:S,[c.WGS84]:E,[c.WGS84_ECEF]:I},[c.PLATE_CARREE]:{[c.CGCS2000]:y,[c.GCSMARS2000]:null,[c.GCSMOON2000]:null,[c.LON_LAT]:y,[c.SPHERICAL_ECEF]:function(e,t,n,r){y(e,t,n,r),M(n,r,n,r)},[c.SPHERICAL_MARS_PCPF]:null,[c.SPHERICAL_MOON_PCPF]:null,[c.UNKNOWN]:null,[c.WEB_MERCATOR]:function(e,t,n,r){y(e,t,n,r),p(n,r,n,r)},[c.PLATE_CARREE]:E,[c.WGS84]:y,[c.WGS84_ECEF]:function(e,t,n,r){y(e,t,n,r),I(n,r,n,r)}}};function A(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(F.source.spatialReference===e&&F.dest.spatialReference===t)return F;const n=g(e,F.source),r=g(t,F.dest);return n===c.UNKNOWN&&r===c.UNKNOWN?(0,f.aI)(e,t)?F.projector=E:F.projector=null:F.projector=C[n][r],F}function g(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,o.GA)(e,1)),(0,l.jA)(e)?t.spatialReferenceId=c.SPHERICAL_ECEF:(0,f.oT)(e)?t.spatialReferenceId=c.WGS84:(0,f.K8)(e)?t.spatialReferenceId=c.WEB_MERCATOR:(0,f.r1)(e)?t.spatialReferenceId=c.PLATE_CARREE:e.wkt===l.Ro.wkt?t.spatialReferenceId=c.WGS84_ECEF:e.wkid===d.Y.CGCS2000?t.spatialReferenceId=c.CGCS2000:e.wkt===l.FY.wkt?t.spatialReferenceId=c.SPHERICAL_MARS_PCPF:e.wkt===l.LJ.wkt?t.spatialReferenceId=c.SPHERICAL_MOON_PCPF:(0,f.q8)(e)?t.spatialReferenceId=c.GCSMARS2000:(0,f.KQ)(e)?t.spatialReferenceId=c.GCSMOON2000:t.spatialReferenceId=c.UNKNOWN):c.UNKNOWN}function E(e,t,n,r){e!==n&&(n[r++]=e[t++],n[r++]=e[t++],n[r]=e[t])}function b(e,t,n,r){n[r]=v*(e[t]/G),n[r+1]=v*(T-2*Math.atan(Math.exp(-e[t+1]/G))),n[r+2]=e[t+2]}function p(e,t,n,o){!function(e,t,n,o,l){const i=.4999999*Math.PI,a=(0,r.qE)(U*e[t+1],-i,i),u=Math.sin(a);n[o++]=U*e[t]*l.radius,n[o++]=l.halfSemiMajorAxis*Math.log((1+u)/(1-u)),n[o]=e[t+2]}(e,t,n,o,i.$O)}function S(e,t,n,r){n[r]=e[t]*W,n[r+1]=e[t+1]*W,n[r+2]=e[t+2]}function y(e,t,n,r){n[r]=e[t]*k,n[r+1]=e[t+1]*k,n[r+2]=e[t+2]}function w(e,t,n,r,o){const l=o+e[t+2],i=U*e[t+1],a=U*e[t],u=Math.cos(i)*l;n[r]=Math.cos(a)*u,n[r+1]=Math.sin(a)*u,n[r+2]=Math.sin(i)*l}function R(e,t,n,r){w(e,t,n,r,i.Sw.radius)}function O(e,t,n,r){w(e,t,n,r,i.sH.radius)}function M(e,t,n,r){w(e,t,n,r,i.$O.radius)}function m(e,t,n,o,l){const i=e[t],a=e[t+1],u=e[t+2],s=Math.sqrt(i*i+a*a+u*u),c=(0,r.YN)(u/(0===s?1:s)),f=Math.atan2(a,i);n[o++]=v*f,n[o++]=v*c,n[o]=s-l}function P(e,t,n,r){m(e,t,n,r,i.Sw.radius)}function _(e,t,n,r){m(e,t,n,r,i.sH.radius)}function N(e,t,n,r){m(e,t,n,r,i.$O.radius)}function I(e,t,n,r){!function(e,t,n,r,o){const l=U*e[t],i=U*e[t+1],a=e[t+2],u=Math.sin(i),s=Math.cos(i),c=o.radius/Math.sqrt(1-o.eccentricitySquared*u*u);n[r++]=(c+a)*s*Math.cos(l),n[r++]=(c+a)*s*Math.sin(l),n[r++]=(c*(1-o.eccentricitySquared)+a)*u}(e,t,n,r,i.$O)}function L(e,t,n,r){const o=s,l=e[t],a=e[t+1],u=e[t+2];let c,f,d,C,A,h,g,E,b,p,S,y,w,R,O,M,m,P,_,N,I;c=Math.abs(u),f=l*l+a*a,d=Math.sqrt(f),C=f+u*u,A=Math.sqrt(C),N=Math.atan2(a,l),h=u*u/C,g=f/C,R=o.a2/A,O=o.a3-o.a4/A,g>.3?(E=c/A*(1+g*(o.a1+R+h*O)/A),_=Math.asin(E),p=E*E,b=Math.sqrt(1-p)):(b=d/A*(1-h*(o.a5-R-g*O)/A),_=Math.acos(b),p=1-b*b,E=Math.sqrt(p)),S=1-i.$O.eccentricitySquared*p,y=i.$O.radius/Math.sqrt(S),w=o.a6*y,R=d-y*b,O=c-w*E,m=b*R+E*O,M=b*O-E*R,P=M/(w/S+m),_+=P,I=m+M*P/2,u<0&&(_=-_),n[r++]=v*N,n[r++]=v*_,n[r]=I}const F={source:{spatialReference:null,spatialReferenceId:c.UNKNOWN,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:c.UNKNOWN,metersPerUnit:1},projector:E},U=(0,r.kU)(1),v=(0,r.KJ)(1),T=.5*Math.PI,G=i.$O.radius,W=G*Math.PI/180,k=180/(G*Math.PI)},40876:(e,t,n)=>{n.d(t,{Eq:()=>C,G1:()=>h,TS:()=>l,Tf:()=>b,V6:()=>o,Vm:()=>A,ay:()=>u,c1:()=>g,c4:()=>i,j5:()=>s,lT:()=>f,oW:()=>c});const r={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function o(e){return!!r[e]||!!r[e.toLowerCase()]}function l(e){return r[e]??r[e.toLowerCase()]}function i(e){return[...l(e)]}function a(e,t,n){n<0&&++n,n>1&&--n;const r=6*n;return r<1?e+(t-e)*r:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}function u(e,t,n,r=1){const o=(e%360+360)%360/360,l=n<=.5?n*(t+1):n+t-n*t,i=2*n-l;return[Math.round(255*a(i,l,o+1/3)),Math.round(255*a(i,l,o)),Math.round(255*a(i,l,o-1/3)),r]}function s(e){const t=e.length>5,n=t?8:4,r=(1<<n)-1,o=t?1:17,l=t?9===e.length:5===e.length;let i=Number("0x"+e.slice(1));if(isNaN(i))return null;const a=[0,0,0,1];let u;return l&&(u=i&r,i>>=n,a[3]=o*u/255),u=i&r,i>>=n,a[2]=o*u,u=i&r,i>>=n,a[1]=o*u,u=i&r,i>>=n,a[0]=o*u,a}function c(e){if("#"!==e[0]||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{const t=parseInt(e.slice(1,2),16),n=parseInt(e.slice(2,3),16),r=parseInt(e.slice(3,4),16),o=5===e.length?15:parseInt(e.slice(4),16);return[t+16*t,n+16*n,r+16*r,(o+16*o)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function f(e){const t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){const e=t[2].split(/\s*,\s*/),n=t[1];if("rgb"===n&&3===e.length||"rgba"===n&&4===e.length){const t=e[0];if("%"===t.charAt(t.length-1)){const t=e.map((e=>2.56*parseFloat(e)));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map((e=>parseFloat(e))))}if("hsl"===n&&3===e.length||"hsla"===n&&4===e.length)return u(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]))}return null}function d(e){return e[0]=g(e[0]),e[1]=g(e[1]),e[2]=g(e[2]),e[3]=4===e.length?h(e[3]):1,e}function C(e){let t=o(e)?l(e):null;return t??=f(e),t??=c(e),t}function A(e){const t=C(e);return null!=t?[t[0]/255,t[1]/255,t[2]/255,t[3]]:null}function h(e){return E(e,0,1)}function g(e){return Math.round(E(e,0,255))}function E(e,t,n){return e=Number(e),isNaN(e)?n:e<t?t:e>n?n:e}const b=2.2},59418:(e,t,n)=>{n.d(t,{wH:()=>g,MA:()=>C,E5:()=>A,m0:()=>b});var r=n(49186),o=n(4718),l=n(53966),i=n(34275),a=n(37203),u=n(46540);const s=()=>l.A.getLogger("esri.views.3d.layers.i3s.I3SBinaryReader");function c(e,t,n){let o="",l=0;for(;l<n;){const i=e[t+l];if(i<128)o+=String.fromCharCode(i),l++;else if(i>=192&&i<224){if(l+1>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Two byte character was truncated.");const a=(31&i)<<6|63&e[t+l+1];o+=String.fromCharCode(a),l+=2}else if(i>=224&&i<240){if(l+2>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(15&i)<<12|(63&e[t+l+1])<<6|63&e[t+l+2];o+=String.fromCharCode(a),l+=3}else{if(!(i>=240&&i<248))throw new r.A("utf8-decode-error","UTF-8 Decode failed. Invalid multi byte sequence.");{if(l+3>=n)throw new r.A("utf8-decode-error","UTF-8 Decode failed. Multi byte character was truncated.");const a=(7&i)<<18|(63&e[t+l+1])<<12|(63&e[t+l+2])<<6|63&e[t+l+3];if(a>=65536){const e=55296+(a-65536>>10),t=56320+(1023&a);o+=String.fromCharCode(e,t)}else o+=String.fromCharCode(a);l+=4}}}return o}function f(e,t){const n={byteOffset:0,byteCount:0,fields:Object.create(null)};let r=0;for(let o=0;o<t.length;o++){const l=t[o],i=l.valueType||l.type,a=S[i];n.fields[l.property]=a(e,r),r+=p[i].BYTES_PER_ELEMENT}return n.byteCount=r,n}function d(e,t,n){const o=[];let l,i,a=0;for(i=0;i<e;i+=1){if(l=t[i],l>0){if(o.push(c(n,a,l-1)),0!==n[a+l-1])throw new r.A("string-array-error","Invalid string array: missing null termination.")}else o.push(null);a+=l}return o}function C(e,t){return new(0,p[t.valueType])(e,t.byteOffset,t.count*t.valuesPerElement)}function A(e,t){if(!e)return null;const n=e[t];return(0,i.IY)(e)?n===i.PI?null:n:(0,i._G)(e)?n===i.h2?null:n:n!=n?null:n}function h(e,t,n){if(t!==e&&s().error(`Invalid ${n} buffer size\n expected: ${e}, actual: ${t})`),t<e)throw new r.A("buffer-too-small","Binary buffer is too small",{expectedSize:e,actualSize:t})}function g(e,t){const n=f(e,t&&t.header);let r=n.byteCount;const o={isDraco:!1,header:n,byteOffset:n.byteCount,byteCount:0,vertexAttributes:{}},l=n.fields,i=null!=l.vertexCount?l.vertexCount:l.count;for(const e of t.ordering){if(!t.vertexAttributes[e])continue;const n={...t.vertexAttributes[e],byteOffset:r,count:i},l=E[e]||"_"+e;o.vertexAttributes[l]=n,r+=w(n.valueType)*n.valuesPerElement*i}const a=l.faceCount;if(t.faces&&a){o.faces={};for(const e of t.ordering){if(!t.faces[e])continue;const n={...t.faces[e],byteOffset:r,count:a};o.faces[e]=n,r+=w(n.valueType)*n.valuesPerElement*a}}const u=l.featureCount;if(t.featureAttributes&&t.featureAttributeOrder&&u){o.featureAttributes={};for(const e of t.featureAttributeOrder){if(!t.featureAttributes[e])continue;const n={...t.featureAttributes[e],byteOffset:r,count:u};o.featureAttributes[e]=n,r+=("UInt64"===n.valueType?8:w(n.valueType))*n.valuesPerElement*u}}return h(r,e.byteLength,"geometry"),o.byteCount=r-o.byteOffset,o}const E={position:u.r.POSITION,normal:u.r.NORMAL,color:u.r.COLOR,uv0:u.r.UV0,region:u.r.UVREGION};function b(e,t,n,l=!1){if("lepcc-rgb"===e.encoding)return l?(0,a.mb)(t):function(e){return Array.isArray(e)?e.length<i.y9?e:new Uint8Array(e):e.length<i.y9?Array.from(e):e}((0,a.mb)(t));if("lepcc-intensity"===e.encoding)return l?(0,a.Ax)(t):function(e){return Array.isArray(e)?e.length<i.y9?e:new Uint16Array(e):e.length<i.y9?Array.from(e):e}((0,a.Ax)(t));if(null!=e.encoding&&""!==e.encoding)throw new r.A("unknown-attribute-storage-info-encoding","Unknown Attribute Storage Info Encoding");e["attributeByteCounts "]&&!e.attributeByteCounts&&(s().warn("Warning: Trailing space in 'attributeByteCounts '."),e.attributeByteCounts=e["attributeByteCounts "]),"ObjectIds"===e.ordering[0]&&e.hasOwnProperty("objectIds")&&(s().warn("Warning: Case error in objectIds"),e.ordering[0]="objectIds");const u=function(e,t,n){const l=null!=t.header?f(e,t.header):{byteOffset:0,byteCount:0,fields:{count:n}},i={header:l,byteOffset:l.byteCount,byteCount:0,entries:Object.create(null)};let a=l.byteCount;for(let e=0;e<t.ordering.length;e++){const n=t.ordering[e],u=(0,o.o8)(t[n]);if(u.count=l.fields.count??0,"String"===u.valueType){if(u.byteOffset=a,u.byteCount=l.fields[n+"ByteCount"],"UTF-8"!==u.encoding)throw new r.A("unsupported-encoding","Unsupported String encoding.",{encoding:u.encoding});if(u.timeEncoding&&"ECMA_ISO8601"!==u.timeEncoding)throw new r.A("unsupported-time-encoding","Unsupported time encoding.",{timeEncoding:u.timeEncoding})}else{if(!y(u.valueType))throw new r.A("unsupported-value-type","Unsupported binary valueType",{valueType:u.valueType});{const e=w(u.valueType);a+=a%e!=0?e-a%e:0,u.byteOffset=a,u.byteCount=e*u.valuesPerElement*u.count}}a+=u.byteCount??0,i.entries[n]=u}return i.byteCount=a-i.byteOffset,i}(t,e,n);h(u.byteOffset+u.byteCount,t.byteLength,"attribute");const c=u.entries.attributeValues||u.entries.objectIds;if(c){if("String"===c.valueType){const e=u.entries.attributeByteCounts,n=C(t,e),r=function(e,t){return new Uint8Array(e,t.byteOffset,t.byteCount)}(t,c);return c.timeEncoding?function(e,t,n){return d(e,t,n).map((e=>{const t=e?Date.parse(e):null;return null==t||Number.isNaN(t)?null:t}))}(e.count,n,r):d(e.count,n,r)}return l?C(t,c):function(e,t){const n=C(e,t);if(n.length>=i.y9)return n;const r=new Array;return n.forEach(((e,t)=>r.push(A(n,t)))),r}(t,c)}throw new r.A("bad-attribute-storage-info","Bad attributeStorageInfo specification.")}const p={Float32:Float32Array,Float64:Float64Array,UInt8:Uint8Array,Int8:Int8Array,UInt16:Uint16Array,Int16:Int16Array,UInt32:Uint32Array,Int32:Int32Array},S={Float32:(e,t)=>new DataView(e,0).getFloat32(t,!0),Float64:(e,t)=>new DataView(e,0).getFloat64(t,!0),UInt8:(e,t)=>new DataView(e,0).getUint8(t),Int8:(e,t)=>new DataView(e,0).getInt8(t),UInt16:(e,t)=>new DataView(e,0).getUint16(t,!0),Int16:(e,t)=>new DataView(e,0).getInt16(t,!0),UInt32:(e,t)=>new DataView(e,0).getUint32(t,!0),Int32:(e,t)=>new DataView(e,0).getInt32(t,!0)};function y(e){return p.hasOwnProperty(e)}function w(e){return y(e)?p[e].BYTES_PER_ELEMENT:0}},72385:(e,t,n)=>{function r(){return new Float32Array(3)}function o(e){const t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function l(e,t,n){const r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}function i(){return r()}function a(){return l(1,1,1)}function u(){return l(1,0,0)}function s(){return l(0,1,0)}function c(){return l(0,0,1)}n.d(t,{fA:()=>l,o8:()=>o,vt:()=>r});const f=i(),d=a(),C=u(),A=s(),h=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:d,UNIT_X:C,UNIT_Y:A,UNIT_Z:h,ZEROS:f,clone:o,create:r,fromValues:l,ones:a,unitX:u,unitY:s,unitZ:c,zeros:i},Symbol.toStringTag,{value:"Module"}))},93223:(e,t,n)=>{n.d(t,{e:()=>l});var r=n(66552),o=n(10107);function l(e,t={}){const n=e instanceof r.J?e:new r.J(e,t),{alwaysWriteDefaults:l,default:i,ignoreUnknown:a=!0,name:u,nonNullable:s,readOnly:c=!1}=t;return(0,o.MZ)({type:a?n.apiValues:String,json:{type:n.jsonValues,default:i,name:u,read:!c&&{reader:n.read},write:{writer:n.write,alwaysWriteDefaults:l}},nonNullable:s,readOnly:c})}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4123,4755,6760,7136],{5834:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},7320:(e,t,s)=>{s.d(t,{g:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,s)=>{s.d(t,{G:()=>F});var i=s(4718),r=s(88930),n=s(12359),a=s(90634),o=s(62577),l=s(21325),u=s(29441),c=s(51441),h=s(30524),d=s(87445),p=s(1873),m=s(43668);class f{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=(0,u.Wq)(t),r=this.fieldsIndex.get(i),n=r?null:(0,u.j4)(i,s),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,s=!0){const i=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&s&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),i&&Number.isFinite(n)){const s="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,i,s,r)}return n}))}async getExpressionValues(e,t,s,i,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(s),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.executeFunction(o,h)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var y=s(31464),g=s(58727);function _(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function x(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}var T=s(5834),I=s(59977),v=s(11440),S=s(60909);const R="bin";class F{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,this.items,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...(0,y.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,s){const i=this.featureAdapter,r=w(this.hasZ,this.hasM),{point:n,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,d=this._getPointCreator(a,t,this.spatialReference,s),p=new A(null,0),m=new A(null,0),f={x:0,y:0,z:0};for(const t of this.items){const s=i.getGeometry(t);if(null==s)continue;const{coords:a}=s,y=s.isPoint?b:s.lengths;if(p.coords=a,m.coords=a,e.returnEdge){let e=0;for(let s=0;s<y.length;s++){const a=y[s],h=e;for(let s=0;s<a;s++,e+=r){if(!c&&s===a-1)continue;const y=p;y.coordsIndex=e;const g=m;g.coordsIndex=s===a-1?h:e+r;const _=f;if(!E(f,n,y,g))continue;const T=(n.x-_.x)/o,I=(n.y-_.y)/l,v=T*T+I*I;v<=1&&u.candidates.push(x(i.getObjectId(t),d(_),Math.sqrt(v),d(y),d(g)))}}}if("all"===e.vertexMode){let e=0;for(let s=0;s<y.length;s++){const a=y[s],h=e,f=m;f.coordsIndex=h;for(let s=0;s<a;s++,e+=r){const r=p;if(r.coordsIndex=e,c&&s===a-1&&r.x===f.x&&r.y===f.y)continue;const h=(n.x-r.x)/o,m=(n.y-r.y)/l,y=h*h+m*m;y<=1&&u.candidates.push(_(i.getObjectId(t),d(r),Math.sqrt(y)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const s=[];for(let t=0;t<y.length;t++){s.push(e);const i=y[t];e+=i*r,!c&&i>1&&s.push(e-r)}for(const e of s){const s=p;s.coordsIndex=e;const r=(n.x-s.x)/o,a=(n.y-s.y)/l,c=r*r+a*a;c<=1&&u.candidates.push(_(i.getObjectId(t),d(s),Math.sqrt(c)))}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s,i){const r=null==i||(0,l.aI)(s,i)?e=>e:e=>(0,y.Cv)(e,s,i),{hasZ:n}=this;return"3d"===e?n&&t?({x:e,y:t,z:s})=>r({x:e,y:t,z:s}):({x:e,y:t})=>r({x:e,y:t,z:0}):({x:e,y:t})=>r({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),m=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},_=(0,h.yM)(d)?(0,p.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,p.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.slice().reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:l,outSR:u,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:s,hasM:i&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const s=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=i&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,i)=>s.getFieldValue(e,t,i))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const i of I){const r=this.featureAdapter.getGeometry(i),n={attributes:s.getAttributes(i),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_),metadata:this.featureAdapter.getMetadata?.(i)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(i,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of I){const t=s.getAttributes(e);t&&(x[T++]={attributes:t})}const v=d||0;if(null!=p){const e=v+p;x=x.slice(v,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,s=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>s)e=!0;else{const t=w(this.hasZ,this.hasM),s=this.featureAdapter;e=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/t>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,s={attributes:{}}){const i=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:m}=e,y=c?.length,g=!!y,_=g?c[0]:null,x=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,T="percentile_disc"===p||"percentile_cont"===p,I="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,v=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const s of c){const i=this._getAttributeValues(l,s,t,r);e.push(i)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const s=Object.keys(e);for(const i of s){const{count:s,data:n,items:a,itemPositions:h}=e[i],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[s]=t}else{let i=null;if(v)i=s;else{const e=this._getAttributeValues(l,f,t,r),s=h.map((t=>e[t]));i=T&&"statisticParameters"in m?this._getPercentileValue(m,s):this._getStatisticValue(m,s,null,l.returnDistinctValues)}e.attributes[u]=i}let i=0;c.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++i]=n[s])),o.set(p,e)}}}else if(I){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(m,t);s.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,f,t,r);s.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;i.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[s];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:i,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(9930),s.e(9940)]).then(s.bind(s,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map((e=>(0,c.pL)(d,p,m,u.getGeometry(e)))),y=i(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.HA)(r(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:i}):(0,p.G_)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s,i){if(i.has(t))return i.get(t);const r=this.fieldsIndex.get(t),n=s.map((s=>e.getFieldValue(s,t,r)));return i.set(t,n),n}_calculateUniqueValues(e,t,s){const i={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==i[o]?i[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s||i[o].count++,i[o].items.push(r),i[o].itemPositions.push(n))}return i}async _getDataValues(e,t,s=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,i.o8)(e),s)}async _calculateHistogramBins(e,t,s){if(null==t.min&&null==t.max)return[];const i=t.intervals,r=t.min??0,n=t.max??0,a=i.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=s[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(i,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:s,outAlias:i,valueType:r}=t,n=[],a=[{name:i??s,alias:i??s,type:r??"esriFieldTypeString"},{name:R,alias:R,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[s],((e,t,s)=>o.getFieldValue(e,t,s)));const c=this._getAttributeValues(o,s,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map((e=>({...e,attributes:{...e.attributes,[i??s]:t}})))),o.fields)for(const e of o.fields)a.some((t=>t.name===e.name))||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const s=e.bin;switch(t=t??this.items,s.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(s),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(s),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(v.A.fromJSON(s),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(s),e,t)}}async _createAutoIntervalBinsResponse(e,t,s){const{field:i,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),h=(0,p.sU)(c,{field:i,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,g.dO)(l,!1),maxValue:(0,g.dO)(u,!1)}),d=await this._calculateHistogramBins(c,h,s);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,s){const{field:i,interval:n,start:a,end:o}=e,l=n.unit,u="quarters"===l?3*r.vf.months:r.vf[l],c=n.value*u/r.vf.milliseconds,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},s),m=(0,h.OH)(this.fieldsIndex.get(i)),f=(0,p.sU)(d,{field:i,classificationMethod:"defined-interval",definedInterval:c,minValue:(0,g.dO)(a,m),maxValue:(0,g.dO)(o,m)},!0),y=await this._calculateHistogramBins(d,f,s);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,s){const{field:i}=e,r=await this._getDataValues({field:i,timeZone:t.outTimeReference?.ianaTimeZone},s),n=(0,h.OH)(this.fieldsIndex.get(i)),a=e.boundaries.map((e=>(0,g.dO)(e,n))).sort(((e,t)=>e-t)),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=await this._calculateHistogramBins(r,l,s);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,s){const{field:i,interval:r,start:n,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),l=(0,h.OH)(this.fieldsIndex.get(i)),u=(0,p.sU)(o,{field:i,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,g.dO)(n,l),maxValue:(0,g.dO)(a,l)},!0),c=await this._calculateHistogramBins(o,u,s);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:s,lowerBoundaryAlias:i}=t,r=i||"lowerBoundary",n=s||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:R,alias:R,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const s of e){const{minValue:e,maxValue:i,items:h}=s,d={attributes:{}};let p;if(d.attributes[r]=e,d.attributes[n]=i,l?(p=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),d.attributes[R]=++c,"flat"===t.bin.jsonStyle?a.push(...p.features.map((({attributes:{EXPR_1:e,...t},...s})=>({...s,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=p.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),a.push(d))):(t.bin?.splitBy&&(d.attributes[R]=++c),p=await this._createStatisticsQueryResponse(t,h,d),a.push(d)),p.fields)for(const e of p.fields)o.some((t=>t.name===e.name))||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function E(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=t.x-s.x,o=t.y-s.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=s.x+r*c,e.y=s.y+n*c,!0}function w(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const b=[1]},11006:(e,t,s)=>{function i(e,t,s,i,n){r(e,t,s||0,i||e.length-1,n||a)}function r(e,t,s,i,a){for(;i>s;){if(i-s>600){var o=i-s+1,l=t-s+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(s,Math.floor(t-l*c/o+h)),Math.min(i,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=s,m=i;for(n(e,s,t),a(e[i],d)>0&&n(e,s,i);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[s],d)?n(e,s,m):n(e,++m,i),m<=t&&(s=m+1),t<=m&&(i=m-1)}}function n(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function a(e,t){return e<t?-1:e>t?1:0}s.d(t,{q:()=>i})},11440:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,s){(0,r.sM)(s,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,i._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,i._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c);const h=c;c.from=(0,a.dp)(c)},17136:(e,t,s)=>{s.d(t,{O7:()=>S,el:()=>v});var i=s(92602),r=s(49186),n=s(53966),a=s(39829),o=s(82799),l=s(80754),u=s(21325),c=s(28735),h=s(78888),d=s(65864),p=s(2272),m=s(84952),f=s(92300);const y=()=>n.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A("internal:geometry",e)}const s=(0,l.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const r=e[i][0],n=e[i][1],a=e[i+1][0],o=e[i+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,a=c*i+r,o=u*i+n;s.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,i=c*e+r,a=u*e+n;s.push([i,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new o.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function T(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const r=t.cutIndexes[i],n=t.geometries[i],a=(0,l.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=n.getPoint(e,s);n.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(r===s){if(g(e))for(const t of(0,l.r8)(n))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(n))e[r]=e[r].addPath(t)}else s=r,e[r]=n}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let n,g,_,S,R,F,E,w,A=0;const b=[],M=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,g=(0,u.Vp)(n),_=n.isWebMercator,F=_?102100:4326,S=l.j7[F].maxX,R=l.j7[F].minX,E=l.j7[F].plus180Line,w=l.j7[F].minus180Line),g)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(T(t.clone(),S,R));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,S,R))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);M.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,R)*(2*S);let i=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(E)&&n!==S?(A=n>A?n:A,i=x(i,_),b.push(i),M.push("cut")):e.intersects(w)&&r!==R?(A=n*(2*S)>A?n*(2*S):A,i=x(i,_,360),b.push(i),M.push("cut")):M.push(i)}else M.push(t.clone());else M.push(t);else M.push(t);let N=(0,l.kd)(A,S),C=-90;const O=N,P=new o.A;for(;N>0;){const e=360*N-180;P.addPath([[e,C],[e,-1*C]]),C*=-1,N--}if(b.length>0&&O>0){const t=I(b,await async function(e,t,s,i){const r=(0,p.Dl)(e),n=t[0].spatialReference,a={...i,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(n),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=n,t}))}}(r,b,P,s)),i=[],n=[];for(let s=0;s<M.length;s++){const r=M[s];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(i.push(r),n.push("simplify")):n.push(_?(0,c.Gh)(r):r)}}if(!i.length)return n;const a=await async function(e,t,s){const i="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,n=(0,d.$B)(t[0]),a={...s,query:{...i.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,f.X)(t))}},{data:o}=await(0,h.A)(i.path+"/simplify",a);return(0,f.V)(o.geometries,n,r)}(r,i,s),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const D=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)D.push(t);else{const e=b.shift();D.push(!0===_?(0,c.Gh)(e):e)}}return D}function S(e,t,s){const i=(0,u.Vp)(s);if(null==i)return e;const[r,n]=i.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let c=e+(o-l)*a;const h=c-t;return h>n?c-=a:h<r&&(c+=a),c}},29441:(e,t,s)=>{s.d(t,{MG:()=>_,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>m,j4:()=>f,vl:()=>u});var i=s(49186),r=s(44123),n=s(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,s={}){const r=f(t,e);if(!r){const s=a.getError(t,e);throw new i.A(o,"invalid SQL expression",{expression:t,error:s})}const n=s.expressionName||"expression";if(s.validateStandardized&&!r.isStandardized)throw new i.A(o,`${n} is not standard`,{expression:t});if(s.validateAggregate&&!r.isAggregate)throw new i.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function p(e,t,s,i){if(!s)return!0;const r="where clause";return _(e,t,d(e,s,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:i}),!0}function m(e,t,s,r,n){if(!s)return!0;const a="having clause",l=d(e,s,{validateAggregate:!0,expressionName:a});_(e,t,l,{expressionName:a,query:n});const u=f(s,e),c=u?.getExpressions().every((t=>{const{aggregateType:s,field:i}=t,n=e.get(i)?.name;return r.some((t=>{const{onStatisticField:i,statisticType:r}=t,a=e.get(i)?.name;return a===n&&r.toLowerCase().trim()===s}))}));if(!c)throw new i.A(o,"expressions in having clause should also exist in outStatistics",{having:s});return!0}function f(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function _(e,t,s,r={}){const n=new Map;if(function(e,t,s,i,r){const n=r.includes("*")?[...s,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))x(e,t,s,i,r);else try{const n=d(t,y(r),{validateStandardized:!0});for(const r of n)x(e,t,s,i,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??h,s),n.size){const e=r.expressionName??"expression";throw new i.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function x(e,t,s,i,r){const a=t.get(r);a?s.has(a.name)?"all"!==i&&!1===i?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(i,(e=>n.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},31464:(e,t,s)=>{s.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var i=s(4576),r=s(74887),n=s(80586),a=s(7320),o=s(21325),l=s(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function p(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.Ru):[e];await(0,n.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,s,i){if(!e)return null;if(s||(s=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(s)||(0,o.aI)(t,s))return e;if((0,l.y7)(t,s)){const t=(0,o.K8)(s)?m(e):f(e);return t.spatialReference=s,t}return(0,n.projectMany)(a.g,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e?.length||!t||!s||(0,o.aI)(t,s))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.y7)(s,i)?(0,o.K8)(i)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s,i){return g.push(e,t,s,i)}},41266:(e,t,s)=>{s.d(t,{A:()=>g});var i=s(90237),r=s(69540),n=s(66552),a=s(25482),o=s(10107),l=(s(44208),s(53966),s(87811),s(93223)),u=s(40608),c=s(56507);const h=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,i._)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,i._)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,i._)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const m=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,i._)([(0,l.e)(m,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,i._)([(0,l.e)(f)],y.prototype,"transformation",void 0),y=(0,i._)([(0,u.$)("esri.rest.support.BinParametersBase")],y);const g=y},41366:(e,t,s)=>{s.d(t,{K:()=>d,Q:()=>u});var i=s(90237),r=s(66552),n=s(53966),a=s(10107),o=(s(44208),s(87811),s(93223)),l=s(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,s=null!=this.normalizationTotal;return t||s?(e=t&&h||s&&c||null,t&&s&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},44123:(e,t,s)=>{s.r(t),s.d(t,{WhereClauseCache:()=>n});var i=s(66344),r=s(88368);class n{constructor(e,t){this._cache=new i.q(e),this._invalidCache=new i.q(t)}get(e,t){const s=`${t?.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(null!=this._invalidCache.get(s))return null;try{const i=r.A.create(e,{fieldsIndex:t});return this._cache.put(s,i),i}catch(e){return this._invalidCache.put(s,e),null}}getError(e,t){const s=`${t?.uid}:${e}`;return this._invalidCache.get(s)??null}}},44794:(e,t,s)=>{s.d(t,{v:()=>o});var i=s(4718),r=s(62788),n=s(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.gh){return new a(e,t)}},51441:(e,t,s)=>{s.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var i=s(90708),r=s(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:i.DF,esriGeometryPolyline:i.BW,esriGeometryPolygon:i.z5,esriGeometryMultipoint:i.qK};function u(e,t,s,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(s){const u=(0,i.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,n);return(0,i.DF)(u,a,l)}return(0,i.DF)(t,a,l)}function c(e,t,s,r,u,c,h=t,d=s){const p=t&&h,m=s&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,i.kz)(a,f,t,s,e,u,h,d);return c&&(r=(0,i.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,i.Nl)(o,f,t,s,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,i.Q4)(n,f,t,s,h,d),l[e]?.(n,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},58727:(e,t,s)=>{s.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>x,iJ:()=>f,v8:()=>p});var i=s(49186),r=s(66552),n=s(83047),a=s(80586),o=s(90634),l=s(65864),u=s(17136),c=s(21325),h=s(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,s){const i=e.bin;return i.onField&&(i.onField=i.onField.trim()),i.onExpression?.value&&(i.onExpression.value=i.onExpression.value.trim()),i.splitBy&&(i.splitBy.value&&(i.splitBy.value=i.splitBy.value.trim()),i.splitBy.outAlias&&(i.splitBy.outAlias=i.splitBy.outAlias.trim())),i.stackBy&&(i.stackBy.value&&(i.stackBy.value=i.stackBy.value.trim()),i.stackBy.outAlias&&(i.stackBy.outAlias=i.stackBy.outAlias.trim())),"normalizationField"in i.parameters&&i.parameters.normalizationField&&(i.parameters.normalizationField=i.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,s)}async function y(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,s)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?d.fromJSON(r):(0,n.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then((()=>(0,h.Cv)(a,c.KK))),m=await s.e(9159).then(s.bind(s,49159));await m.load();const f=m.execute(p,t||1,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new i.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const s=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,i=s&&_(m,r)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=(0,h.Cv)(n,n.spatialReference,r,i);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function _(e,t){if(!e)return!1;const s=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(s,t)&&!(0,a.canProjectWithoutEngine)(s,t)}function x(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,s)=>{s.d(t,{A:()=>x});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(69540),h=s(66552),d=s(25482);const p=(0,h.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let m=class extends(c.A.ClonableMixin(d.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,i._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,i._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,s){(0,r.sM)(s,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const s=e.parameters[t];return s?"string"==typeof s?s:new Date(s):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=null,this.start=null,this.snapToData=null,this.type="date"}};(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:y}}})],_.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],_.prototype,"returnFullIntervalBin",void 0),(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:y}}})],_.prototype,"start",void 0),(0,i._)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],_.prototype,"snapToData",void 0),(0,i._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,i._)([(0,l.$)("esri.rest.support.DateBinParameters")],_);const x=_;_.from=(0,a.dp)(_)},60909:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},62660:(e,t,s)=>{s.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var i=s(49186),r=s(94078),n=s(12176),a=s(65864),o=s(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(90708),p=s(92722),m=s(51441),f=s(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(7360)]).then(s.bind(s,55284)),esriSpatialRelContains:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1867)]).then(s.bind(s,29127)),esriSpatialRelCrosses:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9700)]).then(s.bind(s,85672)),esriSpatialRelDisjoint:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1598)]).then(s.bind(s,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1414)]).then(s.bind(s,46178)),esriSpatialRelTouches:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(2503)]).then(s.bind(s,83547)),esriSpatialRelWithin:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9265)]).then(s.bind(s,85445)),esriSpatialRelRelation:null};async function x(e,t,s,i,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===s){const s=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(s,!1,!1,e,i,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(s,i,o,e));if("esriGeometryMultipoint"===s&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(s,i,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=s)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(s,i,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(s,i,o,e))}async function T(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new i.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(s)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new i.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new i.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function I(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,s)=>{s.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var i=s(49186),r=s(29441),n=s(31464),a=s(62660),o=s(43668);const l="unsupported-query";async function u(e,t){const s=e.bin;if(!s.onField&&!s.onExpression?.value||"autoIntervalBin"===s.type&&null==s.parameters.numberOfBins||"dateBin"===s.type&&(null==s.parameters.number||null==s.parameters.unit)||"fixedBoundariesBin"===s.type&&null==s.parameters.boundaries||"fixedIntervalBin"===s.type&&null==s.parameters.interval)throw new i.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:s,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,s){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=s,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new i.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:s});(0,r.eD)(e,t,o,n,s)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:s}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:s});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:s});else{const{statisticParameters:e}=a;if(!e)throw new i.A(l,"statisticParameters should be set for percentile type",{definition:a,query:s})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,s,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,s){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=s,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const i=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(i)?t.split(i)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:s})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:s,allowedFieldTypes:"all"});else if(o)throw new i.A(l,"outFields should be specified for returnDistinctValues",{query:s});(0,r.SN)(e,t,s.where,s)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:s,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.A(l,"Unsupported query options",{query:e});return h(s,u,e),Promise.all([m(s,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,s,n){let a=[];if(s.valueExpression){const{arcadeUtils:e}=await(0,o.l)();a=e.extractFieldNames(s.valueExpression)}if(s.field&&a.push(s.field),s.field2&&a.push(s.field2),s.field3&&a.push(s.field3),s.normalizationField&&a.push(s.normalizationField),!a.length&&!s.valueExpression)throw new i.A(l,"field or valueExpression is required",{params:s});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},68298:(e,t,s)=>{s.d(t,{do:()=>oe,ux:()=>le});var i=s(4576),r=s(21818),n=s(49186),a=(s(44208),s(25482)),o=s(4718),l=s(97768),u=s(74887),c=s(83047),h=s(80586),d=s(70328),p=s(19419),m=s(537),f=s(65864),y=s(21325),g=s(90708),_=s(29441),x=s(51441),T=s(31464);class I{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[s,i]of this._storage){if(!(i.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(s)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new S(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let v=0;class S{constructor(e){this.items=e,this.time=performance.now(),this.id=v++}}var R=s(99352),F=s(8384),E=s(58727),w=s(62798),A=s(62660),b=s(86420),M=s(95466),N=s(71511),C=s(53966),O=s(61604),P=s(3694),D=s(36708),B=s(44794),G=s(78659);const k=Symbol("Yield");class z{constructor(){this._tasks=new Array,this._runningTasks=(0,B.v)(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return k;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.push(new L(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}unshift(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.unshift(new L(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,u.G4)(t.signal);if(s&&!t.abortCallback)t.reject((0,u.NK)());else{const i=s?t.abortCallback?.((0,u.NK)()):t.callback(e);(0,u.$X)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,u.NK)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0}}class L{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var V=s(90237),q=s(69622),Q=s(10107),U=(s(87811),s(40608));let j=class extends q.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,V._)([(0,Q.MZ)()],j.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,V._)([(0,Q.MZ)()],j.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),j=(0,V._)([(0,U.$)("esri.views.support.debugFlags")],j);const Z=new j;var H,W,Y;(Y=H||(H={}))[Y.ANIMATING=0]="ANIMATING",Y[Y.INTERACTING=1]="INTERACTING",Y[Y.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(W||(W={}));const $=new Map([[W.RESOURCE_CONTROLLER_IMMEDIATE,0],[W.RESOURCE_CONTROLLER,4],[W.SLIDE,0],[W.STREAM_DATA_LOADER,0],[W.ELEVATION_QUERY,0],[W.TERRAIN_SURFACE,1],[W.SURFACE_GEOMETRY_UPDATES,1],[W.LOD_RENDERER,2],[W.GRAPHICS_CORE,2],[W.I3S_CONTROLLER,2],[W.POINT_CLOUD_LAYER,2],[W.FEATURE_TILE_FETCHER,2],[W.CLOUDS_GENERATOR,2],[W.OVERLAY,4],[W.STAGE,4],[W.GRAPHICS_DECONFLICTOR,4],[W.FILTER_VISIBILITY,4],[W.SCALE_VISIBILITY,4],[W.FRUSTUM_VISIBILITY,4],[W.POINT_OF_INTEREST_FREQUENT,6],[W.POINT_OF_INTEREST_INFREQUENT,30],[W.LABELER,8],[W.FEATURE_QUERY_ENGINE,8],[W.FEATURE_TILE_TREE,16],[W.FEATURE_TILE_TREE_ACTIVE,0],[W.ELEVATION_ALIGNMENT,12],[W.ELEVATION_ALIGNMENT_SCENE,14],[W.TEXT_TEXTURE_ATLAS,12],[W.TEXTURE_UNLOAD,12],[W.LINE_OF_SIGHT_TOOL,16],[W.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[W.SNAPPING,0],[W.SHADOW_ACCUMULATOR,30],[W.MAPVIEW_FETCH_QUEUE,0],[W.MAPVIEW_LAYERVIEW_UPDATE,2],[W.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function J(e){return $.has(e)?$.get(e):"number"==typeof e?e:1}const K=(0,G.l5)(6.5),X=(0,G.l5)(1),ee=(0,G.l5)(30),te=(0,G.l5)(1e3/30),se=(0,G.l5)(100);var ie,re;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,B.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new O.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=H.INTERACTING,this._tasks=new P.A,this._runQueue=new P.A,this._load=0,this._idleStateCallbacks=new P.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,D.wB)((()=>Z.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),D.Vh);for(const e of Object.keys(W))this.performanceInfo.tasks.set(W[e],new O.A(W[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,l.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())})))}registerTask(e,s){const i=new t(this,e,s);return this._tasks.push(i),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new O.A(e)),i}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===H.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===H.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==H.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=K,s=e.frameDuration,i=X;switch(this.state){case H.IDLE:t=(0,G.l5)(0),s=(0,G.l5)(Math.max(se,e.frameDuration)),i=ee;break;case H.INTERACTING:s=(0,G.l5)(Math.max(te,e.frameDuration));case H.ANIMATING:}return s=(0,G.l5)(s-e.elapsedFrameTime-t),this.state!==H.IDLE&&s<X&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,G.l5)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case H.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case H.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,G.l5)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return re.SCHEDULED;let t=re.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=re.READY:t!==re.READY&&(t=re.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===k&&(t.blockFrame=this._frameNumber)}catch(e){C.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,W.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const s=this._budget.now()-e;if(t.runtime+=s,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+s),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(W))this._frameTaskTimes.set(W[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).push(e))),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new z,this._handles=new N.A,this._basePriority=J(t),this.schedulePriority=this._basePriority,this._task=(0,B.v)(null!=s?s:this._queue),this._handles.add((0,D.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(ne),this._scheduler.removeTask(this),this.schedule=ae.schedule,this.reschedule=ae.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=J(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=H.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ie||(ie={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(re||(re={}));const ne=new ie.Budget;ne.enabled=!1;const ae=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,u.G4)(t)){const e=(0,u.NK)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,u.z7)(e(ne))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}};class oe{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new I,this.timeInfo=e.timeInfo,this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=a.A.isSerializable(e.fieldsIndex)?e.fieldsIndex:M.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,l.xt)(this._changeHandle),this._frameTask=(0,l.xt)(this._frameTask),this._clearCache(),(0,l.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=(0,u.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(e){if(e!==E.v8)throw e;return 0}}async executeQueryForExtent(e,t){const s=(0,u.Mq)(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===E.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this.reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(e){if(e===E.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const s=(0,u.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},s);return await this.reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const s=(0,u.Mq)(t);let i;e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,E.iJ)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s);i=await this.reschedule((()=>this._executeGeometryQuery(e,t,s)),s),await this.reschedule((()=>this._executeAggregateIdsQuery(i)),s),await this.reschedule((()=>this.executeObjectIdsQuery(i)),s),await this.reschedule((()=>this.executeTimeQuery(i)),s),await this.reschedule((()=>this.executeAttributesQuery(i)),s)}catch(t){if(t!==E.v8)throw t;i=new F.G([],e,this)}return i.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=(0,u.Mq)(s),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,u.Mq)(e);this._timeExtentPromise||=(0,b.W)(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.Te)(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,(e=>(0,d.RF)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,x.ag)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const n=(0,T.Cv)(r,t,s);if(n.spatialReference=(0,x.ag)(s),n.xmax-n.xmin==0){const e=(0,c.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,c.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,c.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(ne)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(ne)}async _getAllFeaturesQueryEngineResult(e){return new F.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>(0,r.zI)(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,o.o8)(e),e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,y.aI)(n,a.spatialReference)?a:(0,T.Cv)(a,n);if(!o)return null;const l=i||r,u=(0,y.fn)(s)&&!(0,y.aI)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this.reschedule((()=>this.searchFeatures(le(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await(0,A.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new F.G(n,e,this)}),t);return u(r)}if(!h.length)return new F.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new F.G(h,e,this));const d=await(0,A.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new F.G(p,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new F.G(u,e,this);const c=(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,y.aI)(p,r.spatialReference)?r:(0,T.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const f=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(le(r))),s);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of g)i.add(f.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),s),n=await this.reschedule((async()=>{const t=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!i.has(f.getObjectId(e))||t(f.getGeometry(e))),s);return new F.G(n,e,this)}),s);return d(n)}if(null!=t){const e=new i.vW;g=g.filter((s=>(0,i.qh)(t.items,s,t.items.length,e)>=0))}if(!g.length){const t=new F.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new F.G(g,e,this));const x=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),I=await this.runSpatialFilter(g,(e=>x(f.getGeometry(e))),s);return d(new F.G(I,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,b.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),s)}};return this.reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),o=n.get(e);(!o||i>a(o,r))&&n.set(e,s)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:s,returnGeometry:i,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=i||r;return(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n)&&l?JSON.stringify([t,s,n]):JSON.stringify([t,s])}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,T.lK)(e.items.map((e=>(0,x.pL)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=(0,r.zI)(n.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,g.Ux)(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this)}}get test(){}}function le(e){if((0,A.tC)(e)){if((0,f.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,f.Bi)(e))return e.rings.map((e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,m.Rg)((0,p.vt)(),e)]}},80754:(e,t,s)=>{s.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var i=s(82799),r=s(16930),n=s(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},86420:(e,t,s)=>{s.d(t,{I:()=>n,W:()=>r});var i=s(21818);async function r(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=s.getAttribute((0,i.zI)(e),r),l=s.getAttribute((0,i.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=s.getAttribute((0,i.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e(n,t),o=e(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const n=e(r,t);return null!=n&&n>=s&&n<=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r>=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r<=i}:void 0}(o,i||r,n,a)}},92300:(e,t,s)=>{s.d(t,{V:()=>n,X:()=>r});var i=s(65864);function r(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function n(e,t,s){const r=(0,i.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},99352:(e,t,s)=>{s.d(t,{F:()=>i,P:()=>r});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4123,4755,6760,7136],{5834:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},7320:(e,t,s)=>{s.d(t,{g:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,s)=>{s.d(t,{G:()=>F});var i=s(4718),r=s(88930),n=s(12359),a=s(90634),o=s(62577),l=s(21325),u=s(29441),c=s(51441),h=s(30524),d=s(87445),p=s(1873),m=s(43668);class f{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=(0,u.Wq)(t),r=this.fieldsIndex.get(i),n=r?null:(0,u.j4)(i,s),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,s=!0){const i=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&s&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),i&&Number.isFinite(n)){const s="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,i,s,r)}return n}))}async getExpressionValues(e,t,s,i,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(s),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.executeFunction(o,h)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var y=s(31464),g=s(58727);function _(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function x(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}var T=s(5834),I=s(59977),v=s(11440),S=s(60909);const R="bin";class F{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,this.items,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...(0,y.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t,s){const i=this.featureAdapter,r=w(this.hasZ,this.hasM),{point:n,mode:a}=e,o="number"==typeof e.distance?e.distance:e.distance.x,l="number"==typeof e.distance?e.distance:e.distance.y,u={candidates:[]},c="esriGeometryPolygon"===this.geometryType,h="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,d=this._getPointCreator(a,t,this.spatialReference,s),p=new A(null,0),m=new A(null,0),f={x:0,y:0,z:0};for(const t of this.items){const s=i.getGeometry(t);if(null==s)continue;const{coords:a}=s,y=s.isPoint?b:s.lengths;if(p.coords=a,m.coords=a,e.returnEdge){let e=0;for(let s=0;s<y.length;s++){const a=y[s],h=e;for(let s=0;s<a;s++,e+=r){if(!c&&s===a-1)continue;const y=p;y.coordsIndex=e;const g=m;g.coordsIndex=s===a-1?h:e+r;const _=f;if(!E(f,n,y,g))continue;const T=(n.x-_.x)/o,I=(n.y-_.y)/l,v=T*T+I*I;v<=1&&u.candidates.push(x(i.getObjectId(t),d(_),Math.sqrt(v),d(y),d(g)))}}}if("all"===e.vertexMode){let e=0;for(let s=0;s<y.length;s++){const a=y[s],h=e,f=m;f.coordsIndex=h;for(let s=0;s<a;s++,e+=r){const r=p;if(r.coordsIndex=e,c&&s===a-1&&r.x===f.x&&r.y===f.y)continue;const h=(n.x-r.x)/o,m=(n.y-r.y)/l,y=h*h+m*m;y<=1&&u.candidates.push(_(i.getObjectId(t),d(r),Math.sqrt(y)))}}}else if(h&&"ends"===e.vertexMode){let e=0;const s=[];for(let t=0;t<y.length;t++){s.push(e);const i=y[t];e+=i*r,!c&&i>1&&s.push(e-r)}for(const e of s){const s=p;s.coordsIndex=e;const r=(n.x-s.x)/o,a=(n.y-s.y)/l,c=r*r+a*a;c<=1&&u.candidates.push(_(i.getObjectId(t),d(s),Math.sqrt(c)))}}}return u.candidates.sort(((e,t)=>e.distance-t.distance)),u}_getPointCreator(e,t,s,i){const r=null==i||(0,l.aI)(s,i)?e=>e:e=>(0,y.Cv)(e,s,i),{hasZ:n}=this;return"3d"===e?n&&t?({x:e,y:t,z:s})=>r({x:e,y:t,z:s}):({x:e,y:t})=>r({x:e,y:t,z:0}):({x:e,y:t})=>r({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),m=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},_=(0,h.yM)(d)?(0,p.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,p.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.slice().reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:l,outSR:u,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:s,hasM:i&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const s=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=i&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,i)=>s.getFieldValue(e,t,i))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const i of I){const r=this.featureAdapter.getGeometry(i),n={attributes:s.getAttributes(i),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_),metadata:this.featureAdapter.getMetadata?.(i)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(i,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of I){const t=s.getAttributes(e);t&&(x[T++]={attributes:t})}const v=d||0;if(null!=p){const e=v+p;x=x.slice(v,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,s=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>s)e=!0;else{const t=w(this.hasZ,this.hasM),s=this.featureAdapter;e=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/t>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,s={attributes:{}}){const i=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:m}=e,y=c?.length,g=!!y,_=g?c[0]:null,x=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,T="percentile_disc"===p||"percentile_cont"===p,I="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,v=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const s of c){const i=this._getAttributeValues(l,s,t,r);e.push(i)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const s=Object.keys(e);for(const i of s){const{count:s,data:n,items:a,itemPositions:h}=e[i],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[s]=t}else{let i=null;if(v)i=s;else{const e=this._getAttributeValues(l,f,t,r),s=h.map((t=>e[t]));i=T&&"statisticParameters"in m?this._getPercentileValue(m,s):this._getStatisticValue(m,s,null,l.returnDistinctValues)}e.attributes[u]=i}let i=0;c.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++i]=n[s])),o.set(p,e)}}}else if(I){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(m,t);s.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,f,t,r);s.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;i.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[s];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:i,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(9930),s.e(9940)]).then(s.bind(s,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map((e=>(0,c.pL)(d,p,m,u.getGeometry(e)))),y=i(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.HA)(r(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:i}):(0,p.G_)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s,i){if(i.has(t))return i.get(t);const r=this.fieldsIndex.get(t),n=s.map((s=>e.getFieldValue(s,t,r)));return i.set(t,n),n}_calculateUniqueValues(e,t,s){const i={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==i[o]?i[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s||i[o].count++,i[o].items.push(r),i[o].itemPositions.push(n))}return i}async _getDataValues(e,t,s=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,i.o8)(e),s)}async _calculateHistogramBins(e,t,s){if(null==t.min&&null==t.max)return[];const i=t.intervals,r=t.min??0,n=t.max??0,a=i.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=s[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(i,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:s,outAlias:i,valueType:r}=t,n=[],a=[{name:i??s,alias:i??s,type:r??"esriFieldTypeString"},{name:R,alias:R,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[s],((e,t,s)=>o.getFieldValue(e,t,s)));const c=this._getAttributeValues(o,s,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map((e=>({...e,attributes:{...e.attributes,[i??s]:t}})))),o.fields)for(const e of o.fields)a.some((t=>t.name===e.name))||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const s=e.bin;switch(t=t??this.items,s.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(s),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(s),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(v.A.fromJSON(s),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(s),e,t)}}async _createAutoIntervalBinsResponse(e,t,s){const{field:i,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),h=(0,p.sU)(c,{field:i,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,g.dO)(l,!1),maxValue:(0,g.dO)(u,!1)}),d=await this._calculateHistogramBins(c,h,s);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,s){const{field:i,interval:n,start:a,end:o}=e,l=n.unit,u="quarters"===l?3*r.vf.months:r.vf[l],c=n.value*u/r.vf.milliseconds,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},s),m=(0,h.OH)(this.fieldsIndex.get(i)),f=(0,p.sU)(d,{field:i,classificationMethod:"defined-interval",definedInterval:c,minValue:(0,g.dO)(a,m),maxValue:(0,g.dO)(o,m)},!0),y=await this._calculateHistogramBins(d,f,s);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,s){const{field:i}=e,r=await this._getDataValues({field:i,timeZone:t.outTimeReference?.ianaTimeZone},s),n=(0,h.OH)(this.fieldsIndex.get(i)),a=e.boundaries.map((e=>(0,g.dO)(e,n))).sort(((e,t)=>e-t)),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=await this._calculateHistogramBins(r,l,s);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,s){const{field:i,interval:r,start:n,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),l=(0,h.OH)(this.fieldsIndex.get(i)),u=(0,p.sU)(o,{field:i,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,g.dO)(n,l),maxValue:(0,g.dO)(a,l)},!0),c=await this._calculateHistogramBins(o,u,s);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:s,lowerBoundaryAlias:i}=t,r=i||"lowerBoundary",n=s||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:R,alias:R,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const s of e){const{minValue:e,maxValue:i,items:h}=s,d={attributes:{}};let p;if(d.attributes[r]=e,d.attributes[n]=i,l?(p=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),d.attributes[R]=++c,"flat"===t.bin.jsonStyle?a.push(...p.features.map((({attributes:{EXPR_1:e,...t},...s})=>({...s,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=p.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),a.push(d))):(t.bin?.splitBy&&(d.attributes[R]=++c),p=await this._createStatisticsQueryResponse(t,h,d),a.push(d)),p.fields)for(const e of p.fields)o.some((t=>t.name===e.name))||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function E(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=t.x-s.x,o=t.y-s.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=s.x+r*c,e.y=s.y+n*c,!0}function w(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const b=[1]},11006:(e,t,s)=>{function i(e,t,s,i,n){r(e,t,s||0,i||e.length-1,n||a)}function r(e,t,s,i,a){for(;i>s;){if(i-s>600){var o=i-s+1,l=t-s+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(s,Math.floor(t-l*c/o+h)),Math.min(i,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=s,m=i;for(n(e,s,t),a(e[i],d)>0&&n(e,s,i);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[s],d)?n(e,s,m):n(e,++m,i),m<=t&&(s=m+1),t<=m&&(i=m-1)}}function n(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function a(e,t){return e<t?-1:e>t?1:0}s.d(t,{q:()=>i})},11440:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,s){(0,r.sM)(s,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,i._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,i._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c);const h=c;c.from=(0,a.dp)(c)},17136:(e,t,s)=>{s.d(t,{O7:()=>S,el:()=>v});var i=s(92602),r=s(49186),n=s(53966),a=s(39829),o=s(82799),l=s(80754),u=s(21325),c=s(28735),h=s(78888),d=s(65864),p=s(2272),m=s(84952),f=s(92300);const y=()=>n.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A("internal:geometry",e)}const s=(0,l.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const r=e[i][0],n=e[i][1],a=e[i+1][0],o=e[i+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,a=c*i+r,o=u*i+n;s.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,i=c*e+r,a=u*e+n;s.push([i,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new o.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function T(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const r=t.cutIndexes[i],n=t.geometries[i],a=(0,l.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=n.getPoint(e,s);n.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(r===s){if(g(e))for(const t of(0,l.r8)(n))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(n))e[r]=e[r].addPath(t)}else s=r,e[r]=n}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let n,g,_,S,R,F,E,w,A=0;const b=[],M=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,g=(0,u.Vp)(n),_=n.isWebMercator,F=_?102100:4326,S=l.j7[F].maxX,R=l.j7[F].minX,E=l.j7[F].plus180Line,w=l.j7[F].minus180Line),g)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(T(t.clone(),S,R));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,S,R))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);M.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,R)*(2*S);let i=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(E)&&n!==S?(A=n>A?n:A,i=x(i,_),b.push(i),M.push("cut")):e.intersects(w)&&r!==R?(A=n*(2*S)>A?n*(2*S):A,i=x(i,_,360),b.push(i),M.push("cut")):M.push(i)}else M.push(t.clone());else M.push(t);else M.push(t);let N=(0,l.kd)(A,S),C=-90;const O=N,P=new o.A;for(;N>0;){const e=360*N-180;P.addPath([[e,C],[e,-1*C]]),C*=-1,N--}if(b.length>0&&O>0){const t=I(b,await async function(e,t,s,i){const r=(0,p.Dl)(e),n=t[0].spatialReference,a={...i,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(n),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=n,t}))}}(r,b,P,s)),i=[],n=[];for(let s=0;s<M.length;s++){const r=M[s];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(i.push(r),n.push("simplify")):n.push(_?(0,c.Gh)(r):r)}}if(!i.length)return n;const a=await async function(e,t,s){const i="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,n=(0,d.$B)(t[0]),a={...s,query:{...i.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,f.X)(t))}},{data:o}=await(0,h.A)(i.path+"/simplify",a);return(0,f.V)(o.geometries,n,r)}(r,i,s),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const D=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)D.push(t);else{const e=b.shift();D.push(!0===_?(0,c.Gh)(e):e)}}return D}function S(e,t,s){const i=(0,u.Vp)(s);if(null==i)return e;const[r,n]=i.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let c=e+(o-l)*a;const h=c-t;return h>n?c-=a:h<r&&(c+=a),c}},29441:(e,t,s)=>{s.d(t,{MG:()=>_,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>m,j4:()=>f,vl:()=>u});var i=s(49186),r=s(44123),n=s(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,s={}){const r=f(t,e);if(!r){const s=a.getError(t,e);throw new i.A(o,"invalid SQL expression",{expression:t,error:s})}const n=s.expressionName||"expression";if(s.validateStandardized&&!r.isStandardized)throw new i.A(o,`${n} is not standard`,{expression:t});if(s.validateAggregate&&!r.isAggregate)throw new i.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function p(e,t,s,i){if(!s)return!0;const r="where clause";return _(e,t,d(e,s,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:i}),!0}function m(e,t,s,r,n){if(!s)return!0;const a="having clause",l=d(e,s,{validateAggregate:!0,expressionName:a});_(e,t,l,{expressionName:a,query:n});const u=f(s,e),c=u?.getExpressions().every((t=>{const{aggregateType:s,field:i}=t,n=e.get(i)?.name;return r.some((t=>{const{onStatisticField:i,statisticType:r}=t,a=e.get(i)?.name;return a===n&&r.toLowerCase().trim()===s}))}));if(!c)throw new i.A(o,"expressions in having clause should also exist in outStatistics",{having:s});return!0}function f(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function _(e,t,s,r={}){const n=new Map;if(function(e,t,s,i,r){const n=r.includes("*")?[...s,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))x(e,t,s,i,r);else try{const n=d(t,y(r),{validateStandardized:!0});for(const r of n)x(e,t,s,i,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??h,s),n.size){const e=r.expressionName??"expression";throw new i.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function x(e,t,s,i,r){const a=t.get(r);a?s.has(a.name)?"all"!==i&&!1===i?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(i,(e=>n.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},31464:(e,t,s)=>{s.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var i=s(4576),r=s(74887),n=s(80586),a=s(7320),o=s(21325),l=s(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function p(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.Ru):[e];await(0,n.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,s,i){if(!e)return null;if(s||(s=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(s)||(0,o.aI)(t,s))return e;if((0,l.y7)(t,s)){const t=(0,o.K8)(s)?m(e):f(e);return t.spatialReference=s,t}return(0,n.projectMany)(a.g,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e?.length||!t||!s||(0,o.aI)(t,s))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.y7)(s,i)?(0,o.K8)(i)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s,i){return g.push(e,t,s,i)}},41266:(e,t,s)=>{s.d(t,{A:()=>g});var i=s(90237),r=s(69540),n=s(66552),a=s(25482),o=s(10107),l=(s(44208),s(53966),s(87811),s(93223)),u=s(40608),c=s(56507);const h=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,i._)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,i._)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,i._)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const m=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,i._)([(0,l.e)(m,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,i._)([(0,l.e)(f)],y.prototype,"transformation",void 0),y=(0,i._)([(0,u.$)("esri.rest.support.BinParametersBase")],y);const g=y},41366:(e,t,s)=>{s.d(t,{K:()=>d,Q:()=>u});var i=s(90237),r=s(66552),n=s(53966),a=s(10107),o=(s(44208),s(87811),s(93223)),l=s(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,s=null!=this.normalizationTotal;return t||s?(e=t&&h||s&&c||null,t&&s&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},44123:(e,t,s)=>{s.r(t),s.d(t,{WhereClauseCache:()=>n});var i=s(66344),r=s(88368);class n{constructor(e,t){this._cache=new i.q(e),this._invalidCache=new i.q(t)}get(e,t){const s=`${t?.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(null!=this._invalidCache.get(s))return null;try{const i=r.A.create(e,{fieldsIndex:t});return this._cache.put(s,i),i}catch(e){return this._invalidCache.put(s,e),null}}getError(e,t){const s=`${t?.uid}:${e}`;return this._invalidCache.get(s)??null}}},44794:(e,t,s)=>{s.d(t,{v:()=>o});var i=s(4718),r=s(62788),n=s(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.gh){return new a(e,t)}},51441:(e,t,s)=>{s.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var i=s(90708),r=s(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:i.DF,esriGeometryPolyline:i.BW,esriGeometryPolygon:i.z5,esriGeometryMultipoint:i.qK};function u(e,t,s,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(s){const u=(0,i.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,n);return(0,i.DF)(u,a,l)}return(0,i.DF)(t,a,l)}function c(e,t,s,r,u,c,h=t,d=s){const p=t&&h,m=s&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,i.kz)(a,f,t,s,e,u,h,d);return c&&(r=(0,i.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,i.Nl)(o,f,t,s,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,i.Q4)(n,f,t,s,h,d),l[e]?.(n,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},58727:(e,t,s)=>{s.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>x,iJ:()=>f,v8:()=>p});var i=s(49186),r=s(66552),n=s(83047),a=s(80586),o=s(90634),l=s(65864),u=s(17136),c=s(21325),h=s(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,s){const i=e.bin;return i.onField&&(i.onField=i.onField.trim()),i.onExpression?.value&&(i.onExpression.value=i.onExpression.value.trim()),i.splitBy&&(i.splitBy.value&&(i.splitBy.value=i.splitBy.value.trim()),i.splitBy.outAlias&&(i.splitBy.outAlias=i.splitBy.outAlias.trim())),i.stackBy&&(i.stackBy.value&&(i.stackBy.value=i.stackBy.value.trim()),i.stackBy.outAlias&&(i.stackBy.outAlias=i.stackBy.outAlias.trim())),"normalizationField"in i.parameters&&i.parameters.normalizationField&&(i.parameters.normalizationField=i.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,s)}async function y(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,s)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?d.fromJSON(r):(0,n.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then((()=>(0,h.Cv)(a,c.KK))),m=await s.e(9159).then(s.bind(s,49159));await m.load();const f=m.execute(p,t||1,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new i.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const s=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,i=s&&_(m,r)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=(0,h.Cv)(n,n.spatialReference,r,i);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function _(e,t){if(!e)return!1;const s=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(s,t)&&!(0,a.canProjectWithoutEngine)(s,t)}function x(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,s)=>{s.d(t,{A:()=>x});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(69540),h=s(66552),d=s(25482);const p=(0,h.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let m=class extends(c.A.ClonableMixin(d.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,i._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,i._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,s){(0,r.sM)(s,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const s=e.parameters[t];return s?"string"==typeof s?s:new Date(s):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=null,this.start=null,this.snapToData=null,this.type="date"}};(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:y}}})],_.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],_.prototype,"returnFullIntervalBin",void 0),(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:y}}})],_.prototype,"start",void 0),(0,i._)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],_.prototype,"snapToData",void 0),(0,i._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,i._)([(0,l.$)("esri.rest.support.DateBinParameters")],_);const x=_;_.from=(0,a.dp)(_)},60909:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},62660:(e,t,s)=>{s.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var i=s(49186),r=s(94078),n=s(12176),a=s(65864),o=s(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(90708),p=s(92722),m=s(51441),f=s(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(7360)]).then(s.bind(s,55284)),esriSpatialRelContains:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1867)]).then(s.bind(s,29127)),esriSpatialRelCrosses:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9700)]).then(s.bind(s,85672)),esriSpatialRelDisjoint:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1598)]).then(s.bind(s,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1414)]).then(s.bind(s,46178)),esriSpatialRelTouches:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(2503)]).then(s.bind(s,83547)),esriSpatialRelWithin:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9265)]).then(s.bind(s,85445)),esriSpatialRelRelation:null};async function x(e,t,s,i,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===s){const s=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(s,!1,!1,e,i,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(s,i,o,e));if("esriGeometryMultipoint"===s&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(s,i,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=s)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(s,i,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(s,i,o,e))}async function T(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new i.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(s)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new i.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new i.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function I(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,s)=>{s.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var i=s(49186),r=s(29441),n=s(31464),a=s(62660),o=s(43668);const l="unsupported-query";async function u(e,t){const s=e.bin;if(!s.onField&&!s.onExpression?.value||"autoIntervalBin"===s.type&&null==s.parameters.numberOfBins||"dateBin"===s.type&&(null==s.parameters.number||null==s.parameters.unit)||"fixedBoundariesBin"===s.type&&null==s.parameters.boundaries||"fixedIntervalBin"===s.type&&null==s.parameters.interval)throw new i.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:s,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,s){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=s,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new i.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:s});(0,r.eD)(e,t,o,n,s)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:s}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:s});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:s});else{const{statisticParameters:e}=a;if(!e)throw new i.A(l,"statisticParameters should be set for percentile type",{definition:a,query:s})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,s,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,s){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=s,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const i=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(i)?t.split(i)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:s})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:s,allowedFieldTypes:"all"});else if(o)throw new i.A(l,"outFields should be specified for returnDistinctValues",{query:s});(0,r.SN)(e,t,s.where,s)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:s,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.A(l,"Unsupported query options",{query:e});return h(s,u,e),Promise.all([m(s,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,s,n){let a=[];if(s.valueExpression){const{arcadeUtils:e}=await(0,o.l)();a=e.extractFieldNames(s.valueExpression)}if(s.field&&a.push(s.field),s.field2&&a.push(s.field2),s.field3&&a.push(s.field3),s.normalizationField&&a.push(s.normalizationField),!a.length&&!s.valueExpression)throw new i.A(l,"field or valueExpression is required",{params:s});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},68298:(e,t,s)=>{s.d(t,{do:()=>oe,ux:()=>le});var i=s(4576),r=s(21818),n=s(49186),a=(s(44208),s(25482)),o=s(4718),l=s(97768),u=s(74887),c=s(83047),h=s(80586),d=s(70328),p=s(19419),m=s(537),f=s(65864),y=s(21325),g=s(90708),_=s(29441),x=s(51441),T=s(31464);class I{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[s,i]of this._storage){if(!(i.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(s)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new S(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let v=0;class S{constructor(e){this.items=e,this.time=performance.now(),this.id=v++}}var R=s(99352),F=s(8384),E=s(58727),w=s(62798),A=s(62660),b=s(86420),M=s(95466),N=s(71511),C=s(53966),O=s(61604),P=s(3694),D=s(36708),B=s(44794),G=s(78659);const k=Symbol("Yield");class z{constructor(){this._tasks=new Array,this._runningTasks=(0,B.v)(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return k;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.push(new L(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}unshift(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.unshift(new L(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,u.G4)(t.signal);if(s&&!t.abortCallback)t.reject((0,u.NK)());else{const i=s?t.abortCallback?.((0,u.NK)()):t.callback(e);(0,u.$X)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,u.NK)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0}}class L{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var V=s(90237),q=s(69622),Q=s(10107),U=(s(87811),s(40608));let j=class extends q.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,V._)([(0,Q.MZ)()],j.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,V._)([(0,Q.MZ)()],j.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),j=(0,V._)([(0,U.$)("esri.views.support.debugFlags")],j);const Z=new j;var H,W,Y;(Y=H||(H={}))[Y.ANIMATING=0]="ANIMATING",Y[Y.INTERACTING=1]="INTERACTING",Y[Y.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}(W||(W={}));const $=new Map([[W.RESOURCE_CONTROLLER_IMMEDIATE,0],[W.RESOURCE_CONTROLLER,4],[W.SLIDE,0],[W.STREAM_DATA_LOADER,0],[W.ELEVATION_QUERY,0],[W.TERRAIN_SURFACE,1],[W.SURFACE_GEOMETRY_UPDATES,1],[W.LOD_RENDERER,2],[W.GRAPHICS_CORE,2],[W.I3S_CONTROLLER,2],[W.POINT_CLOUD_LAYER,2],[W.FEATURE_TILE_FETCHER,2],[W.CLOUDS_GENERATOR,2],[W.OVERLAY,4],[W.STAGE,4],[W.GRAPHICS_DECONFLICTOR,4],[W.FILTER_VISIBILITY,4],[W.SCALE_VISIBILITY,4],[W.FRUSTUM_VISIBILITY,4],[W.POINT_OF_INTEREST_FREQUENT,6],[W.POINT_OF_INTEREST_INFREQUENT,30],[W.LABELER,8],[W.FEATURE_QUERY_ENGINE,8],[W.FEATURE_TILE_TREE,16],[W.FEATURE_TILE_TREE_ACTIVE,0],[W.ELEVATION_ALIGNMENT,12],[W.ELEVATION_ALIGNMENT_SCENE,14],[W.TEXT_TEXTURE_ATLAS,12],[W.TEXTURE_UNLOAD,12],[W.LINE_OF_SIGHT_TOOL,16],[W.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[W.SNAPPING,0],[W.SHADOW_ACCUMULATOR,30],[W.MAPVIEW_FETCH_QUEUE,0],[W.MAPVIEW_LAYERVIEW_UPDATE,2],[W.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function J(e){return $.has(e)?$.get(e):"number"==typeof e?e:1}const K=(0,G.l5)(6.5),X=(0,G.l5)(1),ee=(0,G.l5)(30),te=(0,G.l5)(1e3/30),se=(0,G.l5)(100);var ie,re;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,B.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new O.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=H.INTERACTING,this._tasks=new P.A,this._runQueue=new P.A,this._load=0,this._idleStateCallbacks=new P.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,D.wB)((()=>Z.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),D.Vh);for(const e of Object.keys(W))this.performanceInfo.tasks.set(W[e],new O.A(W[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,l.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())})))}registerTask(e,s){const i=new t(this,e,s);return this._tasks.push(i),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new O.A(e)),i}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===H.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===H.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==H.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=K,s=e.frameDuration,i=X;switch(this.state){case H.IDLE:t=(0,G.l5)(0),s=(0,G.l5)(Math.max(se,e.frameDuration)),i=ee;break;case H.INTERACTING:s=(0,G.l5)(Math.max(te,e.frameDuration));case H.ANIMATING:}return s=(0,G.l5)(s-e.elapsedFrameTime-t),this.state!==H.IDLE&&s<X&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,G.l5)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case H.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case H.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,G.l5)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return re.SCHEDULED;let t=re.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=re.READY:t!==re.READY&&(t=re.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===k&&(t.blockFrame=this._frameNumber)}catch(e){C.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,W.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const s=this._budget.now()-e;if(t.runtime+=s,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+s),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys(W))this._frameTaskTimes.set(W[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).push(e))),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new z,this._handles=new N.A,this._basePriority=J(t),this.schedulePriority=this._basePriority,this._task=(0,B.v)(null!=s?s:this._queue),this._handles.add((0,D.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(ne),this._scheduler.removeTask(this),this.schedule=ae.schedule,this.reschedule=ae.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=J(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=H.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ie||(ie={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(re||(re={}));const ne=new ie.Budget;ne.enabled=!1;const ae=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,u.G4)(t)){const e=(0,u.NK)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,u.z7)(e(ne))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}};class oe{constructor(e){this._changeHandle=null,this.capabilities={query:R.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new I,this.timeInfo=e.timeInfo,this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=a.A.isSerializable(e.fieldsIndex)?e.fieldsIndex:M.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,l.xt)(this._changeHandle),this._frameTask=(0,l.xt)(this._frameTask),this._clearCache(),(0,l.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=(0,u.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(e){if(e!==E.v8)throw e;return 0}}async executeQueryForExtent(e,t){const s=(0,u.Mq)(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===E.v8)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this.reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(e){if(e===E.v8)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const s=(0,u.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},s);return await this.reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const s=(0,u.Mq)(t);let i;e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,E.iJ)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s);i=await this.reschedule((()=>this._executeGeometryQuery(e,t,s)),s),await this.reschedule((()=>this._executeAggregateIdsQuery(i)),s),await this.reschedule((()=>this.executeObjectIdsQuery(i)),s),await this.reschedule((()=>this.executeTimeQuery(i)),s),await this.reschedule((()=>this.executeAttributesQuery(i)),s)}catch(t){if(t!==E.v8)throw t;i=new F.G([],e,this)}return i.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=(0,u.Mq)(s),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,u.Mq)(e);this._timeExtentPromise||=(0,b.W)(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.Te)(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,(e=>(0,d.RF)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,x.ag)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const n=(0,T.Cv)(r,t,s);if(n.spatialReference=(0,x.ag)(s),n.xmax-n.xmin==0){const e=(0,c.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,c.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,c.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(ne)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(ne)}async _getAllFeaturesQueryEngineResult(e){return new F.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>(0,r.zI)(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,o.o8)(e),e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,y.aI)(n,a.spatialReference)?a:(0,T.Cv)(a,n);if(!o)return null;const l=i||r,u=(0,y.fn)(s)&&!(0,y.aI)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this.reschedule((()=>this.searchFeatures(le(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await(0,A.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new F.G(n,e,this)}),t);return u(r)}if(!h.length)return new F.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new F.G(h,e,this));const d=await(0,A.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new F.G(p,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new F.G(u,e,this);const c=(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,y.aI)(p,r.spatialReference)?r:(0,T.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const f=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(le(r))),s);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of g)i.add(f.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),s),n=await this.reschedule((async()=>{const t=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!i.has(f.getObjectId(e))||t(f.getGeometry(e))),s);return new F.G(n,e,this)}),s);return d(n)}if(null!=t){const e=new i.vW;g=g.filter((s=>(0,i.qh)(t.items,s,t.items.length,e)>=0))}if(!g.length){const t=new F.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new F.G(g,e,this));const x=await(0,A.xt)(_,m,this.geometryType,this.hasZ,this.hasM),I=await this.runSpatialFilter(g,(e=>x(f.getGeometry(e))),s);return d(new F.G(I,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,b.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),s)}};return this.reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),o=n.get(e);(!o||i>a(o,r))&&n.set(e,s)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:s,returnGeometry:i,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=i||r;return(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n)&&l?JSON.stringify([t,s,n]):JSON.stringify([t,s])}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,A.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,T.lK)(e.items.map((e=>(0,x.pL)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=(0,r.zI)(n.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,g.Ux)(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,E.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,w.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}catch(t){if(t!==E.v8)throw t;return new F.G([],e,this)}}get test(){}}function le(e){if((0,A.tC)(e)){if((0,f.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,f.Bi)(e))return e.rings.map((e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,m.Rg)((0,p.vt)(),e)]}},80754:(e,t,s)=>{s.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var i=s(82799),r=s(16930),n=s(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},86420:(e,t,s)=>{s.d(t,{I:()=>n,W:()=>r});var i=s(21818);async function r(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=s.getAttribute((0,i.zI)(e),r),l=s.getAttribute((0,i.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=s.getAttribute((0,i.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e(n,t),o=e(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const n=e(r,t);return null!=n&&n>=s&&n<=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r>=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r<=i}:void 0}(o,i||r,n,a)}},92300:(e,t,s)=>{s.d(t,{V:()=>n,X:()=>r});var i=s(65864);function r(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function n(e,t,s){const r=(0,i.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},99352:(e,t,s)=>{s.d(t,{F:()=>i,P:()=>r});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);
|