@arcgis/core 4.28.2 → 4.28.3
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/02e86a792dbe2fdec974.js +1 -0
- package/assets/esri/core/workers/chunks/{5386b166f2e5dc0d9143.js → 12797aa1d6a2b49abb3f.js} +1 -1
- package/assets/esri/core/workers/chunks/15852a47129b9e0d04c6.js +1 -0
- package/assets/esri/core/workers/chunks/1687431f7b233d950195.js +1 -0
- package/assets/esri/core/workers/chunks/{a1e16c33f1843dbdce26.js → 175bbe8a048f17dd482b.js} +1 -1
- package/assets/esri/core/workers/chunks/{d0119dff8771e749436a.js → 30d3b31df52d40e5b2e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{768271a12dc7e1781447.js → 32fbd4355a4a649623a7.js} +1 -1
- package/assets/esri/core/workers/chunks/3dbc399eedd347b0fbbb.js +1 -0
- package/assets/esri/core/workers/chunks/{6bc1f6f8a2408fa4bb6a.js → 423672fe765083e1a0ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{18e0c5bfeb1aa7213dfa.js → 4363f2cc3909c9258064.js} +1 -1
- package/assets/esri/core/workers/chunks/{d5fec54e98c8622349a4.js → 46ddc52fe9cdd573a614.js} +1 -1
- package/assets/esri/core/workers/chunks/4747741429e8ff7112bb.js +1 -0
- package/assets/esri/core/workers/chunks/49d958631bcd93f6333a.js +1 -0
- package/assets/esri/core/workers/chunks/4ae8308e5b9c7772a11f.js +1 -0
- package/assets/esri/core/workers/chunks/{da124ccd18d2745195fe.js → 4bd342f13002888b6467.js} +1 -1
- package/assets/esri/core/workers/chunks/{7756ed853b4ba54cd081.js → 5247c00088303da7ef3b.js} +1 -1
- package/assets/esri/core/workers/chunks/534726130ef1698ec89e.js +1 -0
- package/assets/esri/core/workers/chunks/551bc697e3e17983c2bc.js +1 -0
- package/assets/esri/core/workers/chunks/{65d8135c89ffdd17a3c1.js → 59d3f4c0d1a43180aff3.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d92df1e3ba4f05e0510.js → 633b34a5817f1f719e22.js} +1 -1
- package/assets/esri/core/workers/chunks/{c7bd63103f101c09b1ea.js → 6996537249869c41e736.js} +1 -1
- package/assets/esri/core/workers/chunks/{41778f8c49febe1f9404.js → 6fa0cccd4f3e1fa71421.js} +1 -1
- package/assets/esri/core/workers/chunks/{78e49a70193e5adea17c.js → 77f557359a5033d7e429.js} +1 -1
- package/assets/esri/core/workers/chunks/{6334a8a7b671d4042108.js → 7beae29abdfae23b15cc.js} +1 -1
- package/assets/esri/core/workers/chunks/7cc56b132c46c5922dac.js +1 -0
- package/assets/esri/core/workers/chunks/80831e90fe1a52f8f982.js +1 -0
- package/assets/esri/core/workers/chunks/{ea9ae9d2aef01af90896.js → 80d9bb9f247ecdfa266f.js} +1 -1
- package/assets/esri/core/workers/chunks/846e5e51dc278bc3f80f.js +1 -0
- package/assets/esri/core/workers/chunks/{f73563b23fd8dc6cf2fe.js → 86df7357a2bac73c0ef4.js} +1 -1
- package/assets/esri/core/workers/chunks/8b541cbf82a5ba0317ee.js +1 -0
- package/assets/esri/core/workers/chunks/{08a98e85e86ce560d005.js → 8bd621693692050d76aa.js} +1 -1
- package/assets/esri/core/workers/chunks/{630b31a205d9db7147d0.js → 8cdece03397d01767593.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9a726f3bbad6fd4d65a.js → 8e91be2e38010391e351.js} +1 -1
- package/assets/esri/core/workers/chunks/{cbddfcf57f72428a6992.js → 90f96a2ddfb25d851d4d.js} +1 -1
- package/assets/esri/core/workers/chunks/91a3181071874525ed44.js +1 -0
- package/assets/esri/core/workers/chunks/{2304b7456ced997904f6.js → 97fd7b82eec26449977e.js} +1 -1
- package/assets/esri/core/workers/chunks/{b7c81a5bbcdd94b8a7f6.js → 9979ff59a144fe1df80b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0422c5160491fbcf01dc.js → 9d97a20f69047d0c47cc.js} +1 -1
- package/assets/esri/core/workers/chunks/9f0e8dd5c9bacfc0f03c.js +1 -0
- package/assets/esri/core/workers/chunks/{a8e4726c1db23324eb54.js → 9fc1206ad378f0829e0a.js} +1 -1
- package/assets/esri/core/workers/chunks/{09e8babe75407c2e64c4.js → a351ab5082772b267895.js} +1 -1
- package/assets/esri/core/workers/chunks/{43575b9acf9819f195f9.js → a3bbf5da4f7830d2a2a1.js} +1 -1
- package/assets/esri/core/workers/chunks/{b03eaba5fa75d6ef834a.js → a47f74fc959b11f029a5.js} +1 -1
- package/assets/esri/core/workers/chunks/{cb4b17f5cf96a9e36781.js → a8cf23c3a55c1834178c.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd55151bfac60b0deaac.js → ac4636e82a103e2c27ca.js} +1 -1
- package/assets/esri/core/workers/chunks/ae7ba94af6d4fd97dd8b.js +1 -0
- package/assets/esri/core/workers/chunks/{4adf3a8c6b49c381a633.js → b0653f63745e756f55fe.js} +1 -1
- package/assets/esri/core/workers/chunks/{e06cd10b6f8f363b5131.js → bdc751a752a7ff1387de.js} +1 -1
- package/assets/esri/core/workers/chunks/{70aa04b09143b7dd2ecb.js → c2199fb8f7a54a0ef18a.js} +1 -1
- package/assets/esri/core/workers/chunks/c3f462d11ed570482e7a.js +1 -0
- package/assets/esri/core/workers/chunks/{830d99e6c58a52a58973.js → c8cb5fe1d23145c4842b.js} +1 -1
- package/assets/esri/core/workers/chunks/{1f87f22e00e3218661c6.js → ce53413dd3e2062e8378.js} +1 -1
- package/assets/esri/core/workers/chunks/de30ff1fcb6079178958.js +1 -0
- package/assets/esri/core/workers/chunks/e12090768e945091cc5d.js +1 -0
- package/assets/esri/core/workers/chunks/e3950975030412ff6e20.js +1 -0
- package/assets/esri/core/workers/chunks/e8b7d1c586aff229484c.js +1 -0
- package/assets/esri/core/workers/chunks/{710a6268de62003af825.js → e8d1f91dc97b42d0c4f6.js} +1 -1
- package/assets/esri/core/workers/chunks/{6747503826bfc94bc6c0.js → eb5213ffb83d83a4dd05.js} +1 -1
- package/assets/esri/core/workers/chunks/{020825b9c12f2b6386a7.js → f037e4f9877ea08ced9d.js} +1 -1
- package/assets/esri/core/workers/chunks/{abcfe3bda6f40318b092.js → f7ccc6c681fc9218555c.js} +1 -1
- package/assets/esri/core/workers/chunks/{eea0fb90cd5cc80de388.js → fa750885bb27bbb03e7d.js} +1 -1
- package/assets/esri/core/workers/chunks/{e67c4b7ad06d8404895a.js → fab4ee57b7c5376c9ccd.js} +1 -1
- package/interfaces.d.ts +4 -4
- package/kernel.js +1 -1
- package/layers/StreamLayer.js +1 -1
- package/layers/support/RangeDomain.js +1 -1
- package/layers/support/domainUtils.js +1 -1
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/labelFormatUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/widgets/FeatureForm/FieldInput.js +1 -1
- package/widgets/FeatureForm/featureFormUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/support/dataUtils.js +5 -0
- package/widgets/support/dateUtils.js +1 -1
- package/assets/esri/core/workers/chunks/02d235849ba93541d7ad.js +0 -1
- package/assets/esri/core/workers/chunks/0a3da4b73beeaacd4667.js +0 -1
- package/assets/esri/core/workers/chunks/10dc578a90e1194c8720.js +0 -1
- package/assets/esri/core/workers/chunks/1eb5468c7cf653338d53.js +0 -1
- package/assets/esri/core/workers/chunks/1f30ea1a598ddd2e5df3.js +0 -1
- package/assets/esri/core/workers/chunks/366cf9bba6989342e447.js +0 -1
- package/assets/esri/core/workers/chunks/43f7d9366d06d69e7c50.js +0 -1
- package/assets/esri/core/workers/chunks/4672504d6fe649da19f2.js +0 -1
- package/assets/esri/core/workers/chunks/56a61a8bff08ae273de4.js +0 -1
- package/assets/esri/core/workers/chunks/580e7d3cbf6797a50ded.js +0 -1
- package/assets/esri/core/workers/chunks/6046be598e8c673eeb1f.js +0 -1
- package/assets/esri/core/workers/chunks/69c1c850af7ee33258e0.js +0 -1
- package/assets/esri/core/workers/chunks/8f7997e8e6ee9e56239f.js +0 -1
- package/assets/esri/core/workers/chunks/a160576f21ada91995ac.js +0 -1
- package/assets/esri/core/workers/chunks/a50ec5b647a160199cb2.js +0 -1
- package/assets/esri/core/workers/chunks/b138196d304883efd5f6.js +0 -1
- package/assets/esri/core/workers/chunks/b3f5e97b47e896c6008a.js +0 -1
- package/assets/esri/core/workers/chunks/c447f4bf0e5f012f8f9b.js +0 -1
- package/assets/esri/core/workers/chunks/c87e9280681c20d042b5.js +0 -1
- package/assets/esri/core/workers/chunks/cc86c8c88124d916e1b3.js +0 -1
- package/assets/esri/core/workers/chunks/d878bb6409df183ea0ce.js +0 -1
- package/assets/esri/core/workers/chunks/ef757269fb3fe0e74ef8.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3597],{90578:(e,t,r)=>{r.d(t,{p:()=>l});var n=r(75215),s=r(7628);const i=Object.prototype.toString;function o(e){const t="__accessorMetadata__"in e?(0,n.se)(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,e)}}function a(e,t,r,n){(0,s.Oe)(e,t).cast=n}function l(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===i.call(e[0])?o(e[0]):1===e.length&&"string"==typeof e[0]?function(e){return(t,r)=>{(0,s.Oe)(t,e).cast=t[r]}}(e[0]):void 0}},71715:(e,t,r)=>{r.d(t,{r:()=>s});var n=r(5600);function s(e,t,r){let s,i;return void 0===t||Array.isArray(t)?(i=e,r=t,s=[void 0]):(i=t,s=Array.isArray(e)?e:[e]),(e,t)=>{const o=e.constructor.prototype;s.forEach((s=>{const a=(0,n.CJ)(e,s,i);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=o[t],r&&(a.read.source=(a.read.source||[]).concat(r))}))}}},74085:(e,t,r)=>{function n(e){}r.d(t,{Bg:()=>n}),r(80442)},45091:(e,t,r)=>{r.d(t,{Z:()=>c});var n,s,i=r(80442),o=r(71143);(s=n||(n={}))[s.varint=0]="varint",s[s.fixed64=1]="fixed64",s[s.delimited=2]="delimited",s[s.fixed32=5]="fixed32",s[s.unknown=99]="unknown";const a=4294967296,l=new TextDecoder("utf-8"),u=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class c{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,s)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const 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;const 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;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const 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,n){const s=this.getMessage(),i=e(s,t,r,n);return s.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*s}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,n=0;const s=1&e[this._pos];if(n=e[this._pos++],r|=127&n,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<7,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<14,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<21,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=268435456*(127&n),0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=34359738368*(127&n),0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=4398046511104*(127&n),0==(128&n))return s?-(r+1)/2:r/2;if(t=BigInt(r),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),0==(128&n))return Number(s?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),0==(128&n))return Number(s?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),0==(128&n))return Number(s?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==n.delimited)throw new 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){const n=e.subarray(t,r);return l.decode(n)}let n="",s="";for(let i=t;i<r;++i){const t=e[i];128&t?s+="%"+t.toString(16):(n+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(n+=decodeURIComponent(s)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}c.pool=new o.Z(c,void 0,(e=>{e._data=null,e._dataView=null}))},9361:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),s=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),l=r(82971);let u=class extends s.wq{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=l.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof l.Z)return e;if(null!=e){const r=new l.Z;return r.read(e,t),r}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};(0,n._)([(0,i.Cb)()],u.prototype,"type",void 0),(0,n._)([(0,i.Cb)({readOnly:!0})],u.prototype,"cache",null),(0,n._)([(0,i.Cb)({readOnly:!0})],u.prototype,"extent",null),(0,n._)([(0,i.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasM",void 0),(0,n._)([(0,i.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasZ",void 0),(0,n._)([(0,i.Cb)({type:l.Z,json:{write:!0},value:l.Z.WGS84})],u.prototype,"spatialReference",void 0),(0,n._)([(0,o.r)("spatialReference")],u.prototype,"readSpatialReference",null),u=(0,n._)([(0,a.j)("esri.geometry.Geometry")],u);const c=u},94139:(e,t,r)=>{r.d(t,{Z:()=>b});var n,s=r(43697),i=r(92604),o=r(5600),a=r(90578),l=(r(67676),r(80442),r(71715)),u=r(52011),c=r(30556),h=r(75215),d=r(9361),p=r(82971),f=r(8744),y=r(40488);const g=[0,0];function m(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let _=n=class extends d.Z{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const r=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(r)?r:r.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,r,n,s){let o;if(Array.isArray(e))o=e,s=t,e=o[0],t=o[1],r=o[2],n=o[3];else if(e&&"object"==typeof e){if(o=e,e=null!=o.x?o.x:o.longitude,t=null!=o.y?o.y:o.latitude,r=o.z,n=o.m,(s=o.spatialReference)&&"esri.geometry.SpatialReference"!==s.declaredClass&&(s=new p.Z(s)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)i.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)i.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&s&&s.isWebMercator){const r=(0,y.hG)(o.longitude,o.latitude,g);e=r[0],t=r[1]}}else m(r)?(s=r,r=null):m(n)&&(s=n,n=null);const a={x:e,y:t};return null==a.x&&null!=a.y?i.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&i.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=s&&(a.spatialReference=s),null!=r&&(a.z=r),null!=n&&(a.m=n),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:r}=this;if(e){if(e.isWebMercator)return(0,y.R6)(t,r,g)[1];if(e.isGeographic)return r}return null}set latitude(e){const{spatialReference:t,x:r}=this;null!=e&&t&&(t.isWebMercator?this._set("y",(0,y.hG)(r,e,g)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:r}=this;if(r){if(r.isWebMercator)return(0,y.R6)(e,t,g)[0];if(r.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:r}=this;null!=e&&r&&(r.isWebMercator?this._set("x",(0,y.hG)(e,t,g)[0]):r.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,r){t[r]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new n;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return n.copy(e,this),this}equals(e){if(null==e)return!1;const{x:t,y:r,z:n,m:s,spatialReference:i}=this,{z:o,m:a}=e;let{x:l,y:u,spatialReference:c}=e;if(!i.equals(c))if(i.isWebMercator&&c.isWGS84)[l,u]=(0,y.hG)(l,u),c=i;else{if(!i.isWGS84||!c.isWebMercator)return!1;[l,u]=(0,y.R6)(l,u),c=i}return t===l&&r===u&&n===o&&s===a&&i.wkid===c.wkid}offset(e,t,r){return this.x+=e,this.y+=t,null!=r&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const e=(0,f.C5)(this.spatialReference);if(!e)return this;let t=this.x;const[r,n]=e.valid,s=2*n;let i;return t>n?(i=Math.ceil(Math.abs(t-n)/s),t-=i*s):t<r&&(i=Math.ceil(Math.abs(t-r)/s),t+=i*s),this._set("x",t),this}distance(e){return function(e,t){const r=e.x-t.x,n=e.y-t.y,s=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(r*r+n*n+s*s)}(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};(0,s._)([(0,o.Cb)({readOnly:!0})],_.prototype,"cache",null),(0,s._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasM",null),(0,s._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasZ",null),(0,s._)([(0,o.Cb)({type:Number})],_.prototype,"latitude",null),(0,s._)([(0,o.Cb)({type:Number})],_.prototype,"longitude",null),(0,s._)([(0,o.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,a.p)((e=>isNaN(e)?e:(0,h.q9)(e)))],_.prototype,"x",void 0),(0,s._)([(0,c.c)("x")],_.prototype,"writeX",null),(0,s._)([(0,l.r)("x")],_.prototype,"readX",null),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],_.prototype,"y",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],_.prototype,"z",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],_.prototype,"m",void 0),_=n=(0,s._)([(0,u.j)("esri.geometry.Point")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_},62155:(e,t,r)=>{var n;r.d(t,{R:()=>n}),function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(n||(n={}))},60437:(e,t,r)=>{r.d(t,{G_:()=>_,HH:()=>o,JR:()=>f,TC:()=>a,Tn:()=>h,Ue:()=>s,al:()=>i,bZ:()=>y,cS:()=>p,dp:()=>u,fS:()=>m,is:()=>g,op:()=>c,pp:()=>l,t8:()=>d});var n=r(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,r,n,i,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function h(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function p(e){return e?d(e,_):s(_)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function m(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},33955:(e,t,r)=>{r.d(t,{Ji:()=>y,YX:()=>u,aW:()=>c,im:()=>f,l9:()=>d,oU:()=>p,q9:()=>m,wp:()=>h});var n=r(6570),s=r(9361),i=r(65091),o=r(94139),a=r(38913),l=r(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function h(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function p(e){return void 0!==e.rings}function f(e){return null==e?null:e instanceof s.Z?e:h(e)?o.Z.fromJSON(e):d(e)?l.Z.fromJSON(e):p(e)?a.Z.fromJSON(e):c(e)?i.Z.fromJSON(e):u(e)?n.Z.fromJSON(e):null}function y(e){return e?h(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":p(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:o.Z,esriGeometryPolyline:l.Z,esriGeometryPolygon:a.Z,esriGeometryEnvelope:n.Z,esriGeometryMultipoint:i.Z};function m(e){return e&&g[e]||null}},82397:(e,t,r)=>{r.d(t,{G6:()=>y,Ie:()=>f,J9:()=>d,RF:()=>h,U1:()=>p,vY:()=>o}),r(33955);const n=(e,t,r)=>[t,r],s=(e,t,r)=>[t,r,e[2]],i=(e,t,r)=>[t,r,e[2],e[3]];function o(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function a({scale:e,translate:t},r){return r*e[0]+t[0]}function l({scale:e,translate:t},r){return t[1]-r*e[1]}function u(e,t,r){const n=new Array(r.length);if(!r.length)return n;const[s,i]=e.scale;let o=a(e,r[0][0]),u=l(e,r[0][1]);n[0]=t(r[0],o,u);for(let e=1;e<r.length;e++){const a=r[e];o+=a[0]*s,u-=a[1]*i,n[e]=t(a,o,u)}return n}function c(e,t,r){const n=new Array(r.length);for(let s=0;s<r.length;s++)n[s]=u(e,t,r[s]);return n}function h(e,t,r,n,s){return t.x=function({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}(e,r.x),t.y=function({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}(e,r.y),t!==r&&(n&&(t.z=r.z),s&&(t.m=r.m)),t}function d(e,t,r,o,a){return null!=r&&(t.points=function(e,t,r,o){return u(e,r?o?i:s:o?s:n,t)}(e,r.points,o,a)),t}function p(e,t,r,n,s){return null==r||(t.x=a(e,r.x),t.y=l(e,r.y),t!==r&&(n&&(t.z=r.z),s&&(t.m=r.m))),t}function f(e,t,r,o,a){return null!=r&&(t.rings=function(e,t,r,o){return c(e,r?o?i:s:o?s:n,t)}(e,r.rings,o,a)),t}function y(e,t,r,o,a){return null!=r&&(t.paths=function(e,t,r,o){return c(e,r?o?i:s:o?s:n,t)}(e,r.paths,o,a)),t}},86973:(e,t,r)=>{r.d(t,{M:()=>s,P:()=>i});var n=r(35454);const s=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),i=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},40488:(e,t,r)=>{r.d(t,{$:()=>b,Q8:()=>y,R6:()=>_,Sx:()=>w,hG:()=>m,iV:()=>g,mZ:()=>h});var n=r(22974),s=r(82971),i=r(68441),o=r(8744);const a=57.29577951308232,l=.017453292519943;function u(e){return e*a}function c(e){return e*l}function h(e){return Math.PI/2-2*Math.atan(Math.exp(-e/i.sv.radius))}function d(e){return null!=e.wkid||null!=e.wkt}const p=[0,0];function f(e,t,r,n,s){const i=e,o=s;if(o.spatialReference=r,"x"in i&&"x"in o)[o.x,o.y]=t(i.x,i.y,p,n);else if("xmin"in i&&"xmin"in o)[o.xmin,o.ymin]=t(i.xmin,i.ymin,p,n),[o.xmax,o.ymax]=t(i.xmax,i.ymax,p,n);else if("paths"in i&&"paths"in o||"rings"in i&&"rings"in o){const e="paths"in i?i.paths:i.rings,r=[];let s;for(let i=0;i<e.length;i++){const o=e[i];s=[],r.push(s);for(let e=0;e<o.length;e++)s.push(t(o[e][0],o[e][1],[0,0],n)),o[e].length>2&&s[e].push(o[e][2]),o[e].length>3&&s[e].push(o[e][3])}"paths"in o?o.paths=r:o.rings=r}else if("points"in i&&"points"in o){const e=i.points,r=[];for(let s=0;s<e.length;s++)r[s]=t(e[s][0],e[s][1],[0,0],n),e[s].length>2&&r[s].push(e[s][2]),e[s].length>3&&r[s].push(e[s][3]);o.points=r}return s}function y(e,t){const r=e&&(d(e)?e:e.spatialReference),n=t&&(d(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!r||!n)&&(!!(0,o.fS)(n,r)||(0,o.sS)(n)&&(0,o.oR)(r)||(0,o.sS)(r)&&(0,o.oR)(n))}function g(e,t){if(null==e)return null;const r=e.spatialReference,i=t&&(d(t)?t:t.spatialReference);return y(r,i)?(0,o.fS)(r,i)?(0,n.d9)(e):(0,o.sS)(i)?f(e,m,s.Z.WebMercator,!1,(0,n.d9)(e)):(0,o.oR)(i)?f(e,_,s.Z.WGS84,!1,(0,n.d9)(e)):null:null}function m(e,t,r=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const n=c(t);return r[0]=c(e)*i.sv.radius,r[1]=i.sv.halfSemiMajorAxis*Math.log((1+Math.sin(n))/(1-Math.sin(n))),r}function _(e,t,r=[0,0],n=!1){const s=u(e/i.sv.radius);return r[0]=n?s:s-360*Math.floor((s+180)/360),r[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/i.sv.radius))),r}function b(e,t=!1,r=(0,n.d9)(e)){return f(e,m,s.Z.WebMercator,t,r)}function w(e,t=!1,r=(0,n.d9)(e)){return f(e,_,s.Z.WGS84,t,r)}},69285:(e,t,r)=>{r.d(t,{k:()=>o});var n=r(67900),s=r(2109),i=r(8744);function o(e,t,r){if(null==t||null==r||r.vcsWkid||(0,i.fS)(t,r)||(0,s.oe)(t)||(0,s.oe)(r))return null;const o=(0,n._R)(t)/(0,n._R)(r);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},70272:(e,t,r)=>{r.d(t,{S6:()=>s,nd:()=>i,u_:()=>n});class n{constructor(e=null,t={},r,n){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function s(e){return!!e.geometry?.coords?.length}class i extends n{}},44876:(e,t,r)=>{r.d(t,{Z:()=>n});class n{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},5428:(e,t,r)=>{r.d(t,{Z:()=>n});class n{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,s,i]=e,o=s-t,a=i-r;return new n([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const n=this.lengths[r];for(let r=0;r<n;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=n}}clone(e){return e?(e.set(this.coords),new n(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new n(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},98732:(e,t,r)=>{r.d(t,{$:()=>re,$g:()=>ne,EI:()=>B,GH:()=>E,IN:()=>x,Iv:()=>C,J6:()=>q,Jd:()=>w,Nh:()=>H,RZ:()=>Q,Uy:()=>L,XA:()=>O,Yn:()=>A,cn:()=>Y,dd:()=>S,di:()=>W,eG:()=>U,fQ:()=>T,hY:()=>se,h_:()=>X,lM:()=>$,lz:()=>oe,zj:()=>K});var n=r(20102),s=r(92604),i=r(70586),o=r(60437),a=r(24470),l=r(33955),u=r(70272),c=r(44876),h=r(5428);function d(e,t){return e?t?4:3:t?3:2}const p=s.Z.getLogger("esri.layers.graphics.featureConversionUtils"),f={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},y=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i},g=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i,e[r+2]=t[n+2]},m=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i,e[r+2]=t[n+3]},_=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i,e[r+2]=t[n+2],e[r+3]=t[n+3]};function b(e,t,r,n){if(e){if(r)return t&&n?_:g;if(t&&n)return m}else if(t&&n)return g;return y}function w({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function x({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function v({scale:e,translate:t},r,n){return r*e[n]+t[n]}function T(e,t,r){return e?t?r?P(e):M(e):r?F(e):k(e):null}function k(e){const t=e.coords;return{x:t[0],y:t[1]}}function I(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function M(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function G(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function F(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function Z(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function P(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function N(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function R(e,t){return e&&t?N:e?G:t?Z:I}function S(e,t,r=R(null!=t.z,null!=t.m)){return r(e,t)}function C(e,t,r){if(null==e)return null;const n=d(t,r),s=[];for(let t=0;t<e.coords.length;t+=n){const r=[];for(let s=0;s<n;s++)r.push(e.coords[t+s]);s.push(r)}return t?r?{points:s,hasZ:t,hasM:r}:{points:s,hasZ:t}:r?{points:s,hasM:r}:{points:s}}function V(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const n=e.coords;let s=0;for(const e of t.points)for(let t=0;t<r;t++)n[s++]=e[t];return e}function q(e,t,r){if(!e)return null;const n=d(t,r),{coords:s,lengths:i}=e,o=[];let a=0;for(const e of i){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(s[a++]);t.push(e)}o.push(t)}return t?r?{paths:o,hasZ:t,hasM:r}:{paths:o,hasZ:t}:r?{paths:o,hasM:r}:{paths:o}}function j(e,t,r=d(t.hasZ,t.hasM)){const{lengths:n,coords:s}=e;let i=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)s[i++]=t[e];n.push(e.length)}return e}function U(e,t,r){if(!e)return null;const n=d(t,r),{coords:s,lengths:i}=e,o=[];let a=0;for(const e of i){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(s[a++]);t.push(e)}o.push(t)}return t?r?{rings:o,hasZ:t,hasM:r}:{rings:o,hasZ:t}:r?{rings:o,hasM:r}:{rings:o}}function L(e,t,r=t.hasZ,n=t.hasM){return function(e,t,r,n){const s=d(r,n),{lengths:i,coords:o}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<s;e++)o[a++]=t[e];i.push(e.length)}return e}(e,t.rings,r,n)}const z=[],D=[];function O(e,t,r,n,s){z[0]=e;const[i]=A(D,z,t,r,n,s);return le(z),le(D),i}function A(e,t,r,s,i,o){if(le(e),!r){for(const r of t){const t=o?r.attributes[o]:void 0;e.push(new u.u_(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,n,s){const i=R(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?i(new h.Z,r):null;e.push(new u.u_(t,n,null,s?n[s]:void 0))}return e}(e,t,s,i,o);case"esriGeometryMultipoint":return function(e,t,r,n,s){const i=d(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?V(new h.Z,r,i):null;e.push(new u.u_(t,n,null,s?n[s]:void 0))}return e}(e,t,s,i,o);case"esriGeometryPolyline":return function(e,t,r,n,s){const i=d(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?j(new h.Z,r,i):null;e.push(new u.u_(t,n,null,s?n[s]:void 0))}return e}(e,t,s,i,o);case"esriGeometryPolygon":return function(e,t,r,n,s){for(const{geometry:i,centroid:o,attributes:a}of t){const t=null!=i?L(new h.Z,i,r,n):null,l=s?a[s]:void 0;null!=o?e.push(new u.u_(t,a,I(new h.Z,o),l)):e.push(new u.u_(t,a,null,l))}return e}(e,t,s,i,o);default:p.error("convertToFeatureSet:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function B(e,t,r,n){D[0]=e,J(z,D,t,r,n);const s=z[0];return le(z),le(D),s}function E(e,t,r){if(null==e)return null;const s=new h.Z;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.wp)(e)?R(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(s,e):(0,l.oU)(e)?L(s,e,t,r):(0,l.l9)(e)?j(s,e,d(t,r)):(0,l.aW)(e)?V(s,e,d(t,r)):void p.error("convertFromGeometry:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${e}'`))}function W(e,t,r,s){const i=e&&("coords"in e?e:e.geometry);if(null==i)return null;switch(t){case"esriGeometryPoint":{let e=k;return r&&s?e=P:r?e=M:s&&(e=F),e(i)}case"esriGeometryMultipoint":return C(i,r,s);case"esriGeometryPolyline":return q(i,r,s);case"esriGeometryPolygon":return U(i,r,s);default:return p.error("convertToGeometry:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${t}'`)),null}}function J(e,t,r,s,i){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,n){let s=k;r&&n?s=P:r?s=M:n&&(s=F);for(const r of t){const{geometry:t,attributes:n}=r,i=null!=t?s(t):null;e.push({attributes:n,geometry:i})}return e}(e,t,s,i);case"esriGeometryMultipoint":return function(e,t,r,n){for(const{geometry:s,attributes:i}of t)e.push({attributes:i,geometry:null!=s?C(s,r,n):null});return e}(e,t,s,i);case"esriGeometryPolyline":return function(e,t,r,n){for(const{geometry:s,attributes:i}of t)e.push({attributes:i,geometry:null!=s?q(s,r,n):null});return e}(e,t,s,i);case"esriGeometryPolygon":return function(e,t,r,n){for(const{geometry:s,attributes:i,centroid:o}of t){const t=null!=s?U(s,r,n):null;if(null!=o){const r=k(o);e.push({attributes:i,centroid:r,geometry:t})}else e.push({attributes:i,geometry:t})}return e}(e,t,s,i);default:p.error("convertToFeatureSet:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${r}'`))}return e}function Y(e){const{objectIdFieldName:t,spatialReference:r,transform:n,fields:s,hasM:i,hasZ:o,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:c,queryGeometry:h,queryGeometryType:d}=e,p={features:J([],a,l,o,i),fields:s,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:c,queryGeometry:W(h,d,!1,!1)};return n&&(p.transform=n),u&&(p.exceededTransferLimit=u),i&&(p.hasM=i),o&&(p.hasZ=o),p}function X(e,t){const r=new c.Z,{hasM:s,hasZ:i,features:o,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:h,transform:d,fields:f}=e;return f&&(r.fields=f),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(o&&A(r.features,o,u,i,s,r.objectIdFieldName),h&&(r.exceededTransferLimit=h),s&&(r.hasM=s),i&&(r.hasZ=i),d&&(r.transform=d),r):(p.error(new n.Z("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function $(e){const{transform:t,features:r,hasM:n,hasZ:s}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ne(e.geometry,e.geometry,n,s,t),null!=e.centroid&&ne(e.centroid,e.centroid,n,s,t);return e.transform=null,e}function Q(e,t){const{geometryType:r,features:n,hasM:s,hasZ:i}=t;if(!e)return t;for(let t=0;t<n.length;t++){const o=n[t],a=o.weakClone();a.geometry=new h.Z,H(a.geometry,o.geometry,s,i,r,e),o.centroid&&(a.centroid=new h.Z,H(a.centroid,o.centroid,s,i,"esriGeometryPoint",e)),n[t]=a}return t.transform=e,t}function H(e,t,r,n,s,i,o=r,a=n){if(ae(e),!t?.coords.length)return null;const l=f[s],{coords:u,lengths:c}=t,h=d(r,n),p=d(r&&o,n&&a),y=b(r,n,o,a);if(!c.length)return y(e.coords,u,0,0,w(i,u[0]),x(i,u[1])),ae(e,h,0),e;let g,m,_,v,T=0,k=0,I=k;for(const t of c){if(t<l)continue;let r=0;k=I,_=g=w(i,u[T]),v=m=x(i,u[T+1]),y(e.coords,u,k,T,_,v),r++,T+=h,k+=p;for(let n=1;n<t;n++,T+=h)_=w(i,u[T]),v=x(i,u[T+1]),_===g&&v===m||(y(e.coords,u,k,T,_-g,v-m),k+=p,r++,g=_,m=v);r>=l&&(e.lengths.push(r),I=k)}return le(e.coords,I),e.coords.length?e:null}function K(e,t,r,n,s,i,o=r,a=n){if(ae(e),!t?.coords.length)return null;const l=f[s],{coords:u,lengths:c}=t,h=d(r,n),p=d(r&&o,n&&a),y=b(r,n,o,a);if(!c.length)return y(e.coords,u,0,0,u[0],u[1]),ae(e,h,0),e;let g=0;const m=i*i;for(const t of c){if(t<l){g+=t*h;continue}const r=e.coords.length/p,n=g,s=g+(t-1)*h;y(e.coords,u,e.coords.length,n,u[n],u[n+1]),te(e.coords,u,h,m,y,n,s),y(e.coords,u,e.coords.length,s,u[s],u[s+1]);const i=e.coords.length/p-r;i>=l?e.lengths.push(i):le(e.coords,r*p),g+=t*h}return e.coords.length?e:null}function ee(e,t,r,n){const s=e[t],i=e[t+1],o=e[r],a=e[r+1],l=e[n],u=e[n+1];let c=o,h=a,d=l-c,p=u-h;if(0!==d||0!==p){const e=((s-c)*d+(i-h)*p)/(d*d+p*p);e>1?(c=l,h=u):e>0&&(c+=d*e,h+=p*e)}return d=s-c,p=i-h,d*d+p*p}function te(e,t,r,n,s,i,o){let a,l=n,u=0;for(let e=i+r;e<o;e+=r)a=ee(t,e,i,o),a>l&&(u=e,l=a);l>n&&(u-i>r&&te(e,t,r,n,s,i,u),s(e,t,e.length,u,t[u],t[u+1]),o-u>r&&te(e,t,r,n,s,u,o))}function re(e,t,r,n){if(!t?.coords?.length)return null;const s=d(r,n);let i=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=s){const r=e[t],n=e[t+1];i=Math.min(i,r),u=Math.max(u,r),l=Math.min(l,n),c=Math.max(c,n)}}return(0,o.is)(e)?(0,o.bZ)(e,i,l,u,c):(0,a.al)(i,l,u,c,e),e}function ne(e,t,r,n,s){const{coords:o,lengths:a}=t,l=d(r,n);if(!o.length)return e!==t&&ae(e),e;(0,i.O3)(s);const{originPosition:u,scale:c,translate:h}=s,p=ue;p.originPosition=u;const f=p.scale;f[0]=c[0]??1,f[1]=-(c[1]??1),f[2]=c[2]??1,f[3]=c[3]??1;const y=p.translate;if(y[0]=h[0]??0,y[1]=h[1]??0,y[2]=h[2]??0,y[3]=h[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=v(p,o[t],t);return e!==t&&ae(e,l,0),e}let g=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[g+t]=v(p,o[g+t],t);let n=e.coords[g],s=e.coords[g+1];g+=l;for(let t=1;t<r;t++,g+=l){n+=o[g]*f[0],s+=o[g+1]*f[1],e.coords[g]=n,e.coords[g+1]=s;for(let t=2;t<l;++t)e.coords[g+t]=v(p,o[g+t],t)}}return e!==t&&ae(e,o.length,a.length),e}function se(e,t,r,n,s,i){if(ae(e),e.lengths.push(...t.lengths),r===s&&n===i)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const o=d(r,n),a=b(r,n,s,i),l=t.coords;for(let t=0;t<l.length;t+=o)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function ie(e,t,r,n){let s=0,i=e[n*t],o=e[n*(t+1)];for(let a=1;a<r;a++){const r=i+e[n*(t+a)],l=o+e[n*(t+a)+1],u=(r-i)*(l+o);i=r,o=l,s+=u}return.5*s}function oe(e,t){const{coords:r,lengths:n}=e;let s=0,i=0;for(let e=0;e<n.length;e++){const o=n[e];i+=ie(r,s,o,t),s+=o}return Math.abs(i)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},1231:(e,t,r)=>{r.d(t,{Z:()=>g});var n,s=r(43697),i=r(35454),o=r(96674),a=r(5600),l=r(75215),u=(r(67676),r(80442),r(36030)),c=r(71715),h=r(52011),d=r(72729),p=r(86719);const f=new i.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=n=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,s._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"description",void 0),(0,s._)([(0,c.r)("description")],y.prototype,"readDescription",null),(0,s._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],y.prototype,"domain",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,s._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,s._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"valueType",void 0),(0,s._)([(0,c.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,s._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=n=(0,s._)([(0,h.j)("esri.layers.support.Field")],y);const g=y},72729:(e,t,r)=>{r.d(t,{im:()=>k,V5:()=>T}),r(80442);var n,s=r(43697),i=r(22974),o=r(5600),a=(r(75215),r(36030)),l=r(52011),u=r(96674);r(67676);let c=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,s._)([(0,l.j)("esri.layers.support.CodedValue")],c);const h=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.J)(h)],d.prototype,"type",void 0),d=(0,s._)([(0,l.j)("esri.layers.support.Domain")],d);const p=d;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,o.Cb)({type:[c],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,s._)([(0,a.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,s._)([(0,l.j)("esri.layers.support.CodedValueDomain")],y);const g=y;var m;r(92604),r(20102);let _=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,s._)([(0,a.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=m=(0,s._)([(0,l.j)("esri.layers.support.InheritedDomain")],_);const b=_;var w;let x=w=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,s._)([(0,a.J)({range:"range"})],x.prototype,"type",void 0),x=w=(0,s._)([(0,l.j)("esri.layers.support.RangeDomain")],x);const v=x,T={key:"type",base:p,typeMap:{range:x,"coded-value":g,inherited:b}};function k(e){if(!e?.type)return null;switch(e.type){case"range":return v.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},77863:(e,t,r)=>{r.d(t,{G$:()=>T,K9:()=>F,wn:()=>_});var n=r(20102),s=r(45091),i=r(5428),o=r(78760);const a=["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"],u=["upperLeft","lowerLeft"];function c(e){return e>=a.length?null:a[e]}function h(e){return e>=l.length?null:l[e]}function d(e){return e>=u.length?null:u[e]}function p(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function f(e,t,r){const n=e.asUnsafe(),s=t.createPointGeometry(r);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),r=n.pos()+e;let i=0;for(;n.pos()<r;)t.addCoordinatePoint(s,n.getSInt64(),i++);break}default:n.skip()}return s}function y(e,t,r){const n=e.asUnsafe(),s=t.createGeometry(r),i=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),r=n.pos()+e;let i=0;for(;n.pos()<r;)t.addLength(s,n.getUInt32(),i++);break}case 3:{const e=n.getUInt32(),r=n.pos()+e;let o=0;for(t.allocateCoordinates(s);n.pos()<r;)t.addCoordinate(s,n.getSInt64(),o),o++,o===i&&(o=0);break}default:n.skip()}return s}function g(e){const t=e.asUnsafe(),r=new i.Z;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.coords.push(t.getSInt64());break}case 1:n=o.S[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:n}}function m(e){const 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 _(e){const t=e.asUnsafe(),r={type:c(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=c(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const 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}function w(e,t,r,n){const s=t.createFeature(r);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[i++].name;s.attributes[t]=e.processMessage(m);break}case 2:s.geometry=e.processMessageWithArgs(y,t,r);break;case 4:s.centroid=e.processMessageWithArgs(f,t,r);break;default:e.skip()}return s}function x(e){const 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 v(e){const 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 T(e){const t={originPosition:d(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=d(r.getEnum());break;case 2:t.scale=r.processMessage(x);break;case 3:t.translate=r.processMessage(v);break;default:r.skip()}return t}function k(e){const 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 I(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function M(e,t){const r=t.createFeatureResult(),n=e.asUnsafe();r.geometryType=p(t,0);let s=!1;for(;n.next();)switch(n.tag()){case 1:r.objectIdFieldName=n.getString();break;case 3:r.globalIdFieldName=n.getString();break;case 4:r.geohashFieldName=n.getString();break;case 5:r.geometryProperties=n.processMessage(k);break;case 7:r.geometryType=p(t,n.getEnum());break;case 8:r.spatialReference=n.processMessageWithArgs(I,t);break;case 10:r.hasZ=n.getBool();break;case 11:r.hasM=n.getBool();break;case 12:r.transform=n.processMessage(T);break;case 9:r.exceededTransferLimit=n.getBool();break;case 13:t.addField(r,n.processMessage(_));break;case 15:s||(t.prepareFeatures(r),s=!0),t.addFeature(r,n.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(r),r}function G(e,t){const r={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(g);break;case 1:r.featureResult=e.processMessageWithArgs(M,t);break;default:e.skip()}return null!=n&&r.featureResult&&t.addQueryGeometry(r,n),r}function F(e,t){try{const r=2,n=new s.Z(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===r?i.queryResult=n.processMessageWithArgs(G,t):n.skip();return i}catch(e){throw new n.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,r)=>{r.d(t,{J:()=>u,S:()=>l});var n=r(67900),s=r(8744),i=r(70272),o=r(44876),a=r(5428);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,s.fS)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n._R)(this._options.sourceSpatialReference)/(0,n._R)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,i.S6)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.u_}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.Z}}},45178:(e,t,r)=>{r.d(t,{C:()=>s});var n=r(77863);function s(e,t){const r=(0,n.K9)(e,t),s=r.queryResult.featureResult,i=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(s&&s.features&&s.features.length&&s.objectIdFieldName){const e=s.objectIdFieldName;for(const t of s.features)t.attributes&&(t.objectId=t.attributes[e])}return s&&(s.queryGeometry=i,s.queryGeometryType=o),s}},61916:(e,t,r)=>{r.r(t),r.d(t,{default:()=>w});var n=r(74085),s=r(99001),i=r(82971),o=r(69285),a=(r(80442),r(1533),r(60437),r(24470),r(82397),r(86973),r(1231));r(8744);class l{constructor(e,t,r){this.uid=e,this.geometry=t,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null}}class u{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}var c=r(98732);function h(e,t){return t}function d(e,t,r,n){switch(r){case 0:return g(e,t+n,0);case 1:return"lowerLeft"===e.originPosition?g(e,t+n,1):function({translate:e,scale:t},r,n){return e[n]-r*t[n]}(e,t+n,1)}}function p(e,t,r,n){return 2===r?g(e,t,2):d(e,t,r,n)}function f(e,t,r,n){return 2===r?g(e,t,3):d(e,t,r,n)}function y(e,t,r,n){return 3===r?g(e,t,3):p(e,t,r,n)}function g({translate:e,scale:t},r,n){return e[n]+r*t[n]}class m{constructor(e){this._options=e,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=h,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return new u}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,o.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return new i.Z}addField(e,t){e.fields.push(a.Z.fromJSON(t));const r=e.fields.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){const r=this._options.maxStringAttributeLength??0;if(r>0)for(const e in t.attributes){const n=t.attributes[e];"string"==typeof n&&n.length>r&&(t.attributes[e]="")}e.features.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:n}=t,s=(0,c.$g)(r.clone(),r,!1,!1,this._transform),i=(0,c.di)(s,n,!1,!1);let o=null;switch(n){case"esriGeometryPoint":o="point";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryMultipoint":o="multipoint"}i.type=o,e.queryGeometryType=n,e.queryGeometry=i}prepareFeatures(e){switch(this._transform=e.transform??null,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"point":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"polygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"polyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"multipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e);break;case"mesh":case"extent":break;default:(0,n.Bg)(e.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new l((0,s.D)(),null,new this._attributesConstructor)}allocateCoordinates(){const e=this._lengths.reduce(((e,t)=>e+t),0);this._coordinateBuffer=new Float64Array(e*this._vertexDimension),this._coordinateBufferPtr=0}addLength(e,t){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}createPointGeometry(e){const t={type:"point",x:0,y:0,spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM};return t.hasZ&&(t.z=0),t.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const n=this._transform?this._applyTransform(this._transform,t,r,0):t;if(null!=n)switch(r){case 0:e.x=n;break;case 1:e.y=n;break;case 2:e.hasZ?e.z=n:e.m=n;break;case 3:e.m=n}}_transformPathLikeValue(e,t){let r=0;return t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e),this._transform?this._applyTransform(this._transform,e,t,r):e}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const n=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(n)}_createPolygonGeometry(e){return{type:"polygon",rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{type:"polyline",paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{type:"multipoint",points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const n=this._transformPathLikeValue(t,r),s=e[e.length-1],i=this._coordinateBuffer;if(i){if(0===r){const e=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;s.push(new Float64Array(i.buffer,e,this._vertexDimension))}i[this._coordinateBufferPtr++]=n}}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?y:t?p:r?f:d}}var _=r(45178);class b{_parseFeatureQuery(e){const t=(0,_.C)(e.buffer,new m(e.options)),r={...t,spatialReference:t.spatialReference?.toJSON(),fields:t.fields?t.fields.map((e=>e.toJSON())):void 0};return Promise.resolve(r)}}function w(){return new b}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3597],{90578:(e,t,r)=>{r.d(t,{p:()=>l});var n=r(75215),s=r(7628);const i=Object.prototype.toString;function o(e){const t="__accessorMetadata__"in e?(0,n.se)(e):e;return function(...e){if(e.push(t),"number"==typeof e[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,e)}}function a(e,t,r,n){(0,s.Oe)(e,t).cast=n}function l(...e){if(3!==e.length||"string"!=typeof e[1])return 1===e.length&&"[object Function]"===i.call(e[0])?o(e[0]):1===e.length&&"string"==typeof e[0]?function(e){return(t,r)=>{(0,s.Oe)(t,e).cast=t[r]}}(e[0]):void 0}},71715:(e,t,r)=>{r.d(t,{r:()=>s});var n=r(5600);function s(e,t,r){let s,i;return void 0===t||Array.isArray(t)?(i=e,r=t,s=[void 0]):(i=t,s=Array.isArray(e)?e:[e]),(e,t)=>{const o=e.constructor.prototype;s.forEach((s=>{const a=(0,n.CJ)(e,s,i);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=o[t],r&&(a.read.source=(a.read.source||[]).concat(r))}))}}},74085:(e,t,r)=>{function n(e){}r.d(t,{Bg:()=>n}),r(80442)},45091:(e,t,r)=>{r.d(t,{Z:()=>c});var n,s,i=r(80442),o=r(71143);(s=n||(n={}))[s.varint=0]="varint",s[s.fixed64=1]="fixed64",s[s.delimited=2]="delimited",s[s.fixed32=5]="fixed32",s[s.unknown=99]="unknown";const a=4294967296,l=new TextDecoder("utf-8"),u=(0,i.Z)("safari")||(0,i.Z)("ios")?6:(0,i.Z)("ff")?12:32;class c{constructor(e,t,r=0,s=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,r,s)}_init(e,t,r,n){this._data=e,this._dataView=t,this._pos=r,this._end=n}asUnsafe(){return this}clone(){return new c(this._data,this._dataView,this._pos,this._end)}pos(){return this._pos}move(e){this._pos=e}nextTag(e){for(;;){if(this._pos===this._end)return!1;const 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;const 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;return e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128?e:(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128?e:(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128?e:void 0))))}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();if(void 0!==e)return e>>>1^-(1&e)|0}getSInt64(){return this._decodeSVarint()}getBool(){const e=0!==this._data[this._pos];return this._skip(1),e}getEnum(){return this._decodeVarint()}getFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getUint32(t+4,!0)*a;return this._skip(8),r}getSFixed64(){const e=this._dataView,t=this._pos,r=e.getUint32(t,!0)+e.getInt32(t+4,!0)*a;return this._skip(8),r}getDouble(){const e=this._dataView.getFloat64(this._pos,!0);return this._skip(8),e}getFixed32(){const e=this._dataView.getUint32(this._pos,!0);return this._skip(4),e}getSFixed32(){const e=this._dataView.getInt32(this._pos,!0);return this._skip(4),e}getFloat(){const e=this._dataView.getFloat32(this._pos,!0);return this._skip(4),e}getString(){const e=this._getLength(),t=this._pos,r=this._toString(this._data,t,t+e);return this._skip(e),r}getBytes(){const 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,n){const s=this.getMessage(),i=e(s,t,r,n);return s.release(),i}processMessage(e){const t=this.getMessage(),r=e(t);return t.release(),r}getMessage(){const e=this._getLength(),t=c.pool.acquire();return t._init(this._data,this._dataView,this._pos,this._pos+e),this._skip(e),t}release(){c.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case n.varint:this._decodeVarint();break;case n.fixed64:this._skip(8);break;case n.delimited:this._skip(this._getLength());break;case n.fixed32:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipLen(e){this._skip(e)}_skip(e){if(this._pos+e>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=e}_decodeVarint(){const e=this._data;let t=this._pos,r=0,n=0;if(this._end-t>=10)do{if(n=e[t++],r|=127&n,0==(128&n))break;if(n=e[t++],r|=(127&n)<<7,0==(128&n))break;if(n=e[t++],r|=(127&n)<<14,0==(128&n))break;if(n=e[t++],r|=(127&n)<<21,0==(128&n))break;if(n=e[t++],r+=268435456*(127&n),0==(128&n))break;if(n=e[t++],r+=34359738368*(127&n),0==(128&n))break;if(n=e[t++],r+=4398046511104*(127&n),0==(128&n))break;if(n=e[t++],r+=562949953421312*(127&n),0==(128&n))break;if(n=e[t++],r+=72057594037927940*(127&n),0==(128&n))break;if(n=e[t++],r+=0x8000000000000000*(127&n),0==(128&n))break;throw new Error("Varint too long!")}while(0);else{let s=1;for(;t!==this._end&&(n=e[t],0!=(128&n));)++t,r+=(127&n)*s,s*=128;if(t===this._end)throw new Error("Varint overrun!");++t,r+=n*s}return this._pos=t,r}_decodeSVarint(){const e=this._data;let t,r=0,n=0;const s=1&e[this._pos];if(n=e[this._pos++],r|=127&n,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<7,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<14,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r|=(127&n)<<21,0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=268435456*(127&n),0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=34359738368*(127&n),0==(128&n))return s?-(r+1)/2:r/2;if(n=e[this._pos++],r+=4398046511104*(127&n),0==(128&n))return s?-(r+1)/2:r/2;if(t=BigInt(r),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),0==(128&n))return Number(s?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),0==(128&n))return Number(s?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),0==(128&n))return Number(s?-(t+1n)/2n:t/2n);throw new Error("Varint too long!")}_getLength(){if(this._dataType!==n.delimited)throw new 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){const n=e.subarray(t,r);return l.decode(n)}let n="",s="";for(let i=t;i<r;++i){const t=e[i];128&t?s+="%"+t.toString(16):(n+=decodeURIComponent(s)+String.fromCharCode(t),s="")}return s.length&&(n+=decodeURIComponent(s)),n}_toBytes(e,t,r){return r=Math.min(this._end,r),new Uint8Array(e.buffer,t,r-t)}}c.pool=new o.Z(c,void 0,(e=>{e._data=null,e._dataView=null}))},9361:(e,t,r)=>{r.d(t,{Z:()=>c});var n=r(43697),s=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(71715)),a=r(52011),l=r(82971);let u=class extends s.wq{constructor(...e){super(...e),this.type=null,this.hasM=!1,this.hasZ=!1,this.spatialReference=l.Z.WGS84}get cache(){return this.commitProperty("spatialReference"),{}}get extent(){return null}readSpatialReference(e,t){if(e instanceof l.Z)return e;if(null!=e){const r=new l.Z;return r.read(e,t),r}return e}clone(){return console.warn(".clone() is not implemented for "+this.declaredClass),null}clearCache(){this.notifyChange("cache")}getCacheValue(e){return this.cache[e]}setCacheValue(e,t){this.cache[e]=t}};(0,n._)([(0,i.Cb)()],u.prototype,"type",void 0),(0,n._)([(0,i.Cb)({readOnly:!0})],u.prototype,"cache",null),(0,n._)([(0,i.Cb)({readOnly:!0})],u.prototype,"extent",null),(0,n._)([(0,i.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasM",void 0),(0,n._)([(0,i.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],u.prototype,"hasZ",void 0),(0,n._)([(0,i.Cb)({type:l.Z,json:{write:!0},value:l.Z.WGS84})],u.prototype,"spatialReference",void 0),(0,n._)([(0,o.r)("spatialReference")],u.prototype,"readSpatialReference",null),u=(0,n._)([(0,a.j)("esri.geometry.Geometry")],u);const c=u},94139:(e,t,r)=>{r.d(t,{Z:()=>b});var n,s=r(43697),i=r(92604),o=r(5600),a=r(90578),l=(r(67676),r(80442),r(71715)),u=r(52011),c=r(30556),h=r(75215),d=r(9361),p=r(82971),f=r(8744),y=r(40488);const g=[0,0];function m(e){return e&&("esri.geometry.SpatialReference"===e.declaredClass||null!=e.wkid)}let _=n=class extends d.Z{static copy(e,t){t._set("x",e._get("x")),t._set("y",e._get("y")),t._set("z",e._get("z")),t._set("m",e._get("m"));const r=e._get("spatialReference");t._set("spatialReference",Object.isFrozen(r)?r:r.clone())}constructor(...e){super(...e),this.x=0,this.y=0,this.z=void 0,this.m=void 0,this.type="point"}normalizeCtorArgs(e,t,r,n,s){let o;if(Array.isArray(e))o=e,s=t,e=o[0],t=o[1],r=o[2],n=o[3];else if(e&&"object"==typeof e){if(o=e,e=null!=o.x?o.x:o.longitude,t=null!=o.y?o.y:o.latitude,r=o.z,n=o.m,(s=o.spatialReference)&&"esri.geometry.SpatialReference"!==s.declaredClass&&(s=new p.Z(s)),null!=o.longitude||null!=o.latitude)if(null==o.longitude)i.Z.getLogger(this).warn(".longitude=","Latitude was defined without longitude");else if(null==o.latitude)i.Z.getLogger(this).warn(".latitude=","Longitude was defined without latitude");else if(!o.declaredClass&&s&&s.isWebMercator){const r=(0,y.hG)(o.longitude,o.latitude,g);e=r[0],t=r[1]}}else m(r)?(s=r,r=null):m(n)&&(s=n,n=null);const a={x:e,y:t};return null==a.x&&null!=a.y?i.Z.getLogger(this).warn(".y=","Y coordinate was defined without an X coordinate"):null==a.y&&null!=a.x&&i.Z.getLogger(this).warn(".x=","X coordinate was defined without a Y coordinate"),null!=s&&(a.spatialReference=s),null!=r&&(a.z=r),null!=n&&(a.m=n),a}get cache(){return this.commitProperty("x"),this.commitProperty("y"),this.commitProperty("z"),this.commitProperty("m"),this.commitProperty("spatialReference"),{}}get hasM(){return void 0!==this.m}set hasM(e){e!==(void 0!==this._get("m"))&&(this._set("m",e?0:void 0),this._set("hasM",e))}get hasZ(){return void 0!==this.z}set hasZ(e){e!==(void 0!==this._get("z"))&&(this._set("z",e?0:void 0),this._set("hasZ",e))}get latitude(){const{spatialReference:e,x:t,y:r}=this;if(e){if(e.isWebMercator)return(0,y.R6)(t,r,g)[1];if(e.isGeographic)return r}return null}set latitude(e){const{spatialReference:t,x:r}=this;null!=e&&t&&(t.isWebMercator?this._set("y",(0,y.hG)(r,e,g)[1]):t.isGeographic&&this._set("y",e),this._set("latitude",e))}get longitude(){const{x:e,y:t,spatialReference:r}=this;if(r){if(r.isWebMercator)return(0,y.R6)(e,t,g)[0];if(r.isGeographic)return e}return null}set longitude(e){const{y:t,spatialReference:r}=this;null!=e&&r&&(r.isWebMercator?this._set("x",(0,y.hG)(e,t,g)[0]):r.isGeographic&&this._set("x",e),this._set("longitude",e))}writeX(e,t,r){t[r]=isNaN(e)?"NaN":e}readX(e){return"string"==typeof e?NaN:e}clone(){const e=new n;return e.x=this.x,e.y=this.y,e.z=this.z,e.m=this.m,e.spatialReference=this.spatialReference,e}copy(e){return n.copy(e,this),this}equals(e){if(null==e)return!1;const{x:t,y:r,z:n,m:s,spatialReference:i}=this,{z:o,m:a}=e;let{x:l,y:u,spatialReference:c}=e;if(!i.equals(c))if(i.isWebMercator&&c.isWGS84)[l,u]=(0,y.hG)(l,u),c=i;else{if(!i.isWGS84||!c.isWebMercator)return!1;[l,u]=(0,y.R6)(l,u),c=i}return t===l&&r===u&&n===o&&s===a&&i.wkid===c.wkid}offset(e,t,r){return this.x+=e,this.y+=t,null!=r&&(this.z=(this.z??0)+r),this}normalize(){if(!this.spatialReference)return this;const e=(0,f.C5)(this.spatialReference);if(!e)return this;let t=this.x;const[r,n]=e.valid,s=2*n;let i;return t>n?(i=Math.ceil(Math.abs(t-n)/s),t-=i*s):t<r&&(i=Math.ceil(Math.abs(t-r)/s),t+=i*s),this._set("x",t),this}distance(e){return function(e,t){const r=e.x-t.x,n=e.y-t.y,s=e.hasZ&&t.hasZ?e.z-t.z:0;return Math.sqrt(r*r+n*n+s*s)}(this,e)}toArray(){const e=this.hasZ,t=this.hasM;return e&&t?[this.x,this.y,this.z,this.m]:e?[this.x,this.y,this.z]:t?[this.x,this.y,this.m]:[this.x,this.y]}toJSON(e){return this.write({},e)}};(0,s._)([(0,o.Cb)({readOnly:!0})],_.prototype,"cache",null),(0,s._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasM",null),(0,s._)([(0,o.Cb)({type:Boolean,json:{read:!1,write:{enabled:!1,overridePolicy:null}}})],_.prototype,"hasZ",null),(0,s._)([(0,o.Cb)({type:Number})],_.prototype,"latitude",null),(0,s._)([(0,o.Cb)({type:Number})],_.prototype,"longitude",null),(0,s._)([(0,o.Cb)({type:Number,json:{type:[Number,String],write:{isRequired:!0,allowNull:!0}}}),(0,a.p)((e=>isNaN(e)?e:(0,h.q9)(e)))],_.prototype,"x",void 0),(0,s._)([(0,c.c)("x")],_.prototype,"writeX",null),(0,s._)([(0,l.r)("x")],_.prototype,"readX",null),(0,s._)([(0,o.Cb)({type:Number,json:{write:!0}})],_.prototype,"y",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasZ}}}}})],_.prototype,"z",void 0),(0,s._)([(0,o.Cb)({type:Number,json:{write:{overridePolicy(){return{enabled:this.hasM}}}}})],_.prototype,"m",void 0),_=n=(0,s._)([(0,u.j)("esri.geometry.Point")],_),_.prototype.toJSON.isDefaultToJSON=!0;const b=_},62155:(e,t,r)=>{var n;r.d(t,{R:()=>n}),function(e){e[e.X=0]="X",e[e.Y=1]="Y",e[e.Z=2]="Z"}(n||(n={}))},60437:(e,t,r)=>{r.d(t,{G_:()=>_,HH:()=>o,JR:()=>f,TC:()=>a,Tn:()=>h,Ue:()=>s,al:()=>i,bZ:()=>y,cS:()=>p,dp:()=>u,fS:()=>m,is:()=>g,op:()=>c,pp:()=>l,t8:()=>d});var n=r(6570);function s(e=b){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function i(e,t,r,n,i,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=n,a[4]=i,a[5]=o,a}function o(e,t){const r=isFinite(e[2])||isFinite(e[5]);return new n.Z(r?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function a(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function l(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function u(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function c(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function h(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function p(e){return e?d(e,_):s(_)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function y(e,t,r,n,s){return e[0]=t,e[1]=r,e[2]=Number.NEGATIVE_INFINITY,e[3]=n,e[4]=s,e[5]=Number.POSITIVE_INFINITY,e}function g(e){return 6===e.length}function m(e,t,r){if(null==e||null==t)return e===t;if(!g(e)||!g(t))return!1;if(r){for(let n=0;n<e.length;n++)if(!r(e[n],t[n]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}r(24470);const _=[1/0,1/0,1/0,-1/0,-1/0,-1/0],b=[0,0,0,0,0,0];s()},33955:(e,t,r)=>{r.d(t,{Ji:()=>y,YX:()=>u,aW:()=>c,im:()=>f,l9:()=>d,oU:()=>p,q9:()=>m,wp:()=>h});var n=r(6570),s=r(9361),i=r(65091),o=r(94139),a=r(38913),l=r(58901);function u(e){return void 0!==e.xmin&&void 0!==e.ymin&&void 0!==e.xmax&&void 0!==e.ymax}function c(e){return void 0!==e.points}function h(e){return void 0!==e.x&&void 0!==e.y}function d(e){return void 0!==e.paths}function p(e){return void 0!==e.rings}function f(e){return null==e?null:e instanceof s.Z?e:h(e)?o.Z.fromJSON(e):d(e)?l.Z.fromJSON(e):p(e)?a.Z.fromJSON(e):c(e)?i.Z.fromJSON(e):u(e)?n.Z.fromJSON(e):null}function y(e){return e?h(e)?"esriGeometryPoint":d(e)?"esriGeometryPolyline":p(e)?"esriGeometryPolygon":u(e)?"esriGeometryEnvelope":c(e)?"esriGeometryMultipoint":null:null}const g={esriGeometryPoint:o.Z,esriGeometryPolyline:l.Z,esriGeometryPolygon:a.Z,esriGeometryEnvelope:n.Z,esriGeometryMultipoint:i.Z};function m(e){return e&&g[e]||null}},82397:(e,t,r)=>{r.d(t,{G6:()=>y,Ie:()=>f,J9:()=>d,RF:()=>h,U1:()=>p,vY:()=>o}),r(33955);const n=(e,t,r)=>[t,r],s=(e,t,r)=>[t,r,e[2]],i=(e,t,r)=>[t,r,e[2],e[3]];function o(e){return e?{originPosition:"upper-left"===e.originPosition?"upperLeft":"lower-left"===e.originPosition?"lowerLeft":e.originPosition,scale:e.tolerance?[e.tolerance,e.tolerance]:[1,1],translate:null!=e.extent?[e.extent.xmin,e.extent.ymax]:[0,0]}:null}function a({scale:e,translate:t},r){return r*e[0]+t[0]}function l({scale:e,translate:t},r){return t[1]-r*e[1]}function u(e,t,r){const n=new Array(r.length);if(!r.length)return n;const[s,i]=e.scale;let o=a(e,r[0][0]),u=l(e,r[0][1]);n[0]=t(r[0],o,u);for(let e=1;e<r.length;e++){const a=r[e];o+=a[0]*s,u-=a[1]*i,n[e]=t(a,o,u)}return n}function c(e,t,r){const n=new Array(r.length);for(let s=0;s<r.length;s++)n[s]=u(e,t,r[s]);return n}function h(e,t,r,n,s){return t.x=function({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}(e,r.x),t.y=function({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}(e,r.y),t!==r&&(n&&(t.z=r.z),s&&(t.m=r.m)),t}function d(e,t,r,o,a){return null!=r&&(t.points=function(e,t,r,o){return u(e,r?o?i:s:o?s:n,t)}(e,r.points,o,a)),t}function p(e,t,r,n,s){return null==r||(t.x=a(e,r.x),t.y=l(e,r.y),t!==r&&(n&&(t.z=r.z),s&&(t.m=r.m))),t}function f(e,t,r,o,a){return null!=r&&(t.rings=function(e,t,r,o){return c(e,r?o?i:s:o?s:n,t)}(e,r.rings,o,a)),t}function y(e,t,r,o,a){return null!=r&&(t.paths=function(e,t,r,o){return c(e,r?o?i:s:o?s:n,t)}(e,r.paths,o,a)),t}},86973:(e,t,r)=>{r.d(t,{M:()=>s,P:()=>i});var n=r(35454);const s=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),i=(0,n.w)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"})},40488:(e,t,r)=>{r.d(t,{$:()=>b,Q8:()=>y,R6:()=>_,Sx:()=>w,hG:()=>m,iV:()=>g,mZ:()=>h});var n=r(22974),s=r(82971),i=r(68441),o=r(8744);const a=57.29577951308232,l=.017453292519943;function u(e){return e*a}function c(e){return e*l}function h(e){return Math.PI/2-2*Math.atan(Math.exp(-e/i.sv.radius))}function d(e){return null!=e.wkid||null!=e.wkt}const p=[0,0];function f(e,t,r,n,s){const i=e,o=s;if(o.spatialReference=r,"x"in i&&"x"in o)[o.x,o.y]=t(i.x,i.y,p,n);else if("xmin"in i&&"xmin"in o)[o.xmin,o.ymin]=t(i.xmin,i.ymin,p,n),[o.xmax,o.ymax]=t(i.xmax,i.ymax,p,n);else if("paths"in i&&"paths"in o||"rings"in i&&"rings"in o){const e="paths"in i?i.paths:i.rings,r=[];let s;for(let i=0;i<e.length;i++){const o=e[i];s=[],r.push(s);for(let e=0;e<o.length;e++)s.push(t(o[e][0],o[e][1],[0,0],n)),o[e].length>2&&s[e].push(o[e][2]),o[e].length>3&&s[e].push(o[e][3])}"paths"in o?o.paths=r:o.rings=r}else if("points"in i&&"points"in o){const e=i.points,r=[];for(let s=0;s<e.length;s++)r[s]=t(e[s][0],e[s][1],[0,0],n),e[s].length>2&&r[s].push(e[s][2]),e[s].length>3&&r[s].push(e[s][3]);o.points=r}return s}function y(e,t){const r=e&&(d(e)?e:e.spatialReference),n=t&&(d(t)?t:t.spatialReference);return!(e&&"type"in e&&"mesh"===e.type||t&&"type"in t&&"mesh"===t.type||!r||!n)&&(!!(0,o.fS)(n,r)||(0,o.sS)(n)&&(0,o.oR)(r)||(0,o.sS)(r)&&(0,o.oR)(n))}function g(e,t){if(null==e)return null;const r=e.spatialReference,i=t&&(d(t)?t:t.spatialReference);return y(r,i)?(0,o.fS)(r,i)?(0,n.d9)(e):(0,o.sS)(i)?f(e,m,s.Z.WebMercator,!1,(0,n.d9)(e)):(0,o.oR)(i)?f(e,_,s.Z.WGS84,!1,(0,n.d9)(e)):null:null}function m(e,t,r=[0,0]){t>89.99999?t=89.99999:t<-89.99999&&(t=-89.99999);const n=c(t);return r[0]=c(e)*i.sv.radius,r[1]=i.sv.halfSemiMajorAxis*Math.log((1+Math.sin(n))/(1-Math.sin(n))),r}function _(e,t,r=[0,0],n=!1){const s=u(e/i.sv.radius);return r[0]=n?s:s-360*Math.floor((s+180)/360),r[1]=u(Math.PI/2-2*Math.atan(Math.exp(-t/i.sv.radius))),r}function b(e,t=!1,r=(0,n.d9)(e)){return f(e,m,s.Z.WebMercator,t,r)}function w(e,t=!1,r=(0,n.d9)(e)){return f(e,_,s.Z.WGS84,t,r)}},69285:(e,t,r)=>{r.d(t,{k:()=>o});var n=r(67900),s=r(2109),i=r(8744);function o(e,t,r){if(null==t||null==r||r.vcsWkid||(0,i.fS)(t,r)||(0,s.oe)(t)||(0,s.oe)(r))return null;const o=(0,n._R)(t)/(0,n._R)(r);if(1===o)return null;switch(e){case"point":case"esriGeometryPoint":return e=>function(e,t){null!=e?.z&&(e.z*=t)}(e,o);case"polyline":case"esriGeometryPolyline":return e=>function(e,t){if(e)for(const r of e.paths)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"polygon":case"esriGeometryPolygon":return e=>function(e,t){if(e)for(const r of e.rings)for(const e of r)e.length>2&&(e[2]*=t)}(e,o);case"multipoint":case"esriGeometryMultipoint":return e=>function(e,t){if(e)for(const r of e.points)r.length>2&&(r[2]*=t)}(e,o);case"extent":case"esriGeometryEnvelope":return e=>function(e,t){e&&null!=e.zmin&&null!=e.zmax&&(e.zmin*=t,e.zmax*=t)}(e,o);default:return null}}},70272:(e,t,r)=>{r.d(t,{S6:()=>s,nd:()=>i,u_:()=>n});class n{constructor(e=null,t={},r,n){this.geometry=e,this.attributes=t,this.centroid=r,this.objectId=n,this.displayId=0,this.geohashX=0,this.geohashY=0}weakClone(){const e=new n(this.geometry,this.attributes,this.centroid,this.objectId);return e.displayId=this.displayId,e.geohashX=this.geohashX,e.geohashY=this.geohashY,e}}function s(e){return!!e.geometry?.coords?.length}class i extends n{}},44876:(e,t,r)=>{r.d(t,{Z:()=>n});class n{constructor(){this.objectIdFieldName=null,this.globalIdFieldName=null,this.geohashFieldName=null,this.geometryProperties=null,this.geometryType=null,this.spatialReference=null,this.hasZ=!1,this.hasM=!1,this.features=[],this.fields=[],this.transform=null,this.exceededTransferLimit=!1,this.uniqueIdField=null,this.queryGeometryType=null,this.queryGeometry=null}weakClone(){const e=new n;return e.objectIdFieldName=this.objectIdFieldName,e.globalIdFieldName=this.globalIdFieldName,e.geohashFieldName=this.geohashFieldName,e.geometryProperties=this.geometryProperties,e.geometryType=this.geometryType,e.spatialReference=this.spatialReference,e.hasZ=this.hasZ,e.hasM=this.hasM,e.features=this.features,e.fields=this.fields,e.transform=this.transform,e.exceededTransferLimit=this.exceededTransferLimit,e.uniqueIdField=this.uniqueIdField,e.queryGeometry=this.queryGeometry,e.queryGeometryType=this.queryGeometryType,e}}},5428:(e,t,r)=>{r.d(t,{Z:()=>n});class n{constructor(e=[],t=[],r=!1){this.lengths=e??[],this.coords=t??[],this.hasIndeterminateRingOrder=r}static fromRect(e){const[t,r,s,i]=e,o=s-t,a=i-r;return new n([5],[t,r,o,0,0,a,-o,0,0,-a])}get isPoint(){return 0===this.lengths.length}get maxLength(){return Math.max(...this.lengths)}get size(){return this.lengths.reduce(((e,t)=>e+t))}forEachVertex(e){let t=0;this.lengths.length||e(this.coords[0],this.coords[1]);for(let r=0;r<this.lengths.length;r++){const n=this.lengths[r];for(let r=0;r<n;r++)e(this.coords[2*(r+t)],this.coords[2*(r+t)+1]);t+=n}}clone(e){return e?(e.set(this.coords),new n(this.lengths.slice(),e,this.hasIndeterminateRingOrder)):new n(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)}}},98732:(e,t,r)=>{r.d(t,{$:()=>re,$g:()=>ne,EI:()=>B,GH:()=>E,IN:()=>x,Iv:()=>C,J6:()=>q,Jd:()=>w,Nh:()=>H,RZ:()=>Q,Uy:()=>L,XA:()=>O,Yn:()=>A,cn:()=>Y,dd:()=>S,di:()=>W,eG:()=>U,fQ:()=>T,hY:()=>se,h_:()=>X,lM:()=>$,lz:()=>oe,zj:()=>K});var n=r(20102),s=r(92604),i=r(70586),o=r(60437),a=r(24470),l=r(33955),u=r(70272),c=r(44876),h=r(5428);function d(e,t){return e?t?4:3:t?3:2}const p=s.Z.getLogger("esri.layers.graphics.featureConversionUtils"),f={esriGeometryPoint:0,esriGeometryPolyline:2,esriGeometryPolygon:3,esriGeometryMultipoint:0,esriGeometryEnvelope:0},y=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i},g=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i,e[r+2]=t[n+2]},m=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i,e[r+2]=t[n+3]},_=(e,t,r,n,s,i)=>{e[r]=s,e[r+1]=i,e[r+2]=t[n+2],e[r+3]=t[n+3]};function b(e,t,r,n){if(e){if(r)return t&&n?_:g;if(t&&n)return m}else if(t&&n)return g;return y}function w({scale:e,translate:t},r){return Math.round((r-t[0])/e[0])}function x({scale:e,translate:t},r){return Math.round((t[1]-r)/e[1])}function v({scale:e,translate:t},r,n){return r*e[n]+t[n]}function T(e,t,r){return e?t?r?P(e):M(e):r?F(e):k(e):null}function k(e){const t=e.coords;return{x:t[0],y:t[1]}}function I(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e}function M(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2]}}function G(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e}function F(e){const t=e.coords;return{x:t[0],y:t[1],m:t[2]}}function Z(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.m,e}function P(e){const t=e.coords;return{x:t[0],y:t[1],z:t[2],m:t[3]}}function N(e,t){return e.coords[0]=t.x,e.coords[1]=t.y,e.coords[2]=t.z,e.coords[3]=t.m,e}function R(e,t){return e&&t?N:e?G:t?Z:I}function S(e,t,r=R(null!=t.z,null!=t.m)){return r(e,t)}function C(e,t,r){if(null==e)return null;const n=d(t,r),s=[];for(let t=0;t<e.coords.length;t+=n){const r=[];for(let s=0;s<n;s++)r.push(e.coords[t+s]);s.push(r)}return t?r?{points:s,hasZ:t,hasM:r}:{points:s,hasZ:t}:r?{points:s,hasM:r}:{points:s}}function V(e,t,r=d(t.hasZ,t.hasM)){e.lengths[0]=t.points.length;const n=e.coords;let s=0;for(const e of t.points)for(let t=0;t<r;t++)n[s++]=e[t];return e}function q(e,t,r){if(!e)return null;const n=d(t,r),{coords:s,lengths:i}=e,o=[];let a=0;for(const e of i){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(s[a++]);t.push(e)}o.push(t)}return t?r?{paths:o,hasZ:t,hasM:r}:{paths:o,hasZ:t}:r?{paths:o,hasM:r}:{paths:o}}function j(e,t,r=d(t.hasZ,t.hasM)){const{lengths:n,coords:s}=e;let i=0;for(const e of t.paths){for(const t of e)for(let e=0;e<r;e++)s[i++]=t[e];n.push(e.length)}return e}function U(e,t,r){if(!e)return null;const n=d(t,r),{coords:s,lengths:i}=e,o=[];let a=0;for(const e of i){const t=[];for(let r=0;r<e;r++){const e=[];for(let t=0;t<n;t++)e.push(s[a++]);t.push(e)}o.push(t)}return t?r?{rings:o,hasZ:t,hasM:r}:{rings:o,hasZ:t}:r?{rings:o,hasM:r}:{rings:o}}function L(e,t,r=t.hasZ,n=t.hasM){return function(e,t,r,n){const s=d(r,n),{lengths:i,coords:o}=e;let a=0;ae(e);for(const e of t){for(const t of e)for(let e=0;e<s;e++)o[a++]=t[e];i.push(e.length)}return e}(e,t.rings,r,n)}const z=[],D=[];function O(e,t,r,n,s){z[0]=e;const[i]=A(D,z,t,r,n,s);return le(z),le(D),i}function A(e,t,r,s,i,o){if(le(e),!r){for(const r of t){const t=o?r.attributes[o]:void 0;e.push(new u.u_(null,r.attributes,null,t))}return e}switch(r){case"esriGeometryPoint":return function(e,t,r,n,s){const i=R(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?i(new h.Z,r):null;e.push(new u.u_(t,n,null,s?n[s]:void 0))}return e}(e,t,s,i,o);case"esriGeometryMultipoint":return function(e,t,r,n,s){const i=d(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?V(new h.Z,r,i):null;e.push(new u.u_(t,n,null,s?n[s]:void 0))}return e}(e,t,s,i,o);case"esriGeometryPolyline":return function(e,t,r,n,s){const i=d(r,n);for(const{geometry:r,attributes:n}of t){const t=null!=r?j(new h.Z,r,i):null;e.push(new u.u_(t,n,null,s?n[s]:void 0))}return e}(e,t,s,i,o);case"esriGeometryPolygon":return function(e,t,r,n,s){for(const{geometry:i,centroid:o,attributes:a}of t){const t=null!=i?L(new h.Z,i,r,n):null,l=s?a[s]:void 0;null!=o?e.push(new u.u_(t,a,I(new h.Z,o),l)):e.push(new u.u_(t,a,null,l))}return e}(e,t,s,i,o);default:p.error("convertToFeatureSet:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${r}'`)),le(e)}return e}function B(e,t,r,n){D[0]=e,J(z,D,t,r,n);const s=z[0];return le(z),le(D),s}function E(e,t,r){if(null==e)return null;const s=new h.Z;return"hasZ"in e&&null==t&&(t=e.hasZ),"hasM"in e&&null==r&&(r=e.hasM),(0,l.wp)(e)?R(null!=t?t:null!=e.z,null!=r?r:null!=e.m)(s,e):(0,l.oU)(e)?L(s,e,t,r):(0,l.l9)(e)?j(s,e,d(t,r)):(0,l.aW)(e)?V(s,e,d(t,r)):void p.error("convertFromGeometry:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${e}'`))}function W(e,t,r,s){const i=e&&("coords"in e?e:e.geometry);if(null==i)return null;switch(t){case"esriGeometryPoint":{let e=k;return r&&s?e=P:r?e=M:s&&(e=F),e(i)}case"esriGeometryMultipoint":return C(i,r,s);case"esriGeometryPolyline":return q(i,r,s);case"esriGeometryPolygon":return U(i,r,s);default:return p.error("convertToGeometry:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${t}'`)),null}}function J(e,t,r,s,i){if(le(e),null==r)return function(e,t){for(const r of t)e.push({attributes:r.attributes});return e}(e,t);switch(r){case"esriGeometryPoint":return function(e,t,r,n){let s=k;r&&n?s=P:r?s=M:n&&(s=F);for(const r of t){const{geometry:t,attributes:n}=r,i=null!=t?s(t):null;e.push({attributes:n,geometry:i})}return e}(e,t,s,i);case"esriGeometryMultipoint":return function(e,t,r,n){for(const{geometry:s,attributes:i}of t)e.push({attributes:i,geometry:null!=s?C(s,r,n):null});return e}(e,t,s,i);case"esriGeometryPolyline":return function(e,t,r,n){for(const{geometry:s,attributes:i}of t)e.push({attributes:i,geometry:null!=s?q(s,r,n):null});return e}(e,t,s,i);case"esriGeometryPolygon":return function(e,t,r,n){for(const{geometry:s,attributes:i,centroid:o}of t){const t=null!=s?U(s,r,n):null;if(null!=o){const r=k(o);e.push({attributes:i,centroid:r,geometry:t})}else e.push({attributes:i,geometry:t})}return e}(e,t,s,i);default:p.error("convertToFeatureSet:unknown-geometry",new n.Z(`Unable to parse unknown geometry type '${r}'`))}return e}function Y(e){const{objectIdFieldName:t,spatialReference:r,transform:n,fields:s,hasM:i,hasZ:o,features:a,geometryType:l,exceededTransferLimit:u,uniqueIdField:c,queryGeometry:h,queryGeometryType:d}=e,p={features:J([],a,l,o,i),fields:s,geometryType:l,objectIdFieldName:t,spatialReference:r,uniqueIdField:c,queryGeometry:W(h,d,!1,!1)};return n&&(p.transform=n),u&&(p.exceededTransferLimit=u),i&&(p.hasM=i),o&&(p.hasZ=o),p}function X(e,t){const r=new c.Z,{hasM:s,hasZ:i,features:o,objectIdFieldName:a,spatialReference:l,geometryType:u,exceededTransferLimit:h,transform:d,fields:f}=e;return f&&(r.fields=f),r.geometryType=u??null,r.objectIdFieldName=a??t??null,r.spatialReference=l??null,r.objectIdFieldName?(o&&A(r.features,o,u,i,s,r.objectIdFieldName),h&&(r.exceededTransferLimit=h),s&&(r.hasM=s),i&&(r.hasZ=i),d&&(r.transform=d),r):(p.error(new n.Z("optimized-features:invalid-objectIdFieldName","objectIdFieldName is missing")),r)}function $(e){const{transform:t,features:r,hasM:n,hasZ:s}=e;if(!t)return e;for(const e of r)null!=e.geometry&&ne(e.geometry,e.geometry,n,s,t),null!=e.centroid&&ne(e.centroid,e.centroid,n,s,t);return e.transform=null,e}function Q(e,t){const{geometryType:r,features:n,hasM:s,hasZ:i}=t;if(!e)return t;for(let t=0;t<n.length;t++){const o=n[t],a=o.weakClone();a.geometry=new h.Z,H(a.geometry,o.geometry,s,i,r,e),o.centroid&&(a.centroid=new h.Z,H(a.centroid,o.centroid,s,i,"esriGeometryPoint",e)),n[t]=a}return t.transform=e,t}function H(e,t,r,n,s,i,o=r,a=n){if(ae(e),!t?.coords.length)return null;const l=f[s],{coords:u,lengths:c}=t,h=d(r,n),p=d(r&&o,n&&a),y=b(r,n,o,a);if(!c.length)return y(e.coords,u,0,0,w(i,u[0]),x(i,u[1])),ae(e,h,0),e;let g,m,_,v,T=0,k=0,I=k;for(const t of c){if(t<l)continue;let r=0;k=I,_=g=w(i,u[T]),v=m=x(i,u[T+1]),y(e.coords,u,k,T,_,v),r++,T+=h,k+=p;for(let n=1;n<t;n++,T+=h)_=w(i,u[T]),v=x(i,u[T+1]),_===g&&v===m||(y(e.coords,u,k,T,_-g,v-m),k+=p,r++,g=_,m=v);r>=l&&(e.lengths.push(r),I=k)}return le(e.coords,I),e.coords.length?e:null}function K(e,t,r,n,s,i,o=r,a=n){if(ae(e),!t?.coords.length)return null;const l=f[s],{coords:u,lengths:c}=t,h=d(r,n),p=d(r&&o,n&&a),y=b(r,n,o,a);if(!c.length)return y(e.coords,u,0,0,u[0],u[1]),ae(e,h,0),e;let g=0;const m=i*i;for(const t of c){if(t<l){g+=t*h;continue}const r=e.coords.length/p,n=g,s=g+(t-1)*h;y(e.coords,u,e.coords.length,n,u[n],u[n+1]),te(e.coords,u,h,m,y,n,s),y(e.coords,u,e.coords.length,s,u[s],u[s+1]);const i=e.coords.length/p-r;i>=l?e.lengths.push(i):le(e.coords,r*p),g+=t*h}return e.coords.length?e:null}function ee(e,t,r,n){const s=e[t],i=e[t+1],o=e[r],a=e[r+1],l=e[n],u=e[n+1];let c=o,h=a,d=l-c,p=u-h;if(0!==d||0!==p){const e=((s-c)*d+(i-h)*p)/(d*d+p*p);e>1?(c=l,h=u):e>0&&(c+=d*e,h+=p*e)}return d=s-c,p=i-h,d*d+p*p}function te(e,t,r,n,s,i,o){let a,l=n,u=0;for(let e=i+r;e<o;e+=r)a=ee(t,e,i,o),a>l&&(u=e,l=a);l>n&&(u-i>r&&te(e,t,r,n,s,i,u),s(e,t,e.length,u,t[u],t[u+1]),o-u>r&&te(e,t,r,n,s,u,o))}function re(e,t,r,n){if(!t?.coords?.length)return null;const s=d(r,n);let i=Number.POSITIVE_INFINITY,l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(t&&t.coords){const e=t.coords;for(let t=0;t<e.length;t+=s){const r=e[t],n=e[t+1];i=Math.min(i,r),u=Math.max(u,r),l=Math.min(l,n),c=Math.max(c,n)}}return(0,o.is)(e)?(0,o.bZ)(e,i,l,u,c):(0,a.al)(i,l,u,c,e),e}function ne(e,t,r,n,s){const{coords:o,lengths:a}=t,l=d(r,n);if(!o.length)return e!==t&&ae(e),e;(0,i.O3)(s);const{originPosition:u,scale:c,translate:h}=s,p=ue;p.originPosition=u;const f=p.scale;f[0]=c[0]??1,f[1]=-(c[1]??1),f[2]=c[2]??1,f[3]=c[3]??1;const y=p.translate;if(y[0]=h[0]??0,y[1]=h[1]??0,y[2]=h[2]??0,y[3]=h[3]??0,!a.length){for(let t=0;t<l;++t)e.coords[t]=v(p,o[t],t);return e!==t&&ae(e,l,0),e}let g=0;for(let t=0;t<a.length;t++){const r=a[t];e.lengths[t]=r;for(let t=0;t<l;++t)e.coords[g+t]=v(p,o[g+t],t);let n=e.coords[g],s=e.coords[g+1];g+=l;for(let t=1;t<r;t++,g+=l){n+=o[g]*f[0],s+=o[g+1]*f[1],e.coords[g]=n,e.coords[g+1]=s;for(let t=2;t<l;++t)e.coords[g+t]=v(p,o[g+t],t)}}return e!==t&&ae(e,o.length,a.length),e}function se(e,t,r,n,s,i){if(ae(e),e.lengths.push(...t.lengths),r===s&&n===i)for(let r=0;r<t.coords.length;r++)e.coords.push(t.coords[r]);else{const o=d(r,n),a=b(r,n,s,i),l=t.coords;for(let t=0;t<l.length;t+=o)a(e.coords,l,e.coords.length,t,l[t],l[t+1])}return e}function ie(e,t,r,n){let s=0,i=e[n*t],o=e[n*(t+1)];for(let a=1;a<r;a++){const r=i+e[n*(t+a)],l=o+e[n*(t+a)+1],u=(r-i)*(l+o);i=r,o=l,s+=u}return.5*s}function oe(e,t){const{coords:r,lengths:n}=e;let s=0,i=0;for(let e=0;e<n.length;e++){const o=n[e];i+=ie(r,s,o,t),s+=o}return Math.abs(i)}function ae(e,t=0,r=0){le(e.lengths,r),le(e.coords,t)}function le(e,t=0){e.length!==t&&(e.length=t)}const ue={originPosition:"lowerLeft",scale:[1,1,1,1],translate:[0,0,0,0]}},1231:(e,t,r)=>{r.d(t,{Z:()=>g});var n,s=r(43697),i=r(35454),o=r(96674),a=r(5600),l=r(75215),u=(r(67676),r(80442),r(36030)),c=r(71715),h=r(52011),d=r(72729),p=r(86719);const f=new i.X({binary:"binary",coordinate:"coordinate",countOrAmount:"count-or-amount",dateAndTime:"date-and-time",description:"description",locationOrPlaceName:"location-or-place-name",measurement:"measurement",nameOrTitle:"name-or-title",none:"none",orderedOrRanked:"ordered-or-ranked",percentageOrRatio:"percentage-or-ratio",typeOrCategory:"type-or-category",uniqueIdentifier:"unique-identifier"});let y=n=class extends o.wq{constructor(e){super(e),this.alias=null,this.defaultValue=void 0,this.description=null,this.domain=null,this.editable=!0,this.length=void 0,this.name=null,this.nullable=!0,this.type=null,this.valueType=null,this.visible=!0}readDescription(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?.value??null}readValueType(e,{description:t}){let r=null;try{r=t?JSON.parse(t):null}catch(e){}return r?f.fromJSON(r.fieldValueType):null}clone(){return new n({alias:this.alias,defaultValue:this.defaultValue,description:this.description,domain:this.domain&&this.domain.clone()||null,editable:this.editable,length:this.length,name:this.name,nullable:this.nullable,type:this.type,valueType:this.valueType,visible:this.visible})}};(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"alias",void 0),(0,s._)([(0,a.Cb)({type:[String,Number],json:{write:{allowNull:!0}}})],y.prototype,"defaultValue",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"description",void 0),(0,s._)([(0,c.r)("description")],y.prototype,"readDescription",null),(0,s._)([(0,a.Cb)({types:d.V5,json:{read:{reader:d.im},write:!0}})],y.prototype,"domain",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"editable",void 0),(0,s._)([(0,a.Cb)({type:l.z8,json:{write:{overridePolicy:e=>({enabled:Number.isFinite(e)})}}})],y.prototype,"length",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],y.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],y.prototype,"nullable",void 0),(0,s._)([(0,u.J)(p.v)],y.prototype,"type",void 0),(0,s._)([(0,a.Cb)()],y.prototype,"valueType",void 0),(0,s._)([(0,c.r)("valueType",["description"])],y.prototype,"readValueType",null),(0,s._)([(0,a.Cb)({type:Boolean,json:{read:!1}})],y.prototype,"visible",void 0),y=n=(0,s._)([(0,h.j)("esri.layers.support.Field")],y);const g=y},72729:(e,t,r)=>{r.d(t,{im:()=>k,V5:()=>T}),r(80442);var n,s=r(43697),i=r(22974),o=r(5600),a=(r(75215),r(36030)),l=r(52011),u=r(96674);r(67676);let c=n=class extends u.wq{constructor(e){super(e),this.name=null,this.code=null}clone(){return new n({name:this.name,code:this.code})}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,o.Cb)({type:[String,Number],json:{write:!0}})],c.prototype,"code",void 0),c=n=(0,s._)([(0,l.j)("esri.layers.support.CodedValue")],c);const h=new(r(35454).X)({inherited:"inherited",codedValue:"coded-value",range:"range"});let d=class extends u.wq{constructor(e){super(e),this.name=null,this.type=null}};(0,s._)([(0,o.Cb)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,s._)([(0,a.J)(h)],d.prototype,"type",void 0),d=(0,s._)([(0,l.j)("esri.layers.support.Domain")],d);const p=d;var f;let y=f=class extends p{constructor(e){super(e),this.codedValues=null,this.type="coded-value"}getName(e){let t=null;if(this.codedValues){const r=String(e);this.codedValues.some((e=>(String(e.code)===r&&(t=e.name),!!t)))}return t}clone(){return new f({codedValues:(0,i.d9)(this.codedValues),name:this.name})}};(0,s._)([(0,o.Cb)({type:[c],json:{write:!0}})],y.prototype,"codedValues",void 0),(0,s._)([(0,a.J)({codedValue:"coded-value"})],y.prototype,"type",void 0),y=f=(0,s._)([(0,l.j)("esri.layers.support.CodedValueDomain")],y);const g=y;var m;r(92604),r(20102);let _=m=class extends p{constructor(e){super(e),this.type="inherited"}clone(){return new m}};(0,s._)([(0,a.J)({inherited:"inherited"})],_.prototype,"type",void 0),_=m=(0,s._)([(0,l.j)("esri.layers.support.InheritedDomain")],_);const b=_;var w;let x=w=class extends p{constructor(e){super(e),this.maxValue=null,this.minValue=null,this.type="range"}clone(){return new w({maxValue:this.maxValue,minValue:this.minValue,name:this.name})}};(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[1]},write:{enabled:!1,overridePolicy(){return{enabled:null!=this.maxValue&&null==this.minValue}},target:"range",writer(e,t,r){t[r]=[this.minValue||0,e]}}}})],x.prototype,"maxValue",void 0),(0,s._)([(0,o.Cb)({json:{type:[Number],read:{source:"range",reader:(e,t)=>t.range?.[0]},write:{target:"range",writer(e,t,r){t[r]=[e,this.maxValue||0]}}}})],x.prototype,"minValue",void 0),(0,s._)([(0,a.J)({range:"range"})],x.prototype,"type",void 0),x=w=(0,s._)([(0,l.j)("esri.layers.support.RangeDomain")],x);const v=x,T={key:"type",base:p,typeMap:{range:x,"coded-value":g,inherited:b}};function k(e){if(!e?.type)return null;switch(e.type){case"range":return v.fromJSON(e);case"codedValue":return g.fromJSON(e);case"inherited":return b.fromJSON(e)}return null}},86719:(e,t,r)=>{r.d(t,{v:()=>n});const n=new(r(35454).X)({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeString:"string",esriFieldTypeDate:"date",esriFieldTypeOID:"oid",esriFieldTypeGeometry:"geometry",esriFieldTypeBlob:"blob",esriFieldTypeRaster:"raster",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"global-id",esriFieldTypeXML:"xml",esriFieldTypeBigInteger:"big-integer",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"})},77863:(e,t,r)=>{r.d(t,{G$:()=>T,K9:()=>F,wn:()=>_});var n=r(20102),s=r(45091),i=r(5428),o=r(78760);const a=["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"],u=["upperLeft","lowerLeft"];function c(e){return e>=a.length?null:a[e]}function h(e){return e>=l.length?null:l[e]}function d(e){return e>=u.length?null:u[e]}function p(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function f(e,t,r){const n=e.asUnsafe(),s=t.createPointGeometry(r);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),r=n.pos()+e;let i=0;for(;n.pos()<r;)t.addCoordinatePoint(s,n.getSInt64(),i++);break}default:n.skip()}return s}function y(e,t,r){const n=e.asUnsafe(),s=t.createGeometry(r),i=2+(r.hasZ?1:0)+(r.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),r=n.pos()+e;let i=0;for(;n.pos()<r;)t.addLength(s,n.getUInt32(),i++);break}case 3:{const e=n.getUInt32(),r=n.pos()+e;let o=0;for(t.allocateCoordinates(s);n.pos()<r;)t.addCoordinate(s,n.getSInt64(),o),o++,o===i&&(o=0);break}default:n.skip()}return s}function g(e){const t=e.asUnsafe(),r=new i.Z;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)r.coords.push(t.getSInt64());break}case 1:n=o.S[t.getEnum()];break;default:t.skip()}return{queryGeometry:r,queryGeometryType:n}}function m(e){const 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 _(e){const t=e.asUnsafe(),r={type:c(0)};for(;t.next();)switch(t.tag()){case 1:r.name=t.getString();break;case 2:r.type=c(t.getEnum());break;case 3:r.alias=t.getString();break;case 4:r.sqlType=h(t.getEnum());break;case 5:default:t.skip();break;case 6:r.defaultValue=t.getString()}return r}function b(e){const 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}function w(e,t,r,n){const s=t.createFeature(r);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[i++].name;s.attributes[t]=e.processMessage(m);break}case 2:s.geometry=e.processMessageWithArgs(y,t,r);break;case 4:s.centroid=e.processMessageWithArgs(f,t,r);break;default:e.skip()}return s}function x(e){const 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 v(e){const 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 T(e){const t={originPosition:d(0)},r=e.asUnsafe();for(;r.next();)switch(r.tag()){case 1:t.originPosition=d(r.getEnum());break;case 2:t.scale=r.processMessage(x);break;case 3:t.translate=r.processMessage(v);break;default:r.skip()}return t}function k(e){const 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 I(e,t){const r=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:r.wkid=e.getUInt32();break;case 5:r.wkt=e.getString();break;case 2:r.latestWkid=e.getUInt32();break;case 3:r.vcsWkid=e.getUInt32();break;case 4:r.latestVcsWkid=e.getUInt32();break;default:e.skip()}return r}function M(e,t){const r=t.createFeatureResult(),n=e.asUnsafe();r.geometryType=p(t,0);let s=!1;for(;n.next();)switch(n.tag()){case 1:r.objectIdFieldName=n.getString();break;case 3:r.globalIdFieldName=n.getString();break;case 4:r.geohashFieldName=n.getString();break;case 5:r.geometryProperties=n.processMessage(k);break;case 7:r.geometryType=p(t,n.getEnum());break;case 8:r.spatialReference=n.processMessageWithArgs(I,t);break;case 10:r.hasZ=n.getBool();break;case 11:r.hasM=n.getBool();break;case 12:r.transform=n.processMessage(T);break;case 9:r.exceededTransferLimit=n.getBool();break;case 13:t.addField(r,n.processMessage(_));break;case 15:s||(t.prepareFeatures(r),s=!0),t.addFeature(r,n.processMessageWithArgs(w,t,r,r.fields));break;case 2:r.uniqueIdField=n.processMessage(b);break;default:n.skip()}return t.finishFeatureResult(r),r}function G(e,t){const r={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(g);break;case 1:r.featureResult=e.processMessageWithArgs(M,t);break;default:e.skip()}return null!=n&&r.featureResult&&t.addQueryGeometry(r,n),r}function F(e,t){try{const r=2,n=new s.Z(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===r?i.queryResult=n.processMessageWithArgs(G,t):n.skip();return i}catch(e){throw new n.Z("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},78760:(e,t,r)=>{r.d(t,{J:()=>u,S:()=>l});var n=r(67900),s=r(8744),i=r(70272),o=r(44876),a=r(5428);const l=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class u{constructor(e){this._options=e,this.geometryTypes=l,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new o.Z}prepareFeatures(e){this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++}finishFeatureResult(e){if(!e?.features||!e.hasZ||!this._options.sourceSpatialReference||!e.spatialReference||(0,s.fS)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n._R)(this._options.sourceSpatialReference)/(0,n._R)(e.spatialReference);if(1!==t)for(const r of e.features){if(!(0,i.S6)(r))continue;const e=r.geometry.coords;for(let r=2;r<e.length;r+=3)e[r]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.u_}createSpatialReference(){return{wkid:0}}createGeometry(){return new a.Z}addField(e,t){e.fields.push(t)}allocateCoordinates(e){e.coords.length=e.lengths.reduce(((e,t)=>e+t),0)*this._vertexDimension,this._coordinatePtr=0}addCoordinate(e,t){e.coords[this._coordinatePtr++]=t}addCoordinatePoint(e,t){e.coords.push(t)}addLength(e,t){e.lengths.push(t)}addQueryGeometry(e,t){e.queryGeometry=t.queryGeometry,e.queryGeometryType=t.queryGeometryType}createPointGeometry(){return new a.Z}}},45178:(e,t,r)=>{r.d(t,{C:()=>s});var n=r(77863);function s(e,t){const r=(0,n.K9)(e,t),s=r.queryResult.featureResult,i=r.queryResult.queryGeometry,o=r.queryResult.queryGeometryType;if(s&&s.features&&s.features.length&&s.objectIdFieldName){const e=s.objectIdFieldName;for(const t of s.features)t.attributes&&(t.objectId=t.attributes[e])}return s&&(s.queryGeometry=i,s.queryGeometryType=o),s}},61916:(e,t,r)=>{r.r(t),r.d(t,{default:()=>w});var n=r(74085),s=r(99001),i=r(82971),o=r(69285),a=(r(80442),r(1533),r(60437),r(24470),r(82397),r(86973),r(1231));r(8744);class l{constructor(e,t,r){this.uid=e,this.geometry=t,this.attributes=r,this.visible=!0,this.objectId=null,this.centroid=null}}class u{constructor(){this.exceededTransferLimit=!1,this.features=[],this.fields=[],this.hasM=!1,this.hasZ=!1,this.geometryType=null,this.objectIdFieldName=null,this.globalIdFieldName=null,this.geometryProperties=null,this.geohashFieldName=null,this.spatialReference=null,this.transform=null}}var c=r(98732);function h(e,t){return t}function d(e,t,r,n){switch(r){case 0:return g(e,t+n,0);case 1:return"lowerLeft"===e.originPosition?g(e,t+n,1):function({translate:e,scale:t},r,n){return e[n]-r*t[n]}(e,t+n,1)}}function p(e,t,r,n){return 2===r?g(e,t,2):d(e,t,r,n)}function f(e,t,r,n){return 2===r?g(e,t,3):d(e,t,r,n)}function y(e,t,r,n){return 3===r?g(e,t,3):p(e,t,r,n)}function g({translate:e,scale:t},r,n){return e[n]+r*t[n]}class m{constructor(e){this._options=e,this.geometryTypes=["point","multipoint","polyline","polygon"],this._previousCoordinate=[0,0],this._transform=null,this._applyTransform=h,this._lengths=[],this._currentLengthIndex=0,this._toAddInCurrentPath=0,this._vertexDimension=0,this._coordinateBuffer=null,this._coordinateBufferPtr=0,this._attributesConstructor=class{}}createFeatureResult(){return new u}finishFeatureResult(e){if(this._options.applyTransform&&(e.transform=null),this._attributesConstructor=class{},this._coordinateBuffer=null,this._lengths.length=0,!e.hasZ)return;const t=(0,o.k)(e.geometryType,this._options.sourceSpatialReference,e.spatialReference);if(null!=t)for(const r of e.features)t(r.geometry)}createSpatialReference(){return new i.Z}addField(e,t){e.fields.push(a.Z.fromJSON(t));const r=e.fields.map((e=>e.name));this._attributesConstructor=function(){for(const e of r)this[e]=null}}addFeature(e,t){const r=this._options.maxStringAttributeLength??0;if(r>0)for(const e in t.attributes){const n=t.attributes[e];"string"==typeof n&&n.length>r&&(t.attributes[e]="")}e.features.push(t)}addQueryGeometry(e,t){const{queryGeometry:r,queryGeometryType:n}=t,s=(0,c.$g)(r.clone(),r,!1,!1,this._transform),i=(0,c.di)(s,n,!1,!1);let o=null;switch(n){case"esriGeometryPoint":o="point";break;case"esriGeometryPolygon":o="polygon";break;case"esriGeometryPolyline":o="polyline";break;case"esriGeometryMultipoint":o="multipoint"}i.type=o,e.queryGeometryType=n,e.queryGeometry=i}prepareFeatures(e){switch(this._transform=e.transform??null,this._options.applyTransform&&e.transform&&(this._applyTransform=this._deriveApplyTransform(e)),this._vertexDimension=2,e.hasZ&&this._vertexDimension++,e.hasM&&this._vertexDimension++,e.geometryType){case"point":this.addCoordinate=(e,t,r)=>this.addCoordinatePoint(e,t,r),this.createGeometry=e=>this.createPointGeometry(e);break;case"polygon":this.addCoordinate=(e,t,r)=>this._addCoordinatePolygon(e,t,r),this.createGeometry=e=>this._createPolygonGeometry(e);break;case"polyline":this.addCoordinate=(e,t,r)=>this._addCoordinatePolyline(e,t,r),this.createGeometry=e=>this._createPolylineGeometry(e);break;case"multipoint":this.addCoordinate=(e,t,r)=>this._addCoordinateMultipoint(e,t,r),this.createGeometry=e=>this._createMultipointGeometry(e);break;case"mesh":case"extent":break;default:(0,n.Bg)(e.geometryType)}}createFeature(){return this._lengths.length=0,this._currentLengthIndex=0,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0,new l((0,s.D)(),null,new this._attributesConstructor)}allocateCoordinates(){const e=this._lengths.reduce(((e,t)=>e+t),0);this._coordinateBuffer=new Float64Array(e*this._vertexDimension),this._coordinateBufferPtr=0}addLength(e,t){0===this._lengths.length&&(this._toAddInCurrentPath=t),this._lengths.push(t)}createPointGeometry(e){const t={type:"point",x:0,y:0,spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM};return t.hasZ&&(t.z=0),t.hasM&&(t.m=0),t}addCoordinatePoint(e,t,r){const n=this._transform?this._applyTransform(this._transform,t,r,0):t;if(null!=n)switch(r){case 0:e.x=n;break;case 1:e.y=n;break;case 2:e.hasZ?e.z=n:e.m=n;break;case 3:e.m=n}}_transformPathLikeValue(e,t){let r=0;return t<=1&&(r=this._previousCoordinate[t],this._previousCoordinate[t]+=e),this._transform?this._applyTransform(this._transform,e,t,r):e}_addCoordinatePolyline(e,t,r){this._dehydratedAddPointsCoordinate(e.paths,t,r)}_addCoordinatePolygon(e,t,r){this._dehydratedAddPointsCoordinate(e.rings,t,r)}_addCoordinateMultipoint(e,t,r){0===r&&e.points.push([]);const n=this._transformPathLikeValue(t,r);e.points[e.points.length-1].push(n)}_createPolygonGeometry(e){return{type:"polygon",rings:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createPolylineGeometry(e){return{type:"polyline",paths:[[]],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_createMultipointGeometry(e){return{type:"multipoint",points:[],spatialReference:e.spatialReference,hasZ:!!e.hasZ,hasM:!!e.hasM}}_dehydratedAddPointsCoordinate(e,t,r){0===r&&0==this._toAddInCurrentPath--&&(e.push([]),this._toAddInCurrentPath=this._lengths[++this._currentLengthIndex]-1,this._previousCoordinate[0]=0,this._previousCoordinate[1]=0);const n=this._transformPathLikeValue(t,r),s=e[e.length-1],i=this._coordinateBuffer;if(i){if(0===r){const e=this._coordinateBufferPtr*Float64Array.BYTES_PER_ELEMENT;s.push(new Float64Array(i.buffer,e,this._vertexDimension))}i[this._coordinateBufferPtr++]=n}}_deriveApplyTransform(e){const{hasZ:t,hasM:r}=e;return t&&r?y:t?p:r?f:d}}var _=r(45178);class b{_parseFeatureQuery(e){const t=(0,_.C)(e.buffer,new m(e.options)),r={...t,spatialReference:t.spatialReference?.toJSON(),fields:t.fields?t.fields.map((e=>e.toJSON())):void 0};return Promise.resolve(r)}}function w(){return new b}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7374],{84552:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),s=r(2368),o=r(96674),n=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(36030)),d=r(52011),u=r(78981);let p=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.J)(u.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,d.j)("esri.TimeInterval")],p);const y=p},91040:(e,t,r)=>{r.d(t,{o2:()=>a,yZ:()=>n});var i=r(22021),s=r(67900);const o=96;function n(e,t){const r=t||e.extent,i=e.width,n=(0,s.c9)(r?.spatialReference);return r&&i?r.width/i*n*s.hd*o:0}function a(e,t,r){return function(e,t){return 0===t||(0,i.W8)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.W8)(e,t)||e>t}(e,r)}},27374:(e,t,r)=>{r.r(t),r.d(t,{default:()=>A});var i=r(43697),s=r(3172),o=r(92835),n=r(20102),a=r(68668),l=r(16453),d=r(95330),u=r(5600),p=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),c=r(30556),h=r(31263),f=r(6570),b=r(91040),v=r(8744),g=r(87085),_=r(54295),w=r(7944),x=r(17287),S=r(71612),I=r(17017),T=r(38009),C=r(16859),O=r(34760),E=r(72965),L=r(10343),N=r(28294),U=r(21506),F=r(92036),j=r(42033);function Z(e,t){return"floorInfo"in t&&t.floorInfo?.floorField?function(e,t){if(!e?.length)return null;const r=e.filter((e=>""!==e)).map((e=>`'${e}'`));return r.push("''"),`${t} IN (${r.join(",")}) OR ${t} IS NULL`}(e,t.floorInfo.floorField):null}var D=r(32073);const M={visible:"visibleSublayers",definitionExpression:"layerDefs",labelingInfo:"hasDynamicLayers",labelsVisible:"hasDynamicLayers",opacity:"hasDynamicLayers",minScale:"visibleSublayers",maxScale:"visibleSublayers",renderer:"hasDynamicLayers",source:"hasDynamicLayers"};let P=class extends F.Z{constructor(e){super(e),this.floors=null,this.scale=0}destroy(){this.layer=null}get dynamicLayers(){if(!this.hasDynamicLayers)return null;const e=this.visibleSublayers.map((e=>{const t=Z(this.floors,e);return e.toExportImageJSON(t)}));return e.length?JSON.stringify(e):null}get hasDynamicLayers(){return this.layer&&(0,D.FN)(this.visibleSublayers,this.layer.serviceSublayers,this.layer.gdbVersion)}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.allSublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("sublayer-update",(e=>this.notifyChange(M[e.propertyName])))],"layer"))}get layers(){const e=this.visibleSublayers;return e?e.length?"show:"+e.map((e=>e.id)).join(","):"show:-1":null}get layerDefs(){const e=!!this.floors?.length,t=this.visibleSublayers.filter((t=>null!=t.definitionExpression||e&&null!=t.floorInfo));return t.length?JSON.stringify(t.reduce(((e,t)=>{const r=Z(this.floors,t),i=(0,j._)(r,t.definitionExpression);return null!=i&&(e[t.id]=i),e}),{})):null}get version(){this.commitProperty("layers"),this.commitProperty("layerDefs"),this.commitProperty("dynamicLayers"),this.commitProperty("timeExtent");const e=this.layer;return e&&(e.commitProperty("dpi"),e.commitProperty("imageFormat"),e.commitProperty("imageTransparency"),e.commitProperty("gdbVersion")),(this._get("version")||0)+1}get visibleSublayers(){const e=[];if(!this.layer)return e;const t=this.layer.sublayers,r=this.scale,i=t=>{t.visible&&(0===r||(0,b.o2)(r,t.minScale,t.maxScale))&&(t.sublayers?t.sublayers.forEach(i):e.unshift(t))};t&&t.forEach(i);const s=this._get("visibleSublayers");return!s||s.length!==e.length||s.some(((t,r)=>e[r]!==t))?e:s}toJSON(){const e=this.layer;let t={dpi:e.dpi,format:e.imageFormat,transparent:e.imageTransparency,gdbVersion:e.gdbVersion||null};return this.hasDynamicLayers&&this.dynamicLayers?t.dynamicLayers=this.dynamicLayers:t={...t,layers:this.layers,layerDefs:this.layerDefs},t}};(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"dynamicLayers",null),(0,i._)([(0,u.Cb)()],P.prototype,"floors",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"hasDynamicLayers",null),(0,i._)([(0,u.Cb)()],P.prototype,"layer",null),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"layers",null),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"layerDefs",null),(0,i._)([(0,u.Cb)({type:Number})],P.prototype,"scale",void 0),(0,i._)([(0,u.Cb)(U.qG)],P.prototype,"timeExtent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"version",null),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"visibleSublayers",null),P=(0,i._)([(0,m.j)("esri.layers.mixins.ExportImageParameters")],P);var J=r(90082),R=r(49867),k=r(60199),V=r(25031);let q=class extends((0,S.h)((0,N.n)((0,E.M)((0,L.x)((0,w.O)((0,x.Y)((0,T.q)((0,C.I)((0,l.R)((0,O.Q)((0,_.V)((0,I.N)(g.Z))))))))))))){constructor(...e){super(...e),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(d.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("PNG32")?"png32":"png24"}writeSublayers(e,t,r,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let o=!1;if(this.capabilities&&this.capabilities.operations.supportsExportMap&&this.capabilities.exportMap?.supportsDynamicLayers){const e=(0,h.M9)(i.origin);if(e===h.s3.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;o=(0,D.QV)(s,e,h.s3.SERVICE)}else if(e>h.s3.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");o=(0,D.QV)(s,e.sublayers,(0,h.M9)(e.origin))}}const n=[],a={writeSublayerStructure:o,...i};let l=o;s.forEach((e=>{const t=e.write({},a);n.push(t),l=l||"user"===e.originOf("visible")})),n.some((e=>Object.keys(e).length>1))&&(t.layers=n),l&&(t.visibleLayers=s.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,t,r,i){const s=i?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian());const o=new P({layer:this,floors:i?.floors,scale:(0,b.yZ)({extent:e,width:t})*s}),n=o.toJSON();o.destroy();const a=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},l=e?.spatialReference,d=(0,v.B9)(l);n.dpi*=s;const u={};if(i?.timeExtent){const{start:e,end:t}=i.timeExtent.toJSON();u.time=e&&t&&e===t?""+e:`${e??"null"},${t??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(u.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:d,imageSR:d,size:t+","+r,...n,...a,...u}}async fetchImage(e,t,r,i){const{data:s}=await this._fetchImage("image",e,t,r,i);return s}async fetchImageBitmap(e,t,r,i){const{data:s,url:o}=await this._fetchImage("blob",e,t,r,i);return(0,J.g)(s,o,i?.signal)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:r}=await(0,s.Z)(this.url,t),{extent:i,fullExtent:n,timeExtent:a}=r,l=i||n;return{fullExtent:l&&f.Z.fromJSON(l),timeExtent:a&&o.Z.fromJSON({start:a[0],end:a[1]})}}loadAll(){return(0,a.G)(this,(e=>{e(this.allSublayers)}))}serviceSupportsSpatialReference(e){return(0,k.D)(this,e)}async _fetchImage(e,t,r,i,o){const a={responseType:e,signal:o?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,r,i,o),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},l=this.parsedUrl.path+"/export";if(null!=a.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new n.Z("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:a.query});try{const{data:e}=await(0,s.Z)(l,a);return{data:e,url:l}}catch(e){if((0,d.D_)(e))throw e;throw new n.Z("mapimagelayer:image-fetch-error",`Unable to load image: ${l}`,{error:e})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:r}=await(0,s.Z)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});r&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}};(0,i._)([(0,u.Cb)((0,V.mi)("dateFieldsTimeReference"))],q.prototype,"dateFieldsTimeZone",void 0),(0,i._)([(0,u.Cb)({type:Boolean})],q.prototype,"datesInUnknownTimezone",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"dpi",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"gdbVersion",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"imageFormat",void 0),(0,i._)([(0,y.r)("imageFormat",["supportedImageFormatTypes"])],q.prototype,"readImageFormat",null),(0,i._)([(0,u.Cb)({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],q.prototype,"imageMaxHeight",void 0),(0,i._)([(0,u.Cb)({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],q.prototype,"imageMaxWidth",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"imageTransparency",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],q.prototype,"isReference",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1}})],q.prototype,"labelsVisible",void 0),(0,i._)([(0,u.Cb)({type:["ArcGISMapServiceLayer"]})],q.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1}})],q.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)((0,V.mi)("preferredTimeReference"))],q.prototype,"preferredTimeZone",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"sourceJSON",void 0),(0,i._)([(0,u.Cb)({json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,i._)([(0,c.c)("sublayers",{layers:{type:[R.Z]},visibleLayers:{type:[p.z8]}})],q.prototype,"writeSublayers",null),(0,i._)([(0,u.Cb)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},readOnly:!0,value:"map-image"})],q.prototype,"type",void 0),(0,i._)([(0,u.Cb)(U.HQ)],q.prototype,"url",void 0),q=(0,i._)([(0,m.j)("esri.layers.MapImageLayer")],q);const A=q},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>y});var i=r(43697),s=r(92835),o=r(84552),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),d=r(35671),u=r(76259),p=r(78981);const y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=p.v.fromJSON(r.timeOffsetUnits);return i&&s?new o.Z({value:i,unit:s}):null}set timeInfo(e){(0,d.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.Cb)({type:o.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,a.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.Cb)({value:null,type:u.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.TemporalLayer")],t),t}},76259:(e,t,r)=>{r.d(t,{Z:()=>h});var i=r(43697),s=r(92835),o=r(84552),n=r(2368),a=r(96674),l=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556),y=r(25031);function m(e,t){return o.Z.fromJSON({value:e,unit:t})}let c=class extends((0,n.J)(a.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new s.Z({start:r,end:i})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],c.prototype,"cumulative",void 0),(0,i._)([(0,l.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"endField",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"fullTimeExtent",void 0),(0,i._)([(0,d.r)("fullTimeExtent",["timeExtent"])],c.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.c)("fullTimeExtent")],c.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"hasLiveData",void 0),(0,i._)([(0,l.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"interval",void 0),(0,i._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],c.prototype,"readInterval",null),(0,i._)([(0,p.c)("interval")],c.prototype,"writeInterval",null),(0,i._)([(0,l.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"startField",void 0),(0,i._)([(0,l.Cb)((0,y.mi)("timeReference",!0))],c.prototype,"timeZone",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"trackIdField",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],c.prototype,"useTime",void 0),c=(0,i._)([(0,u.j)("esri.layers.support.TimeInfo")],c);const h=c},60199:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(66677);const s=[];function o(e,t){if((0,i.M8)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7374],{84552:(e,t,r)=>{r.d(t,{Z:()=>y});var i=r(43697),s=r(2368),o=r(96674),n=r(35463),a=r(5600),l=(r(75215),r(67676),r(80442),r(36030)),d=r(52011),u=r(78981);let p=class extends((0,s.J)(o.wq)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,n.rJ)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.J)(u.v,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,a.Cb)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,d.j)("esri.TimeInterval")],p);const y=p},91040:(e,t,r)=>{r.d(t,{o2:()=>a,yZ:()=>n});var i=r(22021),s=r(67900);const o=96;function n(e,t){const r=t||e.extent,i=e.width,n=(0,s.c9)(r?.spatialReference);return r&&i?r.width/i*n*s.hd*o:0}function a(e,t,r){return function(e,t){return 0===t||(0,i.W8)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.W8)(e,t)||e>t}(e,r)}},27374:(e,t,r)=>{r.r(t),r.d(t,{default:()=>A});var i=r(43697),s=r(3172),o=r(92835),n=r(20102),a=r(68668),l=r(16453),d=r(95330),u=r(5600),p=r(75215),y=(r(67676),r(80442),r(71715)),m=r(52011),c=r(30556),h=r(31263),f=r(6570),b=r(91040),v=r(8744),g=r(87085),_=r(54295),w=r(7944),x=r(17287),S=r(71612),I=r(17017),T=r(38009),C=r(16859),O=r(34760),E=r(72965),L=r(10343),N=r(28294),U=r(21506),F=r(92036),j=r(42033);function Z(e,t){return"floorInfo"in t&&t.floorInfo?.floorField?function(e,t){if(!e?.length)return null;const r=e.filter((e=>""!==e)).map((e=>`'${e}'`));return r.push("''"),`${t} IN (${r.join(",")}) OR ${t} IS NULL`}(e,t.floorInfo.floorField):null}var D=r(32073);const M={visible:"visibleSublayers",definitionExpression:"layerDefs",labelingInfo:"hasDynamicLayers",labelsVisible:"hasDynamicLayers",opacity:"hasDynamicLayers",minScale:"visibleSublayers",maxScale:"visibleSublayers",renderer:"hasDynamicLayers",source:"hasDynamicLayers"};let P=class extends F.Z{constructor(e){super(e),this.floors=null,this.scale=0}destroy(){this.layer=null}get dynamicLayers(){if(!this.hasDynamicLayers)return null;const e=this.visibleSublayers.map((e=>{const t=Z(this.floors,e);return e.toExportImageJSON(t)}));return e.length?JSON.stringify(e):null}get hasDynamicLayers(){return this.layer&&(0,D.FN)(this.visibleSublayers,this.layer.serviceSublayers,this.layer.gdbVersion)}set layer(e){this._get("layer")!==e&&(this._set("layer",e),this.removeHandles("layer"),e&&this.addHandles([e.allSublayers.on("change",(()=>this.notifyChange("visibleSublayers"))),e.on("sublayer-update",(e=>this.notifyChange(M[e.propertyName])))],"layer"))}get layers(){const e=this.visibleSublayers;return e?e.length?"show:"+e.map((e=>e.id)).join(","):"show:-1":null}get layerDefs(){const e=!!this.floors?.length,t=this.visibleSublayers.filter((t=>null!=t.definitionExpression||e&&null!=t.floorInfo));return t.length?JSON.stringify(t.reduce(((e,t)=>{const r=Z(this.floors,t),i=(0,j._)(r,t.definitionExpression);return null!=i&&(e[t.id]=i),e}),{})):null}get version(){this.commitProperty("layers"),this.commitProperty("layerDefs"),this.commitProperty("dynamicLayers"),this.commitProperty("timeExtent");const e=this.layer;return e&&(e.commitProperty("dpi"),e.commitProperty("imageFormat"),e.commitProperty("imageTransparency"),e.commitProperty("gdbVersion")),(this._get("version")||0)+1}get visibleSublayers(){const e=[];if(!this.layer)return e;const t=this.layer.sublayers,r=this.scale,i=t=>{t.visible&&(0===r||(0,b.o2)(r,t.minScale,t.maxScale))&&(t.sublayers?t.sublayers.forEach(i):e.unshift(t))};t&&t.forEach(i);const s=this._get("visibleSublayers");return!s||s.length!==e.length||s.some(((t,r)=>e[r]!==t))?e:s}toJSON(){const e=this.layer;let t={dpi:e.dpi,format:e.imageFormat,transparent:e.imageTransparency,gdbVersion:e.gdbVersion||null};return this.hasDynamicLayers&&this.dynamicLayers?t.dynamicLayers=this.dynamicLayers:t={...t,layers:this.layers,layerDefs:this.layerDefs},t}};(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"dynamicLayers",null),(0,i._)([(0,u.Cb)()],P.prototype,"floors",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"hasDynamicLayers",null),(0,i._)([(0,u.Cb)()],P.prototype,"layer",null),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"layers",null),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"layerDefs",null),(0,i._)([(0,u.Cb)({type:Number})],P.prototype,"scale",void 0),(0,i._)([(0,u.Cb)(U.qG)],P.prototype,"timeExtent",void 0),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"version",null),(0,i._)([(0,u.Cb)({readOnly:!0})],P.prototype,"visibleSublayers",null),P=(0,i._)([(0,m.j)("esri.layers.mixins.ExportImageParameters")],P);var J=r(90082),R=r(49867),k=r(60199),V=r(25031);let q=class extends((0,S.h)((0,N.n)((0,E.M)((0,L.x)((0,w.O)((0,x.Y)((0,T.q)((0,C.I)((0,l.R)((0,O.Q)((0,_.V)((0,I.N)(g.Z))))))))))))){constructor(...e){super(...e),this.dateFieldsTimeZone=null,this.datesInUnknownTimezone=!1,this.dpi=96,this.gdbVersion=null,this.imageFormat="png24",this.imageMaxHeight=2048,this.imageMaxWidth=2048,this.imageTransparency=!0,this.isReference=null,this.labelsVisible=!1,this.operationalLayerType="ArcGISMapServiceLayer",this.preferredTimeZone=null,this.sourceJSON=null,this.sublayers=null,this.type="map-image",this.url=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Map Service"]},e).catch(d.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}readImageFormat(e,t){const r=t.supportedImageFormatTypes;return r&&r.includes("PNG32")?"png32":"png24"}writeSublayers(e,t,r,i){if(!this.loaded||!e)return;const s=e.slice().reverse().flatten((({sublayers:e})=>e&&e.toArray().reverse())).toArray();let o=!1;if(this.capabilities&&this.capabilities.operations.supportsExportMap&&this.capabilities.exportMap?.supportsDynamicLayers){const e=(0,h.M9)(i.origin);if(e===h.s3.PORTAL_ITEM){const e=this.createSublayersForOrigin("service").sublayers;o=(0,D.QV)(s,e,h.s3.SERVICE)}else if(e>h.s3.PORTAL_ITEM){const e=this.createSublayersForOrigin("portal-item");o=(0,D.QV)(s,e.sublayers,(0,h.M9)(e.origin))}}const n=[],a={writeSublayerStructure:o,...i};let l=o;s.forEach((e=>{const t=e.write({},a);n.push(t),l=l||"user"===e.originOf("visible")})),n.some((e=>Object.keys(e).length>1))&&(t.layers=n),l&&(t.visibleLayers=s.filter((e=>e.visible)).map((e=>e.id)))}createExportImageParameters(e,t,r,i){const s=i?.pixelRatio||1;e&&this.version>=10&&(e=e.clone().shiftCentralMeridian());const o=new P({layer:this,floors:i?.floors,scale:(0,b.yZ)({extent:e,width:t})*s}),n=o.toJSON();o.destroy();const a=!i?.rotation||this.version<10.3?{}:{rotation:-i.rotation},l=e?.spatialReference,d=(0,v.B9)(l);n.dpi*=s;const u={};if(i?.timeExtent){const{start:e,end:t}=i.timeExtent.toJSON();u.time=e&&t&&e===t?""+e:`${e??"null"},${t??"null"}`}else this.timeInfo&&!this.timeInfo.hasLiveData&&(u.time="null,null");return{bbox:e&&e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:d,imageSR:d,size:t+","+r,...n,...a,...u}}async fetchImage(e,t,r,i){const{data:s}=await this._fetchImage("image",e,t,r,i);return s}async fetchImageBitmap(e,t,r,i){const{data:s,url:o}=await this._fetchImage("blob",e,t,r,i);return(0,J.g)(s,o,i?.signal)}async fetchRecomputedExtents(e={}){const t={...e,query:{returnUpdates:!0,f:"json",...this.customParameters,token:this.apiKey}},{data:r}=await(0,s.Z)(this.url,t),{extent:i,fullExtent:n,timeExtent:a}=r,l=i||n;return{fullExtent:l&&f.Z.fromJSON(l),timeExtent:a&&o.Z.fromJSON({start:a[0],end:a[1]})}}loadAll(){return(0,a.G)(this,(e=>{e(this.allSublayers)}))}serviceSupportsSpatialReference(e){return(0,k.D)(this,e)}async _fetchImage(e,t,r,i,o){const a={responseType:e,signal:o?.signal??null,query:{...this.parsedUrl.query,...this.createExportImageParameters(t,r,i,o),f:"image",...this.refreshParameters,...this.customParameters,token:this.apiKey}},l=this.parsedUrl.path+"/export";if(null!=a.query?.dynamicLayers&&!this.capabilities?.exportMap?.supportsDynamicLayers)throw new n.Z("mapimagelayer:dynamiclayer-not-supported",`service ${this.url} doesn't support dynamic layers, which is required to be able to change the sublayer's order, rendering, labeling or source.`,{query:a.query});try{const{data:e}=await(0,s.Z)(l,a);return{data:e,url:l}}catch(e){if((0,d.D_)(e))throw e;throw new n.Z("mapimagelayer:image-fetch-error",`Unable to load image: ${l}`,{error:e})}}async _fetchService(e){if(this.sourceJSON)return void this.read(this.sourceJSON,{origin:"service",url:this.parsedUrl});const{data:t,ssl:r}=await(0,s.Z)(this.parsedUrl.path,{query:{f:"json",...this.parsedUrl.query,...this.customParameters,token:this.apiKey},signal:e});r&&(this.url=this.url.replace(/^http:/i,"https:")),this.sourceJSON=t,this.read(t,{origin:"service",url:this.parsedUrl})}};(0,i._)([(0,u.Cb)((0,V.mi)("dateFieldsTimeReference"))],q.prototype,"dateFieldsTimeZone",void 0),(0,i._)([(0,u.Cb)({type:Boolean})],q.prototype,"datesInUnknownTimezone",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"dpi",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"gdbVersion",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"imageFormat",void 0),(0,i._)([(0,y.r)("imageFormat",["supportedImageFormatTypes"])],q.prototype,"readImageFormat",null),(0,i._)([(0,u.Cb)({json:{origins:{service:{read:{source:"maxImageHeight"}}}}})],q.prototype,"imageMaxHeight",void 0),(0,i._)([(0,u.Cb)({json:{origins:{service:{read:{source:"maxImageWidth"}}}}})],q.prototype,"imageMaxWidth",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"imageTransparency",void 0),(0,i._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],q.prototype,"isReference",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1}})],q.prototype,"labelsVisible",void 0),(0,i._)([(0,u.Cb)({type:["ArcGISMapServiceLayer"]})],q.prototype,"operationalLayerType",void 0),(0,i._)([(0,u.Cb)({json:{read:!1,write:!1}})],q.prototype,"popupEnabled",void 0),(0,i._)([(0,u.Cb)((0,V.mi)("preferredTimeReference"))],q.prototype,"preferredTimeZone",void 0),(0,i._)([(0,u.Cb)()],q.prototype,"sourceJSON",void 0),(0,i._)([(0,u.Cb)({json:{write:{ignoreOrigin:!0}}})],q.prototype,"sublayers",void 0),(0,i._)([(0,c.c)("sublayers",{layers:{type:[R.Z]},visibleLayers:{type:[p.z8]}})],q.prototype,"writeSublayers",null),(0,i._)([(0,u.Cb)({type:["show","hide","hide-children"]})],q.prototype,"listMode",void 0),(0,i._)([(0,u.Cb)({json:{read:!1},readOnly:!0,value:"map-image"})],q.prototype,"type",void 0),(0,i._)([(0,u.Cb)(U.HQ)],q.prototype,"url",void 0),q=(0,i._)([(0,m.j)("esri.layers.MapImageLayer")],q);const A=q},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this)))}};return(0,i._)([(0,o.Cb)()],t.prototype,"title",null),(0,i._)([(0,o.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},28294:(e,t,r)=>{r.d(t,{n:()=>y});var i=r(43697),s=r(92835),o=r(84552),n=r(5600),a=(r(75215),r(67676),r(80442),r(71715)),l=r(52011),d=r(69165),u=r(76259),p=r(78981);const y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const r=t.timeInfo.exportOptions;if(!r)return null;const i=r.timeOffset,s=p.v.fromJSON(r.timeOffsetUnits);return i&&s?new o.Z({value:i,unit:s}):null}set timeInfo(e){(0,d.UF)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,n.Cb)({type:s.Z,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,n.Cb)({type:o.Z})],t.prototype,"timeOffset",void 0),(0,i._)([(0,a.r)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,n.Cb)({value:null,type:u.Z,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,n.Cb)({type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation"},origins:{"web-scene":{read:!1,write:!1}}}})],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,l.j)("esri.layers.mixins.TemporalLayer")],t),t}},76259:(e,t,r)=>{r.d(t,{Z:()=>h});var i=r(43697),s=r(92835),o=r(84552),n=r(2368),a=r(96674),l=r(5600),d=(r(75215),r(67676),r(80442),r(71715)),u=r(52011),p=r(30556),y=r(25031);function m(e,t){return o.Z.fromJSON({value:e,unit:t})}let c=class extends((0,n.J)(a.wq)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0}readFullTimeExtent(e,t){if(!t.timeExtent||!Array.isArray(t.timeExtent)||2!==t.timeExtent.length)return null;const r=new Date(t.timeExtent[0]),i=new Date(t.timeExtent[1]);return new s.Z({start:r,end:i})}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=[e.start.getTime(),e.end.getTime()]:t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?m(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?m(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],c.prototype,"cumulative",void 0),(0,i._)([(0,l.Cb)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"endField",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"fullTimeExtent",void 0),(0,i._)([(0,d.r)("fullTimeExtent",["timeExtent"])],c.prototype,"readFullTimeExtent",null),(0,i._)([(0,p.c)("fullTimeExtent")],c.prototype,"writeFullTimeExtent",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"hasLiveData",void 0),(0,i._)([(0,l.Cb)({type:o.Z,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"interval",void 0),(0,i._)([(0,d.r)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],c.prototype,"readInterval",null),(0,i._)([(0,p.c)("interval")],c.prototype,"writeInterval",null),(0,i._)([(0,l.Cb)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],c.prototype,"startField",void 0),(0,i._)([(0,l.Cb)((0,y.mi)("timeReference",!0))],c.prototype,"timeZone",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],c.prototype,"trackIdField",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],c.prototype,"useTime",void 0),c=(0,i._)([(0,u.j)("esri.layers.support.TimeInfo")],c);const h=c},60199:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(66677);const s=[];function o(e,t){if((0,i.M8)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}])},78981:(e,t,r)=>{r.d(t,{v:()=>i});const i=(0,r(35454).w)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6882,9379],{13598:(e,t,r)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(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]]}function n(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>i,a:()=>s,b:()=>a,c:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:s,createView:n,fromValues:function(e,t,r,s,a,n,i,o,l,u,d,p,c,y,h,f){return[e,t,r,s,a,n,i,o,l,u,d,p,c,y,h,f]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>i,c:()=>a,d:()=>d,e:()=>l,n:()=>p,s:()=>u,t:()=>n});var s=r(72220);function a(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return s.c.error("source and destination buffers need to have the same number of elements"),e;const i=e.length/a,o=r[0],l=r[1],u=r[2],d=r[4],p=r[5],c=r[6],y=r[8],h=r[9],f=r[10],m=r[12],g=r[13],b=r[14];let w=0,F=0;for(let r=0;r<i;r++){const r=t[w],s=t[w+1],i=t[w+2];e[F]=o*r+d*s+y*i+m,e[F+1]=l*r+p*s+h*i+g,e[F+2]=u*r+c*s+f*i+b,w+=n,F+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return void s.c.error("source and destination buffers need to have the same number of elements");const i=e.length/a,o=r[0],l=r[1],u=r[2],d=r[3],p=r[4],c=r[5],y=r[6],h=r[7],f=r[8];let m=0,g=0;for(let r=0;r<i;r++){const r=t[m],s=t[m+1],i=t[m+2];e[g]=o*r+d*s+y*i,e[g+1]=l*r+p*s+h*i,e[g+2]=u*r+c*s+f*i,m+=n,g+=a}}function l(e,t,r){u(e.typedBuffer,t,r,e.typedBufferStride)}function u(e,t,r,s=3){const a=Math.min(e.length/s,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,l=0;for(let t=0;t<a;t++)e[l]=r*n[o],e[l+1]=r*n[o+1],e[l+2]=r*n[o+2],o+=i,l+=s}function d(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,s=r){const a=Math.min(e.length/r,t.length/s);let n=0,i=0;for(let o=0;o<a;o++){const a=t[n],o=t[n+1],l=t[n+2],u=a*a+o*o+l*l;if(u>0){const t=1/Math.sqrt(u);e[i]=t*a,e[i+1]=t*o,e[i+2]=t*l}n+=s,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:d,scale:u,scaleView:l,shiftRight:function(e,t,r){const s=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let l=0,u=0;for(let e=0;e<s;e++)a[u]=i[l]>>r,a[u+1]=i[l+1]>>r,a[u+2]=i[l+2]>>r,l+=o,u+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:a},Symbol.toStringTag,{value:"Module"}))},85872:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),a=r(2368),n=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),l=r(52011),u=r(65617),d=r(94139);let p=class extends((0,a.J)(n.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(e){const[t,r,s]=this.origin;return new d.Z({x:t,y:r,z:s,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:r}){this.origin=(0,u.f)(e,t,r??0)}};(0,s._)([(0,o.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],p.prototype,"type",void 0),(0,s._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,s._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],p);const c=p},72220:(e,t,r)=>{r.d(t,{c:()=>s});const s=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>h,LL:()=>l,NZ:()=>u,fV:()=>f,vj:()=>g,yT:()=>w,zE:()=>b});var s=r(3172),a=r(67676),n=r(95330),i=r(2981);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,a.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.k_)(e),new Blob(r)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,s.Z)(this.partUrl,{responseType:"blob"});return(0,n.k_)(e),t}}function u(e){return function(e){return!!e&&(Array.isArray(e)?e.some(y):y(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function y(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function h(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>m(e,t)))}return m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:s}=t;if(r===s)return!0;if(d(r)&&d(s)){if(r.length!==s.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),a=[...s].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.dm)(e,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>S,aw:()=>b,uploadAssets:()=>q});var s=r(38171),a=r(46791),n=r(20102),i=r(22974),o=r(92604),l=r(95330),u=r(17452),d=r(41123),p=r(16306),c=r(66361),y=r(35671),h=r(2981),f=r(84230);function m(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,s={}){let u;const p="gdbVersion"in e?e.gdbVersion:null,y=s.gdbVersion??p;if((0,c.lQ)(e)&&e.url)u=(0,c.jF)(e.url,e.layerId,y,"original-and-current-features"===s.returnServiceEditsOption);else{u=(0,l.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,s){if(await e.load(),!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const s=(0,f.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=null!=e.infoFor3D;if(function(e,t,r,s,a,i){if(!e||!s&&!a)throw new n.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new n.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&a)throw new n.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,s,r,!!i,!!l,`${e.type}-layer`),!s.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!s.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||s.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!s.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const s=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(s.addFeatures?.length&&!t.operations.supportsAdd)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(s.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(s.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return s.addFeatures=s.addFeatures.map(O),s.updateFeatures=s.updateFeatures.map(O),s.addAssetFeatures=[],s}(t,s,`${e.type}-layer`),y=r?.globalIdUsed||u,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(y){const{globalIdField:t}=e;if(null==t)throw new n.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,s){R(e,t,r,s),v(e,t)}(t,e,y,m))),c.updateFeatures.forEach((t=>function(e,t,r,s){R(e,t,r,s),v(e,t);const a=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,y,m))),c.deleteFeatures.forEach((t=>function(e,t,r,s){R(e,t,r,s)}(t,e,y,m))),c.addAttachments.forEach((t=>A(t,e))),c.updateAttachments.forEach((t=>A(t,e))),u&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=(0,h.S0)("model/gltf-binary",r.supportedFormats)??(0,h.Ow)("glb",r.supportedFormats);if(!s||!r.editFormats.includes(s))throw new n.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])E(t)&&a.push(t);for(const t of e.updateFeatures??[])E(t)&&a.push(t)}(c,e),{edits:await I(c),options:p}}(e,r,s);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,s),c=e=>e.filter((e=>!e.error)).map(i.d9),y={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:s.globalIdToObjectId};return l.editedFeatureResults?.length&&(y.editedFeatures=l.editedFeatureResults),u.resolve(y),l}catch(e){throw u.reject(e),e}}function R(e,t,r,s){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(s.length&&"attributes"in e)for(const r of s){const s=e.attributes[r.name];if(void 0!==s&&!(0,y.d2)(r,s))throw new n.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new n.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function A(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,u.sJ)(s.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],s=t.concat(r).map((e=>e.geometry)),a=await(0,p.aX)(s),n=t.length,i=r.length;return a.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),a.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function O(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function E(e){return"mesh"===e?.geometry?.type}function q(e,t,r,s){if(!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}},49379:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var s=r(43697),a=(r(66577),r(40330)),n=r(3172),i=r(92835),o=r(67676),l=r(20102),u=r(80442),d=r(35454),p=r(83379),c=r(92604),y=r(78286),h=r(95330),f=r(17452),m=r(41123),g=r(5600),b=(r(75215),r(52011)),w=r(6570),F=r(52138),S=r(13598),R=r(85872),v=r(20773);function A(e){const{vertexSpace:t}=e;if(t.isRelative)return e.clone();const{anchor:r}=e,s=r.clone(),a=(0,F.d)(I,[-s.x,-s.y,-s.z]),n=new R.Z({origin:[s.x,s.y,s.z]}),i=e.cloneWithVertexSpace(n),{position:o}=i.vertexAttributes;return i.vertexAttributes.position=(0,v.t)(new Float64Array(o.length),o,a),i.vertexAttributesChanged(),i}const I=(0,S.a)();var O=r(84470),E=r(38171),q=r(67900),x=r(73615),_=r(33955),Z=r(14720);async function T(e,t,r){const{geometry:s}=t,a={...t.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=s,l=e.spatialReference;await(0,x.initializeProjection)(i,l);const u=(0,x.project)(n,l);if(a[t.originX]=u.x,a[t.originY]=u.y,a[t.originZ]=u.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:u}=s,d=u.isGeoreferenced?1:(0,q.r6)(i)/(0,q.r6)(l);a[t.translationX]=e[0]*d,a[t.translationY]=e[2]*d,a[t.translationZ]=-e[1]*d,a[t.scaleX]=r[0],a[t.scaleY]=r[2],a[t.scaleZ]=r[1],a[t.rotationX]=n[0],a[t.rotationY]=n[2],a[t.rotationZ]=-n[1],a[t.rotationDeg]=n[3]}return{attributes:a}}return null==s?{attributes:a}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:a}}async function M(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>C(e,t)))),s=await Promise.all((t.updateAttachments??[]).map((t=>C(e,t)))),a=t.deleteAttachments??[];return r.length||s.length||a.length?{adds:r,updates:s,deletes:[...a]}:null}async function C(e,t){const{feature:r,attachment:s}=t,{globalId:a,name:n,contentType:i,data:o,uploadId:l}=s,u={globalId:a};if(r&&("attributes"in r?u.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(u.parentGlobalId=r.globalId)),l)u.uploadId=l;else if(o){const e=await(0,f.IR)(o);e&&(u.contentType=e.mediaType,u.data=e.data),o instanceof File&&(u.name=o.name)}return n&&(u.name=n),i&&(u.contentType=i),u}function N(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function $(e,t){return new E.Z({attributes:e.attributes,geometry:(0,_.im)({...e.geometry,spatialReference:t})})}function U(e,t){return{adds:e?.adds?.map((e=>$(e,t)))||[],updates:e?.updates?.map((e=>({original:$(e[0],t),current:$(e[1],t)})))||[],deletes:e?.deletes?.map((e=>$(e,t)))||[],spatialReference:t}}var j=r(25278),B=r(49735),P=r(66677),k=r(45574),G=r(2981),J=r(4967),z=r(59431),L=r(14165),D=r(18596),Q=r(82971);const V=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),H=new Set(["Feature Layer","Oriented Imagery Layer","Table"]),X=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let W=class extends p.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,h.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,u.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==s,l=e?.operations?.supportsQueryAttachments??!1;return new B.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n,queryAttachmentsSupported:l})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,k.nU)(r,"editing");const s=e.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return N((await(0,n.Z)(a,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async updateAttachment(e,t,r){await this.load();const{layer:s}=this;await(0,k.nU)(s,"editing");const a=e.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+a+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),l=this._getFormDataForAttachment(r,o.query);try{return N((await(0,n.Z)(i,{body:l})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,k.nU)(r,"editing");const s=r.infoFor3D,i=null!=s,l=i||(t?.globalIdUsed??!1),u=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,d=e.addFeatures?.map((e=>T(this.layer,e,s)))??[],p=(await Promise.all(d)).filter(o.pC),c=e.updateFeatures?.map((e=>T(this.layer,e,s)))??[],y=(await Promise.all(c)).filter(o.pC),h=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,Z.Ey)(t))return t.map((e=>e.globalId));if((0,Z.aw)(t))return t.map((e=>e.objectId));const s=r?e.globalIdField:e.objectIdField;return s?t.map((e=>e.getAttribute(s))):[]}(this.layer,e.deleteFeatures,l);(0,z.P)(p,y,r.spatialReference);const f=await M(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:l,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,D.Px)(this.layer.url,g,!0);const w=(0,D.JV)(this.layer.url,g||null);t?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p,updates:y,deletes:h,attachments:f,assetMaps:u}]),b.returnServiceEditsOption=V.toJSON(t?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=y.length?JSON.stringify(y):null,b.deletes=h.length?l?JSON.stringify(h):h.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=u?JSON.stringify(u):void 0);const F=this._getLayerRequestOptions({method:"post",query:b});w&&(F.authMode="immediate",F.query.returnEditMoment=!0,F.query.sessionId=D.U8);const S=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let R;try{R=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,s=+t.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(e))throw e;F.authMode="immediate",R=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=a.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(R)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,k.nU)(r,"editing");const s=e.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,n.Z)(a,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(N)}catch(e){throw this._createAttachmentErrorResult(s,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,n.Z)(`${s}/${r}`,t),{id:o,extent:l,fullExtent:u,timeExtent:d}=a,p=l||u;return{id:o,fullExtent:p&&w.Z.fromJSON(p),timeExtent:d&&i.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,P.M8)(this.layer.url))return"unavailable";const e=(0,f.v_)(this.layer.url,"status"),t=await(0,n.Z)(e,{query:{f:"json"}});return X.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await r.e(2046).then(r.bind(r,2046));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.Z)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.Z)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,h.e4)(Y)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,u.Z)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,n.Z)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=s}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!H.has(r))throw new l.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,j.bU)(e.geometryType).renderer;(0,y.RB)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.Z)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,h.r9)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const s=new Array,a=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if(r.isRelative)s.push(t);else{const r=A(t);a.set(r,t),e.geometry=r,s.push(r)}}await this.uploadAssets(s);for(const[e,t]of a)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===i.length){c.Z.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:l}=i.find(O.yT)??i[0],{vertexSpace:u}=e,d=u.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of l)1===e.parts.length?t.push({globalId:(0,m.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):c.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,s={addFeatureResults:e?.addResults?.map(N)??[],updateFeatureResults:e?.updateResults?.map(N)??[],deleteFeatureResults:e?.deleteResults?.map(N)??[],addAttachmentResults:r?.addResults?r.addResults.map(N):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(N):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(N):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}(a);if(s.length>0){n.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new Q.Z(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:U(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new l.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:s,parsedUrl:a}=t;if(null==s||null==r)return e;const n=(0,G.$6)(s);if(null==n)return e;const i=(0,f.v_)(a.path,`../${n.id}`),l=new Array,u=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(a).length>0?u.push(t):l.push(t);const d=u.map((e=>e.getAttribute(r))).filter(o.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=s,y=new L.Z;y.where=`${p} IN (${d.map((e=>`'${e}'`))})`,y.outFields=[c,p],y.returnGeometry=!1;const h=await(0,J.e)(i,y),{features:m}=h;return 0===m.length?e:[...l,...u.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,n=m.filter((e=>e.getAttribute(p)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(c)));return s.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,s._)([(0,g.Cb)()],W.prototype,"type",void 0),(0,s._)([(0,g.Cb)({constructOnly:!0})],W.prototype,"layer",void 0),(0,s._)([(0,g.Cb)({readOnly:!0})],W.prototype,"queryTask",null),W=(0,s._)([(0,b.j)("esri.layers.graphics.sources.FeatureLayerSource")],W);const Y=1e3,K=W},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>o});var s=r(80442),a=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},59431:(e,t,r)=>{r.d(t,{P:()=>i});var s=r(67900),a=r(8744);function n(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function i(e,t,r){if(!e&&!t||!r)return;const a=(0,s._R)(r);o(e,r,a),o(t,r,a)}function o(e,t,r){if(e)for(const s of e)l(s.geometry,t,r)}function l(e,t,r){if(!e?.spatialReference||(0,a.fS)(e.spatialReference,t))return;const i=(0,s._R)(e.spatialReference)/r;if(1!==i)if("x"in e)null!=e.z&&(e.z*=i);else if("rings"in e)n(e,e.rings,i);else if("paths"in e)n(e,e.paths,i);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=i)}},28694:(e,t,r)=>{r.d(t,{p:()=>a});var s=r(69285);function a(e,t,r){if(!r?.features||!r.hasZ)return;const a=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=a)for(const e of r.features)a(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var s,a=r(43697),n=r(66577),i=r(38171),o=r(35454),l=r(96674),u=r(22974),d=r(5600),p=(r(75215),r(71715)),c=r(52011),y=r(30556),h=r(82971),f=r(33955),m=r(1231);const g=new o.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const a=e[t],n=i.Z.fromJSON(a),o=a.geometry?.spatialReference;null==n.geometry||o||(n.geometry.spatialReference=r);const l=a.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],s=l[e],a=s?.spatialReference;null==t||a||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:a}=this;if(a)for(const e of a)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,a]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((a-e)/r)));for(let e=0,t=n.length;e<t;e++)i?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,a],scale:[n,i]}=r;let o=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;o=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>a-e*i),o,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,a;const n=[];for(let i=0,o=e.length;i<o;i++){const o=e[i];if(i>0){const e=t(o[0]),i=r(o[1]);e===s&&i===a||(n.push([e-s,i-a]),s=e,a=i)}else s=t(o[0]),a=r(o[1]),n.push([s,a])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,a=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],i=this._quantizePoints(n,t,r);i&&a.push(i)}return a.length>0?((0,f.oU)(e)?e.rings=a:e.paths=a,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,a){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,a=s.length;e<a;e++){const a=s[e];e>0?(i+=a[0],o+=a[1]):(i=a[0],o=a[1]),a[0]=t(i),a[1]=r(o)}}if(s&&a)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=a(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(a)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=a(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),a&&null!=e.mmax&&null!=e.mmin&&(e.mmax=a(e.mmax),e.mmin=a(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(i+=s[0],o+=s[1]):(i=s[0],o=s[1]),s[0]=t(i),s[1]=r(o)}if(s&&a)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=a(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(a)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=a(t[2])}}:null}};(0,a._)([(0,d.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,a._)([(0,d.Cb)({type:[i.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,a._)([(0,p.r)("features")],b.prototype,"readFeatures",null),(0,a._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,a._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,a._)([(0,y.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,a._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,a._)([(0,p.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,a._)([(0,d.Cb)({type:h.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,a._)([(0,y.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,a._)([(0,d.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,a._)([(0,c.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6882,9379],{13598:(e,t,r)=>{function s(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function a(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]]}function n(e,t){return new Float64Array(e,t,16)}r.d(t,{I:()=>i,a:()=>s,b:()=>a,c:()=>n});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:a,create:s,createView:n,fromValues:function(e,t,r,s,a,n,i,o,l,u,d,p,c,y,h,f){return[e,t,r,s,a,n,i,o,l,u,d,p,c,y,h,f]}},Symbol.toStringTag,{value:"Module"}))},20773:(e,t,r)=>{r.d(t,{a:()=>o,b:()=>i,c:()=>a,d:()=>d,e:()=>l,n:()=>p,s:()=>u,t:()=>n});var s=r(72220);function a(e,t,r){n(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function n(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return s.c.error("source and destination buffers need to have the same number of elements"),e;const i=e.length/a,o=r[0],l=r[1],u=r[2],d=r[4],p=r[5],c=r[6],y=r[8],h=r[9],f=r[10],m=r[12],g=r[13],b=r[14];let w=0,F=0;for(let r=0;r<i;r++){const r=t[w],s=t[w+1],i=t[w+2];e[F]=o*r+d*s+y*i+m,e[F+1]=l*r+p*s+h*i+g,e[F+2]=u*r+c*s+f*i+b,w+=n,F+=a}return e}function i(e,t,r){o(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r,a=3,n=a){if(e.length/a!==Math.ceil(t.length/n))return void s.c.error("source and destination buffers need to have the same number of elements");const i=e.length/a,o=r[0],l=r[1],u=r[2],d=r[3],p=r[4],c=r[5],y=r[6],h=r[7],f=r[8];let m=0,g=0;for(let r=0;r<i;r++){const r=t[m],s=t[m+1],i=t[m+2];e[g]=o*r+d*s+y*i,e[g+1]=l*r+p*s+h*i,e[g+2]=u*r+c*s+f*i,m+=n,g+=a}}function l(e,t,r){u(e.typedBuffer,t,r,e.typedBufferStride)}function u(e,t,r,s=3){const a=Math.min(e.length/s,t.count),n=t.typedBuffer,i=t.typedBufferStride;let o=0,l=0;for(let t=0;t<a;t++)e[l]=r*n[o],e[l+1]=r*n[o+1],e[l+2]=r*n[o+2],o+=i,l+=s}function d(e,t){p(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function p(e,t,r=3,s=r){const a=Math.min(e.length/r,t.length/s);let n=0,i=0;for(let o=0;o<a;o++){const a=t[n],o=t[n+1],l=t[n+2],u=a*a+o*o+l*l;if(u>0){const t=1/Math.sqrt(u);e[i]=t*a,e[i+1]=t*o,e[i+2]=t*l}n+=s,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,normalize:p,normalizeView:d,scale:u,scaleView:l,shiftRight:function(e,t,r){const s=Math.min(e.count,t.count),a=e.typedBuffer,n=e.typedBufferStride,i=t.typedBuffer,o=t.typedBufferStride;let l=0,u=0;for(let e=0;e<s;e++)a[u]=i[l]>>r,a[u+1]=i[l+1]>>r,a[u+2]=i[l+2]>>r,l+=o,u+=n},transformMat3:o,transformMat3View:i,transformMat4:n,transformMat4View:a},Symbol.toStringTag,{value:"Module"}))},85872:(e,t,r)=>{r.d(t,{Z:()=>c});var s=r(43697),a=r(2368),n=r(96674),i=r(5600),o=(r(75215),r(67676),r(80442),r(36030)),l=r(52011),u=r(65617),d=r(94139);let p=class extends((0,a.J)(n.wq)){constructor(e){super(e),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,u.c)()}getOriginPoint(e){const[t,r,s]=this.origin;return new d.Z({x:t,y:r,z:s,spatialReference:e})}setOriginFromPoint({x:e,y:t,z:r}){this.origin=(0,u.f)(e,t,r??0)}};(0,s._)([(0,o.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],p.prototype,"type",void 0),(0,s._)([(0,i.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],p.prototype,"origin",void 0),p=(0,s._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],p);const c=p},72220:(e,t,r)=>{r.d(t,{c:()=>s});const s=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},84470:(e,t,r)=>{r.d(t,{CP:()=>o,JG:()=>h,LL:()=>l,NZ:()=>u,fV:()=>f,vj:()=>g,yT:()=>w,zE:()=>b});var s=r(3172),a=r(67676),n=r(95330),i=r(2981);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,a.fS)(this.parts,e.parts,((e,t)=>e.equals(t)))}isOnService(e){return this.parts.every((t=>t.isOnService(e)))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const r=await Promise.all(t.map((t=>t.toBlob(e))));return(0,n.k_)(e),new Blob(r)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,s.Z)(this.partUrl,{responseType:"blob"});return(0,n.k_)(e),t}}function u(e){return function(e){return!!e&&(Array.isArray(e)?e.some(y):y(e))}(e?.source)}function d(e){return!!Array.isArray(e)&&e.every((e=>e instanceof o))}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function y(e){if(e instanceof File){const{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function h(e,t){if(!e)return!1;const{source:r}=e;return function(e,t){if(Array.isArray(e)){const r=e;return r.length>0&&r.every((e=>m(e,t)))}return m(e,t)}(r,t)}function f(e,t){if(e===t)return!0;const{source:r}=e,{source:s}=t;if(r===s)return!0;if(d(r)&&d(s)){if(r.length!==s.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...r].sort(e),a=[...s].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(a[e]))return!1;return!0}return!1}function m(e,t){return e instanceof o&&e.isOnService(t)}function g(e,t){return e instanceof File?(0,i.dm)(e,t):(0,i.S0)(e.assetMimeType,t)??(0,i.Ow)(e.assetName,t)}function b(e){return Array.isArray(e)?e:[e]}function w(e){return!!e.original}},61159:(e,t,r)=>{r.d(t,{g:()=>s});const s={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},14720:(e,t,r)=>{r.d(t,{Ey:()=>F,applyEdits:()=>S,aw:()=>b,uploadAssets:()=>q});var s=r(38171),a=r(46791),n=r(20102),i=r(22974),o=r(92604),l=r(95330),u=r(17452),d=r(41123),p=r(16306),c=r(66361),y=r(69165),h=r(2981),f=r(84230);function m(e){return null!=e?.applyEdits}function g(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function b(e){return e.every(g)}function w(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(w)}async function S(e,t,r,s={}){let u;const p="gdbVersion"in e?e.gdbVersion:null,y=s.gdbVersion??p;if((0,c.lQ)(e)&&e.url)u=(0,c.jF)(e.url,e.layerId,y,"original-and-current-features"===s.returnServiceEditsOption);else{u=(0,l.hh)(),u.promise.then((t=>{(t.addedFeatures.length||t.updatedFeatures.length||t.deletedFeatures.length||t.addedAttachments.length||t.updatedAttachments.length||t.deletedAttachments.length)&&e.emit("edits",t)}));const t={result:u.promise};e.emit("apply-edits",t)}try{const{results:l,edits:p}=await async function(e,t,r,s){if(await e.load(),!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,f.ln)(e))throw new n.Z(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const s=(0,f.S1)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),u=null!=e.infoFor3D;if(function(e,t,r,s,a,i){if(!e||!s&&!a)throw new n.Z(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new n.Z(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new n.Z(`${i}:invalid-parameter`,"'addAttachments', 'updateAttachments' and 'deleteAttachments' are applicable only if the layer supports global ids. See: 'capabilities.editing.supportsGlobalId'");if(!r?.globalIdUsed&&a)throw new n.Z(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,s,r,!!i,!!l,`${e.type}-layer`),!s.data.isVersioned&&r?.gdbVersion)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!s.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const p={...r};if(null!=p.rollbackOnFailureEnabled||s.editing.supportsRollbackOnFailure||(p.rollbackOnFailureEnabled=!0),p.rollbackOnFailureEnabled||"original-and-current-features"!==p.returnServiceEditsOption||(!1===p.rollbackOnFailureEnabled&&o.Z.getLogger("esri.layers.graphics.editingSupport").warn(`${e.type}-layer:invalid-parameter`,"'original-and-current-features' is valid for 'returnServiceEditsOption' only when 'rollBackOnFailure' is true, but 'rollBackOnFailure' was set to false. 'rollBackOnFailure' has been overwrritten and set to true."),p.rollbackOnFailureEnabled=!0),!s.editing.supportsReturnServiceEditsInSourceSpatialReference&&p.returnServiceEditsInSourceSR)throw new n.Z(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(p.returnServiceEditsInSourceSR&&"original-and-current-features"!==p.returnServiceEditsOption)throw new n.Z(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const c=function(e,t,r){const s=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.Z.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(s.addFeatures?.length&&!t.operations.supportsAdd)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support adding features.");if(s.updateFeatures?.length&&!t.operations.supportsUpdate)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support updating features.");if(s.deleteFeatures?.length&&!t.operations.supportsDelete)throw new n.Z(`${r}:unsupported-operation`,"Layer does not support deleting features.");return s.addFeatures=s.addFeatures.map(O),s.updateFeatures=s.updateFeatures.map(O),s.addAssetFeatures=[],s}(t,s,`${e.type}-layer`),y=r?.globalIdUsed||u,m=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(y){const{globalIdField:t}=e;if(null==t)throw new n.Z(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");c.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,d.z)())}(e,t)))}return c.addFeatures.forEach((t=>function(e,t,r,s){R(e,t,r,s),v(e,t)}(t,e,y,m))),c.updateFeatures.forEach((t=>function(e,t,r,s){R(e,t,r,s),v(e,t);const a=(0,f.S1)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new n.Z(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,y,m))),c.deleteFeatures.forEach((t=>function(e,t,r,s){R(e,t,r,s)}(t,e,y,m))),c.addAttachments.forEach((t=>A(t,e))),c.updateAttachments.forEach((t=>A(t,e))),u&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,s=(0,h.S0)("model/gltf-binary",r.supportedFormats)??(0,h.Ow)("glb",r.supportedFormats);if(!s||!r.editFormats.includes(s))throw new n.Z(`${t.type}-layer:binary-gltf-asset-not-supported`,"3DObjectFeatureLayer requires binary glTF (.glb) support for updating mesh geometry.");e.addAssetFeatures??=[];const{addAssetFeatures:a}=e;for(const t of e.addFeatures??[])E(t)&&a.push(t);for(const t of e.updateFeatures??[])E(t)&&a.push(t)}(c,e),{edits:await I(c),options:p}}(e,r,s);return i.addFeatures?.length||i.updateFeatures?.length||i.deleteFeatures?.length||i.addAttachments?.length||i.updateAttachments?.length||i.deleteAttachments?.length?{edits:i,results:await t.applyEdits(i,l)}:{edits:i,results:{addFeatureResults:[],updateFeatureResults:[],deleteFeatureResults:[],addAttachmentResults:[],updateAttachmentResults:[],deleteAttachmentResults:[]}}}(e,t,r,s),c=e=>e.filter((e=>!e.error)).map(i.d9),y={edits:p,addedFeatures:c(l.addFeatureResults),updatedFeatures:c(l.updateFeatureResults),deletedFeatures:c(l.deleteFeatureResults),addedAttachments:c(l.addAttachmentResults),updatedAttachments:c(l.updateAttachmentResults),deletedAttachments:c(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:s.globalIdToObjectId};return l.editedFeatureResults?.length&&(y.editedFeatures=l.editedFeatureResults),u.resolve(y),l}catch(e){throw u.reject(e),e}}function R(e,t,r,s){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(s.length&&"attributes"in e)for(const r of s){const s=e.attributes[r.name];if(void 0!==s&&!(0,y.d2)(r,s))throw new n.Z(`${t.type}-layer:invalid-parameter`,`Big-integer field '${r.name}' of the feature must be less than ${Number.MAX_SAFE_INTEGER}`,{feature:e})}if("geometry"in e&&null!=e.geometry){if(e.geometry.hasZ&&!1===t.capabilities?.data.supportsZ)throw new n.Z(`${t.type}-layer:z-unsupported`,"Layer does not support z values while feature has z values.");if(e.geometry.hasM&&!1===t.capabilities?.data.supportsM)throw new n.Z(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function v(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D){const{geometry:r}=e;if(r.vertexSpace.isGeoreferenced)throw new n.Z(`${t.type}-layer:georeferenced-mesh-unsupported`,"Uploading georeferenced meshes to a layer is not supported.")}}function A(e,t){const{feature:r,attachment:s}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!s.globalId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!s.data&&!s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(s.data instanceof File&&s.data.name||s.name))throw new n.Z(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&s.uploadId)throw new n.Z(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof s.data){const e=(0,u.sJ)(s.data);if(e&&!e.isBase64)throw new n.Z(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function I(e){const t=e.addFeatures??[],r=e.updateFeatures??[],s=t.concat(r).map((e=>e.geometry)),a=await(0,p.aX)(s),n=t.length,i=r.length;return a.slice(0,n).forEach(((e,r)=>t[r].geometry=e)),a.slice(n,n+i).forEach(((e,t)=>r[t].geometry=e)),e}function O(e){const t=new s.Z;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function E(e){return"mesh"===e?.geometry?.type}function q(e,t,r,s){if(!m(t))throw new n.Z(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new n.Z(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,s)}},49379:(e,t,r)=>{r.r(t),r.d(t,{default:()=>K});var s=r(43697),a=(r(66577),r(40330)),n=r(3172),i=r(92835),o=r(67676),l=r(20102),u=r(80442),d=r(35454),p=r(83379),c=r(92604),y=r(78286),h=r(95330),f=r(17452),m=r(41123),g=r(5600),b=(r(75215),r(52011)),w=r(6570),F=r(52138),S=r(13598),R=r(85872),v=r(20773);function A(e){const{vertexSpace:t}=e;if(t.isRelative)return e.clone();const{anchor:r}=e,s=r.clone(),a=(0,F.d)(I,[-s.x,-s.y,-s.z]),n=new R.Z({origin:[s.x,s.y,s.z]}),i=e.cloneWithVertexSpace(n),{position:o}=i.vertexAttributes;return i.vertexAttributes.position=(0,v.t)(new Float64Array(o.length),o,a),i.vertexAttributesChanged(),i}const I=(0,S.a)();var O=r(84470),E=r(38171),q=r(67900),x=r(73615),_=r(33955),Z=r(14720);async function T(e,t,r){const{geometry:s}=t,a={...t.attributes};if(null!=r&&"mesh"===s?.type){const{transformFieldRoles:t}=r,{origin:n,spatialReference:i,transform:o}=s,l=e.spatialReference;await(0,x.initializeProjection)(i,l);const u=(0,x.project)(n,l);if(a[t.originX]=u.x,a[t.originY]=u.y,a[t.originZ]=u.z??0,null!=o){const{translation:e,scale:r,rotation:n}=o,{vertexSpace:u}=s,d=u.isGeoreferenced?1:(0,q.r6)(i)/(0,q.r6)(l);a[t.translationX]=e[0]*d,a[t.translationY]=e[2]*d,a[t.translationZ]=-e[1]*d,a[t.scaleX]=r[0],a[t.scaleY]=r[2],a[t.scaleZ]=r[1],a[t.rotationX]=n[0],a[t.rotationY]=n[2],a[t.rotationZ]=-n[1],a[t.rotationDeg]=n[3]}return{attributes:a}}return null==s?{attributes:a}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:a}}async function M(e,t){const r=await Promise.all((t.addAttachments??[]).map((t=>C(e,t)))),s=await Promise.all((t.updateAttachments??[]).map((t=>C(e,t)))),a=t.deleteAttachments??[];return r.length||s.length||a.length?{adds:r,updates:s,deletes:[...a]}:null}async function C(e,t){const{feature:r,attachment:s}=t,{globalId:a,name:n,contentType:i,data:o,uploadId:l}=s,u={globalId:a};if(r&&("attributes"in r?u.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(u.parentGlobalId=r.globalId)),l)u.uploadId=l;else if(o){const e=await(0,f.IR)(o);e&&(u.contentType=e.mediaType,u.data=e.data),o instanceof File&&(u.name=o.name)}return n&&(u.name=n),i&&(u.contentType=i),u}function N(e){const t=!0===e.success?null:e.error||{code:void 0,description:void 0};return{objectId:e.objectId,globalId:e.globalId,error:t?new l.Z("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function $(e,t){return new E.Z({attributes:e.attributes,geometry:(0,_.im)({...e.geometry,spatialReference:t})})}function U(e,t){return{adds:e?.adds?.map((e=>$(e,t)))||[],updates:e?.updates?.map((e=>({original:$(e[0],t),current:$(e[1],t)})))||[],deletes:e?.deletes?.map((e=>$(e,t)))||[],spatialReference:t}}var j=r(25278),B=r(49735),P=r(66677),k=r(45574),G=r(2981),J=r(4967),z=r(59431),L=r(14165),D=r(18596),Q=r(82971);const V=new d.X({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),H=new Set(["Feature Layer","Oriented Imagery Layer","Table"]),X=new d.X({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let W=class extends p.Z{constructor(){super(...arguments),this.type="feature-layer",this.refresh=(0,h.Ds)((async()=>{await this.load();const e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}})),this._ongoingAssetUploads=new Map}load(e){const t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then((()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e))).then((()=>this._ensureLatestMetadata(e)));return this.addResolvingPromise(r),Promise.resolve(this)}get queryTask(){const{capabilities:e,parsedUrl:t,dynamicDataSource:r,infoFor3D:s,gdbVersion:a,spatialReference:n,fieldsIndex:i}=this.layer,o=(0,u.Z)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==s,l=e?.operations?.supportsQueryAttachments??!1;return new B.Z({url:t.path,pbfSupported:o,fieldsIndex:i,infoFor3D:s,dynamicDataSource:r,gdbVersion:a,sourceSpatialReference:n,queryAttachmentsSupported:l})}async addAttachment(e,t){await this.load();const{layer:r}=this;await(0,k.nU)(r,"editing");const s=e.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+s+"/addAttachment",i=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(t,i.query);try{return N((await(0,n.Z)(a,{body:o})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(s,e)}}async updateAttachment(e,t,r){await this.load();const{layer:s}=this;await(0,k.nU)(s,"editing");const a=e.attributes[s.objectIdField],i=s.parsedUrl.path+"/"+a+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:t}}),l=this._getFormDataForAttachment(r,o.query);try{return N((await(0,n.Z)(i,{body:l})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(a,e)}}async applyEdits(e,t){await this.load();const{layer:r}=this;await(0,k.nU)(r,"editing");const s=r.infoFor3D,i=null!=s,l=i||(t?.globalIdUsed??!1),u=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,d=e.addFeatures?.map((e=>T(this.layer,e,s)))??[],p=(await Promise.all(d)).filter(o.pC),c=e.updateFeatures?.map((e=>T(this.layer,e,s)))??[],y=(await Promise.all(c)).filter(o.pC),h=function(e,t,r){if(!t||0===t.length)return[];if(r&&(0,Z.Ey)(t))return t.map((e=>e.globalId));if((0,Z.aw)(t))return t.map((e=>e.objectId));const s=r?e.globalIdField:e.objectIdField;return s?t.map((e=>e.getAttribute(s))):[]}(this.layer,e.deleteFeatures,l);(0,z.P)(p,y,r.spatialReference);const f=await M(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,b={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:l,returnEditMoment:t?.returnEditMoment,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,D.Px)(this.layer.url,g,!0);const w=(0,D.JV)(this.layer.url,g||null);t?.returnServiceEditsOption?(b.edits=JSON.stringify([{id:r.layerId,adds:p,updates:y,deletes:h,attachments:f,assetMaps:u}]),b.returnServiceEditsOption=V.toJSON(t?.returnServiceEditsOption),b.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(b.adds=p.length?JSON.stringify(p):null,b.updates=y.length?JSON.stringify(y):null,b.deletes=h.length?l?JSON.stringify(h):h.join(","):null,b.attachments=f&&JSON.stringify(f),b.assetMaps=null!=u?JSON.stringify(u):void 0);const F=this._getLayerRequestOptions({method:"post",query:b});w&&(F.authMode="immediate",F.query.returnEditMoment=!0,F.query.sessionId=D.U8);const S=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;let R;try{R=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}catch(e){if(!function(e){const t=e.details.raw,r=+t.code,s=+t.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(e))throw e;F.authMode="immediate",R=m?await this._asyncApplyEdits(S+"/applyEdits",F):await(0,n.Z)(S+"/applyEdits",F)}if(!r.capabilities.operations?.supportsEditing&&r.effectiveCapabilities?.operations?.supportsEditing){const e=a.id?.findCredential(r.url);await(e?.refreshToken())}return this._createEditsResult(R)}async deleteAttachments(e,t){await this.load();const{layer:r}=this;await(0,k.nU)(r,"editing");const s=e.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+s+"/deleteAttachments";try{return(await(0,n.Z)(a,this._getLayerRequestOptions({query:{attachmentIds:t.join(",")},method:"post"}))).data.deleteAttachmentResults.map(N)}catch(e){throw this._createAttachmentErrorResult(s,e)}}fetchRecomputedExtents(e={}){const t=e.signal;return this.load({signal:t}).then((async()=>{const t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:a}=await(0,n.Z)(`${s}/${r}`,t),{id:o,extent:l,fullExtent:u,timeExtent:d}=a,p=l||u;return{id:o,fullExtent:p&&w.Z.fromJSON(p),timeExtent:d&&i.Z.fromJSON({start:d[0],end:d[1]})}}))}async queryAttachments(e,t={}){await this.load();const r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();const r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});return e.outStatistics?.length&&r.features.length&&r.features.forEach((t=>{const r=t.attributes;e.outStatistics?.forEach((({outStatisticFieldName:e})=>{if(e){const t=e.toLowerCase();t&&t in r&&e!==t&&(r[e]=r[t],delete r[t])}}))})),r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,P.M8)(this.layer.url))return"unavailable";const e=(0,f.v_)(this.layer.url,"status"),t=await(0,n.Z)(e,{query:{f:"json"}});return X.fromJSON(t.data.status)}async uploadAssets(e,t){const{uploadAssets:s}=await r.e(2046).then(r.bind(r,2046));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}async _asyncApplyEdits(e,t){const r=(await(0,n.Z)(e,t)).data.statusUrl;for(;;){const e=(await(0,n.Z)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,n.Z)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new l.Z("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,h.e4)(Y)}}_createRequestQueryOptions(e){const t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){const r={};(0,u.Z)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());const{data:s}=await(0,n.Z)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=s}this.sourceJSON=await this._patchServiceJSON(e,t?.signal);const r=e.type;if(!H.has(r))throw new l.Z("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){const t=(0,j.bU)(e.geometryType).renderer;(0,y.RB)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{const{data:r}=await(0,n.Z)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,h.r9)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){const{addAssetFeatures:t}=e;if(!t?.length)return null;const r=await this._filterRedundantAssetMaps(t);if(!t?.length)return null;const s=new Array,a=new Map;for(const e of r){const{geometry:t}=e,{vertexSpace:r}=t;if(r.isRelative)s.push(t);else{const r=A(t);a.set(r,t),e.geometry=r,s.push(r)}}await this.uploadAssets(s);for(const[e,t]of a)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(r),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){const t=new Array,r=this.layer.globalIdField,s=this.layer.parsedUrl;for(const a of e){const e=a.geometry,{metadata:n}=e,i=n.getExternalSourcesOnService(s),o=a.getAttribute(r);if(0===i.length){c.Z.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:l}=i.find(O.yT)??i[0],{vertexSpace:u}=e,d=u.isGeoreferenced?["PROJECT_VERTICES"]:[];for(const e of l)1===e.parts.length?t.push({globalId:(0,m.z)(),parentGlobalId:o,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:d}):c.Z.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){const t=e.data,{layerId:r}=this.layer,s=[];let a=null;if(Array.isArray(t))for(const e of t)s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(a={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else a=t;const n=function(e){const t=e?.assetMaps;if(t){for(const e of t.addResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(const e of t.updateResults)e.success||c.Z.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}const r=e?.attachments,s={addFeatureResults:e?.addResults?.map(N)??[],updateFeatureResults:e?.updateResults?.map(N)??[],deleteFeatureResults:e?.deleteResults?.map(N)??[],addAttachmentResults:r?.addResults?r.addResults.map(N):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(N):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(N):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}(a);if(s.length>0){n.editedFeatureResults=[];for(const e of s){const{editedFeatures:t}=e,r=t?.spatialReference?new Q.Z(t.spatialReference):null;n.editedFeatureResults.push({layerId:e.id,editedFeatures:U(t,r)})}}return n}_createAttachmentErrorResult(e,t){const r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new l.Z("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){const r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(const e in t){const s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){const{parsedUrl:t,gdbVersion:r,dynamicDataSource:s}=this.layer;return{...e,query:{gdbVersion:r,layer:s?JSON.stringify({source:s}):void 0,...t.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _filterRedundantAssetMaps(e){const{layer:t}=this,{globalIdField:r,infoFor3D:s,parsedUrl:a}=t;if(null==s||null==r)return e;const n=(0,G.$6)(s);if(null==n)return e;const i=(0,f.v_)(a.path,`../${n.id}`),l=new Array,u=new Array;for(const t of e)t.geometry.metadata.getExternalSourcesOnService(a).length>0?u.push(t):l.push(t);const d=u.map((e=>e.getAttribute(r))).filter(o.pC);if(0===d.length)return e;const{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=s,y=new L.Z;y.where=`${p} IN (${d.map((e=>`'${e}'`))})`,y.outFields=[c,p],y.returnGeometry=!1;const h=await(0,J.e)(i,y),{features:m}=h;return 0===m.length?e:[...l,...u.filter((e=>{const t=e.getAttribute(r);if(!t)return!0;const{metadata:s}=e.geometry,n=m.filter((e=>e.getAttribute(p)===t));if(0===n.length)return!0;const i=n.map((e=>e.getAttribute(c)));return s.getExternalSourcesOnService(a).flatMap((({source:e})=>e.flatMap((e=>e.parts.map((e=>e.partHash)))))).some((e=>i.every((t=>e!==t))))}))]}};(0,s._)([(0,g.Cb)()],W.prototype,"type",void 0),(0,s._)([(0,g.Cb)({constructOnly:!0})],W.prototype,"layer",void 0),(0,s._)([(0,g.Cb)({readOnly:!0})],W.prototype,"queryTask",null),W=(0,s._)([(0,b.j)("esri.layers.graphics.sources.FeatureLayerSource")],W);const Y=1e3,K=W},25278:(e,t,r)=>{r.d(t,{Dm:()=>d,Hq:()=>p,MS:()=>c,bU:()=>o});var s=r(80442),a=r(22974),n=r(61159),i=r(58333);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?i.I4:"esriGeometryPolyline"===e?i.ET:i.lF}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,s.Z)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${l.test(t)?`.${t}`:`["${t}"]`} = ${JSON.stringify(e[t])};`;const s=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,a.d9)(e)}}]}function c(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:n.g,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},59431:(e,t,r)=>{r.d(t,{P:()=>i});var s=r(67900),a=r(8744);function n(e,t,r){if(null==e.hasM||e.hasZ)for(const e of t)for(const t of e)t.length>2&&(t[2]*=r)}function i(e,t,r){if(!e&&!t||!r)return;const a=(0,s._R)(r);o(e,r,a),o(t,r,a)}function o(e,t,r){if(e)for(const s of e)l(s.geometry,t,r)}function l(e,t,r){if(!e?.spatialReference||(0,a.fS)(e.spatialReference,t))return;const i=(0,s._R)(e.spatialReference)/r;if(1!==i)if("x"in e)null!=e.z&&(e.z*=i);else if("rings"in e)n(e,e.rings,i);else if("paths"in e)n(e,e.paths,i);else if("points"in e&&(null==e.hasM||e.hasZ))for(const t of e.points)t.length>2&&(t[2]*=i)}},28694:(e,t,r)=>{r.d(t,{p:()=>a});var s=r(69285);function a(e,t,r){if(!r?.features||!r.hasZ)return;const a=(0,s.k)(r.geometryType,t,e.outSpatialReference);if(null!=a)for(const e of r.features)a(e.geometry)}},74889:(e,t,r)=>{r.d(t,{Z:()=>w});var s,a=r(43697),n=r(66577),i=r(38171),o=r(35454),l=r(96674),u=r(22974),d=r(5600),p=(r(75215),r(71715)),c=r(52011),y=r(30556),h=r(82971),f=r(33955),m=r(1231);const g=new o.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let b=s=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=h.Z.fromJSON(t.spatialReference),s=[];for(let t=0;t<e.length;t++){const a=e[t],n=i.Z.fromJSON(a),o=a.geometry?.spatialReference;null==n.geometry||o||(n.geometry.spatialReference=r);const l=a.aggregateGeometries,u=n.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],s=l[e],a=s?.spatialReference;null==t||a||(t.spatialReference=r)}s.push(n)}return s}writeGeometryType(e,t,r,s){if(e)return void g.write(e,t,r,s);const{features:a}=this;if(a)for(const e of a)if(null!=e?.geometry)return void g.write(e.geometry.type,t,r,s)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,s=(0,f.im)(e);return s&&!r&&t.spatialReference&&(s.spatialReference=h.Z.fromJSON(t.spatialReference)),s}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new s(this.cloneProperties())}cloneProperties(){return(0,u.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const s=t.features[r];if(s.geometry){const t=e?.[r];s.geometry=t?.toJSON()||s.geometry}}return t}quantize(e){const{scale:[t,r],translate:[s,a]}=e,n=this.features,i=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-s)/t)),(e=>Math.round((a-e)/r)));for(let e=0,t=n.length;e<t;e++)i?.(n[e].geometry)||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[s,a],scale:[n,i]}=r;let o=null,l=null;if(this.hasZ&&null!=r?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=r;o=r=>r*t+e}if(this.hasM&&null!=r?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=r;l=r=>null==r?r:r*t+e}const u=this._getHydrationFunction(e,(e=>e*n+s),(e=>a-e*i),o,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}_quantizePoints(e,t,r){let s,a;const n=[];for(let i=0,o=e.length;i<o;i++){const o=e[i];if(i>0){const e=t(o[0]),i=r(o[1]);e===s&&i===a||(n.push([e-s,i-a]),s=e,a=i)}else s=t(o[0]),a=r(o[1]),n.push([s,a])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const s=(0,f.oU)(e)?e.rings:e.paths,a=[];for(let e=0,n=s.length;e<n;e++){const n=s[e],i=this._quantizePoints(n,t,r);i&&a.push(i)}return a.length>0?((0,f.oU)(e)?e.rings=a:e.paths=a,e):null}:"multipoint"===e?e=>{const s=this._quantizePoints(e.points,t,r);return s&&s.length>0?(e.points=s,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r,s,a){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y),s&&(e.z=s(e.z))}:"polyline"===e||"polygon"===e?e=>{const n=(0,f.oU)(e)?e.rings:e.paths;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];for(let e=0,a=s.length;e<a;e++){const a=s[e];e>0?(i+=a[0],o+=a[1]):(i=a[0],o=a[1]),a[0]=t(i),a[1]=r(o)}}if(s&&a)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2]),r[3]=a(r[3])}}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=s(r[2])}}else if(a)for(let e=0,t=n.length;e<t;e++){const t=n[e];for(let e=0,r=t.length;e<r;e++){const r=t[e];r[2]=a(r[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax),s&&null!=e.zmax&&null!=e.zmin&&(e.zmax=s(e.zmax),e.zmin=s(e.zmin)),a&&null!=e.mmax&&null!=e.mmin&&(e.mmax=a(e.mmax),e.mmin=a(e.mmin))}:"multipoint"===e?e=>{const n=e.points;let i,o;for(let e=0,s=n.length;e<s;e++){const s=n[e];e>0?(i+=s[0],o+=s[1]):(i=s[0],o=s[1]),s[0]=t(i),s[1]=r(o)}if(s&&a)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2]),t[3]=a(t[3])}else if(s)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=s(t[2])}else if(a)for(let e=0,t=n.length;e<t;e++){const t=n[e];t[2]=a(t[2])}}:null}};(0,a._)([(0,d.Cb)({type:String,json:{write:!0}})],b.prototype,"displayFieldName",void 0),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"exceededTransferLimit",void 0),(0,a._)([(0,d.Cb)({type:[i.Z],json:{write:!0}})],b.prototype,"features",void 0),(0,a._)([(0,p.r)("features")],b.prototype,"readFeatures",null),(0,a._)([(0,d.Cb)({type:[m.Z],json:{write:!0}})],b.prototype,"fields",void 0),(0,a._)([(0,d.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:g.read}}})],b.prototype,"geometryType",void 0),(0,a._)([(0,y.c)("geometryType")],b.prototype,"writeGeometryType",null),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasM",void 0),(0,a._)([(0,d.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],b.prototype,"hasZ",void 0),(0,a._)([(0,d.Cb)({types:n.qM,json:{write:!0}})],b.prototype,"queryGeometry",void 0),(0,a._)([(0,p.r)("queryGeometry")],b.prototype,"readQueryGeometry",null),(0,a._)([(0,d.Cb)({type:h.Z,json:{write:!0}})],b.prototype,"spatialReference",void 0),(0,a._)([(0,y.c)("spatialReference")],b.prototype,"writeSpatialReference",null),(0,a._)([(0,d.Cb)({json:{write:!0}})],b.prototype,"transform",void 0),b=s=(0,a._)([(0,c.j)("esri.rest.support.FeatureSet")],b),b.prototype.toJSON.isDefaultToJSON=!0;const w=b}}]);
|