@arcgis/core 5.1.0-next.88 → 5.1.0-next.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/arcade/validation/arcadeValidator.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0840e7dd62643c56ae9e.js +1 -0
- package/assets/esri/core/workers/chunks/{500be1fb7cc9efec875c.js → 0e3dcf99382478181366.js} +1 -1
- package/assets/esri/core/workers/chunks/{aae40d70eb01249c1bab.js → 1e4e7111d43f01c149b3.js} +1 -1
- package/assets/esri/core/workers/chunks/{2549a07f403447482f4e.js → 2dcfc4d7e76c922bcbf9.js} +1 -1
- package/assets/esri/core/workers/chunks/{4dc91c2208201ba34c90.js → 3397eae416622c64e628.js} +1 -1
- package/assets/esri/core/workers/chunks/{b9e163f4a898e50cc854.js → 39d6032d79720935910d.js} +1 -1
- package/assets/esri/core/workers/chunks/{d05a7ce6c1d4b883ed4c.js → 41cbde4738ae4adf973d.js} +1 -1
- package/assets/esri/core/workers/chunks/{a401d44a5b45c05072c2.js → 4b9b9e6136c11d5d7901.js} +1 -1
- package/assets/esri/core/workers/chunks/5409369d0d637cb30257.js +1 -0
- package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js → 73af4c947e8151d411c1.js} +2 -2
- package/assets/esri/core/workers/chunks/{01bd1b86ba899c6aa4c0.js → 75c09a2fa4c34b4844c5.js} +1 -1
- package/assets/esri/core/workers/chunks/{b2983f521d8c96becd8a.js → 7ed5b669010db58845f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{8178e9ba3c568d406a87.js → 81d761c837b7456ec99f.js} +1 -1
- package/assets/esri/core/workers/chunks/{7185486c6dc28fc367a1.js → 90a8dfb03a437fe8a6e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9065cee85eb8dde6a42.js → a2159df718a7f2f59271.js} +1 -1
- package/assets/esri/core/workers/chunks/{7f34fa9f154f5101cb13.js → a232d05c0a055f398c6e.js} +1 -1
- package/assets/esri/core/workers/chunks/a508104179e08f0f268c.js +2 -0
- package/assets/esri/core/workers/chunks/{4baf66314f82cfa76beb.js → adfa5c136c72c1e65770.js} +1 -1
- package/assets/esri/core/workers/chunks/{004af103a94d21cb4889.js → aefeb5a17bb481c95da3.js} +1 -1
- package/assets/esri/core/workers/chunks/{164ee62f2211987ad850.js → bb8d596f15fd3a0d783a.js} +1 -1
- package/assets/esri/core/workers/chunks/bea2fd831d7a864e5995.js +596 -0
- package/assets/esri/core/workers/chunks/{3cf77b7a61f78f9bcd62.js → ceff78c9e31e3572a082.js} +1 -1
- package/assets/esri/core/workers/chunks/{5cc38ac051d3d0557920.js → cfaa6e205bfc0c94a1b1.js} +1 -1
- package/assets/esri/core/workers/chunks/d5ad036d282df54b9ddc.js +1 -0
- package/assets/esri/core/workers/chunks/{475394218caaa4cd3e86.js → d7e7f3efd1d28617b808.js} +1 -1
- package/assets/esri/core/workers/chunks/{f37e4ae0e9be80210db0.js → f2c11f54255fd506655e.js} +1 -1
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/chunks/ComponentShader.glsl.js +3 -3
- package/chunks/index.js +1 -1
- package/config.js +1 -1
- package/interfaces.d.ts +7 -0
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/package.json +2 -2
- package/support/revision.js +1 -1
- package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/TextureBackedBufferFields.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/VertexPosition.glsl.js +22 -16
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizer.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferFieldCreation.js +1 -1
- package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBuffer.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodResources.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultBufferWriter.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/internal/bufferWriterUtils.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/TextureBufferCache.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineLayouts.js +2 -0
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
- package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +64 -0
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.js +2 -0
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +3 -0
- package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +2 -1
- package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
- package/widgets/BatchAttributeForm/inputs/support/inputUtils.js +1 -1
- package/widgets/BatchAttributeForm/inputs/types.d.ts +4 -2
- package/assets/esri/core/workers/chunks/3e72bd6dbfc52d956c06.js +0 -1
- package/assets/esri/core/workers/chunks/a429355534bf6cbd8304.js +0 -1
- package/assets/esri/core/workers/chunks/d00dddc3881fa29446e1.js +0 -1
- package/assets/esri/core/workers/chunks/f9fe3c9867b0bdb2aec6.js +0 -596
- package/assets/esri/core/workers/chunks/fe30e61652716fcccf16.js +0 -2
- /package/assets/esri/core/workers/chunks/{defac06f9e2b43090677.js.LICENSE.txt → 73af4c947e8151d411c1.js.LICENSE.txt} +0 -0
- /package/assets/esri/core/workers/chunks/{fe30e61652716fcccf16.js.LICENSE.txt → a508104179e08f0f268c.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636],{69052(t,e,s){s.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var r=s(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,s=!1){return i(this.range,this.min,this.max,t,e,s)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,s){return t<e?e:e+a(this.range,t-e,s)}minimalMonotonic(t,e,s){return i(this.range,t,t+this.range,e,s)}center(t,e,s){return e=this.monotonic(t,e,s),this.normalize((t+e)/2,s)}diff(t,e,s){return this.monotonic(t,e,s)-t}shortestSignedDiff(t,e){t=this.normalize(t);const s=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(s)<Math.abs(r)?s:r}contains(t,e,s){return e=this.minimalMonotonic(t,e),(s=this.minimalMonotonic(t,s))>t&&s<e}}function i(t,e,s,r,n=0,i=!1){return(r-=n)<e?r+=a(t,e-r):r>s&&(r-=a(t,r-s)),i&&r===s&&(r=e),r+n}function a(t,e,s=0){return Math.ceil((e-s)/t)*t+s}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,s){function r(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}s.d(e,{o8:()=>n,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:r,fromValues:function(t,e,s,r){return[t,e,s,r]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,s){s.d(e,{A6:()=>y,Xd:()=>l,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>F,x8:()=>c});var r=s(29242),n=s(82534),i=s(51850),a=s(34304),o=s(35522),u=s(78955);function c(t,e,s){s*=.5;const r=Math.sin(s);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(s),t}function l(t,e){const s=2*Math.acos(e[3]),r=Math.sin(s/2);return r>(0,a.FD)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),s}function p(t,e,s){const r=e[0],n=e[1],i=e[2],a=e[3],o=s[0],u=s[1],c=s[2],l=s[3];return t[0]=r*l+a*o+n*c-i*u,t[1]=n*l+a*u+i*o-r*c,t[2]=i*l+a*c+r*u-n*o,t[3]=a*l-r*o-n*u-i*c,t}function h(t,e,s,r){const n=e[0],i=e[1],o=e[2],u=e[3];let c,l,p,h,d,f=s[0],y=s[1],m=s[2],g=s[3];return l=n*f+i*y+o*m+u*g,l<0&&(l=-l,f=-f,y=-y,m=-m,g=-g),1-l>(0,a.FD)()?(c=Math.acos(l),p=Math.sin(c),h=Math.sin((1-r)*c)/p,d=Math.sin(r*c)/p):(h=1-r,d=r),t[0]=h*n+d*f,t[1]=h*i+d*y,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function f(t,e){const s=e[0]+e[4]+e[8];let r;if(s>0)r=Math.sqrt(s+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);const n=(s+1)%3,i=(s+2)%3;r=Math.sqrt(e[3*s+s]-e[3*n+n]-e[3*i+i]+1),t[s]=.5*r,r=.5/r,t[3]=(e[3*n+i]-e[3*i+n])*r,t[n]=(e[3*n+s]+e[3*s+n])*r,t[i]=(e[3*i+s]+e[3*s+i])*r}return t}function y(t,e,s,r){const n=.5*Math.PI/180;e*=n,s*=n,r*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(s),u=Math.cos(s),c=Math.sin(r),l=Math.cos(r);return t[0]=i*u*l-a*o*c,t[1]=a*o*l+i*u*c,t[2]=a*u*c-i*o*l,t[3]=a*u*l+i*o*c,t}const m=u.C,g=u.hZ,S=u.WQ,v=p,b=u.hs,A=u.Om,x=u.Cc,_=u.Bw,M=_,w=u.m3,R=w,q=u.S8,F=u.t2,I=u.aI,E=(0,i.vt)(),C=(0,i.fA)(1,0,0),O=(0,i.fA)(0,1,0),P=(0,n.vt)(),T=(0,n.vt)(),N=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:S,calculateW:function(t,e){const s=e[0],r=e[1],n=e[2];return t[0]=s,t[1]=r,t[2]=n,t[3]=Math.sqrt(Math.abs(1-s*s-r*r-n*n)),t},conjugate:d,copy:m,dot:A,equals:I,exactEquals:F,fromEuler:y,fromMat3:f,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const s=e[0],r=e[1],n=e[2],i=e[3],a=s*s+r*r+n*n+i*i,o=a?1/a:0;return t[0]=-s*o,t[1]=-r*o,t[2]=-n*o,t[3]=i*o,t},len:M,length:_,lerp:x,mul:v,multiply:p,normalize:q,random:function(t){const e=a.Ov,s=e(),r=e(),n=e(),i=Math.sqrt(1-s),o=Math.sqrt(s);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-r*o,t},rotateY:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u-i*o,t[1]=n*u+a*o,t[2]=i*u+r*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+n*o,t[1]=n*u-r*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,s){const r=(0,o.Om)(e,s);return r<-.999999?((0,o.$A)(E,C,e),(0,o.Il)(E)<1e-6&&(0,o.$A)(E,O,e),(0,o.S8)(E,E),c(t,E,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(E,e,s),t[0]=E[0],t[1]=E[1],t[2]=E[2],t[3]=1+r,q(t,t))},scale:b,set:g,setAxes:function(t,e,s,r){const n=N;return n[0]=s[0],n[3]=s[1],n[6]=s[2],n[1]=r[0],n[4]=r[1],n[7]=r[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],q(t,f(t,n))},setAxisAngle:c,slerp:h,sqlerp:function(t,e,s,r,n,i){return h(P,e,n,i),h(T,s,r,i),h(t,P,T,2*i*(1-i)),t},sqrLen:R,squaredLength:w,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},56512(t,e,s){function r(t){let e,s,r=[],n=!1;return function(...i){return n&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;++s)if(t[s]!==e[s])return!1;return!0}(i,r)||(s=t.apply(this,i),e=this,r=i,n=!0),s}}s.d(e,{B:()=>r})},69397(t,e,s){s.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>l});var r=s(34275);const n=16;function i(t){if(!t)return 0;let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return c(t,8);let s=p;for(let r=0;r<e;r++)s+=o(t[r]);return s}(t);let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+h:Array.isArray(e)?c(e,n):0:0),0)}function c(t,e){return p+t.length*e}const l=32,p=16,h=145,d=64},95696(t,e,s){s.d(e,{A:()=>c});var r,n=s(5482),i=s(69540),a=s(25482),o=s(91429),u=s(93223);let c=class extends((0,i.OU)(a.o)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=r=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},18251(t,e,s){s.r(e),s.d(e,{default:()=>c});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(51850),u=s(93223);let c=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,r.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],c)},73836(t,e,s){s.d(e,{A:()=>d});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(58083),u=s(9093),c=s(67026),l=s(82534),p=s(51850),h=s(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,c.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,f,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.t2)(this.localMatrix,t.localMatrix)}};(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,r.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const f=(0,l.vt)()},24770(t,e,s){s.d(e,{$I:()=>g,AU:()=>f,Cr:()=>p,g7:()=>m,i4:()=>l,ui:()=>h,up:()=>v,vt:()=>c,yo:()=>y});var r=s(34727),n=s(58083),i=s(67026),a=s(82534),o=s(35522),u=s(51850);function c(t=v){return[t[0],t[1],t[2],t[3]]}function l(t,e,s=c()){return(0,o.C)(s,t),s[3]=e,s}function p(t,e,s){return(0,o.$A)(s,t,e),(0,o.S8)(s,s),s[3]=-(0,o.g7)(t,e),s}function h(t,e=c()){const s=(0,n.l)(b,t);return S(e,(0,r.KJ)((0,i.Xd)(e,s))),e}function d(t,e,s=c()){return(0,i.x8)(b,t,g(t)),(0,i.x8)(A,e,g(e)),(0,i.lw)(b,A,b),S(s,(0,r.KJ)((0,i.Xd)(s,b)))}function f(t,e,s,r=c()){return l(u.Cw,t,x),l(u.JP,e,_),l(u.Cb,s,M),d(x,_,x),d(x,M,r),r}function y(t){return t}function m(t){return t[3]}function g(t){return(0,r.kU)(t[3])}function S(t,e){return t[3]=e,t}const v=[0,0,1,0],b=(0,a.vt)(),A=(0,a.vt)(),x=(c(),c()),_=c(),M=c()},31411(t,e,s){s.d(e,{GS:()=>M,gh:()=>R});var r=s(49186),n=s(56512),i=s(65864),a=s(4305),o=s(50954),u=s(52006),c=s(49663),l=s(46068),p=s(15507);const h=1e-6,d=[0,0];function f(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class y{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:s,maxSegmentsPerCurve:r,minSegmentsPerCurve:n}){const i=s*s,a=e*e,o=1/r,u=this.interpolate(0),c=this.interpolate(1);(0,p.kb)(this.curveStart,u)>h&&t.push(u),this.initialize(u,c);const l=1/n;for(let t=n-1;t>0;t--){const e=t*l;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===i||!isFinite(i)||(0,p.kb)(this.arcStart,this.arcEnd)<i)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,p.kb)(this.curveEnd,c)>h&&t.push([...this.curveEnd]),t}}class m extends y{constructor(t,e){const[s,r,n]=e.b;super(t,s),this._controlPointsStack=[],this._curveControlPoints=[r,n],this._arcControlPoints=[r,n],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:s,tStart:r,tEnd:n}=this,[i,a]=this._arcControlPoints,o=(t-r)/(n-r),u=(0,p.RS)([],e,i,o),c=(0,p.RS)(d,i,a,o),l=(0,p.RS)([],a,s,o),h=(0,p.RS)([],u,c,o),f=(0,p.RS)([],c,l,o),y=(0,p.RS)([],h,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,l]),this.tEndStack.push(t),this.arcEndStack.push(y),this._arcControlPoints[0]=u,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:s}=this,[r,n]=this._curveControlPoints;return(0,a.B4)(e,r,n,s,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[s,r]=this._arcControlPoints;return Math.max((0,p.yE)(s,t,e),(0,p.yE)(r,t,e))}}class g extends y{constructor(t,e){const[s]=e.a;super(t,s),this._derivedEllipse=(0,l.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,l.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,p.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function S(t,e,s,{cx:r,cy:n,radius:i,thetaStart:a,thetaEnd:o,isInvalid:u},{maxDeviation:c,maxSegmentLength:l,maxSegmentsPerCurve:d,minSegmentsPerCurve:f}){if(u)return t.push([...s]),t;const y=2*i,m=[r+i*Math.cos(a),n+i*Math.sin(a)],g=[r+i*Math.cos(o),n+i*Math.sin(o)];(0,p.kb)(e,m)>h&&t.push(m);const S=Math.abs(o-a),v=l>0&&l<y?2*Math.asin(l/y):S,b=c>0&&c<=i?2*Math.acos(1-c/i):S,A=Math.min(v,b),x=Math.min(d,Math.max(f,Math.ceil(Math.abs(S/A)))),_=1/x;for(let e=1;e<x;e++){const s=e*_,u=a*(1-s)+o*s;t.push([r+i*Math.cos(u),n+i*Math.sin(u)])}return t.push(g),(0,p.kb)(s,g)>h&&t.push([...s]),t}function v(t,e,s,r){return new m(e,s).densify(t,r)}function b(t,e,s,r){const n=(0,o.pM)(e,s),[i]=s.c;return S(t,e,i,n,r)}function A(t,e,s,r){const n=(0,c.io)(e,s),[i]=s.a;return S(t,e,i,n,r)}function x(t,e,s,r){const[n,i,a,o,u,c,l]=s.a;return 0===c||0===l?(t.push([...n]),t):new g(e,s).densify(t,r)}function _(t,e,s,r){return(0,u.Xq)(s)?(t.push([...s]),t):(0,u.n1)(s)?v(t,e,s,r):(0,u.aO)(s)?b(t,e,s,r):(0,u.DA)(s)?A(t,e,s,r):x(t,e,s,r)}function M(t,e={}){if(!(0,u.Ed)(t))return t;const s=f(e),r=(0,u.FD)(t),n=[];for(const t of r){const e=[];for(let r=0;r<t.length-1;r++){const n=r+1,i=[...(0,u.yP)(t[r])];0===r&&e.push(i),_(e,i,t[n],s)}n.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:n,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:n,spatialReference:t.spatialReference}}const w=(0,n.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function R(t,e,n){const a=new Set(e);return await async function(t,e,n){let i=null;for(const a of t)if(a&&(0,u.Ed)(a)&&null==a.spatialReference.xyTolerance&&(0,u.V8)(a,e)){const t=a.spatialReference;if(!t)throw new r.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=q(t);if(n.has(e))a.spatialReference=n.get(e);else{i||(i=await Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6312)]).then(s.bind(s,78125)));const o=i.fromSpatialReference(t),u=o?.getTolerance();if(null==u)throw new r.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=a.spatialReference.clone();c.read({xyTolerance:u}),a.spatialReference=c,n.set(e,c)}}}(t,a,n),t.map(t=>{if(!t||!(0,u.Ed)(t))return t;const s=t.spatialReference.xyTolerance;if(null==s)return t;const r=w(s);return(0,i.rS)(function(t,e,s){if(!(0,u.Ed)(t))return t;const r=new Set(e),n=f(s),i=(0,u.FD)(t),a=[];let o=!1;for(const t of i){const e=[];for(let s=0;s<t.length-1;s++){const i=s+1,a=[...(0,u.yP)(t[s])];0===s&&e.push(a);const c=t[i];(0,u.Xq)(c)?e.push([...c]):(0,u.n1)(c)&&!r.has("cubic-bezier")?v(e,a,c,n):(0,u.aO)(c)&&!r.has("circular-arc")?b(e,a,c,n):(0,u.DA)(c)&&!r.has("elliptic-arc")?A(e,a,c,n):(0,u.wY)(c)&&!r.has("elliptic-arc")?x(e,a,c,n):(e.push((0,u.tk)(c)),o=!0)}a.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...o?{curvePaths:a}:{paths:a}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...o?{curveRings:a}:{rings:a}}}(t,e,r))})}function q(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},63579(t,e,s){s.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>y,in:()=>f,yr:()=>c});var r=s(11254),n=s(4576),i=s(17676),a=s(20557);class o{constructor(t,e,s){this.assetName=t,this.assetMimeType=e,this.parts=s}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const s=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(s)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function c(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const l=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:s}=t;return l.test(e)||p.test(s)}return l.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:s}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(s,e)}function f(t,e){if(t===e)return!0;const{source:s}=t,{source:r}=e;if(s===r)return!0;if("service"===s.type&&"service"===r.type){if(s.assets.length!==r.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...s.assets].sort(t),n=[...r.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function y(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,s){s.d(e,{CK:()=>u,Hq:()=>o,MW:()=>c,TE:()=>l,yJ:()=>p});var r=s(35522),n=s(86738),i=s(95696),a=s(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function c(t,e){if(!o(t))return null;const[s,r,i]=t.origin;return new n.A({x:s,y:r,z:i,spatialReference:e})}function l(t,e){const{x:s,y:r,z:n,spatialReference:o}=t,u=[s,r,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,r.t2)(t.origin,e.origin))}},17136(t,e,s){s.d(e,{Y_:()=>E,O7:()=>F,el:()=>q});var r=s(92602),n=s(69052),i=s(49186),a=s(53966),o=s(39829),u=s(82799),c=s(16930),l=s(80754),p=s(21325),h=s(28735),d=s(52006),f=s(31411),y=s(11254),m=s(60408),g=s(65864),S=s(2272),v=s(84952),b=s(92300);const A=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function x(t){return"polygon"===t[0].type}function _(t){return"polyline"===t[0].type}function M(t,e,s){const r=1e6;if(e){const e=(0,d.Ed)(t)?(0,f.GS)(t,{maxSegmentLength:r}):function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw A().error(t),new i.A("internal:geometry",t)}const s=(0,l.r8)(t),r=[];for(const t of s){const s=[];r.push(s),s.push([t[0][0],t[0][1]]);for(let r=0;r<t.length-1;r++){const n=t[r][0],i=t[r][1],a=t[r+1][0],o=t[r+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),c=(o-i)/u,l=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const r=t*e,a=l*r+n,o=c*r+i;s.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,r=l*t+n,a=c*t+i;s.push([r,a])}s.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:r,spatialReference:t.spatialReference}):new u.A({paths:r,spatialReference:t.spatialReference})}(t,r);t=(0,h.ci)(e,!0)}return s&&(t=(0,l.kS)(t,s)),t}function w(t,e,s){if(Array.isArray(t)){const r=t[0];if(r>e){const s=(0,l.kd)(r,e);t[0]=r+s*(-2*e)}else if(r<s){const e=(0,l.kd)(r,s);t[0]=r+e*(-2*s)}}else{const r=t.x;if(r>e){const s=(0,l.kd)(r,e);t=t.clone().offset(s*(-2*e),0)}else if(r<s){const e=(0,l.kd)(r,s);t=t.clone().offset(e*(-2*s),0)}}return t}function R(t,e){let s=-1;for(let r=0;r<e.cutIndexes.length;r++){const n=e.cutIndexes[r],i=e.geometries[r],a=(0,l.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const r=e[t][0];s=r>s?r:s}s=Number(s.toFixed(9));const r=-360*(0,l.kd)(s,180);for(let s=0;s<e.length;s++){const e=i.getPoint(t,s);i.setPoint(t,s,e.clone().offset(r,0))}return!0}})}if(n===s){if(x(t))for(const e of(0,l.r8)(i))t[n]=t[n].addRing(e);else if(_(t))for(const e of(0,l.r8)(i))t[n]=t[n].addPath(e)}else s=n,t[n]=i}return t}async function q(t,e,s){if(!Array.isArray(t))return q([t],e);e&&"string"!=typeof e&&A().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??r.A.geometryServiceUrl;let i,a,c,d,f,x,_,F,I=0;const E=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),c=i.isWebMercator,x=c?102100:4326,d=l.j7[x].maxX,f=l.j7[x].minX,_=l.j7[x].plus180Line,F=l.j7[x].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(w(e.clone(),d,f));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>w(t,d,f)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,s=(0,l.kd)(t.xmin,f)*(2*d);let r=0===s?e.clone():(0,l.kS)(e.clone(),s);t.offset(s,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(_)&&i!==d?(I=i>I?i:I,r=M(r,c),E.push(r),C.push("cut")):t.intersects(F)&&n!==f?(I=i*(2*d)>I?i*(2*d):I,r=M(r,c,360),E.push(r),C.push("cut")):C.push(r)}else C.push(e.clone());else C.push(e);else C.push(e);let O=(0,l.kd)(I,d),P=-90;const T=O,N=new u.A;for(;O>0;){const t=360*O-180;N.addPath([[t,P],[t,-1*P]]),P*=-1,O--}if(E.length>0&&T>0){const e=R(E,await async function(t,e,s,r){const n=(0,S.Dl)(t),i=e[0].spatialReference,a={...r,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,m.$B)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},o=await(0,y.A)(n.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map(t=>{const e=(0,g.rS)(t);return e.spatialReference=i,e})}}(n,E,N,s)),r=[],i=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(r.push(n),i.push("simplify")):i.push(c?(0,h.Gh)(n):n)}}if(!r.length)return i;const a=await async function(t,e,s){const r="string"==typeof t?(0,v.An)(t):t,n=e[0].spatialReference,i=(0,m.$B)(e[0]),a={...s,query:{...r.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,b.X)(e))}},{data:o}=await(0,y.A)(r.path+"/simplify",a);return(0,b.V)(o.geometries,i,n)}(n,r,s),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(c?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=E.shift();D.push(!0===c?(0,h.Gh)(t):t)}}return D}function F(t,e,s){const r=(0,p.Vp)(s);if(null==r)return t;const[n,i]=r.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let c=t+(o-u)*a;const l=c-e;return l>i?c-=a:l<n&&(c+=a),c}function I(t){const e=(0,p.Vp)(t);if(null==e)return null;const[s,r]=e.valid;return new n.hr(s,r)}const E=I(c.A.WGS84);I(c.A.WebMercator)},80754(t,e,s){s.d(e,{j7:()=>o,kS:()=>c,kd:()=>u,r8:()=>l});var r=s(82799),n=s(16930),i=s(60408),a=s(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function u(t,e){return Math.ceil((t-e)/(2*e))}function c(t,e){if((0,a.Ed)(t))for(const s of function(t){return(0,i.Bi)(t)?t.curveRings:t.curvePaths}(t))for(const t of s){if((0,a.aO)(t)){const[s,r]=t.c;s[0]+=e,r[0]+=e;continue}if((0,a.FG)(t)){const[s,r]=t.a;s[0]+=e,r[0]+=e;continue}if((0,a.n1)(t)){const[s,r,n]=t.b;s[0]+=e,r[0]+=e,n[0]+=e;continue}t[0]+=e}for(const s of l(t))for(const t of s)t[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,s){s.d(e,{F:()=>r,P:()=>n});const r={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsAggregateIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,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},n={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(t,e,s){s.r(e),s.d(e,{default:()=>Y});var r=s(5482),n=s(92602),i=s(11254),a=s(4576),o=s(49186),u=s(44208),c=s(66552),l=s(92474),p=s(53966),h=s(93637),d=s(17676),f=s(36708),y=s(84952),m=s(13069),g=s(91429),S=s(5443),v=s(16930),b=s(95696),A=s(27615),x=s(63579),_=s(52106),M=s(86211);function w(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function R(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function q(t){return t.every(R)}var F=s(91218),I=s(65864),E=s(73836),C=s(21325);async function O(t,e,s){const{geometry:r}=e,n={...e.attributes};if(null!=s&&"mesh"===r?.type){const{transformFieldRoles:e}=s,{origin:i,spatialReference:a,vertexSpace:o}=r,u=r.transform??new E.A,c="local"===o.type,l=t.spatialReference,p=l.isGeographic,h=(0,C.aI)(l,a),d=(0,F.isEqualBaseGCS)(a,l)&&(0,F.canProjectWithoutEngine)(a,l);if(!(c&&p&&d||!c&&!p&&h))return null;const f=(0,F.projectWithoutEngine)(i,a,l);if(null==f)return null;if(n[e.originX]=f.x,n[e.originY]=f.y,n[e.originZ]=f.z??0,null!=u){const{translation:t,scale:s,rotation:r}=u,i=c?1:(0,M.KX)(a)/(0,M.KX)(l);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=s[0],n[e.scaleY]=s[2],n[e.scaleZ]=s[1],n[e.rotationX]=r[0],n[e.rotationY]=r[2],n[e.rotationZ]=-r[1],n[e.rotationDeg]=r[3]}return{attributes:n}}return null==r?{attributes:n}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:n}}async function P(t,e){const s=await Promise.all((e.addAttachments??[]).map(e=>T(t,e))),r=await Promise.all((e.updateAttachments??[]).map(e=>T(t,e))),n=e.deleteAttachments??[];return s.length||r.length||n.length?{adds:s,updates:r,deletes:[...n]}:null}async function T(t,e){const{feature:s,attachment:r}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=r,c={globalId:n};if(s&&("attributes"in s?c.parentGlobalId=s.attributes?.[t.globalIdField]:s.globalId&&(c.parentGlobalId=s.globalId)),u)c.uploadId=u;else if(o){const t=await(0,y._0)(o);t&&(c.contentType=t.mediaType,c.data=t.data),o instanceof File&&(c.name=o.name)}return i&&(c.name=i),a&&(c.contentType=a),c}function N(t,e,s){if(!e||0===e.length)return[];if(s&&q(e))return e.map(t=>t.globalId);if(function(t){return t.every(w)}(e))return e.map(t=>t.objectId);const r=s?t.globalIdField:t.objectIdField;return r?e.map(t=>t.getAttribute(r)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function k(t,e){return new _.A({attributes:t.attributes,geometry:(0,I.rS)({...t.geometry,spatialReference:e})})}function Z(t,e){return{adds:t?.adds?.map(t=>k(t,e))||[],updates:t?.updates?.map(t=>({original:k(t[0],e),current:k(t[1],e)}))||[],deletes:t?.deletes?.map(t=>k(t,e))||[],spatialReference:e}}var Q=s(64714),j=s(64314),J=s(60694),V=s(15426),U=s(20557),G=s(99199),B=s(96520),X=s(61956),z=s(79677),L=s(20816);const $=new c.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new c.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends l.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,s=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(s),Promise.resolve(this)}initialize(){this.addHandles([(0,f.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:s,spatialReference:r,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,c=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,l=c&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new j.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:s,infoFor3D:a,pbfSupported:c,pbfSupportedWithCurves:l,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:r,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}async updateAttachment(t,e,s){await this.load();const{layer:r}=this;await(0,V.VA)(r,"editing");const n=t.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(s,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r="infoFor3D"in s?s.infoFor3D:null,n=null!=r,u=n||(e?.globalIdUsed??!1),c=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,l=t.addFeatures?.map(t=>O(this.layer,t,r))??[],p=(await Promise.all(l)).filter(a.Ru),h=t.updateFeatures?.map(t=>O(this.layer,t,r))??[],d=(await Promise.all(h)).filter(a.Ru),f=N(this.layer,t.deleteFeatures,u);(0,B.u)(p,d,s.spatialReference);const y=await P(this.layer,t),m=s.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||s.gdbVersion,S={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const v=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(s.url,g,s.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(S.edits=JSON.stringify([{id:s.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:f.length?f:null,attachments:y,assetMaps:c}]),S.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),S.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(S.adds=p.length?JSON.stringify(p):null,S.updates=d.length?JSON.stringify(d):null,S.deletes=f.length?u?JSON.stringify(f):f.join(","):null,S.attachments=y&&JSON.stringify(y),S.assetMaps=null!=c?JSON.stringify(c):void 0);const b=this._getLayerRequestOptions({method:"post",query:S});v&&(b.authMode="immediate",b.query.returnEditMoment=!0,b.query.sessionId=L.TA);const A=e?.returnServiceEditsOption?s.url:s.parsedUrl.path;let x;try{x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}catch(t){if(!function(t){const e=t.details.raw,s=+e.code,r=+e.extendedCode;return 500===s&&(-2147217144===r||-2147467261===r)}(t))throw t;b.authMode="immediate",x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}return this._createEditsResult(x)}async deleteAttachments(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(r,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:s,url:r}=this.layer,{data:n}=await(0,i.A)(`${r}/${s}`,e),{id:a,extent:o,fullExtent:u,timeExtent:c}=n,l=o||u;return{id:a,fullExtent:l&&S.A.fromJSON(l),timeExtent:c&&z.A.fromJSON({start:c[0],end:c[1]})}})}async queryAttachments(t,e={}){await this.load();const s=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,s)}async queryFeatures(t,e){await this.load();const s=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&s.features.length){const e=new Map;if(s.features.forEach(s=>{const r=s.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const s=t.toLowerCase();s&&s in r&&t!==s&&(r[t]=r[s],delete r[s],e.set(s,t))}})}),null!=s.fields)for(const t of s.fields){const s=e.get(t.name.toLowerCase());null!=s&&(t.name=s)}}return s}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,J.Wo)(this.layer.url))return"unavailable";const t=(0,y.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:r}=await s.e(1384).then(s.bind(s,31384));return r(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const s=e.url;null!=s&&("layerId"in e&&(0,y.fj)(s,e.layerId.toString()),this._getOrCreateEditInterceptor(s).before=e=>{const s=e.requestOptions.method??"auto";if("auto"===s||"head"===s){const s=e.requestOptions.query??{};s._ts=t.getTime(),e.requestOptions.query=s}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const s=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(s,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.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(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const s={};(0,u.A)("featurelayer-advanced-symbols")&&(s.returnAdvancedSymbols=!0),e?.cacheBust&&(s._ts=Date.now());const{data:r}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:s,signal:e?.signal}));t=r}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const s=t.type;if(!this.supportedSourceTypes.has(s))throw new o.A("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,Q.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:s}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));s.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:s.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const r=t.addFeatures.filter(t=>t.geometry);if(e.length!==r.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:r}=e;if((0,A.Hq)(r))n.push(e);else{const r=e.origin,{convertMeshVertexSpace:a}=await s.e(8846).then(s.bind(s,28846)),o=await a(e,new b.A({origin:[r.x,r.y,r.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,s=this.layer.globalIdField,r=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(r),o=n.getAttribute(s);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(x.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:s}=this.layer,r=[];let n=null;if(Array.isArray(e))for(const t of e)r.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===s&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const s=t?.attachments,r={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:s?.addResults?s.addResults.map(D):[],updateAttachmentResults:s?.updateResults?s.updateResults.map(D):[],deleteAttachmentResults:s?.deleteResults?s.deleteResults.map(D):[]};return t?.editMoment&&(r.editMoment=t.editMoment),r}(n);if(r.length>0){i.editedFeatureResults=[];for(const t of r){const{editedFeatures:e}=t,s=e?.spatialReference?new v.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:Z(e,s)})}}return i}_createAttachmentErrorResult(t,e){const s=e.details.messages?.[0]||e.message,r=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(t,e){const s=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(s)for(const t in e){const r=e[t];null!=r&&(s.set?s.set(t,r):s.append(t,r))}return s}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:s,gdbVersion:r}}=this;return{...t,query:{gdbVersion:r,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...s.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:s,parsedUrl:r}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==s)return!1;const i=(0,U.JZ)(n);if(null==i)return!1;const o=(0,y.fj)(r.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(r).length>0))return!1;u.push(e)}const c=u.map(t=>t.getAttribute(s)).filter(a.Ru);if(0===c.length)return!1;const{assetMapFieldRoles:{parentGlobalId:l,assetHash:p}}=n,h=new X.A({where:`${l} IN (${c.map(t=>`'${t}'`)})`,outFields:[p,l],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:f}=d;return 0!==f.length&&!u.some(t=>{const e=t.getAttribute(s);if(!e)return!0;const{metadata:n}=t.geometry,i=f.filter(t=>t.getAttribute(l)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(r).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,r.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,r.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,s){s.d(e,{A:()=>w});var r=s(5482),n=s(69622),i=s(49186),a=s(44208),o=s(17676),u=s(84952),c=s(91429),l=s(21325),p=s(20557),h=s(2272),d=s(65615),f=s(20615),y=s(74910),m=s(78286),g=s(99199),S=s(62815),v=s(63746);class b{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=b._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(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t)}feature(){this._attributesClass??=(0,v._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,s){this._previousX=this._previousY=0,this._lengths=s;let r,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=b._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},r=this._point,this._finishVertex=n?i?b._finishVertexPointXYZM:b._finishVertexPointXYZ:i?b._finishVertexPointXYM:b._finishVertexPointXY;break;case"esriGeometryMultipoint":r={points:[],hasZ:n,hasM:i},this._part=r.points,this._parts=[];break;case"esriGeometryPolyline":r={paths:[],hasZ:n,hasM:i},this._parts=r.paths,this._part=[];break;case"esriGeometryPolygon":r={rings:[],hasZ:n,hasM:i},this._parts=r.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=r,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=r}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,s,r){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,s,r){this._part.push({b:[this._transform(e),this._transformXY(s),this._transformXY(r)]})}circularArcSegment(t,e,s){this._part.push({c:[this._transform(e),this._transformXY(s)]})}ellipticArcSegment(t,e,s,r,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(s),r,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:s,_lengths:r,_vertex:n}=t;e.push([...n]),e.length<r[s.length]||(t._previousX=t._previousY=0,t._part=[],s.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,n=s?(0,S.d)(t,e):1;this._transformInPlace??=(0,v.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,v.Mv)({transform:r})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var A=s(80893),x=s(22671),_=s(61956);async function M(t,e,s,r){const n=(0,h.Dl)(t),i={...s},a=_.A.from(e),o=!a.quantizationParameters;return await(0,A.IJ)(n,a,new b({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,r)}let w=class extends n.A{constructor(t){super(t),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(t,e){const s=await this.executeJSON(t,e);return this.featureSetFromJSON(t,s,e)}async executeJSON(t,e){const s=this._normalizeQuery(t),r=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!r||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await M(this.url,s,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,s,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,r){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return x.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([s.e(1843),s.e(7005),s.e(5408),s.e(7634),s.e(8883)]).then(s.bind(s,40050)),r);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,f.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,y.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:r},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:r},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:r,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(s.e(9239).then(s.bind(s,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?r(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:r}=await(0,o.qr)(s.e(3103).then(s.bind(s,33103)),e);return r(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:r}=await(0,o.qr)(s.e(566).then(s.bind(s,80566)),e);return r(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:r}=await(0,o.qr)(s.e(1273).then(s.bind(s,11273)),e);return r(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:r}=await(0,o.qr)(s.e(1277).then(s.bind(s,21277)),e);return r(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:r}=await(0,o.qr)(s.e(8018).then(s.bind(s,8018)),e);return r(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:r}=await(0,o.qr)(s.e(980).then(s.bind(s,10980)),e);return r(this.parsedUrl,t,e)}_normalizeQuery(t){let e=_.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:s}=this,r=this._queryGet3DObjectFormat(t);if(null!=s&&r){if(e=e===t?e.clone():e,e.formatOf3DObjects=r,e.outSpatialReference&&!(0,l.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:r,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:c,scaleY:l,scaleZ:p,rotationX:h,rotationY:d,rotationZ:f,rotationDeg:y}=s.transformFieldRoles;e.outFields.push(r,n,i,a,o,u,c,l,p,h,d,f,y)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:s}){return!0!==t||"xyFootprint"===e||s?null:(0,p.Hz)(this.infoFor3D)}};(0,r.Cg)([(0,c.MZ)({type:d.A})],w.prototype,"dynamicDataSource",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"gdbVersion",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"infoFor3D",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupportedWithCurves",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"queryAttachmentsSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"relativeTimeBinWindow",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"sourceSpatialReference",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"uniqueIdFields",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],w.prototype,"url",void 0),w=(0,r.Cg)([(0,c.$K)("esri.layers.graphics.sources.support.QueryTask")],w)},64714(t,e,s){s.d(e,{F0:()=>o,Vx:()=>l,e2:()=>h,f:()=>d});var r=s(44208),n=s(4718),i=s(99352),a=s(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let c=1;function l(t,e){if((0,r.A)("esri-csp-restrictions"))return()=>e?{[e]:null,...t}:{...t};try{let s="";e&&(s+=`this${p(e)} = null;`);for(const e in t)s+=`this${p(e)} = ${JSON.stringify(t[e])};`;const r=new Function(`\n return class AttributesClass$${c++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new r}catch(s){return()=>e?{[e]:null,...t}:{...t}}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,s){s.d(e,{V:()=>a,X:()=>i});var r=s(60408),n=s(65864);function i(t){return{geometryType:(0,r.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,s){const r=(0,n.xD)(e);return t.map(t=>{const e=r.fromJSON(t);return e.spatialReference=s,e})}},20615(t,e,s){s.d(e,{I:()=>a});var r=s(2272),n=s(80893),i=s(61956);function a(t,e,s,a){return(0,n.gW)((0,r.Dl)(t),i.A.from(e),s,a)}},74910(t,e,s){s.d(e,{L:()=>o});var r=s(5443),n=s(2272),i=s(80893),a=s(61956);async function o(t,e,s){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...s}),c=u.extent;return!c||isNaN(c.xmin)||isNaN(c.ymin)||isNaN(c.xmax)||isNaN(c.ymax)?{count:u.count,extent:null}:{count:u.count,extent:r.A.fromJSON(c)}}},78286(t,e,s){s.d(e,{V:()=>a});var r=s(2272),n=s(80893),i=s(61956);async function a(t,e,s,a){const o=(0,r.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),s,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,s){s.d(e,{e:()=>u,s:()=>o});var r=s(2272),n=s(80893),i=s(22671),a=s(61956);async function o(t,e,s,r){const n=await u(t,e,s,r);return i.A.fromJSON(n)}function u(t,e,s,i){const o=(0,r.Dl)(t),u={...s},c=a.A.from(e);return(0,n.eW)(o,c,c.sourceSpatialReference,u,i)}},63746(t,e,s){function r(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:s,hasZ:r,hasM:n}=t;if(null==s)return r&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,s,r){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*r:t),i=i.map((t,e)=>2===e?t*r:t)),!e&&s&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(s,r,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}s.d(e,{Mv:()=>n,_7:()=>r}),s(53966)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3636],{69052(t,e,s){s.d(e,{hr:()=>n,ie:()=>u,uC:()=>o});var r=s(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,s=!1){return i(this.range,this.min,this.max,t,e,s)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,s){return t<e?e:e+a(this.range,t-e,s)}minimalMonotonic(t,e,s){return i(this.range,t,t+this.range,e,s)}center(t,e,s){return e=this.monotonic(t,e,s),this.normalize((t+e)/2,s)}diff(t,e,s){return this.monotonic(t,e,s)-t}shortestSignedDiff(t,e){t=this.normalize(t);const s=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(s)<Math.abs(r)?s:r}contains(t,e,s){return e=this.minimalMonotonic(t,e),(s=this.minimalMonotonic(t,s))>t&&s<e}}function i(t,e,s,r,n=0,i=!1){return(r-=n)<e?r+=a(t,e-r):r>s&&(r-=a(t,r-s)),i&&r===s&&(r=e),r+n}function a(t,e,s=0){return Math.ceil((e-s)/t)*t+s}const o=new n(0,2*Math.PI),u=(new n(-Math.PI,Math.PI),new n(0,360))},82534(t,e,s){function r(){return[0,0,0,1]}function n(t){return[t[0],t[1],t[2],t[3]]}s.d(e,{o8:()=>n,vt:()=>r,zK:()=>i});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:i,clone:n,create:r,fromValues:function(t,e,s,r){return[t,e,s,r]}},Symbol.toStringTag,{value:"Module"}))},67026(t,e,s){s.d(e,{A6:()=>y,Xd:()=>l,Xr:()=>d,hZ:()=>g,lw:()=>p,t2:()=>F,x8:()=>c});var r=s(29242),n=s(82534),i=s(51850),a=s(34304),o=s(35522),u=s(78955);function c(t,e,s){s*=.5;const r=Math.sin(s);return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=Math.cos(s),t}function l(t,e){const s=2*Math.acos(e[3]),r=Math.sin(s/2);return r>(0,a.FD)()?(t[0]=e[0]/r,t[1]=e[1]/r,t[2]=e[2]/r):(t[0]=1,t[1]=0,t[2]=0),s}function p(t,e,s){const r=e[0],n=e[1],i=e[2],a=e[3],o=s[0],u=s[1],c=s[2],l=s[3];return t[0]=r*l+a*o+n*c-i*u,t[1]=n*l+a*u+i*o-r*c,t[2]=i*l+a*c+r*u-n*o,t[3]=a*l-r*o-n*u-i*c,t}function h(t,e,s,r){const n=e[0],i=e[1],o=e[2],u=e[3];let c,l,p,h,d,f=s[0],y=s[1],m=s[2],g=s[3];return l=n*f+i*y+o*m+u*g,l<0&&(l=-l,f=-f,y=-y,m=-m,g=-g),1-l>(0,a.FD)()?(c=Math.acos(l),p=Math.sin(c),h=Math.sin((1-r)*c)/p,d=Math.sin(r*c)/p):(h=1-r,d=r),t[0]=h*n+d*f,t[1]=h*i+d*y,t[2]=h*o+d*m,t[3]=h*u+d*g,t}function d(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t[3]=e[3],t}function f(t,e){const s=e[0]+e[4]+e[8];let r;if(s>0)r=Math.sqrt(s+1),t[3]=.5*r,r=.5/r,t[0]=(e[5]-e[7])*r,t[1]=(e[6]-e[2])*r,t[2]=(e[1]-e[3])*r;else{let s=0;e[4]>e[0]&&(s=1),e[8]>e[3*s+s]&&(s=2);const n=(s+1)%3,i=(s+2)%3;r=Math.sqrt(e[3*s+s]-e[3*n+n]-e[3*i+i]+1),t[s]=.5*r,r=.5/r,t[3]=(e[3*n+i]-e[3*i+n])*r,t[n]=(e[3*n+s]+e[3*s+n])*r,t[i]=(e[3*i+s]+e[3*s+i])*r}return t}function y(t,e,s,r){const n=.5*Math.PI/180;e*=n,s*=n,r*=n;const i=Math.sin(e),a=Math.cos(e),o=Math.sin(s),u=Math.cos(s),c=Math.sin(r),l=Math.cos(r);return t[0]=i*u*l-a*o*c,t[1]=a*o*l+i*u*c,t[2]=a*u*c-i*o*l,t[3]=a*u*l+i*o*c,t}const m=u.C,g=u.hZ,S=u.WQ,v=p,b=u.hs,A=u.Om,x=u.Cc,_=u.Bw,M=_,w=u.m3,R=w,q=u.S8,F=u.t2,I=u.aI,E=(0,i.vt)(),C=(0,i.fA)(1,0,0),O=(0,i.fA)(0,1,0),P=(0,n.vt)(),T=(0,n.vt)(),N=(0,r.vt)();Object.freeze(Object.defineProperty({__proto__:null,add:S,calculateW:function(t,e){const s=e[0],r=e[1],n=e[2];return t[0]=s,t[1]=r,t[2]=n,t[3]=Math.sqrt(Math.abs(1-s*s-r*r-n*n)),t},conjugate:d,copy:m,dot:A,equals:I,exactEquals:F,fromEuler:y,fromMat3:f,getAxisAngle:l,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},invert:function(t,e){const s=e[0],r=e[1],n=e[2],i=e[3],a=s*s+r*r+n*n+i*i,o=a?1/a:0;return t[0]=-s*o,t[1]=-r*o,t[2]=-n*o,t[3]=i*o,t},len:M,length:_,lerp:x,mul:v,multiply:p,normalize:q,random:function(t){const e=a.Ov,s=e(),r=e(),n=e(),i=Math.sqrt(1-s),o=Math.sqrt(s);return t[0]=i*Math.sin(2*Math.PI*r),t[1]=i*Math.cos(2*Math.PI*r),t[2]=o*Math.sin(2*Math.PI*n),t[3]=o*Math.cos(2*Math.PI*n),t},rotateX:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+a*o,t[1]=n*u+i*o,t[2]=i*u-n*o,t[3]=a*u-r*o,t},rotateY:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u-i*o,t[1]=n*u+a*o,t[2]=i*u+r*o,t[3]=a*u-n*o,t},rotateZ:function(t,e,s){s*=.5;const r=e[0],n=e[1],i=e[2],a=e[3],o=Math.sin(s),u=Math.cos(s);return t[0]=r*u+n*o,t[1]=n*u-r*o,t[2]=i*u+a*o,t[3]=a*u-i*o,t},rotationTo:function(t,e,s){const r=(0,o.Om)(e,s);return r<-.999999?((0,o.$A)(E,C,e),(0,o.Il)(E)<1e-6&&(0,o.$A)(E,O,e),(0,o.S8)(E,E),c(t,E,Math.PI),t):r>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,o.$A)(E,e,s),t[0]=E[0],t[1]=E[1],t[2]=E[2],t[3]=1+r,q(t,t))},scale:b,set:g,setAxes:function(t,e,s,r){const n=N;return n[0]=s[0],n[3]=s[1],n[6]=s[2],n[1]=r[0],n[4]=r[1],n[7]=r[2],n[2]=-e[0],n[5]=-e[1],n[8]=-e[2],q(t,f(t,n))},setAxisAngle:c,slerp:h,sqlerp:function(t,e,s,r,n,i){return h(P,e,n,i),h(T,s,r,i),h(t,P,T,2*i*(1-i)),t},sqrLen:R,squaredLength:w,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"}},Symbol.toStringTag,{value:"Module"}))},56512(t,e,s){function r(t){let e,s,r=[],n=!1;return function(...i){return n&&e===this&&function(t,e){if(t.length!==e.length)return!1;for(let s=0;s<t.length;++s)if(t[s]!==e[s])return!1;return!0}(i,r)||(s=t.apply(this,i),e=this,r=i,n=!0),s}}s.d(e,{B:()=>r})},69397(t,e,s){s.d(e,{Qf:()=>u,Qh:()=>a,RS:()=>n,Ul:()=>d,i5:()=>h,lM:()=>i,qK:()=>l});var r=s(34275);const n=16;function i(t){if(!t)return 0;let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s],!1));return e}function a(t){if(!t)return 0;if("number"==typeof t[0])return u(t);if(Array.isArray(t))return function(t){const e=t.length;if(0===e||"number"==typeof t[0])return c(t,8);let s=p;for(let r=0;r<e;r++)s+=o(t[r]);return s}(t);let e=l;for(const s in t)t.hasOwnProperty(s)&&(e+=o(t[s]));return e}function o(t,e=!0){switch(typeof t){case"object":return e?a(t):l;case"string":return function(t){return 32+t.length}(t);case"number":return n;case"boolean":return 4;default:return 8}}function u(...t){return t.reduce((t,e)=>t+(e?(0,r.iu)(e)?e.byteLength+h:Array.isArray(e)?c(e,n):0:0),0)}function c(t,e){return p+t.length*e}const l=32,p=16,h=145,d=64},95696(t,e,s){s.d(e,{A:()=>c});var r,n=s(5482),i=s(69540),a=s(25482),o=s(91429),u=s(93223);let c=class extends((0,i.OU)(a.o)){static{r=this}constructor(t){super(t),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,n.Cg)([(0,u.e)({georeferenced:"georeferenced"},{readOnly:!0})],c.prototype,"type",void 0),(0,n.Cg)([(0,o.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],c.prototype,"origin",void 0),c=r=(0,n.Cg)([(0,o.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],c)},18251(t,e,s){s.r(e),s.d(e,{default:()=>c});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(51850),u=s(93223);let c=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.type="local",this.origin=(0,o.vt)()}};(0,r.Cg)([(0,u.e)({local:"local"},{readOnly:!0})],c.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],c.prototype,"origin",void 0),c=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshLocalVertexSpace")],c)},73836(t,e,s){s.d(e,{A:()=>d});var r=s(5482),n=s(69540),i=s(25482),a=s(91429),o=s(58083),u=s(9093),c=s(67026),l=s(82534),p=s(51850),h=s(24770);let d=class extends((0,n.OU)(i.o)){constructor(t){super(t),this.translation=(0,p.vt)(),this.rotationAxis=(0,p.ci)(h.up),this.rotationAngle=0,this.scale=(0,p.fA)(1,1,1)}get rotation(){return(0,h.i4)(this.rotationAxis,this.rotationAngle)}set rotation(t){this.rotationAxis=(0,p.o8)((0,h.yo)(t)),this.rotationAngle=(0,h.g7)(t)}get localMatrix(){const t=(0,u.vt)();return(0,c.x8)(f,(0,h.yo)(this.rotation),(0,h.$I)(this.rotation)),(0,o.o1)(t,f,this.translation,this.scale),t}get localMatrixInverse(){return(0,o.B8)((0,u.vt)(),this.localMatrix)}equals(t){return this===t||null!=t&&(0,o.t2)(this.localMatrix,t.localMatrix)}};(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"translation",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAxis",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],d.prototype,"rotationAngle",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],d.prototype,"scale",void 0),(0,r.Cg)([(0,a.MZ)()],d.prototype,"rotation",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrix",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"localMatrixInverse",null),d=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshTransform")],d);const f=(0,l.vt)()},24770(t,e,s){s.d(e,{$I:()=>g,AU:()=>f,Cr:()=>p,g7:()=>m,i4:()=>l,ui:()=>h,up:()=>v,vt:()=>c,yo:()=>y});var r=s(34727),n=s(58083),i=s(67026),a=s(82534),o=s(35522),u=s(51850);function c(t=v){return[t[0],t[1],t[2],t[3]]}function l(t,e,s=c()){return(0,o.C)(s,t),s[3]=e,s}function p(t,e,s){return(0,o.$A)(s,t,e),(0,o.S8)(s,s),s[3]=-(0,o.g7)(t,e),s}function h(t,e=c()){const s=(0,n.l)(b,t);return S(e,(0,r.KJ)((0,i.Xd)(e,s))),e}function d(t,e,s=c()){return(0,i.x8)(b,t,g(t)),(0,i.x8)(A,e,g(e)),(0,i.lw)(b,A,b),S(s,(0,r.KJ)((0,i.Xd)(s,b)))}function f(t,e,s,r=c()){return l(u.Cw,t,x),l(u.JP,e,_),l(u.Cb,s,M),d(x,_,x),d(x,M,r),r}function y(t){return t}function m(t){return t[3]}function g(t){return(0,r.kU)(t[3])}function S(t,e){return t[3]=e,t}const v=[0,0,1,0],b=(0,a.vt)(),A=(0,a.vt)(),x=(c(),c()),_=c(),M=c()},31411(t,e,s){s.d(e,{GS:()=>M,gh:()=>R});var r=s(49186),n=s(56512),i=s(65864),a=s(4305),o=s(50954),u=s(52006),c=s(49663),l=s(46068),p=s(15507);const h=1e-6,d=[0,0];function f(t){return{maxSegmentLength:t.maxSegmentLength??0,maxDeviation:t.maxDeviation??0,maxSegmentsPerCurve:t.maxSegmentsPerCurve??12e3,minSegmentsPerCurve:Math.max(t.minSegmentsPerCurve??1,1)}}class y{constructor(t,e){this.curveStart=t,this.curveEnd=e,this.tStart=0,this.tEnd=0,this.tEndStack=[],this.arcEndStack=[]}get stackSize(){return this.tEndStack.length}initialize(t,e){this.tStart=0,this.arcStart=t,this.tEndStack.push(1),this.arcEndStack.push(e)}splitAt(t){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(t),this.arcEndStack.push(this.interpolate(t))}splitInHalf(){return this.splitAt((this.tStart+this.tEnd)/2)}pop(){this.tEnd=this.tEndStack.pop(),this.arcEnd=this.arcEndStack.pop()}next(){this.tStart=this.tEnd,this.arcStart=this.arcEnd}densify(t,{maxDeviation:e,maxSegmentLength:s,maxSegmentsPerCurve:r,minSegmentsPerCurve:n}){const i=s*s,a=e*e,o=1/r,u=this.interpolate(0),c=this.interpolate(1);(0,p.kb)(this.curveStart,u)>h&&t.push(u),this.initialize(u,c);const l=1/n;for(let t=n-1;t>0;t--){const e=t*l;this.pop(),this.splitAt(e)}for(;this.stackSize>0;)this.pop(),this.tStart===this.tEnd||this.tEnd-this.tStart<o||(0===i||!isFinite(i)||(0,p.kb)(this.arcStart,this.arcEnd)<i)&&(0===a||!isFinite(a)||this.getDeviation2()<a)?(t.push(this.arcEnd),this.next()):this.splitInHalf();return(0,p.kb)(this.curveEnd,c)>h&&t.push([...this.curveEnd]),t}}class m extends y{constructor(t,e){const[s,r,n]=e.b;super(t,s),this._controlPointsStack=[],this._curveControlPoints=[r,n],this._arcControlPoints=[r,n],this._controlPointsStack.push(this._arcControlPoints)}splitAt(t){const{arcStart:e,arcEnd:s,tStart:r,tEnd:n}=this,[i,a]=this._arcControlPoints,o=(t-r)/(n-r),u=(0,p.RS)([],e,i,o),c=(0,p.RS)(d,i,a,o),l=(0,p.RS)([],a,s,o),h=(0,p.RS)([],u,c,o),f=(0,p.RS)([],c,l,o),y=(0,p.RS)([],h,f,o);this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this._controlPointsStack.push([f,l]),this.tEndStack.push(t),this.arcEndStack.push(y),this._arcControlPoints[0]=u,this._arcControlPoints[1]=h,this._controlPointsStack.push(this._arcControlPoints)}pop(){super.pop(),this._arcControlPoints=this._controlPointsStack.pop()}interpolate(t){const{curveStart:e,curveEnd:s}=this,[r,n]=this._curveControlPoints;return(0,a.B4)(e,r,n,s,t)}getDeviation2(){const{arcStart:t,arcEnd:e}=this,[s,r]=this._arcControlPoints;return Math.max((0,p.yE)(s,t,e),(0,p.yE)(r,t,e))}}class g extends y{constructor(t,e){const[s]=e.a;super(t,s),this._derivedEllipse=(0,l.SW)(t,e)}pop(){super.pop(),this._tMid=(this.tStart+this.tEnd)/2,this._arcMid=this.interpolate(this._tMid)}splitInHalf(){this.tEndStack.push(this.tEnd),this.arcEndStack.push(this.arcEnd),this.tEndStack.push(this._tMid),this.arcEndStack.push(this._arcMid)}interpolate(t){return(0,l.Uk)(this._derivedEllipse,t)}getDeviation2(){return(0,p.yE)(this._arcMid,this.arcStart,this.arcEnd)}}function S(t,e,s,{cx:r,cy:n,radius:i,thetaStart:a,thetaEnd:o,isInvalid:u},{maxDeviation:c,maxSegmentLength:l,maxSegmentsPerCurve:d,minSegmentsPerCurve:f}){if(u)return t.push([...s]),t;const y=2*i,m=[r+i*Math.cos(a),n+i*Math.sin(a)],g=[r+i*Math.cos(o),n+i*Math.sin(o)];(0,p.kb)(e,m)>h&&t.push(m);const S=Math.abs(o-a),v=l>0&&l<y?2*Math.asin(l/y):S,b=c>0&&c<=i?2*Math.acos(1-c/i):S,A=Math.min(v,b),x=Math.min(d,Math.max(f,Math.ceil(Math.abs(S/A)))),_=1/x;for(let e=1;e<x;e++){const s=e*_,u=a*(1-s)+o*s;t.push([r+i*Math.cos(u),n+i*Math.sin(u)])}return t.push(g),(0,p.kb)(s,g)>h&&t.push([...s]),t}function v(t,e,s,r){return new m(e,s).densify(t,r)}function b(t,e,s,r){const n=(0,o.pM)(e,s),[i]=s.c;return S(t,e,i,n,r)}function A(t,e,s,r){const n=(0,c.io)(e,s),[i]=s.a;return S(t,e,i,n,r)}function x(t,e,s,r){const[n,i,a,o,u,c,l]=s.a;return 0===c||0===l?(t.push([...n]),t):new g(e,s).densify(t,r)}function _(t,e,s,r){return(0,u.Xq)(s)?(t.push([...s]),t):(0,u.n1)(s)?v(t,e,s,r):(0,u.aO)(s)?b(t,e,s,r):(0,u.DA)(s)?A(t,e,s,r):x(t,e,s,r)}function M(t,e={}){if(!(0,u.Ed)(t))return t;const s=f(e),r=(0,u.FD)(t),n=[];for(const t of r){const e=[];for(let r=0;r<t.length-1;r++){const n=r+1,i=[...(0,u.yP)(t[r])];0===r&&e.push(i),_(e,i,t[n],s)}n.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},paths:n,spatialReference:t.spatialReference}:{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},rings:n,spatialReference:t.spatialReference}}const w=(0,n.B)(t=>({maxDeviation:0,maxSegmentLength:100*t,maxSegmentsPerCurve:12e3,minSegmentsPerCurve:1}));async function R(t,e,n){const a=new Set(e);return await async function(t,e,n){let i=null;for(const a of t)if(a&&(0,u.Ed)(a)&&null==a.spatialReference.xyTolerance&&(0,u.V8)(a,e)){const t=a.spatialReference;if(!t)throw new r.A("geometry:missing-spatial-reference","Geometry contains an unsupported curve type, but it cannot be densified because it has no spatial reference.");const e=q(t);if(n.has(e))a.spatialReference=n.get(e);else{i||(i=await Promise.all([s.e(6042),s.e(1878),s.e(8885),s.e(5756),s.e(3299),s.e(6312)]).then(s.bind(s,78125)));const o=i.fromSpatialReference(t),u=o?.getTolerance();if(null==u)throw new r.A("geometry:missing-tolerance","Geometry contains an unsupported curve type, but it cannot be densified because the tolerance of its spatial reference is unknown. Set the `xyTolerance` property of the spatial reference.");const c=a.spatialReference.clone();c.read({xyTolerance:u}),a.spatialReference=c,n.set(e,c)}}}(t,a,n),t.map(t=>{if(!t||!(0,u.Ed)(t))return t;const s=t.spatialReference.xyTolerance;if(null==s)return t;const r=w(s);return(0,i.rS)(function(t,e,s){if(!(0,u.Ed)(t))return t;const r=new Set(e),n=f(s),i=(0,u.FD)(t),a=[];let o=!1;for(const t of i){const e=[];for(let s=0;s<t.length-1;s++){const i=s+1,a=[...(0,u.yP)(t[s])];0===s&&e.push(a);const c=t[i];(0,u.Xq)(c)?e.push([...c]):(0,u.n1)(c)&&!r.has("cubic-bezier")?v(e,a,c,n):(0,u.aO)(c)&&!r.has("circular-arc")?b(e,a,c,n):(0,u.DA)(c)&&!r.has("elliptic-arc")?A(e,a,c,n):(0,u.wY)(c)&&!r.has("elliptic-arc")?x(e,a,c,n):(e.push((0,u.tk)(c)),o=!0)}a.push(e)}return"curvePaths"in t?{...void 0!==t.hasZ?{hasZ:t.hasZ}:{},...void 0!==t.hasM?{hasM:t.hasM}:{},spatialReference:t.spatialReference,...o?{curvePaths:a}:{paths:a}}:{hasZ:t.hasZ,hasM:t.hasM,spatialReference:t.spatialReference,...o?{curveRings:a}:{rings:a}}}(t,e,r))})}function q(t){if(null!=t.wkid)return`${t.wkid}`;if(null!=t.wkt)return t.wkt;const e="toJSON"in t&&"function"==typeof t.toJSON?t.toJSON():t;return JSON.stringify(e)}},63579(t,e,s){s.d(e,{Bq:()=>u,Qp:()=>o,WN:()=>m,dK:()=>g,eN:()=>d,fH:()=>y,in:()=>f,yr:()=>c});var r=s(11254),n=s(4576),i=s(17676),a=s(20557);class o{constructor(t,e,s){this.assetName=t,this.assetMimeType=e,this.parts=s}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,n.aI)(this.parts,t.parts,(t,e)=>t.equals(e))}isOnService(t){return this.parts.every(e=>e.isOnService(t))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const s=await Promise.all(e.map(e=>e.toBlob(t)));return(0,i.Te)(t),new Blob(s)}}class u{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(t),e}}function c(t){return function(t){switch(t?.type){case"client":return Array.isArray(t.files)?t.files.some(h):h(t.files);case"service":return t.assets.some(h);case"loadable":return!0;default:return!1}}(t?.source)}const l=/^(model\/gltf\+json)|(model\/gltf-binary)$/,p=/\.(gltf|glb)/i;function h(t){if(t instanceof File){const{type:e,name:s}=t;return l.test(e)||p.test(s)}return l.test(t.assetMimeType)||p.test(t.assetName)}function d(t,e){if(!t)return!1;const{source:s}=t;return function(t,e){return"service"===t.type&&t.assets.every(t=>t.isOnService(e))}(s,e)}function f(t,e){if(t===e)return!0;const{source:s}=t,{source:r}=e;if(s===r)return!0;if("service"===s.type&&"service"===r.type){if(s.assets.length!==r.assets.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...s.assets].sort(t),n=[...r.assets].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(n[t]))return!1;return!0}return!1}function y(t,e){return t instanceof File?(0,a.rq)(t,e):(0,a.z$)(t.assetMimeType,t.assetName,e)}function m(t){switch(t.type){case"client":return Array.isArray(t.files)?t.files:[t.files];case"service":return t.assets;case"loadable":return}}function g(t){return!!t.original}},27615(t,e,s){s.d(e,{CK:()=>u,Hq:()=>o,MW:()=>c,TE:()=>l,yJ:()=>p});var r=s(35522),n=s(86738),i=s(95696),a=s(18251);function o(t){return null!=t.origin}function u(t){return o(t.vertexSpace)}function c(t,e){if(!o(t))return null;const[s,r,i]=t.origin;return new n.A({x:s,y:r,z:i,spatialReference:e})}function l(t,e){const{x:s,y:r,z:n,spatialReference:o}=t,u=[s,r,n??0];return"local"===(e?.vertexSpace??function(t){return t.isGeographic||t.isWebMercator?"local":"georeferenced"}(o))?new a.default({origin:u}):new i.A({origin:u})}function p(t,e){return t.type===e.type&&(t.origin===e.origin||null!=t.origin&&null!=e.origin&&(0,r.t2)(t.origin,e.origin))}},17136(t,e,s){s.d(e,{Y_:()=>E,O7:()=>F,el:()=>q});var r=s(92602),n=s(69052),i=s(49186),a=s(53966),o=s(39829),u=s(82799),c=s(16930),l=s(80754),p=s(21325),h=s(28735),d=s(52006),f=s(31411),y=s(11254),m=s(60408),g=s(65864),S=s(2272),v=s(84952),b=s(92300);const A=()=>a.A.getLogger("esri.geometry.support.normalizeUtils");function x(t){return"polygon"===t[0].type}function _(t){return"polyline"===t[0].type}function M(t,e,s){const r=1e6;if(e){const e=(0,d.Ed)(t)?(0,f.GS)(t,{maxSegmentLength:r}):function(t,e){if(!(t instanceof u.A||t instanceof o.A)){const t="straightLineDensify: the input geometry is neither polyline nor polygon";throw A().error(t),new i.A("internal:geometry",t)}const s=(0,l.r8)(t),r=[];for(const t of s){const s=[];r.push(s),s.push([t[0][0],t[0][1]]);for(let r=0;r<t.length-1;r++){const n=t[r][0],i=t[r][1],a=t[r+1][0],o=t[r+1][1],u=Math.sqrt((a-n)*(a-n)+(o-i)*(o-i)),c=(o-i)/u,l=(a-n)/u,p=u/e;if(p>1){for(let t=1;t<=p-1;t++){const r=t*e,a=l*r+n,o=c*r+i;s.push([a,o])}const t=(u+Math.floor(p-1)*e)/2,r=l*t+n,a=c*t+i;s.push([r,a])}s.push([a,o])}}return function(t){return"polygon"===t.type}(t)?new o.A({rings:r,spatialReference:t.spatialReference}):new u.A({paths:r,spatialReference:t.spatialReference})}(t,r);t=(0,h.ci)(e,!0)}return s&&(t=(0,l.kS)(t,s)),t}function w(t,e,s){if(Array.isArray(t)){const r=t[0];if(r>e){const s=(0,l.kd)(r,e);t[0]=r+s*(-2*e)}else if(r<s){const e=(0,l.kd)(r,s);t[0]=r+e*(-2*s)}}else{const r=t.x;if(r>e){const s=(0,l.kd)(r,e);t=t.clone().offset(s*(-2*e),0)}else if(r<s){const e=(0,l.kd)(r,s);t=t.clone().offset(e*(-2*s),0)}}return t}function R(t,e){let s=-1;for(let r=0;r<e.cutIndexes.length;r++){const n=e.cutIndexes[r],i=e.geometries[r],a=(0,l.r8)(i);for(let t=0;t<a.length;t++){const e=a[t];e.some(s=>{if(s[0]<180)return!0;{let s=0;for(let t=0;t<e.length;t++){const r=e[t][0];s=r>s?r:s}s=Number(s.toFixed(9));const r=-360*(0,l.kd)(s,180);for(let s=0;s<e.length;s++){const e=i.getPoint(t,s);i.setPoint(t,s,e.clone().offset(r,0))}return!0}})}if(n===s){if(x(t))for(const e of(0,l.r8)(i))t[n]=t[n].addRing(e);else if(_(t))for(const e of(0,l.r8)(i))t[n]=t[n].addPath(e)}else s=n,t[n]=i}return t}async function q(t,e,s){if(!Array.isArray(t))return q([t],e);e&&"string"!=typeof e&&A().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof e?e:e?.url??r.A.geometryServiceUrl;let i,a,c,d,f,x,_,F,I=0;const E=[],C=[];for(const e of t)if(null!=e)if(i||(i=e.spatialReference,a=(0,p.Vp)(i),c=i.isWebMercator,x=c?102100:4326,d=l.j7[x].maxX,f=l.j7[x].minX,_=l.j7[x].plus180Line,F=l.j7[x].minus180Line),a)if("mesh"===e.type)C.push(e);else if("point"===e.type)C.push(w(e.clone(),d,f));else if("multipoint"===e.type){const t=e.clone();t.points=t.points.map(t=>w(t,d,f)),C.push(t)}else if("extent"===e.type){const t=e.clone()._normalize(!1,!1,a);C.push(t.rings?new o.A(t):t)}else if(e.extent){const t=e.extent,s=(0,l.kd)(t.xmin,f)*(2*d);let r=0===s?e.clone():(0,l.kS)(e.clone(),s);t.offset(s,0);let{xmin:n,xmax:i}=t;n=Number(n.toFixed(9)),i=Number(i.toFixed(9)),t.intersects(_)&&i!==d?(I=i>I?i:I,r=M(r,c),E.push(r),C.push("cut")):t.intersects(F)&&n!==f?(I=i*(2*d)>I?i*(2*d):I,r=M(r,c,360),E.push(r),C.push("cut")):C.push(r)}else C.push(e.clone());else C.push(e);else C.push(e);let O=(0,l.kd)(I,d),P=-90;const T=O,N=new u.A;for(;O>0;){const t=360*O-180;N.addPath([[t,P],[t,-1*P]]),P*=-1,O--}if(E.length>0&&T>0){const e=R(E,await async function(t,e,s,r){const n=(0,S.Dl)(t),i=e[0].spatialReference,a={...r,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(i),target:JSON.stringify({geometryType:(0,m.$B)(e[0]),geometries:e}),cutter:JSON.stringify(s)}},o=await(0,y.A)(n.path+"/cut",a),{cutIndexes:u,geometries:c=[]}=o.data;return{cutIndexes:u,geometries:c.map(t=>{const e=(0,g.rS)(t);return e.spatialReference=i,e})}}(n,E,N,s)),r=[],i=[];for(let s=0;s<C.length;s++){const n=C[s];if("cut"!==n)i.push(n);else{const n=e.shift(),a=t[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&n.rings.length>=a.rings.length?(r.push(n),i.push("simplify")):i.push(c?(0,h.Gh)(n):n)}}if(!r.length)return i;const a=await async function(t,e,s){const r="string"==typeof t?(0,v.An)(t):t,n=e[0].spatialReference,i=(0,m.$B)(e[0]),a={...s,query:{...r.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,b.X)(e))}},{data:o}=await(0,y.A)(r.path+"/simplify",a);return(0,b.V)(o.geometries,i,n)}(n,r,s),o=[];for(let t=0;t<i.length;t++){const e=i[t];"simplify"!==e?o.push(e):o.push(c?(0,h.Gh)(a.shift()):a.shift())}return o}const D=[];for(let t=0;t<C.length;t++){const e=C[t];if("cut"!==e)D.push(e);else{const t=E.shift();D.push(!0===c?(0,h.Gh)(t):t)}}return D}function F(t,e,s){const r=(0,p.Vp)(s);if(null==r)return t;const[n,i]=r.valid,a=2*i;let o=0,u=0;e>i?o=Math.ceil(Math.abs(e-i)/a):e<n&&(o=-Math.ceil(Math.abs(e-n)/a)),t>i?u=Math.ceil(Math.abs(t-i)/a):t<n&&(u=-Math.ceil(Math.abs(t-n)/a));let c=t+(o-u)*a;const l=c-e;return l>i?c-=a:l<n&&(c+=a),c}function I(t){const e=(0,p.Vp)(t);if(null==e)return null;const[s,r]=e.valid;return new n.hr(s,r)}const E=I(c.A.WGS84);I(c.A.WebMercator)},80754(t,e,s){s.d(e,{j7:()=>o,kS:()=>c,kd:()=>u,r8:()=>l});var r=s(82799),n=s(16930),i=s(60408),a=s(52006);const o={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function u(t,e){return Math.ceil((t-e)/(2*e))}function c(t,e){if((0,a.Ed)(t))for(const s of function(t){return(0,i.Bi)(t)?t.curveRings:t.curvePaths}(t))for(const t of s){if((0,a.aO)(t)){const[s,r]=t.c;s[0]+=e,r[0]+=e;continue}if((0,a.FG)(t)){const[s,r]=t.a;s[0]+=e,r[0]+=e;continue}if((0,a.n1)(t)){const[s,r,n]=t.b;s[0]+=e,r[0]+=e,n[0]+=e;continue}t[0]+=e}for(const s of l(t))for(const t of s)t[0]+=e;return t}function l(t){return(0,i.Bi)(t)?t.rings:t.paths}},99352(t,e,s){s.d(e,{F:()=>r,P:()=>n});const r={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!0,supportedSpatialAggregationStatistics:{envelope:!0,centroid:!0,convexHull:!0},supportsAggregateIds:!0,supportsCentroid:!0,supportsCentroidOnDegeneratedQuantizedGeometry:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsPaginationOnAggregatedQueries:!1,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,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},n={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(t,e,s){s.r(e),s.d(e,{default:()=>Y});var r=s(5482),n=s(92602),i=s(11254),a=s(4576),o=s(49186),u=s(44208),c=s(66552),l=s(92474),p=s(53966),h=s(93637),d=s(17676),f=s(36708),y=s(84952),m=s(13069),g=s(91429),S=s(5443),v=s(16930),b=s(95696),A=s(27615),x=s(63579),_=s(52106),M=s(86211);function w(t){return"object"==typeof t&&null!=t&&"objectId"in t&&!!t.objectId}function R(t){return"object"==typeof t&&null!=t&&"globalId"in t&&!!t.globalId}function q(t){return t.every(R)}var F=s(91218),I=s(65864),E=s(73836),C=s(21325);async function O(t,e,s){const{geometry:r}=e,n={...e.attributes};if(null!=s&&"mesh"===r?.type){const{transformFieldRoles:e}=s,{origin:i,spatialReference:a,vertexSpace:o}=r,u=r.transform??new E.A,c="local"===o.type,l=t.spatialReference,p=l.isGeographic,h=(0,C.aI)(l,a),d=(0,F.isEqualBaseGCS)(a,l)&&(0,F.canProjectWithoutEngine)(a,l);if(!(c&&p&&d||!c&&!p&&h))return null;const f=(0,F.projectWithoutEngine)(i,a,l);if(null==f)return null;if(n[e.originX]=f.x,n[e.originY]=f.y,n[e.originZ]=f.z??0,null!=u){const{translation:t,scale:s,rotation:r}=u,i=c?1:(0,M.KX)(a)/(0,M.KX)(l);n[e.translationX]=t[0]*i,n[e.translationY]=t[2]*i,n[e.translationZ]=-t[1]*i,n[e.scaleX]=s[0],n[e.scaleY]=s[2],n[e.scaleZ]=s[1],n[e.rotationX]=r[0],n[e.rotationY]=r[2],n[e.rotationZ]=-r[1],n[e.rotationDeg]=r[3]}return{attributes:n}}return null==r?{attributes:n}:"mesh"===r.type||"extent"===r.type?null:{geometry:r.toJSON(),attributes:n}}async function P(t,e){const s=await Promise.all((e.addAttachments??[]).map(e=>T(t,e))),r=await Promise.all((e.updateAttachments??[]).map(e=>T(t,e))),n=e.deleteAttachments??[];return s.length||r.length||n.length?{adds:s,updates:r,deletes:[...n]}:null}async function T(t,e){const{feature:s,attachment:r}=e,{globalId:n,name:i,contentType:a,data:o,uploadId:u}=r,c={globalId:n};if(s&&("attributes"in s?c.parentGlobalId=s.attributes?.[t.globalIdField]:s.globalId&&(c.parentGlobalId=s.globalId)),u)c.uploadId=u;else if(o){const t=await(0,y._0)(o);t&&(c.contentType=t.mediaType,c.data=t.data),o instanceof File&&(c.name=o.name)}return i&&(c.name=i),a&&(c.contentType=a),c}function N(t,e,s){if(!e||0===e.length)return[];if(s&&q(e))return e.map(t=>t.globalId);if(function(t){return t.every(w)}(e))return e.map(t=>t.objectId);const r=s?t.globalIdField:t.objectIdField;return r?e.map(t=>t.getAttribute(r)):[]}function D(t){const e=!0===t.success?null:t.error||{code:void 0,description:"Feature edit failed"};return{objectId:t.objectId,globalId:t.globalId,error:e?new o.A("feature-layer-source:edit-failure",e.description,{code:e.code}):null}}function k(t,e){return new _.A({attributes:t.attributes,geometry:(0,I.rS)({...t.geometry,spatialReference:e})})}function Z(t,e){return{adds:t?.adds?.map(t=>k(t,e))||[],updates:t?.updates?.map(t=>({original:k(t[0],e),current:k(t[1],e)}))||[],deletes:t?.deletes?.map(t=>k(t,e))||[],spatialReference:e}}var Q=s(64714),j=s(64314),J=s(60694),V=s(15426),U=s(20557),G=s(99199),B=s(96520),X=s(61956),z=s(79677),L=s(20816);const $=new c.J({originalAndCurrentFeatures:"original-and-current-features",none:"none"}),W=new c.J({Started:"published",Publishing:"publishing",Stopped:"unavailable"});let Y=class extends l.x_{constructor(t){super(t),this.type="feature-layer",this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.refresh=(0,d.sg)(async()=>{await this.load();const t=this.sourceJSON.editingInfo?.lastEditDate;if(null==t)return{dataChanged:!0,updates:{}};try{await this._fetchService(null)}catch{return{dataChanged:!0,updates:{}}}const e=t!==this.sourceJSON.editingInfo?.lastEditDate;return{dataChanged:e,updates:e?{editingInfo:this.sourceJSON.editingInfo,extent:this.sourceJSON.extent}:null}}),this._ongoingAssetUploads=new Map}load(t){const e=this.layer.sourceJSON,s=this._fetchService(e,{...t}).then(()=>this.layer.setUserPrivileges(this.sourceJSON.serviceItemId,t)).then(()=>this._ensureLatestMetadata(t));return this.addResolvingPromise(s),Promise.resolve(this)}initialize(){this.addHandles([(0,f.wB)(()=>{const t=this.layer;return t&&"lastEditsEventDate"in t?t.lastEditsEventDate:null},t=>this._handleLastEditsEventChange(t))])}destroy(){this._removeEditInterceptor()}get queryTask(){const{capabilities:t,parsedUrl:e,gdbVersion:s,spatialReference:r,fieldsIndex:n,uniqueIdFields:i}=this.layer,a="infoFor3D"in this.layer?this.layer.infoFor3D:null,o="dynamicDataSource"in this.layer?this.layer.dynamicDataSource:null,c=(0,u.A)("featurelayer-pbf")&&t?.query.supportsFormatPBF&&null==a,l=c&&t?.query.supportsFormatPBFWithCurves,p=t?.operations?.supportsQueryAttachments??!1,h=t?.query?.relativeTimeBinWindow??0,d=e.path;return new j.A({dynamicDataSource:o,fieldsIndex:n,gdbVersion:s,infoFor3D:a,pbfSupported:c,pbfSupportedWithCurves:l,queryAttachmentsSupported:p,relativeTimeBinWindow:h,sourceSpatialReference:r,uniqueIdFields:i,url:d})}async addAttachment(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/addAttachment",a=this._getLayerRequestOptions(),o=this._getFormDataForAttachment(e,a.query);try{return D((await(0,i.A)(n,{body:o})).data.addAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(r,t)}}async updateAttachment(t,e,s){await this.load();const{layer:r}=this;await(0,V.VA)(r,"editing");const n=t.attributes[r.objectIdField],a=r.parsedUrl.path+"/"+n+"/updateAttachment",o=this._getLayerRequestOptions({query:{attachmentId:e}}),u=this._getFormDataForAttachment(s,o.query);try{return D((await(0,i.A)(a,{body:u})).data.updateAttachmentResult)}catch(t){throw this._createAttachmentErrorResult(n,t)}}async applyEdits(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r="infoFor3D"in s?s.infoFor3D:null,n=null!=r,u=n||(e?.globalIdUsed??!1),c=n?await this._uploadMeshesAndGetAssetMapEditsJSON(t):null,l=t.addFeatures?.map(t=>O(this.layer,t,r))??[],p=(await Promise.all(l)).filter(a.Ru),h=t.updateFeatures?.map(t=>O(this.layer,t,r))??[],d=(await Promise.all(h)).filter(a.Ru),f=N(this.layer,t.deleteFeatures,u);(0,B.u)(p,d,s.spatialReference);const y=await P(this.layer,t),m=s.capabilities.editing.supportsAsyncApplyEdits&&n,g=e?.gdbVersion||s.gdbVersion,S={gdbVersion:g,rollbackOnFailure:e?.rollbackOnFailureEnabled,useGlobalIds:u,returnEditMoment:e?.returnEditMoment,trueCurveClient:e?.editsRespectTrueCurves,usePreviousEditMoment:e?.usePreviousEditMoment,async:m};await(0,L.ZJ)(this.layer.url,g,!0);const v=(0,L.w5)(this.layer.url,g||null);if(await(0,L.We)(s.url,g,s.historicMoment))throw new o.A("feature-layer-source:historic-version","Editing a historic version is not allowed");e?.returnServiceEditsOption?(S.edits=JSON.stringify([{id:s.layerId,adds:p.length?p:null,updates:d.length?d:null,deletes:f.length?f:null,attachments:y,assetMaps:c}]),S.returnServiceEditsOption=$.toJSON(e?.returnServiceEditsOption),S.returnServiceEditsInSourceSR=e?.returnServiceEditsInSourceSR):(S.adds=p.length?JSON.stringify(p):null,S.updates=d.length?JSON.stringify(d):null,S.deletes=f.length?u?JSON.stringify(f):f.join(","):null,S.attachments=y&&JSON.stringify(y),S.assetMaps=null!=c?JSON.stringify(c):void 0);const b=this._getLayerRequestOptions({method:"post",query:S});v&&(b.authMode="immediate",b.query.returnEditMoment=!0,b.query.sessionId=L.TA);const A=e?.returnServiceEditsOption?s.url:s.parsedUrl.path;let x;try{x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}catch(t){if(!function(t){const e=t.details.raw,s=+e.code,r=+e.extendedCode;return 500===s&&(-2147217144===r||-2147467261===r)}(t))throw t;b.authMode="immediate",x=m?await this._asyncApplyEdits(A+"/applyEdits",b):await(0,i.A)(A+"/applyEdits",b)}return this._createEditsResult(x)}async deleteAttachments(t,e){await this.load();const{layer:s}=this;await(0,V.VA)(s,"editing");const r=t.attributes[s.objectIdField],n=s.parsedUrl.path+"/"+r+"/deleteAttachments";try{return(await(0,i.A)(n,this._getLayerRequestOptions({query:{attachmentIds:e.join(",")},method:"post"}))).data.deleteAttachmentResults.map(D)}catch(t){throw this._createAttachmentErrorResult(r,t)}}fetchRecomputedExtents(t={}){const e=t.signal;return this.load({signal:e}).then(async()=>{const e=this._getLayerRequestOptions({...t,query:{returnUpdates:!0}}),{layerId:s,url:r}=this.layer,{data:n}=await(0,i.A)(`${r}/${s}`,e),{id:a,extent:o,fullExtent:u,timeExtent:c}=n,l=o||u;return{id:a,fullExtent:l&&S.A.fromJSON(l),timeExtent:c&&z.A.fromJSON({start:c[0],end:c[1]})}})}async queryAttachments(t,e={}){await this.load();const s=this._getLayerRequestOptions(e);return this.queryTask.executeAttachmentQuery(t,s)}async queryFeatures(t,e){await this.load();const s=await this.queryTask.execute(t,{...e,query:this._createRequestQueryOptions(e)});if(t.outStatistics?.length&&s.features.length){const e=new Map;if(s.features.forEach(s=>{const r=s.attributes;t.outStatistics?.forEach(({outStatisticFieldName:t})=>{if(t){const s=t.toLowerCase();s&&s in r&&t!==s&&(r[t]=r[s],delete r[s],e.set(s,t))}})}),null!=s.fields)for(const t of s.fields){const s=e.get(t.name.toLowerCase());null!=s&&(t.name=s)}}return s}async queryFeaturesJSON(t,e){return await this.load(),this.queryTask.executeJSON(t,{...e,query:this._createRequestQueryOptions(e)})}async queryObjectIds(t,e){return await this.load(),this.queryTask.executeForIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryFeatureCount(t,e){return await this.load(),this.queryTask.executeForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryExtent(t,e){return await this.load(),this.queryTask.executeForExtent(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeatures(t,e){return await this.load(),this.queryTask.executeRelationshipQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryRelatedFeaturesCount(t,e){return await this.load(),this.queryTask.executeRelationshipQueryForCount(t,{...e,query:this._createRequestQueryOptions(e)})}async queryPivot(t,e){return await this.load(),this.queryTask.executePivotQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopFeatures(t,e){return await this.load(),this.queryTask.executeTopFeaturesQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryAttributeBins(t,e){return await this.load(),this.queryTask.executeAttributeBinsQuery(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopObjectIds(t,e){return await this.load(),this.queryTask.executeForTopIds(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopExtents(t,e){return await this.load(),this.queryTask.executeForTopExtents(t,{...e,query:this._createRequestQueryOptions(e)})}async queryTopCount(t,e){return await this.load(),this.queryTask.executeForTopCount(t,{...e,query:this._createRequestQueryOptions(e)})}async fetchPublishingStatus(){if(!(0,J.Wo)(this.layer.url))return"unavailable";const t=(0,y.fj)(this.layer.url,"status"),e=await(0,i.A)(t,{query:{f:"json"}});return W.fromJSON(e.data.status)}async uploadAssets(t,e){const{uploadAssets:r}=await s.e(1384).then(s.bind(s,31384));return r(t,{layer:this.layer,ongoingUploads:this._ongoingAssetUploads},e)}_handleLastEditsEventChange(t){const e=this.layer;if(null==t||!("capabilities"in e)||!("effectiveCapabilities"in e))return;if(e.capabilities?.operations?.supportsEditing||!e.effectiveCapabilities?.operations?.supportsEditing)return;const s=e.url;null!=s&&("layerId"in e&&(0,y.fj)(s,e.layerId.toString()),this._getOrCreateEditInterceptor(s).before=e=>{const s=e.requestOptions.method??"auto";if("auto"===s||"head"===s){const s=e.requestOptions.query??{};s._ts=t.getTime(),e.requestOptions.query=s}})}_getOrCreateEditInterceptor(t){return null==this._editInterceptor&&(this._editInterceptor={urls:t},n.A.request.internalInterceptors.push(this._editInterceptor)),this._editInterceptor}_removeEditInterceptor(){null!=this._editInterceptor&&((0,a.TF)(n.A.request.internalInterceptors,this._editInterceptor),this._editInterceptor=null)}async _asyncApplyEdits(t,e){const s=(await(0,i.A)(t,e)).data.statusUrl;for(;;){const t=(await(0,i.A)(s,{query:{f:"json"},responseType:"json"})).data;switch(t.status){case"Completed":return(0,i.A)(t.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(t){const e={...this.layer.customParameters,token:this.layer.apiKey,...t?.query};return this.layer.datesInUnknownTimezone&&(e.timeReferenceUnknownClient=!0),e}async _fetchService(t,e){if(!t){const s={};(0,u.A)("featurelayer-advanced-symbols")&&(s.returnAdvancedSymbols=!0),e?.cacheBust&&(s._ts=Date.now());const{data:r}=await(0,i.A)(this.layer.parsedUrl.path,this._getLayerRequestOptions({query:s,signal:e?.signal}));t=r}this.layer.applyPreferredHost(t),this.sourceJSON=await this._patchServiceJSON(t,e?.signal);const s=t.type;if(!this.supportedSourceTypes.has(s))throw new o.A("feature-layer-source:unsupported-type",`Source type "${s}" is not supported`)}async _patchServiceJSON(t,e){if("Table"!==t.type&&t.geometryType&&!t?.drawingInfo?.renderer&&!t.defaultSymbol){const e=(0,Q.F0)(t.geometryType).renderer;(0,h.sM)("drawingInfo.renderer",e,t)}if("esriGeometryMultiPatch"===t.geometryType&&t.infoFor3D&&(t.geometryType="mesh"),null==t.extent)try{const{data:s}=await(0,i.A)(this.layer.url,this._getLayerRequestOptions({signal:e}));s.spatialReference&&(t.extent={xmin:0,ymin:0,xmax:0,ymax:0,spatialReference:s.spatialReference})}catch(t){(0,d.QP)(t)}return t}async _ensureLatestMetadata(t){if(this.layer.userHasUpdateItemPrivileges&&this.sourceJSON.cacheMaxAge>0)return this._fetchService(null,{...t,cacheBust:!0})}async _uploadMeshesAndGetAssetMapEditsJSON(t){const{addAssetFeatures:e}=t;if(!e?.length)return null;if(await this._areAllAssetsAlreadyMapped(e))return null;const r=t.addFeatures.filter(t=>t.geometry);if(e.length!==r.length+t.updateFeatures.length)throw new o.A("feature-layer-source:unsupported-mesh-edits","Mixing attribute only edits with mesh geometry edits is not currently supported");const n=new Array,i=new Map;for(const t of e){const{geometry:e}=t,{vertexSpace:r}=e;if((0,A.Hq)(r))n.push(e);else{const r=e.origin,{convertMeshVertexSpace:a}=await s.e(8846).then(s.bind(s,28846)),o=await a(e,new b.A({origin:[r.x,r.y,r.z??0]}));i.set(o,e),t.geometry=o,n.push(o)}}await this.uploadAssets(n);for(const[t,e]of i)e.addExternalSources(t.metadata.externalSources.items);return{adds:this._getAssetMapEditsJSON(e),updates:[],deletes:[]}}_getAssetMapEditsJSON(t){const e=new Array,s=this.layer.globalIdField,r=this.layer.parsedUrl;for(const n of t){const t=n.geometry,{metadata:i}=t,a=i.getExternalSourcesOnService(r),o=n.getAttribute(s);if(0===a.length){p.A.getLogger(this).error(`Skipping feature ${o}. The mesh it is associated with has not been uploaded to the service and cannot be mapped to it.`);continue}const{source:u}=a.find(x.dK)??a[0];for(const t of u.assets)1===t.parts.length?e.push({globalId:(0,m.yS)(),parentGlobalId:o,assetName:t.assetName,assetHash:t.parts[0].partHash,flags:[]}):p.A.getLogger(this).error(`Skipping asset ${t.assetName}. It does not have exactly one part, so we cannot map it to a feature.`)}return e}_createEditsResult(t){const e=t.data,{layerId:s}=this.layer,r=[];let n=null;if(Array.isArray(e))for(const t of e)r.push({id:t.id,editedFeatures:t.editedFeatures}),t.id===s&&(n={addResults:t.addResults??[],updateResults:t.updateResults??[],deleteResults:t.deleteResults??[],attachments:t.attachments,editMoment:t.editMoment});else n=e;const i=function(t){const e=t?.assetMaps;if(e){for(const t of e.addResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`);for(const t of e.updateResults)t.success||p.A.getLogger("esri.layers.graphics.sources.support.sourceUtils").error(`Failed to map asset to feature with globalId ${t.globalId}.`)}const s=t?.attachments,r={addFeatureResults:t?.addResults?.map(D)??[],updateFeatureResults:t?.updateResults?.map(D)??[],deleteFeatureResults:t?.deleteResults?.map(D)??[],addAttachmentResults:s?.addResults?s.addResults.map(D):[],updateAttachmentResults:s?.updateResults?s.updateResults.map(D):[],deleteAttachmentResults:s?.deleteResults?s.deleteResults.map(D):[]};return t?.editMoment&&(r.editMoment=t.editMoment),r}(n);if(r.length>0){i.editedFeatureResults=[];for(const t of r){const{editedFeatures:e}=t,s=e?.spatialReference?new v.A(e.spatialReference):null;i.editedFeatureResults.push({layerId:t.id,editedFeatures:Z(e,s)})}}return i}_createAttachmentErrorResult(t,e){const s=e.details.messages?.[0]||e.message,r=e.details.httpStatus||e.details.messageCode;return{objectId:t,globalId:null,error:new o.A("feature-layer-source:attachment-failure",s,{code:r})}}_getFormDataForAttachment(t,e){const s=t instanceof FormData?t:t&&t.elements?new FormData(t):null;if(s)for(const t in e){const r=e[t];null!=r&&(s.set?s.set(t,r):s.append(t,r))}return s}_getLayerRequestOptions(t={}){const{layer:e,layer:{parsedUrl:s,gdbVersion:r}}=this;return{...t,query:{gdbVersion:r,layer:"dynamicDataSource"in e&&e.dynamicDataSource?JSON.stringify({source:e.dynamicDataSource}):void 0,...s.query,f:"json",...this._createRequestQueryOptions(t)},responseType:"json"}}async _areAllAssetsAlreadyMapped(t){const{layer:e}=this,{globalIdField:s,parsedUrl:r}=e,n="infoFor3D"in e?e.infoFor3D:null;if(null==n||null==s)return!1;const i=(0,U.JZ)(n);if(null==i)return!1;const o=(0,y.fj)(r.path,`../${i.id}`),u=new Array;for(const e of t){if(!(e.geometry.metadata.getExternalSourcesOnService(r).length>0))return!1;u.push(e)}const c=u.map(t=>t.getAttribute(s)).filter(a.Ru);if(0===c.length)return!1;const{assetMapFieldRoles:{parentGlobalId:l,assetHash:p}}=n,h=new X.A({where:`${l} IN (${c.map(t=>`'${t}'`)})`,outFields:[p,l],returnGeometry:!1}),d=await(0,G.s)(o,h),{features:f}=d;return 0!==f.length&&!u.some(t=>{const e=t.getAttribute(s);if(!e)return!0;const{metadata:n}=t.geometry,i=f.filter(t=>t.getAttribute(l)===e);if(0===i.length)return!0;const a=i.map(t=>t.getAttribute(p));return n.getExternalSourcesOnService(r).flatMap(({source:t})=>t.assets.flatMap(t=>t.parts.map(t=>t.partHash))).some(t=>a.every(e=>t!==e))})}};(0,r.Cg)([(0,g.MZ)()],Y.prototype,"type",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"layer",void 0),(0,r.Cg)([(0,g.MZ)({constructOnly:!0})],Y.prototype,"supportedSourceTypes",void 0),(0,r.Cg)([(0,g.MZ)({readOnly:!0})],Y.prototype,"queryTask",null),Y=(0,r.Cg)([(0,g.$K)("esri.layers.graphics.sources.FeatureLayerSource")],Y);const H=1e3},64314(t,e,s){s.d(e,{A:()=>w});var r=s(5482),n=s(69622),i=s(49186),a=s(44208),o=s(17676),u=s(84952),c=s(91429),l=s(21325),p=s(20557),h=s(2272),d=s(65615),f=s(20615),y=s(74910),m=s(78286),g=s(99199),S=s(62815),v=s(63746);class b{constructor(t){this._options=t,this.featureSet={features:[]},this.parseOnly=null,this._transformInPlace=null,this._transformInPlaceXY=null,this._finishVertex=b._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(t){"string"==typeof t&&(this.featureSet.objectIdFieldName=t)}finish(){this._options.applyTransform&&(this.featureSet.transform=null);const{spatialReference:t,features:e}=this.featureSet;if(t)for(const{geometry:s}of e)s&&(s.spatialReference=t)}feature(){this._attributesClass??=(0,v._7)(this.featureSet.fields?.map(t=>t.name)??[]),this.featureSet.features.push({attributes:new this._attributesClass}),this._options.applyTransform&&this._setVertexTransformer()}centroid([t,e]){this.featureSet.features.at(-1).centroid={x:t,y:e}}geometry(t,e,s){this._previousX=this._previousY=0,this._lengths=s;let r,{hasZ:n,hasM:i}=this.featureSet;switch(n??=!1,i??=!1,this._i=0,this._vertex=[0,0],n&&this._vertex.push(0),i&&this._vertex.push(0),this._finishVertex=b._finishVertexNonPoint,e){case"esriGeometryPoint":this._point={x:0,y:0},r=this._point,this._finishVertex=n?i?b._finishVertexPointXYZM:b._finishVertexPointXYZ:i?b._finishVertexPointXYM:b._finishVertexPointXY;break;case"esriGeometryMultipoint":r={points:[],hasZ:n,hasM:i},this._part=r.points,this._parts=[];break;case"esriGeometryPolyline":r={paths:[],hasZ:n,hasM:i},this._parts=r.paths,this._part=[];break;case"esriGeometryPolygon":r={rings:[],hasZ:n,hasM:i},this._parts=r.rings,this._part=[]}1===t?(this.featureSet.queryGeometry=r,this.featureSet.queryGeometryType=e,this._options.applyTransform||this._setVertexTransformer()):this.featureSet.features.at(-1).geometry=r}coord(t){const e=this._vertex;e[this._i++]=t,this._i<e.length||(this._i=0,this._transformInPlace&&(e[0]+=this._previousX,e[1]+=this._previousY,[this._previousX,this._previousY]=e,this._transformInPlace(e)),this._finishVertex(this))}curvedGeometry(t,e,s,r){let n,{hasZ:i,hasM:a}=this.featureSet;switch(i??=!1,a??=!1,t){case"esriGeometryPoint":case"esriGeometryMultipoint":throw new Error(`Curved ${t} does not make sense`);case"esriGeometryPolyline":n={paths:[],curvePaths:[],hasZ:i,hasM:a},this._parts=n.curvePaths,this._part=[];break;case"esriGeometryPolygon":n={rings:[],curveRings:[],hasZ:i,hasM:a},this._parts=n.curveRings,this._part=[]}this.featureSet.features.at(-1).geometry=n}startCurvedPart(t){this._part.push(this._transform(t))}finishCurvedPart(t){this._parts.push(this._part),this._part=[]}lineSegment(t,e){this._part.push(this._transform(e))}bezierSegment(t,e,s,r){this._part.push({b:[this._transform(e),this._transformXY(s),this._transformXY(r)]})}circularArcSegment(t,e,s){this._part.push({c:[this._transform(e),this._transformXY(s)]})}ellipticArcSegment(t,e,s,r,n,i,a,o){this._part.push({a:[this._transform(e),this._transformXY(s),r,n,i,a,o]})}static _finishVertexPointXY({_point:t,_vertex:e}){[t.x,t.y]=e}static _finishVertexPointXYZ({_point:t,_vertex:e}){[t.x,t.y,t.z]=e}static _finishVertexPointXYM({_point:t,_vertex:e}){[t.x,t.y,t.m]=e}static _finishVertexPointXYZM({_point:t,_vertex:e}){[t.x,t.y,t.z,t.m]=e}static _finishVertexNonPoint(t){const{_part:e,_parts:s,_lengths:r,_vertex:n}=t;e.push([...n]),e.length<r[s.length]||(t._previousX=t._previousY=0,t._part=[],s.push(e))}_setVertexTransformer(){const{sourceSpatialReference:t}=this._options,{spatialReference:e,hasZ:s,transform:r}=this.featureSet,n=s?(0,S.d)(t,e):1;this._transformInPlace??=(0,v.Mv)(this.featureSet,n),this._transformInPlaceXY??=(0,v.Mv)({transform:r})}_transform(t){const e=[...t];return this._transformInPlace?.(e),e}_transformXY(t){const e=[t[0],t[1]];return this._transformInPlaceXY?.(e),e}}var A=s(80893),x=s(22671),_=s(61956);async function M(t,e,s,r){const n=(0,h.Dl)(t),i={...s},a=_.A.from(e),o=!a.quantizationParameters;return await(0,A.IJ)(n,a,new b({sourceSpatialReference:a.sourceSpatialReference,applyTransform:o}),i,r)}let w=class extends n.A{constructor(t){super(t),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(t,e){const s=await this.executeJSON(t,e);return this.featureSetFromJSON(t,s,e)}async executeJSON(t,e){const s=this._normalizeQuery(t),r=null!=t.outStatistics?.[0],n=(0,a.A)("featurelayer-pbf-statistics");let i;if(this.pbfSupported&&(!r||n)&&(!t.returnTrueCurves||this.pbfSupportedWithCurves))try{i=await M(this.url,s,e,{uniqueIdFields:this.uniqueIdFields})}catch(t){if("query:parsing-pbf"!==t.name)throw t;this.pbfSupported=!1}return i??=await(0,g.e)(this.url,s,e,{uniqueIdFields:this.uniqueIdFields}),this._normalizeFields(i.fields),i}async featureSetFromJSON(t,e,r){if(!this._queryGet3DObjectFormat(t)||null==this.infoFor3D||!e.features)return x.A.fromJSON(e);const{meshFeatureSetFromJSON:n}=await(0,o.qr)(Promise.all([s.e(1843),s.e(7005),s.e(5408),s.e(7925),s.e(8883)]).then(s.bind(s,40050)),r);return n(t,this.infoFor3D,e)}executeForCount(t,e){return(0,f.I)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}executeForExtent(t,e){return(0,y.L)(this.url,this._normalizeQuery(t),e)}executeForIds(t,e){return(0,m.V)(this.url,this._normalizeQuery(t),e,{uniqueIdFields:this.uniqueIdFields})}async executeRelationshipQuery(t,e){const[{default:r},{executeRelationshipQuery:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeRelationshipQueryForCount(t,e){const[{default:r},{executeRelationshipQueryForCount:n}]=await(0,o.qr)(Promise.all([Promise.resolve().then(s.bind(s,26591)),s.e(1763).then(s.bind(s,71763))]),e);let i=r.from(t);return(this.gdbVersion||this.dynamicDataSource)&&(i=i.clone(),i.gdbVersion=i.gdbVersion||this.gdbVersion,i.dynamicDataSource=i.dynamicDataSource||this.dynamicDataSource),n(this.url,i,e)}async executeAttachmentQuery(t,e){const{executeAttachmentQuery:r,fetchAttachments:n,processAttachmentQueryResult:i}=await(0,o.qr)(s.e(9239).then(s.bind(s,9239)),e),a=(0,h.Dl)(this.url);return i(a,await(this.queryAttachmentsSupported?r(a,t,e):n(a,t,e)))}async executeAttributeBinsQuery(t,e){const{executeAttributeBinsQuery:r}=await(0,o.qr)(s.e(3103).then(s.bind(s,33103)),e);return r(this.parsedUrl,t,e)}async executePivotQuery(t,e){const{executePivotQuery:r}=await(0,o.qr)(s.e(566).then(s.bind(s,80566)),e);return r(this.parsedUrl,t,e)}async executeTopFeaturesQuery(t,e){const{executeTopFeaturesQuery:r}=await(0,o.qr)(s.e(1273).then(s.bind(s,11273)),e);return r(this.parsedUrl,t,this.sourceSpatialReference,e)}async executeForTopIds(t,e){const{executeForTopIds:r}=await(0,o.qr)(s.e(1277).then(s.bind(s,21277)),e);return r(this.parsedUrl,t,e)}async executeForTopExtents(t,e){const{executeForTopExtents:r}=await(0,o.qr)(s.e(8018).then(s.bind(s,8018)),e);return r(this.parsedUrl,t,e)}async executeForTopCount(t,e){const{executeForTopCount:r}=await(0,o.qr)(s.e(980).then(s.bind(s,10980)),e);return r(this.parsedUrl,t,e)}_normalizeQuery(t){let e=_.A.from(t);e.sourceSpatialReference=e.sourceSpatialReference||this.sourceSpatialReference,(this.gdbVersion||this.dynamicDataSource)&&(e=e===t?e.clone():e,e.gdbVersion=t.gdbVersion||this.gdbVersion,e.dynamicDataSource=t.dynamicDataSource?d.A.from(t.dynamicDataSource):this.dynamicDataSource);const{infoFor3D:s}=this,r=this._queryGet3DObjectFormat(t);if(null!=s&&r){if(e=e===t?e.clone():e,e.formatOf3DObjects=r,e.outSpatialReference&&!(0,l.aI)(e.outSpatialReference,this.sourceSpatialReference))throw new i.A("query:unsupported-out-spatial-reference","3D object feature services do not support projection of geometries");if(null==e.outFields||!e.outFields.includes("*")){e=e===t?e.clone():e,null==e.outFields&&(e.outFields=[]);const{originX:r,originY:n,originZ:i,translationX:a,translationY:o,translationZ:u,scaleX:c,scaleY:l,scaleZ:p,rotationX:h,rotationY:d,rotationZ:f,rotationDeg:y}=s.transformFieldRoles;e.outFields.push(r,n,i,a,o,u,c,l,p,h,d,f,y)}}return e}_normalizeFields(t){if(null!=this.fieldsIndex&&null!=t)for(const e of t){const t=this.fieldsIndex.get(e.name);t&&Object.assign(e,t.toJSON())}}_queryGet3DObjectFormat({returnGeometry:t,multipatchOption:e,outStatistics:s}){return!0!==t||"xyFootprint"===e||s?null:(0,p.Hz)(this.infoFor3D)}};(0,r.Cg)([(0,c.MZ)({type:d.A})],w.prototype,"dynamicDataSource",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"fieldsIndex",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"gdbVersion",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"infoFor3D",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0})],w.prototype,"parsedUrl",null),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"pbfSupportedWithCurves",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"queryAttachmentsSupported",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"relativeTimeBinWindow",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"sourceSpatialReference",void 0),(0,r.Cg)([(0,c.MZ)()],w.prototype,"uniqueIdFields",void 0),(0,r.Cg)([(0,c.MZ)({type:String})],w.prototype,"url",void 0),w=(0,r.Cg)([(0,c.$K)("esri.layers.graphics.sources.support.QueryTask")],w)},64714(t,e,s){s.d(e,{F0:()=>o,Vx:()=>l,e2:()=>h,f:()=>d});var r=s(44208),n=s(4718),i=s(99352),a=s(93470);function o(t){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===t||"esriGeometryMultipoint"===t?a.Cb:"esriGeometryPolyline"===t?a.yM:a.WR}}}const u=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let c=1;function l(t,e){if((0,r.A)("esri-csp-restrictions"))return()=>e?{[e]:null,...t}:{...t};try{let s="";e&&(s+=`this${p(e)} = null;`);for(const e in t)s+=`this${p(e)} = ${JSON.stringify(t[e])};`;const r=new Function(`\n return class AttributesClass$${c++} {\n constructor() {\n ${s};\n }\n }\n `)();return()=>new r}catch(s){return()=>e?{[e]:null,...t}:{...t}}}function p(t){return u.test(t)?`.${t}`:`[${JSON.stringify(t)}]`}function h(t={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,n.o8)(t)}}]}function d(t,e){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:t},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:e,supportsDelete:e,supportsEditing:e,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryPivot:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:e,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:i.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:i.P,editing:{supportsGeometryUpdate:e,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:e,supportsTrueCurveUpdateByTrueCurveClientsOnly:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},92300(t,e,s){s.d(e,{V:()=>a,X:()=>i});var r=s(60408),n=s(65864);function i(t){return{geometryType:(0,r.$B)(t[0]),geometries:t.map(t=>t.toJSON())}}function a(t,e,s){const r=(0,n.xD)(e);return t.map(t=>{const e=r.fromJSON(t);return e.spatialReference=s,e})}},20615(t,e,s){s.d(e,{I:()=>a});var r=s(2272),n=s(80893),i=s(61956);function a(t,e,s,a){return(0,n.gW)((0,r.Dl)(t),i.A.from(e),s,a)}},74910(t,e,s){s.d(e,{L:()=>o});var r=s(5443),n=s(2272),i=s(80893),a=s(61956);async function o(t,e,s){const o=(0,n.Dl)(t),u=await(0,i.Jf)(o,a.A.from(e),{...s}),c=u.extent;return!c||isNaN(c.xmin)||isNaN(c.ymin)||isNaN(c.xmax)||isNaN(c.ymax)?{count:u.count,extent:null}:{count:u.count,extent:r.A.fromJSON(c)}}},78286(t,e,s){s.d(e,{V:()=>a});var r=s(2272),n=s(80893),i=s(61956);async function a(t,e,s,a){const o=(0,r.Dl)(t),u=await(0,n.Pk)(o,i.A.from(e),s,a);return u.objectIds??function(t){if(t)return function(t){return!Array.isArray(t[0])}(t)?t:t.map(t=>JSON.stringify(t))}(u.uniqueIds)??[]}},99199(t,e,s){s.d(e,{e:()=>u,s:()=>o});var r=s(2272),n=s(80893),i=s(22671),a=s(61956);async function o(t,e,s,r){const n=await u(t,e,s,r);return i.A.fromJSON(n)}function u(t,e,s,i){const o=(0,r.Dl)(t),u={...s},c=a.A.from(e);return(0,n.eW)(o,c,c.sourceSpatialReference,u,i)}},63746(t,e,s){function r(t){return class{constructor(){for(const e of t)this[e]=null}}}function n(t,e=1){const{transform:s,hasZ:r,hasM:n}=t;if(null==s)return r&&1!==e?t=>{t[2]*=e}:null;const[i,a]=function(t,e,s,r){let{scale:n,translate:i,originPosition:a}=t;return"upperLeft"===a&&(n=n.map((t,e)=>1===e?-t:t)),e&&(n=n.map((t,e)=>2===e?t*r:t),i=i.map((t,e)=>2===e?t*r:t)),!e&&s&&(n=n.filter((t,e)=>2!==e),i=i.filter((t,e)=>2!==e)),[n,i]}(s,r,n,e),o=t.hasZ?3:2;return t=>{for(let e=0;e<t.length&&(e!==o||0!==t[e]);++e)t[e]=t[e]*i[e]+a[e]}}s.d(e,{Mv:()=>n,_7:()=>r}),s(53966)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{2741(e,r,t){t.d(r,{s:()=>i});var s=t(92602),n=(t(11254),t(49186)),o=t(53966),a=t(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},97159(e,r,t){t.d(r,{a:()=>y,b:()=>g,e:()=>h,f:()=>a,i:()=>p,p:()=>f,r:()=>l,t:()=>i,w:()=>u});var s=t(70333),n=t(84952),o=t(39131);function a(e,r){const t=r?.url?.path;if(e&&t&&(e=(0,n.s2)(e,t,{preserveProtocolRelative:!0}),r.portalItem&&r.readResourcePaths)){const t=(0,n.V1)(e,r.portalItem.itemUrl);null!=t&&t.startsWith(d)&&r.readResourcePaths.push(r.portalItem.resourceFromPath(t).path)}return(e=m(e,r?.portal))&&c.test(e)?y(e):e}function i(e,r,t=0){if(null==(e=e&&c.test(e)?w(e):e))return e;!(0,n.oP)(e)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(r){const t=r.verifyItemRelativeUrls?.rootPath||r.url?.path;if(t){const o=m(t,r.portal),a=m(s,r.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=h(s,r?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),r?.resources&&r?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&0===t&&r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,r,t){return a(e,t)}function u(e,r,t,s){const n=i(e,s);void 0!==n&&(r[t]=n)}const c=/\/items\/([^/]+)\/resources\/(.*)/,d="./resources/";function p(e){const r=e?.match(c)??null;return r?.[1]??null}function f(e){const r=e?.match(c)??null;if(null==r)return null;const t=r[2],s=t.lastIndexOf("/");if(-1===s){const{path:e,extension:r}=(0,n.xw)(t);return{prefix:null,filename:e,extension:r}}const{path:o,extension:a}=(0,n.xw)(t.slice(s+1));return{prefix:t.slice(0,s),filename:o,extension:a}}function h(e,r){return r&&!r.isPortal&&r.urlKey&&r.customBaseUrl?(0,n.T1)(e,`${r.urlKey}.${r.customBaseUrl}`,r.portalHostname):e}function m(e,r){if(!r||r.isPortal||!r.urlKey||!r.customBaseUrl)return e;const t=`${r.urlKey}.${r.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${t}`)?(0,n.T1)(e,r.portalHostname,t):(0,n.T1)(e,t,r.portalHostname)}function y(e){if(!e)return e||null;let r=e;return r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r),r=r.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),r=r.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),r=r.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),r}function w(e){if(!e)return e||null;let r=e;return r=r.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),r=r.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),r=r.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r)),r}const g=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:h,fromCDNUrl:w,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:f,read:l,toCDNUrl:y,toJSON:i,write:u},Symbol.toStringTag,{value:"Module"}))},91869(e,r,t){function s(e,r){for(const t of e.values())if(r(t))return!0;return!1}function n(e,r){for(const t of e.values())if(!r(t))return!1;return!0}function o(e,r,t){const s=e.get(r);if(void 0!==s)return s;const n=t();return e.set(r,n),n}function a(e){const r=new Map;return t=>(r.has(t)||r.set(t,e(t)),r.get(t))}t.d(r,{Bj:()=>a,Bs:()=>s,mt:()=>n,tE:()=>o})},60694(e,r,t){t.d(r,{Fi:()=>d,HZ:()=>q,Jf:()=>v,LS:()=>b,Wo:()=>w,bd:()=>S,cr:()=>h,iz:()=>f,qg:()=>p,uV:()=>g,yG:()=>m});var s=t(84952),n=t(39131),o=t(97159);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},i=Object.values(a),l=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(?<serviceTitle>.+?)\\/(?<serverType>${i.join("|")})(?:\\/exts\\/(?<soeTitle>.+?)\\/(?<soeServerType>${i.join("|")}))?)(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),u=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/(?<serviceTitle>[^/\\n]+)\\/(?<serverType>${i.join("|")}))(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return l.test(e)}function p(e){if(null==e)return null;const r=(0,s.An)(e),t=r?.path.match(l)||r?.path.match(u);if(!t)return null;const{path:n,serviceTitle:o,serverType:i,soeTitle:c,soeServerType:d,sublayer:p}=t.groups??{},f=c||o,m=f.indexOf("/");return{title:h(-1!==m?f.slice(m+1):f),serverType:a[(d||i).toLowerCase()],sublayer:null!=p&&""!==p?parseInt(p,10):null,url:{path:n}}}function f(e){const r=(0,s.An)(e).path.match(c);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function h(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,r){const t=[];if(e){const r=p(e);null!=r&&r.title&&t.push(r.title)}if(r){const e=h(r);t.push(e)}if(2===t.length){if(t[0].toLowerCase().includes(t[1].toLowerCase()))return t[0];if(t[1].toLowerCase().includes(t[0].toLowerCase()))return t[1]}return t.join(" - ")}const y=["services","features","tiles","elevation3d","basemaps3d"];function w(e){let r=(0,s.$z)(e,!0);return!!r&&(r=r.toLowerCase(),!!r.endsWith(".arcgis.com")&&(!!y.some(e=>r.startsWith(e))||/^[a-z\d-]+\.svcs[a-z\d-]*\./.test(r)))}function g(e){return(0,n.$E)(e)&&function(e){const r=(0,s.$z)(e);return!!r&&r.toLowerCase().endsWith(".arcgis.com")}(e)}function v(e,r){return e?(0,s.UC)((0,s.zi)(e,r)):e}function q(e){let{url:r}=e;if(!r)return{url:r};r=(0,s.zi)(r,e.logger);const t=(0,s.An)(r),n=p(t.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),r=n.url.path;else if(e.nonStandardUrlAllowed){const e=f(t.path);null!=e&&(r=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(r),layerId:o}}function b(e,r,t,n,a){(0,o.w)(r,n,"url",a),n.url&&null!=e.layerId&&(n.url=(0,s.fj)(n.url,t,e.layerId.toString()))}function S(e){if(!e)return!1;const r=e.toLowerCase(),t=r.includes("/services/"),s=r.includes("/mapserver/wmsserver"),n=r.includes("/imageserver/wmsserver"),o=r.includes("/wmsserver");return t&&(s||n||o)}},11254(e,r,t){t.d(r,{A:()=>w});var s=t(92602),n=t(49186),o=t(44208),a=t(17676),i=t(84952),l=t(56152),u=t(65592),c=t(91869),d=t(60694);async function p(e){const r=function(e){let r,t=!1;return"string"==typeof e?(r=(0,i.$z)(e,!0),t=(0,d.Wo)(e)):(r=e.origin,t=(0,d.Wo)(e.toString())),null==r?null:new y(r,t)}(e.parameters.url);if(!r)return null;const{QueueProcessor:s,SharedConcurrency:n}=await t.e(563).then(t.bind(t,563));return(0,c.tE)(f,r.origin,()=>{const e=(r.isHosted?(0,o.A)("request-queue-concurrency-hosted"):(0,o.A)("request-queue-concurrency-non-hosted"))??4;return h??=new n((0,o.A)("request-queue-concurrency-global")??50),new s({concurrency:e,sharedConcurrency:h,process:e=>{if((0,a.G4)(e.parameters.requestOptions))throw(0,u.YB)("",(0,a.NK)("Request canceled"),e.parameters);return(0,u.zc)(e)}})})}const f=new Map;let h,m;class y{constructor(e,r){this.origin=e,this.isHosted=r}}async function w(e,r){e instanceof URL&&(e=e.toString());const s=(0,i.DB)(e),n=(0,i.w8)(e);n||s||(e=(0,i.S8)(e));const c={url:e,requestOptions:{...r}};r?.query&&(c.requestOptions.query=r?.query instanceof URLSearchParams?(0,i.zf)(r.query.toString().replaceAll("+"," ")):r?.query);const d=e=>({data:e,getAllHeaders:v,getHeader:v,httpStatus:200,requestOptions:c.requestOptions,url:c.url}),f=(0,i.sC)(e,g.internalInterceptors);if(f){const e=await q(f,c);if(null!=e)return d(e)}let h=(0,i.sC)(e);if(h){const e=await q(h,c);if(null!=e)return d(e);h.after||h.error||(h=null)}if(e=c.url,"image"===(r=c.requestOptions).responseType&&((0,o.A)("host-webworker")||(0,o.A)("host-node")))throw(0,u.YB)("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),c);if("head"===r.method){if(r.body)throw(0,u.YB)("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),c);if(s||n)throw(0,u.YB)("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),c)}if(await async function(){(0,o.A)("host-webworker")&&(!m&&globalThis.invokeStaticMessage?m=await t.e(369).then(t.bind(t,40369)):l.i.isForeignWorker=!0)}(),m)return m.execute(e,r);const y=new AbortController,w=(0,a.u7)(r,()=>y.abort()),b={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:h,parameters:c,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=r.useQueue?async function(e){const r=await p(e);return r?r.push(e):(0,u.zc)(e)}(b):(0,u.zc)(b),T=await S.finally(()=>w?.remove());return h?.after?.(T),T}const g=s.A.request,v=()=>null;async function q(e,r){if(null!=e.responseData)return e.responseData;if(e.headers&&(r.requestOptions.headers={...r.requestOptions.headers,...e.headers}),e.query&&(r.requestOptions.query={...r.requestOptions.query,...e.query}),e.before){let t,s;try{s=await e.before(r)}catch(e){t=(0,u.YB)("request:interceptor",e,r)}if((s instanceof Error||s instanceof n.A)&&(t=(0,u.YB)("request:interceptor",s,r)),t)throw e.error&&e.error(t),t;return s}}},56152(e,r,t){t.d(r,{i:()=>s});const s={corsServers:["https://server.arcgisonline.com","https://services.arcgisonline.com"],beforeFetch:void 0,afterFetch:void 0,isForeignWorker:!1}},95117(e,r,t){t.d(r,{y:()=>n});var s=t(17676);function n(e,r,t=!1,n){return new Promise((o,a)=>{if((0,s.G4)(n))return void a((0,s.NK)());let i=()=>{c(),a(new Error(`Unable to load ${r}`))},l=async()=>{const r=e;try{await r.decode()}catch{}c(),o(r)},u=()=>{if(!e)return;const r=e;c(),r.src="",a((0,s.NK)())};const c=()=>{e&&(e.removeEventListener("error",i),e.removeEventListener("load",l),i=null,l=null,e=null,n?.removeEventListener("abort",u),u=null,t&&URL.revokeObjectURL(r))};n?.addEventListener("abort",u),e.addEventListener("error",i),e.addEventListener("load",l)})}},65592(e,r,t){t.d(r,{YB:()=>x,c8:()=>$,zc:()=>b});var s=t(92602),n=t(70333),o=t(49186),a=t(44208),i=t(4718),l=t(17676),u=t(84952),c=t(39131),d=t(56152),p=t(95117),f=t(60694);const h=new Map;function m(e,r){const t=r?.preferredHost;if(!t||(0,u.FX)(e,`https://${t}`,!0))return;const s=(0,f.qg)(e);if(!s||"FeatureServer"!==s.serverType||(0,c.$E)(e))return;const n=s.url.path.toLowerCase();h.has(n)||h.set(n,t)}function y(e){const r=(0,f.qg)(e)?.url.path.toLowerCase();if(!r)return e;const t=h.get(r);return t?(0,u.hf)(e,t):e}const w="FormData"in globalThis,g=new Set([499,498,403,401]),v=new Set(["COM_0056","COM_0057","SB_0008"]),q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function b(e){let r,o;await async function(e){const r=e.parameters.url,o=e.parameters.requestOptions,a=e.controller.signal,i=o.body;let u=null,c=null;if(w&&"HTMLFormElement"in globalThis&&(i instanceof FormData?u=i:i instanceof HTMLFormElement&&(u=new FormData(i))),"string"==typeof i&&(c=i),e.fetchOptions={cache:o.cacheMode??(o.cacheBust?"no-cache":"default"),credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??s.A.request.priority,redirect:"follow",signal:a},(u||c)&&(e.fetchOptions.body=u||c),(d.i.isForeignWorker||"anonymous"===o.authMode)&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(r)||o.query?.token||u?.get("token")),!e.hasToken){const{getApiKey:s,getSessionToken:n}=await t.e(926).then(t.bind(t,926)),a=await n(r)??s(r);a&&(o.query??={},o.query.token=a,e.hasToken=!0)}if(e.useIdentity&&!e.hasToken&&!e.credential&&!e.credentialToken&&!O(r)&&!(0,l.G4)(a)){let t;"immediate"===o.authMode?(await A(),t=await n.id.getCredential(r,{signal:a})):"no-prompt"===o.authMode?(await A(),t=await n.id.getCredential(r,{prompt:!1,signal:a}).catch(()=>{})):n.id&&(t=n.id.findCredential(r)),t&&(e.credential=t,e.credentialToken=t.token,e.useSSL=!!t.ssl)}}(e);try{do{[r,o]=await S(e)}while(!await L(e,r,o))}catch(t){const s=x("request:server",t,e.parameters,r);throw s.details.ssl=e.useSSL,e.interceptor?.error?.(s),s}const a=e.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!e.hasToken&&!e.credentialToken&&o.user?.username&&!(0,u.FL)(a)){const e=(0,u.$z)(a,!0);e&&s.A.request.trustedServers.push(e)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&function(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const r=s.A.request.crossOriginNoCorsDomains;for(let t of e)t=t.toLowerCase(),/^https?:\/\//.test(t)?r[(0,u.$z)(t)??""]=0:(r[(0,u.$z)("http://"+t)??""]=0,r[(0,u.$z)("https://"+t)??""]=0)}(o.authorizedCrossOriginNoCorsDomains)}else"json"===(e.parameters.requestOptions.responseType||"json")&&m(a,o);const i=e.credential;if(i&&n.id){const e=n.id.findServerInfo(i.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=n.id.findCredential(r,i.userId);e&&-1===n.id._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:r?()=>Array.from(r.headers):E,getHeader:r?e=>r.headers.get(e):E,httpStatus:r?.status??200,requestOptions:e.parameters.requestOptions,ssl:e.useSSL,url:e.parameters.url}}async function S(e){let r=e.parameters.url,t=y(r);const o=e.parameters.requestOptions,i=e.fetchOptions??{},p=(0,u.w8)(r)||(0,u.DB)(r),f=o.responseType??"json",h=p?0:null!=o.timeout?o.timeout:s.A.request.timeout;let m=!1;if(!p){e.useSSL&&(r=(0,u.lM)(r));let l={...o.query};e.credentialToken&&(l.token=e.credentialToken);let d=(0,u.x0)(l);(0,a.A)("esri-url-encodes-apostrophe")&&(d=d.replaceAll("'","%27"));const p=t.length+1+d.length;let f;m="delete"===o.method||"post"===o.method||"put"===o.method||!!o.body||p>s.A.request.maxUrlLength;const h=o.useProxy||!!(0,u.zs)(r);if(h){const e=(0,u.s_)(r);f=e.path,!m&&f.length+1+p>s.A.request.maxUrlLength&&(m=!0),e.query&&(l={...e.query,...l})}if("HEAD"===i.method&&(m||h)){if(m){if(p>s.A.request.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.parameters);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.parameters)}if(h)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.parameters)}if(m?(i.method="delete"===o.method?"DELETE":"put"===o.method?"PUT":"POST",o.body?r=(0,u.a6)(r,l):(i.body=(0,u.x0)(l),i.headers||(i.headers={}),i.headers["Content-Type"]="application/x-www-form-urlencoded")):r=(0,u.a6)(r,l),h&&(e.useProxy=!0,r=`${f}?${r}`),l.token&&w&&i.body instanceof FormData&&!(0,c.$E)(r)&&i.body.set("token",l.token),o.hasOwnProperty("withCredentials"))e.withCredentials=o.withCredentials;else if(!(0,u.FX)(r,(0,u.Xq)()))if((0,u.FL)(r))e.withCredentials=!0;else if(n.id){const t=n.id.findServerInfo(r);t?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(i.credentials="include",function(e){const r=s.A.request.crossOriginNoCorsDomains;if(r){let t=(0,u.$z)(e);if(t)return t=t.toLowerCase(),!(0,u.FX)(t,(0,u.Xq)())&&r[t]<Date.now()-36e5}return!1}(r)&&await async function(e){const r=(0,u.An)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const t=s.A.request.crossOriginNoCorsDomains,n=(0,u.$z)(e);t&&n&&(t[n.toLowerCase()]=Date.now())}(m?(0,u.a6)(r,l):r)),t=y(r)}let g,v,q=0,b=!1;h>0&&(q=setTimeout(()=>{b=!0,e.controller.abort()},h));try{if("native-request-init"===o.responseType)v=i,v.url=t,o.signal?v.signal=o.signal:delete v.signal;else if("image"!==o.responseType||"default"!==i.cache||i.keepalive||"GET"!==i.method||m||function(e){if(e)for(const r of Object.getOwnPropertyNames(e))if(e[r])return!0;return!1}(o.headers)||!p&&!e.useProxy&&s.A.request.proxyUrl&&!C(r)){if(await(d.i.beforeFetch?.(r,i)),g=await fetch(t,i),await(d.i.afterFetch?.(g)),e.useProxy||function(e){const r=(0,u.$z)(e);r&&!d.i.corsServers.includes(r)&&d.i.corsServers.push(r)}(r),"native"===o.responseType)v=g;else if("HEAD"!==i.method)if(g.ok){switch(f){case"array-buffer":v=await g.arrayBuffer();break;case"blob":case"image":v=await g.blob();break;default:v=await g.text()}if(q&&(clearTimeout(q),q=0),"json"===f||"xml"===f||"document"===f)if(v)switch(f){case"json":v=JSON.parse(v);break;case"xml":v=k(v,"application/xml");break;case"document":v=k(v,"text/html")}else v=null;if(v){if(("array-buffer"===f||"blob"===f)&&v["blob"===f?"size":"byteLength"]<=750)try{const e=await new Response(v).json();e.error&&(v=e)}catch{}"image"===f&&v instanceof Blob&&(v=await T(URL.createObjectURL(v),e,!0))}}else{v=await g.text();try{v=JSON.parse(v)}catch{}}}else v=await T(t,e)}catch(t){if("AbortError"===t.name){if(b)throw new Error(P);throw(0,l.NK)("Request canceled")}if(!(!g&&t instanceof TypeError&&s.A.request.proxyUrl)||o.body||"delete"===o.method||"head"===o.method||"post"===o.method||"put"===o.method||e.useProxy||C(r))throw t;e.redoRequest=!0,(0,u.oy)({proxyUrl:s.A.request.proxyUrl,urlPrefix:(0,u.$z)(r)??""})}finally{q&&clearTimeout(q)}return[g,v]}function T(e,r,t=!1){const n=r.controller.signal,o=new Image;return r.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=s.A.request.priority,o.src=e,(0,p.y)(o,e,t,n)}function C(e){const r=(0,u.$z)(e);return!r||r.endsWith(".arcgis.com")||d.i.corsServers.includes(r)||(0,u.FL)(r)}async function A(){n.id||await Promise.all([t.e(7632),t.e(6408),t.e(1431),t.e(9466),t.e(5482),t.e(148),t.e(8050)]).then(t.bind(t,50148))}function O(e){return q.some(r=>r.test(e))}function k(e,r){let t;try{t=(new DOMParser).parseFromString(e,r)}catch{}if(!t||t.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return t}async function L(e,r,t){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.parameters.requestOptions;if(!r||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(t&&(t.error&&"object"==typeof t.error?o=t.error:"error"===t.status&&Array.isArray(t.messages)&&(o={...t},o[U]=t,o.details=t.messages)),!o&&!r.ok)throw o=new Error(`Unable to load ${r.url} status: ${r.status}`),o[U]=t,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const u=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&g.has(a)&&!O(e.parameters.url)&&(403!==a||(!i||!v.has(i))&&(null==l||2===l&&e.credentialToken))){await A();try{const r=await n.id.getCredential(e.parameters.url,{error:x("request:server",o,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(r){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;o=r}}if(o)throw o;return!0}function x(e,r,t,s){let n;const a={url:t.url,requestOptions:t.requestOptions,getAllHeaders:E,getHeader:E,ssl:!1};if(r instanceof o.A)return r.details?(r.details=(0,i.o8)(r.details),r.details.url=t.url,r.details.requestOptions=t.requestOptions):r.details=a,r;if(r){const e=s&&(()=>Array.from(s.headers)),t=s&&(e=>s.headers.get(e)),o=s?.status,i=r.message;i&&(n=i),e&&t&&(a.getAllHeaders=e,a.getHeader=t),a.httpStatus=(null!=r.httpCode?r.httpCode:r.code)||o||0,a.subCode=r.subcode,a.messageCode=r.messageCode,"string"==typeof r.details?(a.messages=[r.details],n??=r.details):(a.messages=r.details,n??=a.messages?.[0]),a.raw=U in r?r[U]:r}return n??="Error",(0,l.zf)(r)?(0,l.NK)():new o.A(e,n,a)}const U=Symbol(),E=()=>null,P="Timeout exceeded";function $(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===P}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2741],{2741(e,r,t){t.d(r,{s:()=>i});var s=t(92602),n=(t(11254),t(49186)),o=t(53966),a=t(84952);function i(e){if(!s.A.assetsPath)throw o.A.getLogger("esri.assets").errorOnce("The API assets location needs to be set using config.assetsPath. More information: https://arcg.is/1OzLe50"),new n.A("assets:path-not-set","config.assetsPath is not set");return(0,a.fj)(s.A.assetsPath,e)}},97159(e,r,t){t.d(r,{a:()=>y,b:()=>g,e:()=>h,f:()=>a,i:()=>p,p:()=>f,r:()=>l,t:()=>i,w:()=>u});var s=t(70333),n=t(84952),o=t(39131);function a(e,r){const t=r?.url?.path;if(e&&t&&(e=(0,n.s2)(e,t,{preserveProtocolRelative:!0}),r.portalItem&&r.readResourcePaths)){const t=(0,n.V1)(e,r.portalItem.itemUrl);null!=t&&t.startsWith(d)&&r.readResourcePaths.push(r.portalItem.resourceFromPath(t).path)}return(e=m(e,r?.portal))&&c.test(e)?y(e):e}function i(e,r,t=0){if(null==(e=e&&c.test(e)?w(e):e))return e;!(0,n.oP)(e)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(e);let s=(0,n.s2)(e);if(r){const t=r.verifyItemRelativeUrls?.rootPath||r.url?.path;if(t){const o=m(t,r.portal),a=m(s,r.portal);s=(0,n.V1)(a,o,o),null!=s&&s!==a&&s!==e&&r.verifyItemRelativeUrls&&r.verifyItemRelativeUrls.writtenUrls.push(s)}}return s=h(s,r?.portal),(0,n.oP)(s)&&(s=(0,n.S8)(s)),r?.resources&&r?.portalItem&&!(0,n.oP)(s)&&!(0,n.DB)(s)&&0===t&&r.resources.toKeep.push({resource:r.portalItem.resourceFromPath(s),compress:!1}),s}function l(e,r,t){return a(e,t)}function u(e,r,t,s){const n=i(e,s);void 0!==n&&(r[t]=n)}const c=/\/items\/([^/]+)\/resources\/(.*)/,d="./resources/";function p(e){const r=e?.match(c)??null;return r?.[1]??null}function f(e){const r=e?.match(c)??null;if(null==r)return null;const t=r[2],s=t.lastIndexOf("/");if(-1===s){const{path:e,extension:r}=(0,n.xw)(t);return{prefix:null,filename:e,extension:r}}const{path:o,extension:a}=(0,n.xw)(t.slice(s+1));return{prefix:t.slice(0,s),filename:o,extension:a}}function h(e,r){return r&&!r.isPortal&&r.urlKey&&r.customBaseUrl?(0,n.T1)(e,`${r.urlKey}.${r.customBaseUrl}`,r.portalHostname):e}function m(e,r){if(!r||r.isPortal||!r.urlKey||!r.customBaseUrl)return e;const t=`${r.urlKey}.${r.customBaseUrl}`,s=(0,n.Xq)();return(0,n.FX)(s,`${s.scheme}://${t}`)?(0,n.T1)(e,r.portalHostname,t):(0,n.T1)(e,t,r.portalHostname)}function y(e){if(!e)return e||null;let r=e;return r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r),r=r.replace(/^https?:\/\/www\.arcgis\.com/,"https://cdn.arcgis.com"),r=r.replace(/^https?:\/\/devext\.arcgis\.com/,"https://cdndev.arcgis.com"),r=r.replace(/^https?:\/\/qaext\.arcgis\.com/,"https://cdnqa.arcgis.com")),r}function w(e){if(!e)return e||null;let r=e;return r=r.replace(/^https?:\/\/cdn\.arcgis\.com/,"https://www.arcgis.com"),r=r.replace(/^https?:\/\/cdndev\.arcgis\.com/,"https://devext.arcgis.com"),r=r.replace(/^https?:\/\/cdnqa\.arcgis\.com/,"https://qaext.arcgis.com"),r&&s.id&&!s.id.findCredential(r)&&(r=(0,o.qG)(r)),r}const g=Object.freeze(Object.defineProperty({__proto__:null,ensureMainOnlineDomain:h,fromCDNUrl:w,fromJSON:a,itemIdFromResourceUrl:p,prefixAndFilenameFromResourceUrl:f,read:l,toCDNUrl:y,toJSON:i,write:u},Symbol.toStringTag,{value:"Module"}))},91869(e,r,t){function s(e,r){for(const t of e.values())if(r(t))return!0;return!1}function n(e,r){for(const t of e.values())if(!r(t))return!1;return!0}function o(e,r,t){const s=e.get(r);if(void 0!==s)return s;const n=t();return e.set(r,n),n}function a(e){const r=new Map;return t=>(r.has(t)||r.set(t,e(t)),r.get(t))}t.d(r,{Bj:()=>a,Bs:()=>s,mt:()=>n,tE:()=>o})},60694(e,r,t){t.d(r,{Fi:()=>d,HZ:()=>q,Jf:()=>v,LS:()=>b,Wo:()=>w,bd:()=>S,cr:()=>h,iz:()=>f,qg:()=>p,uV:()=>g,yG:()=>m});var s=t(84952),n=t(39131),o=t(97159);const a={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",knowledgegraphserver:"KnowledgeGraphServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer","3dtilesserver":"3DTilesServer",videoserver:"VideoServer"},i=Object.values(a),l=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(?<serviceTitle>.+?)\\/(?<serverType>${i.join("|")})(?:\\/exts\\/(?<soeTitle>.+?)\\/(?<soeServerType>${i.join("|")}))?)(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),u=new RegExp(`^(?<path>(?:https?:)?\\/\\/\\S+?\\/(?<serviceTitle>[^/\\n]+)\\/(?<serverType>${i.join("|")}))(?:\\/(?:layers))?(?:\\/(?<sublayer>\\d+))?`,"i"),c=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function d(e){return l.test(e)}function p(e){if(null==e)return null;const r=(0,s.An)(e),t=r?.path.match(l)||r?.path.match(u);if(!t)return null;const{path:n,serviceTitle:o,serverType:i,soeTitle:c,soeServerType:d,sublayer:p}=t.groups??{},f=c||o,m=f.indexOf("/");return{title:h(-1!==m?f.slice(m+1):f),serverType:a[(d||i).toLowerCase()],sublayer:null!=p&&""!==p?parseInt(p,10):null,url:{path:n}}}function f(e){const r=(0,s.An)(e).path.match(c);return r?{serviceUrl:r[1],sublayerId:Number(r[2])}:null}function h(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function m(e,r){const t=[];if(e){const r=p(e);null!=r&&r.title&&t.push(r.title)}if(r){const e=h(r);t.push(e)}if(2===t.length){if(t[0].toLowerCase().includes(t[1].toLowerCase()))return t[0];if(t[1].toLowerCase().includes(t[0].toLowerCase()))return t[1]}return t.join(" - ")}const y=["services","features","tiles","elevation3d","basemaps3d"];function w(e){let r=(0,s.$z)(e,!0);return!!r&&(r=r.toLowerCase(),!!r.endsWith(".arcgis.com")&&(!!y.some(e=>r.startsWith(e))||/^[a-z\d-]+\.svcs[a-z\d-]*\./.test(r)))}function g(e){return(0,n.$E)(e)&&function(e){const r=(0,s.$z)(e);return!!r&&r.toLowerCase().endsWith(".arcgis.com")}(e)}function v(e,r){return e?(0,s.UC)((0,s.zi)(e,r)):e}function q(e){let{url:r}=e;if(!r)return{url:r};r=(0,s.zi)(r,e.logger);const t=(0,s.An)(r),n=p(t.path);let o;if(null!=n)null!=n.sublayer&&null==e.layer.layerId&&(o=n.sublayer),r=n.url.path;else if(e.nonStandardUrlAllowed){const e=f(t.path);null!=e&&(r=e.serviceUrl,o=e.sublayerId)}return{url:(0,s.UC)(r),layerId:o}}function b(e,r,t,n,a){(0,o.w)(r,n,"url",a),n.url&&null!=e.layerId&&(n.url=(0,s.fj)(n.url,t,e.layerId.toString()))}function S(e){if(!e)return!1;const r=e.toLowerCase(),t=r.includes("/services/"),s=r.includes("/mapserver/wmsserver"),n=r.includes("/imageserver/wmsserver"),o=r.includes("/wmsserver");return t&&(s||n||o)}},11254(e,r,t){t.d(r,{A:()=>w});var s=t(92602),n=t(49186),o=t(44208),a=t(17676),i=t(84952),l=t(56152),u=t(65592),c=t(91869),d=t(60694);async function p(e){const r=function(e){let r,t=!1;return"string"==typeof e?(r=(0,i.$z)(e,!0),t=(0,d.Wo)(e)):(r=e.origin,t=(0,d.Wo)(e.toString())),null==r?null:new y(r,t)}(e.parameters.url);if(!r)return null;const{QueueProcessor:s,SharedConcurrency:n}=await t.e(563).then(t.bind(t,563));return(0,c.tE)(f,r.origin,()=>{const e=(r.isHosted?(0,o.A)("request-queue-concurrency-hosted"):(0,o.A)("request-queue-concurrency-non-hosted"))??4;return h??=new n((0,o.A)("request-queue-concurrency-global")??50),new s({concurrency:e,sharedConcurrency:h,process:e=>{if((0,a.G4)(e.parameters.requestOptions))throw(0,u.YB)("",(0,a.NK)("Request canceled"),e.parameters);return(0,u.zc)(e)}})})}const f=new Map;let h,m;class y{constructor(e,r){this.origin=e,this.isHosted=r}}async function w(e,r){e instanceof URL&&(e=e.toString());const s=(0,i.DB)(e),n=(0,i.w8)(e);n||s||(e=(0,i.S8)(e));const c={url:e,requestOptions:{...r}};r?.query&&(c.requestOptions.query=r?.query instanceof URLSearchParams?(0,i.zf)(r.query.toString().replaceAll("+"," ")):r?.query);const d=e=>({data:e,getAllHeaders:v,getHeader:v,httpStatus:200,requestOptions:c.requestOptions,url:c.url}),f=(0,i.sC)(e,g.internalInterceptors);if(f){const e=await q(f,c);if(null!=e)return d(e)}let h=(0,i.sC)(e);if(h){const e=await q(h,c);if(null!=e)return d(e);h.after||h.error||(h=null)}if(e=c.url,"image"===(r=c.requestOptions).responseType&&((0,o.A)("host-webworker")||(0,o.A)("host-node")))throw(0,u.YB)("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),c);if("head"===r.method){if(r.body)throw(0,u.YB)("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),c);if(s||n)throw(0,u.YB)("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),c)}if(await async function(){(0,o.A)("host-webworker")&&(!m&&globalThis.invokeStaticMessage?m=await t.e(369).then(t.bind(t,40369)):l.i.isForeignWorker=!0)}(),m)return m.execute(e,r);const y=new AbortController,w=(0,a.u7)(r,()=>y.abort()),b={controller:y,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:h,parameters:c,redoRequest:!1,useIdentity:g.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},S=r.useQueue?async function(e){const r=await p(e);return r?r.push(e):(0,u.zc)(e)}(b):(0,u.zc)(b),T=await S.finally(()=>w?.remove());return h?.after?.(T),T}const g=s.A.request,v=()=>null;async function q(e,r){if(null!=e.responseData)return e.responseData;if(e.headers&&(r.requestOptions.headers={...r.requestOptions.headers,...e.headers}),e.query&&(r.requestOptions.query={...r.requestOptions.query,...e.query}),e.before){let t,s;try{s=await e.before(r)}catch(e){t=(0,u.YB)("request:interceptor",e,r)}if((s instanceof Error||s instanceof n.A)&&(t=(0,u.YB)("request:interceptor",s,r)),t)throw e.error&&e.error(t),t;return s}}},56152(e,r,t){t.d(r,{i:()=>s});const s={corsServers:["https://server.arcgisonline.com","https://services.arcgisonline.com"],beforeFetch:void 0,afterFetch:void 0,isForeignWorker:!1}},95117(e,r,t){t.d(r,{y:()=>n});var s=t(17676);function n(e,r,t=!1,n){return new Promise((o,a)=>{if((0,s.G4)(n))return void a((0,s.NK)());let i=()=>{c(),a(new Error(`Unable to load ${r}`))},l=async()=>{const r=e;try{await r.decode()}catch{}c(),o(r)},u=()=>{if(!e)return;const r=e;c(),r.src="",a((0,s.NK)())};const c=()=>{e&&(e.removeEventListener("error",i),e.removeEventListener("load",l),i=null,l=null,e=null,n?.removeEventListener("abort",u),u=null,t&&URL.revokeObjectURL(r))};n?.addEventListener("abort",u),e.addEventListener("error",i),e.addEventListener("load",l)})}},65592(e,r,t){t.d(r,{YB:()=>x,c8:()=>$,zc:()=>b});var s=t(92602),n=t(70333),o=t(49186),a=t(44208),i=t(4718),l=t(17676),u=t(84952),c=t(39131),d=t(56152),p=t(95117),f=t(60694);const h=new Map;function m(e,r){const t=r?.preferredHost;if(!t||(0,u.FX)(e,`https://${t}`,!0))return;const s=(0,f.qg)(e);if(!s||"FeatureServer"!==s.serverType||(0,c.$E)(e))return;const n=s.url.path.toLowerCase();h.has(n)||h.set(n,t)}function y(e){const r=(0,f.qg)(e)?.url.path.toLowerCase();if(!r)return e;const t=h.get(r);return t?(0,u.hf)(e,t):e}const w="FormData"in globalThis,g=new Set([499,498,403,401]),v=new Set(["COM_0056","COM_0057","SB_0008"]),q=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i];async function b(e){let r,o;await async function(e){const r=e.parameters.url,o=e.parameters.requestOptions,a=e.controller.signal,i=o.body;let u=null,c=null;if(w&&"HTMLFormElement"in globalThis&&(i instanceof FormData?u=i:i instanceof HTMLFormElement&&(u=new FormData(i))),"string"==typeof i&&(c=i),e.fetchOptions={cache:o.cacheMode??(o.cacheBust?"no-cache":"default"),credentials:"same-origin",headers:o.headers||{},keepalive:o.keepAlive??!1,method:"head"===o.method?"HEAD":"GET",mode:"cors",priority:o.priority??s.A.request.priority,redirect:"follow",signal:a},(u||c)&&(e.fetchOptions.body=u||c),(d.i.isForeignWorker||"anonymous"===o.authMode)&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(r)||o.query?.token||u?.get("token")),!e.hasToken){const{getApiKey:s,getSessionToken:n}=await t.e(926).then(t.bind(t,926)),a=await n(r)??s(r);a&&(o.query??={},o.query.token=a,e.hasToken=!0)}if(e.useIdentity&&!e.hasToken&&!e.credential&&!e.credentialToken&&!O(r)&&!(0,l.G4)(a)){let t;"immediate"===o.authMode?(await A(),t=await n.id.getCredential(r,{signal:a})):"no-prompt"===o.authMode?(await A(),t=await n.id.getCredential(r,{prompt:!1,signal:a}).catch(()=>{})):n.id&&(t=n.id.findCredential(r)),t&&(e.credential=t,e.credentialToken=t.token,e.useSSL=!!t.ssl)}}(e);try{do{[r,o]=await S(e)}while(!await L(e,r,o))}catch(t){const s=x("request:server",t,e.parameters,r);throw s.details.ssl=e.useSSL,e.interceptor?.error?.(s),s}const a=e.parameters.url;if(o)if(/\/sharing\/rest\/(accounts|portals)\/self/i.test(a)){if(!e.hasToken&&!e.credentialToken&&o.user?.username&&!(0,u.FL)(a)){const e=(0,u.$z)(a,!0);e&&s.A.request.trustedServers.push(e)}Array.isArray(o.authorizedCrossOriginNoCorsDomains)&&function(e){s.A.request.crossOriginNoCorsDomains||(s.A.request.crossOriginNoCorsDomains={});const r=s.A.request.crossOriginNoCorsDomains;for(let t of e)t=t.toLowerCase(),/^https?:\/\//.test(t)?r[(0,u.$z)(t)??""]=0:(r[(0,u.$z)("http://"+t)??""]=0,r[(0,u.$z)("https://"+t)??""]=0)}(o.authorizedCrossOriginNoCorsDomains)}else"json"===(e.parameters.requestOptions.responseType||"json")&&m(a,o);const i=e.credential;if(i&&n.id){const e=n.id.findServerInfo(i.server);let r=e?.owningSystemUrl;if(r){r=r.replace(/\/?$/,"/sharing");const e=n.id.findCredential(r,i.userId);e&&-1===n.id._getIdenticalSvcIdx(r,e)&&e.resources.unshift(r)}}return{data:o,getAllHeaders:r?()=>Array.from(r.headers):E,getHeader:r?e=>r.headers.get(e):E,httpStatus:r?.status??200,requestOptions:e.parameters.requestOptions,ssl:e.useSSL,url:e.parameters.url}}async function S(e){let r=e.parameters.url,t=y(r);const o=e.parameters.requestOptions,i=e.fetchOptions??{},p=(0,u.w8)(r)||(0,u.DB)(r),f=o.responseType??"json",h=p?0:null!=o.timeout?o.timeout:s.A.request.timeout;let m=!1;if(!p){e.useSSL&&(r=(0,u.lM)(r));let l={...o.query};e.credentialToken&&(l.token=e.credentialToken);let d=(0,u.x0)(l);(0,a.A)("esri-url-encodes-apostrophe")&&(d=d.replaceAll("'","%27"));const p=t.length+1+d.length;let f;m="delete"===o.method||"post"===o.method||"put"===o.method||!!o.body||p>s.A.request.maxUrlLength;const h=o.useProxy||!!(0,u.zs)(r);if(h){const e=(0,u.s_)(r);f=e.path,!m&&f.length+1+p>s.A.request.maxUrlLength&&(m=!0),e.query&&(l={...e.query,...l})}if("HEAD"===i.method&&(m||h)){if(m){if(p>s.A.request.maxUrlLength)throw x("request:invalid-parameters",new Error("URL exceeds maximum length"),e.parameters);throw x("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.parameters)}if(h)throw x("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.parameters)}if(m?(i.method="delete"===o.method?"DELETE":"put"===o.method?"PUT":"POST",o.body?r=(0,u.a6)(r,l):(i.body=(0,u.x0)(l),i.headers||(i.headers={}),i.headers["Content-Type"]="application/x-www-form-urlencoded")):r=(0,u.a6)(r,l),h&&(e.useProxy=!0,r=`${f}?${r}`),l.token&&w&&i.body instanceof FormData&&!(0,c.$E)(r)&&i.body.set("token",l.token),o.hasOwnProperty("withCredentials"))e.withCredentials=o.withCredentials;else if(!(0,u.FX)(r,(0,u.Xq)()))if((0,u.FL)(r))e.withCredentials=!0;else if(n.id){const t=n.id.findServerInfo(r);t?.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(i.credentials="include",function(e){const r=s.A.request.crossOriginNoCorsDomains;if(r){let t=(0,u.$z)(e);if(t)return t=t.toLowerCase(),!(0,u.FX)(t,(0,u.Xq)())&&r[t]<Date.now()-36e5}return!1}(r)&&await async function(e){const r=(0,u.An)(e);e=r.path,"json"===r.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}const t=s.A.request.crossOriginNoCorsDomains,n=(0,u.$z)(e);t&&n&&(t[n.toLowerCase()]=Date.now())}(m?(0,u.a6)(r,l):r)),t=y(r)}let g,v,q=0,b=!1;h>0&&(q=setTimeout(()=>{b=!0,e.controller.abort()},h));try{if("native-request-init"===o.responseType)v=i,v.url=t,o.signal?v.signal=o.signal:delete v.signal;else if("image"!==o.responseType||"default"!==i.cache||i.keepalive||"GET"!==i.method||m||function(e){if(e)for(const r of Object.getOwnPropertyNames(e))if(e[r])return!0;return!1}(o.headers)||!p&&!e.useProxy&&s.A.request.proxyUrl&&!C(r)){if(await(d.i.beforeFetch?.(r,i)),g=await fetch(t,i),await(d.i.afterFetch?.(g)),e.useProxy||function(e){const r=(0,u.$z)(e);r&&!d.i.corsServers.includes(r)&&d.i.corsServers.push(r)}(r),"native"===o.responseType)v=g;else if("HEAD"!==i.method)if(g.ok){switch(f){case"array-buffer":v=await g.arrayBuffer();break;case"blob":case"image":v=await g.blob();break;default:v=await g.text()}if(q&&(clearTimeout(q),q=0),"json"===f||"xml"===f||"document"===f)if(v)switch(f){case"json":v=JSON.parse(v);break;case"xml":v=k(v,"application/xml");break;case"document":v=k(v,"text/html")}else v=null;if(v){if(("array-buffer"===f||"blob"===f)&&v["blob"===f?"size":"byteLength"]<=750)try{const e=await new Response(v).json();e.error&&(v=e)}catch{}"image"===f&&v instanceof Blob&&(v=await T(URL.createObjectURL(v),e,!0))}}else{v=await g.text();try{v=JSON.parse(v)}catch{}}}else v=await T(t,e)}catch(t){if("AbortError"===t.name){if(b)throw new Error(P);throw(0,l.NK)("Request canceled")}if(!(!g&&t instanceof TypeError&&s.A.request.proxyUrl)||o.body||"delete"===o.method||"head"===o.method||"post"===o.method||"put"===o.method||e.useProxy||C(r))throw t;e.redoRequest=!0,(0,u.oy)({proxyUrl:s.A.request.proxyUrl,urlPrefix:(0,u.$z)(r)??""})}finally{q&&clearTimeout(q)}return[g,v]}function T(e,r,t=!1){const n=r.controller.signal,o=new Image;return r.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=s.A.request.priority,o.src=e,(0,p.y)(o,e,t,n)}function C(e){const r=(0,u.$z)(e);return!r||r.endsWith(".arcgis.com")||d.i.corsServers.includes(r)||(0,u.FL)(r)}async function A(){n.id||await Promise.all([t.e(7632),t.e(6408),t.e(477),t.e(9466),t.e(5482),t.e(148),t.e(8050)]).then(t.bind(t,50148))}function O(e){return q.some(r=>r.test(e))}function k(e,r){let t;try{t=(new DOMParser).parseFromString(e,r)}catch{}if(!t||t.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return t}async function L(e,r,t){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.parameters.requestOptions;if(!r||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let o,a;if(t&&(t.error&&"object"==typeof t.error?o=t.error:"error"===t.status&&Array.isArray(t.messages)&&(o={...t},o[U]=t,o.details=t.messages)),!o&&!r.ok)throw o=new Error(`Unable to load ${r.url} status: ${r.status}`),o[U]=t,o;let i,l=null;o&&(a=Number(o.code),l=o.hasOwnProperty("subcode")?Number(o.subcode):null,i=o.messageCode,i=i?.toUpperCase());const u=s.authMode;if(403===a&&(4===l||o.message?.toLowerCase().includes("ssl")&&!o.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==u||498===a)&&void 0!==a&&g.has(a)&&!O(e.parameters.url)&&(403!==a||(!i||!v.has(i))&&(null==l||2===l&&e.credentialToken))){await A();try{const r=await n.id.getCredential(e.parameters.url,{error:x("request:server",o,e.parameters),credential:e.credential,prompt:"no-prompt"!==u,signal:e.controller.signal,token:e.credentialToken});return e.credential=r,e.credentialToken=r.token,e.useSSL=e.useSSL||r.ssl,!1}catch(r){if("no-prompt"===u)return e.credential=void 0,e.credentialToken=void 0,!1;o=r}}if(o)throw o;return!0}function x(e,r,t,s){let n;const a={url:t.url,requestOptions:t.requestOptions,getAllHeaders:E,getHeader:E,ssl:!1};if(r instanceof o.A)return r.details?(r.details=(0,i.o8)(r.details),r.details.url=t.url,r.details.requestOptions=t.requestOptions):r.details=a,r;if(r){const e=s&&(()=>Array.from(s.headers)),t=s&&(e=>s.headers.get(e)),o=s?.status,i=r.message;i&&(n=i),e&&t&&(a.getAllHeaders=e,a.getHeader=t),a.httpStatus=(null!=r.httpCode?r.httpCode:r.code)||o||0,a.subCode=r.subcode,a.messageCode=r.messageCode,"string"==typeof r.details?(a.messages=[r.details],n??=r.details):(a.messages=r.details,n??=a.messages?.[0]),a.raw=U in r?r[U]:r}return n??="Error",(0,l.zf)(r)?(0,l.NK)():new o.A(e,n,a)}const U=Symbol(),E=()=>null,P="Timeout exceeded";function $(e){return"object"==typeof e&&!!e&&"message"in e&&e.message===P}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5217],{25217(e,t,i){i.r(t),i.d(t,{default:()=>w});var a=i(49186),s=i(17676),c=i(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5217],{25217(e,t,i){i.r(t),i.d(t,{default:()=>w});var a=i(49186),s=i(17676),c=i(27925),l=i(16930),o=i(19211),n=i(35063),r=i(28208),h=i(66655);class w{constructor(e,t,i,c,w,u,d,f,m,p){this.level=e,this.row=t,this.column=i,this.horizontalFieldOfView=c,this.verticalFieldOfView=w,this.yaw=u,this.pitch=d,this.distance=f,this.horizonAngles=m,this.getPixelBlock=p,this._cache=null,this.loadMesh=async e=>{const{level:t,row:i,column:c,horizontalFieldOfView:w,verticalFieldOfView:u,yaw:d,pitch:f,distance:m}=this,{Mesh:p,MeshComponent:v,MeshVertexAttributes:g,panoramicMeshManager:A}=await(0,h.Zg)(),{faces:x,...M}=await A.getFacesWithVertexAttributes({distance:m,yaw:d,horizontalFieldOfView:w,pitch:f,verticalFieldOfView:u});(0,s.Te)(e);const V=await this.getPixelBlock(t,i,c,e);if((0,s.Te)(e),!V)throw new a.A("panoramic-viewer:missing-tile-data",`Tile data for level ${t}, row ${i}, column ${c} is missing`,{level:t,row:i,column:c});const b=await A.convertPixelBlockToImageData(V);(0,s.Te)(e);const k=new p({vertexAttributes:new g(M),components:[new v({faces:x,trustSourceNormals:!0,material:new o.default({colorTexture:new n.default({data:b})})})],spatialReference:l.A.WebMercator});return k.rotate(...this.horizonAngles,{origin:r.ZH}),await k.load(e),this._cache=k,this._cache},this.loadMeshAtDistance=async(e,t)=>{const i=this.distance;return this.distance=e,Math.abs(i-e)>1e-6&&this._cache?this._cache:await this.loadMesh(t)}}get loaded(){return null!==this._cache}get key(){return`${this.level}/${this.row}/${this.column}`}clone(){const{level:e,row:t,column:i,horizontalFieldOfView:a,verticalFieldOfView:s,yaw:l,pitch:o,distance:n,getPixelBlock:r,horizonAngles:h}=this,u=new w(e,t,i,a,s,l,o,n,h,r);if(this._cache){const{vertexAttributes:e,components:t,spatialReference:i}=this._cache,a=t?.map(({material:e,faces:t,trustSourceNormals:i})=>({material:e,faces:t?.slice(),trustSourceNormals:i}));u._cache=new c.default({components:a,vertexAttributes:e.clone(),spatialReference:i})}return u}}}}]);
|