@arcgis/core 4.30.0-next.20240320 → 4.30.0-next.20240321

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.
Files changed (72) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{ef19c4fabc3682fc7aa7.js → 0b1ccc2cfb7a6361eae6.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{2d0a01d0957b3e4512f6.js → 2cc832f9f5b10817f300.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{95d7b168991ddb3a96ca.js → 2fe91a15fcdae540babe.js} +1 -1
  5. package/assets/esri/core/workers/chunks/505f35a02ac6a67a255b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{51fc02ce8cab70b363b1.js → 5162ba2975b4b025590e.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{4e76bc3274df21ec22e0.js → 51700be6f50efba0bc82.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{65ed5dfd19d99588d66e.js → 689a122c77b39e5c73eb.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{bf65e5c155ad15f58907.js → 7530fef3ee217643898e.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{a0fa32df6a262ffb3179.js → 75bd66a0a1b42e057c1a.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{a53b90ced443603a78c5.js → 7819a446d3c9749ff74f.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{424b5d20d7f64e28c0a7.js → 7ca976273f1f64f75aa7.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{36d697a3788b86f24588.js → 9403e2ee9c97488ce4f0.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e6a5ccd93f2dab2bb1e0.js → a0de5ad1d08f511cf3d8.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{3c19806b03f14d288fae.js → b3cd5f8691ba0b5b5729.js} +1 -1
  16. package/assets/esri/core/workers/chunks/b3d905c6b100831ad3c4.js +1 -0
  17. package/assets/esri/core/workers/chunks/{785454b084d8ec4e7dc0.js → df38774f63984be0a478.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{1cc0714457e299b54496.js → e22a13ff683d207e0434.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{7f8725f146c29290e240.js → e93cc8cdeaaf81210dc2.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{ac8606f2e4719c96a732.js → ee1345b212cde1ff4755.js} +1 -1
  21. package/assets/esri/core/workers/chunks/eecb0064c5343e88bfde.js +1 -0
  22. package/interfaces.d.ts +33 -106
  23. package/package.json +1 -1
  24. package/rest/geoprocessor/utils.js +1 -1
  25. package/rest/utils.js +1 -1
  26. package/support/revision.js +1 -1
  27. package/views/2d/FrameTask.js +1 -1
  28. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueDebugLayerView.js +1 -1
  29. package/views/2d/input/MapViewInputManager.js +1 -1
  30. package/views/2d/input/handlers/KeyPan.js +1 -1
  31. package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
  32. package/views/2d/layers/BaseLayerView2D.js +1 -1
  33. package/views/2d/layers/BaseLayerViewGL2D.js +1 -1
  34. package/views/2d/layers/CatalogDynamicGroupLayerView2D.js +1 -1
  35. package/views/2d/layers/CatalogLayerView2D.js +1 -1
  36. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  37. package/views/2d/layers/GeoRSSLayerView2D.js +1 -1
  38. package/views/2d/layers/GraphicsLayerView2D.js +1 -1
  39. package/views/2d/layers/GroupLayerView2D.js +1 -1
  40. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  41. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  42. package/views/2d/layers/KMLLayerView2D.js +1 -1
  43. package/views/2d/layers/KnowledgeGraphLayerView2D.js +1 -1
  44. package/views/2d/layers/MapImageLayerView2D.js +1 -1
  45. package/views/2d/layers/MapNotesLayerView2D.js +1 -1
  46. package/views/2d/layers/MediaLayerView2D.js +1 -1
  47. package/views/2d/layers/RouteLayerView2D.js +1 -1
  48. package/views/2d/layers/TileLayerView2D.js +1 -1
  49. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  50. package/views/2d/layers/VideoLayerView2D.js +1 -1
  51. package/views/2d/layers/WMSLayerView2D.js +1 -1
  52. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  53. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  54. package/views/2d/layers/features/sources/strategies/AFetchLoadStrategy.js +1 -1
  55. package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
  56. package/views/2d/navigation/ZoomBox.js +1 -1
  57. package/views/2d/viewpointUtils.js +1 -1
  58. package/views/draw/DrawOperation.js +1 -1
  59. package/views/input/InputManager.js +1 -1
  60. package/views/input/keys.js +1 -1
  61. package/views/interactive/snapping/SnappingManager.js +1 -1
  62. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  63. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  64. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  65. package/widgets/FeatureTable.js +1 -1
  66. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  67. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  68. package/widgets/OrientedImageryViewer.js +1 -1
  69. package/widgets/Popup.js +1 -1
  70. package/assets/esri/core/workers/chunks/2427699e34e1895ed024.js +0 -1
  71. package/assets/esri/core/workers/chunks/7bba67d345da6eced804.js +0 -1
  72. package/assets/esri/core/workers/chunks/d344e99dd999aaaabbe3.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[893],{51624:(e,t,s)=>{s.d(t,{A:()=>c});var n,r,i=s(44208),a=s(93687);(r=n||(n={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const o=4294967296,u=new TextDecoder("utf-8"),l=(0,i.A)("safari")||(0,i.A)("ios")?6:(0,i.A)("ff")?12:32;class c{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,s,r)}_init(e,t,s,n){this._data=e,this._dataView=t,this._pos=s,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;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}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,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}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,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,n){const r=this.getMessage(),i=e(r,t,s,n);return r.release(),i}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}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,s=0,n=0;if(this._end-t>=10)do{if(n=e[t++],s|=127&n,!(128&n))break;if(n=e[t++],s|=(127&n)<<7,!(128&n))break;if(n=e[t++],s|=(127&n)<<14,!(128&n))break;if(n=e[t++],s|=(127&n)<<21,!(128&n))break;if(n=e[t++],s+=268435456*(127&n),!(128&n))break;if(n=e[t++],s+=34359738368*(127&n),!(128&n))break;if(n=e[t++],s+=4398046511104*(127&n),!(128&n))break;if(n=e[t++],s+=562949953421312*(127&n),!(128&n))break;if(n=e[t++],s+=72057594037927940*(127&n),!(128&n))break;if(n=e[t++],s+=0x8000000000000000*(127&n),!(128&n))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(n=e[t],128&n);)++t,s+=(127&n)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=n*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,n=0;const r=1&e[this._pos];if(n=e[this._pos++],s|=127&n,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<7,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<14,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<21,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=268435456*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=34359738368*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=4398046511104*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(t=BigInt(s),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),!(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),!(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),!(128&n))return Number(r?-(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,s){if((s=Math.min(this._end,s))-t>l){const n=e.subarray(t,s);return u.decode(n)}let n="",r="";for(let i=t;i<s;++i){const t=e[i];128&t?r+="%"+t.toString(16):(n+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(n+=decodeURIComponent(r)),n}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.A(c,void 0,(e=>{e._data=null,e._dataView=null}))},17136:(e,t,s)=>{s.d(t,{el:()=>w});var n=s(92602),r=s(49186),i=s(53966),a=s(39829),o=s(82799),u=s(80754),l=s(21325),c=s(28735),p=(s(59456),s(78888)),f=s(65864),d=s(2272),h=s(84952),g=s(92300);const y=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function m(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function k(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A(e)}const s=(0,u.r8)(e),n=[];for(const e of s){const s=[];n.push(s),s.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const r=e[n][0],i=e[n][1],a=e[n+1][0],o=e[n+1][1],u=Math.sqrt((a-r)*(a-r)+(o-i)*(o-i)),l=(o-i)/u,c=(a-r)/u,p=u/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,a=c*n+r,o=l*n+i;s.push([a,o])}const e=(u+Math.floor(p-1)*t)/2,n=c*e+r,a=l*e+i;s.push([n,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:n,spatialReference:e.spatialReference}):new o.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return s&&(e=(0,u.kS)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const n=e[0];if(n>t){const s=(0,u.kd)(n,t);e[0]=n+s*(-2*t)}else if(n<s){const t=(0,u.kd)(n,s);e[0]=n+t*(-2*s)}}else{const n=e.x;if(n>t){const s=(0,u.kd)(n,t);e=e.clone().offset(s*(-2*t),0)}else if(n<s){const t=(0,u.kd)(n,s);e=e.clone().offset(t*(-2*s),0)}}return e}function S(e,t){let s=-1;for(let n=0;n<t.cutIndexes.length;n++){const r=t.cutIndexes[n],i=t.geometries[n],a=(0,u.r8)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const n=t[e][0];s=n>s?n:s}s=Number(s.toFixed(9));const n=-360*(0,u.kd)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(n,0))}return!0}}))}if(r===s){if(m(e))for(const t of(0,u.r8)(i))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,u.r8)(i))e[r]=e[r].addPath(t)}else s=r,e[r]=i}return e}async function w(e,t,s){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let i,m,_,x,T,F,q,I,R=0;const A=[],V=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,m=(0,l.Vp)(i),_=i.isWebMercator,F=_?102100:4326,x=u.j7[F].maxX,T=u.j7[F].minX,q=u.j7[F].plus180Line,I=u.j7[F].minus180Line),m)if("mesh"===t.type)V.push(t);else if("point"===t.type)V.push(b(t.clone(),x,T));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,x,T))),V.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,m);V.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,s=(0,u.kd)(e.xmin,T)*(2*x);let n=0===s?t.clone():(0,u.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:i}=e;r=Number(r.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(q)&&i!==x?(R=i>R?i:R,n=k(n,_),A.push(n),V.push("cut")):e.intersects(I)&&r!==T?(R=i*(2*x)>R?i*(2*x):R,n=k(n,_,360),A.push(n),V.push("cut")):V.push(n)}else V.push(t.clone());else V.push(t);else V.push(t);let U=(0,u.kd)(R,x),E=-90;const O=U,N=new o.A;for(;U>0;){const e=360*U-180;N.addPath([[e,E],[e,-1*E]]),E*=-1,U--}if(A.length>0&&O>0){const t=S(A,await async function(e,t,s,n){const r=(0,d.Dl)(e),i=t[0].spatialReference,a={...n,responseType:"json",query:{...r.query,f:"json",sr:(0,l.YX)(i),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,p.A)(r.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map((e=>{const t=(0,f.rS)(e);return t.spatialReference=i,t}))}}(r,A,N,s)),n=[],i=[];for(let s=0;s<V.length;s++){const r=V[s];if("cut"!==r)i.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(n.push(r),i.push("simplify")):i.push(_?(0,c.Gh)(r):r)}}if(!n.length)return i;const a=await async function(e,t,s){const n="string"==typeof e?(0,h.An)(e):e,r=t[0].spatialReference,i=(0,f.$B)(t[0]),a={...s,query:{...n.query,f:"json",sr:(0,l.YX)(r),geometries:JSON.stringify((0,g.X)(t))}},{data:o}=await(0,p.A)(n.path+"/simplify",a);return(0,g.V)(o.geometries,i,r)}(r,n,s),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const G=[];for(let e=0;e<V.length;e++){const t=V[e];if("cut"!==t)G.push(t);else{const e=A.shift();G.push(!0===_?(0,c.Gh)(e):e)}}return G}},80754:(e,t,s)=>{s.d(t,{j7:()=>a,kS:()=>u,kd:()=>o,r8:()=>l});var n=s(82799),r=s(16930),i=s(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,i.Bi)(e)?e.rings:e.paths}},92300:(e,t,s)=>{s.d(t,{V:()=>i,X:()=>r});var n=s(65864);function r(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,s){const r=(0,n.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},10536:(e,t,s)=>{function n(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=n(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{z:()=>n})},53655:(e,t,s)=>{s.d(t,{SH:()=>R,ae:()=>x,cn:()=>_});var n=s(49186),r=s(51624),i=s(92722),a=s(69418);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],u=["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"],l=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function p(e){return e>=u.length?null:u[e]}function f(e){return e>=l.length?null:l[e]}function d(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function h(e,t,s){const n=e.asUnsafe(),r=t.createPointGeometry(s);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addCoordinatePoint(r,n.getSInt64(),i++);break}default:n.skip()}return r}function g(e,t,s){const n=e.asUnsafe(),r=t.createGeometry(s),i=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addLength(r,n.getUInt32(),i++);break}case 3:{const e=n.getUInt32(),s=n.pos()+e;let a=0;for(t.allocateCoordinates(r);n.pos()<s;)t.addCoordinate(r,n.getSInt64(),a),a++,a===i&&(a=0);break}default:n.skip()}return r}function y(e){const t=e.asUnsafe(),s=new i.A;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.coords.push(t.getSInt64());break}case 1:n=a.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,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(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=p(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function k(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function b(e,t,s,n){const r=t.createFeature(s);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[i++].name;r.attributes[t]=e.processMessage(m);break}case 2:r.geometry=e.processMessageWithArgs(g,t,s);break;case 4:r.centroid=e.processMessageWithArgs(h,t,s);break;default:e.skip()}return r}function S(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function w(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function x(e){const t={originPosition:f(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=f(s.getEnum());break;case 2:t.scale=s.processMessage(S);break;case 3:t.translate=s.processMessage(w);break;default:s.skip()}return t}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function F(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function q(e,t){const s=t.createFeatureResult(),n=e.asUnsafe();s.geometryType=d(t,0);let r=!1;for(;n.next();)switch(n.tag()){case 1:s.objectIdFieldName=n.getString();break;case 3:s.globalIdFieldName=n.getString();break;case 4:s.geohashFieldName=n.getString();break;case 5:s.geometryProperties=n.processMessage(T);break;case 7:s.geometryType=d(t,n.getEnum());break;case 8:s.spatialReference=n.processMessageWithArgs(F,t);break;case 10:s.hasZ=n.getBool();break;case 11:s.hasM=n.getBool();break;case 12:s.transform=n.processMessage(x);break;case 9:s.exceededTransferLimit=n.getBool();break;case 13:t.addField(s,n.processMessage(_));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,n.processMessageWithArgs(b,t,s,s.fields));break;case 2:s.uniqueIdField=n.processMessage(k);break;default:n.skip()}return t.finishFeatureResult(s),s}function I(e,t){const s={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(y);break;case 1:s.featureResult=e.processMessageWithArgs(q,t);break;default:e.skip()}return null!=n&&s.featureResult&&t.addQueryGeometry(s,n),s}function R(e,t){try{const s=2,n=new r.A(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===s?i.queryResult=n.processMessageWithArgs(I,t):n.skip();return i}catch(e){throw new n.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},69418:(e,t,s)=>{s.d(t,{S:()=>l,z:()=>u});var n=s(83047),r=s(21325),i=s(43334),a=s(58512),o=s(92722);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this._options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}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,r.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,i.N3)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.Om}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}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 o.A}}},66208:(e,t,s)=>{s.d(t,{m:()=>r});var n=s(53655);function r(e,t){const s=(0,n.SH)(e,t),r=s.queryResult.featureResult,i=s.queryResult.queryGeometry,a=s.queryResult.queryGeometryType;if(r&&r.features&&r.features.length&&r.objectIdFieldName){const e=r.objectIdFieldName;for(const t of r.features)t.attributes&&(t.objectId=t.attributes[e])}return r&&(r.queryGeometry=i,r.queryGeometryType=a),r}},80893:(e,t,s)=>{s.d(t,{IJ:()=>h,Jf:()=>_,Pk:()=>y,eW:()=>d,gW:()=>m,kS:()=>g});var n=s(78888),r=s(84952),i=s(65864),a=s(17136),o=s(21325),u=s(10536),l=s(66208),c=s(58501);const p="Layer does not support extent calculation.";function f(e,t){const s=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const r=n;let a,u,l;if(null!=s&&(u=s.spatialReference,l=(0,o.YX)(u),r.geometryType=(0,i.$B)(s),r.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(s,e.compactGeometryEnabled),r.inSR=l),n.groupByFieldsForStatistics&&(r.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(r.objectIds=n.objectIds.join(",")),n.orderByFields&&(r.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete r.outFields:n.outFields.includes("*")?r.outFields="*":r.outFields=n.outFields.join(","),n.outSR?(r.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):s&&(n.returnGeometry||n.returnCentroid)&&(r.outSR=r.inSR,a=u),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(r.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(r.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(r.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,r.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(r.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(r.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(r.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:s}=e;null==t&&null==s||(r.time=t===s?t:`${t??"null"},${s??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=a&&u.equals(a)&&(r.defaultSR=r.inSR,delete r.inSR,delete r.outSR),r}async function d(e,t,s,n){const r=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await k(e,t,"json",n);return(0,c.q)(t,s,r.data),r}async function h(e,t,s,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:s.createFeatureResult()};const r=await g(e,t,n),i=r;return i.data=(0,l.m)(r.data,s),i}function g(e,t,s){return k(e,t,"pbf",s)}function y(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):k(e,t,"json",s,{returnIdsOnly:!0})}function m(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):k(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await k(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),r=n.data;if(r.hasOwnProperty("extent"))return n;if(r.features)throw new Error(p);if(r.hasOwnProperty("count"))throw new Error(p);return n}async function k(e,t,s,i={},o={}){const l="string"==typeof e?(0,r.An)(e):e,c=t.geometry?[t.geometry]:[],p=await(0,a.el)(c,null,{signal:i.signal}),d=p?.[0];null!=d&&((t=t.clone()).geometry=d);const h=(0,u.z)({...l.query,f:s,...o,...f(t,o)});return(0,n.A)((0,r.fj)(l.path,(g=o,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...i,responseType:"pbf"===s?"array-buffer":"json",query:{...h,...i.query}});var g}},2272:(e,t,s)=>{s.d(t,{Dl:()=>a,jV:()=>i,lF:()=>o}),s(92602),s(70333);var n=s(4718),r=s(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,r.An)(e):(0,n.o8)(e)}function o(e,t,s){const n={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[r]=i.map((e=>o({item:e},t,s).item));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?i:JSON.stringify(i);else n[r]=i}return n}s(926)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[893],{51624:(e,t,s)=>{s.d(t,{A:()=>c});var n,r,i=s(44208),a=s(93687);(r=n||(n={}))[r.varint=0]="varint",r[r.fixed64=1]="fixed64",r[r.delimited=2]="delimited",r[r.fixed32=5]="fixed32",r[r.unknown=99]="unknown";const o=4294967296,u=new TextDecoder("utf-8"),l=(0,i.A)("safari")||(0,i.A)("ios")?6:(0,i.A)("ff")?12:32;class c{constructor(e,t,s=0,r=(e?e.byteLength:0)){this._tag=0,this._dataType=n.unknown,this._init(e,t,s,r)}_init(e,t,s,n){this._data=e,this._dataView=t,this._pos=s,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;if(e=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return e;if(e=(e|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return e;throw new Error("Varint overflow")}getUInt64(){return this._decodeVarint()}getSInt32(){const e=this.getUInt32();return e>>>1^-(1&e)}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,s=e.getUint32(t,!0)+e.getUint32(t+4,!0)*o;return this._skip(8),s}getSFixed64(){const e=this._dataView,t=this._pos,s=e.getUint32(t,!0)+e.getInt32(t+4,!0)*o;return this._skip(8),s}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,s=this._toString(this._data,t,t+e);return this._skip(e),s}getBytes(){const e=this._getLength(),t=this._pos,s=this._toBytes(this._data,t,t+e);return this._skip(e),s}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(e,t,s,n){const r=this.getMessage(),i=e(r,t,s,n);return r.release(),i}processMessage(e){const t=this.getMessage(),s=e(t);return t.release(),s}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,s=0,n=0;if(this._end-t>=10)do{if(n=e[t++],s|=127&n,!(128&n))break;if(n=e[t++],s|=(127&n)<<7,!(128&n))break;if(n=e[t++],s|=(127&n)<<14,!(128&n))break;if(n=e[t++],s|=(127&n)<<21,!(128&n))break;if(n=e[t++],s+=268435456*(127&n),!(128&n))break;if(n=e[t++],s+=34359738368*(127&n),!(128&n))break;if(n=e[t++],s+=4398046511104*(127&n),!(128&n))break;if(n=e[t++],s+=562949953421312*(127&n),!(128&n))break;if(n=e[t++],s+=72057594037927940*(127&n),!(128&n))break;if(n=e[t++],s+=0x8000000000000000*(127&n),!(128&n))break;throw new Error("Varint too long!")}while(0);else{let r=1;for(;t!==this._end&&(n=e[t],128&n);)++t,s+=(127&n)*r,r*=128;if(t===this._end)throw new Error("Varint overrun!");++t,s+=n*r}return this._pos=t,s}_decodeSVarint(){const e=this._data;let t,s=0,n=0;const r=1&e[this._pos];if(n=e[this._pos++],s|=127&n,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<7,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<14,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s|=(127&n)<<21,!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=268435456*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=34359738368*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(n=e[this._pos++],s+=4398046511104*(127&n),!(128&n))return r?-(s+1)/2:s/2;if(t=BigInt(s),n=e[this._pos++],t+=0x2000000000000n*BigInt(127&n),!(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x100000000000000n*BigInt(127&n),!(128&n))return Number(r?-(t+1n)/2n:t/2n);if(n=e[this._pos++],t+=0x8000000000000000n*BigInt(127&n),!(128&n))return Number(r?-(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,s){if((s=Math.min(this._end,s))-t>l){const n=e.subarray(t,s);return u.decode(n)}let n="",r="";for(let i=t;i<s;++i){const t=e[i];128&t?r+="%"+t.toString(16):(n+=decodeURIComponent(r)+String.fromCharCode(t),r="")}return r.length&&(n+=decodeURIComponent(r)),n}_toBytes(e,t,s){return s=Math.min(this._end,s),new Uint8Array(e.buffer,t,s-t)}}c.pool=new a.A(c,void 0,(e=>{e._data=null,e._dataView=null}))},17136:(e,t,s)=>{s.d(t,{el:()=>w});var n=s(92602),r=s(49186),i=s(53966),a=s(39829),o=s(82799),u=s(80754),l=s(21325),c=s(28735),p=(s(59456),s(78888)),f=s(65864),d=s(2272),h=s(84952),g=s(92300);const y=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function m(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function k(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A(e)}const s=(0,u.r8)(e),n=[];for(const e of s){const s=[];n.push(s),s.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const r=e[n][0],i=e[n][1],a=e[n+1][0],o=e[n+1][1],u=Math.sqrt((a-r)*(a-r)+(o-i)*(o-i)),l=(o-i)/u,c=(a-r)/u,p=u/t;if(p>1){for(let e=1;e<=p-1;e++){const n=e*t,a=c*n+r,o=l*n+i;s.push([a,o])}const e=(u+Math.floor(p-1)*t)/2,n=c*e+r,a=l*e+i;s.push([n,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:n,spatialReference:e.spatialReference}):new o.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return s&&(e=(0,u.kS)(e,s)),e}function b(e,t,s){if(Array.isArray(e)){const n=e[0];if(n>t){const s=(0,u.kd)(n,t);e[0]=n+s*(-2*t)}else if(n<s){const t=(0,u.kd)(n,s);e[0]=n+t*(-2*s)}}else{const n=e.x;if(n>t){const s=(0,u.kd)(n,t);e=e.clone().offset(s*(-2*t),0)}else if(n<s){const t=(0,u.kd)(n,s);e=e.clone().offset(t*(-2*s),0)}}return e}function S(e,t){let s=-1;for(let n=0;n<t.cutIndexes.length;n++){const r=t.cutIndexes[n],i=t.geometries[n],a=(0,u.r8)(i);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const n=t[e][0];s=n>s?n:s}s=Number(s.toFixed(9));const n=-360*(0,u.kd)(s,180);for(let s=0;s<t.length;s++){const t=i.getPoint(e,s);i.setPoint(e,s,t.clone().offset(n,0))}return!0}}))}if(r===s){if(m(e))for(const t of(0,u.r8)(i))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,u.r8)(i))e[r]=e[r].addPath(t)}else s=r,e[r]=i}return e}async function w(e,t,s){if(!Array.isArray(e))return w([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let i,m,_,x,T,F,q,I,R=0;const A=[],V=[];for(const t of e)if(null!=t)if(i||(i=t.spatialReference,m=(0,l.Vp)(i),_=i.isWebMercator,F=_?102100:4326,x=u.j7[F].maxX,T=u.j7[F].minX,q=u.j7[F].plus180Line,I=u.j7[F].minus180Line),m)if("mesh"===t.type)V.push(t);else if("point"===t.type)V.push(b(t.clone(),x,T));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>b(e,x,T))),V.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,m);V.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,s=(0,u.kd)(e.xmin,T)*(2*x);let n=0===s?t.clone():(0,u.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:i}=e;r=Number(r.toFixed(9)),i=Number(i.toFixed(9)),e.intersects(q)&&i!==x?(R=i>R?i:R,n=k(n,_),A.push(n),V.push("cut")):e.intersects(I)&&r!==T?(R=i*(2*x)>R?i*(2*x):R,n=k(n,_,360),A.push(n),V.push("cut")):V.push(n)}else V.push(t.clone());else V.push(t);else V.push(t);let U=(0,u.kd)(R,x),E=-90;const O=U,N=new o.A;for(;U>0;){const e=360*U-180;N.addPath([[e,E],[e,-1*E]]),E*=-1,U--}if(A.length>0&&O>0){const t=S(A,await async function(e,t,s,n){const r=(0,d.Dl)(e),i=t[0].spatialReference,a={...n,responseType:"json",query:{...r.query,f:"json",sr:(0,l.YX)(i),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,p.A)(r.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map((e=>{const t=(0,f.rS)(e);return t.spatialReference=i,t}))}}(r,A,N,s)),n=[],i=[];for(let s=0;s<V.length;s++){const r=V[s];if("cut"!==r)i.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(n.push(r),i.push("simplify")):i.push(_?(0,c.Gh)(r):r)}}if(!n.length)return i;const a=await async function(e,t,s){const n="string"==typeof e?(0,h.An)(e):e,r=t[0].spatialReference,i=(0,f.$B)(t[0]),a={...s,query:{...n.query,f:"json",sr:(0,l.YX)(r),geometries:JSON.stringify((0,g.X)(t))}},{data:o}=await(0,p.A)(n.path+"/simplify",a);return(0,g.V)(o.geometries,i,r)}(r,n,s),o=[];for(let e=0;e<i.length;e++){const t=i[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const G=[];for(let e=0;e<V.length;e++){const t=V[e];if("cut"!==t)G.push(t);else{const e=A.shift();G.push(!0===_?(0,c.Gh)(e):e)}}return G}},80754:(e,t,s)=>{s.d(t,{j7:()=>a,kS:()=>u,kd:()=>o,r8:()=>l});var n=s(82799),r=s(16930),i=s(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function u(e,t){const s=l(e);for(const e of s)for(const s of e)s[0]+=t;return e}function l(e){return(0,i.Bi)(e)?e.rings:e.paths}},92300:(e,t,s)=>{s.d(t,{V:()=>i,X:()=>r});var n=s(65864);function r(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function i(e,t,s){const r=(0,n.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},10536:(e,t,s)=>{function n(e){const t={};for(const s in e){if("declaredClass"===s)continue;const r=e[s];if(null!=r&&"function"!=typeof r)if(Array.isArray(r)){t[s]=[];for(let e=0;e<r.length;e++)t[s][e]=n(r[e])}else"object"==typeof r?r.toJSON&&(t[s]=JSON.stringify(r)):t[s]=r}return t}s.d(t,{z:()=>n})},53655:(e,t,s)=>{s.d(t,{SH:()=>R,ae:()=>x,cn:()=>_});var n=s(49186),r=s(51624),i=s(92722),a=s(69418);const o=["esriFieldTypeSmallInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeString","esriFieldTypeDate","esriFieldTypeOID","esriFieldTypeGeometry","esriFieldTypeBlob","esriFieldTypeRaster","esriFieldTypeGUID","esriFieldTypeGlobalID","esriFieldTypeXML","esriFieldTypeBigInteger","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"],u=["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"],l=["upperLeft","lowerLeft"];function c(e){return e>=o.length?null:o[e]}function p(e){return e>=u.length?null:u[e]}function f(e){return e>=l.length?null:l[e]}function d(e,t){return t>=e.geometryTypes.length?null:e.geometryTypes[t]}function h(e,t,s){const n=e.asUnsafe(),r=t.createPointGeometry(s);for(;n.next();)switch(n.tag()){case 3:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addCoordinatePoint(r,n.getSInt64(),i++);break}default:n.skip()}return r}function g(e,t,s){const n=e.asUnsafe(),r=t.createGeometry(s),i=2+(s.hasZ?1:0)+(s.hasM?1:0);for(;n.next();)switch(n.tag()){case 2:{const e=n.getUInt32(),s=n.pos()+e;let i=0;for(;n.pos()<s;)t.addLength(r,n.getUInt32(),i++);break}case 3:{const e=n.getUInt32(),s=n.pos()+e;let a=0;for(t.allocateCoordinates(r);n.pos()<s;)t.addCoordinate(r,n.getSInt64(),a),a++,a===i&&(a=0);break}default:n.skip()}return r}function y(e){const t=e.asUnsafe(),s=new i.A;let n="esriGeometryPoint";for(;t.next();)switch(t.tag()){case 2:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.lengths.push(t.getUInt32());break}case 3:{const e=t.getUInt32(),n=t.pos()+e;for(;t.pos()<n;)s.coords.push(t.getSInt64());break}case 1:n=a.z[t.getEnum()];break;default:t.skip()}return{queryGeometry:s,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(),s={type:c(0)};for(;t.next();)switch(t.tag()){case 1:s.name=t.getString();break;case 2:s.type=c(t.getEnum());break;case 3:s.alias=t.getString();break;case 4:s.sqlType=p(t.getEnum());break;case 5:default:t.skip();break;case 6:s.defaultValue=t.getString()}return s}function k(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.name=s.getString();break;case 2:t.isSystemMaintained=s.getBool();break;default:s.skip()}return t}function b(e,t,s,n){const r=t.createFeature(s);let i=0;for(;e.next();)switch(e.tag()){case 1:{const t=n[i++].name;r.attributes[t]=e.processMessage(m);break}case 2:r.geometry=e.processMessageWithArgs(g,t,s);break;case 4:r.centroid=e.processMessageWithArgs(h,t,s);break;default:e.skip()}return r}function S(e){const t=[1,1,1,1],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function w(e){const t=[0,0,0,0],s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t[0]=s.getDouble();break;case 2:t[1]=s.getDouble();break;case 4:t[2]=s.getDouble();break;case 3:t[3]=s.getDouble();break;default:s.skip()}return t}function x(e){const t={originPosition:f(0)},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.originPosition=f(s.getEnum());break;case 2:t.scale=s.processMessage(S);break;case 3:t.translate=s.processMessage(w);break;default:s.skip()}return t}function T(e){const t={},s=e.asUnsafe();for(;s.next();)switch(s.tag()){case 1:t.shapeAreaFieldName=s.getString();break;case 2:t.shapeLengthFieldName=s.getString();break;case 3:t.units=s.getString();break;default:s.skip()}return t}function F(e,t){const s=t.createSpatialReference();for(;e.next();)switch(e.tag()){case 1:s.wkid=e.getUInt32();break;case 5:s.wkt=e.getString();break;case 2:s.latestWkid=e.getUInt32();break;case 3:s.vcsWkid=e.getUInt32();break;case 4:s.latestVcsWkid=e.getUInt32();break;default:e.skip()}return s}function q(e,t){const s=t.createFeatureResult(),n=e.asUnsafe();s.geometryType=d(t,0);let r=!1;for(;n.next();)switch(n.tag()){case 1:s.objectIdFieldName=n.getString();break;case 3:s.globalIdFieldName=n.getString();break;case 4:s.geohashFieldName=n.getString();break;case 5:s.geometryProperties=n.processMessage(T);break;case 7:s.geometryType=d(t,n.getEnum());break;case 8:s.spatialReference=n.processMessageWithArgs(F,t);break;case 10:s.hasZ=n.getBool();break;case 11:s.hasM=n.getBool();break;case 12:s.transform=n.processMessage(x);break;case 9:s.exceededTransferLimit=n.getBool();break;case 13:t.addField(s,n.processMessage(_));break;case 15:r||(t.prepareFeatures(s),r=!0),t.addFeature(s,n.processMessageWithArgs(b,t,s,s.fields));break;case 2:s.uniqueIdField=n.processMessage(k);break;default:n.skip()}return t.finishFeatureResult(s),s}function I(e,t){const s={};let n=null;for(;e.next();)switch(e.tag()){case 4:n=e.processMessageWithArgs(y);break;case 1:s.featureResult=e.processMessageWithArgs(q,t);break;default:e.skip()}return null!=n&&s.featureResult&&t.addQueryGeometry(s,n),s}function R(e,t){try{const s=2,n=new r.A(new Uint8Array(e),new DataView(e)),i={};for(;n.next();)n.tag()===s?i.queryResult=n.processMessageWithArgs(I,t):n.skip();return i}catch(e){throw new n.A("query:parsing-pbf","Error while parsing FeatureSet PBF payload",{error:e})}}},69418:(e,t,s)=>{s.d(t,{S:()=>l,z:()=>u});var n=s(83047),r=s(21325),i=s(43334),a=s(58512),o=s(92722);const u=["esriGeometryPoint","esriGeometryMultipoint","esriGeometryPolyline","esriGeometryPolygon"];class l{constructor(e){this._options=e,this.geometryTypes=u,this._coordinatePtr=0,this._vertexDimension=0}createFeatureResult(){return new a.A}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,r.aI)(e.spatialReference,this._options.sourceSpatialReference)||e.spatialReference.vcsWkid)return;const t=(0,n.G9)(this._options.sourceSpatialReference)/(0,n.G9)(e.spatialReference);if(1!==t)for(const s of e.features){if(!(0,i.N3)(s))continue;const e=s.geometry.coords;for(let s=2;s<e.length;s+=3)e[s]*=t}}addFeature(e,t){e.features.push(t)}createFeature(){return new i.Om}createSpatialReference(){return{wkid:0}}createGeometry(){return new o.A}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 o.A}}},66208:(e,t,s)=>{s.d(t,{m:()=>r});var n=s(53655);function r(e,t){const s=(0,n.SH)(e,t),r=s.queryResult.featureResult,i=s.queryResult.queryGeometry,a=s.queryResult.queryGeometryType;if(r&&r.features&&r.features.length&&r.objectIdFieldName){const e=r.objectIdFieldName;for(const t of r.features)t.attributes&&(t.objectId=t.attributes[e])}return r&&(r.queryGeometry=i,r.queryGeometryType=a),r}},80893:(e,t,s)=>{s.d(t,{IJ:()=>h,Jf:()=>_,Pk:()=>y,eW:()=>d,gW:()=>m,kS:()=>g});var n=s(78888),r=s(84952),i=s(65864),a=s(17136),o=s(21325),u=s(10536),l=s(66208),c=s(58501);const p="Layer does not support extent calculation.";function f(e,t){const s=e.geometry,n=e.toJSON();delete n.compactGeometryEnabled,delete n.defaultSpatialReferenceEnabled;const r=n;let a,u,l;if(null!=s&&(u=s.spatialReference,l=(0,o.YX)(u),r.geometryType=(0,i.$B)(s),r.geometry=function(e,t){if(t&&"extent"===e.type)return`${e.xmin},${e.ymin},${e.xmax},${e.ymax}`;if(t&&"point"===e.type)return`${e.x},${e.y}`;const s=e.toJSON();return delete s.spatialReference,JSON.stringify(s)}(s,e.compactGeometryEnabled),r.inSR=l),n.groupByFieldsForStatistics&&(r.groupByFieldsForStatistics=n.groupByFieldsForStatistics.join(",")),n.objectIds&&(r.objectIds=n.objectIds.join(",")),n.orderByFields&&(r.orderByFields=n.orderByFields.join(",")),!n.outFields||!n.returnDistinctValues&&(t?.returnCountOnly||t?.returnExtentOnly||t?.returnIdsOnly)?delete r.outFields:n.outFields.includes("*")?r.outFields="*":r.outFields=n.outFields.join(","),n.outSR?(r.outSR=(0,o.YX)(n.outSR),a=e.outSpatialReference):s&&(n.returnGeometry||n.returnCentroid)&&(r.outSR=r.inSR,a=u),n.returnGeometry&&delete n.returnGeometry,n.outStatistics&&(r.outStatistics=JSON.stringify(n.outStatistics)),n.fullText&&(r.fullText=JSON.stringify(n.fullText)),n.pixelSize&&(r.pixelSize=JSON.stringify(n.pixelSize)),n.quantizationParameters&&(e.defaultSpatialReferenceEnabled&&null!=u&&null!=e.quantizationParameters?.extent&&u.equals(e.quantizationParameters.extent.spatialReference)&&delete n.quantizationParameters.extent.spatialReference,r.quantizationParameters=JSON.stringify(n.quantizationParameters)),n.parameterValues&&(r.parameterValues=JSON.stringify(n.parameterValues)),n.rangeValues&&(r.rangeValues=JSON.stringify(n.rangeValues)),n.dynamicDataSource&&(r.layer=JSON.stringify({source:n.dynamicDataSource}),delete n.dynamicDataSource),n.timeExtent){const e=n.timeExtent,{start:t,end:s}=e;null==t&&null==s||(r.time=t===s?t:`${t??"null"},${s??"null"}`),delete n.timeExtent}return e.defaultSpatialReferenceEnabled&&null!=u&&null!=a&&u.equals(a)&&(r.defaultSR=r.inSR,delete r.inSR,delete r.outSR),r}async function d(e,t,s,n){const r=null!=t.timeExtent&&t.timeExtent.isEmpty?{data:{features:[]}}:await k(e,t,"json",n);return(0,c.q)(t,s,r.data),r}async function h(e,t,s,n){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:s.createFeatureResult()};const r=await g(e,t,n),i=r;return i.data=(0,l.m)(r.data,s),i}function g(e,t,s){return k(e,t,"pbf",s)}function y(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{objectIds:[]}}):k(e,t,"json",s,{returnIdsOnly:!0})}function m(e,t,s){return null!=t.timeExtent&&t.timeExtent.isEmpty?Promise.resolve({data:{count:0}}):k(e,t,"json",s,{returnIdsOnly:!0,returnCountOnly:!0})}async function _(e,t,s){if(null!=t.timeExtent&&t.timeExtent.isEmpty)return{data:{count:0,extent:null}};const n=await k(e,t,"json",s,{returnExtentOnly:!0,returnCountOnly:!0}),r=n.data;if(r.hasOwnProperty("extent"))return n;if(r.features)throw new Error(p);if(r.hasOwnProperty("count"))throw new Error(p);return n}async function k(e,t,s,i={},o={}){const l="string"==typeof e?(0,r.An)(e):e,c=t.geometry?[t.geometry]:[],p=await(0,a.el)(c,null,{signal:i.signal}),d=p?.[0];null!=d&&((t=t.clone()).geometry=d);const h=(0,u.z)({...l.query,f:s,...o,...f(t,o)});return(0,n.A)((0,r.fj)(l.path,(g=o,null==t.formatOf3DObjects||g.returnCountOnly||g.returnExtentOnly||g.returnIdsOnly?"query":"query3d")),{...i,responseType:"pbf"===s?"array-buffer":"json",query:{...h,...i.query}});var g}},2272:(e,t,s)=>{s.d(t,{Dl:()=>a,jV:()=>i,lF:()=>o}),s(92602),s(70333);var n=s(4718),r=s(84952);function i(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function a(e){return"string"==typeof e?(0,r.An)(e):(0,n.o8)(e)}function o(e,t,s){const n={};for(const r in e){if("declaredClass"===r)continue;const i=e[r];if(null!=i&&"function"!=typeof i)if(Array.isArray(i))n[r]=i.map((e=>o(e)));else if("object"==typeof i)if(i.toJSON){const e=i.toJSON(s?.[r]);n[r]=t?e:JSON.stringify(e)}else n[r]=t?i:JSON.stringify(i);else n[r]=i}return n}s(926)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8628,3069,6247],{13069:(e,t,r)=>{r.d(t,{lk:()=>a,vD:()=>i,yS:()=>s});const n="randomUUID"in crypto;function a(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${a().toUpperCase()}}`}function i(){return`{${a()}}`}},17136:(e,t,r)=>{r.d(t,{el:()=>I});var n=r(92602),a=r(49186),s=r(53966),i=r(39829),o=r(82799),l=r(80754),d=r(21325),u=r(28735),c=(r(59456),r(78888)),p=r(65864),f=r(2272),h=r(84952),m=r(92300);const y=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new a.A(e)}const r=(0,l.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const a=e[n][0],s=e[n][1],i=e[n+1][0],o=e[n+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),d=(o-s)/l,u=(i-a)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const n=e*t,i=u*n+a,o=d*n+s;r.push([i,o])}const e=(l+Math.floor(c-1)*t)/2,n=u*e+a,i=d*e+s;r.push([n,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:n,spatialReference:e.spatialReference}):new o.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function A(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function F(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const a=t.cutIndexes[n],s=t.geometries[n],i=(0,l.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(a===r){if(g(e))for(const t of(0,l.r8)(s))e[a]=e[a].addRing(t);else if(b(e))for(const t of(0,l.r8)(s))e[a]=e[a].addPath(t)}else r=a,e[a]=s}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let s,g,b,v,S,R,$,E,k=0;const M=[],j=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,d.Vp)(s),b=s.isWebMercator,R=b?102100:4326,v=l.j7[R].maxX,S=l.j7[R].minX,$=l.j7[R].plus180Line,E=l.j7[R].minus180Line),g)if("mesh"===t.type)j.push(t);else if("point"===t.type)j.push(A(t.clone(),v,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>A(e,v,S))),j.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);j.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,S)*(2*v);let n=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:s}=e;a=Number(a.toFixed(9)),s=Number(s.toFixed(9)),e.intersects($)&&s!==v?(k=s>k?s:k,n=w(n,b),M.push(n),j.push("cut")):e.intersects(E)&&a!==S?(k=s*(2*v)>k?s*(2*v):k,n=w(n,b,360),M.push(n),j.push("cut")):j.push(n)}else j.push(t.clone());else j.push(t);else j.push(t);let O=(0,l.kd)(k,v),L=-90;const x=O,U=new o.A;for(;O>0;){const e=360*O-180;U.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if(M.length>0&&x>0){const t=F(M,await async function(e,t,r,n){const a=(0,f.Dl)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(s),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,c.A)(a.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,p.rS)(e);return t.spatialReference=s,t}))}}(a,M,U,r)),n=[],s=[];for(let r=0;r<j.length;r++){const a=j[r];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(n.push(a),s.push("simplify")):s.push(b?(0,u.Gh)(a):a)}}if(!n.length)return s;const i=await async function(e,t,r){const n="string"==typeof e?(0,h.An)(e):e,a=t[0].spatialReference,s=(0,p.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,m.X)(t))}},{data:o}=await(0,c.A)(n.path+"/simplify",i);return(0,m.V)(o.geometries,s,a)}(a,n,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(b?(0,u.Gh)(i.shift()):i.shift())}return o}const V=[];for(let e=0;e<j.length;e++){const t=j[e];if("cut"!==t)V.push(t);else{const e=M.shift();V.push(!0===b?(0,u.Gh)(e):e)}}return V}},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>l,kd:()=>o,r8:()=>d});var n=r(82799),a=r(16930),s=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=d(e);for(const e of r)for(const r of e)r[0]+=t;return e}function d(e){return(0,s.Bi)(e)?e.rings:e.paths}},78628:(e,t,r)=>{r.d(t,{applyEdits:()=>I,r3:()=>w,uploadAssets:()=>M,zp:()=>F});var n=r(52106),a=r(5503),s=r(49186),i=r(4718),o=r(53966),l=r(74887),d=r(84952),u=r(13069),c=r(17136),p=r(21325),f=r(47685),h=r(30524),m=r(20557),y=r(83531);function g(e){return null!=e?.applyEdits}function b(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function w(e){return e.every(b)}function A(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(A)}async function I(e,t,r,n={}){let d;const c="gdbVersion"in e?e.gdbVersion:null,p=n.gdbVersion??c;if((0,f.Mk)(e)&&e.url)d=(0,f.Zk)(e.url,e.layerId,p,"original-and-current-features"===n.returnServiceEditsOption);else{d=(0,l.Tw)(),d.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:d.promise};e.emit("apply-edits",t)}try{const{results:l,edits:c}=await async function(e,t,r,n){if(await e.load(),!g(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,y.tk)(e))throw new s.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const n=(0,y.BR)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(function(e,t,r,n,a,i){if(!e||!n&&!a)throw new s.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new s.A(`${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 s.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,n,r,!!i,!!l,`${e.type}-layer`),!n.data.isVersioned&&r?.gdbVersion)throw new s.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!n.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||n.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.A.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 overwritten and set to true."),c.rollbackOnFailureEnabled=!0),!n.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new s.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const n=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(n.addFeatures?.length&&!t.operations.supportsAdd)throw new s.A(`${r}:unsupported-operation`,"Layer does not support adding features.");if(n.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.A(`${r}:unsupported-operation`,"Layer does not support updating features.");if(n.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.A(`${r}:unsupported-operation`,"Layer does not support deleting features.");return n.addFeatures=n.addFeatures.map(E),n.updateFeatures=n.updateFeatures.map(E),n.addAssetFeatures=[],n}(t,n,`${e.type}-layer`),f=r?.globalIdUsed||d,h=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(f){const{globalIdField:t}=e;if(null==t)throw new s.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,u.yS)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,n){v(e,t,r,n),S(e,t)}(t,e,f,h))),p.updateFeatures.forEach((t=>function(e,t,r,n){v(e,t,r,n),S(e,t);const a=(0,y.BR)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,h))),p.deleteFeatures.forEach((t=>function(e,t,r,n){v(e,t,r,n)}(t,e,f,h))),p.addAttachments.forEach((t=>R(t,e))),p.updateAttachments.forEach((t=>R(t,e))),d&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,n=(0,m.R_)("model/gltf-binary",r.supportedFormats)??(0,m.E1)("glb",r.supportedFormats);if(!n||!r.editFormats.includes(n))throw new s.A(`${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??[])k(t)&&a.push(t);for(const t of e.updateFeatures??[])k(t)&&a.push(t)}(p,e),{edits:await $(p),options:c}}(e,r,n);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,n),p=e=>e.filter((e=>!e.error)).map(i.o8),f={edits:c,addedFeatures:p(l.addFeatureResults),updatedFeatures:p(l.updateFeatureResults),deletedFeatures:p(l.deleteFeatureResults),addedAttachments:p(l.addAttachmentResults),updatedAttachments:p(l.updateAttachmentResults),deletedAttachments:p(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:n.globalIdToObjectId};return l.editedFeatureResults?.length&&(f.editedFeatures=l.editedFeatureResults),d.resolve(f),l}catch(e){throw d.reject(e),e}}function v(e,t,r,n){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(n.length&&"attributes"in e)for(const r of n){const n=e.attributes[r.name];if(void 0!==n&&!(0,h.OG)(r,n))throw new s.A(`${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 s.A(`${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 s.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function S(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:r}=e,{spatialReference:n,vertexSpace:a}=r,i=t.spatialReference,o="local"===a.type,l=(0,p.EA)(i),d=(0,p.aI)(i,n),u=d||(0,p.oT)(i)&&((0,p.oT)(n)||(0,p.K8)(n));if(!(o&&l&&u||!o&&!l&&d))throw new s.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${a.type} vertex space and a spatial reference wkid:${n.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function R(e,t){const{feature:r,attachment:n}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!n.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!n.data&&!n.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(n.data instanceof File&&n.data.name||n.name))throw new s.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&n.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof n.data){const e=(0,d.r$)(n.data);if(e&&!e.isBase64)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function $(e){const t=e.addFeatures??[],r=e.updateFeatures??[],n=t.concat(r).map((e=>e.geometry)),a=await(0,c.el)(n),s=t.length,i=r.length;return a.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),a.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function E(e){const t=new n.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function k(e){return"mesh"===e?.geometry?.type}function M(e,t,r,n){if(!g(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,n)}},47685:(e,t,r)=>{r.d(t,{Mk:()=>p,Zk:()=>u,w6:()=>m});var n=r(90237),a=r(65529),s=r(4718),i=r(74887),o=(r(53966),r(44208),r(49186),r(40608)),l=r(20816);const d=new a.A.EventEmitter;function u(e,t,r=null,n=!1){const a=(0,i.Tw)();return n=null==t||n,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:n,result:a.promise}),a}const c=Symbol();function p(e){return null!=e&&"object"==typeof e&&c in e}function f(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function h(e,t,r){const n=new URL(e).host,a=l.Z3.get(n),s=e=>!e||e===a;return s(t)&&s(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:n,mayReceiveServiceEdits:a,result:i}=e,o=t===this.url,d=null!=r&&null!=this.layerId&&r===this.layerId,u=f(this),c=f(this)&&h(t,n,this.gdbVersion);if(!o||u&&!c||!d&&!a)return;const p=i.then((e=>{if(d&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,s.o8)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:n,deletes:a}=t.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:a?a.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:n?n.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)};return this.emit("edits",i),i}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.w5)(t,n)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:n}=e,a=t===this.url,s=f(this),i=f(this)&&h(t,r,this.gdbVersion),o=f(this)&&!h(t,this.gdbVersion,null);a&&s&&i&&o&&"historicMoment"in this&&this.historicMoment!==n&&(this.historicMoment=n)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=c,r=(0,n._)([(0,o.$)("esri.layers.mixins.EditBusLayer")],r),r}},20557:(e,t,r)=>{r.d(t,{E1:()=>o,Fm:()=>l,JZ:()=>h,R_:()=>i,fu:()=>a,oF:()=>s,rq:()=>d});const n=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=c(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return p(function(e,t){const r=e.toLowerCase();return u(t).find((e=>f(e)===r))}(e,t))}function o(e,t){return p(c(e,t))}function l(e,t){return f(function(e,t){return u(t).find((t=>p(t)===e))}(e,t))}function d(e,t){return o(e.name,t)??i(e.type,t)}function u(e){return[...n,...e]}function c(e,t){const r=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function p(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>a});var n=r(65864);function a(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,r){const a=(0,n.xD)(t);return e.map((e=>{const t=a.fromJSON(e);return t.spatialReference=r,t}))}},2272:(e,t,r)=>{r.d(t,{Dl:()=>i,jV:()=>s,lF:()=>o}),r(92602),r(70333);var n=r(4718),a=r(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,a.An)(e):(0,n.o8)(e)}function o(e,t,r){const n={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))n[a]=s.map((e=>o({item:e},t,r).item));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[a]);n[a]=t?e:JSON.stringify(e)}else n[a]=t?s:JSON.stringify(s);else n[a]=s}return n}r(926)},20816:(e,t,r)=>{r.d(t,{TA:()=>a,We:()=>o,Z3:()=>s,ZJ:()=>l,w5:()=>d});var n=r(78888);const a=(0,r(13069).vD)(),s=new Map,i=new Map;async function o(e,t,r){if(!e||!r)return!1;if(!t)return!0;const a=new URL(e).host;let i=s.get(a);if(!i){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");i=(await(0,n.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return i===t}async function l(e,t,n=!1){if(!e||!t)return!0;const s=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=i.get(s)?.entries();if(o)for(const[e,i]of o)if(i.name===t){const t=!i.stack?.hasForwardEdits();if(!t&&n){const[{deleteForwardEdits:t},{default:n}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]);return t(s,e,new n({sessionId:a,moment:i.moment}))}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=i.get(r)?.entries();if(n)for(const[e,r]of n)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8628,3069,6247],{13069:(e,t,r)=>{r.d(t,{lk:()=>a,vD:()=>i,yS:()=>s});const n="randomUUID"in crypto;function a(){if(n)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function s(){return`{${a().toUpperCase()}}`}function i(){return`{${a()}}`}},17136:(e,t,r)=>{r.d(t,{el:()=>I});var n=r(92602),a=r(49186),s=r(53966),i=r(39829),o=r(82799),l=r(80754),d=r(21325),u=r(28735),c=(r(59456),r(78888)),p=r(65864),f=r(2272),h=r(84952),m=r(92300);const y=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function b(e){return"polyline"===e[0].type}function w(e,t,r){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof i.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new a.A(e)}const r=(0,l.r8)(e),n=[];for(const e of r){const r=[];n.push(r),r.push([e[0][0],e[0][1]]);for(let n=0;n<e.length-1;n++){const a=e[n][0],s=e[n][1],i=e[n+1][0],o=e[n+1][1],l=Math.sqrt((i-a)*(i-a)+(o-s)*(o-s)),d=(o-s)/l,u=(i-a)/l,c=l/t;if(c>1){for(let e=1;e<=c-1;e++){const n=e*t,i=u*n+a,o=d*n+s;r.push([i,o])}const e=(l+Math.floor(c-1)*t)/2,n=u*e+a,i=d*e+s;r.push([n,i])}r.push([i,o])}}return function(e){return"polygon"===e.type}(e)?new i.A({rings:n,spatialReference:e.spatialReference}):new o.A({paths:n,spatialReference:e.spatialReference})}(e,1e6);e=(0,u.ci)(t,!0)}return r&&(e=(0,l.kS)(e,r)),e}function A(e,t,r){if(Array.isArray(e)){const n=e[0];if(n>t){const r=(0,l.kd)(n,t);e[0]=n+r*(-2*t)}else if(n<r){const t=(0,l.kd)(n,r);e[0]=n+t*(-2*r)}}else{const n=e.x;if(n>t){const r=(0,l.kd)(n,t);e=e.clone().offset(r*(-2*t),0)}else if(n<r){const t=(0,l.kd)(n,r);e=e.clone().offset(t*(-2*r),0)}}return e}function F(e,t){let r=-1;for(let n=0;n<t.cutIndexes.length;n++){const a=t.cutIndexes[n],s=t.geometries[n],i=(0,l.r8)(s);for(let e=0;e<i.length;e++){const t=i[e];t.some((r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const n=t[e][0];r=n>r?n:r}r=Number(r.toFixed(9));const n=-360*(0,l.kd)(r,180);for(let r=0;r<t.length;r++){const t=s.getPoint(e,r);s.setPoint(e,r,t.clone().offset(n,0))}return!0}}))}if(a===r){if(g(e))for(const t of(0,l.r8)(s))e[a]=e[a].addRing(t);else if(b(e))for(const t of(0,l.r8)(s))e[a]=e[a].addPath(t)}else r=a,e[a]=s}return e}async function I(e,t,r){if(!Array.isArray(e))return I([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const a="string"==typeof t?t:t?.url??n.A.geometryServiceUrl;let s,g,b,v,S,R,$,E,k=0;const M=[],j=[];for(const t of e)if(null!=t)if(s||(s=t.spatialReference,g=(0,d.Vp)(s),b=s.isWebMercator,R=b?102100:4326,v=l.j7[R].maxX,S=l.j7[R].minX,$=l.j7[R].plus180Line,E=l.j7[R].minus180Line),g)if("mesh"===t.type)j.push(t);else if("point"===t.type)j.push(A(t.clone(),v,S));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>A(e,v,S))),j.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);j.push(e.rings?new i.A(e):e)}else if(t.extent){const e=t.extent,r=(0,l.kd)(e.xmin,S)*(2*v);let n=0===r?t.clone():(0,l.kS)(t.clone(),r);e.offset(r,0);let{xmin:a,xmax:s}=e;a=Number(a.toFixed(9)),s=Number(s.toFixed(9)),e.intersects($)&&s!==v?(k=s>k?s:k,n=w(n,b),M.push(n),j.push("cut")):e.intersects(E)&&a!==S?(k=s*(2*v)>k?s*(2*v):k,n=w(n,b,360),M.push(n),j.push("cut")):j.push(n)}else j.push(t.clone());else j.push(t);else j.push(t);let O=(0,l.kd)(k,v),L=-90;const x=O,U=new o.A;for(;O>0;){const e=360*O-180;U.addPath([[e,L],[e,-1*L]]),L*=-1,O--}if(M.length>0&&x>0){const t=F(M,await async function(e,t,r,n){const a=(0,f.Dl)(e),s=t[0].spatialReference,i={...n,responseType:"json",query:{...a.query,f:"json",sr:(0,d.YX)(s),target:JSON.stringify({geometryType:(0,p.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},o=await(0,c.A)(a.path+"/cut",i),{cutIndexes:l,geometries:u=[]}=o.data;return{cutIndexes:l,geometries:u.map((e=>{const t=(0,p.rS)(e);return t.spatialReference=s,t}))}}(a,M,U,r)),n=[],s=[];for(let r=0;r<j.length;r++){const a=j[r];if("cut"!==a)s.push(a);else{const a=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&a.rings.length>=i.rings.length?(n.push(a),s.push("simplify")):s.push(b?(0,u.Gh)(a):a)}}if(!n.length)return s;const i=await async function(e,t,r){const n="string"==typeof e?(0,h.An)(e):e,a=t[0].spatialReference,s=(0,p.$B)(t[0]),i={...r,query:{...n.query,f:"json",sr:(0,d.YX)(a),geometries:JSON.stringify((0,m.X)(t))}},{data:o}=await(0,c.A)(n.path+"/simplify",i);return(0,m.V)(o.geometries,s,a)}(a,n,r),o=[];for(let e=0;e<s.length;e++){const t=s[e];"simplify"!==t?o.push(t):o.push(b?(0,u.Gh)(i.shift()):i.shift())}return o}const V=[];for(let e=0;e<j.length;e++){const t=j[e];if("cut"!==t)V.push(t);else{const e=M.shift();V.push(!0===b?(0,u.Gh)(e):e)}}return V}},80754:(e,t,r)=>{r.d(t,{j7:()=>i,kS:()=>l,kd:()=>o,r8:()=>d});var n=r(82799),a=r(16930),s=r(65864);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new n.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator}),minus180Line:new n.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:a.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new n.A({paths:[[[180,-180],[180,180]]],spatialReference:a.A.WGS84}),minus180Line:new n.A({paths:[[[-180,-180],[-180,180]]],spatialReference:a.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=d(e);for(const e of r)for(const r of e)r[0]+=t;return e}function d(e){return(0,s.Bi)(e)?e.rings:e.paths}},78628:(e,t,r)=>{r.d(t,{applyEdits:()=>I,r3:()=>w,uploadAssets:()=>M,zp:()=>F});var n=r(52106),a=r(5503),s=r(49186),i=r(4718),o=r(53966),l=r(74887),d=r(84952),u=r(13069),c=r(17136),p=r(21325),f=r(47685),h=r(30524),m=r(20557),y=r(83531);function g(e){return null!=e?.applyEdits}function b(e){return"object"==typeof e&&null!=e&&"objectId"in e&&!!e.objectId}function w(e){return e.every(b)}function A(e){return"object"==typeof e&&null!=e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(A)}async function I(e,t,r,n={}){let d;const c="gdbVersion"in e?e.gdbVersion:null,p=n.gdbVersion??c;if((0,f.Mk)(e)&&e.url)d=(0,f.Zk)(e.url,e.layerId,p,"original-and-current-features"===n.returnServiceEditsOption);else{d=(0,l.Tw)(),d.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:d.promise};e.emit("apply-edits",t)}try{const{results:l,edits:c}=await async function(e,t,r,n){if(await e.load(),!g(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!(0,y.tk)(e))throw new s.A(`${e.type}-layer:editing-disabled`,"Editing is disabled for layer",{layer:e});const{edits:i,options:l}=await async function(e,t,r){const n=(0,y.BR)(e),i=t&&(t.addFeatures||t.updateFeatures||t.deleteFeatures),l=t&&(t.addAttachments||t.updateAttachments||t.deleteAttachments),d=null!=e.infoFor3D;if(function(e,t,r,n,a,i){if(!e||!n&&!a)throw new s.A(`${i}:missing-parameters`,"'addFeatures', 'updateFeatures', 'deleteFeatures', 'addAttachments', 'updateAttachments' or 'deleteAttachments' parameter is required");if(!t.editing.supportsGlobalId&&r?.globalIdUsed)throw new s.A(`${i}:invalid-parameter`,"This layer does not support 'globalIdUsed' parameter. See: 'capabilities.editing.supportsGlobalId'");if(!t.editing.supportsGlobalId&&a)throw new s.A(`${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 s.A(`${i}:invalid-parameter`,"When 'addAttachments', 'updateAttachments' or 'deleteAttachments' is specified, globalIdUsed should be set to true")}(t,n,r,!!i,!!l,`${e.type}-layer`),!n.data.isVersioned&&r?.gdbVersion)throw new s.A(`${e.type}-layer:invalid-parameter`,"'gdbVersion' is applicable only if the layer supports versioned data. See: 'capabilities.data.isVersioned'");if(!n.editing.supportsRollbackOnFailure&&r?.rollbackOnFailureEnabled)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'rollbackOnFailureEnabled' parameter. See: 'capabilities.editing.supportsRollbackOnFailure'");const c={...r};if(null!=c.rollbackOnFailureEnabled||n.editing.supportsRollbackOnFailure||(c.rollbackOnFailureEnabled=!0),c.rollbackOnFailureEnabled||"original-and-current-features"!==c.returnServiceEditsOption||(!1===c.rollbackOnFailureEnabled&&o.A.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 overwritten and set to true."),c.rollbackOnFailureEnabled=!0),!n.editing.supportsReturnServiceEditsInSourceSpatialReference&&c.returnServiceEditsInSourceSR)throw new s.A(`${e.type}-layer:invalid-parameter`,"This layer does not support 'returnServiceEditsInSourceSR' parameter. See: 'capabilities.editing.supportsReturnServiceEditsInSourceSpatialReference'");if(c.returnServiceEditsInSourceSR&&"original-and-current-features"!==c.returnServiceEditsOption)throw new s.A(`${e.type}-layer:invalid-parameter`,"'returnServiceEditsInSourceSR' is valid only when 'returnServiceEditsOption' is set to 'original-and-current-features'");const p=function(e,t,r){const n=function(e){return{addFeatures:Array.from(e?.addFeatures??[]),updateFeatures:Array.from(e?.updateFeatures??[]),deleteFeatures:e&&a.A.isCollection(e.deleteFeatures)?e.deleteFeatures.toArray():e.deleteFeatures||[],addAttachments:e.addAttachments||[],updateAttachments:e.updateAttachments||[],deleteAttachments:e.deleteAttachments||[]}}(e);if(n.addFeatures?.length&&!t.operations.supportsAdd)throw new s.A(`${r}:unsupported-operation`,"Layer does not support adding features.");if(n.updateFeatures?.length&&!t.operations.supportsUpdate)throw new s.A(`${r}:unsupported-operation`,"Layer does not support updating features.");if(n.deleteFeatures?.length&&!t.operations.supportsDelete)throw new s.A(`${r}:unsupported-operation`,"Layer does not support deleting features.");return n.addFeatures=n.addFeatures.map(E),n.updateFeatures=n.updateFeatures.map(E),n.addAssetFeatures=[],n}(t,n,`${e.type}-layer`),f=r?.globalIdUsed||d,h=e.fields.filter((e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8));if(f){const{globalIdField:t}=e;if(null==t)throw new s.A(`${e.type}-layer:invalid-parameter`,"Layer does not specify a global id field.");p.addFeatures.forEach((e=>function(e,t){const{attributes:r}=e;null==r[t]&&(r[t]=(0,u.yS)())}(e,t)))}return p.addFeatures.forEach((t=>function(e,t,r,n){v(e,t,r,n),S(e,t)}(t,e,f,h))),p.updateFeatures.forEach((t=>function(e,t,r,n){v(e,t,r,n),S(e,t);const a=(0,y.BR)(t);if("geometry"in e&&null!=e.geometry&&!a?.editing.supportsGeometryUpdate)throw new s.A(`${t.type}-layer:unsupported-operation`,"Layer does not support geometry updates.")}(t,e,f,h))),p.deleteFeatures.forEach((t=>function(e,t,r,n){v(e,t,r,n)}(t,e,f,h))),p.addAttachments.forEach((t=>R(t,e))),p.updateAttachments.forEach((t=>R(t,e))),d&&await async function(e,t){if(null==t.infoFor3D)return;const{infoFor3D:r}=t,n=(0,m.R_)("model/gltf-binary",r.supportedFormats)??(0,m.E1)("glb",r.supportedFormats);if(!n||!r.editFormats.includes(n))throw new s.A(`${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??[])k(t)&&a.push(t);for(const t of e.updateFeatures??[])k(t)&&a.push(t)}(p,e),{edits:await $(p),options:c}}(e,r,n);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,n),p=e=>e.filter((e=>!e.error)).map(i.o8),f={edits:c,addedFeatures:p(l.addFeatureResults),updatedFeatures:p(l.updateFeatureResults),deletedFeatures:p(l.deleteFeatureResults),addedAttachments:p(l.addAttachmentResults),updatedAttachments:p(l.updateAttachmentResults),deletedAttachments:p(l.deleteAttachmentResults),exceededTransferLimit:!1,historicMoment:l.editMoment?new Date(l.editMoment):null,globalIdToObjectId:n.globalIdToObjectId};return l.editedFeatureResults?.length&&(f.editedFeatures=l.editedFeatureResults),d.resolve(f),l}catch(e){throw d.reject(e),e}}function v(e,t,r,n){if(r){if("attributes"in e&&!e.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,`Feature should have '${t.globalIdField}' when 'globalIdUsed' is true`);if(!("attributes"in e)&&!e.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"`'globalId' of the feature should be passed when 'globalIdUsed' is true")}if(n.length&&"attributes"in e)for(const r of n){const n=e.attributes[r.name];if(void 0!==n&&!(0,h.OG)(r,n))throw new s.A(`${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 s.A(`${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 s.A(`${t.type}-layer:m-unsupported`,"Layer does not support m values while feature has m values.")}}function S(e,t){if("geometry"in e&&"mesh"===e.geometry?.type&&null!=t.infoFor3D&&null!=t.spatialReference){const{geometry:r}=e,{spatialReference:n,vertexSpace:a}=r,i=t.spatialReference,o="local"===a.type,l=(0,p.EA)(i),d=(0,p.aI)(i,n),u=d||(0,p.oT)(i)&&((0,p.oT)(n)||(0,p.K8)(n));if(!(o&&l&&u||!o&&!l&&d))throw new s.A(`${t.type}-layer:mesh-unsupported`,`Uploading a mesh with a ${a.type} vertex space and a spatial reference wkid:${n.wkid} to a layer with a spatial reference wkid:${i.wkid} is not supported.`)}}function R(e,t){const{feature:r,attachment:n}=e;if(!r||"attributes"in r&&!r.attributes[t.globalIdField])throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to a feature with 'globalId'");if(!("attributes"in r)&&!r.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have reference to 'globalId' of the parent feature");if(!n.globalId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'globalId'");if(!n.data&&!n.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment should have 'data' or 'uploadId'");if(!(n.data instanceof File&&n.data.name||n.name))throw new s.A(`${t.type}-layer:invalid-parameter`,"'name' is required when attachment is specified as Base64 encoded string using 'data'");if(!t.capabilities?.editing.supportsUploadWithItemId&&n.uploadId)throw new s.A(`${t.type}-layer:invalid-parameter`,"This layer does not support 'uploadId' parameter. See: 'capabilities.editing.supportsUploadWithItemId'");if("string"==typeof n.data){const e=(0,d.r$)(n.data);if(e&&!e.isBase64)throw new s.A(`${t.type}-layer:invalid-parameter`,"Attachment 'data' should be a Blob, File or Base64 encoded string")}}async function $(e){const t=e.addFeatures??[],r=e.updateFeatures??[],n=t.concat(r).map((e=>e.geometry)),a=await(0,c.el)(n),s=t.length,i=r.length;return a.slice(0,s).forEach(((e,r)=>t[r].geometry=e)),a.slice(s,s+i).forEach(((e,t)=>r[t].geometry=e)),e}function E(e){const t=new n.A;return e.attributes||(e.attributes={}),t.geometry=e.geometry,t.attributes=e.attributes,t}function k(e){return"mesh"===e?.geometry?.type}function M(e,t,r,n){if(!g(t))throw new s.A(`${e.type}-layer:no-editing-support`,"Layer source does not support applyEdits capability",{layer:e});if(!t.uploadAssets)throw new s.A(`${e.type}-layer:no-asset-upload-support`,"Layer source does not support uploadAssets capability",{layer:e});return t.uploadAssets(r,n)}},47685:(e,t,r)=>{r.d(t,{Mk:()=>p,Zk:()=>u,w6:()=>m});var n=r(90237),a=r(65529),s=r(4718),i=r(74887),o=(r(53966),r(44208),r(49186),r(40608)),l=r(20816);const d=new a.A.EventEmitter;function u(e,t,r=null,n=!1){const a=(0,i.Tw)();return n=null==t||n,d.emit("apply-edits",{serviceUrl:e,layerId:t,gdbVersion:r,mayReceiveServiceEdits:n,result:a.promise}),a}const c=Symbol();function p(e){return null!=e&&"object"==typeof e&&c in e}function f(e){return null!=e&&"object"==typeof e&&"gdbVersion"in e}function h(e,t,r){const n=new URL(e).host,a=l.Z3.get(n),s=e=>!e||e===a;return s(t)&&s(r)||t===r}const m=e=>{var t;let r=class extends e{constructor(...e){super(...e),this[t]=!0,this._applyEditsHandler=e=>{const{serviceUrl:t,layerId:r,gdbVersion:n,mayReceiveServiceEdits:a,result:i}=e,o=t===this.url,d=null!=r&&null!=this.layerId&&r===this.layerId,u=f(this),c=f(this)&&h(t,n,this.gdbVersion);if(!o||u&&!c||!d&&!a)return;const p=i.then((e=>{if(d&&(e.addedFeatures.length||e.updatedFeatures.length||e.deletedFeatures.length||e.addedAttachments.length||e.updatedAttachments.length||e.deletedAttachments.length))return this.emit("edits",(0,s.o8)(e)),e;const t=e.editedFeatures?.find((({layerId:e})=>e===this.layerId));if(t){const{adds:r,updates:n,deletes:a}=t.editedFeatures,i={edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:r?r.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],deletedFeatures:a?a.map((({attributes:e})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],updatedFeatures:n?n.map((({current:{attributes:e}})=>({objectId:this.objectIdField&&e[this.objectIdField],globalId:this.globalIdField&&e[this.globalIdField]}))):[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)};return this.emit("edits",i),i}return{edits:null,addedAttachments:[],deletedAttachments:[],updatedAttachments:[],addedFeatures:[],deletedFeatures:[],updatedFeatures:[],editedFeatures:(0,s.o8)(e.editedFeatures),exceededTransferLimit:!1,historicMoment:(0,s.o8)(e.historicMoment)}})).then((e=>("historicMoment"in this&&this.historicMoment!==e.historicMoment&&(0,l.w5)(t,n)&&(this.historicMoment=e.historicMoment),e)));this.emit("apply-edits",{result:p})},this._updateMomentHandler=e=>{const{serviceUrl:t,gdbVersion:r,moment:n}=e,a=t===this.url,s=f(this),i=f(this)&&h(t,r,this.gdbVersion),o=f(this)&&!h(t,this.gdbVersion,null);a&&s&&i&&o&&"historicMoment"in this&&this.historicMoment!==n&&(this.historicMoment=n)},this.when().then((()=>{this.addHandles(function(e){return d.on("apply-edits",new WeakRef(e))}(this._applyEditsHandler)),"historicMoment"in this&&this.addHandles(function(e){return d.on("update-moment",new WeakRef(e))}(this._updateMomentHandler))}),(()=>{}))}};return t=c,r=(0,n._)([(0,o.$)("esri.layers.mixins.EditBusLayer")],r),r}},20557:(e,t,r)=>{r.d(t,{E1:()=>o,Fm:()=>l,JZ:()=>h,R_:()=>i,fu:()=>a,oF:()=>s,rq:()=>d});const n=[["binary","application/octet-stream","bin",""]];function a(e,t){return null!=c(t.name,e?.supportedFormats??[])}function s(e,t){if(!e)return!1;const r=d(t,e.supportedFormats??[]);return null!=r&&e.editFormats.includes(r)}function i(e,t){return p(function(e,t){const r=e.toLowerCase();return u(t).find((e=>f(e)===r))}(e,t))}function o(e,t){return p(c(e,t))}function l(e,t){return f(function(e,t){return u(t).find((t=>p(t)===e))}(e,t))}function d(e,t){return o(e.name,t)??i(e.type,t)}function u(e){return[...n,...e]}function c(e,t){const r=e.toLowerCase();return u(t).find((e=>function(e){return e?.[2].split(",").map((e=>e.toLowerCase()))??[]}(e).some((e=>r.endsWith(e)))))}function p(e){return e?.[0]}function f(e){return e?.[1].toLowerCase()}function h(e){return e.tables?.find((e=>"assetMaps"===e.role))}},92300:(e,t,r)=>{r.d(t,{V:()=>s,X:()=>a});var n=r(65864);function a(e){return{geometryType:(0,n.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function s(e,t,r){const a=(0,n.xD)(t);return e.map((e=>{const t=a.fromJSON(e);return t.spatialReference=r,t}))}},2272:(e,t,r)=>{r.d(t,{Dl:()=>i,jV:()=>s,lF:()=>o}),r(92602),r(70333);var n=r(4718),a=r(84952);function s(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function i(e){return"string"==typeof e?(0,a.An)(e):(0,n.o8)(e)}function o(e,t,r){const n={};for(const a in e){if("declaredClass"===a)continue;const s=e[a];if(null!=s&&"function"!=typeof s)if(Array.isArray(s))n[a]=s.map((e=>o(e)));else if("object"==typeof s)if(s.toJSON){const e=s.toJSON(r?.[a]);n[a]=t?e:JSON.stringify(e)}else n[a]=t?s:JSON.stringify(s);else n[a]=s}return n}r(926)},20816:(e,t,r)=>{r.d(t,{TA:()=>a,We:()=>o,Z3:()=>s,ZJ:()=>l,w5:()=>d});var n=r(78888);const a=(0,r(13069).vD)(),s=new Map,i=new Map;async function o(e,t,r){if(!e||!r)return!1;if(!t)return!0;const a=new URL(e).host;let i=s.get(a);if(!i){const t=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,"");i=(await(0,n.A)(t,{responseType:"json",query:{f:"json"}})).data.defaultVersionName}return i===t}async function l(e,t,n=!1){if(!e||!t)return!0;const s=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),o=i.get(s)?.entries();if(o)for(const[e,i]of o)if(i.name===t){const t=!i.stack?.hasForwardEdits();if(!t&&n){const[{deleteForwardEdits:t},{default:n}]=await Promise.all([r.e(2186).then(r.bind(r,32186)),r.e(2558).then(r.bind(r,32558))]);return t(s,e,new n({sessionId:a,moment:i.moment}))}return t}return!0}function d(e,t){if(!e)return!1;const r=e.replace(/\/FeatureServer/i,"/VersionManagementServer").replace(/\/\d*$/,""),n=i.get(r)?.entries();if(n)for(const[e,r]of n)if(r.name===t)return"edit"===r.lockType;return!1}new Map}}]);