@arcgis/core 5.2.0-next.154 → 5.2.0-next.155

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 (91) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/28b74bc77f7c13080074.js +1 -0
  3. package/assets/esri/core/workers/chunks/2a226b69d38c72a47a08.js +1 -0
  4. package/assets/esri/core/workers/chunks/{53e2f2b922116a45fe8f.js → 49ff0985fb307ac193ab.js} +1 -1
  5. package/assets/esri/core/workers/chunks/5f4feca26102088ea565.js +1 -0
  6. package/assets/esri/core/workers/chunks/{407f1e8176f3b0af73b4.js → 66867e523cc82f8fe35b.js} +1 -1
  7. package/assets/esri/core/workers/chunks/6c469b43089767176ced.js +1 -0
  8. package/assets/esri/core/workers/chunks/{693873b3eb99fba58fa9.js → 78c4e43cfa1eda06b4d9.js} +1 -1
  9. package/assets/esri/core/workers/chunks/81cad8d2f62a5f671c55.js +1 -0
  10. package/assets/esri/core/workers/chunks/{588e677f33df86a595bf.js → 820c8aaf3632edb0150c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5924ec3167a2941ebb1f.js → 88c74f3316f1fc253207.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{a4162a8660bf763d542d.js → 967b4992b400517ee712.js} +1 -1
  13. package/assets/esri/core/workers/chunks/96b6ea199ad949fef17c.js +1 -0
  14. package/assets/esri/core/workers/chunks/{adf25e5ed99615b83c68.js → a62c12925303ff802c3d.js} +1 -1
  15. package/assets/esri/core/workers/chunks/acdfd275dbf8533a67f3.js +1 -0
  16. package/assets/esri/core/workers/chunks/b3007aedbf731dacaff1.js +1 -0
  17. package/assets/esri/core/workers/chunks/c1254cd131a62750ff6f.js +1 -0
  18. package/assets/esri/core/workers/chunks/c19f238b55ff2893f7c2.js +1 -0
  19. package/assets/esri/core/workers/chunks/c72a904e01dc8c17d992.js +1 -0
  20. package/assets/esri/core/workers/chunks/de6081df29183bf80787.js +1 -0
  21. package/assets/esri/core/workers/chunks/e653c81ffb3d818645dd.js +1 -0
  22. package/assets/esri/core/workers/chunks/fda83bcb8e40e8044c24.js +1 -0
  23. package/assets/esri/libs/pdfjs/wasm/openjpeg_nowasm_fallback.js +1 -0
  24. package/assets/esri/widgets/support/uriUtils/t9n/messages.fr.json +1 -1
  25. package/config.js +1 -1
  26. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  27. package/geometry/support/curves/mathUtils.js +1 -1
  28. package/interfaces.d.ts +18 -9
  29. package/kernel.js +1 -1
  30. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  31. package/layers/graphics/sources/GeoJSONSource.js +1 -1
  32. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  33. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  34. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  35. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  36. package/layers/support/fieldUtils.js +1 -1
  37. package/layers/support/vectorTileLayerLoader.js +1 -1
  38. package/package.json +2 -2
  39. package/portal/schemas/definitions.js +1 -1
  40. package/symbols/cim/cimAnalyzer.js +1 -1
  41. package/views/2d/engine/vectorTiles/TileHandler.js +1 -1
  42. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSource.js +1 -1
  43. package/views/2d/engine/vectorTiles/style/GeoJSONVectorTileSourceWorker.js +1 -1
  44. package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +2 -0
  45. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  46. package/views/2d/layers/features/schema/processor/symbols/ComplexSymbolSchema.js +1 -1
  47. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  48. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  49. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  50. package/views/3d/webgl-engine/lib/PathBuilder.js +1 -1
  51. package/views/3d/webgl-engine/lib/PathCapBuilder.js +1 -1
  52. package/views/3d/webgl-engine/lib/PathEvaluator.js +1 -1
  53. package/views/3d/webgl-engine/lib/PathExtruder.js +1 -1
  54. package/views/3d/webgl-engine/lib/PathProfile.js +1 -1
  55. package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
  56. package/views/draw/DrawTool.js +1 -1
  57. package/views/draw/support/PluginContext.js +1 -1
  58. package/views/draw/support/managers/TooltipManager.js +1 -1
  59. package/views/draw/support/types.d.ts +5 -2
  60. package/webdoc/applicationProperties/SearchLayerField.d.ts +7 -1
  61. package/webdoc/applicationProperties/SearchLayerField.js +1 -1
  62. package/webdoc/applicationProperties/SearchTableField.d.ts +7 -1
  63. package/webdoc/applicationProperties/SearchTableField.js +1 -1
  64. package/webdoc/applicationProperties/searchMode.js +2 -0
  65. package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
  66. package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
  67. package/widgets/BatchAttributeForm.js +1 -1
  68. package/widgets/Editor/EditorViewModel.d.ts +10 -1
  69. package/widgets/Editor.d.ts +10 -1
  70. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  71. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  72. package/widgets/Legend.d.ts +1 -0
  73. package/widgets/Search/LayerSearchSource.d.ts +23 -1
  74. package/widgets/Search/LayerSearchSource.js +1 -1
  75. package/widgets/Search/support/layerSearchUtils.js +1 -1
  76. package/widgets/Search/types.d.ts +7 -0
  77. package/widgets/support/forms/formUtils.js +1 -1
  78. package/widgets/support/forms/types.d.ts +1 -1
  79. package/assets/esri/core/workers/chunks/03afeefb9d16b6f1d844.js +0 -1
  80. package/assets/esri/core/workers/chunks/09b9a886363bc1197785.js +0 -1
  81. package/assets/esri/core/workers/chunks/4fc337240e7cddd0e988.js +0 -1
  82. package/assets/esri/core/workers/chunks/5732fdf6d8b87739aeea.js +0 -1
  83. package/assets/esri/core/workers/chunks/5fa1ec357c3ad1f91bc7.js +0 -1
  84. package/assets/esri/core/workers/chunks/7d1fd2df579a4b535e0e.js +0 -1
  85. package/assets/esri/core/workers/chunks/7e0cf70c0eb5a2ddfcec.js +0 -1
  86. package/assets/esri/core/workers/chunks/879b2de825c1dfc8849d.js +0 -1
  87. package/assets/esri/core/workers/chunks/917f53833b853898facc.js +0 -1
  88. package/assets/esri/core/workers/chunks/937824bc7948f7bc7845.js +0 -1
  89. package/assets/esri/core/workers/chunks/b132ffa7e8bb461b6786.js +0 -1
  90. package/assets/esri/core/workers/chunks/e01aeac34474540f61ee.js +0 -1
  91. package/assets/esri/core/workers/chunks/e15ba90af0faf873b42d.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7013],{69052(e,t,r){r.d(t,{hr:()=>i});var s=r(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return a(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+n(this.range,e-t,r)}minimalMonotonic(e,t,r){return a(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(s)?r:s}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function a(e,t,r,s,i=0,a=!1){return(s-=i)<t?s+=n(e,t-s):s>r&&(s-=n(e,s-r)),a&&s===r&&(s=t),s+i}function n(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const o=new i(0,2*Math.PI),u=(new i(-Math.PI,Math.PI),new i(0,360));r.d(t,["ie",0,u,"uC",0,o])},18370(e,t,r){r.d(t,{z:()=>i});class s{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new s(e)}},82534(e,t,r){function s(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>i,vt:()=>s});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:i,create:s,fromValues:function(e,t,r,s){return[e,t,r,s]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,a])},67026(e,t,r){r.d(t,{A6:()=>f,Xd:()=>p,Xr:()=>d,lw:()=>c,x8:()=>l});var s=r(29242),i=r(82534),a=r(51850),n=r(34304),o=r(35522),u=r(78955);function l(e,t,r){r*=.5;let s=Math.sin(r);return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=Math.cos(r),e}function p(e,t){let r=2*Math.acos(t[3]),s=Math.sin(r/2);return s>(0,n.FD)()?(e[0]=t[0]/s,e[1]=t[1]/s,e[2]=t[2]/s):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){let s=t[0],i=t[1],a=t[2],n=t[3],o=r[0],u=r[1],l=r[2],p=r[3];return e[0]=s*p+n*o+i*l-a*u,e[1]=i*p+n*u+a*o-s*l,e[2]=a*p+n*l+s*u-i*o,e[3]=n*p-s*o-i*u-a*l,e}function h(e,t,r,s){let i,a,o,u,l,p=t[0],c=t[1],h=t[2],d=t[3],y=r[0],f=r[1],m=r[2],g=r[3];return a=p*y+c*f+h*m+d*g,a<0&&(a=-a,y=-y,f=-f,m=-m,g=-g),1-a>(0,n.FD)()?(i=Math.acos(a),o=Math.sin(i),u=Math.sin((1-s)*i)/o,l=Math.sin(s*i)/o):(u=1-s,l=s),e[0]=u*p+l*y,e[1]=u*c+l*f,e[2]=u*h+l*m,e[3]=u*d+l*g,e}function d(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){let r,s=t[0]+t[4]+t[8];if(s>0)r=Math.sqrt(s+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{let s=0;t[4]>t[0]&&(s=1),t[8]>t[3*s+s]&&(s=2);let i=(s+1)%3,a=(s+2)%3;r=Math.sqrt(t[3*s+s]-t[3*i+i]-t[3*a+a]+1),e[s]=.5*r,r=.5/r,e[3]=(t[3*i+a]-t[3*a+i])*r,e[i]=(t[3*i+s]+t[3*s+i])*r,e[a]=(t[3*a+s]+t[3*s+a])*r}return e}function f(e,t,r,s){let i=.5*Math.PI/180;t*=i,r*=i,s*=i;let a=Math.sin(t),n=Math.cos(t),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),p=Math.cos(s);return e[0]=a*u*p-n*o*l,e[1]=n*o*p+a*u*l,e[2]=n*u*l-a*o*p,e[3]=n*u*p+a*o*l,e}const m=u.C,g=u.hZ,S=u.WQ,A=c,v=u.hs,_=u.Om,b=u.Cc,x=u.Bw,w=x,M=u.m3,q=M,I=u.S8,F=u.t2,R=u.aI,O=(0,a.vt)(),C=(0,a.fA)(1,0,0),T=(0,a.fA)(0,1,0),P=(0,i.vt)(),E=(0,i.vt)(),N=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:S,calculateW:function(e,t){let r=t[0],s=t[1],i=t[2];return e[0]=r,e[1]=s,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-s*s-i*i)),e},conjugate:d,copy:m,dot:_,equals:R,exactEquals:F,fromEuler:f,fromMat3:y,getAxisAngle:p,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){let r=t[0],s=t[1],i=t[2],a=t[3],n=r*r+s*s+i*i+a*a,o=n?1/n:0;return e[0]=-r*o,e[1]=-s*o,e[2]=-i*o,e[3]=a*o,e},len:w,length:x,lerp:b,mul:A,multiply:c,normalize:I,random:function(e){let t=n.Ov,r=t(),s=t(),i=t(),a=Math.sqrt(1-r),o=Math.sqrt(r);return e[0]=a*Math.sin(2*Math.PI*s),e[1]=a*Math.cos(2*Math.PI*s),e[2]=o*Math.sin(2*Math.PI*i),e[3]=o*Math.cos(2*Math.PI*i),e},rotateX:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u+n*o,e[1]=i*u+a*o,e[2]=a*u-i*o,e[3]=n*u-s*o,e},rotateY:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u-a*o,e[1]=i*u+n*o,e[2]=a*u+s*o,e[3]=n*u-i*o,e},rotateZ:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u+i*o,e[1]=i*u-s*o,e[2]=a*u+n*o,e[3]=n*u-a*o,e},rotationTo:function(e,t,r){let s=(0,o.Om)(t,r);return s<-.999999?((0,o.$A)(O,C,t),(0,o.Il)(O)<1e-6&&(0,o.$A)(O,T,t),(0,o.S8)(O,O),l(e,O,Math.PI),e):s>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,o.$A)(O,t,r),e[0]=O[0],e[1]=O[1],e[2]=O[2],e[3]=1+s,I(e,e))},scale:v,set:g,setAxes:function(e,t,r,s){let i=N;return i[0]=r[0],i[3]=r[1],i[6]=r[2],i[1]=s[0],i[4]=s[1],i[7]=s[2],i[2]=-t[0],i[5]=-t[1],i[8]=-t[2],I(e,y(e,i))},setAxisAngle:l,slerp:h,sqlerp:function(e,t,r,s,i,a){return h(P,t,i,a),h(E,r,s,a),h(e,P,E,2*a*(1-a)),e},sqrLen:q,squaredLength:M,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"})),r.d(t,["hZ",0,g,"t2",0,F])},95696(e,t,r){r.d(t,{A:()=>l});var s,i=r(32198),a=r(69540),n=r(25482),o=r(91429),u=r(93223);let l=class extends((0,a.OU)(n.o)){static{s=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,i.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,i.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(e,t,r){r.d(t,{A:()=>l});var s=r(32198),i=r(69540),a=r(25482),n=r(91429),o=r(51850),u=r(93223);let l=class extends((0,i.OU)(a.o)){constructor(e){super(e),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,n.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},73836(e,t,r){r.d(t,{A:()=>d});var s=r(32198),i=r(69540),a=r(25482),n=r(91429),o=r(58083),u=r(9093),l=r(67026),p=r(82534),c=r(51850),h=r(24770);let d=class extends((0,i.OU)(a.o)){constructor(e){super(e),this.translation=(0,c.vt)(),this.rotationAxis=(0,c.ci)(h.up),this.rotationAngle=0,this.scale=(0,c.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,c.o8)((0,h.yo)(e)),this.rotationAngle=(0,h.g7)(e)}get localMatrix(){let e=(0,u.vt)();return(0,l.x8)(y,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,o.t2)(this.localMatrix,e.localMatrix)}};(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s.Cg)([(0,n.MZ)()],d.prototype,"rotation",null),(0,s.Cg)([(0,n.MZ)()],d.prototype,"localMatrix",null),(0,s.Cg)([(0,n.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,s.Cg)([(0,n.$K)("esri.geometry.support.MeshTransform")],d);const y=(0,p.vt)()},24770(e,t,r){r.d(t,{$I:()=>m,AU:()=>d,g7:()=>f,i4:()=>p,ui:()=>c,vt:()=>l,yo:()=>y});var s=r(34727),i=r(58083),a=r(67026),n=r(82534),o=r(35522),u=r(51850);function l(e=S){return[e[0],e[1],e[2],e[3]]}function p(e,t,r=l()){return(0,o.C)(r,e),r[3]=t,r}function c(e,t=l()){let r=(0,i.l)(A,e);return g(t,(0,s.KJ)((0,a.Xd)(t,r))),t}function h(e,t,r=l()){return(0,a.x8)(A,e,m(e)),(0,a.x8)(v,t,m(t)),(0,a.lw)(A,v,A),g(r,(0,s.KJ)((0,a.Xd)(r,A)))}function d(e,t,r,s=l()){return p(u.Cw,e,_),p(u.JP,t,b),p(u.Cb,r,x),h(_,b,_),h(_,x,s),s}function y(e){return e}function f(e){return e[3]}function m(e){return(0,s.kU)(e[3])}function g(e,t){return e[3]=t,e}const S=[0,0,1,0],A=(0,n.vt)(),v=(0,n.vt)(),_=(l(),l()),b=l(),x=l();r.d(t,["up",0,S])},63579(e,t,r){r.d(t,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>f,in:()=>y,yr:()=>l});var s=r(56507),i=r(4576),a=r(17676),n=r(20557);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let r=await Promise.all(t.map(t=>t.toBlob(e)));return(0,a.Te)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,a.Te)(e),t}}function l(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(h):h(e.files);case"service":return e.assets.some(h);case"loadable":return!0;default:return!1}}(e?.source)}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function h(e){if(e instanceof File){let{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function d(e,t){if(!e)return!1;let{source:r}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(r,t)}function y(e,t){if(e===t)return!0;let{source:r}=e,{source:s}=t;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...r.assets].sort(e),i=[...s.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function f(e,t){return e instanceof File?(0,n.rq)(e,t):(0,n.z$)(e.assetMimeType,e.assetName,t)}function m(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function g(e){return!!e.original}},27615(e,t,r){r.d(t,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>p,yJ:()=>c});var s=r(35522),i=r(86738),a=r(95696),n=r(18251);function o(e){return null!=e.origin}function u(e){return o(e.vertexSpace)}function l(e,t){if(!o(e))return null;let[r,s,a]=e.origin;return new i.A({x:r,y:s,z:a,spatialReference:t})}function p(e,t){let{x:r,y:s,z:i,spatialReference:o}=e,u=[r,s,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(o))?new n.A({origin:u}):new a.A({origin:u})}function c(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,s.t2)(e.origin,t.origin))}},52039(e,t,r){r.d(t,{O7:()=>h,el:()=>l});var s=r(69052),i=(r(49186),r(18370)),a=r(17676),n=(r(5443),r(39829)),o=(r(82799),r(16930)),u=(r(80754),r(21325));async function l(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let s=null;for(let t of e)s??=t?.spatialReference;if(!s)return e;let i=(0,u.Vp)(s);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new n.A(t)]}let[o,l]=i.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=l,h||=t.x<=o;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=l,h||=e.xmin<=o,h||=e.xmax>=l,h||=e.xmax<=o}if(!h)return e;let[{foldInto360Range:d},y]=await(0,a.qr)(Promise.all([p.getImportPromise(),c.getImportPromise()]),r),f=y.fromSpatialReference(s);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=y.fromGeometry(e),r=y.toGeometry(d(t,f),s);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const p=(0,i.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),c=(0,i.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){let s=(0,u.Vp)(r);if(null==s)return e;let[i,a]=s.valid,n=2*a,o=0,l=0;t>a?o=Math.ceil(Math.abs(t-a)/n):t<i&&(o=-Math.ceil(Math.abs(t-i)/n)),e>a?l=Math.ceil(Math.abs(e-a)/n):e<i&&(l=-Math.ceil(Math.abs(e-i)/n));let p=e+(o-l)*n,c=p-t;return c>a?p-=n:c<i&&(p+=n),p}function d(e){let t=(0,u.Vp)(e);if(null==t)return null;let[r,i]=t.valid;return new s.hr(r,i)}const y=d(o.A.WGS84);d(o.A.WebMercator),r.d(t,["Y_",0,y])},80754(e,t,r){r.d(t,{kS:()=>l,kd:()=>u});var s=r(82799),i=r(16930),a=r(60408),n=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function u(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){if((0,n.Ed)(e))for(let r of function(e){return(0,a.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r){if((0,n.aO)(e)){let[r,s]=e.c;r[0]+=t,s[0]+=t;continue}if((0,n.FG)(e)){let[r,s]=e.a;r[0]+=t,s[0]+=t;continue}if((0,n.n1)(e)){let[r,s,i]=e.b;r[0]+=t,s[0]+=t,i[0]+=t;continue}e[0]+=t}for(let r of function(e){return(0,a.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},65515(e,t,r){r.r(t),r.d(t,{default:()=>Y});var s=r(32198),i=r(92602),a=r(56507),n=r(4576),o=r(49186),u=r(44208),l=r(66552),p=r(92474),c=r(53966),h=r(93637),d=r(17676),y=r(36708),f=r(84952),m=r(13069),g=r(91429),S=r(5443),A=r(16930),v=r(95696),_=r(27615),b=r(63579),x=r(52106),w=r(86211);function M(e){return"object"==typeof e&&!!e&&"objectId"in e&&!!e.objectId}function q(e){return e.every(M)}function I(e){return"object"==typeof e&&!!e&&"globalId"in e&&!!e.globalId}function F(e){return e.every(I)}var R=r(99917),O=r(65864),C=r(73836),T=r(21325);async function P(e,t,r){let{geometry:s}=t,i={...t.attributes};if(null!=r&&"mesh"===s?.type){let{transformFieldRoles:t}=r,{origin:a,spatialReference:n,vertexSpace:o}=s,u=s.transform??new C.A,l="local"===o.type,p=e.spatialReference,c=p.isGeographic,h=(0,T.aI)(p,n),d=(0,R.isEqualBaseGCS)(n,p)&&(0,R.canProjectWithoutEngine)(n,p);if(!(l&&c&&d||!l&&!c&&h))return null;let y=(0,R.projectWithoutEngine)(a,n,p);if(null==y)return null;if(i[t.originX]=y.x,i[t.originY]=y.y,i[t.originZ]=y.z??0,null!=u){let{translation:e,scale:r,rotation:s}=u,a=l?1:(0,w.KX)(n)/(0,w.KX)(p);i[t.translationX]=e[0]*a,i[t.translationY]=e[2]*a,i[t.translationZ]=-e[1]*a,i[t.scaleX]=r[0],i[t.scaleY]=r[2],i[t.scaleZ]=r[1],i[t.rotationX]=s[0],i[t.rotationY]=s[2],i[t.rotationZ]=-s[1],i[t.rotationDeg]=s[3]}return{attributes:i}}return null==s?{attributes:i}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:i}}async function E(e,t){let r=await Promise.all((t.addAttachments??[]).map(t=>N(e,t))),s=await Promise.all((t.updateAttachments??[]).map(t=>N(e,t))),i=t.deleteAttachments??[];return r.length||s.length||i.length?{adds:r,updates:s,deletes:[...i]}:null}async function N(e,t){let{feature:r,attachment:s}=t,{globalId:i,name:a,contentType:n,data:o,keywords:u,uploadId:l}=s,p={globalId:i};if(r&&("attributes"in r?p.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(p.parentGlobalId=r.globalId)),l)p.uploadId=l;else if(o){let e=await(0,f._0)(o);e&&(p.contentType=e.mediaType,p.data=e.data),o instanceof File&&(p.name=o.name)}return a&&(p.name=a),n&&(p.contentType=n),u&&(p.keywords=u),p}function D(e){let t=!0===e.success?null:e.error||{code:void 0,description:"Feature edit failed"};return{objectId:e.objectId,globalId:e.globalId,error:t?new o.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function Q(e,t){return new x.A({attributes:e.attributes,geometry:(0,O.rS)({...e.geometry,spatialReference:t})})}function V(e,t){return{adds:e?.adds?.map(e=>Q(e,t))||[],updates:e?.updates?.map(e=>({original:Q(e[0],t),current:Q(e[1],t)}))||[],deletes:e?.deletes?.map(e=>Q(e,t))||[],spatialReference:t}}var J=r(64714),Z=r(64314),j=r(60694),U=r(15426),G=r(20557),k=r(99199),B=r(96520),z=r(97552),X=r(79677),L=r(20816);const $=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends p.x_{constructor(e){super(e),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer","Annotation Layer","Dimension Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();let e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}let t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(e){let t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e)).then(()=>this._ensureLatestMetadata(e));return this.addResolvingPromise(r),Promise.resolve(this)}async reload(e){let t=this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0;await this._fetchService(null,{...e,cacheBust:t})}initialize(){this.addHandles([(0,y.wB)(()=>{let e=this.layer;return e&&"lastEditsEventDate"in e?e.lastEditsEventDate:null},e=>this._handleLastEditsEventChange(e))])}destroy(){this._removeEditInterceptor()}get queryTask(){let{capabilities:e,parsedUrl:t,gdbVersion:r,spatialReference:s,fieldsIndex:i,uniqueIdFields:a}=this.layer,n="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==n,p=l&&e?.query.supportsFormatPBFWithCurves,c=e?.operations?.supportsQueryAttachments??!1,h=e?.query?.relativeTimeBinWindow??0,d=t.path;return new Z.A({dynamicDataSource:o,fieldsIndex:i,gdbVersion:r,infoFor3D:n,pbfSupported:l,pbfSupportedWithCurves:p,queryAttachmentsSupported:c,relativeTimeBinWindow:h,sourceSpatialReference:s,uniqueIdFields:a,url:d})}async addAttachment(e,t,r){await this.load();let{layer:s}=this;await(0,U.VA)(s,"editing");let i=e.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+i+"/addAttachment",o=this._getLayerRequestOptions({query:r}),u=this._getFormDataForAttachment(t,o.query);try{return D((await(0,a.A)(n,{body:u})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(i,e)}}async updateAttachment(e,t,r,s){await this.load();let{layer:i}=this;await(0,U.VA)(i,"editing");let n=e.attributes[i.objectIdField],o=i.parsedUrl.path+"/"+n+"/updateAttachment",u=this._getLayerRequestOptions({query:{attachmentId:t,...s}}),l=this._getFormDataForAttachment(r,u.query);try{return D((await(0,a.A)(o,{body:l})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(n,e)}}async applyEdits(e,t){await this.load();let{layer:r}=this;await(0,U.VA)(r,"editing");let s="infoFor3D"in r?r.infoFor3D:null,i=null!=s,u=i||(t?.globalIdUsed??!1),l=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,p=e.addFeatures?.map(e=>P(this.layer,e,s))??[],c=(await Promise.all(p)).filter(n.Ru),h=e.updateFeatures?.map(e=>P(this.layer,e,s))??[],d=(await Promise.all(h)).filter(n.Ru),y=function(e,t,r){if(!t||0===t.length)return[];if(r&&F(t))return t.map(e=>e.globalId);if(q(t))return t.map(e=>e.objectId);let s=r?e.globalIdField:e.objectIdField;return s?t.map(e=>e.getAttribute(s)):[]}(this.layer,e.deleteFeatures,u);(0,B.u)(c,d,r.spatialReference);let f=await E(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,S={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,trueCurveClient:t?.editsRespectTrueCurves,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);let A=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(S.edits=JSON.stringify([{id:r.layerId,adds:c.length?c:null,updates:d.length?d:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),S.returnServiceEditsOption=$.toJSON(t?.returnServiceEditsOption),S.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(S.adds=c.length?JSON.stringify(c):null,S.updates=d.length?JSON.stringify(d):null,S.deletes=y.length?u?JSON.stringify(y):y.join(","):null,S.attachments=f&&JSON.stringify(f),S.assetMaps=null==l?void 0:JSON.stringify(l));let v=this._getLayerRequestOptions({method:"post",query:S});A&&(v.authMode="immediate",v.query.returnEditMoment=!0,v.query.sessionId=L.TA);let _,b=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;try{_=m?await this._asyncApplyEdits(b+"/applyEdits",v):await(0,a.A)(b+"/applyEdits",v)}catch(e){if(!function(e){let t=e.details.raw,r=+t.code,s=+t.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(e))throw e;v.authMode="immediate",_=m?await this._asyncApplyEdits(b+"/applyEdits",v):await(0,a.A)(b+"/applyEdits",v)}return this._createEditsResult(_)}async deleteAttachments(e,t,r){await this.load();let{layer:s}=this;await(0,U.VA)(s,"editing");let i=e.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+i+"/deleteAttachments";try{return(await(0,a.A)(n,this._getLayerRequestOptions({query:{attachmentIds:t.join(","),...r},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(e){throw this._createAttachmentErrorResult(i,e)}}fetchRecomputedExtents(e={}){let t=e.signal;return this.load({signal:t}).then(async()=>{let t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:i}=await(0,a.A)(`${s}/${r}`,t),{id:n,extent:o,fullExtent:u,timeExtent:l}=i,p=o||u;return{id:n,fullExtent:p&&S.A.fromJSON(p),timeExtent:l&&X.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(e,t={}){await this.load();let r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();let r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});if(e.outStatistics?.length&&r.features.length){let t=new Map;if(r.features.forEach(r=>{let s=r.attributes;e.outStatistics?.forEach(({outStatisticFieldName:e})=>{if(e){let r=e.toLowerCase();r&&r in s&&e!==r&&(s[e]=s[r],delete s[r],t.set(r,e))}})}),null!=r.fields)for(let e of r.fields){let r=t.get(e.name.toLowerCase());null!=r&&(e.name=r)}}return r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryPivot(e,t){return await this.load(),this.queryTask.executePivotQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryAttributeBins(e,t){return await this.load(),this.queryTask.executeAttributeBinsQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,j.Wo)(this.layer.url))return"unavailable";let e=(0,f.fj)(this.layer.url,"status"),t=await(0,a.A)(e,{query:{f:"json"}});return W.fromJSON(t.data.status)}async uploadAssets(e,t){let{uploadAssets:s}=await r.e(1384).then(()=>r(31384));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}_handleLastEditsEventChange(e){let t=this.layer;if(null==e||!("capabilities"in t)||!("effectiveCapabilities"in t)||t.capabilities?.operations?.supportsEditing||!t.effectiveCapabilities?.operations?.supportsEditing)return;let r=t.url;null!=r&&("layerId"in t&&(r=(0,f.fj)(r,t.layerId.toString())),this._getOrCreateEditInterceptor(r).before=t=>{let r=t.requestOptions.method??"auto";if("auto"===r||"head"===r){let r=t.requestOptions.query??{};r._ts=e.getTime(),t.requestOptions.query=r}})}_getOrCreateEditInterceptor(e){return this._editInterceptor??(this._editInterceptor={urls:e},i.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,n.TF)(i.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(e,t){let r=(await(0,a.A)(e,t)).data.statusUrl;for(;;){let e=(await(0,a.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,a.A)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(e){let t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){let r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());let{data:s}=await(0,a.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=s}this.layer.applyPreferredHost(e),this.sourceJSON=await this._patchServiceJSON(e,t?.signal);let r=e.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){let t=(0,J.F0)(e.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{let{data:r}=await(0,a.A)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,d.QP)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){let{addAssetFeatures:t}=e;if(!t?.length||await this._areAllAssetsAlreadyMapped(t))return null;let s=e.addFeatures.filter(e=>e.geometry);if(t.length!==s.length+e.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");let i=[],a=new Map;for(let e of t){let{geometry:t}=e,{vertexSpace:s}=t;if((0,_.Hq)(s))i.push(t);else{let s=t.origin,{convertMeshVertexSpace:n}=await Promise.all([r.e(2258),r.e(4548)]).then(()=>r(28846)),o=await n(t,new v.A({origin:[s.x,s.y,s.z??0]}));a.set(o,t),e.geometry=o,i.push(o)}}await this.uploadAssets(i);for(let[e,t]of a)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(t),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){let t=[],r=this.layer.globalIdField,s=this.layer.parsedUrl;for(let i of e){let{metadata:e}=i.geometry,a=e.getExternalSourcesOnService(s),n=i.getAttribute(r);if(0===a.length){c.A.getLogger(this).error(`Skipping feature ${n}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}let{source:o}=a.find(b.dK)??a[0];for(let e of o.assets)1===e.parts.length?t.push({globalId:(0,m.yS)(),parentGlobalId:n,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:[]}):c.A.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){let t=e.data,{layerId:r}=this.layer,s=[],i=null;if(Array.isArray(t))for(let e of t)null!=e.editedFeatures&&s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(i={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else i=t;let a=function(e){let t=e?.assetMaps;if(t){for(let e of t.addResults)e.success||c.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(let e of t.updateResults)e.success||c.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}let r=e?.attachments,s={addFeatureResults:e?.addResults?.map(D)??[],updateFeatureResults:e?.updateResults?.map(D)??[],deleteFeatureResults:e?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}(i);if(s.length>0){a.editedFeatureResults=[];for(let e of s){let{editedFeatures:t}=e,r=t?.spatialReference?new A.A(t.spatialReference):null;a.editedFeatureResults.push({layerId:e.id,editedFeatures:V(t,r)})}}return a}_createAttachmentErrorResult(e,t){let r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){let r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(let e in t){let s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){let{layer:t,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...e,query:{gdbVersion:s,layer:"dynamicDataSource"in t&&t.dynamicDataSource?JSON.stringify({source:t.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _areAllAssetsAlreadyMapped(e){let{layer:t}=this,{globalIdField:r,parsedUrl:s}=t,i="infoFor3D"in t?t.infoFor3D:null;if(null==i||null==r)return!1;let a=(0,G.JZ)(i);if(null==a)return!1;let o=(0,f.fj)(s.path,`../${a.id}`),u=[];for(let t of e){if(!(t.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(t)}let l=u.map(e=>e.getAttribute(r)).filter(n.Ru);if(0===l.length)return!1;let{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=i,h=new z.A({where:`${p} IN (${l.map(e=>`'${e}'`)})`,outFields:[c,p],returnGeometry:!1}),{features:d}=await(0,k.s)(o,h);return 0!==d.length&&!u.some(e=>{let t=e.getAttribute(r);if(!t)return!0;let{metadata:i}=e.geometry,a=d.filter(e=>e.getAttribute(p)===t);if(0===a.length)return!0;let n=a.map(e=>e.getAttribute(c));return i.getExternalSourcesOnService(s).flatMap(({source:e})=>e.assets.flatMap(e=>e.parts.map(e=>e.partHash))).some(e=>n.every(t=>e!==t))})}};(0,s.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(e,t,r){r.d(t,{A:()=>w});var s=r(32198),i=r(69622),a=r(49186),n=r(44208),o=r(17676),u=r(84952),l=r(91429),p=r(21325),c=r(20557),h=r(2272),d=r(65615),y=r(20615),f=r(74910),m=r(78286),g=r(99199),S=r(62815),A=r(63746);class v{constructor(e){this._options=e,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=v._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e&&(this.featureSet.objectIdFieldName=e)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);let{spatialReference:e,features:t}=this.featureSet;if(e)for(let{geometry:r}of t)r&&(r.spatialReference=e)}feature(){this._attributesClass??=(0,A._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([e,t]){this.featureSet.features.at(-1).centroid={x:e,y:t}}geometry(e,t,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,this._i=0,this._vertex=[0,0],i&&this._vertex.push(0),a&&this._vertex.push(0),this._finishVertex=v._finishVertexNonPoint,t){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=i?a?v._finishVertexPointXYZM:v._finishVertexPointXYZ:a?v._finishVertexPointXYM:v._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:i,hasM:a},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:i,hasM:a},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:i,hasM:a},this._parts=s.rings,this._part=[]}1===e?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=t,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(e){let t=this._vertex;t[this._i++]=e,!(this._i<t.length)&&(this._i=0,this._transformInPlace&&(t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._transformInPlace(t)),this._finishVertex(this))}curvedGeometry(e,t,r,s){let i,{hasZ:a,hasM:n}=this.featureSet;switch(a??=!1,n??=!1,e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw Error(`Curved ${e} does not make sense`);case"esriGeometryPolyline":i={paths:[],curvePaths:[],hasZ:a,hasM:n},this._parts=i.curvePaths,this._part=[];break;case"esriGeometryPolygon":i={rings:[],curveRings:[],hasZ:a,hasM:n},this._parts=i.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=i}startCurvedPart(e){this._part.push(this._transform(e))}finishCurvedPart(e){this._parts.push(this._part),this._part=[]}lineSegment(e,t){this._part.push(this._transform(t))}bezierSegment(e,t,r,s){this._part.push({b:[this._transform(t),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(e,t,r){this._part.push({c:[this._transform(t),this._transformXY(r)]})}ellipticArcSegment(e,t,r,s,i,a,n,o){this._part.push({a:[this._transform(t),this._transformXY(r),s,i,a,n,o]})}static _finishVertexPointXY({_point:e,_vertex:t}){[e.x,e.y]=t}static _finishVertexPointXYZ({_point:e,_vertex:t}){[e.x,e.y,e.z]=t}static _finishVertexPointXYM({_point:e,_vertex:t}){[e.x,e.y,e.m]=t}static _finishVertexPointXYZM({_point:e,_vertex:t}){[e.x,e.y,e.z,e.m]=t}static _finishVertexNonPoint(e){let{_part:t,_parts:r,_lengths:s,_vertex:i}=e;t.push([...i]),!(t.length<s[r.length])&&(e._previousX=e._previousY=0,e._part=[],r.push(t))}_setVertexTransformer(){let{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:r,transform:s}=this.featureSet,i=r?(0,S.d)(e,t):1;this._transformInPlace??=(0,A.M)(this.featureSet,i),this._transformInPlaceXY??=(0,A.M)({transform:s})}_transform(e){let t=[...e];return this._transformInPlace?.(t),t}_transformXY(e){let t=[e[0],e[1]];return this._transformInPlaceXY?.(t),t}}var _=r(80893),b=r(22671),x=r(97552);let w=class extends i.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(e,t){let r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){let r,s=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],a=(0,n.A)("featurelayer-pbf-statistics");if(this.pbfSupported&&(!i||a)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves))try{r=await async function(e,t,r,s){let i=(0,h.Dl)(e),a={...r},n=x.A.from(t),o=!n.quantizationParameters;return await(0,_.IJ)(i,n,new v({sourceSpatialReference:n.sourceSpatialReference,applyTransform:o}),a,s)}(this.url,s,t,{uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return r??=await(0,g.e)(this.url,s,t,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(r.fields),r}async featureSetFromJSON(e,t,s){if(!this._queryGet3DObjectFormat(e)||null==this.infoFor3D||!t.features)return b.A.fromJSON(t);let{meshFeatureSetFromJSON:i}=await(0,o.qr)(Promise.all([r.e(2258),r.e(118),r.e(8366)]).then(()=>r(40050)),s);return i(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.I)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return(0,f.L)(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,m.V)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){let[{default:s},{executeRelationshipQuery:i}]=await(0,o.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),a=s.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeRelationshipQueryForCount(e,t){let[{default:s},{executeRelationshipQueryForCount:i}]=await(0,o.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),a=s.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeAttachmentQuery(e,t){let{executeAttachmentQuery:s,fetchAttachments:i,processAttachmentQueryResult:a}=await(0,o.qr)(r.e(9239).then(()=>r(9239)),t),n=(0,h.Dl)(this.url);return a(n,await(this.queryAttachmentsSupported?s(n,e,t):i(n,e,t)))}async executeAttributeBinsQuery(e,t){let{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(()=>r(33103)),t);return s(this.parsedUrl,e,t)}async executePivotQuery(e,t){let{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(()=>r(80566)),t);return s(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){let{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(()=>r(11273)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){let{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(()=>r(21277)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){let{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(()=>r(8018)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){let{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(()=>r(10980)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=x.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?d.A.from(e.dynamicDataSource):this.dynamicDataSource);let{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(e);if(null!=r&&s){if(t=t===e?t.clone():t,t.formatOf3DObjects=s,t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new a.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,t.outFields??(t.outFields=[]);let{originX:s,originY:i,originZ:a,translationX:n,translationY:o,translationZ:u,scaleX:l,scaleY:p,scaleZ:c,rotationX:h,rotationY:d,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,i,a,n,o,u,l,p,c,h,d,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(let t of e){let e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:r}){return!0!==e||"xyFootprint"===t||r?null:(0,c.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({type:d.A})],w.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],w.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"pbfSupportedWithCurves",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],w.prototype,"url",void 0),w=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],w)},64714(e,t,r){r.d(t,{F0:()=>o,Vx:()=>p,e2:()=>h,f:()=>d});var s=r(44208),i=r(4718),a=r(99352),n=r(93470);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.Cb:"esriGeometryPolyline"===e?n.yM:n.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function p(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${c(t)} = null;`);for(let t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;let s=Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch{return()=>t?{[t]:null,...e}:{...e}}}function c(e){return u.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}function d(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:a.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},20615(e,t,r){r.d(t,{I:()=>n});var s=r(2272),i=r(80893),a=r(97552);function n(e,t,r,n){return(0,i.gW)((0,s.Dl)(e),a.A.from(t),r,n)}},74910(e,t,r){r.d(t,{L:()=>o});var s=r(5443),i=r(2272),a=r(80893),n=r(97552);async function o(e,t,r){let o=(0,i.Dl)(e),u=await(0,a.Jf)(o,n.A.from(t),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(e,t,r){r.d(t,{V:()=>n});var s=r(2272),i=r(80893),a=r(97552);async function n(e,t,r,n){let o=(0,s.Dl)(e),u=await(0,i.Pk)(o,a.A.from(t),r,n);return u.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(u.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>u,s:()=>o});var s=r(2272),i=r(80893),a=r(22671),n=r(97552);async function o(e,t,r,s){let i=await u(e,t,r,s);return a.A.fromJSON(i)}function u(e,t,r,a){let o=(0,s.Dl)(e),u={...r},l=n.A.from(t);return(0,i.eW)(o,l,l.sourceSpatialReference,u,a)}},63746(e,t,r){function s(e){return class{constructor(){for(let t of e)this[t]=null}}}function i(e,t=1){let{transform:r,hasZ:s,hasM:i}=e;if(null==r)return s&&1!==t?e=>{e[2]*=t}:null;let[a,n]=function(e,t,r,s){let{scale:i,translate:a,originPosition:n}=e;return"upperLeft"===n&&(i=i.map((e,t)=>1===t?-e:e)),t&&(i=i.map((e,t)=>2===t?e*s:e),a=a.map((e,t)=>2===t?e*s:e)),!t&&r&&(i=i.filter((e,t)=>2!==t),a=a.filter((e,t)=>2!==t)),[i,a]}(r,s,i,t),o=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==o||0!==e[t]);++t)e[t]=e[t]*a[t]+n[t]}}r.d(t,{M:()=>i,_:()=>s})},2272(e,t,r){r.d(t,{Dl:()=>l,gf:()=>c,jV:()=>u,lF:()=>p});var s=r(92602),i=r(70333),a=r(4718),n=r(84952),o=r(926);function u(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function l(e){return"string"==typeof e?(0,n.An)(e):(0,a.o8)(e)}function p(e,t,r){let s={};for(let i in e){if("declaredClass"===i)continue;let a=e[i];if(null!=a&&"function"!=typeof a)if(Array.isArray(a))s[i]=a.map(e=>p(e));else if("object"==typeof a)if(a.toJSON){let e=a.toJSON(r?.[i]);s[i]=t?e:JSON.stringify(e)}else s[i]=t?a:JSON.stringify(a);else s[i]=a}return s}async function c(e,t,a){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??i.id?.findCredential(e)?.token:null}(e,t)||(!i.id&&s.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(7644),r.e(7715)]).then(()=>r(50148)),(await i.id.getCredential(e,a))?.token)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7013],{69052(e,t,r){r.d(t,{hr:()=>i});var s=r(34727);class i{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return a(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,s.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+n(this.range,e-t,r)}minimalMonotonic(e,t,r){return a(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);let r=(t=this.normalize(t))-e,s=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(s)?r:s}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function a(e,t,r,s,i=0,a=!1){return(s-=i)<t?s+=n(e,t-s):s>r&&(s-=n(e,s-r)),a&&s===r&&(s=t),s+i}function n(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const o=new i(0,2*Math.PI),u=(new i(-Math.PI,Math.PI),new i(0,360));r.d(t,["ie",0,u,"uC",0,o])},18370(e,t,r){r.d(t,{z:()=>i});class s{constructor(e){this._import=e,this.module=null,this._promise=null}getImportPromise(){return this._promise??=this._import().then(async e=>(this.module=e,e)),this._promise}}function i(e){return new s(e)}},82534(e,t,r){function s(){return[0,0,0,1]}function i(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>i,vt:()=>s});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:i,create:s,fromValues:function(e,t,r,s){return[e,t,r,s]}},Symbol.toStringTag,{value:"Module"})),r.d(t,["zK",0,a])},67026(e,t,r){r.d(t,{A6:()=>f,Xd:()=>p,Xr:()=>d,lw:()=>c,x8:()=>l});var s=r(29242),i=r(82534),a=r(51850),n=r(34304),o=r(35522),u=r(78955);function l(e,t,r){r*=.5;let s=Math.sin(r);return e[0]=s*t[0],e[1]=s*t[1],e[2]=s*t[2],e[3]=Math.cos(r),e}function p(e,t){let r=2*Math.acos(t[3]),s=Math.sin(r/2);return s>(0,n.FD)()?(e[0]=t[0]/s,e[1]=t[1]/s,e[2]=t[2]/s):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){let s=t[0],i=t[1],a=t[2],n=t[3],o=r[0],u=r[1],l=r[2],p=r[3];return e[0]=s*p+n*o+i*l-a*u,e[1]=i*p+n*u+a*o-s*l,e[2]=a*p+n*l+s*u-i*o,e[3]=n*p-s*o-i*u-a*l,e}function h(e,t,r,s){let i,a,o,u,l,p=t[0],c=t[1],h=t[2],d=t[3],y=r[0],f=r[1],m=r[2],g=r[3];return a=p*y+c*f+h*m+d*g,a<0&&(a=-a,y=-y,f=-f,m=-m,g=-g),1-a>(0,n.FD)()?(i=Math.acos(a),o=Math.sin(i),u=Math.sin((1-s)*i)/o,l=Math.sin(s*i)/o):(u=1-s,l=s),e[0]=u*p+l*y,e[1]=u*c+l*f,e[2]=u*h+l*m,e[3]=u*d+l*g,e}function d(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){let r,s=t[0]+t[4]+t[8];if(s>0)r=Math.sqrt(s+1),e[3]=.5*r,r=.5/r,e[0]=(t[5]-t[7])*r,e[1]=(t[6]-t[2])*r,e[2]=(t[1]-t[3])*r;else{let s=0;t[4]>t[0]&&(s=1),t[8]>t[3*s+s]&&(s=2);let i=(s+1)%3,a=(s+2)%3;r=Math.sqrt(t[3*s+s]-t[3*i+i]-t[3*a+a]+1),e[s]=.5*r,r=.5/r,e[3]=(t[3*i+a]-t[3*a+i])*r,e[i]=(t[3*i+s]+t[3*s+i])*r,e[a]=(t[3*a+s]+t[3*s+a])*r}return e}function f(e,t,r,s){let i=.5*Math.PI/180;t*=i,r*=i,s*=i;let a=Math.sin(t),n=Math.cos(t),o=Math.sin(r),u=Math.cos(r),l=Math.sin(s),p=Math.cos(s);return e[0]=a*u*p-n*o*l,e[1]=n*o*p+a*u*l,e[2]=n*u*l-a*o*p,e[3]=n*u*p+a*o*l,e}const m=u.C,g=u.hZ,S=u.WQ,v=c,A=u.hs,_=u.Om,x=u.Cc,b=u.Bw,w=b,M=u.m3,q=M,F=u.S8,I=u.t2,R=u.aI,O=(0,a.vt)(),C=(0,a.fA)(1,0,0),T=(0,a.fA)(0,1,0),P=(0,i.vt)(),E=(0,i.vt)(),N=(0,s.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:S,calculateW:function(e,t){let r=t[0],s=t[1],i=t[2];return e[0]=r,e[1]=s,e[2]=i,e[3]=Math.sqrt(Math.abs(1-r*r-s*s-i*i)),e},conjugate:d,copy:m,dot:_,equals:R,exactEquals:I,fromEuler:f,fromMat3:y,getAxisAngle:p,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){let r=t[0],s=t[1],i=t[2],a=t[3],n=r*r+s*s+i*i+a*a,o=n?1/n:0;return e[0]=-r*o,e[1]=-s*o,e[2]=-i*o,e[3]=a*o,e},len:w,length:b,lerp:x,mul:v,multiply:c,normalize:F,random:function(e){let t=n.Ov,r=t(),s=t(),i=t(),a=Math.sqrt(1-r),o=Math.sqrt(r);return e[0]=a*Math.sin(2*Math.PI*s),e[1]=a*Math.cos(2*Math.PI*s),e[2]=o*Math.sin(2*Math.PI*i),e[3]=o*Math.cos(2*Math.PI*i),e},rotateX:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u+n*o,e[1]=i*u+a*o,e[2]=a*u-i*o,e[3]=n*u-s*o,e},rotateY:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u-a*o,e[1]=i*u+n*o,e[2]=a*u+s*o,e[3]=n*u-i*o,e},rotateZ:function(e,t,r){r*=.5;let s=t[0],i=t[1],a=t[2],n=t[3],o=Math.sin(r),u=Math.cos(r);return e[0]=s*u+i*o,e[1]=i*u-s*o,e[2]=a*u+n*o,e[3]=n*u-a*o,e},rotationTo:function(e,t,r){let s=(0,o.Om)(t,r);return s<-.999999?((0,o.$A)(O,C,t),(0,o.Il)(O)<1e-6&&(0,o.$A)(O,T,t),(0,o.S8)(O,O),l(e,O,Math.PI),e):s>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,o.$A)(O,t,r),e[0]=O[0],e[1]=O[1],e[2]=O[2],e[3]=1+s,F(e,e))},scale:A,set:g,setAxes:function(e,t,r,s){let i=N;return i[0]=r[0],i[3]=r[1],i[6]=r[2],i[1]=s[0],i[4]=s[1],i[7]=s[2],i[2]=-t[0],i[5]=-t[1],i[8]=-t[2],F(e,y(e,i))},setAxisAngle:l,slerp:h,sqlerp:function(e,t,r,s,i,a){return h(P,t,i,a),h(E,r,s,a),h(e,P,E,2*a*(1-a)),e},sqrLen:q,squaredLength:M,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"})),r.d(t,["hZ",0,g,"t2",0,I])},95696(e,t,r){r.d(t,{A:()=>l});var s,i=r(32198),a=r(69540),n=r(25482),o=r(91429),u=r(93223);let l=class extends((0,a.OU)(n.o)){static{s=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new s}};(0,i.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),(0,i.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],l.prototype,"origin",void 0),l=s=(0,i.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l)},18251(e,t,r){r.d(t,{A:()=>l});var s=r(32198),i=r(69540),a=r(25482),n=r(91429),o=r(51850),u=r(93223);let l=class extends((0,i.OU)(a.o)){constructor(e){super(e),this.type="local",this.origin=(0,o.vt)()}};(0,s.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],l.prototype,"type",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"origin",void 0),l=(0,s.Cg)([(0,n.$K)("esri.geometry.support.MeshLocalVertexSpace")],l)},73836(e,t,r){r.d(t,{A:()=>d});var s=r(32198),i=r(69540),a=r(25482),n=r(91429),o=r(58083),u=r(9093),l=r(67026),p=r(82534),c=r(51850),h=r(24770);let d=class extends((0,i.OU)(a.o)){constructor(e){super(e),this.translation=(0,c.vt)(),this.rotationAxis=(0,c.ci)(h.up),this.rotationAngle=0,this.scale=(0,c.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(e){this.rotationAxis=(0,c.o8)((0,h.yo)(e)),this.rotationAngle=(0,h.g7)(e)}get localMatrix(){let e=(0,u.vt)();return(0,l.x8)(y,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(e,y,this.translation,this.scale),e}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(e){return this===e||null!=e&&(0,o.t2)(this.localMatrix,e.localMatrix)}};(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,s.Cg)([(0,n.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,s.Cg)([(0,n.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,s.Cg)([(0,n.MZ)()],d.prototype,"rotation",null),(0,s.Cg)([(0,n.MZ)()],d.prototype,"localMatrix",null),(0,s.Cg)([(0,n.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,s.Cg)([(0,n.$K)("esri.geometry.support.MeshTransform")],d);const y=(0,p.vt)()},24770(e,t,r){r.d(t,{$I:()=>m,AU:()=>d,g7:()=>f,i4:()=>p,ui:()=>c,vt:()=>l,yo:()=>y});var s=r(34727),i=r(58083),a=r(67026),n=r(82534),o=r(35522),u=r(51850);function l(e=S){return[e[0],e[1],e[2],e[3]]}function p(e,t,r=l()){return(0,o.C)(r,e),r[3]=t,r}function c(e,t=l()){let r=(0,i.l)(v,e);return g(t,(0,s.KJ)((0,a.Xd)(t,r))),t}function h(e,t,r=l()){return(0,a.x8)(v,e,m(e)),(0,a.x8)(A,t,m(t)),(0,a.lw)(v,A,v),g(r,(0,s.KJ)((0,a.Xd)(r,v)))}function d(e,t,r,s=l()){return p(u.Cw,e,_),p(u.JP,t,x),p(u.Cb,r,b),h(_,x,_),h(_,b,s),s}function y(e){return e}function f(e){return e[3]}function m(e){return(0,s.kU)(e[3])}function g(e,t){return e[3]=t,e}const S=[0,0,1,0],v=(0,n.vt)(),A=(0,n.vt)(),_=(l(),l()),x=l(),b=l();r.d(t,["up",0,S])},63579(e,t,r){r.d(t,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>f,in:()=>y,yr:()=>l});var s=r(56507),i=r(4576),a=r(17676),n=r(20557);class o{constructor(e,t,r){this.assetName=e,this.assetMimeType=t,this.parts=r}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let r=await Promise.all(t.map(t=>t.toBlob(e)));return(0,a.Te)(e),new Blob(r)}}class u{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,s.A)(this.partUrl,{responseType:"blob"});return(0,a.Te)(e),t}}function l(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(h):h(e.files);case"service":return e.assets.some(h);case"loadable":return!0;default:return!1}}(e?.source)}const p=/^(model\/gltf\+json)|(model\/gltf-binary)$/,c=/\.(gltf|glb)/i;function h(e){if(e instanceof File){let{type:t,name:r}=e;return p.test(t)||c.test(r)}return p.test(e.assetMimeType)||c.test(e.assetName)}function d(e,t){if(!e)return!1;let{source:r}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(r,t)}function y(e,t){if(e===t)return!0;let{source:r}=e,{source:s}=t;if(r===s)return!0;if("service"===r.type&&"service"===s.type){if(r.assets.length!==s.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...r.assets].sort(e),i=[...s.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function f(e,t){return e instanceof File?(0,n.rq)(e,t):(0,n.z$)(e.assetMimeType,e.assetName,t)}function m(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function g(e){return!!e.original}},27615(e,t,r){r.d(t,{CK:()=>u,Hq:()=>o,MW:()=>l,TE:()=>p,yJ:()=>c});var s=r(35522),i=r(86738),a=r(95696),n=r(18251);function o(e){return null!=e.origin}function u(e){return o(e.vertexSpace)}function l(e,t){if(!o(e))return null;let[r,s,a]=e.origin;return new i.A({x:r,y:s,z:a,spatialReference:t})}function p(e,t){let{x:r,y:s,z:i,spatialReference:o}=e,u=[r,s,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(o))?new n.A({origin:u}):new a.A({origin:u})}function c(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,s.t2)(e.origin,t.origin))}},52039(e,t,r){r.d(t,{O7:()=>h,el:()=>l});var s=r(69052),i=(r(49186),r(18370)),a=r(17676),n=(r(5443),r(39829)),o=(r(82799),r(16930)),u=(r(80754),r(21325));async function l(e,t,r){Array.isArray(e)||(e=[e]),"object"==typeof t&&t&&"authMode"in t&&(r=t);let s=null;for(let t of e)s??=t?.spatialReference;if(!s)return e;let i=(0,u.Vp)(s);if(!i)return e;if(1===e.length&&"extent"===e[0]?.type){let t=e[0].clone().normalizeAsSingleGeometry(i);return["xmin"in t?t:new n.A(t)]}let[o,l]=i.valid,h=!1;for(let t of e){if(!t)continue;if("point"===t.type){h||=t.x>=l,h||=t.x<=o;continue}let{extent:e}=t;if(null==e){h=!0;break}h||=e.xmin>=l,h||=e.xmin<=o,h||=e.xmax>=l,h||=e.xmax<=o}if(!h)return e;let[{foldInto360Range:d},y]=await(0,a.qr)(Promise.all([p.getImportPromise(),c.getImportPromise()]),r),f=y.fromSpatialReference(s);return e.map(e=>{if(null==e||"mesh"===e.type)return e;let t=y.fromGeometry(e),r=y.toGeometry(d(t,f),s);return"extent"===e.type&&1===r?.rings.length?r.extent:r})}const p=(0,i.z)(()=>r.e(4144).then(()=>r(4144)).then(e=>e.load().then(()=>e))),c=(0,i.z)(()=>Promise.all([r.e(9187),r.e(8885),r.e(9117),r.e(3299),r.e(1550)]).then(()=>r(78125)));function h(e,t,r){let s=(0,u.Vp)(r);if(null==s)return e;let[i,a]=s.valid,n=2*a,o=0,l=0;t>a?o=Math.ceil(Math.abs(t-a)/n):t<i&&(o=-Math.ceil(Math.abs(t-i)/n)),e>a?l=Math.ceil(Math.abs(e-a)/n):e<i&&(l=-Math.ceil(Math.abs(e-i)/n));let p=e+(o-l)*n,c=p-t;return c>a?p-=n:c<i&&(p+=n),p}function d(e){let t=(0,u.Vp)(e);if(null==t)return null;let[r,i]=t.valid;return new s.hr(r,i)}const y=d(o.A.WGS84);d(o.A.WebMercator),r.d(t,["Y_",0,y])},80754(e,t,r){r.d(t,{kS:()=>l,kd:()=>u});var s=r(82799),i=r(16930),a=r(60408),n=r(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new s.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new s.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new s.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new s.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function u(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){if((0,n.Ed)(e))for(let r of function(e){return(0,a.Bi)(e)?e.curveRings:e.curvePaths}(e))for(let e of r){if((0,n.aO)(e)){let[r,s]=e.c;r[0]+=t,s[0]+=t;continue}if((0,n.FG)(e)){let[r,s]=e.a;r[0]+=t,s[0]+=t;continue}if((0,n.n1)(e)){let[r,s,i]=e.b;r[0]+=t,s[0]+=t,i[0]+=t;continue}e[0]+=t}for(let r of function(e){return(0,a.Bi)(e)?e.rings:e.paths}(e))for(let e of r)e[0]+=t;return e}r.d(t,["j7",0,o])},99352(e,t,r){r.d(t,["F",0,{supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsStatisticsAggregatedIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsOutDistance:!1,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsReturnExceededLimitGeometries:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,maxUniqueIDCount:void 0,relativeTimeBinWindow:0,standardMaxRecordCount:void 0,standardMaxRecordCountNoGeometry:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},"P",0,{supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}])},65515(e,t,r){r.r(t),r.d(t,{default:()=>Y});var s=r(32198),i=r(92602),a=r(56507),n=r(4576),o=r(49186),u=r(44208),l=r(66552),p=r(92474),c=r(53966),h=r(93637),d=r(17676),y=r(36708),f=r(84952),m=r(13069),g=r(91429),S=r(5443),v=r(16930),A=r(95696),_=r(27615),x=r(63579),b=r(52106),w=r(86211);function M(e){return"object"==typeof e&&!!e&&"objectId"in e&&!!e.objectId}function q(e){return e.every(M)}function F(e){return"object"==typeof e&&!!e&&"globalId"in e&&!!e.globalId}function I(e){return e.every(F)}var R=r(99917),O=r(65864),C=r(73836),T=r(21325);async function P(e,t,r){let{geometry:s}=t,i={...t.attributes};if(null!=r&&"mesh"===s?.type){let{transformFieldRoles:t}=r,{origin:a,spatialReference:n,vertexSpace:o}=s,u=s.transform??new C.A,l="local"===o.type,p=e.spatialReference,c=p.isGeographic,h=(0,T.aI)(p,n),d=(0,R.isEqualBaseGCS)(n,p)&&(0,R.canProjectWithoutEngine)(n,p);if(!(l&&c&&d||!l&&!c&&h))return null;let y=(0,R.projectWithoutEngine)(a,n,p);if(null==y)return null;if(i[t.originX]=y.x,i[t.originY]=y.y,i[t.originZ]=y.z??0,null!=u){let{translation:e,scale:r,rotation:s}=u,a=l?1:(0,w.KX)(n)/(0,w.KX)(p);i[t.translationX]=e[0]*a,i[t.translationY]=e[2]*a,i[t.translationZ]=-e[1]*a,i[t.scaleX]=r[0],i[t.scaleY]=r[2],i[t.scaleZ]=r[1],i[t.rotationX]=s[0],i[t.rotationY]=s[2],i[t.rotationZ]=-s[1],i[t.rotationDeg]=s[3]}return{attributes:i}}return null==s?{attributes:i}:"mesh"===s.type||"extent"===s.type?null:{geometry:s.toJSON(),attributes:i}}async function E(e,t){let r=await Promise.all((t.addAttachments??[]).map(t=>N(e,t))),s=await Promise.all((t.updateAttachments??[]).map(t=>N(e,t))),i=t.deleteAttachments??[];return r.length||s.length||i.length?{adds:r,updates:s,deletes:[...i]}:null}async function N(e,t){let{feature:r,attachment:s}=t,{globalId:i,name:a,contentType:n,data:o,keywords:u,uploadId:l}=s,p={globalId:i};if(r&&("attributes"in r?p.parentGlobalId=r.attributes?.[e.globalIdField]:r.globalId&&(p.parentGlobalId=r.globalId)),l)p.uploadId=l;else if(o){let e=await(0,f._0)(o);e&&(p.contentType=e.mediaType,p.data=e.data),o instanceof File&&(p.name=o.name)}return a&&(p.name=a),n&&(p.contentType=n),u&&(p.keywords=u),p}function D(e){let t=!0===e.success?null:e.error||{code:void 0,description:"Feature edit failed"};return{objectId:e.objectId,globalId:e.globalId,error:t?new o.A("feature-layer-source:edit-failure",t.description,{code:t.code}):null}}function Q(e,t){return new b.A({attributes:e.attributes,geometry:(0,O.rS)({...e.geometry,spatialReference:t})})}function V(e,t){return{adds:e?.adds?.map(e=>Q(e,t))||[],updates:e?.updates?.map(e=>({original:Q(e[0],t),current:Q(e[1],t)}))||[],deletes:e?.deletes?.map(e=>Q(e,t))||[],spatialReference:t}}var j=r(64714),J=r(64314),Z=r(60694),G=r(15426),U=r(20557),k=r(99199),B=r(96520),z=r(97552),X=r(79677),L=r(20816);const $=new l.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new l.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends p.x_{constructor(e){super(e),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer","Annotation Layer","Dimension Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();let e=this.sourceJSON.editingInfo?.lastEditDate;if(null==e)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}let t=e!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:t,updates:t?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(e){let t=this.layer.sourceJSON,r=this._fetchService(t,{...e}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,e)).then(()=>this._ensureLatestMetadata(e));return this.addResolvingPromise(r),Promise.resolve(this)}async reload(e){let t=this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0;await this._fetchService(null,{...e,cacheBust:t})}initialize(){this.addHandles([(0,y.wB)(()=>{let e=this.layer;return e&&"lastEditsEventDate"in e?e.lastEditsEventDate:null},e=>this._handleLastEditsEventChange(e))])}destroy(){this._removeEditInterceptor()}get queryTask(){let{capabilities:e,parsedUrl:t,gdbVersion:r,spatialReference:s,fieldsIndex:i,uniqueIdFields:a}=this.layer,n="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,l=(0,u.A)("featurelayer-pbf")&&e?.query.supportsFormatPBF&&null==n,p=l&&e?.query.supportsFormatPBFWithCurves,c=e?.operations?.supportsQueryAttachments??!1,h=e?.query?.relativeTimeBinWindow??0,d=t.path;return new J.A({dynamicDataSource:o,fieldsIndex:i,gdbVersion:r,infoFor3D:n,pbfSupported:l,pbfSupportedWithCurves:p,queryAttachmentsSupported:c,relativeTimeBinWindow:h,sourceSpatialReference:s,uniqueIdFields:a,url:d})}async addAttachment(e,t,r){await this.load();let{layer:s}=this;await(0,G.VA)(s,"editing");let i=e.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+i+"/addAttachment",o=this._getLayerRequestOptions({query:r}),u=this._getFormDataForAttachment(t,o.query);try{return D((await(0,a.A)(n,{body:u})).data.addAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(i,e)}}async updateAttachment(e,t,r,s){await this.load();let{layer:i}=this;await(0,G.VA)(i,"editing");let n=e.attributes[i.objectIdField],o=i.parsedUrl.path+"/"+n+"/updateAttachment",u=this._getLayerRequestOptions({query:{attachmentId:t,...s}}),l=this._getFormDataForAttachment(r,u.query);try{return D((await(0,a.A)(o,{body:l})).data.updateAttachmentResult)}catch(e){throw this._createAttachmentErrorResult(n,e)}}async applyEdits(e,t){await this.load();let{layer:r}=this;await(0,G.VA)(r,"editing");let s="infoFor3D"in r?r.infoFor3D:null,i=null!=s,u=i||(t?.globalIdUsed??!1),l=i?await this._uploadMeshesAndGetAssetMapEditsJSON(e):null,p=e.addFeatures?.map(e=>P(this.layer,e,s))??[],c=(await Promise.all(p)).filter(n.Ru),h=e.updateFeatures?.map(e=>P(this.layer,e,s))??[],d=(await Promise.all(h)).filter(n.Ru),y=function(e,t,r){if(!t||0===t.length)return[];if(r&&I(t))return t.map(e=>e.globalId);if(q(t))return t.map(e=>e.objectId);let s=r?e.globalIdField:e.objectIdField;return s?t.map(e=>e.getAttribute(s)):[]}(this.layer,e.deleteFeatures,u);(0,B.u)(c,d,r.spatialReference);let f=await E(this.layer,e),m=r.capabilities.editing.supportsAsyncApplyEdits&&i,g=t?.gdbVersion||r.gdbVersion,S={gdbVersion:g,rollbackOnFailure:t?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:t?.returnEditMoment,trueCurveClient:t?.editsRespectTrueCurves,usePreviousEditMoment:t?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);let v=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(r.url,g,r.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");t?.returnServiceEditsOption?(S.edits=JSON.stringify([{id:r.layerId,adds:c.length?c:null,updates:d.length?d:null,deletes:y.length?y:null,attachments:f,assetMaps:l}]),S.returnServiceEditsOption=$.toJSON(t?.returnServiceEditsOption),S.returnServiceEditsInSourceSR=t?.returnServiceEditsInSourceSR):(S.adds=c.length?JSON.stringify(c):null,S.updates=d.length?JSON.stringify(d):null,S.deletes=y.length?u?JSON.stringify(y):y.join(","):null,S.attachments=f&&JSON.stringify(f),S.assetMaps=null==l?void 0:JSON.stringify(l));let A=this._getLayerRequestOptions({method:"post",query:S});v&&(A.authMode="immediate",A.query.returnEditMoment=!0,A.query.sessionId=L.TA);let _,x=t?.returnServiceEditsOption?r.url:r.parsedUrl.path;try{_=m?await this._asyncApplyEdits(x+"/applyEdits",A):await(0,a.A)(x+"/applyEdits",A)}catch(e){if(!function(e){let t=e.details.raw,r=+t.code,s=+t.extendedCode;return 500===r&&(-2147217144===s||-2147467261===s)}(e))throw e;A.authMode="immediate",_=m?await this._asyncApplyEdits(x+"/applyEdits",A):await(0,a.A)(x+"/applyEdits",A)}return this._createEditsResult(_)}async deleteAttachments(e,t,r){await this.load();let{layer:s}=this;await(0,G.VA)(s,"editing");let i=e.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+i+"/deleteAttachments";try{return(await(0,a.A)(n,this._getLayerRequestOptions({query:{attachmentIds:t.join(","),...r},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(e){throw this._createAttachmentErrorResult(i,e)}}fetchRecomputedExtents(e={}){let t=e.signal;return this.load({signal:t}).then(async()=>{let t=this._getLayerRequestOptions({...e,query:{returnUpdates:!0}}),{layerId:r,url:s}=this.layer,{data:i}=await(0,a.A)(`${s}/${r}`,t),{id:n,extent:o,fullExtent:u,timeExtent:l}=i,p=o||u;return{id:n,fullExtent:p&&S.A.fromJSON(p),timeExtent:l&&X.A.fromJSON({start:l[0],end:l[1]})}})}async queryAttachments(e,t={}){await this.load();let r=this._getLayerRequestOptions(t);return this.queryTask.executeAttachmentQuery(e,r)}async queryFeatures(e,t){await this.load();let r=await this.queryTask.execute(e,{...t,query:this._createRequestQueryOptions(t)});if(e.outStatistics?.length&&r.features.length){let t=new Map;if(r.features.forEach(r=>{let s=r.attributes;e.outStatistics?.forEach(({outStatisticFieldName:e})=>{if(e){let r=e.toLowerCase();r&&r in s&&e!==r&&(s[e]=s[r],delete s[r],t.set(r,e))}})}),null!=r.fields)for(let e of r.fields){let r=t.get(e.name.toLowerCase());null!=r&&(e.name=r)}}return r}async queryFeaturesJSON(e,t){return await this.load(),this.queryTask.executeJSON(e,{...t,query:this._createRequestQueryOptions(t)})}async queryObjectIds(e,t){return await this.load(),this.queryTask.executeForIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryFeatureCount(e,t){return await this.load(),this.queryTask.executeForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryExtent(e,t){return await this.load(),this.queryTask.executeForExtent(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeatures(e,t){return await this.load(),this.queryTask.executeRelationshipQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryRelatedFeaturesCount(e,t){return await this.load(),this.queryTask.executeRelationshipQueryForCount(e,{...t,query:this._createRequestQueryOptions(t)})}async queryPivot(e,t){return await this.load(),this.queryTask.executePivotQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopFeatures(e,t){return await this.load(),this.queryTask.executeTopFeaturesQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryAttributeBins(e,t){return await this.load(),this.queryTask.executeAttributeBinsQuery(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopObjectIds(e,t){return await this.load(),this.queryTask.executeForTopIds(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopExtents(e,t){return await this.load(),this.queryTask.executeForTopExtents(e,{...t,query:this._createRequestQueryOptions(t)})}async queryTopCount(e,t){return await this.load(),this.queryTask.executeForTopCount(e,{...t,query:this._createRequestQueryOptions(t)})}async fetchPublishingStatus(){if(!(0,Z.Wo)(this.layer.url))return"unavailable";let e=(0,f.fj)(this.layer.url,"status"),t=await(0,a.A)(e,{query:{f:"json"}});return W.fromJSON(t.data.status)}async uploadAssets(e,t){let{uploadAssets:s}=await r.e(1384).then(()=>r(31384));return s(e,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},t)}_handleLastEditsEventChange(e){let t=this.layer;if(null==e||!("capabilities"in t)||!("effectiveCapabilities"in t)||t.capabilities?.operations?.supportsEditing||!t.effectiveCapabilities?.operations?.supportsEditing)return;let r=t.url;null!=r&&("layerId"in t&&(r=(0,f.fj)(r,t.layerId.toString())),this._getOrCreateEditInterceptor(r).before=t=>{let r=t.requestOptions.method??"auto";if("auto"===r||"head"===r){let r=t.requestOptions.query??{};r._ts=e.getTime(),t.requestOptions.query=r}})}_getOrCreateEditInterceptor(e){return this._editInterceptor??(this._editInterceptor={urls:e},i.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,n.TF)(i.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(e,t){let r=(await(0,a.A)(e,t)).data.statusUrl;for(;;){let e=(await(0,a.A)(r,{query:{f:"json"},responseType:"json"})).data;switch(e.status){case"Completed":return(0,a.A)(e.resultUrl,{query:{f:"json"},responseType:"json"});case"CompletedWithErrors":throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed.");case"Failed ImportChanges":case"InProgress":case"Pending":case"ExportAttachments":case"ExportChanges":case"ExportingData":case"ExportingSnapshot":case"ImportAttachments":case"ProvisioningReplica":case"UnRegisteringReplica":break;default:throw new o.A("async-applyEdits-failed","asynchronous applyEdits call failed (undefined response status)")}await(0,d.Pl)(H)}}_createRequestQueryOptions(e){let t={...this.layer.customParameters,token:this.layer.apiKey,...e?.query};return this.layer.datesInUnknownTimezone&&(t.timeReferenceUnknownClient=!0),t}async _fetchService(e,t){if(!e){let r={};(0,u.A)("featurelayer-advanced-symbols")&&(r.returnAdvancedSymbols=!0),t?.cacheBust&&(r._ts=Date.now());let{data:s}=await(0,a.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:r,signal:t?.signal}));e=s}this.layer.applyPreferredHost(e),this.sourceJSON=await this._patchServiceJSON(e,t?.signal);let r=e.type;if(!this.supportedSourceTypes.has(r))throw new o.A("feature-layer-source:unsupported-type",`Source type "${r}" is not supported`)}async _patchServiceJSON(e,t){if("Table"!==e.type&&e.geometryType&&!e?.drawingInfo?.renderer&&!e.defaultSymbol){let t=(0,j.F0)(e.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",t,e)}if("esriGeometryMultiPatch"===e.geometryType&&e.infoFor3D&&(e.geometryType="mesh"),null==e.extent)try{let{data:r}=await(0,a.A)(this.layer.url,this._getLayerRequestOptions({signal:t}));r.spatialReference&&(e.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:r.spatialReference})}catch(e){(0,d.QP)(e)}return e}async _ensureLatestMetadata(e){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...e,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(e){let{addAssetFeatures:t}=e;if(!t?.length||await this._areAllAssetsAlreadyMapped(t))return null;let s=e.addFeatures.filter(e=>e.geometry);if(t.length!==s.length+e.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");let i=[],a=new Map;for(let e of t){let{geometry:t}=e,{vertexSpace:s}=t;if((0,_.Hq)(s))i.push(t);else{let s=t.origin,{convertMeshVertexSpace:n}=await Promise.all([r.e(2258),r.e(4548)]).then(()=>r(28846)),o=await n(t,new A.A({origin:[s.x,s.y,s.z??0]}));a.set(o,t),e.geometry=o,i.push(o)}}await this.uploadAssets(i);for(let[e,t]of a)t.addExternalSources(e.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(t),updates:[],deletes:[]}}_getAssetMapEditsJSON(e){let t=[],r=this.layer.globalIdField,s=this.layer.parsedUrl;for(let i of e){let{metadata:e}=i.geometry,a=e.getExternalSourcesOnService(s),n=i.getAttribute(r);if(0===a.length){c.A.getLogger(this).error(`Skipping feature ${n}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}let{source:o}=a.find(x.dK)??a[0];for(let e of o.assets)1===e.parts.length?t.push({globalId:(0,m.yS)(),parentGlobalId:n,assetName:e.assetName,assetHash:e.parts[0].partHash,flags:[]}):c.A.getLogger(this).error(`Skipping asset ${e.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return t}_createEditsResult(e){let t=e.data,{layerId:r}=this.layer,s=[],i=null;if(Array.isArray(t))for(let e of t)null!=e.editedFeatures&&s.push({id:e.id,editedFeatures:e.editedFeatures}),e.id===r&&(i={addResults:e.addResults??[],updateResults:e.updateResults??[],deleteResults:e.deleteResults??[],attachments:e.attachments,editMoment:e.editMoment});else i=t;let a=function(e){let t=e?.assetMaps;if(t){for(let e of t.addResults)e.success||c.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`);for(let e of t.updateResults)e.success||c.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${e.globalId}.`)}let r=e?.attachments,s={addFeatureResults:e?.addResults?.map(D)??[],updateFeatureResults:e?.updateResults?.map(D)??[],deleteFeatureResults:e?.deleteResults?.map(D)??[],addAttachmentResults:r?.addResults?r.addResults.map(D):[],updateAttachmentResults:r?.updateResults?r.updateResults.map(D):[],deleteAttachmentResults:r?.deleteResults?r.deleteResults.map(D):[]};return e?.editMoment&&(s.editMoment=e.editMoment),s}(i);if(s.length>0){a.editedFeatureResults=[];for(let e of s){let{editedFeatures:t}=e,r=t?.spatialReference?new v.A(t.spatialReference):null;a.editedFeatureResults.push({layerId:e.id,editedFeatures:V(t,r)})}}return a}_createAttachmentErrorResult(e,t){let r=t.details.messages?.[0]||t.message,s=t.details.httpStatus||t.details.messageCode;return{objectId:e,globalId:null,error:new o.A("feature-layer-source:attachment-failure",r,{code:s})}}_getFormDataForAttachment(e,t){let r=e instanceof FormData?e:e&&e.elements?new FormData(e):null;if(r)for(let e in t){let s=t[e];null!=s&&(r.set?r.set(e,s):r.append(e,s))}return r}_getLayerRequestOptions(e={}){let{layer:t,layer:{parsedUrl:r,gdbVersion:s}}=this;return{...e,query:{gdbVersion:s,layer:"dynamicDataSource"in t&&t.dynamicDataSource?JSON.stringify({source:t.dynamicDataSource}):void 0,...r.query,f:"json",...this._createRequestQueryOptions(e)},responseType:"json"}}async _areAllAssetsAlreadyMapped(e){let{layer:t}=this,{globalIdField:r,parsedUrl:s}=t,i="infoFor3D"in t?t.infoFor3D:null;if(null==i||null==r)return!1;let a=(0,U.JZ)(i);if(null==a)return!1;let o=(0,f.fj)(s.path,`../${a.id}`),u=[];for(let t of e){if(!(t.geometry.metadata.getExternalSourcesOnService(s).length>0))return!1;u.push(t)}let l=u.map(e=>e.getAttribute(r)).filter(n.Ru);if(0===l.length)return!1;let{assetMapFieldRoles:{parentGlobalId:p,assetHash:c}}=i,h=new z.A({where:`${p} IN (${l.map(e=>`'${e}'`)})`,outFields:[c,p],returnGeometry:!1}),{features:d}=await(0,k.s)(o,h);return 0!==d.length&&!u.some(e=>{let t=e.getAttribute(r);if(!t)return!0;let{metadata:i}=e.geometry,a=d.filter(e=>e.getAttribute(p)===t);if(0===a.length)return!0;let n=a.map(e=>e.getAttribute(c));return i.getExternalSourcesOnService(s).flatMap(({source:e})=>e.assets.flatMap(e=>e.parts.map(e=>e.partHash))).some(e=>n.every(t=>e!==t))})}};(0,s.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,s.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,s.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,s.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(e,t,r){r.d(t,{A:()=>w});var s=r(32198),i=r(69622),a=r(49186),n=r(44208),o=r(17676),u=r(84952),l=r(91429),p=r(21325),c=r(20557),h=r(2272),d=r(65615),y=r(20615),f=r(74910),m=r(78286),g=r(99199),S=r(62815),v=r(63746);class A{constructor(e){this._options=e,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=A._finishVertexNonPoint,this._attributesClass=null,this._previousX=0,this._previousY=0,this._point=null,this._lengths=null,this._vertex=[],this._part=null,this._parts=null,this._i=0}queryGeometryType(){return this.featureSet.queryGeometryType}queryGeometry(){return this.featureSet.queryGeometry}idField(e){"string"==typeof e&&(this.featureSet.objectIdFieldName=e)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);let{spatialReference:e,features:t}=this.featureSet;if(e)for(let{geometry:r}of t)r&&(r.spatialReference=e)}feature(){this._attributesClass??=(0,v._)(this.featureSet.fields?.map(e=>e.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([e,t]){this.featureSet.features.at(-1).centroid={x:e,y:t}}geometry(e,t,r){this._previousX=this._previousY=0,this._lengths=r;let s,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,this._i=0,this._vertex=[0,0],i&&this._vertex.push(0),a&&this._vertex.push(0),this._finishVertex=A._finishVertexNonPoint,t){case"esriGeometryPoint":this._point={x:0,y:0},s=this._point,this._finishVertex=i?a?A._finishVertexPointXYZM:A._finishVertexPointXYZ:a?A._finishVertexPointXYM:A._finishVertexPointXY;break;case"esriGeometryMultipoint":s={points:[],hasZ:i,hasM:a},this._part=s.points,this._parts=[];break;case"esriGeometryPolyline":s={paths:[],hasZ:i,hasM:a},this._parts=s.paths,this._part=[];break;case"esriGeometryPolygon":s={rings:[],hasZ:i,hasM:a},this._parts=s.rings,this._part=[]}1===e?(this.featureSet.queryGeometry=s,this.featureSet.queryGeometryType=t,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=s}coord(e){let t=this._vertex;t[this._i++]=e,!(this._i<t.length)&&(this._i=0,this._transformInPlace&&(t[0]+=this._previousX,t[1]+=this._previousY,[this._previousX,this._previousY]=t,this._transformInPlace(t)),this._finishVertex(this))}curvedGeometry(e,t,r,s){let i,{hasZ:a,hasM:n}=this.featureSet;switch(a??=!1,n??=!1,e){case"esriGeometryPoint":case"esriGeometryMultipoint":throw Error(`Curved ${e} does not make sense`);case"esriGeometryPolyline":i={paths:[],curvePaths:[],hasZ:a,hasM:n},this._parts=i.curvePaths,this._part=[];break;case"esriGeometryPolygon":i={rings:[],curveRings:[],hasZ:a,hasM:n},this._parts=i.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=i}startCurvedPart(e){this._part.push(this._transform(e))}finishCurvedPart(e){this._parts.push(this._part),this._part=[]}lineSegment(e,t){this._part.push(this._transform(t))}bezierSegment(e,t,r,s){this._part.push({b:[this._transform(t),this._transformXY(r),this._transformXY(s)]})}circularArcSegment(e,t,r){this._part.push({c:[this._transform(t),this._transformXY(r)]})}ellipticArcSegment(e,t,r,s,i,a,n,o){this._part.push({a:[this._transform(t),this._transformXY(r),s,i,a,n,o]})}static _finishVertexPointXY({_point:e,_vertex:t}){[e.x,e.y]=t}static _finishVertexPointXYZ({_point:e,_vertex:t}){[e.x,e.y,e.z]=t}static _finishVertexPointXYM({_point:e,_vertex:t}){[e.x,e.y,e.m]=t}static _finishVertexPointXYZM({_point:e,_vertex:t}){[e.x,e.y,e.z,e.m]=t}static _finishVertexNonPoint(e){let{_part:t,_parts:r,_lengths:s,_vertex:i}=e;t.push([...i]),!(t.length<s[r.length])&&(e._previousX=e._previousY=0,e._part=[],r.push(t))}_setVertexTransformer(){let{sourceSpatialReference:e}=this._options,{spatialReference:t,hasZ:r,transform:s}=this.featureSet,i=r?(0,S.d)(e,t):1;this._transformInPlace??=(0,v.M)(this.featureSet,i),this._transformInPlaceXY??=(0,v.M)({transform:s})}_transform(e){let t=[...e];return this._transformInPlace?.(t),t}_transformXY(e){let t=[e[0],e[1]];return this._transformInPlaceXY?.(t),t}}var _=r(80893),x=r(22671),b=r(97552);let w=class extends i.A{constructor(e){super(e),this.dynamicDataSource=null,this.fieldsIndex=null,this.gdbVersion=null,this.infoFor3D=null,this.pbfSupported=!1,this.pbfSupportedWithCurves=!1,this.queryAttachmentsSupported=!1,this.relativeTimeBinWindow=0,this.sourceSpatialReference=null,this.uniqueIdFields=null,this.url=null}get parsedUrl(){return(0,u.An)(this.url)}async execute(e,t){let r=await this.executeJSON(e,t);return this.featureSetFromJSON(e,r,t)}async executeJSON(e,t){let r,s=this._normalizeQuery(e),i=null!=e.outStatistics?.[0],a=(0,n.A)("featurelayer-pbf-statistics");if(this.pbfSupported&&(!i||a)&&(!e.returnTrueCurves||this.pbfSupportedWithCurves))try{r=await async function(e,t,r,s){let i=(0,h.Dl)(e),a={...r},n=b.A.from(t),o=!n.quantizationParameters;return await(0,_.IJ)(i,n,new A({sourceSpatialReference:n.sourceSpatialReference,applyTransform:o}),a,s)}(this.url,s,t,{uniqueIdFields:this.uniqueIdFields})}catch(e){if("query:parsing-pbf"!==e.name)throw e;this.pbfSupported=!1}return r??=await(0,g.e)(this.url,s,t,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(r.fields),r}async featureSetFromJSON(e,t,s){if(!this._queryGet3DObjectFormat(e)||null==this.infoFor3D||!t.features)return x.A.fromJSON(t);let{meshFeatureSetFromJSON:i}=await(0,o.qr)(Promise.all([r.e(2258),r.e(118),r.e(8366)]).then(()=>r(40050)),s);return i(e,this.infoFor3D,t)}executeForCount(e,t){return(0,y.I)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(e,t){return(0,f.L)(this.url,this._normalizeQuery(e),t)}executeForIds(e,t){return(0,m.V)(this.url,this._normalizeQuery(e),t,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(e,t){let[{default:s},{executeRelationshipQuery:i}]=await(0,o.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),a=s.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeRelationshipQueryForCount(e,t){let[{default:s},{executeRelationshipQueryForCount:i}]=await(0,o.qr)(Promise.all([Promise.resolve().then(()=>r(26591)),r.e(1763).then(()=>r(71763))]),t),a=s.from(e);return(this.gdbVersion||this.dynamicDataSource)&&(a=a.clone(),a.gdbVersion=a.gdbVersion||this.gdbVersion,a.dynamicDataSource=a.dynamicDataSource||this.dynamicDataSource),i(this.url,a,t)}async executeAttachmentQuery(e,t){let{executeAttachmentQuery:s,fetchAttachments:i,processAttachmentQueryResult:a}=await(0,o.qr)(r.e(9239).then(()=>r(9239)),t),n=(0,h.Dl)(this.url);return a(n,await(this.queryAttachmentsSupported?s(n,e,t):i(n,e,t)))}async executeAttributeBinsQuery(e,t){let{executeAttributeBinsQuery:s}=await(0,o.qr)(r.e(3103).then(()=>r(33103)),t);return s(this.parsedUrl,e,t)}async executePivotQuery(e,t){let{executePivotQuery:s}=await(0,o.qr)(r.e(566).then(()=>r(80566)),t);return s(this.parsedUrl,e,t)}async executeTopFeaturesQuery(e,t){let{executeTopFeaturesQuery:s}=await(0,o.qr)(r.e(1273).then(()=>r(11273)),t);return s(this.parsedUrl,e,this.sourceSpatialReference,t)}async executeForTopIds(e,t){let{executeForTopIds:s}=await(0,o.qr)(r.e(1277).then(()=>r(21277)),t);return s(this.parsedUrl,e,t)}async executeForTopExtents(e,t){let{executeForTopExtents:s}=await(0,o.qr)(r.e(8018).then(()=>r(8018)),t);return s(this.parsedUrl,e,t)}async executeForTopCount(e,t){let{executeForTopCount:s}=await(0,o.qr)(r.e(980).then(()=>r(10980)),t);return s(this.parsedUrl,e,t)}_normalizeQuery(e){let t=b.A.from(e);t.sourceSpatialReference=t.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(t=t===e?t.clone():t,t.gdbVersion=e.gdbVersion||this.gdbVersion,t.dynamicDataSource=e.dynamicDataSource?d.A.from(e.dynamicDataSource):this.dynamicDataSource);let{infoFor3D:r}=this,s=this._queryGet3DObjectFormat(e);if(null!=r&&s){if(t=t===e?t.clone():t,t.formatOf3DObjects=s,t.outSpatialReference&&!(0,p.aI)(t.outSpatialReference,this.sourceSpatialReference))throw new a.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==t.outFields||!t.outFields.includes("*")){t=t===e?t.clone():t,t.outFields??(t.outFields=[]);let{originX:s,originY:i,originZ:a,translationX:n,translationY:o,translationZ:u,scaleX:l,scaleY:p,scaleZ:c,rotationX:h,rotationY:d,rotationZ:y,rotationDeg:f}=r.transformFieldRoles;t.outFields.push(s,i,a,n,o,u,l,p,c,h,d,y,f)}}return t}_normalizeFields(e){if(null!=this.fieldsIndex&&null!=e)for(let t of e){let e=this.fieldsIndex.get(t.name);e&&Object.assign(t,e.toJSON())}}_queryGet3DObjectFormat({returnGeometry:e,multipatchOption:t,outStatistics:r}){return!0!==e||"xyFootprint"===t||r?null:(0,c.Hz)(this.infoFor3D)}};(0,s.Cg)([(0,l.MZ)({type:d.A})],w.prototype,"dynamicDataSource",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"fieldsIndex",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"gdbVersion",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"infoFor3D",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,s.Cg)([(0,l.MZ)()],w.prototype,"pbfSupported",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"pbfSupportedWithCurves",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"queryAttachmentsSupported",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"relativeTimeBinWindow",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"sourceSpatialReference",void 0),(0,s.Cg)([(0,l.MZ)()],w.prototype,"uniqueIdFields",void 0),(0,s.Cg)([(0,l.MZ)({type:String})],w.prototype,"url",void 0),w=(0,s.Cg)([(0,l.$K)("esri.layers.graphics.sources.support.QueryTask")],w)},64714(e,t,r){r.d(t,{F0:()=>o,Vx:()=>p,e2:()=>h,f:()=>f});var s=r(44208),i=r(4718),a=r(99352),n=r(93470);function o(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?n.Cb:"esriGeometryPolyline"===e?n.yM:n.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let l=1;function p(e,t){if((0,s.A)("esri-csp-restrictions"))return()=>t?{[t]:null,...e}:{...e};try{let r="";t&&(r+=`this${c(t)} = null;`);for(let t in e)r+=`this${c(t)} = ${JSON.stringify(e[t])};`;let s=Function(`\n return class AttributesClass$${l++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new s}catch{return()=>t?{[t]:null,...e}:{...e}}}function c(e){return u.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}function h(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,i.o8)(e)}}]}const d={...a.F,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!1,supportsDistance:!1,supportsExtent:!1,supportsQuantization:!1,supportsQueryGeometry:!1,supportsDisjointSpatialRelationship:!1},y={...a.P,supportedStatistics:{...a.P.supportedStatistics,envelope:!1,centroid:!1,convexHull:!1}};function f(e,t,r=!1){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:r?d:a.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:r?y:a.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:t,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},20615(e,t,r){r.d(t,{I:()=>n});var s=r(2272),i=r(80893),a=r(97552);function n(e,t,r,n){return(0,i.gW)((0,s.Dl)(e),a.A.from(t),r,n)}},74910(e,t,r){r.d(t,{L:()=>o});var s=r(5443),i=r(2272),a=r(80893),n=r(97552);async function o(e,t,r){let o=(0,i.Dl)(e),u=await(0,a.Jf)(o,n.A.from(t),{...r}),l=u.extent;return!l||isNaN(l.xmin)||isNaN(l.ymin)||isNaN(l.xmax)||isNaN(l.ymax)?{count:u.count,extent:null}:{count:u.count,extent:s.A.fromJSON(l)}}},78286(e,t,r){r.d(t,{V:()=>n});var s=r(2272),i=r(80893),a=r(97552);async function n(e,t,r,n){let o=(0,s.Dl)(e),u=await(0,i.Pk)(o,a.A.from(t),r,n);return u.objectIds??function(e){if(e)return function(e){return!Array.isArray(e[0])}(e)?e:e.map(e=>JSON.stringify(e))}(u.uniqueIds)??[]}},99199(e,t,r){r.d(t,{e:()=>u,s:()=>o});var s=r(2272),i=r(80893),a=r(22671),n=r(97552);async function o(e,t,r,s){let i=await u(e,t,r,s);return a.A.fromJSON(i)}function u(e,t,r,a){let o=(0,s.Dl)(e),u={...r},l=n.A.from(t);return(0,i.eW)(o,l,l.sourceSpatialReference,u,a)}},63746(e,t,r){function s(e){return class{constructor(){for(let t of e)this[t]=null}}}function i(e,t=1){let{transform:r,hasZ:s,hasM:i}=e;if(null==r)return s&&1!==t?e=>{e[2]*=t}:null;let[a,n]=function(e,t,r,s){let{scale:i,translate:a,originPosition:n}=e;return"upperLeft"===n&&(i=i.map((e,t)=>1===t?-e:e)),t&&(i=i.map((e,t)=>2===t?e*s:e),a=a.map((e,t)=>2===t?e*s:e)),!t&&r&&(i=i.filter((e,t)=>2!==t),a=a.filter((e,t)=>2!==t)),[i,a]}(r,s,i,t),o=e.hasZ?3:2;return e=>{for(let t=0;t<e.length&&(t!==o||0!==e[t]);++t)e[t]=e[t]*a[t]+n[t]}}r.d(t,{M:()=>i,_:()=>s})},2272(e,t,r){r.d(t,{Dl:()=>l,gf:()=>c,jV:()=>u,lF:()=>p});var s=r(92602),i=r(70333),a=r(4718),n=r(84952),o=r(926);function u(e,t){return t?{...t,query:{...e,...t.query}}:{query:e}}function l(e){return"string"==typeof e?(0,n.An)(e):(0,a.o8)(e)}function p(e,t,r){let s={};for(let i in e){if("declaredClass"===i)continue;let a=e[i];if(null!=a&&"function"!=typeof a)if(Array.isArray(a))s[i]=a.map(e=>p(e));else if("object"==typeof a)if(a.toJSON){let e=a.toJSON(r?.[i]);s[i]=t?e:JSON.stringify(e)}else s[i]=t?a:JSON.stringify(a);else s[i]=a}return s}async function c(e,t,a){return function(e,t){return e?t&&(0,o.Qc)(e)?t:(0,o.getApiKey)(e)??i.id?.findCredential(e)?.token:null}(e,t)||(!i.id&&s.A.request.useIdentity&&await Promise.all([r.e(6361),r.e(7644),r.e(7715)]).then(()=>r(50148)),(await i.id.getCredential(e,a))?.token)}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9829],{39829(t,n,e){e.d(n,{A:()=>z});var i,r=e(32198),l=e(4576),a=e(51447),s=e(4718),u=e(53966),h=e(91429),o=e(5443),f=e(91075),m=e(86738),c=e(16930),g=e(12359),x=e(94078),p=e(95108),y=e(90634),v=e(47610),d=e(28735),M=e(56993),R=e(43937);function P(t){return!Array.isArray(t[0])}let z=i=class extends f.A{static fromExtent(t){let n=t.clone().normalize(),{spatialReference:e}=t,r=!1,l=!1;for(let t of n)t.hasZ&&(r=!0),t.hasM&&(l=!0);let a={rings:n.map(t=>{let n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r&&t.hasZ){let e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(e)}if(l&&t.hasM){let e=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<n.length;t++)n[t].push(e)}return n}),spatialReference:e};return r&&(a.hasZ=!0),l&&(a.hasM=!0),new i(a)}constructor(t){super(function(t){if(!t)return;let{rings:n,hasM:e,hasZ:i,spatialReference:r}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:i??=!0,e??=!0;break;case 3:i??=!0!==e,e??=!i;break;default:i??=!1,e??=!1}return r??=c.A.WGS84,{...t,hasM:e,hasZ:i,rings:n,spatialReference:r}}(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){(0,a.Lx)(u.A.getLogger(this),"centroid",{replacement:"Please use centroidExecute() instead.",version:"4.34",warnOnce:!0});let t=(0,g.Ve)(this);return t?m.A.fromJSON(t):null}writeCurveRings(t,n){n.curveRings=(0,s.o8)(t)}get extent(){let t=(0,y.v)(this),{spatialReference:n}=this;return t?new o.A({...t,spatialReference:n}):null}writeRings(t,n){n.rings=(0,s.o8)(this.rings)}addRing(t){if(!t)return;let n=this.rings,e=n.length;if(P(t)){let i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.slice();return this.notifyChange("rings"),this}clone(){let t=new i;return t.spatialReference=this.spatialReference,t.rings=(0,s.o8)(this.rings),t.curveRings=(0,s.o8)(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;let n=this.spatialReference,e=t.spatialReference;if(null!=n!=(null!=e)||null!=n&&null!=e&&!n.equals(e)||this.rings.length!==t.rings.length)return!1;for(let n=0;n<this.rings.length;n++){let e=this.rings[n],i=t.rings[n];if(!(0,l.aI)(e,i,v.v6))return!1}return!0}contains(t){if(!t)return!1;let n=(0,d.Cv)(t,this.spatialReference);return(0,x.m3)(this,n??t)}isClockwise(t){let n=P(t)?t.map(t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y]):t;return(0,p.$3)(n)}getPoint(t,n){if(!this._validateInputs(t,n))return null;let e=this.rings[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new m.A(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new m.A(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new m.A(e[0],e[1],e[2],e[3],this.spatialReference):new m.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,M.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t].splice(n,0,e),this.notifyChange("rings"),this):this}removePoint(t,n){if(!this._validateInputs(t,n))return null;let e=new m.A(this.rings[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("rings"),e}removeRing(t){if(!this._validateInputs(t,null))return null;let n=this.rings.splice(t,1)[0],e=this.spatialReference,i=n.map(t=>new m.A(t,e));return this.notifyChange("rings"),i}setPoint(t,n,e){return this._validateInputs(t,n)?((0,M.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t][n]=e,this.notifyChange("rings"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=n){let i=this.rings[t];if(e&&(n<0||n>i.length)||!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,h.MZ)({readOnly:!0})],z.prototype,"cache",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],z.prototype,"centroid",null),(0,r.Cg)([(0,h.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],z.prototype,"curveRings",void 0),(0,r.Cg)([(0,R.K)("curveRings")],z.prototype,"writeCurveRings",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],z.prototype,"extent",null),(0,r.Cg)([(0,h.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],z.prototype,"rings",void 0),(0,r.Cg)([(0,R.K)("rings")],z.prototype,"writeRings",null),z=i=(0,r.Cg)([(0,h.$K)("esri.geometry.Polygon")],z),z.prototype.toJSON.isDefaultToJSON=!0},51118(t,n,e){function i(t){let n=[];for(t.reset();t.nextPath();){let e=[];for(;t.nextPoint();){let n=[t.x,t.y];t.hasZ&&n.push(t.z),t.hasM&&n.push(t.m),e.push(n)}n.push(e)}return t.reset(),n}function r(t){let n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}e.d(n,{A:()=>r,x:()=>i})},537(t,n,e){e.d(n,{B$:()=>p,LJ:()=>y,Pj:()=>M,Rg:()=>g,Yz:()=>v,z8:()=>x});var i=e(19419),r=e(79567),l=e(52006);function a(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function u(t){return void 0!==t.x&&void 0!==t.y}function h(t){return void 0!==t.paths}function o(t){return void 0!==t.rings}function f(t){return function(n,e){return null==n?e:null==e?n:t(n,e)}}const m=f(Math.min),c=f(Math.max);function g(t,n){return h(n)?v(t,n.curvePaths??n.paths,!1,!1)??t:o(n)?v(t,n.curveRings??n.rings,!1,!1)??t:s(n)?M(t,n.points,!1,!1,!1,!1):a(n)?d(t,n):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function x(t){let n,e,r,l;for(t.reset(),n=r=1/0,e=l=-1/0;t.nextPath();){let i=p(t);n=Math.min(i[0],n),r=Math.min(i[1],r),e=Math.max(i[2],e),l=Math.max(i[3],l)}return(0,i.vt)([n,r,e,l])}function p(t){let n,e,r,l;for(n=r=1/0,e=l=-1/0;t.nextPoint();)n=Math.min(t.x,n),r=Math.min(t.y,r),e=Math.max(t.x,e),l=Math.max(t.y,l);return(0,i.vt)([n,r,e,l])}function y(t,n){return h(n)?v(t,n.curvePaths??n.paths,!0,!1)??t:o(n)?v(t,n.curveRings??n.rings,!0,!1)??t:s(n)?M(t,n.points,!0,!1,!0,!1):a(n)?d(t,n,0,0,!0,!1):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=n.x,t[4]=n.y,t[5]=n.z),t)}function v(t,n,e,a){let s=e?3:2;if(!n.length||!n[0].length)return null;let u,h,o,f,[g,x]=(0,l.yP)(n[0][0]),p=g,y=x;for(let t=0;t<n.length;t++){let v=n[t];for(let t=0;t<v.length;t++){let n=(0,l.yP)(v[t]),[d,M]=n;if(g=m(g,d),x=m(x,M),p=c(p,d),y=c(y,M),e&&n.length>2){let t=n[2];u=m(u,t),h=c(h,t)}if(a&&n.length>s){let t=n[s];o=m(o,t),f=c(f,t)}let R=v[t];if((0,l.Xq)(R)||t<1)continue;let P=(0,l.yP)(v[t-1]),z=(0,i.fA)(g,x,p,y);[g,x,p,y]=(0,r.e)(z,P,R)}}return e?a?(t[0]=g,t[1]=x,t[2]=u,t[3]=o,t[4]=p,t[5]=y,t[6]=h,t[7]=f,t.length=8,t):(t[0]=g,t[1]=x,t[2]=u,t[3]=p,t[4]=y,t[5]=h,t.length=6,t):a?(t[0]=g,t[1]=x,t[2]=o,t[3]=p,t[4]=y,t[5]=f,t.length=6,t):(t[0]=g,t[1]=x,t[2]=p,t[3]=y,t.length=4,t)}function d(t,n,e,i,r,l){let a=n.xmin,s=n.xmax,u=n.ymin,h=n.ymax,o=n.zmin,f=n.zmax,m=n.mmin,c=n.mmax;return r?(o||=0,f||=0,l?(m||=0,c||=0,t[0]=a,t[1]=u,t[2]=o,t[3]=m,t[4]=s,t[5]=h,t[6]=f,t[7]=c,t):(t[0]=a,t[1]=u,t[2]=o,t[3]=s,t[4]=h,t[5]=f,t)):l?(m||=0,c||=0,t[0]=a,t[1]=u,t[2]=m,t[3]=s,t[4]=h,t[5]=c,t):(t[0]=a,t[1]=u,t[2]=s,t[3]=h,t)}function M(t,n,e,i,r,l){let a=e?3:2,s=i&&l,u=e&&r;if(!n.length||!n[0].length)return null;let h,o,f,g,[x,p]=n[0],[y,v]=n[0];for(let t=0;t<n.length;t++){let e=n[t],[i,r]=e;if(x=m(x,i),p=m(p,r),y=c(y,i),v=c(v,r),u&&e.length>2){let t=e[2];h=m(h,t),o=c(o,t)}if(s&&e.length>a){let t=e[a];f=m(h,t),g=c(o,t)}}return r?(h||=0,o||=0,l?(f||=0,g||=0,t[0]=x,t[1]=p,t[2]=h,t[3]=f,t[4]=y,t[5]=v,t[6]=o,t[7]=g,t):(t[0]=x,t[1]=p,t[2]=h,t[3]=y,t[4]=v,t[5]=o,t)):l?(f||=0,g||=0,t[0]=x,t[1]=p,t[2]=f,t[3]=y,t[4]=v,t[5]=g,t):(t[0]=x,t[1]=p,t[2]=y,t[3]=v,t)}},12359(t,n,e){e.d(n,{IK:()=>o,TP:()=>f,Ve:()=>s,Z4:()=>l,l8:()=>a,w2:()=>h});var i=e(51118),r=e(95108);function l({xmin:t,xmax:n,ymin:e,ymax:i,zmin:r,zmax:l,hasZ:a}){let s=[(t+n)/2,(e+i)/2];return a&&s.push((r+l)/2),s}function a(t){return function(t,n){if(!t?.length)return null;let e=[],i=[],l=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let e=0,r=t.length;e<r;e++){let r=u(t[e],n,l);r&&i.push(r)}if(i.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),i.length&&(e[0]=i[0][0],e[1]=i[0][1],n&&(e[2]=i[0][3]),(e[0]<l[0]||e[0]>l[1]||e[1]<l[2]||e[1]>l[3]||n&&(e[2]<l[4]||e[2]>l[5]))&&(e.length=0)),!e.length){let i=t[0]&&t[0].length?function(t,n){let e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0],l=0,a=0,s=0,u=0;for(let h=0,o=t.length;h<o-1;h++){let o=t[h],f=t[h+1];if(o&&f){e[0]=o[0],e[1]=o[1],i[0]=f[0],i[1]=f[1],n&&o.length>2&&f.length>2&&(e[2]=o[2],i[2]=f[2]);let t=(0,r.R3)(e,i);if(t){l+=t;let e=(0,r.t9)(o,f);a+=t*e[0],s+=t*e[1],n&&e.length>2&&(u+=t*e[2])}}}return l>0?n?[a/l,s/l,u/l]:[a/l,s/l]:t.length?t[0]:null}(t[0],n):null;if(!i)return null;e[0]=i[0],e[1]=i[1],n&&i.length>2&&(e[2]=i[2])}return e}(t.rings,t.hasZ??!1)}function s(t){let n=a(t);if(!n)return null;let{hasZ:e,spatialReference:i}=t,[r,l,s]=n;return isNaN(r)||isNaN(l)||e&&isNaN(s)?null:{x:r,y:l,z:e?s:void 0,spatialReference:i}}function u(t,n,e){let i=0,r=0,l=0,a=0,s=0,u=t.length?t[0][0]:0,h=t.length?t[0][1]:0,o=t.length&&n?t[0][2]:0;for(let f=0;f<t.length;f++){let m=t[f],c=t[(f+1)%t.length],[g,x,p]=m,y=g-u,v=x-h,[d,M,R]=c,P=d-u,z=M-h,S=y*z-P*v;if(a+=S,i+=(y+P)*S,r+=(v+z)*S,n&&m.length>2&&c.length>2){let t=p-o,n=R-o,e=y*n-P*t;l+=(t+n)*e,s+=e}g<e[0]&&(e[0]=g),g>e[1]&&(e[1]=g),x<e[2]&&(e[2]=x),x>e[3]&&(e[3]=x),n&&(p<e[4]&&(e[4]=p),p>e[5]&&(e[5]=p))}if(a>0&&(a*=-1),s>0&&(s*=-1),!a)return null;a*=.5,s*=.5;let f=[i/(6*a)+u,r/(6*a)+h,a];return n&&(e[4]===e[5]||0===s?(f[3]=(e[4]+e[5])/2,f[4]=0):(f[3]=l/(6*s)+o,f[4]=s)),f}function h(t,n){let e=0,i=0,r=0;t.nextPoint();let l=t.pathSize?t.x:0,a=t.pathSize?t.y:0;for(let s=0;s<t.pathSize;s++){t.seekInPath(s);let u=[t.x,t.y];t.seekInPath((s+1)%t.pathSize);let h=[t.x,t.y],[o,f]=u,m=o-l,c=f-a,[g,x]=h,p=g-l,y=x-a,v=m*y-p*c;r+=v,e+=(m+p)*v,i+=(c+y)*v,o<n[0]&&(n[0]=o),o>n[1]&&(n[1]=o),f<n[2]&&(n[2]=f),f>n[3]&&(n[3]=f)}return r>0&&(r*=-1),r?(r*=.5,[e/(6*r)+l,i/(6*r)+a,r]):null}function o(t){let{hasZ:n,totalSize:e}=t;if(0===e)return null;let l=[],a=[],s=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(t.reset();t.nextPath();){let n=u((0,i.A)(t),t.hasZ,s);n&&a.push(n)}if(a.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),a.length&&(l[0]=a[0][0],l[1]=a[0][1],n&&(l[2]=a[0][3]),(l[0]<s[0]||l[0]>s[1]||l[1]<s[2]||l[1]>s[3]||n&&(l[2]<s[4]||l[2]>s[5]))&&(l.length=0)),!l.length){t.reset(),t.nextPath();let e=t.pathSize?function(t){let{hasZ:n}=t,e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0],l=0,a=0,s=0,u=0;if(t.nextPoint()){let h=t.x,o=t.y,f=t.z;for(;t.nextPoint();){let m=t.x,c=t.y,g=t.z;e[0]=h,e[1]=o,i[0]=m,i[1]=c,n&&(e[2]=f,i[2]=g);let x=(0,r.R3)(e,i);if(x){l+=x;let t=(0,r.t9)(e,i);a+=x*t[0],s+=x*t[1],n&&t.length>2&&(u+=x*t[2])}h=m,o=c,f=g}}return l>0?n?[a/l,s/l,u/l]:[a/l,s/l]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!e)return null;l[0]=e[0],l[1]=e[1],n&&e.length>2&&(l[2]=e[2])}return l}function f(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<1e-6){let n=o(t);return n?[n[0],n[1]]:null}let e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;let i=[t.x,t.y];for(t.reset();t.nextPath();)m(e,i,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=i[0],e[1]+=i[1],e}function m(t,n,e){if(!t||!e||e.pathSize<3)return null;e.nextPoint();let i=e.x,r=e.y;e.nextPoint();let l,a=e.x-i,s=e.y-r,u=0,h=0;for(;e.nextPoint();)u=e.x-i,h=e.y-r,l=.16666666666666666*(u*s-h*a),t[0]+=l*(a+u),t[1]+=l*(s+h),a=u,s=h;let o=e.getCurrentRingArea(),f=[i,r];return f[0]-=n[0],f[1]-=n[1],f[0]*=o,f[1]*=o,t[0]+=f[0],t[1]+=f[1],t}},95108(t,n,e){e.d(n,{$3:()=>o,R3:()=>r,Xf:()=>a,Yl:()=>h,gR:()=>l,m3:()=>m,t9:()=>u});var i=e(4576);function r(t,n){let e=n[0]-t[0],i=n[1]-t[1];if(t.length>2&&n.length>2){let r=t[2]-n[2];return Math.sqrt(e*e+i*i+r*r)}return Math.sqrt(e*e+i*i)}function l(t,n,e,i){let[r,l]=n,[a,s]=e,[u,h]=i,o=u-a,f=h-s,m=o*o+f*f,c=(r-a)*o+(l-s)*f,g=Math.min(1,Math.max(0,c/m));return t[0]=a+o*g,t[1]=s+f*g,t}function a(t,n,e){let i,r,l,a,u=!1,h=1/0;for(e.reset();e.nextPath();)if(e.nextPoint())for(i=e.x,r=e.y;e.nextPoint();)l=e.x,a=e.y,r>n!=a>n&&t<(l-i)*(n-r)/(a-r)+i&&(u=!u),h=Math.min(h,s(t,n,i,r,l,a)),i=l,r=a;return 0===h?0:(u?1:-1)*Math.sqrt(h)}function s(t,n,e,i,r,l){let a=e,s=i,u=r-a,h=l-s;if(0!==u||0!==h){let e=((t-a)*u+(n-s)*h)/(u*u+h*h);e>1?(a=r,s=l):e>0&&(a+=u*e,s+=h*e)}return u=t-a,h=n-s,u*u+h*h}function u(t,n){return function(t,n,e){let i=t[0]+e*(n[0]-t[0]),r=t[1]+e*(n[1]-t[1]);return t.length>2&&n.length>2?[i,r,t[2]+e*(n[2]-t[2])]:[i,r]}(t,n,.5)}function h(t){let n=t.length,e=0;for(let i=0;i<n-1;++i)e+=r(t[i],t[i+1]);return e}function o(t,n=0,e=1){let i=0,r=t.length,l=t[0];for(let a=1;a<r;a++){let r=t[a];i+=(r[n]-l[n])*(r[e]+l[e]),l=r}if(f(t)){let r=t[0];i+=(r[n]-l[n])*(r[e]+l[e])}return i>=0}function f(t){let n=t.length;return n>0&&!(0,i.aI)(t[0],t[n-1])}function m(t){if("rings"in t)for(let n of t.rings)f(n)&&n.push(n[0].slice())}e(52006)},90634(t,n,e){e.d(n,{HA:()=>o,JM:()=>f,Z3:()=>g,ge:()=>m,v:()=>c});var i=e(537);const r=[];function l(t,n,e,i){return{xmin:t,ymin:n,xmax:e,ymax:i}}function a(t,n,e,i,r,l){return{xmin:t,ymin:n,zmin:e,xmax:i,ymax:r,zmax:l}}function s(t,n,e,i,r,l){return{xmin:t,ymin:n,mmin:e,xmax:i,ymax:r,mmax:l}}function u(t,n,e,i,r,l,a,s){return{xmin:t,ymin:n,zmin:e,mmin:i,xmax:r,ymax:l,zmax:a,mmax:s}}function h(t,n=!1,e=!1){return n?e?u(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):a(t[0],t[1],t[2],t[3],t[4],t[5]):e?s(t[0],t[1],t[2],t[3],t[4],t[5]):l(t[0],t[1],t[2],t[3])}function o(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){let{x:n,y:e,z:i,m:r}=t,h=null!=r;return null!=i?h?u(n,e,i,r,n,e,i,r):a(n,e,i,n,e,i):h?s(n,e,r,n,e,r):l(n,e,n,e)}(t):function(t){return void 0!==t.rings}(t)?c(t):function(t){return void 0!==t.paths}(t)?g(t):function(t){return void 0!==t.points}(t)?m(t):null:null}function f(t,{xmin:n,ymin:e,zmin:i,mmin:r,xmax:l,ymax:a,zmax:s,mmax:u}){t.xmin=Math.min(t.xmin,n),t.xmax=Math.max(t.xmax,l),t.ymin=Math.min(t.ymin,e),t.ymax=Math.max(t.ymax,a),null!=t.zmin&&(t.zmin=Math.min(t.zmin,i),t.zmax=Math.max(t.zmax,s)),null!=t.mmin&&(t.mmin=Math.min(t.mmin,r),t.mmax=Math.max(t.mmax,u))}function m(t){let{hasZ:n,hasM:e,points:l}=t,a=(0,i.Pj)(r,l,n??!1,e??!1,n??!1,e??!1);return a?h(a,n,e):null}function c(t){let{hasZ:n,hasM:e,rings:l,curveRings:a}=t,s=(0,i.Yz)(r,a??l,n??!1,e??!1);return s?h(s,n,e):null}function g(t){let{hasZ:n,hasM:e,paths:l,curvePaths:a}=t,s=(0,i.Yz)(r,a??l,n??!1,e??!1);return s?h(s,n,e):null}},47610(t,n,e){function i([t,n,e,i],[r,l,a,s]){return t===r&&n===l&&(null==e&&null==a||e===a)&&(null==i&&null==s||i===s)}e.d(n,{v6:()=>i}),e(5443),e(83960)},83960(t,n,e){e.d(n,{RH:()=>u,X_:()=>l,oW:()=>s,zx:()=>a});var i=e(34727),r=e(86211);function l(t,n){let e=n||t.extent,i=t.width,l=(0,r.GA)(e?.spatialReference);return e&&i?e.width/i*l*39.37*96:0}function a(t,n,e){return function(t,n){return 0===n||(0,i.Sp)(t,n)||t<n}(t,n)&&function(t,n){return 0===n||(0,i.Sp)(t,n)||t>n}(t,e)}function s(t,n){return(0,i.Sp)(t,n)?0:(t||1/0)>(n||1/0)?1:-1}function u(t,n){return t.minScale=t.minScale>0?n.minScale>0?Math.min(t.minScale,n.minScale):t.minScale:n.minScale,t.maxScale=t.maxScale>0?n.maxScale>0?Math.max(t.maxScale,n.maxScale):t.maxScale:n.maxScale,t}},56993(t,n,e){function i(t,n,e=!1){let{hasM:i,hasZ:r}=t;Array.isArray(n)?4!==n.length||i||r?3===n.length&&e&&!i?(r=!0,i=!1):3===n.length&&i&&r&&(i=!1,r=!1):(i=!0,r=!0):(r=!r&&n.hasZ&&(!i||n.hasM),i=!i&&n.hasM&&(!r||n.hasZ)),t.hasZ=r,t.hasM=i}e.d(n,{h:()=>i})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9829],{39829(t,n,e){e.d(n,{A:()=>z});var i,r=e(32198),l=e(4576),a=e(51447),s=e(4718),u=e(53966),h=e(91429),o=e(5443),f=e(91075),m=e(86738),c=e(16930),g=e(12359),x=e(94078),p=e(95108),y=e(90634),v=e(47610),d=e(28735),M=e(56993),R=e(43937);function P(t){return!Array.isArray(t[0])}let z=i=class extends f.A{static fromExtent(t){let n=t.clone().normalize(),{spatialReference:e}=t,r=!1,l=!1;for(let t of n)t.hasZ&&(r=!0),t.hasM&&(l=!0);let a={rings:n.map(t=>{let n=[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]];if(r&&t.hasZ){let e=t.zmin+.5*(t.zmax-t.zmin);for(let t=0;t<n.length;t++)n[t].push(e)}if(l&&t.hasM){let e=t.mmin+.5*(t.mmax-t.mmin);for(let t=0;t<n.length;t++)n[t].push(e)}return n}),spatialReference:e};return r&&(a.hasZ=!0),l&&(a.hasM=!0),new i(a)}constructor(t){super(function(t){if(!t)return;let{rings:n,hasM:e,hasZ:i,spatialReference:r}=t;switch(n??=[],function(t){return"number"==typeof t[0]?.[0]}(n)&&(n=[n]),n[0]?.[0]?.length){case 4:i??=!0,e??=!0;break;case 3:i??=!0!==e,e??=!i;break;default:i??=!1,e??=!1}return r??=c.A.WGS84,{...t,hasM:e,hasZ:i,rings:n,spatialReference:r}}(t)),this.curveRings=void 0,this.rings=[],this.type="polygon"}get cache(){return this.commitProperty("curveRings"),this.commitProperty("hasM"),this.commitProperty("hasZ"),this.commitProperty("rings"),this.commitProperty("spatialReference"),{}}get centroid(){(0,a.Lx)(u.A.getLogger(this),"centroid",{replacement:"Please use centroidExecute() instead.",version:"4.34",warnOnce:!0});let t=(0,g.Ve)(this);return t?m.A.fromJSON(t):null}writeCurveRings(t,n){n.curveRings=(0,s.o8)(t)}get extent(){let t=(0,y.v)(this),{spatialReference:n}=this;return t?new o.A({...t,spatialReference:n}):null}writeRings(t,n){n.rings=(0,s.o8)(this.rings)}addRing(t){if(!t)return;let n=this.rings,e=n.length;if(P(t)){let i=[];for(let n=0,e=t.length;n<e;n++)i[n]=t[n].toArray();n[e]=i}else n[e]=t.slice();return this.notifyChange("rings"),this}clone(){let t=new i;return t.spatialReference=this.spatialReference,t.rings=(0,s.o8)(this.rings),t.curveRings=(0,s.o8)(this.curveRings),t.hasZ=this.hasZ,t.hasM=this.hasM,t}equals(t){if(this===t)return!0;if(null==t)return!1;let n=this.spatialReference,e=t.spatialReference;if(null!=n!=(null!=e)||null!=n&&null!=e&&!n.equals(e)||this.rings.length!==t.rings.length)return!1;for(let n=0;n<this.rings.length;n++){let e=this.rings[n],i=t.rings[n];if(!(0,l.aI)(e,i,v.v6))return!1}return!0}contains(t){if(!t)return!1;let n=(0,d.Cv)(t,this.spatialReference);return(0,x.m3)(this,n??t)}isClockwise(t){let n=P(t)?t.map(t=>this.hasZ?this.hasM?[t.x,t.y,t.z,t.m]:[t.x,t.y,t.z]:[t.x,t.y]):t;return(0,p.$3)(n)}getPoint(t,n){if(!this._validateInputs(t,n))return null;let e=this.rings[t][n],i=this.hasZ,r=this.hasM;return i&&!r?new m.A(e[0],e[1],e[2],void 0,this.spatialReference):r&&!i?new m.A(e[0],e[1],void 0,e[2],this.spatialReference):i&&r?new m.A(e[0],e[1],e[2],e[3],this.spatialReference):new m.A(e[0],e[1],this.spatialReference)}insertPoint(t,n,e){return this._validateInputs(t,n,!0)?((0,M.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t].splice(n,0,e),this.notifyChange("rings"),this):this}removePoint(t,n){if(!this._validateInputs(t,n))return null;let e=new m.A(this.rings[t].splice(n,1)[0],this.spatialReference);return this.notifyChange("rings"),e}removeRing(t){if(!this._validateInputs(t,null))return null;let n=this.rings.splice(t,1)[0],e=this.spatialReference,i=n.map(t=>new m.A(t,e));return this.notifyChange("rings"),i}setPoint(t,n,e){return this._validateInputs(t,n)?((0,M.h)(this,e),Array.isArray(e)||(e=e.toArray()),this.rings[t][n]=e,this.notifyChange("rings"),this):this}_validateInputs(t,n,e=!1){if(null==t||t<0||t>=this.rings.length)return!1;if(null!=n){let i=this.rings[t];if(e&&(n<0||n>i.length)||!e&&(n<0||n>=i.length))return!1}return!0}toJSON(t){return this.write({},t)}};(0,r.Cg)([(0,h.MZ)({readOnly:!0})],z.prototype,"cache",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],z.prototype,"centroid",null),(0,r.Cg)([(0,h.MZ)({json:{write:!0,origins:{"portal-item":{write:!1},"web-map":{write:!1},"web-scene":{write:!1}}}})],z.prototype,"curveRings",void 0),(0,r.Cg)([(0,R.K)("curveRings")],z.prototype,"writeCurveRings",null),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],z.prototype,"extent",null),(0,r.Cg)([(0,h.MZ)({type:[[[Number]]],json:{write:{isRequired:!0}}})],z.prototype,"rings",void 0),(0,r.Cg)([(0,R.K)("rings")],z.prototype,"writeRings",null),z=i=(0,r.Cg)([(0,h.$K)("esri.geometry.Polygon")],z),z.prototype.toJSON.isDefaultToJSON=!0},51118(t,n,e){function i(t){let n=[];for(t.reset();t.nextPath();){let e=[];for(;t.nextPoint();){let n=[t.x,t.y];t.hasZ&&n.push(t.z),t.hasM&&n.push(t.m),e.push(n)}n.push(e)}return t.reset(),n}function r(t){let n=[];for(;t.nextPoint();)n.push([t.x,t.y]);return t.seekPathStart(),n}e.d(n,{A:()=>r,x:()=>i})},537(t,n,e){e.d(n,{B$:()=>p,LJ:()=>y,Pj:()=>M,Rg:()=>g,Yz:()=>v,z8:()=>x});var i=e(19419),r=e(79567),l=e(52006);function a(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function s(t){return void 0!==t.points}function u(t){return void 0!==t.x&&void 0!==t.y}function h(t){return void 0!==t.paths}function o(t){return void 0!==t.rings}function f(t){return function(n,e){return null==n?e:null==e?n:t(n,e)}}const m=f(Math.min),c=f(Math.max);function g(t,n){return h(n)?v(t,n.curvePaths??n.paths,!1,!1)??t:o(n)?v(t,n.curveRings??n.rings,!1,!1)??t:s(n)?M(t,n.points,!1,!1,!1,!1):a(n)?d(t,n):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.x,t[3]=n.y),t)}function x(t){let n,e,r,l;for(t.reset(),n=r=1/0,e=l=-1/0;t.nextPath();){let i=p(t);n=Math.min(i[0],n),r=Math.min(i[1],r),e=Math.max(i[2],e),l=Math.max(i[3],l)}return(0,i.vt)([n,r,e,l])}function p(t){let n,e,r,l;for(n=r=1/0,e=l=-1/0;t.nextPoint();)n=Math.min(t.x,n),r=Math.min(t.y,r),e=Math.max(t.x,e),l=Math.max(t.y,l);return(0,i.vt)([n,r,e,l])}function y(t,n){return h(n)?v(t,n.curvePaths??n.paths,!0,!1)??t:o(n)?v(t,n.curveRings??n.rings,!0,!1)??t:s(n)?M(t,n.points,!0,!1,!0,!1):a(n)?d(t,n,0,0,!0,!1):(u(n)&&(t[0]=n.x,t[1]=n.y,t[2]=n.z,t[3]=n.x,t[4]=n.y,t[5]=n.z),t)}function v(t,n,e,a){let s=e?3:2;if(!n.length||!n[0].length)return null;let u,h,o,f,[g,x]=(0,l.yP)(n[0][0]),p=g,y=x;for(let t=0;t<n.length;t++){let v=n[t];for(let t=0;t<v.length;t++){let n=(0,l.yP)(v[t]),[d,M]=n;if(g=m(g,d),x=m(x,M),p=c(p,d),y=c(y,M),e&&n.length>2){let t=n[2];u=m(u,t),h=c(h,t)}if(a&&n.length>s){let t=n[s];o=m(o,t),f=c(f,t)}let R=v[t];if((0,l.Xq)(R)||t<1)continue;let P=(0,l.yP)(v[t-1]),z=(0,i.fA)(g,x,p,y);[g,x,p,y]=(0,r.e)(z,P,R)}}return e?a?(t[0]=g,t[1]=x,t[2]=u,t[3]=o,t[4]=p,t[5]=y,t[6]=h,t[7]=f,t.length=8,t):(t[0]=g,t[1]=x,t[2]=u,t[3]=p,t[4]=y,t[5]=h,t.length=6,t):a?(t[0]=g,t[1]=x,t[2]=o,t[3]=p,t[4]=y,t[5]=f,t.length=6,t):(t[0]=g,t[1]=x,t[2]=p,t[3]=y,t.length=4,t)}function d(t,n,e,i,r,l){let a=n.xmin,s=n.xmax,u=n.ymin,h=n.ymax,o=n.zmin,f=n.zmax,m=n.mmin,c=n.mmax;return r?(o||=0,f||=0,l?(m||=0,c||=0,t[0]=a,t[1]=u,t[2]=o,t[3]=m,t[4]=s,t[5]=h,t[6]=f,t[7]=c,t):(t[0]=a,t[1]=u,t[2]=o,t[3]=s,t[4]=h,t[5]=f,t)):l?(m||=0,c||=0,t[0]=a,t[1]=u,t[2]=m,t[3]=s,t[4]=h,t[5]=c,t):(t[0]=a,t[1]=u,t[2]=s,t[3]=h,t)}function M(t,n,e,i,r,l){let a=e?3:2,s=i&&l,u=e&&r;if(!n.length||!n[0].length)return null;let h,o,f,g,[x,p]=n[0],[y,v]=n[0];for(let t=0;t<n.length;t++){let e=n[t],[i,r]=e;if(x=m(x,i),p=m(p,r),y=c(y,i),v=c(v,r),u&&e.length>2){let t=e[2];h=m(h,t),o=c(o,t)}if(s&&e.length>a){let t=e[a];f=m(h,t),g=c(o,t)}}return r?(h||=0,o||=0,l?(f||=0,g||=0,t[0]=x,t[1]=p,t[2]=h,t[3]=f,t[4]=y,t[5]=v,t[6]=o,t[7]=g,t):(t[0]=x,t[1]=p,t[2]=h,t[3]=y,t[4]=v,t[5]=o,t)):l?(f||=0,g||=0,t[0]=x,t[1]=p,t[2]=f,t[3]=y,t[4]=v,t[5]=g,t):(t[0]=x,t[1]=p,t[2]=y,t[3]=v,t)}},12359(t,n,e){e.d(n,{IK:()=>o,TP:()=>f,Ve:()=>s,Z4:()=>l,l8:()=>a,w2:()=>h});var i=e(51118),r=e(95108);function l({xmin:t,xmax:n,ymin:e,ymax:i,zmin:r,zmax:l,hasZ:a}){let s=[(t+n)/2,(e+i)/2];return a&&s.push((r+l)/2),s}function a(t){return function(t,n){if(!t?.length)return null;let e=[],i=[],l=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let e=0,r=t.length;e<r;e++){let r=u(t[e],n,l);r&&i.push(r)}if(i.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),i.length&&(e[0]=i[0][0],e[1]=i[0][1],n&&(e[2]=i[0][3]),(e[0]<l[0]||e[0]>l[1]||e[1]<l[2]||e[1]>l[3]||n&&(e[2]<l[4]||e[2]>l[5]))&&(e.length=0)),!e.length){let i=t[0]&&t[0].length?function(t,n){let e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0],l=0,a=0,s=0,u=0;for(let h=0,o=t.length;h<o-1;h++){let o=t[h],f=t[h+1];if(o&&f){e[0]=o[0],e[1]=o[1],i[0]=f[0],i[1]=f[1],n&&o.length>2&&f.length>2&&(e[2]=o[2],i[2]=f[2]);let t=(0,r.R3)(e,i);if(t){l+=t;let e=(0,r.t9)(o,f);a+=t*e[0],s+=t*e[1],n&&e.length>2&&(u+=t*e[2])}}}return l>0?n?[a/l,s/l,u/l]:[a/l,s/l]:t.length?t[0]:null}(t[0],n):null;if(!i)return null;e[0]=i[0],e[1]=i[1],n&&i.length>2&&(e[2]=i[2])}return e}(t.rings,t.hasZ??!1)}function s(t){let n=a(t);if(!n)return null;let{hasZ:e,spatialReference:i}=t,[r,l,s]=n;return isNaN(r)||isNaN(l)||e&&isNaN(s)?null:{x:r,y:l,z:e?s:void 0,spatialReference:i}}function u(t,n,e){let i=0,r=0,l=0,a=0,s=0,u=t.length?t[0][0]:0,h=t.length?t[0][1]:0,o=t.length&&n?t[0][2]:0;for(let f=0;f<t.length;f++){let m=t[f],c=t[(f+1)%t.length],[g,x,p]=m,y=g-u,v=x-h,[d,M,R]=c,P=d-u,z=M-h,S=y*z-P*v;if(a+=S,i+=(y+P)*S,r+=(v+z)*S,n&&m.length>2&&c.length>2){let t=p-o,n=R-o,e=y*n-P*t;l+=(t+n)*e,s+=e}g<e[0]&&(e[0]=g),g>e[1]&&(e[1]=g),x<e[2]&&(e[2]=x),x>e[3]&&(e[3]=x),n&&(p<e[4]&&(e[4]=p),p>e[5]&&(e[5]=p))}if(a>0&&(a*=-1),s>0&&(s*=-1),!a)return null;a*=.5,s*=.5;let f=[i/(6*a)+u,r/(6*a)+h,a];return n&&(e[4]===e[5]||0===s?(f[3]=(e[4]+e[5])/2,f[4]=0):(f[3]=l/(6*s)+o,f[4]=s)),f}function h(t,n){let e=0,i=0,r=0;t.nextPoint();let l=t.pathSize?t.x:0,a=t.pathSize?t.y:0;for(let s=0;s<t.pathSize;s++){t.seekInPath(s);let u=[t.x,t.y];t.seekInPath((s+1)%t.pathSize);let h=[t.x,t.y],[o,f]=u,m=o-l,c=f-a,[g,x]=h,p=g-l,y=x-a,v=m*y-p*c;r+=v,e+=(m+p)*v,i+=(c+y)*v,o<n[0]&&(n[0]=o),o>n[1]&&(n[1]=o),f<n[2]&&(n[2]=f),f>n[3]&&(n[3]=f)}return r>0&&(r*=-1),r?(r*=.5,[e/(6*r)+l,i/(6*r)+a,r]):null}function o(t){let{hasZ:n,totalSize:e}=t;if(0===e)return null;let l=[],a=[],s=n?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(t.reset();t.nextPath();){let n=u((0,i.A)(t),t.hasZ,s);n&&a.push(n)}if(a.sort((t,e)=>{let i=t[2]-e[2];return 0===i&&n&&(i=t[4]-e[4]),i}),a.length&&(l[0]=a[0][0],l[1]=a[0][1],n&&(l[2]=a[0][3]),(l[0]<s[0]||l[0]>s[1]||l[1]<s[2]||l[1]>s[3]||n&&(l[2]<s[4]||l[2]>s[5]))&&(l.length=0)),!l.length){t.reset(),t.nextPath();let e=t.pathSize?function(t){let{hasZ:n}=t,e=n?[0,0,0]:[0,0],i=n?[0,0,0]:[0,0],l=0,a=0,s=0,u=0;if(t.nextPoint()){let h=t.x,o=t.y,f=t.z;for(;t.nextPoint();){let m=t.x,c=t.y,g=t.z;e[0]=h,e[1]=o,i[0]=m,i[1]=c,n&&(e[2]=f,i[2]=g);let x=(0,r.R3)(e,i);if(x){l+=x;let t=(0,r.t9)(e,i);a+=x*t[0],s+=x*t[1],n&&t.length>2&&(u+=x*t[2])}h=m,o=c,f=g}}return l>0?n?[a/l,s/l,u/l]:[a/l,s/l]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!e)return null;l[0]=e[0],l[1]=e[1],n&&e.length>2&&(l[2]=e[2])}return l}function f(t){let n=0;for(t.reset();t.nextPath();)n+=t.getCurrentRingArea();if(n<1e-6){let n=o(t);return n?[n[0],n[1]]:null}let e=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;let i=[t.x,t.y];for(t.reset();t.nextPath();)m(e,i,t);return e[0]*=1/n,e[1]*=1/n,e[0]+=i[0],e[1]+=i[1],e}function m(t,n,e){if(!t||!e||e.pathSize<3)return null;e.nextPoint();let i=e.x,r=e.y;e.nextPoint();let l,a=e.x-i,s=e.y-r,u=0,h=0;for(;e.nextPoint();)u=e.x-i,h=e.y-r,l=.16666666666666666*(u*s-h*a),t[0]+=l*(a+u),t[1]+=l*(s+h),a=u,s=h;let o=e.getCurrentRingArea(),f=[i,r];return f[0]-=n[0],f[1]-=n[1],f[0]*=o,f[1]*=o,t[0]+=f[0],t[1]+=f[1],t}},95108(t,n,e){e.d(n,{$3:()=>o,R3:()=>r,Xf:()=>a,Yl:()=>h,gR:()=>l,m3:()=>m,t9:()=>u});var i=e(4576);function r(t,n){let e=n[0]-t[0],i=n[1]-t[1];if(t.length>2&&n.length>2){let r=t[2]-n[2];return Math.sqrt(e*e+i*i+r*r)}return Math.sqrt(e*e+i*i)}function l(t,n,e,i){let[r,l]=n,[a,s]=e,[u,h]=i,o=u-a,f=h-s,m=o*o+f*f,c=(r-a)*o+(l-s)*f,g=Math.min(1,Math.max(0,c/m));return t[0]=a+o*g,t[1]=s+f*g,t}function a(t,n,e){let i,r,l,a,u=!1,h=1/0;for(e.reset();e.nextPath();)if(e.nextPoint())for(i=e.x,r=e.y;e.nextPoint();)l=e.x,a=e.y,r>n!=a>n&&t<(l-i)*(n-r)/(a-r)+i&&(u=!u),h=Math.min(h,s(t,n,i,r,l,a)),i=l,r=a;return 0===h?0:(u?1:-1)*Math.sqrt(h)}function s(t,n,e,i,r,l){let a=e,s=i,u=r-a,h=l-s;if(0!==u||0!==h){let e=((t-a)*u+(n-s)*h)/(u*u+h*h);e>1?(a=r,s=l):e>0&&(a+=u*e,s+=h*e)}return u=t-a,h=n-s,u*u+h*h}function u(t,n){return function(t,n,e){let i=t[0]+e*(n[0]-t[0]),r=t[1]+e*(n[1]-t[1]);return t.length>2&&n.length>2?[i,r,t[2]+e*(n[2]-t[2])]:[i,r]}(t,n,.5)}function h(t){let n=t.length,e=0;for(let i=0;i<n-1;++i)e+=r(t[i],t[i+1]);return e}function o(t,n=0,e=1){let i=0,r=t.length,l=t[0];for(let a=1;a<r;a++){let r=t[a];i+=(r[n]-l[n])*(r[e]+l[e]),l=r}if(f(t)){let r=t[0];i+=(r[n]-l[n])*(r[e]+l[e])}return i>=0}function f(t){let n=t.length;return n>0&&!(0,i.aI)(t[0],t[n-1])}function m(t){if("rings"in t)for(let n of t.rings)f(n)&&n.push(n[0].slice())}e(52006)},90634(t,n,e){e.d(n,{HA:()=>o,JM:()=>f,Z3:()=>g,ge:()=>m,v:()=>c});var i=e(537);const r=[];function l(t,n,e,i){return{xmin:t,ymin:n,xmax:e,ymax:i}}function a(t,n,e,i,r,l){return{xmin:t,ymin:n,zmin:e,xmax:i,ymax:r,zmax:l}}function s(t,n,e,i,r,l){return{xmin:t,ymin:n,mmin:e,xmax:i,ymax:r,mmax:l}}function u(t,n,e,i,r,l,a,s){return{xmin:t,ymin:n,zmin:e,mmin:i,xmax:r,ymax:l,zmax:a,mmax:s}}function h(t,n=!1,e=!1){return n?e?u(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7]):a(t[0],t[1],t[2],t[3],t[4],t[5]):e?s(t[0],t[1],t[2],t[3],t[4],t[5]):l(t[0],t[1],t[2],t[3])}function o(t){return t?function(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}(t)?t:function(t){return void 0!==t.x&&void 0!==t.y}(t)?function(t){let{x:n,y:e,z:i,m:r}=t,h=null!=r;return null!=i?h?u(n,e,i,r,n,e,i,r):a(n,e,i,n,e,i):h?s(n,e,r,n,e,r):l(n,e,n,e)}(t):function(t){return void 0!==t.rings}(t)?c(t):function(t){return void 0!==t.paths}(t)?g(t):function(t){return void 0!==t.points}(t)?m(t):null:null}function f(t,{xmin:n,ymin:e,zmin:i,mmin:r,xmax:l,ymax:a,zmax:s,mmax:u}){t.xmin=Math.min(t.xmin,n),t.xmax=Math.max(t.xmax,l),t.ymin=Math.min(t.ymin,e),t.ymax=Math.max(t.ymax,a),null!=t.zmin&&(t.zmin=Math.min(t.zmin,i),t.zmax=Math.max(t.zmax,s)),null!=t.mmin&&(t.mmin=Math.min(t.mmin,r),t.mmax=Math.max(t.mmax,u))}function m(t){let{hasZ:n,hasM:e,points:l}=t,a=(0,i.Pj)(r,l,n??!1,e??!1,n??!1,e??!1);return a?h(a,n,e):null}function c(t){let{hasZ:n,hasM:e,rings:l,curveRings:a}=t,s=(0,i.Yz)(r,a??l,n??!1,e??!1);return s?h(s,n,e):null}function g(t){let{hasZ:n,hasM:e,paths:l,curvePaths:a}=t,s=(0,i.Yz)(r,a??l,n??!1,e??!1);return s?h(s,n,e):null}},47610(t,n,e){function i([t,n,e,i],[r,l,a,s]){return t===r&&n===l&&(null==e&&null==a||e===a)&&(null==i&&null==s||i===s)}e.d(n,{v6:()=>i}),e(5443),e(83960)},83960(t,n,e){e.d(n,{RH:()=>h,X_:()=>l,gB:()=>a,oW:()=>u,zx:()=>s});var i=e(34727),r=e(86211);function l(t,n){let e=n||t.extent,i=t.width,l=(0,r.GA)(e?.spatialReference);return e&&i?e.width/i*l*39.37*96:0}function a(t,n){return t*(39.37*(0,r.GA)(n)*96)}function s(t,n,e){return function(t,n){return 0===n||(0,i.Sp)(t,n)||t<n}(t,n)&&function(t,n){return 0===n||(0,i.Sp)(t,n)||t>n}(t,e)}function u(t,n){return(0,i.Sp)(t,n)?0:(t||1/0)>(n||1/0)?1:-1}function h(t,n){return t.minScale=t.minScale>0?n.minScale>0?Math.min(t.minScale,n.minScale):t.minScale:n.minScale,t.maxScale=t.maxScale>0?n.maxScale>0?Math.max(t.maxScale,n.maxScale):t.maxScale:n.maxScale,t}},56993(t,n,e){function i(t,n,e=!1){let{hasM:i,hasZ:r}=t;Array.isArray(n)?4!==n.length||i||r?3===n.length&&e&&!i?(r=!0,i=!1):3===n.length&&i&&r&&(i=!1,r=!1):(i=!0,r=!0):(r=!r&&n.hasZ&&(!i||n.hasM),i=!i&&n.hasM&&(!r||n.hasZ)),t.hasZ=r,t.hasM=i}e.d(n,{h:()=>i})}}]);