@arcgis/core 6.0.0-next.56 → 6.0.0-next.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00c227bcecc28fe278bb.js +1 -0
- package/assets/esri/core/workers/chunks/{88df1b8b295d3aed649f.js → 10499abb7678e95d9f05.js} +1 -1
- package/assets/esri/core/workers/chunks/1afc8820c283ef785729.js +1 -0
- package/assets/esri/core/workers/chunks/1c874f86bfd0963aa3d2.js +1 -0
- package/assets/esri/core/workers/chunks/2a84c9a81ec2bed3d4e5.js +1 -0
- package/assets/esri/core/workers/chunks/2f31766bc0f9d1d70c5a.js +1 -0
- package/assets/esri/core/workers/chunks/35109db6a6be66f895f7.js +1 -0
- package/assets/esri/core/workers/chunks/373b140f92eda3857f82.js +1 -0
- package/assets/esri/core/workers/chunks/38bba952c38af5a150e7.js +1 -0
- package/assets/esri/core/workers/chunks/3aea09191b737dc1de70.js +1 -0
- package/assets/esri/core/workers/chunks/3fc4b7d0ee460fc96176.js +1 -0
- package/assets/esri/core/workers/chunks/457bd1bd37c67b61efe8.js +1 -0
- package/assets/esri/core/workers/chunks/601d668e70c5d72fe58c.js +1 -0
- package/assets/esri/core/workers/chunks/651e33be8bb3995d749f.js +1 -0
- package/assets/esri/core/workers/chunks/721f43554b9654481de7.js +1 -0
- package/assets/esri/core/workers/chunks/75274ac3ddf7c45f47d7.js +1 -0
- package/assets/esri/core/workers/chunks/80d1267606383ae537f2.js +1 -0
- package/assets/esri/core/workers/chunks/8920d0b11951b57d6a66.js +1 -0
- package/assets/esri/core/workers/chunks/92d97e0fcc20dd5f5ac4.js +1 -0
- package/assets/esri/core/workers/chunks/9ca84fa9423654061d05.js +1 -0
- package/assets/esri/core/workers/chunks/9e372af03d62fa5ad10e.js +1 -0
- package/assets/esri/core/workers/chunks/b10c534cbe311d17b7d5.js +1 -0
- package/assets/esri/core/workers/chunks/{dfa1b0308e5e82d1ddfe.js → be0133fa63c5d6545a7f.js} +1 -1
- package/assets/esri/core/workers/chunks/cb0e3614b78c78040662.js +1 -0
- package/assets/esri/core/workers/chunks/d22e3b5d836dffdf91cc.js +1 -0
- package/assets/esri/core/workers/chunks/e0341def2d81e679a200.js +1 -0
- package/assets/esri/core/workers/chunks/e42e9dd3c933f5f864ab.js +1 -0
- package/assets/esri/core/workers/chunks/f4fcf87da4495584223d.js +1 -0
- package/assets/esri/core/workers/chunks/f989588dfdbb69056491.js +1 -0
- package/assets/esri/core/workers/chunks/fc5b920f9756e11c2f88.js +1 -0
- package/chunks/Component.glsl.js +1 -0
- package/chunks/GlobalIllumination.glsl.js +12 -11
- package/chunks/GlobalIlluminationBlur.glsl.js +6 -4
- package/chunks/Terrain.glsl.js +24 -23
- package/chunks/Water.glsl.js +24 -23
- package/config.js +1 -1
- package/core/memoryEstimations.js +1 -1
- package/interfaces.d.ts +0 -1
- package/kernel.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/transferFeatures.js +1 -1
- package/layers/support/fieldUtils.d.ts +129 -57
- package/layers/support/fieldUtils.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/support/TopologyValidationJobInfo.js +1 -1
- package/package.json +2 -2
- package/views/3d/GroundView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/GroundAndIMSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/CenterOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/lastFrameUniforms.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +15 -12
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/globalIllumination/globalIlluminationUniforms.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/getWaterColor.glsl.js +89 -0
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/assets/esri/core/workers/chunks/193a73a2c7f4f8482c21.js +0 -1
- package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +0 -1
- package/assets/esri/core/workers/chunks/2d4788be418a4e5f6606.js +0 -1
- package/assets/esri/core/workers/chunks/333140b18aeb5a50b654.js +0 -1
- package/assets/esri/core/workers/chunks/4761cd436abceee858bf.js +0 -1
- package/assets/esri/core/workers/chunks/4de08ead94660025075b.js +0 -1
- package/assets/esri/core/workers/chunks/56f227e1a9e51d1fd742.js +0 -1
- package/assets/esri/core/workers/chunks/5bd451c7db17ee8f0315.js +0 -1
- package/assets/esri/core/workers/chunks/5c34d49a6c9cc34b7626.js +0 -1
- package/assets/esri/core/workers/chunks/62ddd3a82864e26f009a.js +0 -1
- package/assets/esri/core/workers/chunks/703373f529c1c334cfad.js +0 -1
- package/assets/esri/core/workers/chunks/733c32d8091427d84de7.js +0 -1
- package/assets/esri/core/workers/chunks/860552f49f17de2f3353.js +0 -1
- package/assets/esri/core/workers/chunks/9b727f45dfea84357b57.js +0 -1
- package/assets/esri/core/workers/chunks/a05a2c2aaf0c288f9681.js +0 -1
- package/assets/esri/core/workers/chunks/ab76170c374fd67ce8cd.js +0 -1
- package/assets/esri/core/workers/chunks/aebd12488b4004e207a3.js +0 -1
- package/assets/esri/core/workers/chunks/c7b1c6d57603fa385c54.js +0 -1
- package/assets/esri/core/workers/chunks/cd8181600623e18f511c.js +0 -1
- package/assets/esri/core/workers/chunks/cef537fa9705dd1cf685.js +0 -1
- package/assets/esri/core/workers/chunks/d33403d578fbeecaf844.js +0 -1
- package/assets/esri/core/workers/chunks/ddbfa664e69612295785.js +0 -1
- package/assets/esri/core/workers/chunks/ded81c504bf44806ca7d.js +0 -1
- package/assets/esri/core/workers/chunks/e0466387b2ab54d706ca.js +0 -1
- package/assets/esri/core/workers/chunks/ee70be138831cc2a0f56.js +0 -1
- package/assets/esri/core/workers/chunks/efd6ea0966f60ab19520.js +0 -1
- package/assets/esri/core/workers/chunks/f23c4fd014126ea7abc6.js +0 -1
- package/assets/esri/core/workers/chunks/f6e40f3faf0c80cf1b3a.js +0 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +0 -70
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[893],{69397(e,t,r){r.d(t,{JY:()=>g,Qf:()=>u,Qh:()=>a,lM:()=>i,ro:()=>l,rq:()=>c});var s=r(44208),n=r(34275);function i(e){if(!e)return 0;let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return u(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=p;for(let s=0;s<t;s++)r+=o(e[s]);return r}(e);let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):f;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function u(...e){return e.reduce((e,t)=>e+l(t),0)}function l(e,t=16){return e?(0,n.iu)(e)?e.byteLength+h:Array.isArray(e)?c(e,t):0:0}function c(e,t){return p+e.length*t}const f=32,p=16,g=(0,s.A)("ios")||!(0,s.A)("chrome")&&!(0,s.A)("opr")?8:4,h=145},51624(e,t,r){r.d(t,{A:()=>l});var s=r(44208),n=r(69397),i=r(93687);const a=4294967296,o=new TextDecoder("utf-8"),u=(0,s.A)("safari")||(0,s.A)("ios")?6:(0,s.A)("ff")?12:32;class l{constructor(e,t,r=0,s=e?.byteLength??0){this._tag=0,this._dataType=99,this._init(e,t,r,s)}[Symbol.dispose](){this.release()}_init(e,t,r,s){this._data=e,this._dataView=t,this._pos=r,this._end=s}get usedMemory(){return 64+(0,n.Qf)(this._data)}asUnsafe(){return this}clone(){return new l(this._data,this._dataView,this._pos,this._end)}clonePooled(){return l.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(e,t,r=0,s=e?.byteLength??0){let n=l.pool.acquire();return n._init(e,t,r,s),n}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;let t=this._decodeVarint();if(this._tag=t>>3,this._dataType=7&t,!e||e===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;let e=this._decodeVarint();return this._tag=e>>3,this._dataType=7&e,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let e=4294967295;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128||(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)||(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)||(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)||(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128))return e;throw Error("Varint overflow")}getPackedEnd(){let e=this.getUInt32();return this._pos+e}getUInt64(){return this._decodeVarint()}getSInt32(){let e=this.getUInt32();return e>>>1^-(1&e)}getSInt64(){return this._decodeSVarint()}getBool(){let e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){let e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),r}getSFixed64(){let e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),r}getDouble(){let e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){let e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){let e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){let e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){let e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){let e=this._getLength(),t=this._pos,r=this._toBytes(this._data,t,t+e);return this._skip(e),r}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,r,s){let n=this.getMessage(),i=e(n,t,r,s);return n.release(),i}processMessage(e){let t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){let e=this._getLength(),t=l.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){l.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){let e=this._data,t=this._pos,r=0,s=0;if(this._end-t>=10){if(s=e[t++],r|=127&s,128&s&&(s=e[t++],r|=(127&s)<<7,128&s&&(s=e[t++],r|=(127&s)<<14,128&s&&(s=e[t++],r|=(127&s)<<21,128&s&&(s=e[t++],r+=268435456*(127&s),128&s&&(s=e[t++],r+=34359738368*(127&s),128&s&&(s=e[t++],r+=4398046511104*(127&s),128&s&&(s=e[t++],r+=562949953421312*(127&s),128&s&&(s=e[t++],r+=72057594037927940*(127&s),128&s&&(s=e[t++],r+=0x8000000000000000*(127&s),128&s))))))))))throw Error("Varint too long!")}else{let n=1;for(;t!==this._end&&(s=e[t],128&s);)++t,r+=(127&s)*n,n*=128;if(t===this._end)throw Error("Varint overrun!");++t,r+=s*n}return this._pos=t,r}_decodeSVarint(){let e,t=this._data,r=0,s=0,n=1&t[this._pos];if(s=t[this._pos++],r|=127&s,!(128&s&&(s=t[this._pos++],r|=(127&s)<<7,128&s)&&(s=t[this._pos++],r|=(127&s)<<14,128&s)&&(s=t[this._pos++],r|=(127&s)<<21,128&s)&&(s=t[this._pos++],r+=268435456*(127&s),128&s)&&(s=t[this._pos++],r+=34359738368*(127&s),128&s)&&(s=t[this._pos++],r+=4398046511104*(127&s),128&s)))return n?-(r+1)/2:r/2;if(e=BigInt(r),s=t[this._pos++],e+=562949953421312n*BigInt(127&s),!(128&s&&(s=t[this._pos++],e+=72057594037927936n*BigInt(127&s),128&s)&&(s=t[this._pos++],e+=9223372036854775808n*BigInt(127&s),128&s)))return Number(n?-(e+1n)/2n:e/2n);throw Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(e,t,r){if((r=Math.min(this._end,r))-t>u){let s=e.subarray(t,r);return o.decode(s)}let s="",n="";for(let i=t;i<r;++i){let t=e[i];128&t?n+="%"+t.toString(16):(s+=decodeURIComponent(n)+String.fromCharCode(t),n="")}return n.length&&(s+=decodeURIComponent(n)),s}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}static{this.pool=new i.A(()=>new l(null,null),void 0,e=>{e._data=null,e._dataView=null})}}},62815(e,t,r){r.d(t,{N:()=>o,d:()=>u});var s=r(86211),n=r(73941),i=r(52006),a=r(21325);function o(e,t,r){let s=u(t,r);if(1!==s)switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,s);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e){if(e.curvePaths)for(let r of e.curvePaths)for(let e of r){let r=(0,i.yP)(e);r.length>2&&(r[2]*=t)}if(e.paths)for(let r of e.paths)for(let e of r)e.length>2&&(e[2]*=t)}}(e,s);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e){if(e.curveRings)for(let r of e.curveRings)for(let e of r){let r=(0,i.yP)(e);r.length>2&&(r[2]*=t)}if(e.rings)for(let r of e.rings)for(let e of r)e.length>2&&(e[2]*=t)}}(e,s);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(let r of e.points)r.length>2&&(r[2]*=t)}(e,s);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,s);default:return}}function u(e,t){return null==e||null==t||(0,a.aI)(e,t)||(0,n.xP)(e)||(0,n.xP)(t)?1:(0,s.G9)(e)/(0,s.G9)(t)}},10536(e,t,r){function s(e){let t={};for(let r in e){if("declaredClass"===r)continue;let n=e[r];if(null!=n&&"function"!=typeof n)if(Array.isArray(n)){t[r]=[];for(let e=0;e<n.length;e++)t[r][e]=s(n[e])}else"object"==typeof n?n.toJSON&&(t[r]=JSON.stringify(n)):t[r]=n}return t}r.d(t,{z:()=>s})},53655(e,t,r){r.d(t,{SH:()=>P,ae:()=>E,cn:()=>d});var s=r(32198),n=r(49186),i=r(51624),a=r(50498);const o=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"],u=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],l="sqlTypeBigInt.sqlTypeBinary.sqlTypeBit.sqlTypeChar.sqlTypeDate.sqlTypeDecimal.sqlTypeDouble.sqlTypeFloat.sqlTypeGeometry.sqlTypeGUID.sqlTypeInteger.sqlTypeLongNVarchar.sqlTypeLongVarbinary.sqlTypeLongVarchar.sqlTypeNChar.sqlTypeNVarchar.sqlTypeOther.sqlTypeReal.sqlTypeSmallInt.sqlTypeSqlXml.sqlTypeTime.sqlTypeTimestamp.sqlTypeTimestamp2.sqlTypeTinyInt.sqlTypeVarbinary.sqlTypeVarchar".split("."),c=["upperLeft","lowerLeft"];function f(e,t){return t[e.getEnum()]}function p(e,t){e.featureSet.geometryType=e.usesShortGeometryTypes?a.gy.fromJSON(t):t}function g(e,t=e.featureSet.geometryType){return e.usesShortGeometryTypes?a.gy.toJSON(t):t}function h(e){let t=e.asUnsafe();for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getSInt32();case 5:return t.getUInt32();case 6:return t.getInt64();case 7:return t.getUInt64();case 8:return t.getSInt64();case 9:return t.getBool();default:return t.skip(),null}return null}function d(e){let t=e.asUnsafe(),r={type:u[0]};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=f(t,u);break;case 3:r.alias=t.getString();break;case 4:r.sqlType=f(t,l);break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function y(e){let t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.name=r.getString();break;case 2:t.isSystemMaintained=r.getBool();break;default:r.skip()}return t}let m=[];function _(e,t,r){let s=g(t),n=0,i=e.asUnsafe();for(;i.next();)switch(i.tag()){case 1:1===r?s=f(i,o):i.skip();continue;case 2:for(let e=i.getPackedEnd();i.pos()<e;)m[n++]=i.getUInt32();continue;case 3:n>0?(m.length=n,null!=t.geometry(r,s,m)&&(m=[])):t.geometry(r,s,[]);for(let e=i.getPackedEnd();i.pos()<e;)t.coord(i.getSInt64());continue;default:i.skip()}}function S(e,t){let r=[],s=e.asUnsafe();for(;s.next();)if(3===s.tag())for(let e=s.getPackedEnd();s.pos()<e;)r.push(s.getSInt64());else s.skip();t.centroid(r)}let k=[],b=[],w=[];function T(e,t){let r={stack:[],error:void 0,hasError:!1};try{let n=0,i=m,a=0,o=e.asUnsafe(),u=(0,s.mS)(r,o.clonePooled().asUnsafe(),!1);for(;o.next();)switch(o.tag()){case 2:for(let l=o.getPackedEnd();o.pos()<l;)i[n++]=o.getUInt32();continue;case 3:if(!("curvedGeometry"in t))throw Error(`Tried to parse curved geometry in a ${t.constructor.name}, which doesn't support them.`);o.processMessageWithArgs(I,a++);continue;case 4:{let c=o.getUInt32(),f=o.pos()+c;if(0===a||0===n||0===c){o.move(f);continue}i.length=n,w.length=b.length=a,t.curvedGeometry(g(t),i,b,w);let{hasZ:p,hasM:h}=t.featureSet,d=[],y=[0,0];function _(){for(let e=0;e<y.length;++e)d[e]=y[e],y[e]=o.getSInt64()}p&&y.push(0),h&&y.push(0);let S=[0,0],T=[0,0],x=S,q=S,F=0;for(let E=0;E<n;++E){_(),d.fill(0),t.startCurvedPart(y);for(let O=F+i[E];F<O;++F){let v=b[F],U=w[F];switch(v){case 0:for(let D=0;D<U;++D)_(),y[0]+=d[0],y[1]+=d[1],t.lineSegment(d,y);continue;case 1:for(let P=0;P<U;++P)_(),x[0]=o.getSInt64(),x[1]=o.getSInt64(),t.circularArcSegment(d,y,x);continue;case 2:for(let V=0;V<U;++V)_(),S[0]=o.getSInt64(),S[1]=o.getSInt64(),T[0]=o.getSInt64(),T[1]=o.getSInt64(),t.bezierSegment(d,y,S,T);continue;case 3:if(u.move(k[F]),u.getUInt32()<7*U)throw Error("Not implemented: compressed full circle encoding");for(let A=0;A<U;++A){_(),q[0]=u.getDouble(),q[1]=u.getDouble();let M=u.getDouble(),G=u.getDouble(),N=u.getDouble(),R=u.getDouble(),B=u.getDouble();t.ellipticArcSegment(d,y,q,M,G,N,R,B)}continue}}t.finishCurvedPart(y)}continue}default:o.skip()}}catch(C){r.error=C,r.hasError=!0}finally{(0,s.hk)(r)}}function I(e,t){let r=e.asUnsafe(),s=0,n=0,i=0;for(;r.next();)switch(r.tag()){case 1:s=r.getEnum();continue;case 2:n=r.getUInt32();continue;case 3:i=r.pos(),r.skip();continue;default:r.skip()}if(3===s&&0===i)throw Error("An elliptic arc segment set did not include a parameters array");b[t]=s,w[t]=n,k[t]=i}function x(e,t){t.feature();let r=t.featureSet.features.at(-1),s=0,{fields:n}=t.featureSet;for(;e.next();)switch(e.tag()){case 1:if(null==n)throw Error("A Feature had attributes but the FeatureResult didn't include any fields");r.attributes[n[s++].name]=e.processMessage(h);continue;case 2:e.processMessageWithArgs(_,t,0);continue;case 4:e.processMessageWithArgs(S,t);continue;case 7:e.processMessageWithArgs(T,t);continue;case 11:r.distance=e.getDouble();continue;default:e.skip();continue}t.finishFeature?.()}function q(e){let t=[1,1,1,1],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function F(e){let t=[0,0,0,0],r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t[0]=r.getDouble();break;case 2:t[1]=r.getDouble();break;case 4:t[2]=r.getDouble();break;case 3:t[3]=r.getDouble();break;default:r.skip()}return t}function E(e){let t={originPosition:c[0]},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=f(r,c);break;case 2:t.scale=r.processMessage(q);break;case 3:t.translate=r.processMessage(F);break;default:r.skip()}return t}function O(e){let t={},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.shapeAreaFieldName=r.getString();break;case 2:t.shapeLengthFieldName=r.getString();break;case 3:t.units=r.getString();break;default:r.skip()}return t}function v(e){let t={};for(;e.next();)switch(e.tag()){case 1:t.wkid=e.getUInt32();break;case 5:t.wkt=e.getString();break;case 2:t.latestWkid=e.getUInt32();break;case 3:t.vcsWkid=e.getUInt32();break;case 4:t.latestVcsWkid=e.getUInt32();break;default:e.skip()}return t}function U(e,t){let r=e.asUnsafe();if(t.featureSet.features.length=0,"features"===t.parseOnly?.type){let e=t.parseOnly.indices.values(),s=0,n=e.next().value;for(;r.next();)15!==r.tag()||s++!==n?r.skip():(n=e.next().value,r.processMessageWithArgs(x,t));return}let s=!1;for("metadata"===t.parseOnly?.type&&(s=!0,t.parseOnly.featureCount=0),p(t,"esriGeometryPoint");r.next();)switch(r.tag()){case 1:t.idField(r.getString());continue;case 3:t.featureSet.globalIdFieldName=r.getString();continue;case 4:t.featureSet.geohashFieldName=r.getString();continue;case 5:t.featureSet.geometryProperties=r.processMessage(O);continue;case 7:p(t,f(r,o));continue;case 8:t.featureSet.spatialReference=r.processMessageWithArgs(v);continue;case 10:t.featureSet.hasZ=r.getBool();continue;case 11:t.featureSet.hasM=r.getBool();continue;case 12:t.featureSet.transform=r.processMessage(E);continue;case 9:t.featureSet.exceededTransferLimit=r.getBool();continue;case 13:t.featureSet.fields??=[],t.featureSet.fields.push(r.processMessage(d));continue;case 15:if(s){++t.parseOnly.featureCount,r.skip();continue}r.processMessageWithArgs(x,t);continue;case 2:t.idField(r.processMessage(y));continue;default:r.skip()}}function D(e,t,r){let s=-1;for(;e.next();)switch(e.tag()){case 4:s=e.pos(),e.skip();continue;case 1:e.processMessageWithArgs(U,t);continue;default:e.skip()}if(-1!==s){if(!t.queryGeometry()){let r=e.pos();e.move(s),e.processMessageWithArgs(_,t,1),e.move(r)}r.queryGeometryType=t.queryGeometryType(),r.queryGeometry=t.queryGeometry()}t.finish(),r.featureResult=t.featureSet}function P(e,t){let r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,{[Symbol.dispose](){m=[],k=[],b=[],w=[]}},!1);try{let r={stack:[],error:void 0,hasError:!1};try{let n,a=(0,s.mS)(r,i.A.constructPooled(new Uint8Array(e),new DataView(e)),!1);for(;a.next();)2===a.tag()?(n={},a.processMessageWithArgs(D,t,n)):a.skip();return n}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}catch(e){throw new n.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}},66208(e,t,r){r.d(t,{m:()=>n});var s=r(53655);function n(e,t){let{featureResult:r}=(0,s.SH)(e,t);return r}},80893(e,t,r){r.d(t,{IJ:()=>f,Jf:()=>d,LT:()=>_,Pk:()=>g,eW:()=>c,gW:()=>h,kS:()=>p});var s=r(84952),n=r(52039),i=r(78888),a=r(10536),o=r(66208),u=r(5076),l=r(58501);async function c(e,t,r,s,n){let i=t.timeExtent?.isEmpty?{features:[]}:await m(e,t,"json",s,void 0,n);return i.features??=[],(0,l.q)(t,r,i),i}async function f(e,t,r,s,n){if(t.timeExtent?.isEmpty)return r.featureSet;let i=await p(e,t,s,n);return(0,o.m)(i,r)}function p(e,t,r,s){return m(e,t,"pbf",r,void 0,s)}function g(e,t,r,s){return t.timeExtent?.isEmpty?Promise.resolve({objectIds:[]}):m(e,t,"json",r,{returnIdsOnly:!0},s)}async function h(e,t,r,s){return t.timeExtent?.isEmpty?0:(await m(e,t,"json",r,{returnCountOnly:!0},s)).count}async function d(e,t,r,s){if(t.timeExtent?.isEmpty)return{count:0,extent:null};let n=await m(e,t,"json",r,{returnExtentOnly:!0,returnCountOnly:!0},s);if(n.hasOwnProperty("extent"))return n;let i="string"==typeof e?e:e.path;if(/\/imageserver\/?$/i.test(i)&&n.hasOwnProperty("count")){let i=await m(e,t,"json",r,{returnExtentOnly:!0},s);return{count:n.count,extent:i.extent}}if(n.features||n.hasOwnProperty("count"))throw Error("Layer does not support extent calculation.");return n}function y(e,t){if(!e.returnIdsOnly||!t.uniqueIdFields)return e;let r={...e,returnUniqueIdsOnly:!0};return delete r.returnIdsOnly,r}async function m(e,t,r,s={},n={},a={}){let o=await _(e,t,r,s,n,a),u="json"===r?"json":"array-buffer";return(0,i.A)(o.url,{responseType:u,...o.options}).then(({data:e})=>e)}async function _(e,t,r,i,o={},l={}){let c="string"==typeof e?(0,s.An)(e):e,[f]=await(0,n.el)([t.geometry],i);if(null!=f){let e=t.clone();e.geometry=f.clone(),t=e}let p=(0,a.z)({...c.query,f:r,...y(o,l),...(g=t,h=o,d=l,(0,u.i)(g,h,d))});var g,h,d;return i={...i,query:{...p,...i.query}},new S((0,s.fj)(c.path,function(e,t){return null!=e.formatOf3DObjects&&!(t.returnCountOnly||t.returnExtentOnly||t.returnIdsOnly)}(t,o)?"query3d":"query"),i)}class S{constructor(e,t){this.url=e,this.options=t}}},5076(e,t,r){r.d(t,{i:()=>o});var s=r(39516),n=r(60408),i=r(21325),a=r(2991);function o(e,t,r){let o,u,l,{geometry:c}=e,f=r?.encodingCapabilities?.supportsCompactGeometry??!1,p=r?.encodingCapabilities?.supportsDefaultSpatialReference,g=e.toJSON(),h=g;if(c&&(u=c.spatialReference,l=(0,i.YX)(u),h.geometryType=(0,n.$B)(c),h.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;let r=e.toJSON();return delete r.spatialReference,JSON.stringify(r)}(c,f),h.inSR=l),g.groupByFieldsForStatistics&&(h.groupByFieldsForStatistics=g.groupByFieldsForStatistics.join(",")),g.objectIds)switch(r?.uniqueIdFields?.length){case void 0:h.objectIds=g.objectIds.join(",");break;case 1:h.uniqueIds=JSON.stringify(g.objectIds),delete h.objectIds;break;default:h.uniqueIds=JSON.stringify(g.objectIds.map(e=>JSON.parse(e))),delete h.objectIds}if(g.orderByFields&&(h.orderByFields=g.orderByFields.join(",")),!g.outFields||!g.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete h.outFields:h.outFields=g.outFields.includes("*")?"*":g.outFields.join(","),g.outSR?(h.outSR=(0,i.YX)(g.outSR),o=e.outSpatialReference):c&&(g.returnGeometry||g.returnCentroid)&&(h.outSR=h.inSR,o=u),g.returnGeometry&&delete g.returnGeometry,g.outStatistics&&(h.outStatistics=JSON.stringify(g.outStatistics)),g.outDistance&&(h.outDistance=JSON.stringify(g.outDistance)),g.fullText&&(h.fullText=JSON.stringify(g.fullText)),g.pixelSize&&(h.pixelSize=JSON.stringify(g.pixelSize)),g.quantizationParameters&&(p&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete g.quantizationParameters.extent.spatialReference,h.quantizationParameters=JSON.stringify(g.quantizationParameters)),g.parameterValues&&(h.parameterValues=JSON.stringify(g.parameterValues)),g.rangeValues&&(h.rangeValues=JSON.stringify(g.rangeValues)),g.dynamicDataSource){if("definitionExpression"in g.dynamicDataSource&&g.dynamicDataSource.definitionExpression){let{definitionExpression:e,...t}=g.dynamicDataSource;h.layer=JSON.stringify({query:e,source:t})}else h.layer=JSON.stringify({source:g.dynamicDataSource});delete g.dynamicDataSource}if(e.timeExtent){let t=r?.timeInformation;if(t){let r=t.getExpression(e.timeExtent);switch(r?.type){case"time":h.time=r.value;break;case"where":r.value&&(h.where=(0,s.mA)(h.where,r.value))}}else h.time=(0,a.G9)(e.timeExtent);delete g.timeExtent}return p&&null!=u&&null!=o&&u.equals(o)&&(h.defaultSR=h.inSR,delete h.inSR,delete h.outSR),h}},58501(e,t,r){r.d(t,{q:()=>n});var s=r(62815);function n(e,t,r){if(!r?.features||!r.hasZ)return;let n=(0,s.N)(r.geometryType,t,e.outSpatialReference);if(n)for(let e of r.features)n(e.geometry)}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[2774],{67482(e,t,n){function r(e){return null!==o(e)}function o(e){return function(e){let t=i.exec(e);if(!t?.groups)return null;let n=t.groups,r=+n.year,o=n.month-1,a=+n.day,l=+(n.hours??"0"),s=+(n.minutes??"0"),u=+(n.seconds??"0");if(l>23||s>59||u>59)return null;let p,c=n.ms??"0",f=c?+c.padEnd(3,"0").slice(0,3):0;if(n.isUTC||!n.offsetSign)p=Date.UTC(r,o,a,l,s,u,f);else{let e=+n.offsetHours,t=+n.offsetMinutes;p=6e4*("+"===n.offsetSign?-1:1)*(60*e+t)+Date.UTC(r,o,a,l,s,u,f)}return Number.isNaN(p)?null:p}(e)??function(e){let t=new Date(e),n=t.getTime();return Number.isNaN(n)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?n:null}(e)??function(e){if(!a.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}n.d(t,{C:()=>r,_:()=>o});const i=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,a=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},69397(e,t,n){n.d(t,{JY:()=>y,Qf:()=>s,Qh:()=>a,lM:()=>i,ro:()=>u,rq:()=>p});var r=n(44208),o=n(34275);function i(e){if(!e)return 0;let t=c;for(let n in e)e.hasOwnProperty(n)&&(t+=l(e[n],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return s(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return p(e,8);let n=f;for(let r=0;r<t;r++)n+=l(e[r]);return n}(e);let t=c;for(let n in e)e.hasOwnProperty(n)&&(t+=l(e[n]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?a(e):c;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function s(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,o.iu)(e)?e.byteLength+d:Array.isArray(e)?p(e,t):0:0}function p(e,t){return f+e.length*t}const c=32,f=16,y=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,d=145},85113(e,t,n){n.d(t,{BM:()=>N,S_:()=>y,bd:()=>R,sO:()=>k,xD:()=>c});var r=n(67482),o=n(49186),i=n(21325),a=n(30524),l=n(90708),s=n(43334),u=n(92722);const p={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return p[e]}function*f(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t);break;default:yield{type:"Feature",geometry:e,properties:null}}}function y(e){for(let t of f(e))if("GeometryCollection"===t.geometry?.type)return!0;return!1}function*d(e){let t=0;for(let n of f(e)){let e="GeometryCollection"===n.geometry?.type,r=[{geometry:n.geometry,depth:0}];for(;r.length>0;){let{geometry:i,depth:a}=r.pop();if("GeometryCollection"===i?.type){if(a>=1024)throw new o.A("geojson-layer:invalid-geometry","GeometryCollection nesting exceeds 1024 levels.");for(let e=i.geometries.length-1;e>=0;e--)r.push({geometry:i.geometries[e],depth:a+1})}else yield{feature:n,geometry:i,index:t,isCollection:e}}t++}}function*m(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function g(e,t,n,r,i){if(!r)throw new o.A("geojson-layer:geometry-collection-schema","Recreate the layer to add the parent ID field required by GeometryCollections.");let l=t;for(let t in e){let r=i.get(t);void 0===r&&(r=(0,a.rS)(t)?.toLowerCase()===n,i.set(t,r)),r&&(l??=e[t]??void 0,delete e[t])}e[r]=null==l?null:String(l)}function w(e){for(let t of e)if(t.length>2)return!0;return!1}function h(e){let t=0;for(let n=0;n<e.length;n++){let r=e[n],o=e[(n+1)%e.length];t+=r[0]*o[1]-o[0]*r[1]}return t<=0}function b(e){let t=e[0],n=e[e.length-1];(t[0]!==n[0]||t[1]!==n[1]||t[2]!==n[2])&&e.push(t)}function S(e,t){let{coordinates:n,type:r}=e,o=t.hasZ??!1;switch(r){case"Point":{let e=o||3!==n.length?o&&2===n.length?[...n,0]:[...n]:n.slice(0,2);return new u.A([],e,o,!1)}case"LineString":return(0,l.Ap)({paths:[n],hasZ:!0},o,!1);case"MultiLineString":return(0,l.Ap)({paths:n,hasZ:!0},o,!1);case"MultiPoint":return(0,l.PR)({points:n,hasZ:!0},o,!1);case"Polygon":case"MultiPolygon":{let e=new u.A([],[],o,!1);for(let t of"Polygon"===r?[n]:n){T(e,t[0],o);for(let n=1;n<t.length;n++)A(e,t[n],o)}return e}}}function T(e,t,n){b(t),function(e){return!h(e)}(t)?F(e,t,n):C(e,t,n)}function A(e,t,n){b(t),function(e){return h(e)}(t)?F(e,t,n):C(e,t,n)}function C(e,t,n){for(let r of t)x(e,r,n);e.lengths.push(t.length)}function F(e,t,n){for(let r=t.length-1;r>=0;r--)x(e,t[r],n);e.lengths.push(t.length)}function x(e,[t,n,r],o){e.coords.push(t,n),o&&e.coords.push(r||0)}function P(e){switch(typeof e){case"string":return(0,r.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function k(e,t=4326){if(!e)throw new o.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type&&"GeometryCollection"!==e.type)throw new o.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:n}=e;if(!n)return;let r="string"==typeof n?n:"name"===n.type?n.properties.name:"EPSG"===n.type?n.properties.code:null,a=(0,i.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!r||!a.test(r))throw new o.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:n})}function N(e,t={}){let n,r=[],o=new Set,i=new Set,l=!1,s=null,u=!1,{geometryType:p=null}=t;for(let{feature:t,geometry:f}of d(e)){let{properties:e,id:y}=t;if((!f||(p||=c(f.type),c(f.type)===p))&&(l||=w(m(f)),u||(u=null!=y,u&&(n=typeof y,e&&(s=Object.keys(e).filter(t=>e[t]===y)))),e&&s&&u&&null!=y&&(s.length>1?s=s.filter(t=>e[t]===y):1===s.length&&(s=e[s[0]]===y?s:[])),e))for(let t in e){if(o.has(t))continue;let n=P(e[t]);if("unknown"===n){i.add(t);continue}i.delete(t),o.add(t);let l=(0,a.rS)(t);l&&r.push({name:l,alias:t,type:n})}}let f=(0,a.rS)(1===s?.length&&s[0]||null)??void 0;if(f)for(let e of r)if(e.name===f&&(0,a.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:r,geometryType:p,hasZ:l,objectIdFieldName:f,objectIdFieldType:n,unknownFields:Array.from(i)}}function R(e,t){return Array.from(function*(e,t={}){let{geometryType:n,objectIdField:r,parentIdField:o,getObjectId:i}=t,l=(0,a.rS)(r)?.toLowerCase(),u=new Map;for(let{feature:a,geometry:p,index:f,isCollection:y}of e){let{properties:e,id:d}=a;if(p&&c(p.type)!==n)continue;let m=y?{...e}:e??{},w=i?.(a,f);r&&(y?(g(m,d,l,o,u),w=void 0):(w=m[r],null!=d&&null==w&&(m[r]=w=d))),yield new s.Om(p&&S(p,t),m,null,w)}}(d(e),t))}},34322(e,t,n){n.d(t,{E:()=>j,Fu:()=>A,O8:()=>N,UH:()=>U,YW:()=>R,i5:()=>b,mG:()=>k,x$:()=>M});var r=n(49186),o=n(5479),i=n(84952),a=n(5443),l=n(99917),s=n(16930),u=n(21325),p=n(50498),c=n(78888),f=n(85113),y=n(60694),d=n(20437),m=n(30524),g=n(13043);const w="xlink:href",h="2.0.0",b="__esri_wfs_id__",S="wfs-layer:feature-type-not-found",T="wfs-layer:unknown-geometry-type";async function A(e,t){let n=function(e){let t=D(e);(function(e){let t=e.firstElementChild?.getAttribute("version");if(t&&t!==h)throw new r.A("wfs-layer:unsupported-wfs-version",`Unsupported WFS version ${t}. Supported version: ${h}`)})(t),O(t);let n=t.firstElementChild,i=(0,o.PP)(function(e){return(0,g.iN)(e,{FeatureTypeList:{FeatureType:e=>{let t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",defaultSpatialReference:4326,supportedSpatialReferences:[]},n=new Set;return(0,g.pu)(e,{Name:e=>{let{name:n,prefix:r}=L(e.textContent);t.typeName=`${r}:${n}`,t.name=n,t.namespacePrefix=r,t.namespaceUri=e.lookupNamespaceURI(r)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=a.A.fromJSON(function(e){let t,n,r,o;for(let i of e.children)switch(i.localName){case"LowerCorner":[t,n]=i.textContent.split(" ").map(e=>Number.parseFloat(e));break;case"UpperCorner":[r,o]=i.textContent.split(" ").map(e=>Number.parseFloat(e))}return{xmin:t,ymin:n,xmax:r,ymax:o,spatialReference:u.KK}}(e))},DefaultCRS:e=>{let r=P(e);r&&(t.defaultSpatialReference=r,n.add(r))},OtherCRS:e=>{let t=P(e);t&&n.add(t)}}),t.title||=t.name,n.add(4326),t.supportedSpatialReferences.push(...n),t}}})}(n));return{operations:x(n),get featureTypes(){return Array.from(i())},readFeatureTypes:i}}((await(0,c.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:h,...t?.customParameters},signal:t?.signal})).data);return function(e,t){(0,i.m3)(e)&&((0,i.FX)(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=(0,i.lM)(t.operations.DescribeFeatureType.url)),(0,i.FX)(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=(0,i.lM)(t.operations.GetFeature.url)))}(e,n),n}const C=["json","application/json; subtype=geojson; charset=utf-8","application/json; subtype=geojson","application/json","geojson","application/geo+json"];function F(e){for(let t of C){let n=e.findIndex(e=>e.toLowerCase()===t);if(n>=0)return e[n]}return null}function x(e){let t,n,o=!0,i={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1,countDefault:void 0}},a=[],l=[];if((0,g.pu)(e,{OperationsMetadata:{Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&a.push(e)}}}},Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{i.GetCapabilities.url=e.getAttribute(w)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{i.DescribeFeatureType.url=e.getAttribute(w)}}}};case"GetFeature":return{Constraint:e=>{if("CountDefault"===e.getAttribute("name"))return{DefaultValue:e=>{let t=(0,g.JI)(e);n=null!=t&&t>0?t:void 0}}},DCP:{HTTP:{Get:e=>{i.GetFeature.url=e.getAttribute(w)}}},Parameter:e=>{if("outputformat"===e.getAttribute("name")?.toLowerCase())return{AllowedValues:{Value:({textContent:e})=>{e&&l.push(e)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"CountDefault":return{DefaultValue:e=>{let n=(0,g.JI)(e);t=null!=n&&n>0?n:void 0}};case"KVPEncoding":return{DefaultValue:e=>{o="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{i.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),i.GetFeature.outputFormat=F(l)??F(a),i.GetFeature.countDefault=n??t,!o)throw new r.A("wfs-layer:kvp-encoding-not-supported","WFS service doesn't support key/value pair (KVP) encoding");if(null==i.GetFeature.outputFormat)throw new r.A("wfs-layer:geojson-not-supported","WFS service doesn't support GeoJSON output format");return i}function P(e){let t=parseInt(e.textContent?.match(/(?<wkid>\d+$)/i)?.groups?.wkid??"",10);if(!Number.isNaN(t))return t}function k(e,t,n){return(0,o.I6)(e,e=>n?e.name===t&&e.namespaceUri===n:e.typeName===t||e.name===t)}async function N(e,t,n,o={}){let{featureType:i,extent:a}=await async function(e,t,n,o={}){let i=e.readFeatureTypes(),a=t?k(i,t,n):i.next().value,{spatialReference:p=new s.A({wkid:a?.defaultSpatialReference})}=o;if(null==a)throw t?new r.A(S,`The type '${t}' could not be found in the service`):new r.A("wfs-layer:empty-service","The service is empty");let c=a.extent;if(c&&!(0,u.aI)(c.spatialReference,p))try{await(0,l.initializeProjection)(c.spatialReference,p,void 0,o),c=(0,l.project)(c,p)}catch{throw new r.A("wfs-layer:unsupported-spatial-reference","Projection not supported")}return{extent:c,spatialReference:p,featureType:a}}(e,t,n,o),{spatialReference:p}=U(e.operations.GetFeature.url,i,o.spatialReference),{fields:c,geometryType:f,swapXY:y,objectIdField:d,geometryField:m}=await async function(e,t,n,o={}){let{typeName:i}=t,[a,l]=await Promise.allSettled([G(e.operations.DescribeFeatureType.url,i,o),E(e,i,n,o)]),s=e=>{let t=`An error occurred while getting info about the feature type '${i}'`;return new r.A("wfs-layer:getWFSLayerTypeInfo-error",t,{error:e})};if("rejected"===a.status)throw s(a.reason);if("rejected"===l.status)throw s(l.reason);let{fields:u,errors:p}=a.value??{},c=a.value?.geometryType||l.value?.geometryType,f=l.value?.swapXY??!1;if(null==c)throw new r.A(T,`The geometry type could not be determined for type '${i}`,{typeName:i,geometryType:c,fields:u,errors:p});return{...R(u??[]),geometryType:c,swapXY:f}}(e,i,p,o);return{url:e.operations.GetCapabilities.url,name:i.name,namespaceUri:i.namespaceUri,fields:c,geometryField:m,geometryType:f,objectIdField:d,spatialReference:o.spatialReference??new s.A({wkid:i.defaultSpatialReference}),extent:a,swapXY:y,wfsCapabilities:e,customParameters:o.customParameters}}function R(e){let t=e.find(e=>"geometry"===e.type),n=e.find(e=>"oid"===e.type);return e=e.filter(e=>"geometry"!==e.type),n||(n=new d.A({name:b,type:"oid",alias:b}),e.unshift(n)),{geometryField:t?.name??null,objectIdField:n.name,fields:e}}async function E(e,t,n,r={}){let o,i=!1,[a,l]=await Promise.all([M(e.operations.GetFeature.url,t,n,e.operations.GetFeature.outputFormat,{...r,count:1}),(0,c.A)(e.operations.GetFeature.url,{responseType:"text",query:I(t,n,void 0,{...r,count:1}),signal:r?.signal})]),s="FeatureCollection"===a.type&&a.features[0]?.geometry;if(s&&"GeometryCollection"!==s.type){let e;switch(o=p.gy.fromJSON((0,f.xD)(s.type)),s.type){case"Point":e=s.coordinates;break;case"LineString":case"MultiPoint":e=s.coordinates[0];break;case"MultiLineString":case"Polygon":e=s.coordinates[0][0];break;case"MultiPolygon":e=s.coordinates[0][0][0]}let t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(l.data);if(t){let n=e[0].toFixed(3),r=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);n===parseFloat(t[2]).toFixed(3)&&r===o&&(i=!0)}}return{geometryType:o,swapXY:i}}async function G(e,t,n){return function(e,t){let{name:n}=L(e),i=D(t);O(i);let a=(0,o.I6)((0,g.iN)(i.firstElementChild,{element:e=>e}),e=>e.getAttribute("name")===n);if(null!=a){let e=a.getAttribute("type"),t=e?(0,o.I6)((0,g.iN)(i.firstElementChild,{complexType:e=>e}),t=>t.getAttribute("name")===L(e).name):(0,o.I6)((0,g.iN)(a,{complexType:e=>e}),()=>!0);if(t)return function(e){let t,n=[],o=[],i=(0,g.iN)(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(let a of i){let i,l,s=a.getAttribute("name");if(!s)continue;if(a.hasAttribute("type")?i=L(a.getAttribute("type")).name:(0,g.pu)(a,{simpleType:{restriction:e=>(i=L(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!i)continue;let u="true"===a.getAttribute("nillable"),p=!1;switch(i.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":o.push(new d.A({name:s,alias:s,type:"integer",nullable:u,length:(0,m._b)("integer")}));break;case"float":case"double":case"decimal":o.push(new d.A({name:s,alias:s,type:"double",nullable:u,length:(0,m._b)("double")}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":o.push(new d.A({name:s,alias:s,type:"string",nullable:u,length:l??(0,m._b)("string")}));break;case"datetime":case"date":o.push(new d.A({name:s,alias:s,type:"date",nullable:u,length:l??(0,m._b)("date")}));break;case"pointpropertytype":t="point",p=!0;break;case"multipointpropertytype":t="multipoint",p=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":t="polyline",p=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":t="polygon",p=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":p=!0,n.push(new r.A(T,`geometry type '${i}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:n.push(new r.A("wfs-layer:unknown-field-type",`Unknown field type '${i}'`,{type:(new XMLSerializer).serializeToString(e)}))}p&&o.push(new d.A({name:s,alias:s,type:"geometry",nullable:u}))}for(let e of o)if("integer"===e.type&&!e.nullable&&v.has(e.name.toLowerCase())){e.type="oid";break}return{geometryType:t,fields:o,errors:n}}(t)}throw new r.A(S,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(i)})}(t,(await(0,c.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:h,TYPENAME:t,TYPENAMES:t,...n?.customParameters},signal:n?.signal})).data)}const v=new Set(["objectid","fid"]);async function M(e,t,n,o,i){let{data:a}=await(0,c.A)(e,{responseType:"text",query:I(t,n,o,i),signal:i?.signal});a=a.replaceAll(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{return JSON.parse(a)}catch(e){throw new r.A("wfs-layer:malformed-json","Error while parsing the response",{response:a,error:e})}}function I(e,t,n,r){let o="number"==typeof t?t:t.wkid;return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:h,TYPENAMES:e,OUTPUTFORMAT:n,SRSNAME:"EPSG:"+o,STARTINDEX:r?.startIndex,COUNT:r?.count,...r?.customParameters}}async function j(e,t,n){let r=await(0,c.A)(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:h,TYPENAMES:t,RESULTTYPE:"hits",...n?.customParameters},signal:n?.signal}),o=/numberMatched=["'](?<numberMatched>\d+)["']/gi.exec(r.data);if(o?.groups)return+o.groups.numberMatched}function D(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function L(e){let[t,n]=e.split(":",2);return{prefix:n?t:"",name:n??t}}function O(e){let t="",n="";if((0,g.pu)(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{n=e.textContent}})}),t)throw new r.A(`wfs-layer:${t}`,n)}function U(e,t,n){let r={wkid:t.defaultSpatialReference},o=null==n?.wkid?r:{wkid:n.wkid};return{spatialReference:o,getFeatureSpatialReference:(0,y.Fi)(e)||o.wkid&&t.supportedSpatialReferences.includes(o.wkid)?{wkid:o.wkid}:{wkid:t.defaultSpatialReference}}}},13043(e,t,n){function r(e,t){if(e&&t)for(let n of e.children)if(n.localName in t){let e=t[n.localName];if("function"==typeof e){let t=e(n);t&&r(n,t)}else r(n,e)}}function*o(e,t){for(let n of e.children)if(n.localName in t){let e=t[n.localName];"function"==typeof e?yield e(n):yield*o(n,e)}}function i(e){let t=e.textContent?.trim()??"",n=/^[+-]?\d+$/.test(t)?Number(t):NaN;return Number.isSafeInteger(n)?n:void 0}n.d(t,{JI:()=>i,iN:()=>o,pu:()=>r})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[506,1550,1666,1948,7992,8125],{61691(e,t,r){r.d(t,{G:()=>s});class s{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,r){r.d(t,{S:()=>n});var s=r(61691);class n extends s.G{m_aGeoms;m_iGeom=-1;constructor(e){super(),this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){let e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},69397(e,t,r){r.d(t,{JY:()=>m,Qf:()=>l,Qh:()=>a,lM:()=>i,ro:()=>h,rq:()=>u});var s=r(44208),n=r(34275);function i(e){if(!e)return 0;let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r],!1));return t}function a(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let r=g;for(let s=0;s<t;s++)r+=o(e[s]);return r}(e);let t=f;for(let r in e)e.hasOwnProperty(r)&&(t+=o(e[r]));return t}function o(e,t=!0){switch(typeof e){case"object":return t?a(e):f;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+h(t),0)}function h(e,t=16){return e?(0,n.iu)(e)?e.byteLength+c:Array.isArray(e)?u(e,t):0:0}function u(e,t){return g+e.length*t}const f=32,g=16,m=(0,s.A)("ios")||!(0,s.A)("chrome")&&!(0,s.A)("opr")?8:4,c=145},87992(e,t,r){r.d(t,{JR:()=>Z,ME:()=>M,MY:()=>A,NO:()=>C,Nh:()=>P,V2:()=>S,_s:()=>Y,e6:()=>b,gh:()=>E,jm:()=>V,tr:()=>X,uX:()=>p});var s=r(32198),n=(r(69397),r(92722)),i=r(16930),a=r(19419),o=r(513),l=r(50954),h=r(79567),u=r(52006),f=r(49663),g=r(46068),m=r(60408),c=r(21325);class p{constructor({type:e,spatialReference:t,vertexCount:r,vertexXY:s,vertexZ:n,vertexM:i,partCount:a,partOffsets:o,partFlags:l,segmentFlags:h,segmentIndices:u,segmentParams:f,segmentCountArc:g,segmentCountBezier:m}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=r,this.vertexXY=s,this.vertexZ=n,this.vertexM=i,this.partCount=a,this.partOffsets=o,this.partFlags=l,this.segmentFlags=h,this.segmentIndices=u,this.segmentParams=f,this.segmentCountArc=g,this.segmentCountBezier=m}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){let{segmentCount:e,segmentCountArc:t,segmentCountBezier:r}=this;return e&&e-t-r}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?64+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){let{type:e,vertexCount:t,partCount:r,hasZ:s,hasM:n,segmentCountArc:i,segmentCountBezier:a}=this,o=S(e,t,r,s,n,this.hasCurves(),i,a);o.spatialReference=this.spatialReference;let{vertexXY:l,vertexZ:h,vertexM:u}=this;if(o.vertexXY.set(l.subarray(0,2*t),0),o.vertexZ?.set(h.subarray(0,t),0),o.vertexM?.set(u.subarray(0,t),0),this.isMultipart()){let{partOffsets:e,partFlags:t}=this;o.partFlags.set(t.subarray(0,r+1)),o.partOffsets.set(e.subarray(0,r+1))}if(this.hasCurves()){let{segmentFlags:e,segmentIndices:r,segmentParams:s,segmentParamCount:n}=this;o.segmentFlags.set(e.subarray(0,t),0),o.segmentIndices.set(r.subarray(0,t),0),o.segmentParams.set(s.subarray(0,n),0)}return o}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,c.aI)(this.spatialReference,e.spatialReference)||this.vertexCount!==e.vertexCount||this.partCount!==e.partCount||this.hasZ!==e.hasZ||this.hasM!==e.hasM||this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;let r=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,r)=>Math.abs(e-r)>t||isNaN(e)!==isNaN(r);for(let t=0;t<this.vertexCount;++t)if(r(this.vertexXY[2*t],e.vertexXY[2*t])||r(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(r(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(r(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new x(this):[][Symbol.iterator]()}}class x{constructor(e){this.geometry=e,this.value=new d(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class d{constructor(e){this.geometry=e,this.index=-1,this._readVertex=_(e),this._segments=new y(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){let e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class y{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this.value=new v(e.geometry)}get _partIsClosed(){return!!(1&this._part.geometry.partFlags?.[this._part.index])}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;let e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._partIsClosed?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){let{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._partIsClosed?1:2),this.value.indexOfStartVertex=this._partStart-1}}class v{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=_(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){let e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;let t=this.geometry.segmentParams,r=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){let e=t[r++],s=t[r++],n=t[r++],i=t[r++];return{b:[this.end,[e,s],[n,i]]}}let s=t[r++],n=t[r++],i=t[r++],a=t[r++],o=t[r++],l=t[r++];r++,r++;let h=t[r++],u=t[r++];if(!(4&s)&&1===i)return{c:[this.end,[h,u]]};let f=2&s?0:1,g=1&s?0:1;return{a:[this.end,[o,l],f,g,a,n,i]}}}function C(e,t){let r={stack:[],error:void 0,hasError:!1};try{return t??=(0,a.Ie)(),(0,s.mS)(r,new O(e,["vertexZ","vertexM","spatialReference"]),!1),(0,a.bx)(t,function(e){let t,{vertexCount:r,vertexXY:n,vertexZ:i,vertexM:o}=e,l=R(e);if(e.hasCurves()){let r={stack:[],error:void 0,hasError:!1};try{(0,s.mS)(r,new O(e,["vertexZ","vertexM"]),!1);let n=(0,a.Ie)();for(let t of e.parts){let e=t.startVertex;for(let{curve:r}of t.segments)(0,h.e)(n,e,r),e=(0,u.yP)(r)}let[i,o,f,g]=n;t={xmin:i,ymin:o,xmax:f,ymax:g,spatialReference:l}}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}else{let e,s,i,a;e=s=1/0,i=a=-1/0;for(let t=0;t<r;++t){let r=n[2*t],o=n[2*t+1];e=Math.min(e,r),i=Math.max(i,r),s=Math.min(s,o),a=Math.max(a,o)}t={xmin:e,ymin:s,xmax:i,ymax:a,spatialReference:l}}if(i){let e=1/0,r=-1/0;for(let t of i)e=Math.min(e,t),r=Math.max(r,t);t.zmin=e,t.zmax=r}if(o){let e=1/0,r=-1/0;for(let t of o)e=Math.min(e,t),r=Math.max(r,t);t.mmin=e,t.mmax=r}return t}(e)),t}catch(e){r.error=e,r.hasError=!0}finally{(0,s.hk)(r)}}function M(e){let t,r,s;if((0,m.fT)(e)){s="point";let{x:n,y:i,z:a,m:o}=e,l=[n,i];null!=a&&l.push(a),null!=o&&l.push(o),r=[[l]],t=1}else(0,m.U9)(e)?(s="multipoint",r=[e.points],t=e.points.length):(0,m.Rg)(e)?(s="polyline",r=e.curvePaths??e.paths,t=r.reduce((e,t)=>e+t.length,0)):(s="polygon",r=e.curveRings??e.rings,t=r.reduce((e,t)=>(0===t.length||(e+=t.length,w(t[0],(0,u.yP)(t.at(-1)))&&--e),e),0));let n=S(s,t,s.includes("point")?0:r.length,(0,m.Pv)(e),(0,m.W0)(e),(0,u.Ed)(e)),{hasZ:i,hasM:a,vertexXY:o,vertexZ:l,vertexM:h}=n;function f(e){o[2*c]=e[0],o[2*c+1]=e[1],i&&(l[c]=e[2]),a&&(h[c]=e[g]),++c}n.spatialReference=e.spatialReference??void 0;let g=n.hasZ?3:2,c=0;if(!n.isMultipart()){if(!i&&!a){for(let[e,t]of r[0])o[2*c]=e,o[2*c+1]=t,++c;return n}for(let e of r[0])f(e);return n}let p="polygon"===s,{partOffsets:x}=n,d=0;if(!(0,u.Ed)(e)){for(let e of r){if(x[d++]=c,0===e.length)continue;let t=e.length;if(p&&w(e[0],e.at(-1))&&--t,i||a)for(let r=0;r<t;++r)f(e[r]);else for(let r=0;r<t;++r){let[t,s]=e[r];o[2*c]=t,o[2*c+1]=s,++c}}return x[d]=c,n}function y(e){let t=v+e;if(t<=(n.segmentParams?.length??0))return;let r=t*G;r=20*Math.ceil(r/20);let s=n.segmentParams;n.segmentParams=new Float64Array(r),null!=s&&n.segmentParams.set(s)}let v=0;for(let e of r){if(n.partOffsets[d++]=c,0===e.length)continue;let t=e[0],r=t;for(let t=1;t<e.length;++t){let s=e[t];f(r);let i=c-1;(0,u.wY)(s)?(y(10),++n.segmentCountArc,v=Y(r,s,n,i,v),r=s.a[0]):(0,u.DA)(s)?(y(10),++n.segmentCountArc,v=I(r,s,n,i,v),r=s.a[0]):(0,u.aO)(s)?(y(10),++n.segmentCountArc,v=b(r,s,n,i,v),r=s.c[0]):(0,u.n1)(s)?(y(4),++n.segmentCountBezier,v=X(0,s,n,i,v),r=s.b[0]):r=s}p&&w(t,r)||f(r)}return n.partOffsets[d]=c,n}function E(e){let t=_(e),{vertexCount:r,partCount:s,hasZ:n,hasM:i}=e,a=R(e),o=0;if(!e.isMultipart()){if("point"===e.type){let[t,r]=e.vertexXY;return{x:t,y:r,z:e.vertexZ?.[0],m:e.vertexM?.[0],spatialReference:a}}let s=[];for(;o<r;)s.push(t(o++));return{points:s,spatialReference:a,hasZ:n,hasM:i}}if(!e.hasCurves()){let r=[];for(let n=0;n<s;++n){let s=!!(1&e.partFlags[n]),i=e.partOffsets[n+1],a=[];for(;o<i;)a.push(t(o++));s&&a.length>0&&a.push([...a[0]]),r.push(a)}return"polygon"===e.type?{rings:r,hasZ:n,hasM:i,spatialReference:a}:{paths:r,hasZ:n,hasM:i,spatialReference:a}}let l=[];for(let{segments:t,startVertex:r}of e.parts){let e=[r];for(let{curve:r}of t)e.push(r);l.push(e)}return"polygon"===e.type?{rings:[],curveRings:l,hasZ:n,hasM:i,spatialReference:a}:{paths:[],curvePaths:l,hasZ:n,hasM:i,spatialReference:a}}function P(e,{lengths:t,coords:r,hasZ:s,hasM:n},i){let a=e.includes("point")?0:t.length,o="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(o?a:0);s??=!1,n??=!1;let h=S(e,l,a,s,n,!1,0,0);if(h.spatialReference=i??void 0,!h.isMultipart()){for(let e=0,t=0;e<l;++e)h.vertexXY[2*e]=r[t++],h.vertexXY[2*e+1]=r[t++],s&&(h.vertexZ[e]=r[t++]),n&&(h.vertexM[e]=r[t++]);return h}let u=2+Number(s)+Number(n),f=0,g=0;h.partOffsets[0]=0;for(let e of t){let t=h.partOffsets[g],i=t+e-Number(o);h.partOffsets[++g]=i;for(let e=t;e<i;++e)h.vertexXY[2*e]=r[f++],h.vertexXY[2*e+1]=r[f++],s&&(h.vertexZ[e]=r[f++]),n&&(h.vertexM[e]=r[f++]);o&&(f+=u)}return h}function Z({type:e,vertexCount:t,vertexXY:r,vertexZ:s,vertexM:i,partCount:a,partOffsets:o,partFlags:l,hasZ:h,hasM:u}){let f=new n.A([],[],h,u);a=Math.max(a,1);let g=0;for(let e=0;e<a;++e){let n=o?.[e+1]??t,a=f.coords.length;for(let e=g;e<n;++e)f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(i[e]);if(l&&1&l[e]){let e=g;f.coords.push(r[2*e],r[2*e+1]),h&&f.coords.push(s[e]),u&&f.coords.push(i[e])}f.lengths.push((f.coords.length-a)/f.stride),g=n}return"point"===e&&(f.lengths.length=0),f}function V(...e){let t=new Set;for(let r of e){if(!r)continue;let e=[r.vertexXY,r.vertexZ,r.vertexM,r.partOffsets,r.partFlags,r.segmentFlags,r.segmentIndices,r.segmentParams];for(let r of e){let e=r?.buffer;e&&t.add(e)}}return Array.from(t)}function A(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;let t=e.getText()||void 0,r=e.isCustomWkid()?0:e.getOldID();if(r<=0)return{wkt:t};let s=e.getLatestID();(s<=0||s===r)&&(s=void 0);let n=e.getVCS();if(null==n)return{wkid:r,latestWkid:s,wkt:t};let i=n.isCustomWkid()?0:n.getOldID();if(i<=0)return{wkt:t};let a=e.getLatestVerticalID();return(a<=0||a===i)&&(a=void 0),{wkid:r,wkt:t,latestWkid:s,vcsWkid:i,latestVcsWkid:a}}(e.getSpatialReference()),e=e.getGeometry()),new p({...e.toFlatGeometry(),spatialReference:t})}class O{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(let r of t)e[r]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof i.A?e.toJSON():e}function _({vertexXY:e,vertexZ:t,vertexM:r}){return t?r?s=>[e[2*s],e[2*s+1],t[s],r[s]]:r=>[e[2*r],e[2*r+1],t[r]]:r?t=>[e[2*t],e[2*t+1],r[t]]:t=>[e[2*t],e[2*t+1]]}function w(e,t){return e.every((e,r)=>e===t[r])}function S(e,t,r,s,n,i,a,o){a??=0,o??=0;let l=new p({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:r,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:a,segmentCountBezier:o}),h=2*Float64Array.BYTES_PER_ELEMENT*t;s&&(h+=Float64Array.BYTES_PER_ELEMENT*t),n&&(h+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(h+=(r+1)*Int32Array.BYTES_PER_ELEMENT,h+=(r+1)*Int8Array.BYTES_PER_ELEMENT),i&&(h+=t*Int8Array.BYTES_PER_ELEMENT,h+=t*Int32Array.BYTES_PER_ELEMENT,h+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);let u=new ArrayBuffer(h),f=0;return l.vertexXY=new Float64Array(u,f,2*t),f+=l.vertexXY.byteLength,s&&(l.vertexZ=new Float64Array(u,f,t),f+=l.vertexZ.byteLength),n&&(l.vertexM=new Float64Array(u,f,t),f+=l.vertexM.byteLength),i&&(l.segmentParams=new Float64Array(u,f,l.segmentParamCount),f+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(u,f,t),l.segmentIndices.fill(k),f+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(u,f,r+1),f+=l.partOffsets.byteLength,l.partFlags=new Int8Array(u,f,r+1),f+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,r).fill(1)),i&&(l.segmentFlags=new Int8Array(u,f,t),l.segmentFlags.fill(1),f+=l.segmentFlags.byteLength),l}function Y(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;let[o,[l,h],u,f,m,c,p]=t.a,x=4;f||(x|=1),u||(x|=2);let d=(0,g.SW)(e,t),[y,v]=(0,g.Uk)(d,.5);return n[a++]=x,n[a++]=c,n[a++]=p,n[a++]=m,n[a++]=l,n[a++]=h,n[a++]=d.u2-d.u1,n[a++]=d.u1,n[a++]=y,n[a++]=v,a}function I(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){r[i]=4,s[i]=a;let l=(0,f.io)(e,t);return F(l,4,...(0,o.mq)(l,.5),n,a)}function b(e,t,{segmentFlags:r,segmentIndices:s,segmentParams:n},i,a){return r[i]=4,s[i]=a,F((0,l.pM)(e,t),0,...t.c[1],n,a)}function F(e,t,r,s,n,i){let{cx:a,cy:o,thetaStart:l,thetaEnd:h,radius:u}=e;return l>h||(t|=1),Math.abs(h-l)<=Math.PI||(t|=2),n[i++]=t,n[i++]=u,n[i++]=1,n[i++]=0,n[i++]=a,n[i++]=o,n[i++]=h-l,n[i++]=l,n[i++]=r,n[i++]=s,i}function X(e,{b:[t,[r,s],[n,i]]},{segmentFlags:a,segmentIndices:o,segmentParams:l},h,u){return a[h]=2,o[h]=u,l[u++]=r,l[u++]=s,l[u++]=n,l[u++]=i,u}const G=1.61803,k=-1},78125(e,t,r){r.r(t),r.d(t,{fromExtent:()=>x,fromGeometry:()=>p,fromMultipoint:()=>d,fromPoint:()=>y,fromPolygon:()=>v,fromPolyline:()=>C,fromPolylineUsingImportOperator:()=>M,fromSpatialReference:()=>E,getSpatialReference:()=>c,toExtent:()=>Z,toGeometry:()=>P,toMultipoint:()=>V,toPoint:()=>A,toPolygon:()=>O,toPolyline:()=>R});var s=r(83661),n=r(55537),i=r(95213),a=r(88885),o=r(5443),l=r(48526),h=r(86738),u=r(39829),f=r(82799),g=(r(90293),r(83299));const m="_gxVersion";function c(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function p(e){switch(e.type){case"point":return y(e);case"multipoint":return d(e);case"polyline":return C(e);case"polygon":return v(e);case"extent":return x(e);default:throw Error(`Unsupported geometry type: ${e.type}`)}}function x(e){if(!e.getCacheValue(m)){let t=new i.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(m,t)}return e.getCacheValue(m)}function d(e){if(!e.getCacheValue(m)){let t=new a.M,r=new i.P,s=e.points,n=e.hasM,o=e.hasZ,l=o?3:2;for(let e=0,i=s.length;e<i;e++){let i=s[e];r.setXYCoords(i[0],i[1]),o&&r.setZ(i[2]??0),n&&r.setM(i[l]??NaN),t.add(r)}e.setCacheValue(m,t)}return e.getCacheValue(m)}function y(e){if(!e.getCacheValue(m)){let t=new i.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(m,t)}return e.getCacheValue(m)}function v(e){if(!e.getCacheValue(m)){let{curveRings:t,hasM:r,hasZ:s,rings:n}=e,i=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:r,hasZ:s,rings:n});e.setCacheValue(m,i)}return e.getCacheValue(m)}function C(e){if(!e.getCacheValue(m)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,i=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(m,i)}return e.getCacheValue(m)}function M(e){if(!e.getCacheValue(m)){let{curvePaths:t,hasM:r,hasZ:s,paths:n}=e,i=(0,g.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:r,hasZ:s,paths:n});e.setCacheValue(m,i)}return e.getCacheValue(m)}function E(e){return e.cache?(e.cache[m]??=(0,g.fromSpatialReference)(e),e.cache[m]):(0,g.fromSpatialReference)(e)}function P(e,t){if(e)switch(e.getGeometryType()){case n.G.enumPoint:return A(e,t);case n.G.enumEnvelope:return Z(e,t);case n.G.enumMultiPoint:return V(e,t);case n.G.enumPolyline:return R(e,t);case n.G.enumPolygon:return O(e,t)}return null}function Z(e,t){if(e.isEmpty())return null;let r=new o.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),s=e.getDescription();if(s.hasM()){let t=e.queryInterval(2,0);r.mmin=t.vmin,r.mmax=t.vmax}if(s.hasZ()){let t=e.queryInterval(1,0);r.zmin=t.vmin,r.zmax=t.vmax}return r.setCacheValue(m,e),r}function V(e,t){if(e.isEmpty())return null;let r=e.getDescription(),s=r.hasM(),n=r.hasZ(),a=[],o=new i.P;for(let t=0,r=e.getPointCount();t<r;t++){e.getPointByVal(t,o);let r=[o.getX(),o.getY()];n&&r.push(o.getZ()),s&&r.push(o.getM()),a.push(r)}let h=new l.A({hasM:s,hasZ:n,points:a,spatialReference:t});return h.setCacheValue(m,e),h}function A(e,t){if(e instanceof s.P)return new h.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;let r=new h.A({x:e.getX(),y:e.getY(),spatialReference:t}),n=e.getDescription();return n.hasM()&&(r.m=e.getM()),n.hasZ()&&(r.z=e.getZ()),r.setCacheValue(m,e),r}function O(e,t){if(e.isEmpty())return null;let r=u.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}function R(e,t){if(e.isEmpty())return null;let r=f.A.fromJSON({...(0,g.toGeometry)(e,null),spatialReference:t});return r.setCacheValue(m,e),r}},92722(e,t,r){r.d(t,{A:()=>n});var s=r(69397);class n{constructor(e=[],t=[],r=!1,s=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=r,this.hasM=s}static fromJSON({lengths:e,coords:t,hasZ:r,hasM:s}){return new n(e,t,r||!1,s||!1)}static fromRect([e,t,r,s]){let i=r-e,a=s-t;return new n([5],[e,t,i,0,0,a,-i,0,0,-a])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,s.Qf)(this.lengths,this.coords)}get stride(){return+!!this.hasZ+2+ +!!this.hasM}area(){if(this.isPoint)return 0;let e=0,t=0;for(let r of this.lengths){if(r<3)continue;let{stride:s}=this,n=this.coords[s*t],i=this.coords[s*t+1];for(let a=1;a<r;a+=1){let r=s*(t+a),o=this.coords[r],l=this.coords[r+1];e+=-.5*(o-n)*(l+i),n=o,i=l}t+=r}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);let{stride:r}=this;for(let s of this.lengths){for(let n=0;n<s;n++){let s=r*(t+n);e(this.coords[s],this.coords[s+1])}t+=s}}deltaDecode(){let e=this.clone(),{coords:t,lengths:r}=e,s=0,{stride:n}=this;for(let e of r){for(let r=1;r<e;r++){let e=n*(s+r);t[e]+=t[e-n],t[e+1]+=t[e+1-n]}s+=e}return e}clone(e){if(this.isPoint)return new n([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);let t=Array.from(this.lengths),{stride:r,size:s}=this,i=this.coords.slice(0,s*r);return e?(e.set(i),new n(t,e,this.hasZ,this.hasM)):new n(t,Array.from(i),this.hasZ,this.hasM)}justXY(){let{stride:e,size:t}=this;if(2===e)return this;let r=Array(t*e);for(let t=0,s=0;t<r.length;t+=e)r[s++]=this.coords[t],r[s++]=this.coords[t+1];return new n(this.lengths,r,!1,!1)}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[3642],{69540(e,t,i){var n=i(32198),r=i(56372),s=i(64108),o=i(88620),a=(i(44208),i(4718)),l=(i(53966),i(97768));const u=Symbol("ClonableMixin"),h=e=>{var t;let i=e,r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=u}clone(e){let t=(0,o.oY)(this);(0,l.Lw)(t,"unable to clone instance of non-accessor class");let i=t.metadata,n=t.store,r={},s=new Map;for(let t in i){let o=i[t],l=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||7!==l&&0!==l&&5!==l&&4!==l)continue;let h=this[t],d=null;if("function"==typeof u)d=u(h,e);else if("reference"===u)d=h;else if(d=(0,a.TU)(h,e),null!=h&&null==d)continue;0===l?s.set(t,d):r[t]=d}let u=new(Object.getPrototypeOf(this).constructor)(r);if(s.size){let e=(0,o.oY)(u)?.store;if(e)for(let[t,i]of s)e.set(t,i,0)}return u}};return r=(0,n.Cg)([(0,s.$K)("esri.core.Clonable")],r),r},d=h(r.A);i.d(t,["OU",0,h,"Pw",0,d])},65529(e,t,i){var n=i(56372),r=i(36563);const s=e=>{let t=e;return class extends t{constructor(){super(...arguments),this._listenersMap=null}clearEvents(){this._listenersMap?.clear(),this._listenersMap=null}destroy(){this.clearEvents()}emit(e,t){let i=this._listenersMap?.get(e);if(!i)return!1;let n=!1;for(let e of i.slice()){let i="deref"in e?e.deref():e;i?i?.call(this,t):n=!0}return n&&(i=i.filter(e=>!("deref"in e)||null!=e.deref()),this._listenersMap.set(e,i)),i.length>0}on(e,t){if(Array.isArray(e)){let i=e.map(e=>this.on(e,t));return(0,r.vE)(i)}if(e.includes(","))throw TypeError("Evented.on() with a comma delimited string of event types is not supported");this._listenersMap??=new Map;let i=this._listenersMap.get(e)||[];return i.push(t),this._listenersMap.set(e,i),(0,r.hA)(()=>{let i=this._listenersMap?.get(e),n=i?.indexOf(t)??-1;n>=0&&i.splice(n,1)})}once(e,t){let i=this.on(e,e=>{i.remove(),("deref"in t?t.deref():t)?.call(null,e)});return i}hasEventListener(e){let t=this._listenersMap?.get(e);return null!=t&&t.length>0}}},o=s(class{}),a=o,l=s(n.A);i.d(t,["Zt",0,s,"a$",0,o,"bk",0,a,"nJ",0,l])},66344(e,t,i){i.d(t,{q:()=>a});const n=!!(0,i(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){return this._db.get(e.id+t)?.size??0}put(e,t,i,r,o){t=e.id+t;let a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==i&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,i,r,0);if(void 0===i)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return n||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,i,0,0);let l=1+Math.max(o,-4)- -3;this._db.set(t,new s(i,r,l)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;let i=this._db.get(t);if(!i)return;this._size-=i.size,e.size-=i.size;let n=i.entry.usedMemory;for(;n>this._maxSize;){let e=this._notifyRemove(t,i.entry,n,1);if(!(null!=e&&e>0))return void this._db.delete(t);n=e}i.size=n,this._size+=n,e.size+=n,this._checkSize()}pop(e,t){t=e.id+t;let i=this._db.get(t);if(i)return this._size-=i.size,e.size-=i.size,this._db.delete(t),++this._hit,i.entry;++this._miss}get(e,t){t=e.id+t;let i=this._db.get(t);if(void 0!==i)return this._db.delete(t),i.lives=i.lifetime,this._db.set(t,i),++this._hit,i.entry;++this._miss}peek(e,t){let i=this._db.get(e.id+t);return i?++this._hit:++this._miss,i?.entry}get performanceInfo(){let e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},i=[];this._db.forEach((e,n)=>{let r=e.lifetime;i[r]=(i[r]||0)+e.size,this._clients.forEach(i=>{let{id:r,name:s}=i;if(n.startsWith(r)){let i=t[s]||0;t[s]=i+e.size}})});let n={};this._clients.forEach(e=>{let i=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){let r=t[i]||0;t[i]=r,n[i]=Math.round(100*e.hitRate)+"%"}else n[i]="0%"});let r=Object.keys(t);r.sort((e,i)=>t[i]-t[e]),r.forEach(i=>e[i]=Math.round(t[i]/2**20)+"MB / "+n[i]);for(let t=i.length-1;t>=0;--t){let n=i[t];n&&(e["Priority "+(t+-3-1)]=Math.round(n/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){let t=e.id;this._db.forEach((e,i)=>{i.startsWith(t)&&(this._size-=e.size,this._db.delete(i),this._notifyRemove(i,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(let[t,i]of this._db)t.startsWith(e.id)&&(yield i.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,i,n){let r=(0,this._clients.get(e.split(o)[0])?.removeFunc)?.(t,n,i);return"number"==typeof r?r:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){let i=t??this;if(i.size<=e)return;let n=t?.id,r=!0;for(;r;){r=!1;for(let[s,a]of this._db)if(0===a.lifetime&&(!n||s.startsWith(n))){let n=t??this._clients.get(s.split(o)[0]);if(this._purgeItem(s,a,n),i.size<=.9*e)return;r||=this._db.has(s)}}for(let[r,s]of this._db)if(!n||r.startsWith(n)){let n=t??this._clients.get(r.split(o)[0]);if(this._purgeItem(r,s,n),i.size<=.9*e)return}}_purgeItem(e,t,i){if(this._db.delete(e),t.lives<=1){this._size-=t.size,i&&(i.size-=t.size);let n=this._notifyRemove(e,t.entry,t.size,1);null!=n&&n>0&&(this._size+=n,i&&(i.size+=n),t.lives=t.lifetime,t.size=n,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class s{constructor(e,t,i){this.entry=e,this.size=t,this.lifetime=i,this.lives=i}}const o=":";class a{constructor(e,t){this.removeFunc=t,this.id=":",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,i=1){this._storage.put(this,e,t,i,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,i){i.d(t,{DZ:()=>m,Ke:()=>f,QA:()=>p,Tj:()=>h,UT:()=>y,aD:()=>_,jJ:()=>u});var n=i(32198),r=i(56372),s=i(10107),o=i(64108),a=i(97768),l=i(17676);function u(e,t,i){return(0,l.Lx)(e.map((e,n)=>t.apply(i,[e,n])))}async function h(e,t,i){return(await(0,l.Lx)(e.map((e,n)=>t.apply(i,[e,n])))).map(e=>e.value)}function d(e){return{ok:!0,value:e}}function c(e){return{ok:!1,error:e}}async function f(e){if(null==e)return{ok:!1,error:Error("no promise provided")};try{return d(await e)}catch(e){return c(e)}}async function m(e){try{return d(await e)}catch(e){return(0,l.QP)(e),c(e)}}function p(e){if(!0===e.ok)return e.value;throw e.error}function y(e,t){return new g(e,t)}let g=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super(),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,a.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;let{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=d(e),this._cleanup()},e=>{this._result=c(e),this._cleanup()}),this._abortHandle=(0,l.u7)(t,this.abort)}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,a.xt)(this._abortHandle),this._abortController=null}};(0,n.Cg)([(0,s.MZ)()],g.prototype,"value",null),(0,n.Cg)([(0,s.MZ)()],g.prototype,"error",null),(0,n.Cg)([(0,s.MZ)()],g.prototype,"finished",null),(0,n.Cg)([(0,s.MZ)()],g.prototype,"promise",void 0),(0,n.Cg)([(0,s.MZ)()],g.prototype,"_result",void 0),g=(0,n.Cg)([(0,o.$K)("esri.core.asyncUtils.ReactiveTask")],g);class _{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});let t=await e;return{[Symbol.dispose]:t}}async run(e){let t={stack:[],error:void 0,hasError:!1};try{return(0,n.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,n.hk)(t)}}}},67482(e,t,i){function n(e){return null!==r(e)}function r(e){return function(e){let t=s.exec(e);if(!t?.groups)return null;let i=t.groups,n=+i.year,r=i.month-1,o=+i.day,a=+(i.hours??"0"),l=+(i.minutes??"0"),u=+(i.seconds??"0");if(a>23||l>59||u>59)return null;let h,d=i.ms??"0",c=d?+d.padEnd(3,"0").slice(0,3):0;if(i.isUTC||!i.offsetSign)h=Date.UTC(n,r,o,a,l,u,c);else{let e=+i.offsetHours,t=+i.offsetMinutes;h=6e4*("+"===i.offsetSign?-1:1)*(60*e+t)+Date.UTC(n,r,o,a,l,u,c)}return Number.isNaN(h)?null:h}(e)??function(e){let t=new Date(e),i=t.getTime();return Number.isNaN(i)?null:e.toLowerCase()===t.toUTCString().toLowerCase()?i:null}(e)??function(e){if(!o.test(e))return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t.getTime()-6e4*t.getTimezoneOffset()}(e)}i.d(t,{C:()=>n,_:()=>r});const s=/^(?:(?<year>-?\d{4,})-(?<month>\d{2})-(?<day>\d{2}))(?:T(?<hours>\d{2}):(?<minutes>\d{2}):(?<seconds>\d{2})(?:\.(?<ms>\d+))?)?(?:(?<isUTC>Z)|(?:(?<offsetSign>\+|-)(?<offsetHours>\d{2}):(?<offsetMinutes>\d{2})))?$/,o=/^((\d{1,2}[/-]\d{1,2}[/-]\d{4})|(\d{4}[/-]\d{1,2}[/-]\d{1,2}))( \d{1,2}:\d{1,2}:\d{1,2}( ((AM)|(PM)))?)?$/i},9093(e,t,i){function n(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>r,vt:()=>n});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(e,t,i,n,r,s,o,a,l,u,h,d,c,f,m,p){return[e,t,i,n,r,s,o,a,l,u,h,d,c,f,m,p]}},Symbol.toStringTag,{value:"Module"})),i.d(t,["zK",0,s])},35522(e,t,i){i.d(t,{$A:()=>I,Bw:()=>s,C:()=>o,Cc:()=>F,DI:()=>x,Il:()=>L,Io:()=>_,Ln:()=>g,Om:()=>w,Qr:()=>d,Re:()=>u,S8:()=>v,T9:()=>p,WQ:()=>l,Z0:()=>T,_S:()=>f,aI:()=>P,ei:()=>A,fw:()=>z,gL:()=>C,hG:()=>M,hZ:()=>a,hs:()=>y,jb:()=>O,jk:()=>m,lo:()=>j,lw:()=>h,m3:()=>b,oW:()=>D,t2:()=>E,tn:()=>c,uE:()=>k,ze:()=>S});var n=i(51850),r=i(34304);function s(e){let t=e[0],i=e[1],n=e[2];return Math.sqrt(t*t+i*i+n*n)}function o(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function a(e,t,i,n){return e[0]=t,e[1]=i,e[2]=n,e}function l(e,t,i){return e[0]=t[0]+i[0],e[1]=t[1]+i[1],e[2]=t[2]+i[2],e}function u(e,t,i){return e[0]=t[0]-i[0],e[1]=t[1]-i[1],e[2]=t[2]-i[2],e}function h(e,t,i){return e[0]=t[0]*i[0],e[1]=t[1]*i[1],e[2]=t[2]*i[2],e}function d(e,t,i){return e[0]=t[0]/i[0],e[1]=t[1]/i[1],e[2]=t[2]/i[2],e}function c(e,t){return e[0]=Math.abs(t[0]),e[1]=Math.abs(t[1]),e[2]=Math.abs(t[2]),e}function f(e,t){return e[0]=Math.sign(t[0]),e[1]=Math.sign(t[1]),e[2]=Math.sign(t[2]),e}function m(e,t,i){return e[0]=Math.min(t[0],i[0]),e[1]=Math.min(t[1],i[1]),e[2]=Math.min(t[2],i[2]),e}function p(e,t,i){return e[0]=Math.max(t[0],i[0]),e[1]=Math.max(t[1],i[1]),e[2]=Math.max(t[2],i[2]),e}function y(e,t,i){return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e}function g(e,t,i,n){return e[0]=t[0]+i[0]*n,e[1]=t[1]+i[1]*n,e[2]=t[2]+i[2]*n,e}function _(e,t){let i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(i*i+n*n+r*r)}function M(e,t){let i=t[0]-e[0],n=t[1]-e[1],r=t[2]-e[2];return i*i+n*n+r*r}function b(e){let t=e[0],i=e[1],n=e[2];return t*t+i*i+n*n}function S(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function x(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function v(e,t=e){let i=t[0],n=t[1],r=t[2],s=i*i+n*n+r*r;return s>0&&(s=1/Math.sqrt(s),e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s),e}function w(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function I(e,t,i){let n=t[0],r=t[1],s=t[2],o=i[0],a=i[1],l=i[2];return e[0]=r*l-s*a,e[1]=s*o-n*l,e[2]=n*a-r*o,e}function F(e,t,i,n){let r=t[0],s=t[1],o=t[2];return e[0]=r+n*(i[0]-r),e[1]=s+n*(i[1]-s),e[2]=o+n*(i[2]-o),e}function T(e,t,i){let n=t[0],r=t[1],s=t[2];return e[0]=i[0]*n+i[4]*r+i[8]*s+i[12],e[1]=i[1]*n+i[5]*r+i[9]*s+i[13],e[2]=i[2]*n+i[6]*r+i[10]*s+i[14],e}function A(e,t,i){let n=t[0],r=t[1],s=t[2];return e[0]=n*i[0]+r*i[3]+s*i[6],e[1]=n*i[1]+r*i[4]+s*i[7],e[2]=n*i[2]+r*i[5]+s*i[8],e}function C(e,t,i){return z(e,t,i[0],i[1],i[2],i[3])}function z(e,t,i,n,r,s){let o=t[0],a=t[1],l=t[2],u=n*l-r*a,h=r*o-i*l,d=i*a-n*o,c=n*d-r*h,f=r*u-i*d,m=i*h-n*u,p=2*s;return e[0]=o+u*p+2*c,e[1]=a+h*p+2*f,e[2]=l+d*p+2*m,e}const R=(0,n.vt)(),B=(0,n.vt)();function E(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function P(e,t){if(e===t)return!0;let i=e[0],n=e[1],s=e[2],o=t[0],a=t[1],l=t[2],u=(0,r.FD)();return Math.abs(i-o)<=u*Math.max(1,Math.abs(i),Math.abs(o))&&Math.abs(n-a)<=u*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(s-l)<=u*Math.max(1,Math.abs(s),Math.abs(l))}function D(e,t,i){let n=i[0]-t[0],r=i[1]-t[1],s=i[2]-t[2],o=n*n+r*r+s*s;return o>0?(o=1/Math.sqrt(o),e[0]=n*o,e[1]=r*o,e[2]=s*o,e):(e[0]=0,e[1]=0,e[2]=0,e)}const O=u,q=h,N=d,Z=_,j=M,L=s,k=b;Object.freeze(Object.defineProperty({__proto__:null,abs:c,add:l,angle:function(e,t){v(R,e),v(B,t);let i=w(R,B);return i>1?0:i<-1?Math.PI:Math.acos(i)},applyTranslation:function(e,t,i){return e[0]=t[0]+i[12],e[1]=t[1]+i[13],e[2]=t[2]+i[14],e},bezier:function(e,t,i,n,r,s){let o=1-s,a=o*o,l=s*s,u=a*o,h=3*s*a,d=3*l*o,c=l*s;return e[0]=t[0]*u+i[0]*h+n[0]*d+r[0]*c,e[1]=t[1]*u+i[1]*h+n[1]*d+r[1]*c,e[2]=t[2]*u+i[2]*h+n[2]*d+r[2]*c,e},ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e},clamp:function(e,t=0,i=1){return e[0]=Math.min(Math.max(e[0],t),i),e[1]=Math.min(Math.max(e[1],t),i),e[2]=Math.min(Math.max(e[2],t),i),e},copy:o,cross:I,crossAndNormalize:function(e,t,i){let n=t[0],r=t[1],s=t[2],o=i[0],a=i[1],l=i[2],u=r*l-s*a,h=s*o-n*l,d=n*a-r*o,c=Math.sqrt(u*u+h*h+d*d);return e[0]=u/c,e[1]=h/c,e[2]=d/c,e},direction:D,dist:Z,distance:_,div:N,divide:d,dot:w,equals:P,exactEquals:E,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e},hermite:function(e,t,i,n,r,s){let o=s*s,a=o*(2*s-3)+1,l=o*(s-2)+s,u=o*(s-1),h=o*(3-2*s);return e[0]=t[0]*a+i[0]*l+n[0]*u+r[0]*h,e[1]=t[1]*a+i[1]*l+n[1]*u+r[1]*h,e[2]=t[2]*a+i[2]*l+n[2]*u+r[2]*h,e},inverse:x,len:L,length:s,lerp:F,max:p,min:m,mul:q,multiply:h,negate:S,normalize:v,random:function(e,t=1){let i=r.Ov,n=2*i()*Math.PI,s=2*i()-1,o=Math.sqrt(1-s*s)*t;return e[0]=Math.cos(n)*o,e[1]=Math.sin(n)*o,e[2]=s*t,e},rotateX:function(e,t,i,n){let r=[],s=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],s[0]=r[0],s[1]=r[1]*Math.cos(n)-r[2]*Math.sin(n),s[2]=r[1]*Math.sin(n)+r[2]*Math.cos(n),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},rotateY:function(e,t,i,n){let r=[],s=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],s[0]=r[2]*Math.sin(n)+r[0]*Math.cos(n),s[1]=r[1],s[2]=r[2]*Math.cos(n)-r[0]*Math.sin(n),e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},rotateZ:function(e,t,i,n){let r=[],s=[];return r[0]=t[0]-i[0],r[1]=t[1]-i[1],r[2]=t[2]-i[2],s[0]=r[0]*Math.cos(n)-r[1]*Math.sin(n),s[1]=r[0]*Math.sin(n)+r[1]*Math.cos(n),s[2]=r[2],e[0]=s[0]+i[0],e[1]=s[1]+i[1],e[2]=s[2]+i[2],e},round:function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e},scale:y,scaleAndAdd:g,scaleTo:function(e,t){return y(e,e,t/L(e))},set:a,sign:f,sqrDist:j,sqrLen:k,squaredDistance:M,squaredLength:b,str:function(e){return"vec3("+e[0]+", "+e[1]+", "+e[2]+")"},sub:O,subtract:u,transformMat3:A,transformMat4:T,transformMat4Z:function(e,t){return t[2]*e[0]+t[6]*e[1]+t[10]*e[2]+t[14]},transformQuat:C,transformQuatValues:z},Symbol.toStringTag,{value:"Module"}))},75503(e,t,i){i.d(t,{wq:()=>a});var n=i(4576),r=i(21818),s=(i(44208),i(15142)),o=i(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=f,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),S.prune(),x.prune(),v.prune(),w.prune()}all(e){l(this._data,e)}search(e,t){let i=this._data,n=this._toBBox;if(M(e,i))for(S.clear();i;){for(let r=0,s=i.children.length;r<s;r++){let s=i.children[r],o=i.leaf?n(s):s;M(e,o)&&(i.leaf?t(s):_(e,o)?l(s,t):S.push(s))}i=S.pop()}}collides(e){let t=this._data,i=this._toBBox;if(!M(e,t))return!1;for(S.clear();t;){for(let n=0,r=t.children.length;n<r;n++){let r=t.children[n],s=t.leaf?i(r):r;if(M(e,s)){if(t.leaf||_(e,s))return!0;S.push(r)}}t=S.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,i=e.length;t<i;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){let e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new T([]),this}remove(e){if(!e)return this;let t,i=this._data,s=null,o=0,a=!1,l=this._toBBox(e);for(v.clear(),w.clear();i||v.length>0;){if(i||(i=v.pop(),s=v.data[v.length-1],o=w.pop()??0,a=!0),i.leaf&&(t=(0,n.qh)(i.children,(0,r.z)(e),i.children.length,i.indexHint),-1!==t))return i.children.splice(t,1),v.push(i),this._condense(v),this;a||i.leaf||!_(i,l)?s?(o++,i=s.children[o],a=!1):i=null:(v.push(i),w.push(o),o=0,s=i,i=i.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,i,n){let r=i-t+1,s=this._maxEntries;if(r<=s){let n=new T(e.slice(t,i+1));return u(n,this._toBBox),n}n||(n=Math.ceil(Math.log(r)/Math.log(s)),s=Math.ceil(r/s**(n-1)));let o=new A([]);o.height=n;let a=Math.ceil(r/s),l=a*Math.ceil(Math.sqrt(s));b(e,t,i,l,this._compareMinX);for(let r=t;r<=i;r+=l){let t=Math.min(r+l-1,i);b(e,r,t,a,this._compareMinY);for(let i=r;i<=t;i+=a){let r=Math.min(i+a-1,t);o.children.push(this._build(e,i,r,n-1))}}return u(o,this._toBBox),o}_insert(e,t,i){let n=this._toBBox,r=i?e:n(e);v.clear();let s=function(e,t,i,n){for(;n.push(t),!0!==t.leaf&&n.length-1!==i;){let i,n=1/0,r=1/0;for(let s=0,o=t.children.length;s<o;s++){let o=t.children[s],a=m(o),l=y(e,o)-a;l<r?(r=l,n=a<n?a:n,i=o):l===r&&a<n&&(n=a,i=o)}t=i||t.children[0]}return t}(r,this._data,t,v);for(s.children.push(e),d(s,r);t>=0&&v.data[t].children.length>this._maxEntries;)this._split(v,t),t--;!function(e,t,i){for(let n=i;n>=0;n--)d(t.data[n],e)}(r,v,t)}_split(e,t){let i=e.data[t],n=i.children.length,r=this._minEntries;this._chooseSplitAxis(i,r,n);let s=this._chooseSplitIndex(i,r,n);if(!s)return;let o=i.children.splice(s,i.children.length-s),a=i.leaf?new T(o):new A(o);a.height=i.height,u(i,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(i,a)}_splitRoot(e,t){this._data=new A([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,i){let n,r,s;n=r=1/0;for(let o=t;o<=i-t;o++){let t=h(e,0,o,this._toBBox),a=h(e,o,i,this._toBBox),l=g(t,a),u=m(t)+m(a);l<n?(n=l,s=o,r=u<r?u:r):l===n&&u<r&&(r=u,s=o)}return s}_chooseSplitAxis(e,t,i){let n=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:f;this._allDistMargin(e,t,i,n)<this._allDistMargin(e,t,i,r)&&e.children.sort(n)}_allDistMargin(e,t,i,n){e.children.sort(n);let r=this._toBBox,s=h(e,0,t,r),o=h(e,i-t,i,r),a=p(s)+p(o);for(let n=t;n<i-t;n++){let t=e.children[n];d(s,e.leaf?r(t):t),a+=p(s)}for(let n=i-t-1;n>=t;n--){let t=e.children[n];d(o,e.leaf?r(t):t),a+=p(o)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){let i=e.data[t];if(0===i.children.length)if(t>0){let r=e.data[t-1],s=r.children;s.splice((0,n.qh)(s,i,s.length,r.indexHint),1)}else this.clear();else u(i,this._toBBox)}}_initFormat(e){let t=["return a"," - b",";"];this._compareMinX=Function("a","b",t.join(e[0])),this._compareMinY=Function("a","b",t.join(e[1])),this._toBBox=Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let i=e;for(x.clear();i;){if(!0===i.leaf)for(let e of i.children)t((0,r.z)(e));else x.pushArray(i.children);i=x.pop()??null}}function u(e,t){h(e,0,e.children.length,t,e)}function h(e,t,i,n,r){r||=new T([]),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let s,o=t;o<i;o++)s=e.children[o],d(r,e.leaf?n(s):s);return r}function d(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function f(e,t){return e.minY-t.minY}function m(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function p(e){return e.maxX-e.minX+(e.maxY-e.minY)}function y(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){let i=Math.max(e.minX,t.minX),n=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),s=Math.min(e.maxY,t.maxY);return Math.max(0,r-i)*Math.max(0,s-n)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function M(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function b(e,t,i,n,r){let s=[t,i];for(;s.length;){let t=s.pop(),i=s.pop();if(t-i<=n)continue;let a=i+Math.ceil((t-i)/n/2)*n;(0,o.q)(e,a,i,t,r),s.push(i,a,a,t)}}const S=new s.A,x=new s.A,v=new s.A,w=new s.A({deallocator:void 0});class I{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class F extends I{constructor(){super(...arguments),this.height=1,this.indexHint=new n.vW}}class T extends F{constructor(e){super(),this.children=e,this.leaf=!0}}class A extends F{constructor(e){super(),this.children=e,this.leaf=!1}}},69397(e,t,i){i.d(t,{JY:()=>f,Qf:()=>l,Qh:()=>o,lM:()=>s,ro:()=>u,rq:()=>h});var n=i(44208),r=i(34275);function s(e){if(!e)return 0;let t=d;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return h(e,8);let i=c;for(let n=0;n<t;n++)i+=a(e[n]);return i}(e);let t=d;for(let i in e)e.hasOwnProperty(i)&&(t+=a(e[i]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?o(e):d;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,r.iu)(e)?e.byteLength+m:Array.isArray(e)?h(e,t):0:0}function h(e,t){return c+e.length*t}const d=32,c=16,f=(0,n.A)("ios")||!(0,n.A)("chrome")&&!(0,n.A)("opr")?8:4,m=145},36708(e,t,i){i.d(t,{C_:()=>c,OH:()=>p,Vh:()=>y,on:()=>d,pc:()=>g,wB:()=>l,z7:()=>u});var n=i(14012),r=i(37955),s=i(36563),o=i(97768),a=i(17676);function l(e,t,i={}){return h(e,t,i,f)}function u(e,t,i={}){return h(e,t,i,m)}function h(e,t,i={},r){let s=null,a=i.once?(e,i)=>{r(e)&&((0,o.xt)(s),t(e,i))}:(e,i)=>{r(e)&&t(e,i)};if(s=(0,n.Cn)(e,a,i.sync,i.equals),i.initial){let t=e();a(t,t)}return s}function d(e,t,i,n={}){let a=null,u=null,h=null;function d(){a&&u&&(u.remove(),n.onListenerRemove?.(a),a=null,u=null)}function c(e){n.once&&n.once&&(0,o.xt)(h),i(e)}let f=l(e,(e,i)=>{d(),(0,r.wb)(e)&&(a=e,u=(0,r.on)(e,t,c),n.onListenerAdd?.(e))},{sync:n.sync,initial:!0});return h=(0,s.hA)(()=>{f.remove(),d()}),h}function c(e,t){return function(e,t,i){if((0,a.G4)(i))return Promise.reject((0,a.NK)());let n=e();if(t?.(n))return Promise.resolve(n);let r=null;function l(){r=(0,o.xt)(r)}return new Promise((n,o)=>{r=(0,s.vE)([(0,a.u7)(i,()=>{l(),o((0,a.NK)())}),h(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,m,t)}function f(e){return!0}function m(e){return!!e}i(80559);const p={sync:!0},y={initial:!0},g={sync:!0,initial:!0}},44794(e,t,i){i.d(t,{v:()=>a});var n=i(62788),r=i(95488),s=i(4718);class o{constructor(e,t){this._observable=new r.I,this._value=e,this._equalityFunction=t}get value(){return(0,n.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 a(e,t=s.gh){return new o(e,t)}},88930(e,t,i){i.d(t,{S1:()=>a,VW:()=>l,lL:()=>u,rb:()=>h,t:()=>d});var n=i(34747),r=i(97770);i(98623);const s=/^(?<hh>([01][0-9])|(2[0-3])):(?<mm>[0-5][0-9])(:(?<ss>[0-5][0-9]))?(\.(?<ms>\d+))?$/,o={milliseconds:1,seconds:1e3,minutes:6e4,hours:36e5,days:864e5,weeks:6048e5,months:26784e5,years:31536e6,decades:31536e7,centuries:31536e8,unknown:NaN};function a(e,t,i,s="system"){if("unknown"===i)return e;let o=new n.oh((0,r.wj)(s)),a=n.c9.fromJSDate(e,{zone:o}),l="decades"===i||"centuries"===i?"year":function(e){switch(e){case"milliseconds":return"millisecond";case"seconds":return"second";case"minutes":return"minute";case"hours":return"hour";case"days":return"day";case"weeks":return"week";case"months":return"month";case"years":return"year"}}(i);return"decades"===i&&(t*=10),"centuries"===i&&(t*=100),a.plus({[l]:t}).toJSDate()}function l(e,t,i="milliseconds"){let n=e.getTime(),r=d(t,i,"milliseconds");return new Date(n+r)}function u(e,t,i="system"){let{unit:s}=t,o=Math.max(1,Math.trunc(t.value)),a=new n.oh((0,r.wj)(i)),l=n.c9.fromJSDate(e,{zone:a}),u=e=>e-e%o;switch(s){case"milliseconds":return l.startOf("second").plus({millisecond:u(l.millisecond)}).toJSDate();case"seconds":return l.startOf("minute").plus({second:u(l.second)}).toJSDate();case"minutes":return l.startOf("hour").plus({minute:u(l.minute)}).toJSDate();case"hours":return l.startOf("day").plus({hour:u(l.hour)}).toJSDate();case"days":return l.startOf("month").plus({day:u(l.day-1)}).toJSDate();case"weeks":{let e=l.startOf("year").startOf("week"),t=Math.floor(l.diff(e,"weeks").weeks);return e.plus({week:u(t)}).toJSDate()}case"months":return l.startOf("year").plus({month:u(l.month-1)}).toJSDate();case"years":case"decades":case"centuries":{let e=l.startOf("year"),t=("decades"===s?10:"centuries"===s?100:1)*o,i=e.year-e.year%t;return e.set({year:i}).toJSDate()}case"unknown":return e}}function h(e){let t=s.exec(e);if(!t)return null;let{hh:i,mm:n,ss:r,ms:a}=t.groups;return Number(i)*o.hours+Number(n)*o.minutes+Number(r||0)*o.seconds+Number(a||0)}function d(e,t,i){return 0===e?0:e*o[t]/o[i]}},48526(e,t,i){var n,r=i(32198),s=i(91429),o=i(4576),a=i(4718),l=i(5443),u=i(91075),h=i(86738),d=i(16930),c=i(90634),f=i(47610),m=i(56993),p=i(43937);let y=n=class extends u.A{constructor(e){super(function(e){if(!e)return;let{points:t,hasM:i,hasZ:n,spatialReference:r}=e;switch(t??=[],t?.at(0)?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=d.A.WGS84,{...e,hasM:i,hasZ:n,points:t,spatialReference:r}}(e)),this.points=[],this.type="multipoint"}get cache(){return this.commitProperty("points"),this.commitProperty("hasZ"),this.commitProperty("hasM"),this.commitProperty("spatialReference"),{}}get extent(){let e=(0,c.ge)(this);return e?new l.A({...e,spatialReference:this.spatialReference}):null}writePoints(e,t){t.points=(0,a.o8)(this.points)}clone(){let{points:e,spatialReference:t,hasM:i,hasZ:r}=this;return new n({points:(0,a.o8)(e),spatialReference:t.clone(),hasM:i,hasZ:r})}equals(e){if(this===e)return!0;if(null==e)return!1;let t=this.spatialReference,i=e.spatialReference;return!(null!=t!=(null!=i)||null!=t&&null!=i&&!t.equals(i))&&(0,o.aI)(this.points,e.points,f.v6)}addPoint(e){return(0,m.h)(this,e),Array.isArray(e)?this.points.push(e):this.points.push(e.toArray()),this.notifyChange("points"),this}getPoint(e){if(!this._validateInputs(e))return null;let t=this.points[e],i={x:t[0],y:t[1],spatialReference:this.spatialReference},n=2;return this.hasZ&&(i.z=t[2],n=3),this.hasM&&(i.m=t[n]),new h.A(i)}removePoint(e){if(!this._validateInputs(e))return null;let[t,i,n,r]=this.points.splice(e,1)[0],s=new h.A({x:t,y:i,z:n,m:r,spatialReference:this.spatialReference});return this.notifyChange("points"),s}setPoint(e,t){return this._validateInputs(e)&&((0,m.h)(this,t),Array.isArray(t)||(t=t.toArray()),this.points[e]=t,this.notifyChange("points")),this}toJSON(e){return this.write({},e)}_validateInputs(e){return null!=e&&e>=0&&e<this.points.length}};(0,r.Cg)([(0,s.MZ)({readOnly:!0})],y.prototype,"cache",null),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],y.prototype,"extent",null),(0,r.Cg)([(0,s.MZ)({type:[[Number]],json:{write:{isRequired:!0}}})],y.prototype,"points",void 0),(0,r.Cg)([(0,p.K)("points")],y.prototype,"writePoints",null),y=n=(0,r.Cg)([(0,s.$K)("esri.geometry.Multipoint")],y);const g=y;y.prototype.toJSON.isDefaultToJSON=!0,i.d(t,["A",0,g])},82799(e,t,i){var n,r=i(32198),s=i(91429),o=i(4718),a=i(5443),l=i(91075),u=i(86738),h=i(16930),d=i(90634),c=i(56993),f=i(43937);let m=n=class extends l.A{constructor(e){super(function(e){if(!e)return;let{paths:t,hasM:i,hasZ:n,spatialReference:r}=e;switch(t??=[],function(e){return"number"==typeof e[0]?.[0]}(t)&&(t=[t]),t[0]?.[0]?.length){case 4:n??=!0,i??=!0;break;case 3:n??=!0!==i,i??=!n;break;default:n??=!1,i??=!1}return r??=h.A.WGS84,{...e,hasM:i,hasZ:n,paths:t,spatialReference:r}}(e)),this.curvePaths=void 0,this.paths=[],this.type="polyline"}get cache(){return this.commitProperty("curvePaths"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("paths"),this.commitProperty("spatialReference"),{}}writeCurvePaths(e,t){t.curvePaths=(0,o.o8)(e)}get extent(){let e=(0,d.Z3)(this),{spatialReference:t}=this;return e?new a.A({...e,spatialReference:t}):null}writePaths(e,t){t.paths=(0,o.o8)(this.paths)}addPath(e){if(!e)return;let t=this.paths,i=t.length;if(function(e){return!Array.isArray(e[0])}(e)){let n=[];for(let t=0,i=e.length;t<i;t++)n[t]=e[t].toArray();t[i]=n}else t[i]=e.slice();return this.notifyChange("paths"),this}clone(){let e=new n;return e.spatialReference=this.spatialReference,e.paths=(0,o.o8)(this.paths),e.curvePaths=(0,o.o8)(this.curvePaths),e.hasZ=this.hasZ,e.hasM=this.hasM,e}getPoint(e,t){if(!this._validateInputs(e,t))return null;let i=this.paths[e][t],n=this.hasZ,r=this.hasM;return n&&!r?new u.A({x:i[0],y:i[1],z:i[2],spatialReference:this.spatialReference}):r&&!n?new u.A({x:i[0],y:i[1],m:i[2],spatialReference:this.spatialReference}):n&&r?new u.A({x:i[0],y:i[1],z:i[2],m:i[3],spatialReference:this.spatialReference}):new u.A({x:i[0],y:i[1],spatialReference:this.spatialReference})}insertPoint(e,t,i){return this._validateInputs(e,t,!0)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e].splice(t,0,i),this.notifyChange("paths")),this}removePath(e){if(!this._validateInputs(e,null))return null;let t=this.paths.splice(e,1)[0],i=this.spatialReference,n=t.map(e=>new u.A({x:e[0],y:e[1],z:e[2],m:e[3],spatialReference:i}));return this.notifyChange("paths"),n}removePoint(e,t){if(!this._validateInputs(e,t))return null;let[i,n,r,s]=this.paths[e].splice(t,1)[0],o=new u.A({x:i,y:n,z:r,m:s,spatialReference:this.spatialReference});return this.notifyChange("paths"),o}setPoint(e,t,i){return this._validateInputs(e,t)&&((0,c.h)(this,i),Array.isArray(i)||(i=i.toArray()),this.paths[e][t]=i,this.notifyChange("paths")),this}_validateInputs(e,t,i=!1){if(null==e||e<0||e>=this.paths.length)return!1;if(null!=t){let n=this.paths[e];if(i&&(t<0||t>n.length)||!i&&(t<0||t>=n.length))return!1}return!0}toJSON(e){return this.write({},e)}};(0,r.Cg)([(0,s.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,r.Cg)([(0,s.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],m.prototype,"curvePaths",void 0),(0,r.Cg)([(0,f.K)("curvePaths")],m.prototype,"writeCurvePaths",null),(0,r.Cg)([(0,s.MZ)({readOnly:!0})],m.prototype,"extent",null),(0,r.Cg)([(0,s.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],m.prototype,"paths",void 0),(0,r.Cg)([(0,f.K)("paths")],m.prototype,"writePaths",null),m=n=(0,r.Cg)([(0,s.$K)("esri.geometry.Polyline")],m);const p=m;m.prototype.toJSON.isDefaultToJSON=!0,i.d(t,["A",0,p])},4197(e,t,i){i.d(t,{Vj:()=>o,cj:()=>s,jh:()=>r});var n=i(9093);function r(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function s(e){return[...e]}function o(e){let t=(0,n.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},70328(e,t,i){i.d(t,{BI:()=>A,C:()=>o,DC:()=>c,Dg:()=>m,Ej:()=>b,Ie:()=>F,Jt:()=>T,Lu:()=>x,Ne:()=>v,RF:()=>d,TF:()=>_,VL:()=>p,aI:()=>z,fA:()=>a,gE:()=>u,gX:()=>M,hZ:()=>I,iT:()=>f,is:()=>C,pg:()=>S,qv:()=>R,uJ:()=>g,vI:()=>w,vY:()=>l,v_:()=>B,vt:()=>s,w1:()=>h,yr:()=>y}),i(35522);var n=i(5443),r=(i(19419),i(4197));function s(e=B){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t){for(let i=0;i<6;i++)e[i]=t[i];return e}function a(e,t,i,n,r,o,a=s()){return a[0]=e,a[1]=t,a[2]=i,a[3]=n,a[4]=r,a[5]=o,a}function l(e,t=s()){return function(e,t,i,n=s()){return I(n,R),function(e,t,i=0,n=t.length/3){let r=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<n;e++)r=Math.min(r,t[i+3*e]),s=Math.min(s,t[i+3*e+1]),o=Math.min(o,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=r,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(n,e,t,i),n}(e,0,e.length/3,t)}function u(e,t=(0,r.jh)(24)){let[i,n,s,o,a,l]=e;return t[0]=i,t[1]=n,t[2]=s,t[3]=i,t[4]=n,t[5]=l,t[6]=i,t[7]=a,t[8]=s,t[9]=i,t[10]=a,t[11]=l,t[12]=o,t[13]=n,t[14]=s,t[15]=o,t[16]=n,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new n.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function d(e,t,i=e){i[0]=Math.min(e[0],t[0]),i[1]=Math.min(e[1],t[1]),i[2]=Math.min(e[2],t[2]),i[3]=Math.max(e[3],t[3]),i[4]=Math.max(e[4],t[4]),i[5]=Math.max(e[5],t[5])}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function f(e,[t,i,n]){m(e,t,i,n)}function m(e,t,i,n){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],i),e[2]=Math.min(e[2],n),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],i),e[5]=Math.max(e[5],n)}function p(e){return e[0]>=e[3]?0:e[3]-e[0]}function y(e){return e[1]>=e[4]?0:e[4]-e[1]}function g(e){return e[2]>=e[5]?0:e[5]-e[2]}function _(e){let t=p(e),i=g(e),n=y(e);return t*t+i*i+n*n}function M(e,t=[0,0,0]){return t[0]=e[0]+p(e)/2,t[1]=e[1]+y(e)/2,t[2]=e[2]+g(e)/2,t}function b(e,t=[0,0,0]){return t[0]=p(e),t[1]=y(e),t[2]=g(e),t}function S(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function x(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function v(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function w(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function I(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function F(e){return e?I(e,R):s(R)}function T(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function A(e,t,i,n,r){return e[0]=t,e[1]=i,e[2]=-1/0,e[3]=n,e[4]=r,e[5]=1/0,e}function C(e){return 6===e.length}function z(e,t,i){if(null==e||null==t)return e===t;if(!C(e)||!C(t))return!1;if(i){for(let n=0;n<e.length;n++)if(!i(e[n],t[n]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const R=[1/0,1/0,1/0,-1/0,-1/0,-1/0],B=[0,0,0,0,0,0];s()},46329(e,t,i){i.d(t,{y:()=>d});var n=i(49186),r=i(4305),s=i(513),o=i(50954),a=i(52006),l=i(49663),u=i(46068),h=i(59803);function d(e,t,i){if((0,a.Xq)(t))return(0,h.T)(e,t,i);if((0,a.n1)(t)){let s=(0,r.m_)(e,t,i)[0];if(null==s)throw new n.A("closestPointOnCurve:unexpected-error","Failed to find close point on bezier curve");return s}if((0,a.aO)(t)){let n=(0,o.pM)(e,t);return(0,s.fM)(n,i)}if((0,a.DA)(t)){let n=(0,l.io)(e,t);return(0,s.fM)(n,i)}let d=(0,u.SW)(e,t);return(0,u.pb)(d,i)}},60408(e,t,i){function n(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function r(e){return void 0!==e.points}function s(e){return void 0!==e.x&&void 0!==e.y}function o(e){return void 0!==e.paths||void 0!==e.curvePaths}function a(e){return void 0!==e.rings||void 0!==e.curveRings}function l(e){return"object"==typeof e&&"vertexAttributes"in e}function u(e){return e?s(e)?"esriGeometryPoint":o(e)?"esriGeometryPolyline":a(e)?"esriGeometryPolygon":n(e)?"esriGeometryEnvelope":r(e)?"esriGeometryMultipoint":null:null}function h(e){return null!=e&&("hasZ"in e&&e.hasZ||"z"in e&&null!=e.z)}function d(e){return null!=e&&("hasM"in e&&e.hasM||"m"in e&&null!=e.m)}i.d(t,{$B:()=>u,Bi:()=>a,Pv:()=>h,Rg:()=>o,U9:()=>r,W0:()=>d,ZC:()=>n,fT:()=>s,uW:()=>l})},65864(e,t,i){i.d(t,{rS:()=>h,xD:()=>c});var n=i(5443),r=i(91075),s=i(48526),o=i(86738),a=i(39829),l=i(82799),u=i(60408);function h(e){return null==e?null:e instanceof r.A?e:(0,u.fT)(e)?o.A.fromJSON(e):(0,u.Rg)(e)?l.A.fromJSON(e):(0,u.Bi)(e)?a.A.fromJSON(e):(0,u.U9)(e)?s.A.fromJSON(e):(0,u.ZC)(e)?n.A.fromJSON(e):null}const d={esriGeometryPoint:o.A,esriGeometryPolyline:l.A,esriGeometryPolygon:a.A,esriGeometryEnvelope:n.A,esriGeometryMultipoint:s.A,esriGeometryMultiPatch:a.A};function c(e){return e&&d[e]||null}},97770(e,t,i){i.d(t,{Ey:()=>z,F8:()=>C,J2:()=>I,Yq:()=>T,_m:()=>F,_v:()=>b,iS:()=>A,wj:()=>R});var n=i(34747),r=i(66552),s=i(98623),o=i(73444);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},u={timeZone:"UTC"},h={year:"numeric",month:"numeric",day:"numeric"},d={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},f={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},p={...m,second:"numeric"},y={hourCycle:"h23"},g={...m,...y},_={...p,...y},M={"short-date":h,"short-date-short-time":{...h,...m},"short-date-short-time-24":{...h,...g},"short-date-long-time":{...h,...p},"short-date-long-time-24":{...h,..._},"short-date-le":h,"short-date-le-short-time":{...h,...m},"short-date-le-short-time-24":{...h,...g},"short-date-le-long-time":{...h,...p},"short-date-le-long-time-24":{...h,..._},"long-month-day-year":d,"long-month-day-year-short-time":{...d,...m},"long-month-day-year-short-time-24":{...d,...g},"long-month-day-year-long-time":{...d,...p},"long-month-day-year-long-time-24":{...d,..._},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...m},"day-short-month-year-short-time-24":{...c,...g},"day-short-month-year-long-time":{...c,...p},"day-short-month-year-long-time-24":{...c,..._},"long-date":f,"long-date-short-time":{...f,...m},"long-date-short-time-24":{...f,...g},"long-date-long-time":{...f,...p},"long-date-long-time-24":{...f,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":p},b=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),S={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"};function x(){let e=(0,o.lR)();return(e&&S[e])??(0,o.QC)()}"mart"!==new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)).find(({type:e})=>"month"===e)?.value.toLowerCase()&&(S.bs="sr-Latn-CS");let v=new WeakMap;const w=M["short-date-short-time"];function I(e){return M[e]}function F(e){let{dateStyle:t,timeStyle:i,hour12:n,year:r,month:s}=e,o={};return t?o.dateStyle=t:r&&(o.year=r,o.month=s||void 0),i&&!o.year&&(o.timeStyle=i,o.hour12="auto"===n?void 0:"always"===n),o}function T(e,t=w){return function(e){let t=v.get(e);if(!t){let i=x(),n=R(e.timeZone??"system"),r={...e,timeZone:n};t=new Intl.DateTimeFormat(i,r),v.set(e,t)}return t}(t).format(e)}function A(e,t=w){return T(new Date(e),{...t,...u,...l})}function C(e,t=w){return T(new Date(`1970-01-01T${e}Z`),{...t,...u,...a})}function z(e,t=w){let i=n.c9.fromISO(e,{setZone:!0});if(!i.isValid)return e;if(t.timeZone)return T(i.toJSDate(),t);let r=0===i.offset?"UTC":t.timeZone,s={...t,timeZone:r};return i.toLocaleString(s,{locale:x()})}function R(e){switch(e){case"system":return s.N;case s.L:return"UTC";default:return e}}(0,o.Ml)(()=>{v=new WeakMap})},73444(e,t,i){i.d(t,{JK:()=>l,Ml:()=>y,QC:()=>d,lR:()=>h,oQ:()=>m});var n=i(36563);let r;i(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){let e=o?.getAttribute("lang"),t=globalThis.navigator?.language;return s??e??t??"en"}function l(){return void 0===r&&(r=a()),r}const u=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function h(e=l()){return c(e)?.language}function d(e=l()){let t=c(e);return t?.language&&t?.extlang?e.replace(`${t.language}-`,""):e}function c(e=l()){return u.exec(e)?.groups}const f=[];function m(e){return f.push(e),(0,n.hA)(()=>{f.splice(f.indexOf(e),1)})}new Map;const p=[];function y(e){return p.push(e),(0,n.hA)(()=>p.splice(p.indexOf(e),1))}function g(){let e=a();r!==e&&([...p].forEach(t=>t(e)),r=e,[...f].forEach(t=>t(e)))}globalThis.addEventListener?.("languagechange",g),o&&new MutationObserver(()=>{g()}).observe(o,{attributeFilter:["lang"]})},6518(e,t,i){i.d(t,{F:()=>a});var n=i(44208),r=i(75503),s=i(19419);const o={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.wq(9,(0,n.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){let e=Array(this._idByBounds.size),t=0;this._idByBounds.forEach((i,n)=>{e[t++]=n}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;let e=(0,s.Ie)();for(let t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){let t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,i){(function(e){o.minX=e[0],o.minY=e[1],o.maxX=e[2],o.maxY=e[3]})(t),e.search(o,i)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){let t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},83221(e,t,i){i.d(t,{A:()=>f});var n=i(4576),r=i(49186),s=i(65529),o=i(53966),a=i(70328),l=i(19419),u=i(90708),h=i(6518),d=i(37730);const c=(0,a.vt)();class f{constructor(e){this.geometryInfo=e,this._boundsStore=new h.F,this._featuresById=new Map,this._usedMemory=0,this.events=new s.bk,this.featureAdapter=d.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;let[t,i,n,r]=this.fullBounds;return{xmin:t,ymin:i,xmax:n,ymax:r,spatialReference:e}}add(e){this._add(e),this._emitChanged()}addMany(e){for(let t of e)this._add(t);this._emitChanged()}upsertMany(e){let t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(n.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){let t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(let t of e){let e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(let i of e){let e=this._boundsStore.get(i.objectId);e&&t((0,a.Jt)(c,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;let t=e.objectId;if(null==t)return void o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));let i,n=this._featuresById.get(t);n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),e.geometry?.coords?.length?(i=(0,u.jQ)(i??(0,l.vt)(),e.geometry),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0):(this._boundsStore.set(t,null),this._featuresById.set(t,e))}_upsert(e){let t=e?.objectId;if(null==t)return o.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;let i=this._featuresById.get(t);if(!i)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(i)??0;let{geometry:n,attributes:s}=e;for(let e in s)i.attributes[e]=s[e];return n&&(i.geometry=n,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),n)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(i)??0,i}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);let t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},37730(e,t,i){var n=i(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t,i)=>new n.Om(t,e.attributes,null,e.objectId,e.displayId,e.distance,e.vertexCount),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)};i.d(t,["T",0,r])},71202(e,t,i){i.r(t),i.d(t,{default:()=>b});var n=i(60999),r=i(49186),s=i(53966),o=i(17676),a=i(60408),l=i(21325),u=i(78888),h=(i(98623),i(95466)),d=i(98453),c=i(30524),f=i(83221),m=i(31464),p=i(75752),y=i(90708),g=i(64714),_=i(82832),M=i(85113);class b{constructor(){this._featureIdInfo=null,this._queryEngine=null,this._snapshotFeatures=async e=>{let t=await this._fetch(e);return this._createFeatures(t)}}destroy(){this._queryEngine?.destroy(),this._queryEngine=this._createDefaultAttributes=null}async load(e,t={}){this._loadOptions={url:e.url,customParameters:e.customParameters};let i=[],[n]=await Promise.all([e.url?this._fetch(t?.signal):null,this._checkProjection(e.spatialReference)]),s=(0,M.BM)(n,{geometryType:e.geometryType}),o=e.fields||s.fields||[],a=null==e.hasZ?s.hasZ:e.hasZ,u=s.geometryType,m=!u,y=e.objectIdField||s.objectIdFieldName||"__OBJECTID",b=e.spatialReference||l.KK,S=e.timeInfo;this._addParentIdField(n,o,s,y),o===s.fields&&s.unknownFields.length>0&&i.push({name:"geojson-layer:unknown-field-types",message:"Some fields types couldn't be inferred from the features and were dropped",details:{unknownFields:s.unknownFields}});let x=new h.A(o),v=x.dateFields.length>0,w=x.get(y);w?("esriFieldTypeString"!==w.type&&(w.type="esriFieldTypeOID"),w.editable=!1,w.nullable=!1,y=w.name):(w={alias:y,name:y,type:"string"===s.objectIdFieldType?"esriFieldTypeString":"esriFieldTypeOID",editable:!1,nullable:!1},o.unshift(w));let I={};for(let e of o){if(e.name??=e.alias,e.alias??=e.name,!e.name)throw new r.A("geojson-layer:invalid-field-name","field name is missing",{field:e});if(!d.m.jsonValues.includes(e.type))throw new r.A("geojson-layer:invalid-field-type",`invalid type for field "${e.name}"`,{field:e});if(e.name!==w.name){let t=(0,c.lD)(e);void 0!==t&&(I[e.name]=t)}e.length??=(0,c._b)(e)}if(S){if(S.startTimeField){let e=x.get(S.startTimeField);e?(S.startTimeField=e.name,e.type="esriFieldTypeDate",v=!0):S.startTimeField=null}if(S.endTimeField){let e=x.get(S.endTimeField);e?(S.endTimeField=e.name,e.type="esriFieldTypeDate",v=!0):S.endTimeField=null}if(S.trackIdField){let e=x.get(S.trackIdField);e?S.trackIdField=e.name:(S.trackIdField=null,i.push({name:"geojson-layer:invalid-timeInfo-trackIdField",message:"trackIdField is missing",details:{timeInfo:S}}))}!S.startTimeField&&!S.endTimeField&&(i.push({name:"geojson-layer:invalid-timeInfo",message:"startTimeField and endTimeField are missing",details:{timeInfo:S}}),S=null)}let F=u?(0,g.F0)(u):void 0,T=v?{timeZoneIANA:"UTC"}:null,A={warnings:i,featureErrors:[],layerDefinition:{...m?_.Xn:_.CI,drawingInfo:F??void 0,templates:(0,g.e2)(I),extent:void 0,geometryType:u,objectIdField:y,fields:o,hasZ:!!a,timeInfo:S,dateFieldsTimeReference:T}};this._featureIdInfo={type:"object-id",fieldName:y},this._queryEngine=new p.do({fieldsIndex:h.A.fromLayerJSON({fields:o,timeInfo:S,dateFieldsTimeReference:T}),geometryType:u,hasM:!1,hasZ:a,featureIdInfo:this._featureIdInfo,spatialReference:b,timeInfo:S,featureStore:new f.A({geometryType:u,hasM:!1,hasZ:a})});let C=this._queryEngine.fieldsIndex.requiredFields.indexOf(w);C>-1&&this._queryEngine.fieldsIndex.requiredFields.splice(C,1),this._createDefaultAttributes=(0,g.Vx)(I,y);let z=this._createFeatures(n);this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,z);let R=this._normalizeFeatures(z,A.featureErrors);this._queryEngine.featureStore.addMany(R);let{fullExtent:B,timeExtent:E}=await this._queryEngine.fetchRecomputedExtents();if(A.layerDefinition.extent=B,E){let{start:e,end:t}=E;A.layerDefinition.timeInfo.timeExtent=[e,t]}return A}async applyEdits(e){let{spatialReference:t,geometryType:i}=this._queryEngine;return await Promise.all([(0,_.$1)(t,i),(0,m.Nk)(e.adds,t),(0,m.Nk)(e.updates,t)]),await this._waitSnapshotComplete(),this._applyEdits(e)}async queryFeatures(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQuery(e,t.signal)}async queryFeatureCount(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForCount(e,t.signal)}async queryObjectIds(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForIds(e,t.signal)}async queryExtent(e={},t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeQueryForExtent(e,t.signal)}async querySnapping(e,t={}){return await this._waitSnapshotComplete(),await this._queryEngine.executeQueryForSnapping(e,t.signal)}async queryAttributeBins(e,t={}){return await this._waitSnapshotComplete(),this._queryEngine.executeAttributeBinsQuery(e,t.signal)}async refresh(e){this._loadOptions.customParameters=e,this._snapshotTask?.abort(),this._snapshotTask=(0,n.UT)(this._snapshotFeatures),this._snapshotTask.promise.then(e=>{this._queryEngine.featureStore.clear(),this._objectIdGenerator=this._createObjectIdGenerator(this._queryEngine,e);let t=this._normalizeFeatures(e);t&&this._queryEngine.featureStore.addMany(t)},e=>{this._queryEngine.featureStore.clear(),(0,o.zf)(e)||s.A.getLogger("esri.layers.GeoJSONLayer").error(new r.A("geojson-layer:refresh","An error occurred during refresh",{error:e}))}),await this._waitSnapshotComplete();let{fullExtent:t,timeExtent:i}=await this._queryEngine.fetchRecomputedExtents();return{extent:t,timeExtent:i}}_addParentIdField(e,t,i,n){if(!e||!(0,M.S_)(e))return;let r=new h.A([...t,...i.fields,...[...i.unknownFields,n].map(e=>({name:e,alias:e,type:"esriFieldTypeString"}))]),s="__PARENTID";for(let e=1;r.has(s);e++)s=`__PARENTID_${e}`;this._parentIdField=s,t.push({name:s,alias:s,type:"esriFieldTypeString",editable:!1,nullable:!0})}_createFeatures(e){if(null==e)return[];let{geometryType:t,hasZ:i}=this._queryEngine,n=this._featureIdInfo.fieldName,r=(0,M.bd)(e,{geometryType:t,hasZ:i,objectIdField:n,parentIdField:this._parentIdField});if(!(0,l.aI)(this._queryEngine.spatialReference,l.KK))for(let e of r)null!=e.geometry&&(e.geometry=(0,y.Ux)((0,m.Cv)((0,y.zv)(e.geometry,this._queryEngine.geometryType,this._queryEngine.hasZ,!1),l.KK,this._queryEngine.spatialReference)));return r}async _waitSnapshotComplete(){if(this._snapshotTask&&!this._snapshotTask.finished){try{await this._snapshotTask.promise}catch{}return this._waitSnapshotComplete()}}async _fetch(e){let{url:t,customParameters:i}=this._loadOptions,n=(await(0,u.A)(t??"",{responseType:"json",query:{...i},signal:e})).data;return(0,M.sO)(n),n}_normalizeFeatures(e,t){let{fieldsIndex:i}=this._queryEngine,n=[],r=this._featureIdInfo.fieldName;for(let s of e){let e=this._createDefaultAttributes(),o=(0,_.MB)(i,e,s.attributes,!0);o?t?.push(o):(this._assignObjectId(e,s.attributes,!0),s.attributes=e,s.objectId=e[r],n.push(s))}return n}async _applyEdits(e){let{adds:t,updates:i,deletes:n}=e,r={addResults:[],deleteResults:[],updateResults:[],uidToObjectId:{}};if(t?.length&&this._applyAddEdits(r,t),i?.length&&this._applyUpdateEdits(r,i),n?.length){for(let e of n)r.deleteResults.push((0,_.bP)(e));this._queryEngine.featureStore.removeManyById(n)}let{fullExtent:s,timeExtent:o}=await this._queryEngine.fetchRecomputedExtents();return{extent:s,timeExtent:o,featureEditResults:r}}_applyAddEdits(e,t){let{addResults:i}=e,{geometryType:n,hasM:r,hasZ:s,spatialReference:o,featureStore:l,fieldsIndex:u}=this._queryEngine,h=this._featureIdInfo.fieldName,d=[];for(let r of t){if(r.geometry&&n!==(0,a.$B)(r.geometry)){i.push((0,_.Yx)("Incorrect geometry type."));continue}let t=this._createDefaultAttributes(),s=(0,_.MB)(u,t,r.attributes);if(s)i.push(s);else{if(this._assignObjectId(t,r.attributes),r.attributes=t,null!=r.uid){let t=r.attributes[h];e.uidToObjectId[r.uid]=t}if(null!=r.geometry){let e=r.geometry.spatialReference??o;r.geometry=(0,m.Cv)((0,_.CR)(r.geometry,e),e,o)}d.push(r),i.push((0,_.bP)(r.attributes[h]))}}l.addMany((0,y.Di)([],d,n,s,r,this._featureIdInfo))}_applyUpdateEdits({updateResults:e},t){let{geometryType:i,hasM:n,hasZ:r,spatialReference:s,featureStore:o,fieldsIndex:l}=this._queryEngine,u=this._featureIdInfo.fieldName;for(let h of t){let{attributes:t,geometry:d}=h,c=t?.[u];if(null==c){e.push((0,_.Yx)(`Identifier field ${u} missing`));continue}if(!o.has(c)){e.push((0,_.Yx)(`Feature with object id ${c} missing`));continue}let f=(0,y.oN)(o.getFeature(c),i,r,n);if(null!=d){if(i!==(0,a.$B)(d)){e.push((0,_.Yx)("Incorrect geometry type."));continue}let t=d.spatialReference??s;f.geometry=(0,m.Cv)((0,_.CR)(d,t),t,s)}if(t){let i=(0,_.MB)(l,f.attributes,t);if(i){e.push(i);continue}}o.add((0,y.E2)(f,i,r,n,this._featureIdInfo)),e.push((0,_.bP)(c))}}_createObjectIdGenerator(e,t){let i=this._featureIdInfo.fieldName,n=e.fieldsIndex.get(i);if("esriFieldTypeString"===n.type){let e=new Set(t.map(({objectId:e})=>e)),i=1;return()=>{for(;e.has(`${n.name}-${i}`);)i++;return`${n.name}-${i++}`}}let r=-1/0;for(let e of t)e.objectId&&(r=Math.max(r,e.objectId));return r=Math.max(0,r)+1,()=>r++}_assignObjectId(e,t,i=!1){let n=this._featureIdInfo.fieldName;e[n]=i&&n in t?t[n]:this._objectIdGenerator()}async _checkProjection(e){try{await(0,m.Nk)(l.KK,e)}catch{throw new r.A("geojson-layer","Projection not supported")}}}},85113(e,t,i){i.d(t,{BM:()=>A,S_:()=>f,bd:()=>C,sO:()=>T,xD:()=>d});var n=i(67482),r=i(49186),s=i(21325),o=i(30524),a=i(90708),l=i(43334),u=i(92722);const h={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function d(e){return h[e]}function*c(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(let t of e.features)t&&(yield t);break;default:yield{type:"Feature",geometry:e,properties:null}}}function f(e){for(let t of c(e))if("GeometryCollection"===t.geometry?.type)return!0;return!1}function*m(e){let t=0;for(let i of c(e)){let e="GeometryCollection"===i.geometry?.type,n=[{geometry:i.geometry,depth:0}];for(;n.length>0;){let{geometry:s,depth:o}=n.pop();if("GeometryCollection"===s?.type){if(o>=1024)throw new r.A("geojson-layer:invalid-geometry","GeometryCollection nesting exceeds 1024 levels.");for(let e=s.geometries.length-1;e>=0;e--)n.push({geometry:s.geometries[e],depth:o+1})}else yield{feature:i,geometry:s,index:t,isCollection:e}}t++}}function*p(e){if(e)switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(let t of e.coordinates)yield*t;break;case"MultiPolygon":for(let t of e.coordinates)for(let e of t)yield*e}}function y(e,t,i,n,s){if(!n)throw new r.A("geojson-layer:geometry-collection-schema","Recreate the layer to add the parent ID field required by GeometryCollections.");let a=t;for(let t in e){let n=s.get(t);void 0===n&&(n=(0,o.rS)(t)?.toLowerCase()===i,s.set(t,n)),n&&(a??=e[t]??void 0,delete e[t])}e[n]=null==a?null:String(a)}function g(e){for(let t of e)if(t.length>2)return!0;return!1}function _(e){let t=0;for(let i=0;i<e.length;i++){let n=e[i],r=e[(i+1)%e.length];t+=n[0]*r[1]-r[0]*n[1]}return t<=0}function M(e){let t=e[0],i=e[e.length-1];(t[0]!==i[0]||t[1]!==i[1]||t[2]!==i[2])&&e.push(t)}function b(e,t){let{coordinates:i,type:n}=e,r=t.hasZ??!1;switch(n){case"Point":{let e=r||3!==i.length?r&&2===i.length?[...i,0]:[...i]:i.slice(0,2);return new u.A([],e,r,!1)}case"LineString":return(0,a.Ap)({paths:[i],hasZ:!0},r,!1);case"MultiLineString":return(0,a.Ap)({paths:i,hasZ:!0},r,!1);case"MultiPoint":return(0,a.PR)({points:i,hasZ:!0},r,!1);case"Polygon":case"MultiPolygon":{let e=new u.A([],[],r,!1);for(let t of"Polygon"===n?[i]:i){S(e,t[0],r);for(let i=1;i<t.length;i++)x(e,t[i],r)}return e}}}function S(e,t,i){M(t),function(e){return!_(e)}(t)?w(e,t,i):v(e,t,i)}function x(e,t,i){M(t),function(e){return _(e)}(t)?w(e,t,i):v(e,t,i)}function v(e,t,i){for(let n of t)I(e,n,i);e.lengths.push(t.length)}function w(e,t,i){for(let n=t.length-1;n>=0;n--)I(e,t[n],i);e.lengths.push(t.length)}function I(e,[t,i,n],r){e.coords.push(t,i),r&&e.coords.push(n||0)}function F(e){switch(typeof e){case"string":return(0,n.C)(e)?"esriFieldTypeDate":"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function T(e,t=4326){if(!e)throw new r.A("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type&&"GeometryCollection"!==e.type)throw new r.A("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});let{crs:i}=e;if(!i)return;let n="string"==typeof i?i:"name"===i.type?i.properties.name:"EPSG"===i.type?i.properties.code:null,o=(0,s.oT)({wkid:t})?RegExp(".*(CRS84H?|4326)$","i"):RegExp(`.*(${t})$`,"i");if(!n||!o.test(n))throw new r.A("geojson:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:i})}function A(e,t={}){let i,n=[],r=new Set,s=new Set,a=!1,l=null,u=!1,{geometryType:h=null}=t;for(let{feature:t,geometry:c}of m(e)){let{properties:e,id:f}=t;if((!c||(h||=d(c.type),d(c.type)===h))&&(a||=g(p(c)),u||(u=null!=f,u&&(i=typeof f,e&&(l=Object.keys(e).filter(t=>e[t]===f)))),e&&l&&u&&null!=f&&(l.length>1?l=l.filter(t=>e[t]===f):1===l.length&&(l=e[l[0]]===f?l:[])),e))for(let t in e){if(r.has(t))continue;let i=F(e[t]);if("unknown"===i){s.add(t);continue}s.delete(t),r.add(t);let a=(0,o.rS)(t);a&&n.push({name:a,alias:t,type:i})}}let c=(0,o.rS)(1===l?.length&&l[0]||null)??void 0;if(c)for(let e of n)if(e.name===c&&(0,o.WA)(e)){e.type="esriFieldTypeOID";break}return{fields:n,geometryType:h,hasZ:a,objectIdFieldName:c,objectIdFieldType:i,unknownFields:Array.from(s)}}function C(e,t){return Array.from(function*(e,t={}){let{geometryType:i,objectIdField:n,parentIdField:r,getObjectId:s}=t,a=(0,o.rS)(n)?.toLowerCase(),u=new Map;for(let{feature:o,geometry:h,index:c,isCollection:f}of e){let{properties:e,id:m}=o;if(h&&d(h.type)!==i)continue;let p=f?{...e}:e??{},g=s?.(o,c);n&&(f?(y(p,m,a,r,u),g=void 0):(g=p[n],null!=m&&null==g&&(p[n]=g=m))),yield new l.Om(h&&b(h,t),p,null,g)}}(m(e),t))}},64714(e,t,i){i.d(t,{F0:()=>a,Vx:()=>h,e2:()=>c,f:()=>p});var n=i(44208),r=i(4718),s=i(93470),o=i(99352);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function h(e,t){if((0,n.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let i="";t&&(i+=`this${d(t)} = null;`);for(let t in e)i+=`this${d(t)} = ${JSON.stringify(e[t])};`;let n=Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${i};\n }\n }\n `)();return()=>new n}catch{return()=>t?{[t]:null,...e}:{...e}}}function d(e){return l.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}const f={...o.F,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!1,supportsDistance:!1,supportsExtent:!1,supportsQuantization:!1,supportsQueryGeometry:!1,supportsDisjointSpatialRelationship:!1},m={...o.P,supportedStatistics:{...o.P.supportedStatistics,envelope:!1,centroid:!1,convexHull:!1}};function p(e,t,i=!1){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i?f:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i?m:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},82832(e,t,i){i.d(t,{$1:()=>_,CI:()=>b,CR:()=>g,MB:()=>m,Xn:()=>S,Yx:()=>h,bP:()=>c});var n=i(67482),r=i(18370),s=i(60408),o=i(21325),a=i(30524);class l{constructor(e){this.description=e,this.code=null}}class u{constructor(e){this.globalId=null,this.objectId=null,this.success=!1,this.uniqueId=null,this.error=new l(e)}}function h(e){return new u(e)}class d{constructor(e){this.globalId=null,this.success=!0,this.objectId=this.uniqueId=e}}function c(e){return new d(e)}const f=new Set;function m(e,t,i,n=!1){f.clear();for(let r in i){let s=e.get(r);if(!s)continue;let o=p(s,i[r]);if(f.add(s.name),s&&(n||s.editable)){let e=(0,a.CJ)(s,o);if(e)return h((0,a.uo)(e,s,o));t[s.name]=o}}for(let t of e.requiredFields??[])if(!f.has(t.name))return h(`missing required field "${t.name}"`);return null}function p(e,t){let i=t;return(0,a.WA)(e)&&"string"==typeof t?i=(0,a.XT)(t):(0,a.yM)(e)&&null!=t&&"string"!=typeof t?i=String(t):(0,a.vE)(e)&&"string"==typeof t&&(i=(0,n._)(t)),(0,a.WX)(i)}const y=(0,r.z)(()=>Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(3456)]).then(()=>i(3637)));function g(e,t){if(!(0,s.Bi)(e)&&!(0,s.Rg)(e)||!(0,o.fn)(t))return e;let i=y.module;if(null==i)throw TypeError("simplify operator not loaded");return i.simplifyExecute({...e,spatialReference:t})??e}async function _(e,t){(0,o.fn)(e)&&("esriGeometryPolygon"===t||"esriGeometryPolyline"===t)&&await y.getImportPromise()}const M={supportsAutoIntervalBin:!0,supportsFixedIntervalBin:!0,supportsFixedBoundariesBin:!0,supportsDateBin:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsNormalization:!0,supportedStatisticTypes:["COUNT","SUM","AVG","VAR","STDDEV","MIN","MAX","PERCENTILE_CONT","PERCENTILE_DISC","CentroidAggregate","EnvelopeAggregate","ConvexHullAggregate"],supportedNormalizationTypes:["field","log","naturalLog","percentOfTotal","squareRoot"]},b={hasAttachments:!1,capabilities:"query, editing, create, delete, update",useStandardizedQueries:!0,supportsCoordinatesQuantization:!0,supportsReturningQueryGeometry:!0,advancedQueryCapabilities:{supportsQueryAttachments:!1,supportsQueryAttachmentsCountOnly:!1,supportsQueryAttachmentOrderByFields:!1,supportsQueryAttachmentWithTypeWildcard:!1,supportsQueryBins:!0,supportsQueryPivot:!1,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:["EnvelopeAggregate","CentroidAggregate","ConvexHullAggregate"],supportsStatistics:!0,supportsPercentileStatistics:!0,supportsReturningGeometryCentroid:!0,supportsQueryWithDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsReturningQueryExtent:!0,supportsReturningGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQueryWithResultType:!0,supportsSqlExpression:!0,supportsDisjointSpatialRel:!0,supportsQueryWithCacheHint:!0},queryBinsCapabilities:M},S={...b,supportsCoordinatesQuantization:!1,supportsReturningQueryGeometry:!1,advancedQueryCapabilities:{...b.advancedQueryCapabilities,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:[],supportsReturningGeometryCentroid:!1,supportsQueryWithDistance:!1,supportsReturningQueryExtent:!1,supportsDisjointSpatialRel:!1},queryBinsCapabilities:{...M,supportedStatisticTypes:M.supportedStatisticTypes.filter(e=>"EnvelopeAggregate"!==e&&"CentroidAggregate"!==e&&"ConvexHullAggregate"!==e)}}},95466(e,t,i){i.d(t,{A:()=>u});var n=i(49186),r=i(53966),s=i(12195),o=i(98623),a=i(56400),l=i(30524);class u{static fromJSON(e){return new u(e.fields,e.timeZoneByFieldName)}static fromLayer(e){return new u(e.fields??[],d(e))}static fromLayerJSON(e){return new u(e.fields??[],d(e))}constructor(e=[],t){this._fieldsMap=new Map,this._normalizedFieldsMap=new Map,this._dateFieldsSet=new Set,this._numericFieldsSet=new Set,this._requiredFields=null,this.dateFields=[],this.numericFields=[],this.fields=e||[],this._timeZoneByFieldName=t?new Map(t):null;let i=[];for(let e of this.fields){let t=e?.name,n=(0,l.GZ)(t);if(t&&n){let r=(0,l.NF)(t);this._fieldsMap.set(t,e),this._fieldsMap.set(r,e),this._normalizedFieldsMap.set(n,e),i.push(`${r}:${e.type}:${this._timeZoneByFieldName?.get(t)}`),(0,l.vE)(e)?(this.dateFields.push(e),this._dateFieldsSet.add(e)):(0,l.WA)(e)&&(this._numericFieldsSet.add(e),this.numericFields.push(e)),!(0,l.te)(e)&&!(0,l.Xz)(e)&&(e.editable=null==e.editable||!!e.editable,e.nullable=null==e.nullable||!!e.nullable)}}i.sort(),this.uid=i.join()}get requiredFields(){if(!this._requiredFields){this._requiredFields=[];for(let e of this.fields)(0,l.te)(e)||(0,l.Xz)(e)||e.nullable||void 0!==(0,l.lD)(e)||this._requiredFields.push(e)}return this._requiredFields}equals(e){return this.uid===e?.uid}has(e){return null!=this.get(e)}get(e){return(0,l.Vb)({fieldName:e,fieldsMap:this._fieldsMap,normalizedFieldsMap:this._normalizedFieldsMap})}getTimeZone(e){let t=this.get(e&&"string"!=typeof e?e.name:e);return t?this._timeZoneByFieldName?this._timeZoneByFieldName.get(t.name):"date"===t.type||"esriFieldTypeDate"===t.type?(r.A.getLogger("esri.layers.support.FieldsIndex").errorOnce(new n.A("getTimeZone:no-timezone-information",`no time zone information for field '${t.name}'`)),"UTC"):h.has(t.type)?o.L:null:null}isDateField(e){return this._dateFieldsSet.has(this.get(e))}isTimeOnlyField(e){return(0,l.OH)(this.get(e))}isNumericField(e){return this._numericFieldsSet.has(this.get(e))}normalizeFieldName(e){return this.get(e)?.name??void 0}toJSON(){return{fields:this.fields.map(e=>(0,s.W)(e)?e.toJSON():e),timeZoneByFieldName:this._timeZoneByFieldName?Array.from(this._timeZoneByFieldName.entries()):null}}}const h=new Set(["time-only","date-only","timestamp-offset","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]);function d(e){let t=new Map;if(!e.fields)return t;let i=!0===e.datesInUnknownTimezone,{timeInfo:n,editFieldsInfo:r}=e,s=(n?"startField"in n?n.startField:n.startTimeField:"")??"",u=(n?"endField"in n?n.endField:n.endTimeField:"")??"",d=function(e){return"dateFieldsTimeZone"in e}(e)?e.dateFieldsTimeZone??null:e.dateFieldsTimeReference?(0,a.ZS)(e.dateFieldsTimeReference):null,c=r?function(e){return"timeZone"in e}(r)?r.timeZone??d:r.dateFieldsTimeReference?(0,a.ZS)(r.dateFieldsTimeReference):d??"UTC":null,f=n?function(e){return"timeZone"in e}(n)?n.timeZone??d:n.timeReference?(0,a.ZS)(n.timeReference):d:null,m=new Map([[(0,l.NF)(r?.creationDateField??""),c],[(0,l.NF)(r?.editDateField??""),c],[(0,l.NF)(s),f],[(0,l.NF)(u),f]]);for(let{name:n,type:r}of e.fields)if(h.has(r))t.set(n,o.L);else if("date"!==r&&"esriFieldTypeDate"!==r)t.set(n,null);else if(i)t.set(n,o.L);else{let e=m.get((0,l.NF)(n??""))??d;t.set(n,e)}return t}},98453(e,t,i){const n=new(i(66552).J)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"});i.d(t,["m",0,n])},93470(e,t,i){const n=[252,146,31,255],r={type:"esriSMS",style:"esriSMSCircle",size:6,color:n,outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[153,153,153,255]}},s={type:"esriSLS",style:"esriSLSSolid",width:.75,color:n};i.d(t,["Cb",0,r,"HW",0,{type:"esriSLS",style:"esriSLSSolid",color:[0,0,0,255],width:1.5},"JR",0,[153,153,153,255],"JZ",0,{type:"esriTS",color:[255,255,255,255],font:{family:"arial-unicode-ms",size:10,weight:"bold"},horizontalAlignment:"center",kerning:!0,haloColor:[0,0,0,255],haloSize:1,rotated:!1,text:"",xoffset:0,yoffset:0,angle:0},"WR",0,{type:"esriSFS",style:"esriSFSSolid",color:[252,146,31,196],outline:{type:"esriSLS",style:"esriSLSSolid",width:.75,color:[255,255,255,191]}},"b6",0,{type:"esriSFS",style:"esriSFSSolid",color:[0,0,0,255],outline:null},"fT",0,n,"nC",0,{type:"esriSMS",style:"esriSMSCircle",color:[0,0,0,255],outline:null,size:10.5},"yM",0,s])}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[6051],{56512(e,t,i){function r(e){let t,i,r=[],a=!1;return function(...n){return a&&t===this&&function(e,t){if(e.length!==t.length)return!1;for(let i=0;i<e.length;++i)if(e[i]!==t[i])return!1;return!0}(n,r)||(i=e.apply(this,n),t=this,r=n,a=!0),i}}i.d(t,{B:()=>r})},69397(e,t,i){i.d(t,{JY:()=>d,Qf:()=>o,Qh:()=>s,lM:()=>n,ro:()=>u,rq:()=>f});var r=i(44208),a=i(34275);function n(e){if(!e)return 0;let t=h;for(let i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return o(e);if(Array.isArray(e))return function(e){let t=e.length;if(0===t||"number"==typeof e[0])return f(e,8);let i=c;for(let r=0;r<t;r++)i+=l(e[r]);return i}(e);let t=h;for(let i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?s(e):h;case"string":return function(e){return 32+e.length}(e);case"number":return 16;case"boolean":return 4;default:return 8}}function o(...e){return e.reduce((e,t)=>e+u(t),0)}function u(e,t=16){return e?(0,a.iu)(e)?e.byteLength+p:Array.isArray(e)?f(e,t):0:0}function f(e,t){return c+e.length*t}const h=32,c=16,d=(0,r.A)("ios")||!(0,r.A)("chrome")&&!(0,r.A)("opr")?8:4,p=145},5359(e,t,i){i.d(t,{H:()=>r,Z:()=>a});const r=Symbol("isImageryTileGraphicOrigin");function a(e){return!!e&&r in e}},16051(e,t,i){i.r(t),i.d(t,{default:()=>It});var r,a=i(32198),n=i(91429),s=i(56507),l=i(69540),o=i(49186),u=i(53966),f=i(97768),h=i(25728),c=i(17676),d=i(36708),p=i(41910),m=i(60950),g=i(89808),y=i(99959),w=i(5359);class x extends y.A{get[(r=w.H,m.ym)](){return this.layer}get[g.Q](){return this.layer}get[p.e7](){return this.layer}constructor(e){super(),this[r]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var v=i(40124),b=i(24212),I=i(30291),A=i(88625),S=i(59923),C=i(4146),_=i(18768),R=i(63074),T=i(69208),M=i(34287),O=i(8303),k=i(72545),F=i(56551),D=i(54310),N=i(25036),P=i(82935),z=i(82806),L=i(7548),E=i(23636),B=i(22671),$=i(51927),J=i(49859),U=i(68197),H=i(5443),j=i(16930),Z=i(73444),V=i(14140),q=i(94778);function W(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function G(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function X(e){let{axes:t}=e.domain,i=Object.keys(t),r=[],a=[],n=-1,s=-1,l=[];for(let e=0;e<i.length;e++){let o=i[e];W(o)?n=e:G(o)&&(s=e);let u=t[o],f=[];if("values"in u){u.values.forEach(e=>f.push("string"==typeof e?new Date(e).getTime():e));let e=f[1]-f[0];r.push([f[0]-.5*e,f[f.length-1]+.5*e]),a.push(e)}else{let{start:e,stop:t,num:i}=u,n=(t-e)/(i-1);r.push([e-.5*n,t+.5*n]),a.push(n);for(let t=0;t<i;t++)f.push(e+n*t)}l.push({name:o,values:f,extent:[f[0],f[f.length-1]]})}n>-1&&-1===s?s=+(0===n):s>-1&&-1===n?n=+(0===s):-1===s&&-1===n&&(n=0,s=1),l=l.filter((e,t)=>t!==n&&t!==s);let{referencing:o}=e.domain,u=o.find(e=>e.coordinates.includes(i[n])).system.id,f=u?.slice(u.lastIndexOf("/")+1),h=null==f||"CRS84"===f?4326:Number(f),c=new j.A({wkid:h}),[d,p]=r[n],[m,g]=r[s],y=new H.A({xmin:d,xmax:p,ymin:m,ymax:g,spatialReference:c});return{width:Math.round(y.width/a[n]),height:Math.round(y.height/a[s]),extent:y,dimensions:l}}function Y(e){let t=(0,Z.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function K(){return Math.round(255*Math.random())}function Q(e){let t={},{parameters:i}=e;if(!i)return t;for(let[e,r]of Object.entries(i)){let{type:i,description:a,unit:n,categoryEncoding:s,observedProperty:l}=r;if("Parameter"===i&&(t[e]={},a&&(t[e].description=Y(a)),n&&(t[e].unit=n.label?Y(n.label):null,t[e].symbol=n.symbol?.value),s)){let i=Object.entries(s).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})),r=!1;l?.categories?.length&&(l.categories.forEach(e=>{if(!e.id)return;let t=e.id.slice(e.id.lastIndexOf("/")+1),a=i.find(e=>e.ClassName===t);if(a&&(a.Label=e.label?Y(e.label):null,e.preferredColor)){let t=U.A.fromHex(e.preferredColor);t&&(r=!0,a.Red=t.r,a.Green=t.g,a.Blue=t.b)}}),r&&i.forEach(e=>{e.Red??(e.Red=K(),e.Green=K(),e.Blue=K())}));let a={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};r&&a.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=a}}return t}function ee(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let r=0;r<e.length;r++){let a=e[r];null!=a&&(a<t&&(t=a),a>i&&(i=a))}return(0,q.X1)(t,i)}function te(e,t,i){let r=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),a=(e=>t=>e*=t.count)(1),n=[...r.slice(1),{name:"",count:1}].reverse().map(a).reverse(),s=0;for(let a=e.length-1;a>=0;a--){let l=r.findIndex(({name:t})=>t===e[a]);s+=n[l]*(i%t[a]),i=Math.floor(i/t[a])}return s}var ie=i(45617),re=i(87186),ae=i(47520),ne=i(4366);let se=class extends J.A{constructor(){super(...arguments),this._pixelBlockTiles=new Map,this.datasetFormat="MEMORY",this.preGenerateTiles=!0,this.source=null}get url(){return""}async fetchRawTile(e,t,i,r={}){let a=`${e}/${t}/${i}`,n=this._pixelBlockTiles.get(a);if(n)return n;if(!this.source)return null;let{rasterInfo:s}=this,[l,o]=s.storageInfo.tileInfo.size,{sliceId:u}=r,{encodedData:f}=this.source;if(f){let n=await this.decodePixelBlock(f,{tileSize:[l,o],tileIndex:[e,t,i],canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0},{signal:r.signal});return n&&this._pixelBlockTiles.set(a,n),n}let{pixelBlocks:h}=this.source,c=null==u?h[0]:h[u];if(null==c)return null;let d={pixelBlock:c,useBilinear:"thematic"!==s.dataType,tileSize:{width:l,height:o},level:e,row:t,col:i};return this.rasterJobHandler?this.rasterJobHandler.clipTile(d,r):(0,ae.J$)(d)}async _open(e){if(!this.source)throw new o.A("in-memory-raster:open","source is required to open an in memory raster");let t=this.source;this.datasetName=t.name;let{pixelBlocks:i,attributeTable:r,statistics:a,histograms:n,nativeExtent:s,transform:l,colormap:u}=t,f=i[0],{width:h,height:c,pixelType:d}=f??t.imageInfo,p=t.extent??new H.A({xmin:-.5,ymin:.5,xmax:h-.5,ymax:c-.5,spatialReference:new j.A({wkid:3857})}),m=t.isPseudoSpatialReference??!t.extent,g={x:p.width/h,y:p.height/c},y={...t.keyProperties};t.dataType&&(y.DataType=t.dataType),t.bandInfos&&(y.BandProperties=t.bandInfos.map(e=>e.toJSON())),r&&(y.DataType="Thematic");let w=new re.A({width:h,height:c,pixelType:d,extent:p,nativeExtent:s,attributeTable:r,colormap:u,transform:l,pixelSize:g,spatialReference:p.spatialReference,bandCount:f?.pixels.length??t.imageInfo.bandCount,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:a,isPseudoSpatialReference:m,histograms:n});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(w),this.createRemoteDatasetStorageInfo(w,512,512),this._set("rasterInfo",w),this.updateTileInfo(),w.multidimensionalInfo?await this._buildMDimStats(i,w.multidimensionalInfo):this.preGenerateTiles&&f&&(await this._buildInMemoryRaster(f,{width:512,height:512},e),this.source=null)}async _buildInMemoryRaster(e,t,i){let{rasterInfo:r}=this,a=r.storageInfo.maximumPyramidLevel??0,n="thematic"!==r.dataType,s=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:a,useBilinear:n},i):Promise.resolve((0,ae.lD)(e,t,a,n)),l=null!=r.statistics,u=null!=r.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,$.f4)(e)),h=await(0,c.Lx)([s,f]);if(!h[0].value)throw new o.A("in-memory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(r.statistics=h[1].value?.statistics),u||(r.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let r=0;r<t.variables.length;r++){let a=t.variables[r];if(a.statistics)continue;let n=a.dimensions.map(e=>new ie.A({variableName:a.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),s=(0,ne.NG)(n,t),l=null==s?null:e[s];if(null==l)continue;let o=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:l},i):(0,$.eH)(l);a.statistics=o.statistics,a.histograms||=o.histograms}}};(0,a.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],se.prototype,"datasetFormat",void 0),(0,a.Cg)([(0,n.MZ)({constructOnly:!0})],se.prototype,"preGenerateTiles",void 0),(0,a.Cg)([(0,n.MZ)()],se.prototype,"source",void 0),(0,a.Cg)([(0,n.MZ)()],se.prototype,"url",null),se=(0,a.Cg)([(0,n.$K)("esri.layers.raster.datasets.InMemoryRaster")],se);const le=se;let oe=class extends J.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,r={}){return this._inMemoryRaster.fetchRawTile(e,t,i,r)}async _open(e){let{extent:t,pixelBlocks:i,multidimensionalInfo:r,attributeTable:a,bandNames:n}=await this._fetchData(e),{statistics:s,histograms:l}=(0,$.eH)(i[0]),o=n?.map(e=>({BandName:e})),u={DataType:a?"Thematic":r?"Scientific":"Generic",BandProperties:o},f=new le({source:{extent:t,pixelBlocks:i,attributeTable:a?B.A.fromJSON(a):null,multidimensionalInfo:r,statistics:s,histograms:l,keyProperties:u,isPseudoSpatialReference:!1}});await f.open(),this._inMemoryRaster=f;let h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",f.rasterInfo)}async _fetchData(e){let t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new o.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new o.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new o.A(i,"Missing domain referencing in the grid coverage data");let r=Object.values(t.ranges);for(let e=0;e<r.length;e++){let{axisNames:t,shape:a,type:n,values:s}=r[e];if(!("ndarray"===n.toLowerCase()&&s?.length&&t?.length&&a?.length))throw new o.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!W(t[t.length-1])||!G(t[t.length-2]))throw new o.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){let{width:t,height:i,extent:r,dimensions:a}=X(e),{ranges:n}=e,s=Object.keys(n).sort((e,t)=>e<t?-1:1),l=[];for(let e=0;e<s.length;e++){let t=s[e];a?.length&&l.push({name:t,dimensions:a})}let o=Q(e);l.forEach(e=>o[e.name]&&Object.assign(e,o[e.name]));let u=l.length?{variables:l}:void 0,f=[];for(let e=0;e<s.length;e++){let{values:r,dataType:l,axisNames:o,shape:u}=n[s[e]],h=u.length>2?e*u.slice(0,-2).reduce((e,t)=>e*t):0,c=o.slice(0,-2),d=u.slice(0,-2),p="float"===l?"f32":ee(r),m=t*i,g=r.length/m;for(let n=0;n<g;n++){let s=V.A.createEmptyBand(p,m),l=new Uint8Array(m).fill(255),o=!1,u=n*m;for(let e=0;e<m;e++){let t=r[u+e];null==t?(l[e]=0,o=!0):s[e]=t}if(0===e||a?.length){let e=new V.A({width:t,height:i,mask:o?l:null,pixels:[s],pixelType:p});e.updateStatistics(),a?.length?f[te(c,d,n)+h]=e:f.push(e)}else{let e=f[n];e.pixels.push(s),o?e.mask&&=V.A.combineBandMasks([e.mask,l]):e.mask=o?l:null}}}return{extent:r,pixelBlocks:f,multidimensionalInfo:u,attributeTable:Object.values(o).find(e=>e.attributeTable)?.attributeTable,bandNames:u?void 0:s}}(t)}};(0,a.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],oe.prototype,"datasetFormat",void 0),(0,a.Cg)([(0,n.MZ)({constructOnly:!0})],oe.prototype,"source",void 0),oe=(0,a.Cg)([(0,n.$K)("esri.layers.raster.datasets.CovJSONRaster")],oe);const ue=oe;var fe=i(85951),he=i(33196),ce=i(43163),de=i(4576),pe=i(21325),me=i(330);function ge(e,t){if(!e||!t)return null;let i=[];for(let r=0;r<e.length;r++)i.push(e[r]),i.push(t[r]);return i}function ye(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new j.A({wkid:t});if(e=String(e).trim(),(0,pe.jp)(e))return new j.A({wkt2:e});let i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;let r=i.indexOf("VERTCS"),a=i.indexOf("PROJCS"),n=a>-1?a:i.indexOf("GEOGCS");if(-1===n)return null;let s=e.slice(n,e.lastIndexOf("]",r)+1).trim(),l=e.slice(r,e.lastIndexOf("]")).trim();t=we(s);let o=t?new j.A({wkid:t}):new j.A({wkt:s}),u=we(l);return u&&(o.vcsWkid=u),o}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=we(e),0===t?new j.A({wkt:e}):new j.A({wkid:t})):null}function we(e){let t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),r=i[0]?.toLowerCase();if(("epsg"===r||"esri"===r)&&e.endsWith('"]]')){let e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function xe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};let t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,me.g7)(e,"SRS")){if(!t.spatialReference){let i=(0,me.mX)(e);t.spatialReference=ye(i)}}else if((0,me.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){let{spatialReference:i,transform:r}=function(e){let t=(0,me.V6)(e,"GeodataXform"),i=ye((0,me.v7)(t,"SpatialReference/WKID")||(0,me.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};let r=(0,me.v7)(t,"PolynomialOrder")??1,a=(0,me.Ui)(t,"CoeffX/Double"),n=(0,me.Ui)(t,"CoeffY/Double"),s=(0,me.Ui)(t,"InverseCoeffX/Double"),l=(0,me.Ui)(t,"InverseCoeffY/Double"),o=ge(a,n),u=ge(s,l);return{spatialReference:i,transform:o&&u&&o.length&&u.length?new ce.A({spatialReference:i,polynomialOrder:r,forwardCoefficients:o,inverseCoefficients:u}):null}}(e);t.transform=r,t.spatialReference||=i}else(0,me.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,me.mX)(e));else if((0,me.g7)(e,"PAMRasterBand")){let i=function(e){let t,i,r,a,n=(0,me.v7)(e,"NoDataValue"),s=(0,me.V6)(e,"Histograms/HistItem"),l=(0,me.v7)(s,"HistMin"),o=(0,me.v7)(s,"HistMax"),u=(0,me.v7)(s,"BucketCount"),f=(0,me.mX)(s,"HistCounts")?.split("|").map(e=>Number(e));(0,me.IC)(e,"Metadata/MDI").forEach(e=>{let n=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":t=n;break;case"STATISTICS_MAXIMUM":i=n;break;case"STATISTICS_MEAN":r=n;break;case"STATISTICS_STDDEV":a=n}});let h=(0,me.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:n,histogram:f?.length&&null!=l&&null!=o?{min:l,max:o,size:u||f.length,counts:f}:null,sourceBandIndex:h,statistics:null!=t&&null!=i?{min:t,max:i,avg:r,stddev:a}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});let i=t.rasterBands;return i.length&&(t.statistics=i[0].statistics?i.map(e=>e.statistics).filter(de.Ru):null,t.histograms=i[0].histogram?i.map(e=>e.histogram).filter(de.Ru):null),t}const ve="image-aux-raster:open",be="The data is not a supported format.";let Ie=class extends J.A{set rasterJobHandler(e){this._set("rasterJobHandler",e),this._inMemoryRaster&&(this._inMemoryRaster.rasterJobHandler=e)}async fetchRawTile(e,t,i,r={}){return this._inMemoryRaster?.fetchRawTile(e,t,i,r)}async _open(e){let t,{data:i,format:r}=await this._fetchData(e),{tileGeneration:a}=this.ioConfig,n="immediate"===a||"jpg"!==r;if(n){let a=await this._decodeFullImage(i,r,e);if(!a)throw new o.A(ve,"The data cannot be decoded.");t=await this._createRasterSource(a,e)}else{let r=(0,fe.R)(i);if(!r)throw new o.A(ve,be);t=await this._createRasterSource(r,e),t.encodedData=i}let{rasterJobHandler:s,ioConfig:l}=this,u=new le({preGenerateTiles:n,rasterJobHandler:s,source:t,ioConfig:{...l,sampling:"closest",skipStatistics:!0}});await u.open(e),this._set("rasterInfo",u.rasterInfo),this._inMemoryRaster=u}async _createRasterSource(e,t){let{spatialReference:i,statistics:r,histograms:a,transform:n}=await this._fetchAuxiliaryData(t),s=!i;s&&(i=new j.A({wkid:3857})),a?.length&&null==r&&(r=(0,$.Pg)(a));let{width:l,height:o}=e,u=new H.A({xmin:-.5,ymin:.5-o,xmax:l-.5,ymax:.5,spatialReference:i}),f=n?n.forwardTransform(u):u,h=!0;if(n){let e=n.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(n=null,u=f)}let c=[];return"pixels"in e&&c.push(e),{name:this.datasetName,pixelBlocks:c,imageInfo:{width:l,height:o,pixelType:"u8",bandCount:3},extent:f,nativeExtent:u,transform:n,statistics:r,histograms:a,isPseudoSpatialReference:s,keyProperties:{DataType:"Processed"}}}async _fetchData(e){let{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,he.g)(t);if("jpg"!==i&&"png"!==i&&"gif"!==i&&"bmp"!==i)throw new o.A(ve,be);return this._set("datasetFormat",i.toUpperCase()),{data:t,format:i}}async _decodeFullImage(e,t,i){try{return await this.decodePixelBlock(e,{format:t,canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0},i)}catch{return(0,c.Te)(i?.signal),this.decodePixelBlock(e,{format:t,canvasUsage:"no-canvas",skipStatistics:!0},i)}}async _fetchAuxiliaryData(e){let t=e?.signal,{skipExtensions:i=[],skipMapInfo:r}=this.ioConfig,a=r||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),n=this.datasetFormat,s="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,l=r||null==s||i.includes(s)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+s,{responseType:"text",signal:t}),o=await(0,c.Lx)([a,l]);if(t?.aborted)throw(0,c.NK)();let u=xe(o[0].value?.data);if(!u.transform){let e=o[1].value?o[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;u.transform=6===e?.length?new ce.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,a.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],Ie.prototype,"datasetFormat",void 0),(0,a.Cg)([(0,n.MZ)()],Ie.prototype,"rasterJobHandler",null),Ie=(0,a.Cg)([(0,n.$K)("esri.layers.raster.datasets.ImageAuxRaster")],Ie);const Ae=Ie;var Se=i(84952),Ce=i(86738),_e=i(82371),Re=i(20223),Te=i(87045),Me=i(25943);let Oe=class extends J.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,r={}){let{storageInfo:a,extent:n}=this.rasterInfo,{transposeInfo:s}=a,l=null!=s&&!!r.transposedVariableName;if(this._slices&&!l&&null==r.sliceId)return null;let o,u,f=l?0:a.maximumPyramidLevel-e+this._levelOffset,h=`${this.url}/tile/${f}/${t}/${i}`,c={...this._slices?l?{variable:r.transposedVariableName}:{sliceId:r.sliceId||0}:null,...r.refreshParameters};if(a.isBsqTile){let e=(r.bandIds?.length?r.bandIds:[0,1,2]).map(e=>this.request(h,{query:{...c,bandId:e},responseType:"array-buffer",signal:r.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),a=new Uint8Array(i);u=[];let n=0;for(let{data:e}of t)u.push(n),a.set(new Uint8Array(e),n),n+=e.byteLength;o=a.buffer}else o=(await this.request(h,{query:c,responseType:"array-buffer",signal:r.signal})).data;if(!o)return null;let{tileInfo:d}=a,p=l?s.tileSize:d.size,m=/^(mixed|jp)/i.test(d.format),g="raw"===d.format,y=await this.decodePixelBlock(o,{format:g?"bsq":void 0,width:p[0],height:p[1],planes:u?.length,offsets:u,pixelType:g?this.rasterInfo.pixelType:void 0,isPoint:"Elevation"===this.tileType,returnInterleaved:l,noDataValue:this.rasterInfo.noDataValue,applyJpegMask:m},{signal:r.signal});if(null==y)return null;let w=a.blockBoundary[e];if("jpg"!==a.compression||i>w.minCol&&i<w.maxCol&&t>w.minRow&&t<w.maxRow)return y;let{origin:x,blockWidth:v,blockHeight:b}=a,{x:I,y:A}=this.getPyramidPixelSize(e),S=Math.round((n.xmin-x.x)/I)%v,C=Math.round((n.xmax-x.x)/I)%v||v,_=Math.round((x.y-n.ymax)/A)%b,R=Math.round((x.y-n.ymin)/A)%b||b,T=i===w.minCol?S:0,M=t===w.minRow?_:0,O=i===w.maxCol?C:v,k=t===w.maxRow?R:b;return(0,ae.z$)(y,{x:T,y:M},{width:O-T,height:k-M}),y}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;let t=e;for(let e=0;e<this._slices.length;e++){let i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{let i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){let i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),r=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),a=await Promise.all([i,r]);return a[0]&&a[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),a[1]?.[0]?.counts?.length||(a[1]=null),{statistics:a[0]||null,histograms:a[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let r=0,{maximumPyramidLevel:a}=this.rasterInfo.storageInfo,n=a-r+this._levelOffset,s=i.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,i.row,i.col,t))break}catch{}if(n--,r++,i=this.identifyPixelLocation(s,r,t.datumTransformation),null===i)return null}return-1===n||null==i?null:r}async _open(e){let t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=i.data;if(this.sourceJSON=r,!r)throw new o.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!r.tileInfo)throw new o.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo();this.tileType=r.cacheType,this.tileType??=["jpg","jpeg","png","png8","png24","png32","mixed"].includes(r.tileInfo.format.toLowerCase())?"Map":"lerc"===r.tileInfo.format.toLowerCase()?"Elevation":"Raster",this.datasetName=r.name?.slice(r.name.indexOf("/")+1)??"";let a=this.rasterInfo??await this._fetchRasterInfo({signal:t});if(null==a)throw new o.A("image-server-raster:open","cannot initialize image service");(0,_e.E9)(a,r);let n="Map"===this.tileType?function(e,t){if(!e)return null;let{minScale:i,maxScale:r,minLOD:a,maxLOD:n}=t;if(null!=a&&null!=n)return Te.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=a&&e<=n)});if(0!==i&&0!==r){let t=e=>Math.round(1e4*e)/1e4,a=i?t(i):1/0,n=r?t(r):-1/0;return Te.A.fromJSON({...e,lods:e.lods.filter(e=>{let i=t(e.scale);return i<=a&&i>=n})})}return Te.A.fromJSON(e)}(r.tileInfo,r):Te.A.fromJSON(r.tileInfo);(0,f.Lw)(n);let[s,l]=this._computeMinMaxLOD(a,n),{extent:u,pixelSize:h}=a,c=.001*Math.min(h.x,h.y);(h.x!==h.y||Math.abs(s.resolution-h.x)>c)&&(h.x=h.y=s.resolution,a.width=Math.ceil((u.xmax-u.xmin)/h.x-.1),a.height=Math.ceil((u.ymax-u.ymin)/h.y-.1));let d=s.level-l.level,[p,m]=n.size,g=[],y=[],{lods:w}=n;w.forEach((e,t)=>{e.level>=l.level&&e.level<=s.level&&g.push({x:e.resolution,y:e.resolution}),t<w.length-1&&y.push(Math.round(10*e.resolution/w[t+1].resolution)/10)}),g.sort((e,t)=>e.x-t.x);let x,v=this.computeBlockBoundary(u,p,m,n.origin,g,d),b=g.length>1?g.slice(1):null;r.transposeInfo&&(x={tileSize:[r.transposeInfo.rows,r.transposeInfo.cols],packetSize:a.keyProperties?._yxs.PacketSize??0});let I=y.length<=1||y.length>=3&&y.slice(0,-1).every(e=>e===y[0])?y[0]??2:Math.round(10/(l.resolution/s.resolution)**(-1/d))/10,A=!!r.bsq&&"Raster"===this.tileType;if(a.storageInfo=new Re.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:b,pyramidScalingFactor:I,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:n,isBsqTile:A,transposeInfo:x,blockBoundary:v}),(0,L.vj)(a),this._set("rasterInfo",a),r.capabilities.toLowerCase().includes("tilemap")){let e={tileInfo:a.storageInfo.tileInfo,parsedUrl:(0,Se.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new Me.d({layer:e})}}async _fetchRasterInfo(e){let t=this.sourceJSON;if("Map"===this.tileType){let e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),r=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),a=j.A.fromJSON(t.spatialReference||e.spatialReference),n=new Ce.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:a});return new re.A({width:i,height:r,bandCount:3,extent:H.A.fromJSON(e),spatialReference:a,pixelSize:n,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}let i={...e,query:{...this.ioConfig.customFetchParameters,f:"json"}},r=(0,_e.Tw)(this.url,this.sourceJSON,i),a=t.hasMultidimensions?this.request(`${this.url}/slices`,i).then(e=>e.data?.slices).catch(()=>null):null,n=await Promise.all([r,a]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){let{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){let{pixelSize:i}=e,r=.5/e.width*i.x,{lods:a}=t,n=t.lodAt(Math.max.apply(null,a.map(e=>e.level))),s=t.lodAt(Math.min.apply(null,a.map(e=>e.level))),{tileType:l}=this;if("Map"===l)return this._levelOffset=a[0].level,[n,s];if("Raster"===l)return[a.find(e=>e.resolution===i.x)??n,s];let{minScale:o,maxScale:u}=this.sourceJSON,f=n;u>0&&(f=a.find(e=>Math.abs(e.scale-u)<r),f||=a.filter(e=>e.scale>u).sort((e,t)=>e.scale>t.scale?1:-1)[0]??n);let h=s;return o>0&&(h=a.find(e=>Math.abs(e.scale-o)<r)??s,this._levelOffset=h.level-s.level),[f,h]}};(0,a.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],Oe.prototype,"datasetFormat",void 0),(0,a.Cg)([(0,n.MZ)()],Oe.prototype,"tileType",void 0),Oe=(0,a.Cg)([(0,n.$K)("esri.layers.raster.datasets.ImageServerRaster")],Oe);const ke=Oe;var Fe=i(10713);const De=new Map([["byte","u8"],["signedbyte","s8"],["int8","s8"],["uint8","u8"],["int16","s16"],["uint16","u16"],["int32","s32"],["uint32","u32"],["float32","f32"],["float64","f64"],["double64","f64"]]),Ne=new Map;Ne.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Ne.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Ne.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Ne.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),Ne.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let Pe=class extends J.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this._isBsq=!1,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,r={}){let{blockWidth:a,blockHeight:n,blockBoundary:s}=this.rasterInfo.storageInfo,l=s[e];if(!l||l.maxRow<t||l.maxCol<i||l.minRow>t||l.minCol>i)return null;let{bandCount:o,pixelType:u}=this.rasterInfo,{ranges:f,actualTileWidth:h,actualTileHeight:c}=this._getTileLocation(e,t,i);if(!f||0===f.length)return null;if(f.some(e=>e.from>e.to)){let e=new Uint8Array(a*n);return new V.A({width:a,height:n,pixels:void 0,mask:e,validPixelCount:0})}let{bandIds:d}=this.ioConfig,p=this._getBandSegmentCount(),m=[],g=0;for(g=0;g<p;g++)(!d||d.includes(g))&&m.push(this.request(this._files.data,{range:{from:f[g].from,to:f[g].to},responseType:"array-buffer",signal:r.signal}));let y=await Promise.all(m),w=y.map(e=>e.data.byteLength).reduce((e,t)=>e+t),x=new Uint8Array(w),v=[],b=0;for(g=0;g<p;g++)v.push(b),x.set(new Uint8Array(y[g].data),b),b+=y[g].data.byteLength;let I=Ne.get(this.rasterInfo.storageInfo.compression).decoderFormat,A="jpg"===I&&4===o&&1===v.length,S=await this.decodePixelBlock(x.buffer,{width:a,height:n,format:I,planes:d?.length||o,offsets:v,pixelType:u,canvasUsage:A?"no-canvas":void 0,decodeJpegAsRgb:!1},{signal:r.signal});if(null==S)return null;let{noDataValue:C}=this.rasterInfo;if(null!=C&&"lerc"!==I&&!S.mask&&(C=C[0],null!=C)){let e=S.width*S.height,t=new Uint8Array(e);if(Math.abs(C)>1e24)for(g=0;g<e;g++)Math.abs((S.pixels[0][g]-C)/C)>1e-6&&(t[g]=1);else for(g=0;g<e;g++)S.pixels[0][g]!==C&&(t[g]=1);S.mask=t}let _=0,R=0;if(h!==a||c!==n){let e=S.mask;if(e)for(g=0;g<n;g++)if(R=g*a,g<c)for(_=h;_<a;_++)e[R+_]=0;else for(_=0;_<a;_++)e[R+_]=0;else for(e=new Uint8Array(a*n),S.mask=e,g=0;g<c;g++)for(R=g*a,_=0;_<h;_++)e[R+_]=1}return S}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);let t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:r,files:a}=this._parseHeader(i.data),{skipMapInfo:n,skipExtensions:s=[]}=this.ioConfig;if(!s.includes("aux.xml")&&!n){let t=await this._fetchAuxiliaryData(e);null!=t&&(r.statistics=t.statistics??r.statistics,r.histograms=t.histograms,t.histograms&&null==r.statistics&&(r.statistics=(0,$.Pg)(t.histograms)))}n&&this.updateImageSpaceRasterInfo(r),this._set("rasterInfo",r),this._files=a;let l=await this.request(a.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw Error("invalid array buffer must be multiples of 16");let t;if(Fe.Z){let i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),a=new Uint8Array(r);for(let t=0;t<e.byteLength/4;t++)for(let e=0;e<4;e++)a[4*t+e]=i[4*t+3-e];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(l.data);let{blockWidth:o,blockHeight:u}=this.rasterInfo.storageInfo,f=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:c}=this.rasterInfo,d=[],p=this._getBandSegmentCount(),m=0,g=-1;for(;m<this._storageIndex.length;){g++;let e=Math.ceil(h/o/f**g)-1,t=Math.ceil(c/u/f**g)-1;m+=(e+1)*(t+1)*p*4,d.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=d,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return this._isBsq?this.rasterInfo.bandCount:1}_getTileLocation(e,t,i){let r,a,n,{blockWidth:s,blockHeight:l,pyramidScalingFactor:o}=this.rasterInfo.storageInfo,{width:u,height:f}=this.rasterInfo,h=this._getBandSegmentCount(),c=0,d=0;for(n=0;n<e;n++)d=o**n,r=Math.ceil(u/s/d),a=Math.ceil(f/l/d),c+=r*a;d=o**e,r=Math.ceil(u/s/d),a=Math.ceil(f/l/d),c+=t*r+i,c*=4*h;let p=this._storageIndex.subarray(c,c+4*h),m=0,g=0,y=[];for(let e=0;e<h;e++)m=p[4*e]*2**32+p[4*e+1],g=m+p[4*e+2]*2**32+p[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<r-1?s:Math.ceil(u/d)-s*(r-1),actualTileHeight:t<a-1?l:Math.ceil(f/d)-l*(a-1)}}_parseHeader(e){let t=(0,me.V6)(e,"MRF_META/Raster");if(!t)throw new o.A("mrf:open","not a valid MRF format");let i=(0,me.V6)(t,"Size"),r=parseInt(i.getAttribute("x"),10),a=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),s=((0,me.mX)(t,"Compression")||"none").toLowerCase();if(!Ne.has(s))throw new o.A("mrf:open","currently does not support compression "+s);let l=(0,me.mX)(t,"DataType")||"UInt8",u=De.get(l.toLowerCase());if(null==u)throw new o.A("mrf:open","currently does not support pixel type "+l);let f=(0,me.V6)(t,"PageSize"),h=parseInt(f.getAttribute("x"),10),c=parseInt(f.getAttribute("y"),10),d=f.getAttribute("c"),p=d?d===String(n):Ne.get(s).isOneSegment;this._isBsq=!p;let m,g=(0,me.V6)(t,"DataValues");if(g){let e=g.getAttribute("NoData");null!=e&&(m=e.trim().split(" ").map(e=>parseFloat(e)))}if((0,me.V6)(e,"MRF_META/CachedSource"))throw new o.A("mrf:open","currently does not support MRF referencing other data files");let y,w=(0,me.V6)(e,"MRF_META/GeoTags"),x=(0,me.V6)(w,"BoundingBox"),v=!1;if(null!=x){let e=parseFloat(x.getAttribute("minx")),t=parseFloat(x.getAttribute("miny")),i=parseFloat(x.getAttribute("maxx")),r=parseFloat(x.getAttribute("maxy")),a=(0,me.mX)(w,"Projection")||"",n=j.A.WGS84;if("LOCAL_CS[]"!==a)if(a.toLowerCase().startsWith("epsg:")){let e=Number(a.slice(5));!isNaN(e)&&0!==e&&(n=new j.A({wkid:e}))}else n=ye(a)??j.A.WGS84;else v=!0,n=new j.A({wkid:3857});y=new H.A({xmin:e,ymin:t,xmax:i,ymax:r}),y.spatialReference=n}else v=!0,y=new H.A({xmin:-.5,ymin:.5-a,xmax:r-.5,ymax:.5,spatialReference:new j.A({wkid:3857})});let b=(0,me.V6)(e,"MRF_META/Rsets"),I=parseInt(b?.getAttribute("scale")||"2",10),A=y.spatialReference,S=new Re.A({origin:new Ce.A({x:y.xmin,y:y.ymax,spatialReference:A}),blockWidth:h,blockHeight:c,pyramidBlockWidth:h,pyramidBlockHeight:c,compression:s,pyramidScalingFactor:I}),C=new Ce.A({x:y.width/r,y:y.height/a,spatialReference:A}),_=new re.A({width:r,height:a,extent:y,isPseudoSpatialReference:v,spatialReference:A,bandCount:n,pixelType:u,pixelSize:C,noDataValue:m,storageInfo:S}),R=this._getAuxFullPath((0,me.mX)(t,"DataFile")),T=this._getAuxFullPath((0,me.mX)(t,"IndexFile"));return{rasterInfo:_,files:{mrf:this.url,index:T||this.url.replace(".mrf",".idx"),data:R||this.url.replace(".mrf",Ne.get(s).blobExtension)}}}_getAuxFullPath(e){return!e||e.includes("\\")?null:e.includes("/")?e.startsWith(new URL(this.url).origin)?e:null:`${this.url.slice(0,this.url.lastIndexOf("/"))}/${e}`}async _fetchAuxiliaryData(e){try{let{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return xe(t)}catch{return null}}};(0,a.Cg)([(0,n.MZ)()],Pe.prototype,"_files",void 0),(0,a.Cg)([(0,n.MZ)()],Pe.prototype,"_storageIndex",void 0),(0,a.Cg)([(0,n.MZ)()],Pe.prototype,"_isBsq",void 0),(0,a.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],Pe.prototype,"datasetFormat",void 0),Pe=(0,a.Cg)([(0,n.$K)("esri.layers.raster.datasets.MRFRaster")],Pe);const ze=Pe;i(44208);var Le=i(44094),Ee=i(94213),Be=i(9334);function $e(e){let t=e.fields,i=e.records,r=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",a=[{name:r,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),n=a.map(e=>e.name),s=[],l=0,o=0;return i.forEach(e=>{let t={};for(t[r]=l++,o=1;o<n.length;o++)t[n[o]]=e[o-1];s.push({attributes:t})}),{displayFieldName:"",fields:a,features:s}}function Je(e){let t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};let r=t.getUint32(4,!0),a=t.getUint16(8,!0),n=t.getUint16(10,!0),s={version:i,recordCount:r,headerByteCount:a,recordByteCount:n},l=32,o=[],u=[];for(;13!==t.getUint8(l);){let i=String.fromCharCode(t.getUint8(l+11)).trim();o.push({name:(0,Be.w)(new Uint8Array(e,l,11)),type:i,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(i)],length:t.getUint8(l+16)}),l+=32}if(l+=1,o.length>0)for(;u.length<r&&e.byteLength-l>n;){let i=[];32===t.getUint8(l)?(l+=1,o.forEach(t=>{if("C"===t.type)i.push((0,Be.w)(new Uint8Array(e,l,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim()));else if("D"===t.type){let r=String.fromCharCode.apply(null,new Uint8Array(e,l,t.length)).trim();i.push(new Date(parseInt(r.slice(0,4),10),parseInt(r.slice(4,6),10)-1,parseInt(r.slice(6,8),10)))}l+=t.length}),u.push(i)):l+=n}return{header:s,fields:o,records:u,recordSet:$e({fields:o,records:u})}}const Ue="none-tiled tiff is not optimized for access, convert to COG and retry.";let He=class extends J.A{constructor(){super(...arguments),this._bufferSize=1048576,this._chunkSize=10485760,this._fileSize=-1,this._headerChunks=[],this.datasetFormat="TIFF",this.headerInfo=null}async fetchRawTile(e,t,i,r={}){if(!this.headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;let a=await this._fetchRawTiffTile(e,t,i,!1,r);if(null!=a&&this.headerInfo.hasMaskBand){let n=await this._fetchRawTiffTile(e,t,i,!0,r);null!=n&&n.pixels[0]instanceof Uint8Array&&(a.mask=n.pixels[0])}return a}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf(".")),await this._readHeader(e?.signal),await this._fetchAllAuxData(),this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(this.rasterInfo),this.updateTileInfo()}async _readHeader(e){try{let t=await this._fetchHeaderData(0,this._bufferSize,e);if(!t)throw new o.A("tiffraster:open","failed to open url "+this.url);let{littleEndian:i,firstIFDPos:r,isBigTiff:a}=(0,Le.uT)(t),n=[],s={fileChunk:t,posIFD:r,fileOffset:0};await this._readIFDs(n,s,i,a?8:4,e);let{imageInfo:l,rasterInfo:u}=function(e){let t=(0,Le.uc)(e),{width:i,height:r,tileWidth:a,tileHeight:n,planes:s,pixelType:l,compression:o,firstPyramidLevel:u,maximumPyramidLevel:f,pyramidBlockWidth:h,pyramidBlockHeight:c,pyramidResolutions:d,tileBoundary:p,affine:m,metadata:g,colormap:y}=t,w=ye(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),x=!!t.isPseudoGeographic;w??=(x=!0,new j.A({wkid:3857}));let v=new H.A({...t.extent,spatialReference:w}),b=v?new Ce.A({x:v.xmin,y:v.ymax,spatialReference:w}):new Ce.A({x:0,y:0}),I=new Re.A({blockWidth:a,blockHeight:n,pyramidBlockWidth:h,pyramidBlockHeight:c,compression:o,origin:b,firstPyramidLevel:u,maximumPyramidLevel:f,pyramidResolutions:d,blockBoundary:p}),A=new Ce.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/r,spatialReference:w}),S=g?{BandProperties:g.bandProperties,DataType:g.dataType}:{},C=new re.A({width:i,height:r,bandCount:s,pixelType:l,pixelSize:A,storageInfo:I,spatialReference:w,isPseudoSpatialReference:x,keyProperties:S,extent:v,colormap:y,statistics:g?g.statistics:null});if(m?.length&&(C.nativeExtent=new H.A({xmin:-.5,ymin:.5-r,xmax:i-.5,ymax:.5,spatialReference:w}),C.transform=new ce.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),C.extent=C.transform.forwardTransform(C.nativeExtent),C.pixelSize=new Ce.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/r,spatialReference:w}),I.origin.x=-.5,I.origin.y=.5),d){let{x:e,y:t}=C.pixelSize;d.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:C}}(n),f=(0,Le.zS)(n),h=(0,Le.r9)(n);this.headerInfo={littleEndian:i,isBigTiff:a,ifds:n,pyramidIFDs:f,maskIFDs:h,...l},this._set("rasterInfo",u),this._validateHeader()}finally{this._headerChunks.length=0}}_validateHeader(){let e=this.headerInfo;if(!e.isSupported)throw new o.A("tiffraster:open","this tiff is not supported: "+e.message);if(!e.tileWidth||!e.tileHeight)throw new o.A("tiffraster:open",Ue);this.rasterInfo.isPseudoSpatialReference&&u.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");let t=e.ifds[0],i=t.get("PREDICTOR")?.values?.[0];if(3===t.get("SAMPLEFORMAT")?.values?.[0]&&2===i)throw new o.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data")}async _fetchHeaderData(e,t,i){let r=this._getCachedHeaderData(e,t);if(r)return r;let a=Math.floor(e/this._bufferSize)*this._bufferSize,n=a+Math.max(1,Math.ceil((t-a)/this._bufferSize))*this._bufferSize,s=this._getMissingHeaderRanges(a,n).map(async e=>{let{from:t,to:r}=e,a=await this._fetchOffsets(t,r,i),n=this._fileSize;return{chunk:a,fileOffset:t,isEOF:n>0?t+a.byteLength>=n:a.byteLength<r-t+1}}),l=await Promise.all(s);this._headerChunks.push(...l),this._headerChunks.sort((e,t)=>e.fileOffset-t.fileOffset);let u=this._getCachedHeaderData(e,t);if(!u)throw new o.A("tiffraster:open",`failed to fetch byte range ${e}-${t} from ${this.url}`);return u}_getCachedHeaderData(e,t){let i=[],r=e;for(let{chunk:a,fileOffset:n,isEOF:s}of this._headerChunks){if(n+a.byteLength-1<r)continue;if(n>r)return null;let l=r-n,o=Math.min(t-n+1,a.byteLength);if(i.push({chunk:a,start:l,end:o}),r=n+o,r>t||s&&o===a.byteLength){let t=new Uint8Array(r-e),a=0;for(let e of i){let i=new Uint8Array(e.chunk,e.start,e.end-e.start);t.set(i,a),a+=i.byteLength}return t.buffer}}return null}_getMissingHeaderRanges(e,t){let i=[],r=(e,t)=>{let r=Math.floor(e/this._bufferSize)*this._bufferSize,a=Math.ceil(t/this._bufferSize)*this._bufferSize;i.push({from:r,to:a})},a=e;for(let{chunk:e,fileOffset:n,isEOF:s}of this._headerChunks){let l=n+e.byteLength-1;if(!(l<a)&&(n>a&&r(a,Math.min(n-1,t)),a=Math.max(a,l+1),a>t||s))return i}return a<=t&&r(a,t),i}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:r,posIFD:a}=e;if(a+8>=i.byteLength||a<0){if(r=a+r,r<0)throw new o.A("tiffraster:open",`invalid IFD position ${r}. failed to open url ${this.url}`);i=await this._fetchHeaderData(r,r+this._bufferSize/2,t),a=0}return{fileChunk:i,fileOffset:r,posIFD:a}}async _readIFDs(e,t,i,r=4,a){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,a);let n=await this._readIFD(t,i,Ee.NB,r,a);if(!n?.ifd)throw new o.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,r,a)}async _readIFD(e,t,i=Ee.NB,r=4,a){let{fileChunk:n,posIFD:s,fileOffset:l}=e;if(!e.fileChunk)return null;let u=(0,Le.JM)(n,t,s,l,i,r);if(u.success){let{ifd:e}=u;if(!e)throw new o.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(!(this.ioConfig.loadFullMetadata||i!==Ee.NB||e.has("TILEWIDTH")&&e.has("TILELENGTH")))throw new o.A("tiffraster:open",Ue);let r=[];e.forEach(e=>{e.values||r.push(e)}),r.length>0&&await this._fillOffsets(r,t,u.nextIFD,a),(0,Le.fM)(e),(0,Le.h_)(e);for(let[i,r]of Ee.RR){let o=e.get(i),u=null!=o?.data&&Array.from(o.data.values()).some(e=>null==e.values&&null!=e.offlineOffsetSize);if(o&&(!o.data||u)){s=o.valueOffset-l;let e=await this._validateOrFetchHeaderBuffer({fileChunk:n,posIFD:s,fileOffset:l},a);o.data=(await this._readIFD(e,t,r,4,a))?.ifd}}return u}return u.requiredBufferSize?(n=await this._fetchHeaderData(l,l+s+u.requiredBufferSize+8,a),n.byteLength<s+u.requiredBufferSize?null:(e.fileChunk=n,e.fileOffset=l,this._readIFD(e,t,i,r,a))):null}async _fillOffsets(e,t,i,r){let a=e.filter(e=>null!=e.offlineOffsetSize);if(0===a.length)return;let n=a.map(e=>e.offlineOffsetSize),s=Math.min.apply(null,n.map(e=>e[0])),l=Math.max.apply(null,n.map(e=>e[0]+e[1])),o=1===n.length||l-s<=this._bufferSize;if(!o&&n.length>1&&(n.sort((e,t)=>e[0]-t[0]),o=n.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,n[0][0])===l),o){let e=Math.max(l,s+this._bufferSize/4),i=await this._fetchHeaderData(s,e,r);return void a.forEach(e=>(0,Le.Cr)(i,t,e,s))}let u=a.map(async e=>{let i=e.offlineOffsetSize,a=await this._fetchHeaderData(i[0],i[1]+i[0],r);(0,Le.Cr)(a,t,e,i[0])});await Promise.all(u)}async _fetchOffsets(e,t,i){let r=[],a=this._chunkSize;this._fileSize>0&&(t=Math.min(t,this._fileSize-1));let n=Math.ceil((t-e+1)/a),s=e;for(let e=0;e<n;e++)r.push(this.request(this.url,{range:{from:s,to:e===n-1?t:s+a-1},responseType:"array-buffer",signal:i})),s+=a;let l=await Promise.all(r);if(-1===this._fileSize&&206===l[0].httpStatus){let e=l[0].getHeader?.("Content-Range"),t=Number(e?.split("/",2)[1]);Number.isFinite(t)&&(this._fileSize=t)}if(1===l.length)return l[0].data;let o=l.reduce((e,t)=>e+t.data.byteLength,0),u=new Uint8Array(o),f=0;for(let e of l)u.set(new Uint8Array(e.data),f),f+=e.data.byteLength;return u.buffer}async _fetchRawTiffTile(e,t,i,r,a={}){let n=this._getTileLocation(e,t,i,r);if(!n)return null;let{ranges:s,actualTileWidth:l,actualTileHeight:o,ifd:u}=n,f=s.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:a.signal})),h=await Promise.all(f),c=h.map(e=>e.data.byteLength).reduce((e,t)=>e+t),d=1===h.length?h[0].data:new ArrayBuffer(c),p=[0],m=[d.byteLength];if(h.length>1){let e=new Uint8Array(d);for(let t=0,i=0;t<h.length;t++){let r=h[t].data;e.set(new Uint8Array(r),i),p[t]=i,i+=r.byteLength,m[t]=r.byteLength}}let{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(d,{format:"tiff",customOptions:{headerInfo:this.headerInfo,ifd:u,offsets:p,sizes:m},width:g,height:y,planes:null,pixelType:null},{signal:a.signal});if(null==w)return null;if(l!==g||o!==y){let e=w.mask;if(e)for(let t=0;t<y;t++){let i=t*g;if(t<o)for(let t=l;t<g;t++)e[i+t]=0;else for(let t=0;t<g;t++)e[i+t]=0}else{e=new Uint8Array(g*y),w.mask=e;for(let t=0;t<o;t++){let i=t*g;for(let t=0;t<l;t++)e[i+t]=1}}}return w}_getTileLocation(e,t,i,r=!1){let{firstPyramidLevel:a,blockBoundary:n}=this.rasterInfo.storageInfo,s=0===e?0:e-(a-1),{headerInfo:l}=this;if(!l)return null;let o=r?l.maskIFDs[s]:0===s?l.ifds[0]:l.pyramidIFDs[s-1];if(!o)return null;let u=(0,Le.XO)(o),f=(0,Le.wc)(o,"TILEOFFSETS"),h=(0,Le.wc)(o,"TILEBYTECOUNTS");if(!f?.length||!h?.length)return null;let{minRow:c,minCol:d,maxRow:p,maxCol:m}=n[s];if(t>p||i>m||t<c||i<d)return null;let g=(0,Le.LZ)(o,"IMAGEWIDTH"),y=(0,Le.LZ)(o,"IMAGELENGTH"),w=(0,Le.LZ)(o,"TILEWIDTH"),x=(0,Le.LZ)(o,"TILELENGTH"),v=[];if(u){let{bandCount:e}=this.rasterInfo;for(let r=0;r<e;r++){let e=r*(p+1)*(m+1)+t*(m+1)+i;v[r]={from:f[e],to:f[e]+h[e]-1}}}else{let e=t*(m+1)+i;v.push({from:f[e],to:f[e]+h[e]-1})}for(let e=0;e<v.length;e++)if(null==v[e].from||!v[e].to||v[e].to<0)return null;return{ranges:v,ifd:o,actualTileWidth:i===m&&g%w||w,actualTileHeight:t===p&&y%x||x}}async _fetchAllAuxData(e){if(this.ioConfig.skipMapInfo)return;let{rasterInfo:t}=this,{skipExtensions:i=[]}=this.ioConfig,r=i.includes("aux.xml")?Promise.resolve(null):this._fetchAuxiliaryMetaData(e),a=i.includes("vat.dbf")||1!==t.bandCount||"u8"!==t.pixelType?Promise.resolve(null):this._fetchAuxiliaryTable(e),[n,s]=await Promise.all([r,a]);null!=n&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,$.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;let i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new Ce.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(n,t),null!=s&&(t.attributeTable=s,t.keyProperties.DataType="thematic")}async _fetchAuxiliaryMetaData(e){try{let{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return xe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{let{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Je(t);return i?.recordSet?B.A.fromJSON(i.recordSet):null}catch{return null}}};(0,a.Cg)([(0,n.MZ)()],He.prototype,"_bufferSize",void 0),(0,a.Cg)([(0,n.MZ)()],He.prototype,"_chunkSize",void 0),(0,a.Cg)([(0,n.MZ)()],He.prototype,"_fileSize",void 0),(0,a.Cg)([(0,n.MZ)()],He.prototype,"_headerChunks",void 0),(0,a.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],He.prototype,"datasetFormat",void 0),(0,a.Cg)([(0,n.MZ)()],He.prototype,"headerInfo",void 0),He=(0,a.Cg)([(0,n.$K)("esri.layers.raster.datasets.TIFFRaster")],He);const je=He;var Ze=i(91806);const Ve=new Set(["x","lon","long","longitude","e","east","easting"]),qe=new Set(["y","lat","latitude","n","north","northing"]),We=new Map([["b1","u8"],["u1","u8"],["u2","u16"],["u4","u32"],["i1","s8"],["i2","s16"],["i4","s32"],["f2","f32"],["f4","f32"],["f8","f64"],["c8","c64"],["c16","c128"],["m","unknown"],["M","unknown"],["S","unknown"],["U","unknown"],["V","unknown"]]),Ge="zarr-raster:parse";function Xe(e,t){return e.slice(0,-t.length)}function Ye(e,t){!function(e){if(2!==e?.zarr_format)throw new o.A(Ge,"only zarr_format 2 is supported");let{shape:t,compressor:i,order:r,chunks:a,dimension_separator:n}=e;if(!Array.isArray(t)||!Array.isArray(a)||t.length!==a.length||t.some(e=>!Number.isSafeInteger(e)||e<0)||a.some(e=>!Number.isSafeInteger(e)||e<=0))throw new o.A(Ge,"invalid Zarr shape or chunks");if(null!=r&&"C"!==r&&"F"!==r)throw new o.A(Ge,"invalid Zarr array order");if(null!=n&&"."!==n&&"/"!==n)throw new o.A(Ge,"invalid Zarr dimension separator");if(null!==i&&("string"!=typeof i?.id||!i.id))throw new o.A(Ge,"Zarr compressor must be null or have a codec id")}(e);let{isBigEndian:i,pixelType:r,originalPixelType:a}=function(e){if("string"!=typeof e)throw new o.A(Ge,`Unsupported Zarr dtype: ${JSON.stringify(e)}`);let t=e.startsWith(">"),i=e.replace(/^[<>|=]/,""),r=We.get(i);if(!r||"unknown"===r||r.startsWith("c"))throw new o.A(Ge,`Unsupported Zarr dtype: ${JSON.stringify(e)}`);return{isBigEndian:t,pixelType:r,originalPixelType:i}}(e.dtype),{shape:n,compressor:s,order:l,chunks:u}=e,f=s?.id||"none",h="C"===l||null==l,c=function(e){if(null!==e){if("number"==typeof e)return e;switch(e){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new o.A(Ge,`Unsupported numeric Zarr fill value: ${e}`)}}}(e.fill_value);if(null!=c)if(Number.isFinite(c)){"f32"===r&&(c="f2"===a?new Float16Array([c])[0]:Math.fround(c));let[e,t]=(0,q.hP)("f2"===a?"f16":r);(c>t||c<e)&&(c=void 0)}else c=r.startsWith("f")?c:void 0;let d=e.dimension_separator??".";return{isBigEndian:i,pixelType:r,originalPixelType:a,compression:f,isRowMajor:h,shape:n,chunkSize:u,fillValue:c,scaleFactor:t?.scale_factor??1,addOffset:t?.add_offset??0,separator:d}}function Ke(e){return e.Description??e.description??e.long_name??e.standard_name??null}function Qe(e,t,i){let r=i?.[e];return!r?.length||t<=0?null:r.length<=t?r.toSorted((e,t)=>e-t):r.slice(0,t).toSorted((e,t)=>e-t)}function et(e){if(1===e.length)return[e[0]-.5,e[0]+.5];let t=e[0],i=e.at(-1),r=Math.abs(i-t)/(e.length-1)*.5;return[Math.min(t,i)-r,Math.max(t,i)+r]}function tt(e){let t;for(let i=0;i<e.length;i++){let r=e[i],a=it(r);if(a)return new j.A({wkid:a});t||=r?._CRS?.wkt?.trim()}return t?new j.A({wkt:t}):void 0}function it(e){let t=e?._CRS?.projjson?.id?.code,i="CRS84"===t?4326:"CRS83"===t?4269:"CRS27"===t?4267:Number(t);if(Number.isSafeInteger(i)&&i>0)return i;let r=e?._CRS?.url;return"string"==typeof r&&Number(r.slice(r.lastIndexOf("/")+1))||void 0}function rt(e){let t=e.attributes._ARRAY_DIMENSIONS,i=e.array.shape??[];return!t?.length||t.length!==i.length}function at(e,t){let i="x"===t?Ve:qe;return(e.find(e=>i.has(e.attributes.standard_name?.toLowerCase()??""))??e.find(e=>i.has(e.name.toLowerCase()??"")))?.name}function nt(e,t){return`${e}/${t=t.split("/").map(encodeURIComponent).join("/")}`}const st="zarr-raster:open",lt=new Set(["none","blosc"]);let ot=class extends J.A{constructor(){super(...arguments),this.datasetFormat="ZARR"}get _baseUrl(){let{url:e}=this;return e.endsWith("/.zmetadata")||e.endsWith("/.zgroup")?e.slice(0,e.lastIndexOf("/")):e}async fetchRawTile(e,t,i,r={}){let{multidimensionalDefinition:a}=r;if(!a?.length)return null;let n=a[0].variableName,s=this._metadata.dataVariables.find(e=>e.name===n);if(!s)return null;let{storageInfo:l}=s,u=Object.fromEntries(a.map(e=>[e.dimensionName,e.values[0]])),f=this._getDimensionIndices(s,t,i,u);if(!f)return null;let h=s.attributes._ARRAY_DIMENSIONS,{xDimension:c,yDimension:d}=this._metadata,p=function(e,t,i,r){let{chunkSize:a,shape:n,pixelType:s,separator:l,isRowMajor:o,fillValue:u,scaleFactor:f,addOffset:h}=e,c=Array(n.length),d=Array(n.length),p=Array(n.length),m=1;for(let e=0;e<n.length;e++){let i=t[e];if(i<0||i>=n[e])return null;let r=a[e],s=Math.floor(i/r);c[e]=s,d[e]=i-s*r,p[e]=Math.min(r,n[e]-s*r),m*=r}return{chunkPath:c.join(l),chunkSize:a,actualSize:p,offsets:d,xIndex:i,yIndex:r,pixelType:s,isRowMajor:o,elementCount:m,fillValue:u,scaleFactor:f,addOffset:h}}(l,f,h.indexOf(c),h.indexOf(d));if(!p)return null;let m=nt(this._baseUrl,`${n}/${p.chunkPath}`),{data:g}=await this.request(m,{responseType:"array-buffer",signal:r.signal}),{actualSize:y,elementCount:w}=p,x=await this._decodeChunk(g,l,r),v=y.reduce((e,t)=>e*t,1),b=x.length;if(b!==w&&b!==v)throw new o.A("zarr-raster:decode",`Invalid chunk length ${b} for "${m}"; expected ${w} or ${v} values`);return function(e,t){let i,{chunkSize:r,actualSize:a,xIndex:n,yIndex:s}=t,l=r[n],o=r[s],u=a[n],f=a[s],h=function(e,t){let{chunkSize:i,actualSize:r,xIndex:a,yIndex:n,pixelType:s,elementCount:l,isRowMajor:o}=t,u=i[a],f=i[n],h=e.length===l?i:r;return e.length===u*f&&h[a]===u&&h[n]===f?(o?n<a:a<n)?e:function(e,t,i,r){let a=new(V.A.getPixelArrayConstructor(r))(e.length);for(let r=0;r<i;r++)for(let n=0;n<t;n++)a[r*t+n]=e[n*i+r];return a}(e,u,f,s):function(e,t,i){let{chunkSize:r,actualSize:a,offsets:n,xIndex:s,yIndex:l,pixelType:o,isRowMajor:u}=t,f=r[s],h=r[l],c=a[s],d=a[l],p=Array(i.length),m=1;for(let e=0;e<i.length;e++){let t=u?i.length-1-e:e;p[t]=m,m*=i[t]}let g=new(V.A.getPixelArrayConstructor(o))(f*h);for(let t=0;t<d;t++)for(let r=0;r<c;r++){let a=0;for(let e=0;e<i.length;e++){let i=n[e];e===s?i=r:e===l&&(i=t),a+=i*p[e]}g[t*f+r]=e[a]}return g}(e,t,h)}(e,t);if(u<l||f<o){i=new Uint8Array(l*o);for(let e=0;e<f;e++)i.fill(1,e*l,e*l+u)}let{fillValue:c}=t;if(null!=c){let e=Number.isNaN(c);for(let t=0;t<f;t++)for(let r=0;r<u;r++){let a=t*l+r,n=h[a];(n===c||e&&Number.isNaN(n))&&(i??=new Uint8Array(l*o).fill(1),i[a]=0)}}let{pixelType:d,scaleFactor:p,addOffset:m}=t,g=d,y=h;if(1!==p||0!==m){g="f64"===d?"f64":"f32",y=new(V.A.getPixelArrayConstructor(g))(h.length);for(let e=0;e<h.length;e++)y[e]=0===i?.[e]?h[e]:h[e]*p+m}return new V.A({width:l,height:o,pixelType:g,pixels:[y],mask:i})}(x,p)}async _open(e){let t=this.url.slice(this.url.lastIndexOf("/")+1);if(t.endsWith(".zattrs")||t.endsWith(".zarray"))throw new o.A(st,`Unsupported Zarr URL: "${this.url}". Expect a v2 root url or consolidated metadata url`);let i=this._baseUrl;this.datasetName=i.slice(i.lastIndexOf("/")+1).replace(".zarr","");let r=e?.signal??void 0,{data:a}=await this.request(`${i}/.zmetadata`,{signal:r}),n=function(e){let t=e?.metadata;if("object"!=typeof t||!t||Array.isArray(t))throw new o.A(Ge,"missing consolidated metadata root");let i=new Map;for(let[e,r]of Object.entries(t))if(e.endsWith("/.zarray")){let a=r,n=Xe(e,"/.zarray"),s=t[`${n}/.zattrs`],l=Ye(a,s);if(s){let e=s._ARRAY_DIMENSIONS;if(!e?.length)throw new o.A(Ge,`missing required _ARRAY_DIMENSIONS attribute for array "${n}"`);if(null!=s.scale_factor&&!Number.isFinite(s.scale_factor)||null!=s.add_offset&&!Number.isFinite(s.add_offset))throw new o.A(Ge,`Invalid scale_factor or add_offset for array "${n}"`);let t=1===e.length&&e[0]===n,r=tt([s]),{shape:u,chunkSize:f}=l;if(e.length!==u.length||e.length!==f.length)throw new o.A(Ge,`variable dimensions do not match shape for array "${n}"`);i.set(n,{name:n,isDimension:t,storageInfo:l,spatialReference:r,array:a,attributes:s})}}if(0===i.size)throw new o.A(Ge,"no arrays found");let r=Array.from(i.values()),{xDimension:a,yDimension:n}=function(e){let t=e.filter(e=>e.isDimension),i=t.map(e=>e.name),r=at(t,"x"),a=at(t,"y");if(!r||!a){let t=(e.find(e=>!e.isDimension&&(e.attributes._ARRAY_DIMENSIONS?.length??0)>=2)?.attributes._ARRAY_DIMENSIONS)?.filter(e=>i.includes(e))??i;r??=t.findLast(e=>e!==a),a??=t.findLast(e=>e!==r)}if(!r||!a||r===a)throw new o.A(Ge,`Unable to determine x and y dimensions from variable dimensions "${i.join(", ")}"`);return{xDimension:r,yDimension:a}}(r),s=function(e,t,i){let r=e.filter(e=>{let r=!e.isDimension,a=e.attributes._ARRAY_DIMENSIONS,n=a?.includes(t)&&a.includes(i);return r&&n});if(0===r.length)throw new o.A(Ge,"no valid data variables found");if(r.some(rt))throw new o.A(Ge,"some variable dimensions do not match shape");let a=e.filter(e=>e.isDimension),n=r[0],s=n.attributes._ARRAY_DIMENSIONS,l=n.storageInfo.chunkSize[s.indexOf(t)],u=n.storageInfo.chunkSize[s.indexOf(i)];for(let e of r){let r=e.attributes._ARRAY_DIMENSIONS;if(r.some((t,i)=>{let r=a.find(e=>e.name===t);return r&&r.storageInfo.shape[0]!==e.storageInfo.shape[i]}))throw new o.A(Ge,`Coordinate dimensions do not match shape for "${e.name}"`);let{chunkSize:s}=e.storageInfo;if(s[r.indexOf(t)]!==l||s[r.indexOf(i)]!==u)throw new o.A(Ge,`X/Y chunk sizes must match across variables: compare ${e.name} ${n.name}`)}return r}(r,a,n),l=r.filter(e=>e.isDimension);return{dataDimensions:l,dataVariables:s,spatialReference:s.find(e=>e.spatialReference)?.spatialReference??l.find(e=>e.spatialReference)?.spatialReference,xDimension:a,yDimension:n,version:2}}(a);this._metadata=n;let s=[...n.dataDimensions,...n.dataVariables].find(({storageInfo:{compression:e}})=>!lt.has(e));if(s)throw new o.A(st,`Unsupported Zarr compression "${s.storageInfo.compression}" for array "${s.name}"`);let l={};await Promise.all(n.dataDimensions.map(e=>this._readDimensionValues(e,l,r)));let u=function(e,t){let{dataDimensions:i,dataVariables:r,spatialReference:a}=e,n=r[0],s=n.attributes._ARRAY_DIMENSIONS??[],{xDimension:l,yDimension:u}=e,f=i.find(e=>e.name===l)?.storageInfo.shape[0],h=i.find(e=>e.name===u)?.storageInfo.shape[0];if(!f||!h)throw new o.A(Ge,`Unable to determine width and height from dimensions "${l}" and "${u}"`);let c=t[l],d=t[u];if(c.some((e,t)=>t>0&&e<c[t-1])||d.some((e,t)=>t>0&&e>d[t-1]))throw new o.A(Ge,"Unsupported spatial coordinates order, must be ascending X and descending Y");let[p,m]=et(c),[g,y]=et(d),w=new H.A({xmin:p,ymin:g,xmax:m,ymax:y,spatialReference:a}),x=Math.abs((m-p)/f),v=Math.abs((y-g)/h),b={x,y:v},I=new Map;for(let e of i){let i=e.name;if(i===l||i===u)continue;let r=e.storageInfo.shape[0],a=Qe(i,r,t),{attributes:n}=e;I.set(i,{name:i,description:Ke(n),unit:n.units,values:a,extent:a?[a[0],a.at(-1)]:r>0?[0,r-1]:void 0})}let A=[];for(let e of r){let t=e.attributes._ARRAY_DIMENSIONS.map(e=>I.get(e)).filter(e=>!!e),{attributes:i}=e;A.push({name:e.name,description:Ke(i),unit:i.units??null,dimensions:t})}let S=A.length?{variables:A}:null,{pixelType:C}=n.storageInfo;for(let{storageInfo:e}of r){if("f64"===e.pixelType){C="f64";break}("f32"===e.pixelType||1!==e.scaleFactor||0!==e.addOffset)&&(C="f32")}let _={DataType:S?"Scientific":"Generic"},{chunkSize:R}=n.storageInfo,T=R[s.indexOf(l)],M=R[s.indexOf(u)],O=[{minCol:0,maxCol:Math.ceil(f/T)-1,minRow:0,maxRow:Math.ceil(h/M)-1}],k=new Ce.A({x:p,y,spatialReference:a}),F=(x+v)/2,D=new Te.A({origin:k,size:[T,M],spatialReference:a,lods:[new Ze.A({level:0,resolution:F,scale:1/.0254*96*F})]}),N=new Re.A({blockWidth:T,blockHeight:M,pyramidBlockWidth:T,pyramidBlockHeight:M,compression:n.storageInfo.compression,origin:k,firstPyramidLevel:0,maximumPyramidLevel:0,blockBoundary:O,tileInfo:D,isVirtualTileInfo:!1}),P=n.storageInfo.fillValue,z=new re.A({width:f,height:h,pixelSize:b,pixelType:C,bandCount:1,noDataValue:P,extent:w,spatialReference:a,keyProperties:_,multidimensionalInfo:S,isPseudoSpatialReference:!1,format:"zarr",storageInfo:N});return(0,L.vj)(z),z}(n,l);this._dimensionValues=l,this._set("rasterInfo",u)}_getDimensionIndices(e,t,i,r){let a=e.attributes._ARRAY_DIMENSIONS,{xDimension:n,yDimension:s}=this._metadata,{chunkSize:l}=e.storageInfo;if(!this.rasterInfo.multidimensionalInfo?.variables.find(t=>t.name===e.name)?.dimensions?.length)return null;let o=[];for(let e=0;e<a.length;e++){let u=a[e];if(u===n)o[e]=i*l[e];else if(u===s)o[e]=t*l[e];else{let t=this._dimensionValues[u],i=r[u],a=t?.indexOf(i)??-1;if(a<0)return null;o[e]=a}}return o}async _readDimensionValues(e,t,i){let{name:r,storageInfo:a}=e,n=a.chunkSize[0],s=a.shape[0];if(n<=0||s<=0)throw new o.A(st,`Invalid dimension array "${r}" with chunkSize ${n} and totalElements ${s}`);let l=Math.ceil(s/n),u=this._baseUrl,f=[];for(let e=0;e<l;e++){let t=nt(u,`${r}/${e}`),h=e===l-1?s-e*n:n;f.push(this.request(t,{responseType:"array-buffer",signal:i}).then(async e=>{let t=await this._decodeChunk(e.data,a,{signal:i});if(t.length!==n&&t.length!==h)throw new o.A(st,`Invalid dimension chunk length for "${r}"`);return t.slice(0,h)}).catch(e=>{throw(0,c.zf)(e)?e:new o.A(st,`Unable to fetch dimension data for "${r}"`)}))}let h=(await Promise.all(f)).flatMap(e=>Array.from(e)),{scaleFactor:d,addOffset:p}=a;if(1!==d||0!==p)for(let e=0;e<h.length;e++)h[e]=h[e]*d+p;t[r]="days since 1899-12-30 00:00:00 UTC"===e.attributes.units?h.map(ne.$E):h}async _decodeChunk(e,t,i){let{compression:r}=t;if(!lt.has(r))throw new o.A("zarr-raster:decode",`Unsupported Zarr compression "${r}"`);if("blosc"===r){let r="f2"===t.originalPixelType?2:(0,q.Qd)(t.pixelType),a=t.chunkSize.reduce((e,t)=>e*t,r),n=await this.decodePixelBlock(e,{format:"blosc",pixelType:"u8",skipStatistics:!0,maxUncompressedSize:a},i);if(!n)throw new o.A("zarr-raster:decode","Unable to decode Blosc chunk");e=n.pixels[0].buffer}return function(e,t){let{pixelType:i,originalPixelType:r}=t,a=!t.isBigEndian,n=V.A.getPixelArrayConstructor(i);if(a&&"f2"!==r)return new n(e);let s="f2"===r?2:(0,q.Qd)(i),l=e.byteLength/s,u=new DataView(e),f=new n(l);for(let e=0,t=0;e<l;t+=s,e++)switch(i){case"s8":f[e]=u.getInt8(t);break;case"u8":f[e]=u.getUint8(t);break;case"s16":f[e]=u.getInt16(t,a);break;case"u16":f[e]=u.getUint16(t,a);break;case"s32":f[e]=u.getInt32(t,a);break;case"u32":f[e]=u.getUint32(t,a);break;case"f32":f[e]="f2"===r?u.getFloat16(t,a):u.getFloat32(t,a);break;case"f64":f[e]=u.getFloat64(t,a);break;default:throw new o.A("zarr-raster:decode",`Unsupported coordinate pixel type: ${i}`)}return f}(e,t)}};(0,a.Cg)([(0,n.MZ)()],ot.prototype,"_baseUrl",null),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],ot.prototype,"_dimensionValues",void 0),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],ot.prototype,"_metadata",void 0),(0,a.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],ot.prototype,"datasetFormat",void 0),ot=(0,a.Cg)([(0,n.$K)("esri.layers.raster.datasets.ZarrRaster")],ot);const ut=ot,ft=new Map;ft.set("RasterTileServer",{desc:"Raster Tile Server",constructor:ke}),ft.set("TIFF",{desc:"Cloud Optimized GeoTIFF",constructor:je}),ft.set("MRF",{desc:"Meta Raster Format",constructor:ze}),ft.set("ZARR",{desc:"Zarr Raster Format",constructor:ut}),ft.set("JPG",{desc:"JPG Raster Format",constructor:Ae}),ft.set("PNG",{desc:"PNG Raster Format",constructor:Ae}),ft.set("GIF",{desc:"GIF Raster Format",constructor:Ae}),ft.set("BMP",{desc:"BMP Raster Format",constructor:Ae}),ft.set("CovJSON",{desc:"COVJSON Raster Format",constructor:ue}),ft.set("MEMORY",{desc:"In Memory Raster Format",constructor:le});class ht{static get supportedFormats(){let e=new Set;return ft.forEach((t,i)=>e.add(i)),e}static async open(e){let{url:t,ioConfig:i,source:r,sourceJSON:a}=e,n=e.datasetFormat??i?.datasetFormat;n??(/(?:\.zarr|\/\.(?:zmetadata|zarray|zgroup))$/.test(t)?n="ZARR":t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===r?.type?.toLowerCase()?n="CovJSON":r?.extent&&r.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n||"DM"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");let s={url:t,source:r,sourceJSON:a,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(s).forEach(e=>{s[e]??delete s[e]}),n){if(!this.supportedFormats.has(n))throw new o.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new o.A("rasterfactory:open",`cannot open raster: ${t}`);let i=new(ft.get(n).constructor)(s);return i.rasterJobHandler=e.rasterJobHandler,i.rasterInfo=e.rasterInfo,await i.open({signal:e.signal}),i}let l=Array.from(ft.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e),u=0,f=()=>{if(n=l[u++],!n||"CRF"===n)return null;let t=new(ft.get(n).constructor)(s);return t.rasterJobHandler=e.rasterJobHandler,t.open({signal:e.signal}).then(()=>t).catch(()=>f())};return f()}static register(e,t,i){ft.has(e.toUpperCase())||ft.set(e.toUpperCase(),{desc:t,constructor:i})}}var ct=i(99235),dt=i(10873),pt=i(20437),mt=i(74797),gt=i(22796),yt=i(69409);const wt={instance:null,refCount:0,connectionPromise:null};async function xt(){if(wt.refCount++,wt.instance)return wt.instance;if(!wt.connectionPromise){let e=new yt.A;wt.connectionPromise=e.initialize().then(()=>{wt.instance=e})}return await wt.connectionPromise,wt.instance}function vt(){wt.refCount--,wt.refCount>0||(wt.instance?.destroy(),wt.instance=null,wt.connectionPromise=null,wt.refCount=0)}let bt=class extends((0,R.dM)((0,N.j)((0,M.q)((0,O.A)((0,F.H)((0,T.d)((0,z.b)((0,k.G)((0,P.e)((0,_.b)((0,D.J)((0,h.M)((0,l.OU)(C.A)))))))))))))){constructor(e){super(e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new x(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)(async(e,t,r)=>{let{save:a,saveAs:n}=await i.e(9838).then(()=>i(59838));switch(e){case 0:return a(this,t);case 1:return n(this,r,t)}})}load(e){let t=null==e?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=(0,f.xt)(this._releaseWorkerHandle)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[(0,mt.rZ)("Pixel Value"),(0,mt.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){let t=(0,mt.jC)(i);e.push(...t)}let r=t?.dataType,a=t?.multidimensionalInfo;if(("vector-magdir"===r||"vector-uv"===r)&&null!=a){let t=a.variables[0].unit?.trim(),i=(0,mt.DV)(t),r=(0,mt.y6)();e.push(i,r)}if(a){let t=(0,mt.AL)(a);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){let{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==mt.F_.rawServicePixelValue)),r=(0,I.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:a}=this.raster;return r?.fieldInfos&&a&&(0,mt.h4)(r.fieldInfos,a),r}async generateRasterInfo(e,t){let i=(0,s.PZ)(gt.A,e);if(await this.load(),!i||"none"===i.functionName?.toLowerCase())return this.serviceRasterInfo;try{let{rasterInfo:e}=await this._openFunctionRaster(i,t);return e}catch(e){throw e instanceof o.A?e:new o.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){let e=this._primaryRasters[0]??this.raster,t="RasterTileServer"===e?.datasetFormat,i=!!this.sourceJSON?.exportTilesAllowed,r=this.sourceJSON?.datasetFormat?.toLowerCase(),a=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&"Raster"===e?.tileType&&("cache/jpegplus"===r||"cache/jpegpng"===r);return t&&i&&("Map"===e?.tileType||a)}supportsWrite(){let e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):((0,S.U4)(t,this),null)}async hasDataChanged(){try{let e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:i}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set("serviceRasterInfo",e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),i&&this.read(i,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,L.qg)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{let{url:t,rasterFunction:i,source:r}=this;if(!t&&!r)throw new o.A("imagery-tile-layer:open","missing url or source parameter");r?await this._openFromSource(r,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}let i=this.raster.rasterInfo;if(!i)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){let e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||=this.raster.datasetName,"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,d.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,L.pb)(e),this.url||=this._primaryRasters[0].url}async _openFromUrlWithRasterFunction(e,t,i){let r,a=[e];t&&(0,ct.UD)(t.toJSON(),a),a.some(e=>At(e,this.ioConfig))&&(r=await xt(),this._releaseWorkerHandle={remove:()=>vt()});let n=await Promise.all(a.map(e=>ht.open({url:e,rasterInfo:1===a.length?this.serviceRasterInfo:void 0,sourceJSON:1===a.length?this.sourceJSON:void 0,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:r,signal:i}))),s=n.findIndex(e=>null==e);if(s>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${a[s]}`);return this._primaryRasters=n,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let i;At(e,this.ioConfig)&&(i=await xt(),this._releaseWorkerHandle={remove:()=>vt()});let r=await ht.open({url:e,rasterInfo:this.serviceRasterInfo,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:i,signal:t});if(null==r)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[r],this.raster=r}async _openFromSource(e,t){let i="the tiled imagery data source is not supported",r="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!r)throw new o.A("imagery-tile-layer:open",i);"MEMORY"===r&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});let a=await ht.open({url:"",source:e,datasetFormat:r,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==a)throw new o.A("imagery-tile-layer:open",i);this._primaryRasters=[a],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=a}async _openFunctionRaster(e,t){let i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>i[e.url]=e);let r=(0,ct.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),a=new E.A({rasterFunction:r});return await a.open(t),a}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&u.A.getLogger(this).error("imagery-tile-layer:open",e.message),u.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,b.XF)(u.A.getLogger(this),(0,b.$7)("ImageryTile layers","relative-to-scene",e)),(0,b.XF)(u.A.getLogger(this),(0,b.tW)("ImageryTile layers",e))}};(0,a.Cg)([(0,n.MZ)({clonable:!1})],bt.prototype,"_primaryRasters",void 0),(0,a.Cg)([(0,n.MZ)({clonable:!1})],bt.prototype,"_releaseWorkerHandle",void 0),(0,a.Cg)([(0,n.MZ)({json:{origins:{"web-scene":{write:!1}},write:!0}})],bt.prototype,"charts",void 0),(0,a.Cg)([(0,n.MZ)({type:A.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],bt.prototype,"elevationInfo",null),(0,a.Cg)([(0,n.MZ)({type:Te.A})],bt.prototype,"tileInfo",void 0),(0,a.Cg)([(0,n.MZ)({readOnly:!0,clonable:!1})],bt.prototype,"graphicOrigin",void 0),(0,a.Cg)([(0,n.MZ)(dt.fV)],bt.prototype,"legendEnabled",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],bt.prototype,"isReference",void 0),(0,a.Cg)([(0,n.MZ)({type:["show","hide"]})],bt.prototype,"listMode",void 0),(0,a.Cg)([(0,n.MZ)({json:{read:!0,write:!0}})],bt.prototype,"blendMode",void 0),(0,a.Cg)([(0,n.MZ)({type:gt.A,json:{name:"renderingRule",write:!0}})],bt.prototype,"rasterFunction",void 0),(0,a.Cg)([(0,n.MZ)()],bt.prototype,"sourceJSON",void 0),(0,a.Cg)([(0,n.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],bt.prototype,"version",void 0),(0,a.Cg)([(0,n.MZ)({readOnly:!0,json:{read:!1}})],bt.prototype,"type",void 0),(0,a.Cg)([(0,n.MZ)({type:["ArcGISTiledImageServiceLayer"]})],bt.prototype,"operationalLayerType",void 0),(0,a.Cg)([(0,n.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],bt.prototype,"popupEnabled",void 0),(0,a.Cg)([(0,n.MZ)({type:v.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],bt.prototype,"popupTemplate",void 0),(0,a.Cg)([(0,n.MZ)({readOnly:!0})],bt.prototype,"defaultPopupTemplate",null),(0,a.Cg)([(0,n.MZ)(dt.PY)],bt.prototype,"screenSizePerspectiveEnabled",void 0),(0,a.Cg)([(0,n.MZ)({readOnly:!0,type:[pt.A]})],bt.prototype,"fields",void 0),(0,a.Cg)([(0,n.MZ)({readOnly:!0,type:[pt.A]})],bt.prototype,"rasterFields",null),(0,a.Cg)([(0,n.MZ)({constructOnly:!0})],bt.prototype,"source",void 0),bt=(0,a.Cg)([(0,n.$K)("esri.layers.ImageryTileLayer")],bt);const It=bt;function At(e,t){let{tileGeneration:i}=t??{};return"immediate"===i||/\.(png|gif|bmp)$/i.test(e)}},18768(e,t,i){var r=i(32198),a=i(91429),n=i(53966),s=i(60694);i.d(t,["b",0,e=>{let t=e,i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){let e=(0,s.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,s.Jf)(e,n.A.getLogger(this)))}};return(0,r.Cg)([(0,a.MZ)()],i.prototype,"title",null),(0,r.Cg)([(0,a.MZ)({type:String})],i.prototype,"url",null),i=(0,r.Cg)([(0,a.$K)("esri.layers.mixins.ArcGISService")],i),i}])},56551(e,t,i){i.d(t,{H:()=>h});var r=i(32198),a=i(91429),n=i(56507),s=i(69540),l=i(25482),o=i(94359),u=i(93223);let f=class extends((0,s.OU)(l.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,r.Cg)([(0,a.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,u.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,r.Cg)([(0,a.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,r.Cg)([(0,a.MZ)({type:[n.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,r.Cg)([(0,a.MZ)({types:o.uy,json:{write:!0,origins:{"web-scene":{types:o.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,r.Cg)([(0,a.$K)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{let t=e,i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r.Cg)([(0,a.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,r.Cg)([(0,a.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,r.Cg)([(0,a.$K)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},43163(e,t,i){i.d(t,{A:()=>p});var r,a=i(32198),n=i(91429),s=i(5443),l=i(86738),o=i(10333),u=i(36005),f=i(43937),h=i(93223);function c(e,t,i){let{x:r,y:a}=t;if(i<2)return{x:e[0]+r*e[2]+a*e[4],y:e[1]+r*e[3]+a*e[5]};if(2===i){let t=r*r,i=a*a,n=r*a;return{x:e[0]+r*e[2]+a*e[4]+t*e[6]+n*e[8]+i*e[10],y:e[1]+r*e[3]+a*e[5]+t*e[7]+n*e[9]+i*e[11]}}let n=r*r,s=a*a,l=r*a,o=n*r,u=n*a,f=r*s,h=a*s;return{x:e[0]+r*e[2]+a*e[4]+n*e[6]+l*e[8]+s*e[10]+o*e[12]+u*e[14]+f*e[16]+h*e[18],y:e[1]+r*e[3]+a*e[5]+n*e[7]+l*e[9]+s*e[11]+o*e[13]+u*e[15]+f*e[17]+h*e[19]}}function d(e,t,i){let{xmin:r,ymin:a,xmax:n,ymax:l,spatialReference:o}=t,u=[];if(i<2)u.push({x:r,y:l}),u.push({x:n,y:l}),u.push({x:r,y:a}),u.push({x:n,y:a});else{let e=10;for(let t=0;t<e;t++)u.push({x:r,y:a+(l-a)*t/(e-1)}),u.push({x:n,y:a+(l-a)*t/(e-1)});e=8;for(let t=1;t<=e;t++)u.push({x:r+(n-r)*t/e,y:a}),u.push({x:r+(n-r)*t/e,y:l})}u=u.map(t=>c(e,t,i));let f=u.map(e=>e.x),h=u.map(e=>e.y);return new s.A({xmin:Math.min.apply(null,f),xmax:Math.max.apply(null,f),ymin:Math.min.apply(null,h),ymax:Math.max.apply(null,h),spatialReference:o})}let p=r=class extends o.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){let{coeffX:i,coeffY:r}=t;if(!i?.length||!r?.length||i.length!==r.length)return null;let a=[];for(let e=0;e<i.length;e++)a.push(i[e]),a.push(r[e]);return a}writeForwardCoefficients(e,t,i){let r=[],a=[];for(let t=0;t<e?.length;t++)t%2==0?r.push(e[t]):a.push(e[t]);t.coeffX=r,t.coeffY=a}get inverseCoefficients(){let e=this._get("inverseCoefficients"),t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){let[t,i,r,a,n,s]=e,l=r*s-n*a,o=n*a-r*s;return[(n*i-t*s)/l,(r*i-t*a)/o,s/l,a/o,-n/l,-r/o]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){let{inverseCoeffX:i,inverseCoeffY:r}=t;if(!i?.length||!r?.length||i.length!==r.length)return null;let a=[];for(let e=0;e<i.length;e++)a.push(i[e]),a.push(r[e]);return a}writeInverseCoefficients(e,t,i){let r=[],a=[];for(let t=0;t<e?.length;t++)t%2==0?r.push(e[t]):a.push(e[t]);t.inverseCoeffX=r,t.inverseCoeffY=a}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){let t=c(this.forwardCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){let t=c(this.inverseCoefficients,e,this.polynomialOrder);return new l.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new r({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],p.prototype,"polynomialOrder",void 0),(0,a.Cg)([(0,n.MZ)()],p.prototype,"forwardCoefficients",void 0),(0,a.Cg)([(0,u.w)("forwardCoefficients",["coeffX","coeffY"])],p.prototype,"readForwardCoefficients",null),(0,a.Cg)([(0,f.K)("forwardCoefficients")],p.prototype,"writeForwardCoefficients",null),(0,a.Cg)([(0,n.MZ)({json:{write:!0}})],p.prototype,"inverseCoefficients",null),(0,a.Cg)([(0,u.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],p.prototype,"readInverseCoefficients",null),(0,a.Cg)([(0,f.K)("inverseCoefficients")],p.prototype,"writeInverseCoefficients",null),(0,a.Cg)([(0,n.MZ)()],p.prototype,"affectsPixelSize",null),(0,a.Cg)([(0,h.e)({PolynomialXform:"polynomial"})],p.prototype,"type",void 0),p=r=(0,a.Cg)([(0,n.$K)("esri.layers.raster.transforms.PolynomialTransform")],p)},25943(e,t,i){i.d(t,{d:()=>I});var r,a=i(32198),n=i(56372),s=i(91429),l=i(49186),o=i(36563),u=(i(44208),i(66344)),f=i(15142),h=i(17676),c=i(36708),d=i(76030),p=i(84952),m=i(78888),g=i(72802),y=i(4718),w=i(69397);class x{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);let{location:t,data:i}=e;this.location=Object.freeze((0,y.o8)(t));let r=this.location.width,a=this.location.height,n=!0,s=!0,o=function(e,t=!1){return e<=1024?t?Array(e).fill(0):Array(e):new Uint32Array(e)}(Math.ceil(r*a/32)),u=0;for(let e=0;e<i.length;e++){let t=e%32;i[e]?(s=!1,o[u]|=1<<t):n=!1,31===t&&++u}s?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,w.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;let i=(e-this.location.top)*this.location.width+(t-this.location.left),r=i%32,a=i>>5,n=this._availability;return a<0||a>n.length?"unknown":n[a]&1<<r?"available":"unavailable"}static fromDefinition(e,t){let i=e.service.request||m.A,{row:r,col:a,width:n,height:s}=e,o={query:{f:"json"}};return t=t?{...o,...t}:o,i(function(e){let t;if(e.service.tileServers?.length){let i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;let i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:r,left:a,width:n,height:s},valid:!0,data:Array(n*s).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==r||e.location.left!==a||e.location.width!==n||e.location.height!==s))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:r,left:a,width:n,height:s}});return x.fromJSON(e)})}static fromJSON(e){return Object.freeze(new x(e))}}function v(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function b(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let I=class extends n.A{static{r=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=m.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2097152),this.addHandles((0,c.wB)(()=>{let{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),c.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";let r=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return r?r.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,r){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(b(e,t,i)):this._fetchTilemap(e,t,i,r).catch(e=>e).then(r=>{if(r instanceof x){let a=r.getAvailability(t,i);if("unavailable"===a)throw b(e,t,i);return a}if((0,h.zf)(r))throw r;return"unknown"})}fetchAvailabilityUpsample(e,t,i,r,a){r.level=e,r.row=t,r.col=i;let n=this.layer.tileInfo;n.updateTileInfo(r);let s=this.fetchAvailability(e,t,i,a).catch(e=>{if((0,h.zf)(e))throw e;if(n.upsampleTile(r))return this.fetchAvailabilityUpsample(r.level,r.row,r.col,r,a);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,a,s),s}async _fetchAvailabilityUpsamplePrefetch(e,t,i,a,n){if(!this._prefetchingEnabled)return;let s=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(s))return;let l=new AbortController;n.then(()=>l.abort(),()=>l.abort());let u=!1,f=(0,o.hA)(()=>{u||(u=!0,l.abort())});if(this.addHandles(f,s),await(0,d.md)(10,l.signal).catch(()=>{}),u||(u=!0,this.removeHandles(s)),(0,h.G4)(l))return;let c=new g.U(e,t,i),p={...a,signal:l.signal},m=this.layer.tileInfo;for(let e=0;r._prefetches.length<r._maxPrefetch&&m.upsampleTile(c);++e){let e=this.fetchAvailability(c.level,c.row,c.col,p);r._prefetches.push(e);let t=()=>{r._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new f.A({initialSize:r._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,r){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));let a=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,a);if(n)return Promise.resolve(n);let s=r?.signal;return r={...r,signal:null},new Promise((e,t)=>{(0,h.u7)(s,()=>t((0,h.NK)()));let i=v(a),n=this._pendingTilemapRequests[i];if(!n){n=x.fromDefinition(a,r).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));let e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;let{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,p.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,r){r.level=e,r.row=t-t%this.size,r.col=i-i%this.size;let a=v(r);return this._tilemapCache.get(a)}get test(){}};(0,a.Cg)([(0,s.MZ)({constructOnly:!0})],I.prototype,"layer",void 0),(0,a.Cg)([(0,s.MZ)({constructOnly:!0})],I.prototype,"minLOD",void 0),(0,a.Cg)([(0,s.MZ)({constructOnly:!0})],I.prototype,"maxLOD",void 0),(0,a.Cg)([(0,s.MZ)({constructOnly:!0})],I.prototype,"request",void 0),(0,a.Cg)([(0,s.MZ)({constructOnly:!0})],I.prototype,"size",void 0),I=r=(0,a.Cg)([(0,s.$K)("esri.layers.support.TilemapCache")],I)},82371(e,t,i){i.d(t,{E9:()=>p,Tw:()=>c,X6:()=>d});var r=i(5443),a=i(86738),n=i(16930),s=i(87186),l=i(20223),o=i(78888),u=i(22671),f=i(2272);async function h(e,t,i){let h=(0,f.Dl)(e),{rasterFunction:c,sourceJSON:d}=t||{},p=c?JSON.stringify(c.rasterFunctionDefinition||c):null,m=(0,f.lF)({...h.query,renderingRule:p,f:"json"}),g=(0,f.jV)(m,i);e=h.path;let y=d||await(0,o.A)(e,g).then(e=>e.data),{currentVersion:w}=y,x=y.hasRasterAttributeTable?(0,o.A)(`${e}/rasterAttributeTable`,g):null,v=y.hasColormap?(0,o.A)(`${e}/colormap`,g):null,b=y.hasHistograms?(0,o.A)(`${e}/histograms`,g):null,I=w>=10.3?(0,o.A)(`${e}/keyProperties`,g):null,A=y.hasMultidimensions?(0,o.A)(`${e}/multidimensionalInfo`,g):null,S=(c?w>=10.91:w>=10.81)?(0,o.A)(`${e}/statistics`,g):null,C=await Promise.allSettled([x,v,b,I,A,S]),_=r.A.fromJSON(y.extent),R=Math.ceil(_.width/y.pixelSizeX-.1),T=Math.ceil(_.height/y.pixelSizeY-.1),M=n.A.fromJSON(y.spatialReference||y.extent.spatialReference),O="fulfilled"===C[0].status?C[0].value?.data:null,k=O?.features?.length?u.A.fromJSON(O):null,F="fulfilled"===C[1].status?C[1].value?.data.colormap:null,D=F?.length?F:null,N="fulfilled"===C[2].status?C[2].value?.data.histograms:null,P=N?.[0]?.counts?.length?N:null,z="fulfilled"===C[3].status?C[3].value?.data??{}:{},L="fulfilled"===C[4].status?C[4].value?.data.multidimensionalInfo:null,E=L?.variables?.length?L:null;var B;(B=E)&&B.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"===e.name&&!e.recurring&&!e.unit&&(e.unit="ISO8601")})});let $=function(e,t){let i=null;t&&t.length===e.bandCount&&(i=t.map(e=>{let t=e.covariances?.trim(),i=t?t.split(",").map(Number):void 0;return{avg:e.mean,count:e.count,max:e.max,median:e.median,min:e.min,mode:e.mode,stddev:e.standardDeviation,sum:e.sum,covariances:i}}));let r=e.minValues?.length===e.bandCount?e.minValues.map((t,i)=>({min:t,max:e.maxValues[i],avg:e.meanValues[i],stddev:e.stdvValues[i]})):null;return null==r||null==i||i.some((e,t)=>e.min!==r[t]?.min||e.max!==r[t]?.max||e.avg!==r[t]?.avg||e.stddev!==r[t]?.stddev)?r:i}(y,"fulfilled"===C[5].status?C[5].value?.data.statistics:null),{defaultVariable:J,serviceDataType:U}=y;J&&J!==z.DefaultVariable&&(z.DefaultVariable=J),U?.includes("esriImageServiceDataTypeVector")&&!U.includes(z.DataType)&&(z.DataType=U.replace("esriImageServiceDataType",""));let H=y.noDataValue;y.noDataValues?.length&&y.noDataValues.some(e=>e!==H)&&(H=y.noDataValues);let j=y.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:y.extent.xmin,y:y.extent.ymax,spatialReference:M}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(R,T))/Math.LN2-8)),transposeInfo:y.transposeInfo}):void 0;return new s.A({width:R,height:T,bandCount:y.bandCount,extent:r.A.fromJSON(y.extent),spatialReference:M,pixelSize:new a.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:M}),pixelType:y.pixelType.toLowerCase(),statistics:$,attributeTable:k,colormap:D,histograms:P,keyProperties:z,noDataValue:H,multidimensionalInfo:E,storageInfo:j})}function c(e,t,i){return h(e,{sourceJSON:t},i)}function d(e,t,i){return h(e,{rasterFunction:t},i)}function p(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},2272(e,t,i){i.d(t,{Dl:()=>u,gf:()=>h,jV:()=>o,lF:()=>f});var r=i(92602),a=i(4718),n=i(84952),s=i(70333),l=i(926);function o(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function u(e){return"string"==typeof e?(0,n.An)(e):(0,a.o8)(e)}function f(e,t,i){let r={};for(let a in e){if("declaredClass"===a)continue;let n=e[a];if(null!=n&&"function"!=typeof n)if(Array.isArray(n))r[a]=n.map(e=>f(e));else if("object"==typeof n)if(n.toJSON){let e=n.toJSON(i?.[a]);r[a]=t?e:JSON.stringify(e)}else r[a]=t?n:JSON.stringify(n);else r[a]=n}return r}async function h(e,t,a){return function(e,t){return e?t&&(0,l.Qc)(e)?t:(0,l.getApiKey)(e)??s.id?.findCredential(e)?.token:null}(e,t)||(!s.id&&r.A.request.useIdentity&&await Promise.all([i.e(8673),i.e(37),i.e(4189)]).then(()=>i(98232)),(await s.id.getCredential(e,a))?.token)}},24212(e,t,i){i.d(t,{$7:()=>o,B:()=>l,M7:()=>h,XF:()=>f,tW:()=>u,w7:()=>s});var r=i(56512),a=i(86211),n=i(16271);function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?c:d}(e).mode}(null==e||(e.hasZ??!1),t)}function l(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function o(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function u(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function f(e,t){t&&e.warn(".elevationInfo=",t)}function h(e){return(e?.offset??0)*(0,n.Ao)(e?.unit)}(0,r.B)((e,t,i)=>{if(!e||"decimal-degrees"===t)return 0;let r="unknown"!==t&&t?t:"meters",n=(0,a.mq)(i);return n?(0,a.oU)(e,r,n):0});const c={mode:"absolute-height",offset:0},d={mode:"on-the-ground",offset:null}}}]);
|