@arcgis/core 4.27.0-next.20230413 → 4.27.0-next.20230415
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/Ground.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{384739a9e2612500a51a.js → 08132e398250bff9b73b.js} +1 -1
- package/assets/esri/core/workers/chunks/{514346a7831c08ec7c1e.js → 09c234b0e3d9535a34ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{d9ef4891c8b0bdd90f5b.js → 1cf75e69a71e273d26a4.js} +1 -1
- package/assets/esri/core/workers/chunks/{6e3b4fa0c70db70c3d1e.js → 41ae9037c70461d5fdc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{fc091acef5264bacd97f.js → 4986d1d7ea0a005a1710.js} +1 -1
- package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +1 -0
- package/assets/esri/core/workers/chunks/5f377562d5f2adb04878.js +1 -0
- package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +1 -0
- package/assets/esri/core/workers/chunks/{1255f9a6e86aa4120bb4.js → 6b065e581bcf743079cf.js} +1 -1
- package/assets/esri/core/workers/chunks/7f3b0856f594df2b044e.js +1 -0
- package/assets/esri/core/workers/chunks/{f5beba20a571f975373b.js → 7fb01dfb7f7bf8b05e7a.js} +1 -1
- package/assets/esri/core/workers/chunks/{1c13b6014943f6190b32.js → 81485a5056aed94b3d8d.js} +1 -1
- package/assets/esri/core/workers/chunks/81529aee5e6efa3afc83.js +1 -0
- package/assets/esri/core/workers/chunks/{ff84934441b9d7b63853.js → 8374d89e995f0d15c042.js} +1 -1
- package/assets/esri/core/workers/chunks/{d35d8b02b884fdda4ecc.js → 8dfa32cc8453f85faab0.js} +1 -1
- package/assets/esri/core/workers/chunks/8ffd5add6deec2bf8a1c.js +1 -0
- package/assets/esri/core/workers/chunks/{3d6ec42d92895cc6d060.js → 940f35638b7d53c67ec8.js} +1 -1
- package/assets/esri/core/workers/chunks/{ce4c3c7cf9c672c2ff0b.js → 94b68be8f6f312d612a6.js} +1 -1
- package/assets/esri/core/workers/chunks/9ca395f7bc8d397b5240.js +1 -0
- package/assets/esri/core/workers/chunks/9eebe182ec56486beacb.js +1 -0
- package/assets/esri/core/workers/chunks/{c06b186425df910f3978.js → a6f1d9c7250fa68a8700.js} +15 -15
- package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +1 -0
- package/assets/esri/core/workers/chunks/{b7fb6bcb6b42c6752e09.js → b86e8ebe76d27b466b9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7a820e6208e4a02e9bbc.js → b976d5599672665561ec.js} +1 -1
- package/assets/esri/core/workers/chunks/{05ccf4b9dd618bbf7fde.js → c4972a2f3aa20ce0eae6.js} +1 -1
- package/assets/esri/core/workers/chunks/{0eb26c0191d624b9a128.js → d5f6640c639423e37c6b.js} +1 -1
- package/assets/esri/core/workers/chunks/eec12b5666819bf2119d.js +1 -0
- package/assets/esri/core/workers/chunks/f2d6960d2196e9342320.js +1 -0
- package/assets/esri/themes/base/widgets/_FeatureMedia.scss +3 -0
- package/assets/esri/themes/base/widgets/_Popup.scss +26 -17
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/core/accessorSupport/Properties.js +1 -1
- package/core/accessorSupport/Property.js +1 -1
- package/core/accessorSupport/decorators/subclass.js +1 -1
- package/core/accessorSupport/tracking.js +1 -1
- package/interfaces.d.ts +10 -4
- package/intl/date.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/package.json +1 -1
- package/popup/support/FieldInfoFormat.js +1 -1
- package/request.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/CIMSymbolRasterizer.js +1 -1
- package/symbols/cim/TextRasterizer.js +1 -1
- package/views/2d/engine/Stage.js +1 -1
- package/views/2d/engine/imagery/BrushRasterBitmap.js +1 -1
- package/views/2d/engine/webgl/AttributeStoreView.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushDotDensity.js +1 -1
- package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +1 -1
- package/views/2d/engine/webgl/effects/highlight/HighlightSurfaces.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/Bloom.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/Blur.js +1 -1
- package/views/2d/engine/webgl/effects/post-processing/DropShadow.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/NoiseTextureAtlas.js +1 -1
- package/views/3d/environment/SunLighting.js +1 -1
- package/views/3d/environment/VirtualLighting.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/support/MultiSizeFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Highlight.js +1 -1
- package/views/3d/webgl-engine/lib/RenderTargetHelper.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOHelper.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SmaaRenderPass.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/imageReprojection.js +1 -1
- package/views/webgl/FramebufferDescriptor.js +5 -0
- package/views/webgl/FramebufferObject.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/views/webgl/ValidatedTextureDescriptor.js +5 -0
- package/views/webgl/enums.js +1 -1
- package/views/webgl/testAppleAmdDrawArrays.js +1 -1
- package/views/webgl/testDoublePrecisionArithmetic.js +1 -1
- package/views/webgl/testFloatBufferBlend.js +1 -1
- package/views/webgl/testSVGPremultipliedAlpha.js +1 -1
- package/views/webgl/testSamplerPrecision.js +1 -1
- package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/Format.js +1 -1
- package/widgets/Popup/css.js +1 -1
- package/widgets/Popup.js +1 -1
- package/assets/esri/core/workers/chunks/6910818c3693c2b169b4.js +0 -1
- package/assets/esri/core/workers/chunks/6eb6ddeef739f73d5ed2.js +0 -1
- package/assets/esri/core/workers/chunks/714d911412d1e111078b.js +0 -1
- package/assets/esri/core/workers/chunks/794acfd34b9bf4b1985b.js +0 -1
- package/assets/esri/core/workers/chunks/7a204c98b8e096917ff2.js +0 -1
- package/assets/esri/core/workers/chunks/7df8073c232d70ac4a82.js +0 -1
- package/assets/esri/core/workers/chunks/8d2da875a28fa08d1b7a.js +0 -1
- package/assets/esri/core/workers/chunks/a7079f692049e708db9d.js +0 -1
- package/assets/esri/core/workers/chunks/d0f4e2a2c20907d6a843.js +0 -1
- package/assets/esri/core/workers/chunks/d480787952585f3297df.js +0 -1
- package/assets/esri/core/workers/chunks/ff1c5281445d2bed7b05.js +0 -1
- package/core/date.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8865,7873],{46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,a,l){return[e,t,r,i,o,n,s,a,l]}function n(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>n,c:()=>i,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:n,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>h,g:()=>u,j:()=>R,k:()=>m,m:()=>c,s:()=>p});var i=r(46521),o=r(94961),n=r(65617),s=r(46851),a=r(17896),l=r(98766);function p(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function u(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],a=r[0],l=r[1],p=r[2],u=r[3];return e[0]=i*u+s*a+o*p-n*l,e[1]=o*u+s*l+n*a-i*p,e[2]=n*u+s*p+i*l-o*a,e[3]=s*u-i*a-o*l-n*p,e}function d(e,t,r,i){const o=t[0],n=t[1],a=t[2],l=t[3];let p,u,c,d,h,y=r[0],m=r[1],f=r[2],g=r[3];return u=o*y+n*m+a*f+l*g,u<0&&(u=-u,y=-y,m=-m,f=-f,g=-g),1-u>(0,s.g)()?(p=Math.acos(u),c=Math.sin(p),d=Math.sin((1-i)*p)/c,h=Math.sin(i*p)/c):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*a+h*f,e[3]=d*l+h*g,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),p=Math.sin(i),u=Math.cos(i);return e[0]=n*l*u-s*a*p,e[1]=s*a*u+n*l*p,e[2]=s*l*p-n*a*u,e[3]=s*l*u+n*a*p,e}const f=l.c,g=l.s,b=l.a,v=c,S=l.b,w=l.d,_=l.l,x=l.e,C=x,j=l.f,I=j,V=l.n,R=l.g,N=l.h,z=(0,n.c)(),q=(0,n.f)(1,0,0),M=(0,n.f)(0,1,0),Z=(0,o.a)(),T=(0,o.a)(),A=(0,i.c)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:f,dot:w,equals:N,exactEquals:R,fromEuler:m,fromMat3:y,getAxisAngle:u,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,a=s?1/s:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-o*a,e[3]=n*a,e},len:C,length:x,lerp:_,mul:v,multiply:c,normalize:V,random:function(e){const t=s.R,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+s*a,e[1]=o*l+n*a,e[2]=n*l-o*a,e[3]=s*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-n*a,e[1]=o*l+s*a,e[2]=n*l+i*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+o*a,e[1]=o*l-i*a,e[2]=n*l+s*a,e[3]=s*l-n*a,e},rotationTo:function(e,t,r){const i=(0,a.e)(t,r);return i<-.999999?((0,a.f)(z,q,t),(0,a.u)(z)<1e-6&&(0,a.f)(z,M,t),(0,a.n)(z,z),p(e,z,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(z,t,r),e[0]=z[0],e[1]=z[1],e[2]=z[2],e[3]=1+i,V(e,e))},scale:S,set:g,setAxes:function(e,t,r,i){const o=A;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],V(e,y(e,o))},setAxisAngle:p,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(Z,t,o,n),d(T,r,i,n),d(e,Z,T,2*n*(1-n)),e},sqrLen:I,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function n(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:i,createView:n,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},28576:(e,t,r)=>{r.d(t,{B:()=>c});var i=r(81153),o=r(17452),n=r(41123),s=r(7628),a=r(31263),l=r(5600),p=r(66094),u=r(25929);function c(e){const t=e?.origins??[void 0];return(r,n)=>{const c=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const n=(0,s.Oe)(t,r);return{type:String,read:(e,t,r)=>{const i=(0,u.r)(e,t,r);return n.type===String?i:"function"==typeof n.type?new n.type({url:i}):void 0},write:{writer(t,s,l,c){if(!c||!c.resources)return"string"==typeof t?void(s[l]=(0,u.t)(t,c)):void(s[l]=t.write({},c));const m=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,u.t)(m,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},u.M.NO),g=n.type!==String&&(!(0,i.l)(this)||c&&c.origin&&this.originIdOf(r)>(0,a.M9)(c.origin)),b={object:this,propertyName:r,value:t,targetUrl:f,dest:s,targetPropertyName:l,context:c,params:e};c&&c.portalItem&&f&&!(0,o.YP)(f)?g?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:s,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=y(n,r,t),c=(0,p.B)(u),m=(0,o.Ml)(l.path),f=i?.compress??!1;c===m?(t.resources&&h({...e,resource:l,content:u,compress:f,updates:t.resources.toUpdate}),s[a]=r):d(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):c&&c.portalItem&&(null==f||null!=(0,u.i)(f)||(0,o.jc)(f)||g)?d(b):s[l]=f}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=u.a;return{read:e,write:t}}}}(e,r,n);for(const e of t){const t=(0,l.CJ)(r,e,n);for(const e in c)t[e]=c[e]}}}function d(e){const{targetUrl:t,params:i,value:s,context:a,dest:l,targetPropertyName:c}=e;if(!a.portalItem)return;const d=(0,u.p)(t),m=d?.filename??(0,n.D)(),f=i?.prefix??d?.prefix,g=y(s,t,a),b=(0,o.v_)(f,m),v=`${b}.${(0,p.B)(g)}`,S=a.portalItem.resourceFromPath(v);(0,o.jc)(t)&&a.resources&&a.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{S.path=`${b}.${(0,p.B)(e)}`,l[c]=S.itemRelativeUrl})).catch((()=>{})));const w=i?.compress??!1;a.resources&&h({...e,resource:S,content:g,compress:w,updates:a.resources.toAdd}),l[c]=S.itemRelativeUrl}function h({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function y(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},65845:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},41123:(e,t,r)=>{r.d(t,{D:()=>o,z:()=>n});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),p=r(20941),u=r(5600),c=(r(75215),r(80442),r(71715)),d=r(52011),h=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const f=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new p.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function b(e,t){return new p.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,o._)([(0,h.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,o._)([(0,c.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,o._)([(0,u.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],g.prototype,"heightUnit",void 0),(0,o._)([(0,c.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,o._)([(0,c.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,o._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,o._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,o._)([(0,d.j)("esri.geometry.HeightModelInfo")],g);const v=g},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Je});var i=r(43697),o=r(46791),n=r(20102),s=r(92604),a=r(16453),l=r(95330),p=r(5600),u=r(75215),c=(r(67676),r(80442),r(71715)),d=r(52011),h=r(17896),y=r(65617),m=r(6570),f=r(87085),g=r(54295),b=r(17287),v=r(38009),S=r(16859),w=r(72965),_=r(20559),x=r(66677),C=r(21506),j=r(1231),I=r(2368),V=r(68251),R=r(96674),N=r(28576),z=r(51305),q=r(94961),M=r(46851);const Z=(0,y.c)(),T=(0,q.a)(),A=(0,q.a)(),F=(0,q.a)(),P=(0,y.f)(0,0,1),L=(0,y.f)(0,1,0),O=(0,y.f)(1,0,0);function D(e){(0,h.c)(Z,e),(0,h.n)(Z,Z);const t=Math.atan2(Z[1],Z[0]),r=(0,z.s)((0,q.a)(),P,-t);(0,h.q)(Z,Z,r);const i=-1*Math.atan2(Z[2],Z[0]);return[(0,M.a)(t)+270,(0,M.a)(i)+90]}function U(e,t){return(0,z.s)(A,P,(0,M.t)(e-270)),(0,z.s)(F,L,(0,M.t)(t-90)),(0,z.m)(T,A,F),(0,h.c)(Z,O),(0,h.q)(Z,Z,T),(0,h.n)(Z,Z),[Z[0],Z[1],Z[2]]}var E=r(90578);let B=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],B.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],B.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"point",void 0),B=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSlice")],B);const k=B;var $=r(25929);let K=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],K.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{origins:{service:{read:$.r}},write:{enabled:!0,isRequired:!0}}}),(0,N.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],K.prototype,"href",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],K.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"point",void 0),(0,i._)([(0,p.Cb)({type:[u.z8],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"sizeInPixel",void 0),(0,i._)([(0,p.Cb)({type:[k],json:{write:!0}})],K.prototype,"slices",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{default:0,write:!0}})],K.prototype,"timeId",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"variableId",void 0),K=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSection")],K);const J=K;let H=class extends R.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"diffuseFactor",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"specularFactor",void 0),H=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSimpleShading")],H);const W=H;let Y=class extends R.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,p.Cb)({type:["discrete","continuous"],json:{write:!0}})],Y.prototype,"continuity",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"hasNoData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"noData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"offset",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Y.prototype,"type",void 0),Y=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelFormat")],Y);const G=Y;let Q=class extends R.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"description",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:!0}})],Q.prototype,"originalFormat",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"renderingFormat",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Q.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],Q.prototype,"type",void 0),Q=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariable")],Q);const X=Q;var ee=r(22974),te=r(22303);let re=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],re.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],re.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],re.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],re.prototype,"colorLocked",void 0),re=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIsosurface")],re);const ie=re;var oe=r(70921),ne=r(22021);let se=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],se.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],se.prototype,"position",void 0),se=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelColorStop")],se);const ae=se;let le=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,p.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],le.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],le.prototype,"position",void 0),le=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelOpacityStop")],le);const pe=le;let ue=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],ue.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],ue.prototype,"range",void 0),ue=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRangeFilter")],ue);const ce=ue;var de,he;(he=de||(de={}))[he.Color=1]="Color",he[he.Alpha=2]="Alpha",he[he.Both=3]="Both";let ye=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.Z.ofType(ae)),this.opacityStops=new(o.Z.ofType(pe))}set colorStops(e){this._set("colorStops",(0,oe.Z)(e,this._get("colorStops"),o.Z.ofType(ae)))}set opacityStops(e){this._set("opacityStops",(0,oe.Z)(e,this._get("opacityStops"),o.Z.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==de.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==de.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:de.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,ne.uZ)(e.position,0,1),i=Math.round(255*(0,ne.uZ)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===de.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=de.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:de.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==de.Both)if(i.type===de.Color){const[o,n]=this.getPreviousNext(t,r,de.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,ne.t7)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,de.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;fe.forEach((r=>{i.color[r]=Math.round((0,ne.t7)(t[r],s[r],e))}))}else-1!==o?fe.forEach((e=>{i.color[e]=r[o].color[e]})):fe.forEach((e=>{i.color[e]=r[n].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),a=t[i].color,l=t[o].color,p=new te.Z;fe.forEach((e=>{p[e]=Math.round((0,ne.t7)(a[e],l[e],s))})),p.a=(0,ne.uZ)(1-(0,ne.t7)(a.a,l.a,s)/255,0,1),e.push(p)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,ne.uZ)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,p.Cb)({type:["linear","nearest"],json:{write:!0}})],ye.prototype,"interpolation",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ye.prototype,"stretchRange",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ae),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ye.prototype,"colorStops",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(pe),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ye.prototype,"opacityStops",null),(0,i._)([(0,p.Cb)({type:ce,json:{write:!0}})],ye.prototype,"rangeFilter",void 0),(0,i._)([(0,p.Cb)({type:[te.Z],clonable:!1,json:{read:!1}})],ye.prototype,"rasterizedTransferFunction",null),ye=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],ye);const me=ye,fe=["r","g","b"];let ge=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],ge.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],ge.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],ge.prototype,"label",void 0),ge=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelUniqueValue")],ge);const be=ge;var ve;let Se=ve=class extends R.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.Z.ofType(be)),this.isosurfaces=new(o.Z.ofType(ie))}clone(){return new ve({variableId:this.variableId,label:this.label,transferFunction:(0,ee.d9)(this.transferFunction),uniqueValues:(0,ee.d9)(this.uniqueValues),isosurfaces:(0,ee.d9)(this.isosurfaces)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],Se.prototype,"variableId",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Se.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:me,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],Se.prototype,"transferFunction",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(be),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],Se.prototype,"uniqueValues",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ie),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],Se.prototype,"isosurfaces",void 0),Se=ve=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariableStyle")],Se);const we=Se;var _e=r(94139),xe=r(82971),Ce=r(8744);let je=class extends R.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],je.prototype,"values",void 0),je=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIrregularSpacing")],je);const Ie=je;let Ve=class extends R.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ve.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ve.prototype,"offset",void 0),Ve=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRegularSpacing")],Ve);const Re=Ve;let Ne=class extends R.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,p.Cb)({type:Ie,json:{write:!0}})],Ne.prototype,"irregularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"isPositiveUp",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"quantity",void 0),(0,i._)([(0,p.Cb)({type:Re,json:{write:!0}})],Ne.prototype,"regularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ne.prototype,"size",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{read:!1}})],Ne.prototype,"isRegular",null),Ne=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDimension")],Ne);const ze=Ne,qe="esri.layers.voxel.VoxelVolume",Me=s.Z.getLogger(qe);let Ze=class extends R.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=xe.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return Me.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ce.fS)(this.spatialReference,e.spatialReference))return Me.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,y.f)(e.x,e.y,e.z??0);(0,h.b)(t,t,this.originInLayerSpace3D),(0,h.D)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new _e.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,y.d)(e);if((0,h.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,h.a)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new _e.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new _e.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ze.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:[ze],json:{write:{enabled:!0,isRequired:!0}}})],Ze.prototype,"dimensions",void 0),(0,i._)([(0,p.Cb)({type:xe.Z,json:{read:{enabled:!1}}})],Ze.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1}})],Ze.prototype,"zDimension",null),(0,i._)([(0,p.Cb)({type:[Boolean],json:{read:!1}})],Ze.prototype,"isValid",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,p.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Ze.prototype,"volumeType",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"sizeInVoxels",null),Ze=(0,i._)([(0,d.j)(qe)],Ze);const Te=Ze;var Ae;let Fe=Ae=class extends R.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Ae;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"apronWidth",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"brickSize",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"maxLodLevel",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"nodeSize",void 0),Fe=Ae=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeIndex")],Fe);const Pe=Fe;let Le=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],Le.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Le.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Le.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Le.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Le.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Le.prototype,"point",void 0),Le=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDynamicSection")],Le);const Oe=Le;var De;let Ue=De=class extends R.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.Z.ofType(k)),this.dynamicSections=new(o.Z.ofType(Oe))}set slices(e){this._set("slices",(0,oe.Z)(e,this._get("slices"),o.Z.ofType(k)))}set dynamicSections(e){this._set("dynamicSections",(0,oe.Z)(e,this._get("dynamicSections"),o.Z.ofType(Oe)))}clone(){return new De({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,ee.d9)(this.slices),dynamicSections:(0,ee.d9)(this.dynamicSections)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],Ue.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:1,write:!0}})],Ue.prototype,"verticalExaggeration",void 0),(0,i._)([(0,p.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ue.prototype,"exaggerationMode",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:0,write:!0}})],Ue.prototype,"verticalOffset",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(k),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ue.prototype,"slices",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Oe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ue.prototype,"dynamicSections",null),Ue=De=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeStyle")],Ue);const Ee=Ue;var Be=r(32163);const ke="esri.layers.VoxelLayer",$e=s.Z.getLogger(ke);let Ke=class extends((0,_.Vt)((0,b.Y)((0,v.q)((0,S.I)((0,w.M)((0,a.R)((0,g.V)(f.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new o.Z,this.volumes=new o.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!0,this.popupTemplate=null,this.test=null,this.volumeStyles=new(o.Z.ofType(Ee)),this.variableStyles=new(o.Z.ofType(we)),this.sections=new(o.Z.ofType(J)),e?.constantUpscaling&&(this.test={constantUpscaling:!0})}set url(e){this._set("url",(0,x.Nm)(e,$e))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new n.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new n.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new n.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=m.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Te.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new j.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new j.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Be.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.getItemAt(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.getItemAt(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.getItemAt(o);return n.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new J({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),$e.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&$e.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||($e.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)$e.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else $e.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else $e.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;for(let i=0;i<3;++i){const o=e.point[i];if(o<0||o>=r[t[i]].size)return!1}const i=(0,y.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,h.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,p.Cb)({type:["Voxel"]})],Ke.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)(C.rn)],Ke.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({json:{write:!0}})],Ke.prototype,"title",void 0),(0,i._)([(0,p.Cb)(C.HQ)],Ke.prototype,"url",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(J),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Ke.prototype,"sections",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Ke.prototype,"currentVariableId",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Ee),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Ke.prototype,"volumeStyles",void 0),(0,i._)([(0,p.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Ke.prototype,"renderMode",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(we),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Ke.prototype,"variableStyles",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Ke.prototype,"enableSlices",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Ke.prototype,"enableSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Ke.prototype,"enableDynamicSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Ke.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,p.Cb)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Ke.prototype,"shading",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],Ke.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Ke.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(X)})],Ke.prototype,"variables",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Te)})],Ke.prototype,"volumes",void 0),(0,i._)([(0,p.Cb)({type:Pe})],Ke.prototype,"index",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Ke.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Ke.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],Ke.prototype,"type",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],Ke.prototype,"version",void 0),(0,i._)([(0,c.r)("service","version")],Ke.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:m.Z})],Ke.prototype,"fullExtent",void 0),(0,i._)([(0,c.r)("service","fullExtent",["fullExtent"])],Ke.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],Ke.prototype,"voxelFields",null),(0,i._)([(0,p.Cb)(C.C_)],Ke.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],Ke.prototype,"defaultPopupTemplate",null),Ke=(0,i._)([(0,d.j)(ke)],Ke);const Je=Ke},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>F,Vt:()=>z});var i=r(43697),o=r(3172),n=r(20102),s=r(92604),a=r(95330),l=r(17452),p=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),d=r(30556),h=r(65845),y=r(6570),m=r(79235),f=r(82971),g=r(66677),b=r(21506),v=r(61064);var S=r(65587),w=r(15235),_=r(66643),x=r(41123),C=r(97873);async function j(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const o=new Set(t.resources.toKeep.map((e=>e.resource.path))),s=new Set,l=[];o.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),o.has(n.resource.path)||s.has(n.resource.path)){const{resource:t,content:i,finish:o,error:s}=n,a=(0,C.getSiblingOfSameTypeI)(t,(0,x.D)());e.paths.push(a.path),l.push(I({resource:a,content:i,compress:n.compress,finish:o,error:s},r))}else e.paths.push(n.resource.path),l.push(V(n,r)),s.add(n.resource.path);for(const i of t.resources.toAdd)l.push(I(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{if(t.portalItem){const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))}})),0===l.length)return;const p=await(0,a.as)(l);(0,a.k_)(r);const u=p.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:u})}async function I(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,_.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function V(e,t){const r=await(0,_.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const R="esri.layers.mixins.SceneService",N=s.Z.getLogger(R),z=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case F.SAVE:return this._save(t);case F.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return f.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new f.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(i,r)}const i=t.store,o=this._readSpatialReference(t);return null==o||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<q))?null:new y.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,g.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,g.Qc)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,g.ld)(i)}set url(e){const t=(0,g.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:N});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,g.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,v.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,N,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<q||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,o=r.obb.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=o-s,this.fullExtent.zmax=o+s}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<q)return;const r=t[2],i=t[3],{fullExtent:o}=this;o&&(o.zmin=r-i,o.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===M.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...A,...t};let i=w.default.from(e);i||(N.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const o=i.portal||S.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=T,i.portal=o;const s={origin:"portal-item",url:null,messages:[],portal:o,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},s)]};return await Promise.all(s.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,s,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,M.newItem),await o.signIn(),await(o.user?.addItem({item:i,folder:r&&r.folder,data:a})),await j(this.resourceReferences,s,null),this.portalItem=i,(0,h.D)(s),s.portalItem=i,i}async _save(e){const t={...A,...e};if(!this.portalItem)throw N.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==T)throw N.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+T),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${T}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||S.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,M.existingItem),await this.portalItem.update({data:i}),await j(this.resourceReferences,r,null),(0,h.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(i=i.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const o=r?.validationOptions,s=o?.enabled,a=null;if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(N.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===o.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(i);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(i.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}};return(0,i._)([(0,p.Cb)(b.id)],t.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,p.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,p.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,p.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,u.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,u.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,p.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,p.Cb)(b.HQ)],t.prototype,"url",null),(0,i._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,p.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(R)],t),t},q=-1e38;var M,Z;(Z=M||(M={}))[Z.existingItem=0]="existingItem",Z[Z.newItem=1]="newItem";const T="Scene Service",A={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var F;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(F||(F={}))},61064:(e,t,r)=>{r.d(t,{T:()=>n});var i=r(3172),o=r(20102);async function n(e,t,r,n,s,a){let l=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(o,{query:{f:"json",token:n},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=s&&s.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),l=e}}if(!t)return null;const p=`${e}/nodes/`,u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(u,{query:{f:"json",token:n},responseType:"json",signal:a})).data,urlPrefix:p}}catch(e){throw new o.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:u})}}},66094:(e,t,r)=>{r.d(t,{B:()=>o});var i=r(17452);function o(e){return n[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return l[t]||s}(e.url)}(e)]||a}const n={},s="text/plain",a=n[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>a,contentToBlob:()=>d,fetchResources:()=>s,getSiblingOfSameType:()=>h,getSiblingOfSameTypeI:()=>y,removeAllResources:()=>p,removeResource:()=>l,splitPrefixFileNameAndExtension:()=>c});var i=r(3172),o=r(20102),n=r(17452);async function s(e,t={},r){await e.load(r);const i=(0,n.v_)(e.itemUrl,"resources"),{start:o=1,num:s=10,sortOrder:a="asc",sortField:l="created"}=t,p={query:{start:o,num:s,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(i,p);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new o.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const s=e.portalItem;await s.load(i);const a=(0,n.v_)(s.userItemUrl,"add"===t?"addResources":"updateResources"),[l,p]=u(e.path),c=await d(r),h=new FormData;return l&&"."!==l&&h.append("resourcesPrefix",l),null!=i&&i.compress&&h.append("compress","true"),h.append("fileName",p),h.append("file",c,p),h.append("f","json"),null!=i&&i.access&&h.append("access",i.access),await s.portal.request(a,{method:"post",body:h,signal:i?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new o.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function p(e,t){await e.load(t);const r=(0,n.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function c(e){const[t,r]=function(e){const t=(0,n.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,o]=u(t);return[i,o,r]}async function d(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function h(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}function y(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var i=r(51773),o=r(35671),n=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(63061);const p=["oid","global-id"],u=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:p},u){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(y),e}(t??[],i?.ignoreFieldTypes||v).map((t=>new a.Z({fieldName:t.name,isEditable:f(t,e),label:t.alias,format:g(t),visible:h(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:l},u);if(!c.length)return null;const d=function(e){const t=(0,o.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:p,fields:r,displayField:e}),m=[new s.Z,new n.Z];return new i.Z({title:d,content:m,fieldInfos:c})}const d=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],h=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(m(e.name,t)||r&&e.name===r||p.includes(e.type)||d.some((t=>t.test(e.name))));function y(e,t){return"oid"===e.type?-1:"oid"===t.type?1:b(e)?-1:b(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:o,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),o&&o.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function f(e,t){return e.editable&&!u.includes(e.type)&&!m(e.name,t)}function g(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,o.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function b(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const v=["geometry","blob","raster","guid","xml"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8865,7873],{46521:(e,t,r)=>{function i(){return[1,0,0,0,1,0,0,0,1]}function o(e,t,r,i,o,n,s,a,l){return[e,t,r,i,o,n,s,a,l]}function n(e,t){return new Float64Array(e,t,9)}r.d(t,{a:()=>n,c:()=>i,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,clone:function(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]]},create:i,createView:n,fromValues:o},Symbol.toStringTag,{value:"Module"}))},51305:(e,t,r)=>{r.d(t,{c:()=>h,g:()=>u,j:()=>R,k:()=>m,m:()=>c,s:()=>p});var i=r(46521),o=r(94961),n=r(65617),s=r(46851),a=r(17896),l=r(98766);function p(e,t,r){r*=.5;const i=Math.sin(r);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(r),e}function u(e,t){const r=2*Math.acos(t[3]),i=Math.sin(r/2);return i>(0,s.g)()?(e[0]=t[0]/i,e[1]=t[1]/i,e[2]=t[2]/i):(e[0]=1,e[1]=0,e[2]=0),r}function c(e,t,r){const i=t[0],o=t[1],n=t[2],s=t[3],a=r[0],l=r[1],p=r[2],u=r[3];return e[0]=i*u+s*a+o*p-n*l,e[1]=o*u+s*l+n*a-i*p,e[2]=n*u+s*p+i*l-o*a,e[3]=s*u-i*a-o*l-n*p,e}function d(e,t,r,i){const o=t[0],n=t[1],a=t[2],l=t[3];let p,u,c,d,h,y=r[0],m=r[1],f=r[2],g=r[3];return u=o*y+n*m+a*f+l*g,u<0&&(u=-u,y=-y,m=-m,f=-f,g=-g),1-u>(0,s.g)()?(p=Math.acos(u),c=Math.sin(p),d=Math.sin((1-i)*p)/c,h=Math.sin(i*p)/c):(d=1-i,h=i),e[0]=d*o+h*y,e[1]=d*n+h*m,e[2]=d*a+h*f,e[3]=d*l+h*g,e}function h(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function y(e,t){const r=t[0]+t[4]+t[8];let i;if(r>0)i=Math.sqrt(r+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[3*r+r]&&(r=2);const o=(r+1)%3,n=(r+2)%3;i=Math.sqrt(t[3*r+r]-t[3*o+o]-t[3*n+n]+1),e[r]=.5*i,i=.5/i,e[3]=(t[3*o+n]-t[3*n+o])*i,e[o]=(t[3*o+r]+t[3*r+o])*i,e[n]=(t[3*n+r]+t[3*r+n])*i}return e}function m(e,t,r,i){const o=.5*Math.PI/180;t*=o,r*=o,i*=o;const n=Math.sin(t),s=Math.cos(t),a=Math.sin(r),l=Math.cos(r),p=Math.sin(i),u=Math.cos(i);return e[0]=n*l*u-s*a*p,e[1]=s*a*u+n*l*p,e[2]=s*l*p-n*a*u,e[3]=s*l*u+n*a*p,e}const f=l.c,g=l.s,b=l.a,v=c,S=l.b,w=l.d,_=l.l,x=l.e,C=x,j=l.f,I=j,V=l.n,R=l.g,N=l.h,q=(0,n.c)(),z=(0,n.f)(1,0,0),M=(0,n.f)(0,1,0),Z=(0,o.a)(),T=(0,o.a)(),A=(0,i.c)();Object.freeze(Object.defineProperty({__proto__:null,add:b,calculateW:function(e,t){const r=t[0],i=t[1],o=t[2];return e[0]=r,e[1]=i,e[2]=o,e[3]=Math.sqrt(Math.abs(1-r*r-i*i-o*o)),e},conjugate:h,copy:f,dot:w,equals:N,exactEquals:R,fromEuler:m,fromMat3:y,getAxisAngle:u,identity:function(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e},invert:function(e,t){const r=t[0],i=t[1],o=t[2],n=t[3],s=r*r+i*i+o*o+n*n,a=s?1/s:0;return e[0]=-r*a,e[1]=-i*a,e[2]=-o*a,e[3]=n*a,e},len:C,length:x,lerp:_,mul:v,multiply:c,normalize:V,random:function(e){const t=s.R,r=t(),i=t(),o=t(),n=Math.sqrt(1-r),a=Math.sqrt(r);return e[0]=n*Math.sin(2*Math.PI*i),e[1]=n*Math.cos(2*Math.PI*i),e[2]=a*Math.sin(2*Math.PI*o),e[3]=a*Math.cos(2*Math.PI*o),e},rotateX:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+s*a,e[1]=o*l+n*a,e[2]=n*l-o*a,e[3]=s*l-i*a,e},rotateY:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l-n*a,e[1]=o*l+s*a,e[2]=n*l+i*a,e[3]=s*l-o*a,e},rotateZ:function(e,t,r){r*=.5;const i=t[0],o=t[1],n=t[2],s=t[3],a=Math.sin(r),l=Math.cos(r);return e[0]=i*l+o*a,e[1]=o*l-i*a,e[2]=n*l+s*a,e[3]=s*l-n*a,e},rotationTo:function(e,t,r){const i=(0,a.e)(t,r);return i<-.999999?((0,a.f)(q,z,t),(0,a.u)(q)<1e-6&&(0,a.f)(q,M,t),(0,a.n)(q,q),p(e,q,Math.PI),e):i>.999999?(e[0]=0,e[1]=0,e[2]=0,e[3]=1,e):((0,a.f)(q,t,r),e[0]=q[0],e[1]=q[1],e[2]=q[2],e[3]=1+i,V(e,e))},scale:S,set:g,setAxes:function(e,t,r,i){const o=A;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=i[0],o[4]=i[1],o[7]=i[2],o[2]=-t[0],o[5]=-t[1],o[8]=-t[2],V(e,y(e,o))},setAxisAngle:p,slerp:d,sqlerp:function(e,t,r,i,o,n){return d(Z,t,o,n),d(T,r,i,n),d(e,Z,T,2*n*(1-n)),e},sqrLen:I,squaredLength:j,str:function(e){return"quat("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"}},Symbol.toStringTag,{value:"Module"}))},94961:(e,t,r)=>{function i(){return[0,0,0,1]}function o(e){return[e[0],e[1],e[2],e[3]]}function n(e,t){return new Float64Array(e,t,4)}r.d(t,{I:()=>s,a:()=>i,b:()=>o,c:()=>n});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:o,create:i,createView:n,fromValues:function(e,t,r,i){return[e,t,r,i]}},Symbol.toStringTag,{value:"Module"}))},28576:(e,t,r)=>{r.d(t,{B:()=>c});var i=r(81153),o=r(17452),n=r(41123),s=r(7628),a=r(31263),l=r(5600),p=r(66094),u=r(25929);function c(e){const t=e?.origins??[void 0];return(r,n)=>{const c=function(e,t,r){if("resource"===e?.type)return function(e,t,r){const n=(0,s.Oe)(t,r);return{type:String,read:(e,t,r)=>{const i=(0,u.r)(e,t,r);return n.type===String?i:"function"==typeof n.type?new n.type({url:i}):void 0},write:{writer(t,s,l,c){if(!c||!c.resources)return"string"==typeof t?void(s[l]=(0,u.t)(t,c)):void(s[l]=t.write({},c));const m=function(e){return null==e?null:"string"==typeof e?e:e.url}(t),f=(0,u.t)(m,{...c,verifyItemRelativeUrls:c&&c.verifyItemRelativeUrls?{writtenUrls:c.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},u.M.NO),g=n.type!==String&&(!(0,i.l)(this)||c&&c.origin&&this.originIdOf(r)>(0,a.M9)(c.origin)),b={object:this,propertyName:r,value:t,targetUrl:f,dest:s,targetPropertyName:l,context:c,params:e};c&&c.portalItem&&f&&!(0,o.YP)(f)?g?function(e){const{context:t,targetUrl:r,params:i,value:n,dest:s,targetPropertyName:a}=e;if(!t.portalItem)return;const l=t.portalItem.resourceFromPath(r),u=y(n,r,t),c=(0,p.B)(u),m=(0,o.Ml)(l.path),f=i?.compress??!1;c===m?(t.resources&&h({...e,resource:l,content:u,compress:f,updates:t.resources.toUpdate}),s[a]=r):d(e)}(b):function({context:e,targetUrl:t,dest:r,targetPropertyName:i}){e.portalItem&&e.resources&&(e.resources.toKeep.push({resource:e.portalItem.resourceFromPath(t),compress:!1}),r[i]=t)}(b):c&&c.portalItem&&(null==f||null!=(0,u.i)(f)||(0,o.jc)(f)||g)?d(b):s[l]=f}}}}(e,t,r);switch(e?.type??"other"){case"other":return{read:!0,write:!0};case"url":{const{read:e,write:t}=u.a;return{read:e,write:t}}}}(e,r,n);for(const e of t){const t=(0,l.CJ)(r,e,n);for(const e in c)t[e]=c[e]}}}function d(e){const{targetUrl:t,params:i,value:s,context:a,dest:l,targetPropertyName:c}=e;if(!a.portalItem)return;const d=(0,u.p)(t),m=d?.filename??(0,n.D)(),f=i?.prefix??d?.prefix,g=y(s,t,a),b=(0,o.v_)(f,m),v=`${b}.${(0,p.B)(g)}`,S=a.portalItem.resourceFromPath(v);(0,o.jc)(t)&&a.resources&&a.resources.pendingOperations.push(async function(e){const t=(await Promise.resolve().then(r.bind(r,3172))).default,{data:i}=await t(e,{responseType:"blob"});return i}(t).then((e=>{S.path=`${b}.${(0,p.B)(e)}`,l[c]=S.itemRelativeUrl})).catch((()=>{})));const w=i?.compress??!1;a.resources&&h({...e,resource:S,content:g,compress:w,updates:a.resources.toAdd}),l[c]=S.itemRelativeUrl}function h({object:e,propertyName:t,updates:r,resource:i,content:o,compress:n}){r.push({resource:i,content:o,compress:n,finish:r=>{!function(e,t,r){"string"==typeof e[t]?e[t]=r.url:e[t].url=r.url}(e,t,r)}})}function y(e,t,r){return"string"==typeof e?{url:t}:new Blob([JSON.stringify(e.toJSON(r))],{type:"application/json"})}},65845:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(81153);function o(e){e&&e.writtenProperties&&e.writtenProperties.forEach((({target:e,propName:t,newOrigin:r})=>{(0,i.l)(e)&&r&&e.originOf(t)!==r&&e.updateOrigin(t,r)}))}},81153:(e,t,r)=>{function i(e){return e&&"getAtOrigin"in e&&"originOf"in e}r.d(t,{l:()=>i})},41123:(e,t,r)=>{r.d(t,{D:()=>o,z:()=>n});const i="randomUUID"in crypto;function o(){if(i)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${o()}}`}},79235:(e,t,r)=>{r.d(t,{Z:()=>v});var i,o=r(43697),n=r(67676),s=r(35454),a=r(96674),l=r(67900),p=r(20941),u=r(5600),c=(r(75215),r(80442),r(71715)),d=r(52011),h=r(30556);const y=(0,s.w)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),m=y.jsonValues.slice();(0,n.e$)(m,"orthometric");const f=(0,s.w)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=i=class extends a.wq{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,r){return y.write(e,t,r)}readHeightModel(e,t,r){return y.read(e)||(r&&r.messages&&r.messages.push(function(e,t){return new p.Z("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:r})),null)}readHeightUnit(e,t,r){return f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readHeightUnitService(e,t,r){return(0,l.$C)(e)||f.read(e)||(r&&r.messages&&r.messages.push(b(e,{context:r})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new i({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const r=(0,l.cM)(t);return new i({heightModel:e.heightModel,heightUnit:r,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new i;return t.read(e,{origin:"web-scene"}),t}};function b(e,t){return new p.Z("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,o._)([(0,u.Cb)({type:y.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m,default:"ellipsoidal"}}}})],g.prototype,"heightModel",void 0),(0,o._)([(0,h.c)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,o._)([(0,c.r)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,o._)([(0,u.Cb)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:f.jsonValues,write:f.write}}}})],g.prototype,"heightUnit",void 0),(0,o._)([(0,c.r)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,o._)([(0,c.r)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,o._)([(0,u.Cb)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,o._)([(0,c.r)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=i=(0,o._)([(0,d.j)("esri.geometry.HeightModelInfo")],g);const v=g},28865:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Je});var i=r(43697),o=r(46791),n=r(20102),s=r(92604),a=r(16453),l=r(95330),p=r(5600),u=r(75215),c=(r(67676),r(80442),r(71715)),d=r(52011),h=r(17896),y=r(65617),m=r(6570),f=r(87085),g=r(54295),b=r(17287),v=r(38009),S=r(16859),w=r(72965),_=r(20559),x=r(66677),C=r(21506),j=r(1231),I=r(2368),V=r(68251),R=r(96674),N=r(28576),q=r(51305),z=r(94961),M=r(46851);const Z=(0,y.c)(),T=(0,z.a)(),A=(0,z.a)(),F=(0,z.a)(),P=(0,y.f)(0,0,1),L=(0,y.f)(0,1,0),O=(0,y.f)(1,0,0);function D(e){(0,h.c)(Z,e),(0,h.n)(Z,Z);const t=Math.atan2(Z[1],Z[0]),r=(0,q.s)((0,z.a)(),P,-t);(0,h.q)(Z,Z,r);const i=-1*Math.atan2(Z[2],Z[0]);return[(0,M.a)(t)+270,(0,M.a)(i)+90]}function U(e,t){return(0,q.s)(A,P,(0,M.t)(e-270)),(0,q.s)(F,L,(0,M.t)(t-90)),(0,q.m)(T,A,F),(0,h.c)(Z,O),(0,h.q)(Z,Z,T),(0,h.n)(Z,Z),[Z[0],Z[1],Z[2]]}var E=r(90578);let B=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],B.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],B.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],B.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],B.prototype,"point",void 0),B=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSlice")],B);const k=B;var $=r(25929);let K=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!0,this.href=null,this.id=null,this.label="",this.normal=null,this.point=null,this.sizeInPixel=null,this.slices=null,this.timeId=0,this.variableId=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],K.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{origins:{service:{read:$.r}},write:{enabled:!0,isRequired:!0}}}),(0,N.B)({origins:["web-scene"],type:"resource",prefix:"sections",compress:!0})],K.prototype,"href",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],K.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,clonable:!1,readOnly:!0,range:{min:0,max:360}})],K.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"point",void 0),(0,i._)([(0,p.Cb)({type:[u.z8],json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"sizeInPixel",void 0),(0,i._)([(0,p.Cb)({type:[k],json:{write:!0}})],K.prototype,"slices",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{default:0,write:!0}})],K.prototype,"timeId",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],K.prototype,"variableId",void 0),K=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSection")],K);const J=K;let H=class extends R.wq{constructor(){super(...arguments),this.diffuseFactor=.5,this.specularFactor=.5}};(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"diffuseFactor",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},json:{default:.5,write:!0}})],H.prototype,"specularFactor",void 0),H=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelSimpleShading")],H);const W=H;let Y=class extends R.wq{constructor(){super(...arguments),this.continuity=null,this.hasNoData=!1,this.noData=0,this.offset=0,this.scale=1,this.type=null}};(0,i._)([(0,p.Cb)({type:["discrete","continuous"],json:{write:!0}})],Y.prototype,"continuity",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Y.prototype,"hasNoData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"noData",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"offset",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Y.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Y.prototype,"type",void 0),Y=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelFormat")],Y);const G=Y;let Q=class extends R.wq{constructor(){super(...arguments),this.id=null,this.description="",this.name=null,this.originalFormat=null,this.renderingFormat=null,this.unit="",this.volumeId=0,this.type=null}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"description",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:!0}})],Q.prototype,"originalFormat",void 0),(0,i._)([(0,p.Cb)({type:G,json:{write:{enabled:!0,isRequired:!0}}})],Q.prototype,"renderingFormat",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Q.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Q.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:["stc-hot-spot-results","stc-cluster-outlier-results","stc-estimated-bin","generic-nearest-interpolated"],json:{write:!0}})],Q.prototype,"type",void 0),Q=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariable")],Q);const X=Q;var ee=r(22974),te=r(22303);let re=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label="",this.colorLocked=!1}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],re.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],re.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],re.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],re.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],re.prototype,"colorLocked",void 0),re=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIsosurface")],re);const ie=re;var oe=r(70921),ne=r(22021);let se=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=null,this.position=0}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],se.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],se.prototype,"position",void 0),se=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelColorStop")],se);const ae=se;let le=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.opacity=1,this.position=0}};(0,i._)([(0,p.Cb)({type:Number,json:{name:"alpha",write:{enabled:!0,isRequired:!0}}})],le.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],le.prototype,"position",void 0),le=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelOpacityStop")],le);const pe=le;let ue=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.enabled=!1,this.range=null}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!1,write:!0}})],ue.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],ue.prototype,"range",void 0),ue=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRangeFilter")],ue);const ce=ue;var de,he;(he=de||(de={}))[he.Color=1]="Color",he[he.Alpha=2]="Alpha",he[he.Both=3]="Both";let ye=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.interpolation=null,this.stretchRange=null,this.rangeFilter=null,this._colorMapSize=256,this.colorStops=new(o.Z.ofType(ae)),this.opacityStops=new(o.Z.ofType(pe))}set colorStops(e){this._set("colorStops",(0,oe.Z)(e,this._get("colorStops"),o.Z.ofType(ae)))}set opacityStops(e){this._set("opacityStops",(0,oe.Z)(e,this._get("opacityStops"),o.Z.ofType(pe)))}getPreviousNext(e,t,r){let i=e;for(;--i>0&&t[i].type!==r&&t[i].type!==de.Both;);let o=e;const n=t.length;for(;++o<n&&t[o].type!==r&&t[o].type!==de.Both;);return[i,o]}get rasterizedTransferFunction(){const e=[];if(this.colorStops.length<2)return e;const t=[],r=[];for(const t of this.colorStops){if(!t.color)return e;r.push({color:{r:t.color.r,g:t.color.g,b:t.color.b,a:Math.round(255*(1-t.color.a))},position:t.position,type:de.Color})}if(0===this.opacityStops.length)for(const e of r)t.push({color:e.color,position:e.position});else{for(const e of this.opacityStops){const t=(0,ne.uZ)(e.position,0,1),i=Math.round(255*(0,ne.uZ)(1-e.opacity,0,1));let o=!1;for(const e of r)if(e.type===de.Color&&Math.abs(e.position-t)<1e-5){e.color.a=i,e.type=de.Both,o=!0;break}o||r.push({color:{r:0,g:0,b:0,a:i},position:e.position,type:de.Alpha})}r.sort(((e,t)=>e.position<t.position?-1:1));const e=r.length;for(let t=0;t<e;++t){const i=r[t];if(i.type!==de.Both)if(i.type===de.Color){const[o,n]=this.getPreviousNext(t,r,de.Alpha);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position);i.color.a=Math.round((0,ne.t7)(r[o].color.a,r[n].color.a,e))}else i.color.a=-1!==o?r[o].color.a:r[n].color.a}else{const[o,n]=this.getPreviousNext(t,r,de.Color);if(-1!==o&&n!==e){const e=(i.position-r[o].position)/(r[n].position-r[o].position),t=r[o].color,s=r[n].color;fe.forEach((r=>{i.color[r]=Math.round((0,ne.t7)(t[r],s[r],e))}))}else-1!==o?fe.forEach((e=>{i.color[e]=r[o].color[e]})):fe.forEach((e=>{i.color[e]=r[n].color[e]}))}}for(const e of r)t.push({color:e.color,position:e.position})}t[0].position=0,t[t.length-1].position=1;let i=0,o=1;for(let r=0;r<this._colorMapSize;++r){const n=r/this._colorMapSize;for(;n>t[o].position;)i=o++;const s=(n-t[i].position)/(t[o].position-t[i].position),a=t[i].color,l=t[o].color,p=new te.Z;fe.forEach((e=>{p[e]=Math.round((0,ne.t7)(a[e],l[e],s))})),p.a=(0,ne.uZ)(1-(0,ne.t7)(a.a,l.a,s)/255,0,1),e.push(p)}return e}getColorForContinuousDataValue(e,t){const r=this.rasterizedTransferFunction;if(this.colorStops.length<2||!Array.isArray(this.stretchRange)||this.stretchRange.length<2||r.length<256)return null;let i=this.stretchRange[0],o=this.stretchRange[1];if(i>o){const e=i;i=o,o=e}e=(0,ne.uZ)(e,i,o);const n=r[Math.round((e-i)/(o-i)*(this._colorMapSize-1))].clone();return t||(n.a=1),n}};(0,i._)([(0,p.Cb)({type:["linear","nearest"],json:{write:!0}})],ye.prototype,"interpolation",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],ye.prototype,"stretchRange",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ae),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.colorStops&&this.colorStops.length>0}}}}})],ye.prototype,"colorStops",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(pe),json:{read:{source:"alphaStops"},write:{enabled:!0,target:"alphaStops",overridePolicy(){return{enabled:!!this.opacityStops&&this.opacityStops.length>0}}}}})],ye.prototype,"opacityStops",null),(0,i._)([(0,p.Cb)({type:ce,json:{write:!0}})],ye.prototype,"rangeFilter",void 0),(0,i._)([(0,p.Cb)({type:[te.Z],clonable:!1,json:{read:!1}})],ye.prototype,"rasterizedTransferFunction",null),ye=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelTransferFunctionStyle")],ye);const me=ye,fe=["r","g","b"];let ge=class extends((0,I.J)(R.wq)){constructor(){super(...arguments),this.color=te.Z.fromArray([0,0,0,0]),this.value=0,this.enabled=!0,this.label=""}};(0,i._)([(0,p.Cb)({type:te.Z,json:{type:[u.z8],write:{enabled:!0,isRequired:!0}}})],ge.prototype,"color",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],ge.prototype,"value",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],ge.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],ge.prototype,"label",void 0),ge=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelUniqueValue")],ge);const be=ge;var ve;let Se=ve=class extends R.wq{constructor(e){super(e),this.variableId=0,this.label="",this.transferFunction=null,this.uniqueValues=null,this.isosurfaces=null,this.uniqueValues=new(o.Z.ofType(be)),this.isosurfaces=new(o.Z.ofType(ie))}clone(){return new ve({variableId:this.variableId,label:this.label,transferFunction:(0,ee.d9)(this.transferFunction),uniqueValues:(0,ee.d9)(this.uniqueValues),isosurfaces:(0,ee.d9)(this.isosurfaces)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],Se.prototype,"variableId",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Se.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:me,json:{write:{enabled:!0,overridePolicy(){return{enabled:!this.uniqueValues||this.uniqueValues.length<1}}}}})],Se.prototype,"transferFunction",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(be),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.uniqueValues&&this.uniqueValues.length>0}}}}})],Se.prototype,"uniqueValues",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(ie),json:{write:{enabled:!0,overridePolicy(){const e=!this.uniqueValues||this.uniqueValues.length<1,t=!!this.isosurfaces&&this.isosurfaces.length>0;return{enabled:e&&t}}}}})],Se.prototype,"isosurfaces",void 0),Se=ve=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVariableStyle")],Se);const we=Se;var _e=r(94139),xe=r(82971),Ce=r(8744);let je=class extends R.wq{constructor(){super(...arguments),this.values=null}};(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],je.prototype,"values",void 0),je=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelIrregularSpacing")],je);const Ie=je;let Ve=class extends R.wq{constructor(){super(...arguments),this.scale=1,this.offset=0}};(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ve.prototype,"scale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ve.prototype,"offset",void 0),Ve=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelRegularSpacing")],Ve);const Re=Ve;let Ne=class extends R.wq{constructor(){super(...arguments),this.irregularSpacing=null,this.isPositiveUp=!0,this.isWrappedDateLine=!1,this.label=null,this.name=null,this.quantity=null,this.regularSpacing=null,this.size=0,this.unit=null}get isRegular(){return(null==this.irregularSpacing||void 0===this.irregularSpacing)&&null!==this.regularSpacing}getRange(){return this.isRegular?[this.regularSpacing.offset,this.regularSpacing.offset+this.regularSpacing.scale*(this.size-1)]:Array.isArray(this.irregularSpacing?.values)&&this.irregularSpacing.values.length>1?[this.irregularSpacing.values[0],this.irregularSpacing.values[this.irregularSpacing.values.length-1]]:[0,0]}};(0,i._)([(0,p.Cb)({type:Ie,json:{write:!0}})],Ne.prototype,"irregularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"isPositiveUp",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],Ne.prototype,"isWrappedDateLine",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"name",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"quantity",void 0),(0,i._)([(0,p.Cb)({type:Re,json:{write:!0}})],Ne.prototype,"regularSpacing",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:!0}})],Ne.prototype,"size",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Ne.prototype,"unit",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{read:!1}})],Ne.prototype,"isRegular",null),Ne=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDimension")],Ne);const qe=Ne,ze="esri.layers.voxel.VoxelVolume",Me=s.Z.getLogger(ze);let Ze=class extends R.wq{constructor(e){super(e),this.id=0,this.dimensions=null,this.spatialReference=xe.Z.WGS84}get zDimension(){if(!this.dimensions)return-1;if(!Array.isArray(this.dimensions))return-1;if(4!==this.dimensions.length)return-1;for(let e=2;e<4;++e)if(this.dimensions[e].size>0)return e;return-1}get isValid(){return!(!this.dimensions||!Array.isArray(this.dimensions)||4!==this.dimensions.length||this.dimensions[0].size<1||this.dimensions[1].size<1||-1===this.zDimension||this.dimensions[this.zDimension].size<1)}get originInLayerSpace3D(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size];return[e[0],t[0],i[0]]}get voxelSizeInLayerSpaceSigned(){if(!this.isValid||"xyt"===this.volumeType)return[0,0,0];const e=this.dimensions[0].getRange(),t=this.dimensions[1].getRange(),r=this.dimensions[2],i=r.isRegular?r.getRange():[0,r.size],o=[this.sizeInVoxels[0],this.sizeInVoxels[1],this.sizeInVoxels[2]];for(let e=0;e<3;++e)o[e]<2?o[e]=1:o[e]-=1;return r.isRegular&&!r.isPositiveUp&&(o[2]*=-1),[(e[1]-e[0])/o[0],(t[1]-t[0])/o[1],(i[1]-i[0])/o[2]]}get volumeType(){if(this.isValid){const e=this.dimensions[2].size>0,t=this.dimensions[3].size>0;if(!e&&t)return"xyt";if(e&&t)return"xyzt"}return"xyz"}get sizeInVoxels(){if(!this.isValid)return[0,0,0];const e=this.zDimension;return[this.dimensions[0].size,this.dimensions[1].size,this.dimensions[e].size]}computeVoxelSpaceLocation(e){if(!this.isValid)return[0,0,0];if("xyt"===this.volumeType)return Me.error("computeVoxelSpacePosition cannot be used with XYT volumes."),[0,0,0];if(!(0,Ce.fS)(this.spatialReference,e.spatialReference))return Me.error("pos argument should have the same spatial reference as the VoxelLayer."),[0,0,0];const t=(0,y.f)(e.x,e.y,e.z??0);(0,h.b)(t,t,this.originInLayerSpace3D),(0,h.D)(t,t,this.voxelSizeInLayerSpaceSigned);const r=this.dimensions[this.zDimension];if(!r.isRegular&&Array.isArray(r.irregularSpacing?.values)&&r.irregularSpacing.values.length>1){const i=e.z??0,o=r.irregularSpacing.values,n=r.isPositiveUp?1:-1,s=o.reduce(((e,t)=>Math.abs(n*t-i)<Math.abs(n*e-i)?t:e));for(let e=0;e<o.length;++e)if(o[e]===s){t[2]=e;break}}return[t[0],t[1],t[2]]}computeLayerSpaceLocation(e){if(!this.isValid)return new _e.Z({x:0,y:0,spatialReference:this.spatialReference});const t=(0,y.d)(e);if((0,h.C)(t,t,this.voxelSizeInLayerSpaceSigned),(0,h.a)(t,t,this.originInLayerSpace3D),"xyt"===this.volumeType)return new _e.Z({x:t[0],y:t[1],spatialReference:this.spatialReference});const r=this.dimensions[this.zDimension];return r.isRegular||Array.isArray(r.irregularSpacing?.values)&&(e[2]<0?t[2]=r.irregularSpacing.values[0]:e[2]<r.irregularSpacing.values.length?t[2]=r.irregularSpacing.values[e[2]]:t[2]=r.irregularSpacing.values[r.irregularSpacing.values.length-1],r.isPositiveUp||(t[2]*=-1)),new _e.Z({x:t[0],y:t[1],z:t[2],spatialReference:this.spatialReference})}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Ze.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:[qe],json:{write:{enabled:!0,isRequired:!0}}})],Ze.prototype,"dimensions",void 0),(0,i._)([(0,p.Cb)({type:xe.Z,json:{read:{enabled:!1}}})],Ze.prototype,"spatialReference",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1}})],Ze.prototype,"zDimension",null),(0,i._)([(0,p.Cb)({type:[Boolean],json:{read:!1}})],Ze.prototype,"isValid",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"originInLayerSpace3D",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"voxelSizeInLayerSpaceSigned",null),(0,i._)([(0,p.Cb)({type:["xyz","xyzt","xyt"],json:{read:{enabled:!1}}})],Ze.prototype,"volumeType",null),(0,i._)([(0,p.Cb)({type:[Number],json:{read:!1}})],Ze.prototype,"sizeInVoxels",null),Ze=(0,i._)([(0,d.j)(ze)],Ze);const Te=Ze;var Ae;let Fe=Ae=class extends R.wq{constructor(){super(...arguments),this.apronWidth=1,this.brickSize=[32,32,32],this.maxLodLevel=0,this.nodeSize=[4,4,4]}isValid(){const e=new Ae;return e.apronWidth===this.apronWidth&&e.maxLodLevel===this.maxLodLevel&&!!this.brickSize&&!!this.nodeSize&&!(!Array.isArray(this.brickSize)||!Array.isArray(this.nodeSize))&&3===this.brickSize.length&&3===this.nodeSize.length&&32===this.brickSize[0]&&32===this.brickSize[1]&&32===this.brickSize[2]&&4===this.nodeSize[0]&&4===this.nodeSize[1]&&4===this.nodeSize[2]}};(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"apronWidth",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"brickSize",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"maxLodLevel",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:{enabled:!0,isRequired:!0}}})],Fe.prototype,"nodeSize",void 0),Fe=Ae=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeIndex")],Fe);const Pe=Fe;let Le=class extends((0,I.J)(R.wq)){constructor(e){super(e),this.enabled=!0,this.label="",this.normal=null,this.point=null}get orientation(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(e),0,!0)}set orientation(e){const t=U(e,this.tilt);this._set("normal",t),this._set("orientation",e)}get tilt(){if(!Array.isArray(this.normal)||3!==this.normal.length)return 0;const[e,t]=D(this.normal);return V.BV.normalize((0,u.q9)(t),0,!0)}set tilt(e){const t=U(this.orientation,e);this._set("normal",t),this._set("tilt",e)}};(0,i._)([(0,p.Cb)({type:Boolean,json:{default:!0,write:!0}})],Le.prototype,"enabled",void 0),(0,i._)([(0,p.Cb)({type:String,json:{write:!0}})],Le.prototype,"label",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Le.prototype,"orientation",null),(0,i._)([(0,p.Cb)({type:Number,json:{read:!1},clonable:!1,range:{min:0,max:360}}),(0,E.p)((e=>V.BV.normalize((0,u.q9)(e),0,!0)))],Le.prototype,"tilt",null),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Le.prototype,"normal",void 0),(0,i._)([(0,p.Cb)({type:[Number],json:{write:!0}})],Le.prototype,"point",void 0),Le=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelDynamicSection")],Le);const Oe=Le;var De;let Ue=De=class extends R.wq{constructor(e){super(e),this.volumeId=0,this.verticalExaggeration=1,this.exaggerationMode="scale-height",this.verticalOffset=0,this.slices=new(o.Z.ofType(k)),this.dynamicSections=new(o.Z.ofType(Oe))}set slices(e){this._set("slices",(0,oe.Z)(e,this._get("slices"),o.Z.ofType(k)))}set dynamicSections(e){this._set("dynamicSections",(0,oe.Z)(e,this._get("dynamicSections"),o.Z.ofType(Oe)))}clone(){return new De({volumeId:this.volumeId,verticalExaggeration:this.verticalExaggeration,exaggerationMode:this.exaggerationMode,verticalOffset:this.verticalOffset,slices:(0,ee.d9)(this.slices),dynamicSections:(0,ee.d9)(this.dynamicSections)})}};(0,i._)([(0,p.Cb)({type:u.z8,json:{write:{enabled:!0,isRequired:!0}}})],Ue.prototype,"volumeId",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:1,write:!0}})],Ue.prototype,"verticalExaggeration",void 0),(0,i._)([(0,p.Cb)({type:["scale-position","scale-height"],json:{default:"scale-height",write:!0}})],Ue.prototype,"exaggerationMode",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{default:0,write:!0}})],Ue.prototype,"verticalOffset",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(k),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.slices&&this.slices.length>0}}}}})],Ue.prototype,"slices",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Oe),json:{write:{enabled:!0,overridePolicy(){return{enabled:!!this.dynamicSections&&this.dynamicSections.length>0}}}}})],Ue.prototype,"dynamicSections",null),Ue=De=(0,i._)([(0,d.j)("esri.layers.voxel.VoxelVolumeStyle")],Ue);const Ee=Ue;var Be=r(32163);const ke="esri.layers.VoxelLayer",$e=s.Z.getLogger(ke);let Ke=class extends((0,_.Vt)((0,b.Y)((0,v.q)((0,S.I)((0,w.M)((0,a.R)((0,g.V)(f.Z)))))))){constructor(e){super(e),this.serviceRoot="",this.operationalLayerType="Voxel",this.legendEnabled=!0,this.title=null,this.sections=null,this.currentVariableId=0,this.volumeStyles=null,this.renderMode="volume",this.variableStyles=null,this.enableSlices=!0,this.enableSections=!0,this.enableDynamicSections=!0,this.enableIsosurfaces=!0,this.shading=new W,this.opacity=1,this.variables=new o.Z,this.volumes=new o.Z,this.index=null,this.minScale=0,this.maxScale=0,this.type="voxel",this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.fullExtent=null,this.popupEnabled=!0,this.popupTemplate=null,this.test=null,this.volumeStyles=new(o.Z.ofType(Ee)),this.variableStyles=new(o.Z.ofType(we)),this.sections=new(o.Z.ofType(J)),e?.constantUpscaling&&(this.test={constantUpscaling:!0})}set url(e){this._set("url",(0,x.Nm)(e,$e))}load(e){const t=null!=e?e.signal:null,r=this.loadFromPortal({supportedTypes:["Scene Service"]},e).catch(l.r9).then((()=>this._fetchService(t))).then((()=>this.serviceRoot=this.url));return this.addResolvingPromise(r),Promise.resolve(this)}read(e,t){super.read(e,t);for(const e of this.volumes)e.spatialReference=this.spatialReference}readVersion(e,t){return super.parseVersionString(e)}validateLayer(e){if(e.layerType&&e.layerType!==this.operationalLayerType)throw new n.Z("voxel-layer:layer-type-not-supported","VoxelLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor)||this.version.major<3)throw new n.Z("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"});if(this.version.major>3)throw new n.Z("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"3.x"})}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=m.Z.fromJSON(e,r);if(0===i.zmin&&0===i.zmax&&Array.isArray(t.volumes)){const e=Te.fromJSON(t.volumes[0]);if(e.isValid&&"xyt"!==e.volumeType){const t=e.dimensions[2];if(t.isRegular){let e=t.regularSpacing.offset,r=t.regularSpacing.offset+t.regularSpacing.scale*(t.size-1);if(e>r){const t=e;e=r,r=t}i.zmin=e,i.zmax=r}}}return i}return null}get voxelFields(){const e=[new j.Z({name:"Voxel.ServiceValue",alias:"Value",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.ServiceVariableLabel",alias:"Variable",domain:null,editable:!1,length:128,type:"string"}),new j.Z({name:"Voxel.Position",alias:"Voxel Position",domain:null,editable:!1,length:128,type:"string"})],t=this.getVolume(null);if(null!=t){if("xyzt"===t.volumeType||"xyt"===t.volumeType){const t=new j.Z({name:"Voxel.ServiceLocalTime",alias:"Local Time",domain:null,editable:!1,length:128,type:"string"});e.push(t);const r=new j.Z({name:"Voxel.ServiceNativeTime",alias:"Native Time",domain:null,editable:!1,length:128,type:"string"});e.push(r)}if("xyt"!==t.volumeType){const t=new j.Z({name:"Voxel.ServiceDepth",alias:"Depth",domain:null,editable:!1,length:128,type:"string"});e.push(t)}}return e}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.voxelFields,r=this.title;return(0,Be.eZ)({fields:t,title:r},e)}getConfiguration(){const e={layerType:this.operationalLayerType,version:this.version.versionString,name:this.title,spatialReference:this.spatialReference,fullExtent:this.fullExtent,volumes:this.volumes.toJSON(),variables:this.variables.toJSON(),index:this.index?.toJSON(),sections:this.getSections(),style:{volumeStyles:this.getVolumeStyles(),currentVariableId:this.currentVariableId,renderMode:this.renderMode,variableStyles:this.getVariableStyles(),enableSections:this.enableSections,enableDynamicSections:this.enableDynamicSections,enableIsosurfaces:this.enableIsosurfaces,enableSlices:this.enableSlices,shading:this.shading}};return e.index&&this.index?.isValid()?JSON.stringify(e):""}getVariableStyle(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variableStyles||-1===t)return null;const r=this.variableStyles.findIndex((e=>e.variableId===t));return r<0?null:this.variableStyles.getItemAt(r)}getVariable(e){let t=-1;if(t=null!=e?e:this.currentVariableId,!this.variables||-1===t)return null;const r=this.variables.findIndex((e=>e.id===t));return r<0?null:this.variables.getItemAt(r)}getVolume(e){const t=this.getVariable(e);return null!=t?this.volumes.find((({id:e})=>e===t.volumeId)):null}getVolumeStyle(e){const t=this.getVariable(e);return null!=t?this.volumeStyles.find((({volumeId:e})=>e===t.volumeId)):null}getColorForContinuousDataValue(e,t,r){const i=this.getVariable(e);if(null==i||"continuous"!==i.renderingFormat?.continuity)return null;if(!this.variableStyles)return null;const o=this.variableStyles.findIndex((t=>t.variableId===e));if(o<0)return null;const n=this.variableStyles.getItemAt(o);return n.transferFunction?n.transferFunction.getColorForContinuousDataValue(t,r):null}getSections(){const e=[];for(const t of this.sections)e.push(new J({enabled:t.enabled,href:t.href,id:t.id,label:t.label,normal:t.normal,point:t.point,sizeInPixel:t.sizeInPixel,slices:t.slices,timeId:t.timeId,variableId:t.variableId}));return e}getVariableStyles(){const e=[];for(const t of this.variableStyles){const r=this._getVariable(t);if(null!=r){const i=t.clone();i.isosurfaces.length>4&&(i.isosurfaces=i.isosurfaces.slice(0,3),$e.error("A maximum of 4 isosurfaces are supported for Voxel Layers."));for(const e of i.isosurfaces)if(!e.colorLocked){const t=this.getColorForContinuousDataValue(i.variableId,e.value,!1);null===t||t.equals(e.color)||(e.color=t)}if("continuous"===r.renderingFormat.continuity)(null===i.transferFunction||i.transferFunction.colorStops.length<2)&&$e.error(`VoxelVariableStyle for variable ${r.id} is invalid. At least 2 color stops are required in the transferFunction for continuous Voxel Layer variables.`),null!==i.transferFunction&&(Array.isArray(i.transferFunction.stretchRange)&&2===i.transferFunction.stretchRange.length||($e.error(`VoxelVariableStyle for variable ${r.id} is invalid. The stretchRange of the transferFunction for continuous Voxel Layer variables must be of the form [minimumDataValue, maximumDataValue].`),i.transferFunction.stretchRange=[0,1],i.transferFunction.colorStops.removeAll()));else if("discrete"===r.renderingFormat.continuity)if(0===t.uniqueValues.length)$e.error(`VoxelVariableStyle for variable ${r.id} is invalid. Unique values are required for discrete Voxel Layer variables.`);else for(const e of t.uniqueValues)null!==e.label&&void 0!==e.label||null===e.value||void 0===e.value||(e.label=e.value.toString());e.push(i)}else $e.error(`VoxelVariable ID=${t.variableId} doesn't exist, VoxelVariableStyle for this VoxelVariable will be ignored.`)}return e}getVolumeStyles(){const e=[];for(const t of this.volumeStyles){const r=this._getVolumeFromVolumeId(t.volumeId);if(null!=r){const i=t.clone();for(const e of i.slices)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");for(const e of i.dynamicSections)this._isPlaneValid(e,[0,1,r.zDimension],r.dimensions)||(e.enabled=!1,e.label="invalid");e.push(i)}else $e.error(`VoxelVolume ID=${t.volumeId} doesn't exist, VoxelVolumeStyle for this VoxelVolume will be ignored.`)}return e}_getVariable(e){const t=e.variableId;for(const e of this.variables)if(e.id===t)return e;return null}_getVolumeFromVolumeId(e){for(const t of this.volumes)if(t.id===e)return t;return null}_isPlaneValid(e,t,r){if(!e.point)return!1;if(!Array.isArray(e.point)||3!==e.point.length)return!1;if(!e.normal)return!1;if(!Array.isArray(e.normal)||3!==e.normal.length)return!1;const i=(0,y.f)(e.normal[0],e.normal[1],e.normal[2]);return(0,h.n)(i,i),!(Math.abs(i[0])+Math.abs(i[1])+Math.abs(i[2])<1e-6||(e.normal[0]=i[0],e.normal[1]=i[1],e.normal[2]=i[2],0))}};(0,i._)([(0,p.Cb)({type:["Voxel"]})],Ke.prototype,"operationalLayerType",void 0),(0,i._)([(0,p.Cb)(C.rn)],Ke.prototype,"legendEnabled",void 0),(0,i._)([(0,p.Cb)({json:{write:!0}})],Ke.prototype,"title",void 0),(0,i._)([(0,p.Cb)(C.HQ)],Ke.prototype,"url",null),(0,i._)([(0,p.Cb)({type:o.Z.ofType(J),json:{origins:{"web-scene":{name:"layerDefinition.sections",write:!0}}}})],Ke.prototype,"sections",void 0),(0,i._)([(0,p.Cb)({type:u.z8,json:{origins:{"web-scene":{name:"layerDefinition.style.currentVariableId",write:{enabled:!0,isRequired:!0,ignoreOrigin:!0}},service:{name:"style.currentVariableId"}}}})],Ke.prototype,"currentVariableId",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Ee),json:{origins:{"web-scene":{name:"layerDefinition.style.volumeStyles",write:!0},service:{name:"style.volumeStyles"}}}})],Ke.prototype,"volumeStyles",void 0),(0,i._)([(0,p.Cb)({type:["volume","surfaces"],json:{origins:{"web-scene":{name:"layerDefinition.style.renderMode",write:!0},service:{name:"style.renderMode"}}}})],Ke.prototype,"renderMode",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(we),json:{origins:{"web-scene":{name:"layerDefinition.style.variableStyles",write:!0},service:{name:"style.variableStyles"}}}})],Ke.prototype,"variableStyles",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSlices",write:!0},service:{name:"style.enableSlices"}}}})],Ke.prototype,"enableSlices",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableSections",write:!0},service:{name:"style.enableSections"}}}})],Ke.prototype,"enableSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableDynamicSections",write:!0},service:{name:"style.enableDynamicSections"}}}})],Ke.prototype,"enableDynamicSections",void 0),(0,i._)([(0,p.Cb)({type:Boolean,json:{origins:{"web-scene":{name:"layerDefinition.style.enableIsosurfaces",write:!0},service:{name:"style.enableIsosurfaces"}}}})],Ke.prototype,"enableIsosurfaces",void 0),(0,i._)([(0,p.Cb)({type:W,json:{origins:{"web-scene":{name:"layerDefinition.style.shading",write:!0},service:{name:"style.shading"}}}})],Ke.prototype,"shading",void 0),(0,i._)([(0,p.Cb)({type:["show","hide"]})],Ke.prototype,"listMode",void 0),(0,i._)([(0,p.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0,json:{read:!1,write:!1,origins:{"web-scene":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],Ke.prototype,"opacity",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(X)})],Ke.prototype,"variables",void 0),(0,i._)([(0,p.Cb)({type:o.Z.ofType(Te)})],Ke.prototype,"volumes",void 0),(0,i._)([(0,p.Cb)({type:Pe})],Ke.prototype,"index",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Ke.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",read:!1,write:!1,origins:{service:{read:!1,write:!1}}}})],Ke.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({json:{read:!1},readOnly:!0})],Ke.prototype,"type",void 0),(0,i._)([(0,p.Cb)({readOnly:!0,json:{name:"serviceVersion"}})],Ke.prototype,"version",void 0),(0,i._)([(0,c.r)("service","version")],Ke.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:m.Z})],Ke.prototype,"fullExtent",void 0),(0,i._)([(0,c.r)("service","fullExtent",["fullExtent"])],Ke.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,clonable:!1,json:{read:!1}})],Ke.prototype,"voxelFields",null),(0,i._)([(0,p.Cb)(C.C_)],Ke.prototype,"popupEnabled",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],Ke.prototype,"defaultPopupTemplate",null),Ke=(0,i._)([(0,d.j)(ke)],Ke);const Je=Ke},54295:(e,t,r)=>{r.d(t,{V:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,i._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),o=r(92604),n=r(5600),s=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,o.Z.getLogger(this.declaredClass)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,s.j)("esri.layers.mixins.ArcGISService")],t),t}},72965:(e,t,r)=>{r.d(t,{M:()=>s});var i=r(43697),o=r(5600),n=(r(75215),r(67676),r(80442),r(52011));const s=e=>{let t=class extends e{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const e={minScale:this.minScale,maxScale:this.maxScale},t=this.parent;t&&"effectiveScaleRange"in t&&function(e,t){e.minScale=e.minScale>0?t.minScale>0?Math.min(e.minScale,t.minScale):e.minScale:t.minScale,e.maxScale=e.maxScale>0?t.maxScale>0?Math.max(e.maxScale,t.maxScale):e.maxScale:t.maxScale}(e,t.effectiveScaleRange);const r=this._get("effectiveScaleRange");return r&&r.minScale===e.minScale&&r.maxScale===e.maxScale?r:e}};return(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"minScale",void 0),(0,i._)([(0,o.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],t.prototype,"maxScale",void 0),(0,i._)([(0,o.Cb)({readOnly:!0})],t.prototype,"effectiveScaleRange",null),t=(0,i._)([(0,n.j)("esri.layers.mixins.ScaleRangeLayer")],t),t}},20559:(e,t,r)=>{r.d(t,{xp:()=>F,Vt:()=>q});var i=r(43697),o=r(3172),n=r(20102),s=r(92604),a=r(95330),l=r(17452),p=r(5600),u=(r(75215),r(67676),r(80442),r(71715)),c=r(52011),d=r(30556),h=r(65845),y=r(6570),m=r(79235),f=r(82971),g=r(66677),b=r(21506),v=r(61064);var S=r(65587),w=r(15235),_=r(66643),x=r(41123),C=r(97873);async function j(e,t,r){if(!t||!t.resources)return;const i=t.portalItem===e.portalItem?new Set(e.paths):new Set;e.paths.length=0,e.portalItem=t.portalItem;const o=new Set(t.resources.toKeep.map((e=>e.resource.path))),s=new Set,l=[];o.forEach((t=>{i.delete(t),e.paths.push(t)}));for(const n of t.resources.toUpdate)if(i.delete(n.resource.path),o.has(n.resource.path)||s.has(n.resource.path)){const{resource:t,content:i,finish:o,error:s}=n,a=(0,C.getSiblingOfSameTypeI)(t,(0,x.D)());e.paths.push(a.path),l.push(I({resource:a,content:i,compress:n.compress,finish:o,error:s},r))}else e.paths.push(n.resource.path),l.push(V(n,r)),s.add(n.resource.path);for(const i of t.resources.toAdd)l.push(I(i,r)),e.paths.push(i.resource.path);if(i.forEach((e=>{if(t.portalItem){const r=t.portalItem.resourceFromPath(e);l.push(r.portalItem.removeResource(r).catch((()=>{})))}})),0===l.length)return;const p=await(0,a.as)(l);(0,a.k_)(r);const u=p.filter((e=>"error"in e)).map((e=>e.error));if(u.length>0)throw new n.Z("save:resources","Failed to save one or more resources",{errors:u})}async function I(e,t){const r={...null!=t?t:{},compress:e.compress},i=await(0,_.q6)(e.resource.portalItem.addResource(e.resource,e.content,r));if(!0!==i.ok)throw e.error?.(i.error),i.error;e.finish?.(e.resource)}async function V(e,t){const r=await(0,_.q6)(e.resource.update(e.content,t));if(!0!==r.ok)throw e.error?.(r.error),r.error;e.finish?.(e.resource)}const R="esri.layers.mixins.SceneService",N=s.Z.getLogger(R),q=e=>{let t=class extends e{constructor(){super(...arguments),this.spatialReference=null,this.fullExtent=null,this.heightModelInfo=null,this.minScale=0,this.maxScale=0,this.version={major:Number.NaN,minor:Number.NaN,versionString:""},this.copyright=null,this.sublayerTitleMode="item-title",this.title=null,this.layerId=null,this.indexInfo=null,this._debouncedSaveOperations=(0,a.Ds)((async(e,t,r)=>{switch(e){case F.SAVE:return this._save(t);case F.SAVE_AS:return this._saveAs(r,t)}}))}readSpatialReference(e,t){return this._readSpatialReference(t)}_readSpatialReference(e){if(null!=e.spatialReference)return f.Z.fromJSON(e.spatialReference);{const t=e.store,r=t.indexCRS||t.geographicCRS,i=r&&parseInt(r.substring(r.lastIndexOf("/")+1,r.length),10);return null!=i?new f.Z(i):null}}readFullExtent(e,t,r){if(null!=e&&"object"==typeof e){const i=null==e.spatialReference?{...e,spatialReference:this._readSpatialReference(t)}:e;return y.Z.fromJSON(i,r)}const i=t.store,o=this._readSpatialReference(t);return null==o||null==i||null==i.extent||!Array.isArray(i.extent)||i.extent.some((e=>e<z))?null:new y.Z({xmin:i.extent[0],ymin:i.extent[1],xmax:i.extent[2],ymax:i.extent[3],spatialReference:o})}parseVersionString(e){const t={major:Number.NaN,minor:Number.NaN,versionString:e},r=e.split(".");return r.length>=2&&(t.major=parseInt(r[0],10),t.minor=parseInt(r[1],10)),t}readVersion(e,t){const r=t.store,i=null!=r.version?r.version.toString():"";return this.parseVersionString(i)}readTitlePortalItem(e){return"item-title"!==this.sublayerTitleMode?void 0:e}readTitleService(e,t){const r=this.portalItem&&this.portalItem.title;if("item-title"===this.sublayerTitleMode)return(0,g.a7)(this.url,t.name);let i=t.name;if(!i&&this.url){const e=(0,g.Qc)(this.url);null!=e&&(i=e.title)}return"item-title-and-service-name"===this.sublayerTitleMode&&r&&(i=r+" - "+i),(0,g.ld)(i)}set url(e){const t=(0,g.XG)({layer:this,url:e,nonStandardUrlAllowed:!1,logger:N});this._set("url",t.url),null!=t.layerId&&this._set("layerId",t.layerId)}writeUrl(e,t,r,i){(0,g.wH)(this,e,"layers",t,i)}get parsedUrl(){const e=this._get("url"),t=(0,l.mN)(e);return null!=this.layerId&&(t.path=`${t.path}/layers/${this.layerId}`),t}async _fetchIndexAndUpdateExtent(e,t){this.indexInfo=(0,v.T)(this.parsedUrl.path,this.rootNode,e,this.apiKey,N,t),null==this.fullExtent||this.fullExtent.hasZ||this._updateExtent(await this.indexInfo)}_updateExtent(e){if("page"===e?.type){const t=e.rootIndex%e.pageSize,r=e.rootPage?.nodes?.[t];if(null==r||null==r.obb||null==r.obb.center||null==r.obb.halfSize)throw new n.Z("sceneservice:invalid-node-page","Invalid node page.");if(r.obb.center[0]<z||null==this.fullExtent||this.fullExtent.hasZ)return;const i=r.obb.halfSize,o=r.obb.center[2],s=Math.sqrt(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]);this.fullExtent.zmin=o-s,this.fullExtent.zmax=o+s}else if("node"===e?.type){const t=e.rootNode?.mbs;if(!Array.isArray(t)||4!==t.length||t[0]<z)return;const r=t[2],i=t[3],{fullExtent:o}=this;o&&(o.zmin=r-i,o.zmax=r+i)}}async _fetchService(e){if(null==this.url)throw new n.Z("sceneservice:url-not-set","Scene service can not be loaded without valid portal item or url");if(null==this.layerId&&/SceneServer\/*$/i.test(this.url)){const t=await this._fetchFirstLayerId(e);null!=t&&(this.layerId=t)}return this._fetchServiceLayer(e)}async _fetchFirstLayerId(e){const t=await(0,o.default)(this.url,{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});if(t.data&&Array.isArray(t.data.layers)&&t.data.layers.length>0)return t.data.layers[0].id}async _fetchServiceLayer(e){const t=await(0,o.default)(this.parsedUrl?.path??"",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e});t.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));let r=!1;if(t.data.layerType&&"Voxel"===t.data.layerType&&(r=!0),r)return this._fetchVoxelServiceLayer();const i=t.data;this.read(i,this._getServiceContext()),this.validateLayer(i)}async _fetchVoxelServiceLayer(e){const t=(await(0,o.default)(this.parsedUrl?.path+"/layer",{query:{f:"json",token:this.apiKey},responseType:"json",signal:e})).data;this.read(t,this._getServiceContext()),this.validateLayer(t)}_getServiceContext(){return{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl}}async _ensureLoadBeforeSave(){await this.load(),"beforeSave"in this&&"function"==typeof this.beforeSave&&await this.beforeSave()}validateLayer(e){}_updateTypeKeywords(e,t,r){e.typeKeywords||(e.typeKeywords=[]);const i=t.getTypeKeywords();for(const t of i)e.typeKeywords.push(t);e.typeKeywords&&(e.typeKeywords=e.typeKeywords.filter(((e,t,r)=>r.indexOf(e)===t)),r===M.newItem&&(e.typeKeywords=e.typeKeywords.filter((e=>"Hosted Service"!==e))))}async _saveAs(e,t){const r={...A,...t};let i=w.default.from(e);i||(N.error("_saveAs(): requires a portal item parameter"),await Promise.reject(new n.Z("sceneservice:portal-item-required","_saveAs() requires a portal item to save to"))),i.id&&(i=i.clone(),i.id=null);const o=i.portal||S.Z.getDefault();await this._ensureLoadBeforeSave(),i.type=T,i.portal=o;const s={origin:"portal-item",url:null,messages:[],portal:o,portalItem:i,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},a={layers:[this.write({},s)]};return await Promise.all(s.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(a,s,r),i.url=this.url,i.title||(i.title=this.title),this._updateTypeKeywords(i,r,M.newItem),await o.signIn(),await(o.user?.addItem({item:i,folder:r&&r.folder,data:a})),await j(this.resourceReferences,s,null),this.portalItem=i,(0,h.D)(s),s.portalItem=i,i}async _save(e){const t={...A,...e};if(!this.portalItem)throw N.error("_save(): requires the .portalItem property to be set"),new n.Z("sceneservice:portal-item-not-set","Portal item to save to has not been set on this SceneService");if(this.portalItem.type!==T)throw N.error("_save(): Non-matching portal item type. Got "+this.portalItem.type+", expected "+T),new n.Z("sceneservice:portal-item-wrong-type",`Portal item needs to have type "${T}"`);await this._ensureLoadBeforeSave();const r={origin:"portal-item",url:this.portalItem.itemUrl&&(0,l.mN)(this.portalItem.itemUrl),messages:[],portal:this.portalItem.portal||S.Z.getDefault(),portalItem:this.portalItem,writtenProperties:[],blockedRelativeUrls:[],resources:{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}},i={layers:[this.write({},r)]};return await Promise.all(r.resources.pendingOperations??[]),await this._validateAgainstJSONSchema(i,r,t),this.portalItem.url=this.url,this.portalItem.title||(this.portalItem.title=this.title),this._updateTypeKeywords(this.portalItem,t,M.existingItem),await this.portalItem.update({data:i}),await j(this.resourceReferences,r,null),(0,h.D)(r),this.portalItem}async _validateAgainstJSONSchema(e,t,r){let i=t.messages?.filter((e=>"error"===e.type)).map((e=>new n.Z(e.name,e.message,e.details)))??[];r?.validationOptions?.ignoreUnsupported&&(i=i.filter((e=>"layer:unsupported"!==e.name&&"symbol:unsupported"!==e.name&&"symbol-layer:unsupported"!==e.name&&"property:unsupported"!==e.name&&"url:unsupported"!==e.name&&"scenemodification:unsupported"!==e.name)));const o=r?.validationOptions,s=o?.enabled,a=null;if(s&&a){const t=(await a()).validate(e,r.portalItemLayerType);if(t.length>0){const e=`Layer item did not validate:\n${t.join("\n")}`;if(N.error(`_validateAgainstJSONSchema(): ${e}`),"throw"===o.failPolicy){const e=t.map((e=>new n.Z("sceneservice:schema-validation",e))).concat(i);throw new n.Z("sceneservice-validate:error","Failed to save layer item due to schema validation, see `details.errors`.",{combined:e})}}}if(i.length>0)throw new n.Z("sceneservice:save","Failed to save SceneService due to unsupported or invalid content. See 'details.errors' for more detailed information",{errors:i})}};return(0,i._)([(0,p.Cb)(b.id)],t.prototype,"id",void 0),(0,i._)([(0,p.Cb)({type:f.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,u.r)("spatialReference",["spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,p.Cb)({type:y.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.r)("fullExtent",["fullExtent","store.extent","spatialReference","store.indexCRS","store.geographicCRS"])],t.prototype,"readFullExtent",null),(0,i._)([(0,p.Cb)({readOnly:!0,type:m.Z})],t.prototype,"heightModelInfo",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:{source:"minScale"},write:!1}}}})],t.prototype,"minScale",void 0),(0,i._)([(0,p.Cb)({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:{source:"maxScale"},write:!1}}}})],t.prototype,"maxScale",void 0),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,u.r)("version",["store.version"])],t.prototype,"readVersion",null),(0,i._)([(0,p.Cb)({type:String,json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,p.Cb)({type:String,json:{read:!1}})],t.prototype,"sublayerTitleMode",void 0),(0,i._)([(0,p.Cb)({type:String})],t.prototype,"title",void 0),(0,i._)([(0,u.r)("portal-item","title")],t.prototype,"readTitlePortalItem",null),(0,i._)([(0,u.r)("service","title",["name"])],t.prototype,"readTitleService",null),(0,i._)([(0,p.Cb)({type:Number,json:{origins:{service:{read:{source:"id"}},"portal-item":{write:{target:"id",isRequired:!0,ignoreOrigin:!0},read:!1}}}})],t.prototype,"layerId",void 0),(0,i._)([(0,p.Cb)(b.HQ)],t.prototype,"url",null),(0,i._)([(0,d.c)("url")],t.prototype,"writeUrl",null),(0,i._)([(0,p.Cb)()],t.prototype,"parsedUrl",null),(0,i._)([(0,p.Cb)({readOnly:!0})],t.prototype,"store",void 0),(0,i._)([(0,p.Cb)({type:String,readOnly:!0,json:{read:{source:"store.rootNode"}}})],t.prototype,"rootNode",void 0),t=(0,i._)([(0,c.j)(R)],t),t},z=-1e38;var M,Z;(Z=M||(M={}))[Z.existingItem=0]="existingItem",Z[Z.newItem=1]="newItem";const T="Scene Service",A={getTypeKeywords:()=>[],portalItemLayerType:"unknown",validationOptions:{enabled:!0,ignoreUnsupported:!1,failPolicy:"throw"}};var F;!function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(F||(F={}))},61064:(e,t,r)=>{r.d(t,{T:()=>n});var i=r(3172),o=r(20102);async function n(e,t,r,n,s,a){let l=null;if(null!=r){const t=`${e}/nodepages/`,o=t+Math.floor(r.rootIndex/r.nodesPerPage);try{return{type:"page",rootPage:(await(0,i.default)(o,{query:{f:"json",token:n},responseType:"json",signal:a})).data,rootIndex:r.rootIndex,pageSize:r.nodesPerPage,lodMetric:r.lodSelectionMetricType,urlPrefix:t}}catch(e){null!=s&&s.warn("#fetchIndexInfo()","Failed to load root node page. Falling back to node documents.",o,e),l=e}}if(!t)return null;const p=`${e}/nodes/`,u=p+(t&&t.split("/").pop());try{return{type:"node",rootNode:(await(0,i.default)(u,{query:{f:"json",token:n},responseType:"json",signal:a})).data,urlPrefix:p}}catch(e){throw new o.Z("sceneservice:root-node-missing","Root node missing.",{pageError:l,nodeError:e,url:u})}}},66094:(e,t,r)=>{r.d(t,{B:()=>o});var i=r(17452);function o(e){return n[function(e){return e instanceof Blob?e.type:function(e){const t=(0,i.Ml)(e);return l[t]||s}(e.url)}(e)]||a}const n={},s="text/plain",a=n[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const e in l)n[l[e]]=e},97873:(e,t,r)=>{r.r(t),r.d(t,{addOrUpdateResource:()=>a,contentToBlob:()=>d,fetchResources:()=>s,getSiblingOfSameType:()=>h,getSiblingOfSameTypeI:()=>y,removeAllResources:()=>p,removeResource:()=>l,splitPrefixFileNameAndExtension:()=>c});var i=r(3172),o=r(20102),n=r(17452);async function s(e,t={},r){await e.load(r);const i=(0,n.v_)(e.itemUrl,"resources"),{start:o=1,num:s=10,sortOrder:a="asc",sortField:l="created"}=t,p={query:{start:o,num:s,sortOrder:a,sortField:l,token:e.apiKey},signal:r?.signal},u=await e.portal.request(i,p);return{total:u.total,nextStart:u.nextStart,resources:u.resources.map((({created:t,size:r,resource:i})=>({created:new Date(t),size:r,resource:e.resourceFromPath(i)})))}}async function a(e,t,r,i){if(!e.hasPath())throw new o.Z(`portal-item-resource-${t}:invalid-path`,"Resource does not have a valid path");const s=e.portalItem;await s.load(i);const a=(0,n.v_)(s.userItemUrl,"add"===t?"addResources":"updateResources"),[l,p]=u(e.path),c=await d(r),h=new FormData;return l&&"."!==l&&h.append("resourcesPrefix",l),null!=i&&i.compress&&h.append("compress","true"),h.append("fileName",p),h.append("file",c,p),h.append("f","json"),null!=i&&i.access&&h.append("access",i.access),await s.portal.request(a,{method:"post",body:h,signal:i?.signal}),e}async function l(e,t,r){if(!t.hasPath())throw new o.Z("portal-item-resources-remove:invalid-path","Resource does not have a valid path");await e.load(r);const i=(0,n.v_)(e.userItemUrl,"removeResources");await e.portal.request(i,{method:"post",query:{resource:t.path},signal:r?.signal}),t.portalItem=null}async function p(e,t){await e.load(t);const r=(0,n.v_)(e.userItemUrl,"removeResources");return e.portal.request(r,{method:"post",query:{deleteAll:!0},signal:t?.signal})}function u(e){const t=e.lastIndexOf("/");return-1===t?[".",e]:[e.slice(0,t),e.slice(t+1)]}function c(e){const[t,r]=function(e){const t=(0,n.Ml)(e);return null==t?[e,""]:[e.slice(0,e.length-t.length-1),`.${t}`]}(e),[i,o]=u(t);return[i,o,r]}async function d(e){return e instanceof Blob?e:(await(0,i.default)(e.url,{responseType:"blob"})).data}function h(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}function y(e,t){if(!e.hasPath())return null;const[r,,i]=c(e.path);return e.portalItem.resourceFromPath((0,n.v_)(r,t+i))}},32163:(e,t,r)=>{r.d(t,{eZ:()=>c});var i=r(51773),o=r(35671),n=r(84649),s=(r(63801),r(48074),r(38745),r(9190)),a=(r(10214),r(71423),r(44951),r(422)),l=r(29986);const p=["oid","global-id"],u=["oid","global-id","guid"];function c({displayField:e,editFieldsInfo:t,fields:r,objectIdField:l,title:p},u){if(!r)return null;const c=function({editFieldsInfo:e,fields:t,objectIdField:r},i){return function(e,t){const r=e;return t&&(e=e.filter((e=>!t.includes(e.type)))),e===r&&(e=e.slice()),e.sort(y),e}(t??[],i?.ignoreFieldTypes||v).map((t=>new a.Z({fieldName:t.name,isEditable:f(t,e),label:t.alias,format:g(t),visible:h(t,{editFieldsInfo:e,objectIdField:r,visibleFieldNames:i?.visibleFieldNames})})))}({editFieldsInfo:t,fields:r,objectIdField:l},u);if(!c.length)return null;const d=function(e){const t=(0,o.O5)(e),{titleBase:r}=e;return t?`${r}: {${t.trim()}}`:r??""}({titleBase:p,fields:r,displayField:e}),m=[new s.Z,new n.Z];return new i.Z({title:d,content:m,fieldInfos:c})}const d=[/^fnode_$/i,/^tnode_$/i,/^lpoly_$/i,/^rpoly_$/i,/^poly_$/i,/^subclass$/i,/^subclass_$/i,/^rings_ok$/i,/^rings_nok$/i,/shape/i,/perimeter/i,/objectid/i,/_i$/i],h=(e,{editFieldsInfo:t,objectIdField:r,visibleFieldNames:i})=>i?i.has(e.name):!(m(e.name,t)||r&&e.name===r||p.includes(e.type)||d.some((t=>t.test(e.name))));function y(e,t){return"oid"===e.type?-1:"oid"===t.type?1:b(e)?-1:b(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function m(e,t){if(!e||!t)return!1;const{creationDateField:r,creatorField:i,editDateField:o,editorField:n}=t;return[r&&r.toLowerCase(),i&&i.toLowerCase(),o&&o.toLowerCase(),n&&n.toLowerCase()].includes(e.toLowerCase())}function f(e,t){return e.editable&&!u.includes(e.type)&&!m(e.name,t)}function g(e){switch(e.type){case"small-integer":case"integer":case"single":return new l.Z({digitSeparator:!0,places:0});case"double":return new l.Z({digitSeparator:!0,places:2});case"date":return new l.Z({dateFormat:"long-month-day-year"});default:return"string"===e.type&&(0,o.Ec)(e.name)?new l.Z({digitSeparator:!0,places:0}):null}}function b(e){return"name"===(e.name&&e.name.toLowerCase())||"name"===(e.alias&&e.alias.toLowerCase())}const v=["geometry","blob","raster","guid","xml"]}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4729],{22303:(t,e,i)=>{i.d(e,{Z:()=>h});var r,o,s=i(35270),n=i(22021),a=i(75215);function l(t){return(0,n.uZ)((0,a.vU)(t),0,255)}function p(t,e,i){return t=Number(t),isNaN(t)?i:t<e?e:t>i?i:t}class d{static blendColors(t,e,i,r=new d){return r.r=Math.round(t.r+(e.r-t.r)*i),r.g=Math.round(t.g+(e.g-t.g)*i),r.b=Math.round(t.b+(e.b-t.b)*i),r.a=t.a+(e.a-t.a)*i,r._sanitize()}static fromRgb(t,e){const i=t.toLowerCase().match(/^(rgba?|hsla?)\(([\s\.\-,%0-9]+)\)/);if(i){const t=i[2].split(/\s*,\s*/),r=i[1];if("rgb"===r&&3===t.length||"rgba"===r&&4===t.length){const i=t[0];if("%"===i.charAt(i.length-1)){const i=t.map((t=>2.56*parseFloat(t)));return 4===t.length&&(i[3]=parseFloat(t[3])),d.fromArray(i,e)}return d.fromArray(t.map((t=>parseFloat(t))),e)}if("hsl"===r&&3===t.length||"hsla"===r&&4===t.length)return d.fromArray((0,s.B7)(parseFloat(t[0]),parseFloat(t[1])/100,parseFloat(t[2])/100,parseFloat(t[3])),e)}return null}static fromHex(t,e=new d){if(4!==t.length&&7!==t.length||"#"!==t[0])return null;const i=4===t.length?4:8,r=(1<<i)-1;let o=Number("0x"+t.substr(1));return isNaN(o)?null:(["b","g","r"].forEach((t=>{const s=o&r;o>>=i,e[t]=4===i?17*s:s})),e.a=1,e)}static fromArray(t,e=new d){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,s.St)(t)?(0,s.h$)(t):null;return i&&d.fromArray(i,e)||d.fromRgb(t,e)||d.fromHex(t,e)}static fromJSON(t){return t&&new d([t[0],t[1],t[2],t[3]/255])}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?d.fromString(t,this):Array.isArray(t)?d.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof d||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(){const t=this.r.toString(16),e=this.g.toString(16),i=this.b.toString(16);return`#${t.length<2?"0"+t:t}${e.length<2?"0"+e:e}${i.length<2?"0"+i:i}`}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=d.AlphaMode.ALWAYS){const e=l(this.r),i=l(this.g),r=l(this.b);return t===d.AlphaMode.ALWAYS||1!==this.a?[e,i,r,l(255*this.a)]:[e,i,r]}clone(){return new d(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=Math.round(p(this.r,0,255)),this.g=Math.round(p(this.g,0,255)),this.b=Math.round(p(this.b,0,255)),this.a=p(this.a,0,1),this}_set(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}}d.prototype.declaredClass="esri.Color",(o=(r=d||(d={})).AlphaMode||(r.AlphaMode={}))[o.ALWAYS=0]="ALWAYS",o[o.UNLESS_OPAQUE=1]="UNLESS_OPAQUE";const h=d},51773:(t,e,i)=>{i.d(e,{Z:()=>tt});var r=i(43697),o=i(2368),s=i(46791),n=i(96674),a=i(22974),l=i(92604),p=i(95330),d=i(5600),h=i(90578),u=i(71715),c=i(52011),y=i(30556),m=i(75215),f=i(35671),g=i(84649),v=i(63801),b=i(48074),_=i(38745),w=i(9190),C=i(10214),I=i(71423),x=i(44951);const F={base:null,key:"type",typeMap:{attachment:g.Z,media:C.Z,text:x.Z,expression:_.Z,field:w.Z,relationship:I.Z}};var j,Z=i(11223),S=i(422);i(67676),i(80442);let N=j=class extends n.wq{constructor(t){super(t),this.returnTopmostRaster=null,this.showNoDataRecords=null}clone(){return new j({showNoDataRecords:this.showNoDataRecords,returnTopmostRaster:this.returnTopmostRaster})}};(0,r._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],N.prototype,"returnTopmostRaster",void 0),(0,r._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],N.prototype,"showNoDataRecords",void 0),N=j=(0,r._)([(0,c.j)("esri.popup.LayerOptions")],N);const T=N;var A,O=i(44729);let R=A=class extends n.wq{constructor(t){super(t),this.showRelatedRecords=null,this.orderByFields=null}clone(){return new A({showRelatedRecords:this.showRelatedRecords,orderByFields:this.orderByFields?(0,a.d9)(this.orderByFields):null})}};(0,r._)([(0,d.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"showRelatedRecords",void 0),(0,r._)([(0,d.Cb)({type:[O.Z],json:{write:!0}})],R.prototype,"orderByFields",void 0),R=A=(0,r._)([(0,c.j)("esri.popup.RelatedRecordsInfo")],R);const E=R;var M,L=i(79742),D=i(15923),P=i(10699);let U=M=class extends((0,P.IG)(D.Z)){constructor(t){super(t),this.active=!1,this.className=null,this.disabled=!1,this.icon=null,this.id=null,this.indicator=!1,this.title=null,this.type=null,this.visible=!0}clone(){return new M({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible})}};(0,r._)([(0,d.Cb)()],U.prototype,"active",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"className",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"disabled",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"icon",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"id",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"indicator",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"title",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"type",void 0),(0,r._)([(0,d.Cb)()],U.prototype,"visible",void 0),U=M=(0,r._)([(0,c.j)("esri.support.actions.ActionBase")],U);const B=U;var J;let $=J=class extends B{constructor(t){super(t),this.image=null,this.type="button"}clone(){return new J({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image})}};(0,r._)([(0,d.Cb)()],$.prototype,"image",void 0),$=J=(0,r._)([(0,c.j)("esri.support.Action.ActionButton")],$);const k=$;var q;let H=q=class extends B{constructor(t){super(t),this.image=null,this.type="toggle",this.value=!1}clone(){return new q({active:this.active,className:this.className,disabled:this.disabled,icon:this.icon,id:this.id,indicator:this.indicator,title:this.title,visible:this.visible,image:this.image,value:this.value})}};(0,r._)([(0,d.Cb)()],H.prototype,"image",void 0),(0,r._)([(0,d.Cb)()],H.prototype,"value",void 0),H=q=(0,r._)([(0,c.j)("esri.support.Action.ActionToggle")],H);const Y=H,z=l.Z.getLogger("esri.PopupTemplate"),W="relationships/",V="expression/",G=s.Z.ofType({key:"type",defaultKeyValue:"button",base:B,typeMap:{button:k,toggle:Y}}),K={base:v.Z,key:"type",typeMap:{media:C.Z,custom:b.Z,text:x.Z,attachments:g.Z,fields:w.Z,expression:_.Z,relationship:I.Z}},X=["attachments","fields","media","text","expression","relationship"];let Q=class extends((0,o.J)(n.wq)){constructor(){super(...arguments),this.actions=null,this.content="",this.expressionInfos=null,this.fieldInfos=null,this.layerOptions=null,this.lastEditInfoEnabled=!0,this.outFields=null,this.overwriteActions=!1,this.returnGeometry=!1,this.title=""}castContent(t){return Array.isArray(t)?t.map((t=>(0,m.N7)(K,t))):"string"==typeof t||"function"==typeof t||t instanceof HTMLElement||(0,p.y8)(t)?t:(z.error("content error","unsupported content value",{value:t}),null)}readContent(t,e){const{popupElements:i}=e;return Array.isArray(i)&&i.length>0?this._readPopupInfoElements(e.description,e.mediaInfos,i):this._readPopupInfo(e)}writeContent(t,e,i,r){"string"!=typeof t?Array.isArray(t)&&(e.popupElements=t.filter((t=>X.includes(t.type))).map((t=>t&&t.toJSON(r))),e.popupElements.forEach((t=>{"attachments"===t.type?this._writeAttachmentContent(e):"media"===t.type?this._writeMediaContent(t,e):"text"===t.type?this._writeTextContent(t,e):"relationship"===t.type&&this._writeRelationshipContent(t,e)}))):e.description=t}writeFieldInfos(t,e,i,r){const{content:o}=this,s=Array.isArray(o)?o:null;if(t){const i=s?s.filter((t=>"fields"===t.type)):[],o=i.length&&i.every((t=>t.fieldInfos?.length));e.fieldInfos=t.filter(Boolean).map((t=>{const e=t.toJSON(r);return o&&(e.visible=!1),e}))}if(s)for(const t of s)"fields"===t.type&&this._writeFieldsContent(t,e)}writeLayerOptions(t,e,i,r){e[i]=!t||null===t.showNoDataRecords&&null===t.returnTopmostRaster?null:t.toJSON(r)}writeTitle(t,e){e.title=t||""}async collectRequiredFields(t,e){const i=this.expressionInfos||[];await this._collectExpressionInfoFields(t,e,[...i,...this._getContentExpressionInfos(this.content,i)]),(0,f.gd)(t,e,[...this.outFields||[],...this._getActionsFields(this.actions),...this._getTitleFields(this.title),...this._getContentFields(this.content)])}async getRequiredFields(t){const e=new Set;return await this.collectRequiredFields(e,t),[...e].sort()}_writeFieldsContent(t,e){if(!Array.isArray(t.fieldInfos)||!t.fieldInfos.length)return;const i=(0,a.d9)(t.fieldInfos);Array.isArray(e.fieldInfos)?i.forEach((t=>{const i=e.fieldInfos.find((e=>e.fieldName.toLowerCase()===t.fieldName.toLowerCase()));i?i.visible=!0:e.fieldInfos.push(t)})):e.fieldInfos=i}_writeAttachmentContent(t){t.showAttachments||(t.showAttachments=!0)}_writeRelationshipContent(t,e){const i=t.orderByFields?.map((e=>this._toFieldOrderJSON(e,t.relationshipId)))||[],r=[...e.relatedRecordsInfo?.orderByFields||[],...i];e.relatedRecordsInfo={showRelatedRecords:!0,...r?.length&&{orderByFields:r}}}_writeTextContent(t,e){!e.description&&t.text&&(e.description=t.text)}_writeMediaContent(t,e){if(!Array.isArray(t.mediaInfos)||!t.mediaInfos.length)return;const i=(0,a.d9)(t.mediaInfos);Array.isArray(e.mediaInfos)?e.mediaInfos=[...e.mediaInfos,...i]:e.mediaInfos=i}_readPopupInfoElements(t,e,i){const r={description:!1,mediaInfos:!1};return i.map((i=>"media"===i.type?(i.mediaInfos||!e||r.mediaInfos||(i.mediaInfos=e,r.mediaInfos=!0),C.Z.fromJSON(i)):"text"===i.type?(i.text||!t||r.description||(i.text=t,r.description=!0),x.Z.fromJSON(i)):"attachments"===i.type?g.Z.fromJSON(i):"fields"===i.type?w.Z.fromJSON(i):"expression"===i.type?_.Z.fromJSON(i):"relationship"===i.type?I.Z.fromJSON(i):void 0)).filter(Boolean)}_toRelationshipContent(t){const{field:e,order:i}=t;if(!e?.startsWith(W))return null;const r=e.replace(W,"").split("/");if(2!==r.length)return null;const o=parseInt(r[0],10),s=r[1];return"number"==typeof o&&s?I.Z.fromJSON({relationshipId:o,orderByFields:[{field:s,order:i}]}):null}_toFieldOrderJSON(t,e){const{order:i,field:r}=t;return{field:`${W}${e}/${r}`,order:i}}_readPopupInfo({description:t,mediaInfos:e,showAttachments:i,relatedRecordsInfo:r={showRelatedRecords:!1}}){const o=[];t?o.push(new x.Z({text:t})):o.push(new w.Z),Array.isArray(e)&&e.length&&o.push(C.Z.fromJSON({mediaInfos:e})),i&&o.push(g.Z.fromJSON({displayType:"auto"}));const{showRelatedRecords:s,orderByFields:n}=r;return s&&n?.length&&n.forEach((t=>{const e=this._toRelationshipContent(t);e&&o.push(e)})),o.length?o:t}_getContentElementFields(t){const e=t?.type;if("attachments"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description)];if("custom"===e)return t.outFields||[];if("fields"===e)return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...this._getFieldInfoFields(t.fieldInfos??this.fieldInfos)];if("media"===e){const e=t.mediaInfos||[];return[...this._extractFieldNames(t.title),...this._extractFieldNames(t.description),...e.reduce(((t,e)=>[...t,...this._getMediaInfoFields(e)]),[])]}return"text"===e?this._extractFieldNames(t.text):[]}_getMediaInfoFields(t){const{caption:e,title:i,value:r}=t,o=r||{},{fields:s,normalizeField:n,tooltipField:a,sourceURL:l,linkURL:p}=o,d=[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(l),...this._extractFieldNames(p),...s??[]];return n&&d.push(n),a&&d.push(a),d}_getContentExpressionInfos(t,e){return Array.isArray(t)?t.reduce(((t,e)=>[...t,..."expression"===e.type&&e.expressionInfo?[e.expressionInfo]:[]]),e):[]}_getContentFields(t){return"string"==typeof t?this._extractFieldNames(t):Array.isArray(t)?t.reduce(((t,e)=>[...t,...this._getContentElementFields(e)]),[]):[]}async _collectExpressionInfoFields(t,e,i){i&&await Promise.all(i.map((i=>(0,f.io)(t,e,i.expression))))}_getFieldInfoFields(t){return t?t.filter((t=>void 0===t.visible||!!t.visible)).map((t=>t.fieldName)).filter((t=>!t.startsWith(W)&&!t.startsWith(V))):[]}_getActionsFields(t){return t?t.toArray().reduce(((t,e)=>[...t,...this._getActionFields(e)]),[]):[]}_getActionFields(t){const{className:e,title:i,type:r}=t,o="button"===r||"toggle"===r?t.image:"";return[...this._extractFieldNames(i),...this._extractFieldNames(e),...this._extractFieldNames(o)]}_getTitleFields(t){return"string"==typeof t?this._extractFieldNames(t):[]}_extractFieldNames(t){if(!t||"string"!=typeof t)return[];const e=t.match(/{[^}]*}/g);if(!e)return[];const i=/\{(\w+):.+\}/,r=e.filter((t=>!(0===t.indexOf(`{${W}`)||0===t.indexOf(`{${V}`)))).map((t=>t.replace(i,"{$1}")));return r?r.map((t=>t.slice(1,-1))):[]}};(0,r._)([(0,d.Cb)({type:G})],Q.prototype,"actions",void 0),(0,r._)([(0,d.Cb)()],Q.prototype,"content",void 0),(0,r._)([(0,h.p)("content")],Q.prototype,"castContent",null),(0,r._)([(0,u.r)("content",["description","fieldInfos","popupElements","mediaInfos","showAttachments","relatedRecordsInfo"])],Q.prototype,"readContent",null),(0,r._)([(0,y.c)("content",{popupElements:{type:s.Z.ofType(F)},showAttachments:{type:Boolean},mediaInfos:{type:s.Z.ofType(L.V)},description:{type:String},relatedRecordsInfo:{type:E}})],Q.prototype,"writeContent",null),(0,r._)([(0,d.Cb)({type:[Z.Z],json:{write:!0}})],Q.prototype,"expressionInfos",void 0),(0,r._)([(0,d.Cb)({type:[S.Z]})],Q.prototype,"fieldInfos",void 0),(0,r._)([(0,y.c)("fieldInfos")],Q.prototype,"writeFieldInfos",null),(0,r._)([(0,d.Cb)({type:T})],Q.prototype,"layerOptions",void 0),(0,r._)([(0,y.c)("layerOptions")],Q.prototype,"writeLayerOptions",null),(0,r._)([(0,d.Cb)({type:Boolean,json:{read:{source:"showLastEditInfo"},write:{target:"showLastEditInfo"},default:!0}})],Q.prototype,"lastEditInfoEnabled",void 0),(0,r._)([(0,d.Cb)()],Q.prototype,"outFields",void 0),(0,r._)([(0,d.Cb)()],Q.prototype,"overwriteActions",void 0),(0,r._)([(0,d.Cb)()],Q.prototype,"returnGeometry",void 0),(0,r._)([(0,d.Cb)({json:{type:String}})],Q.prototype,"title",void 0),(0,r._)([(0,y.c)("title")],Q.prototype,"writeTitle",null),Q=(0,r._)([(0,c.j)("esri.PopupTemplate")],Q);const tt=Q},90344:(t,e,i)=>{i.d(e,{D5:()=>l,LJ:()=>F,Xr:()=>v,Ze:()=>C,cZ:()=>d,i$:()=>j,o5:()=>p,o8:()=>x,p6:()=>I});var r=i(35454),o=i(70171),s=i(17126);const n={year:void 0,month:void 0,day:void 0,weekday:void 0},a={hour:void 0,minute:void 0,second:void 0},l={timeZoneName:"short"},p={timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},d={timeZone:"Etc/UTC"},h={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},c={year:"numeric",month:"short",day:"numeric"},y={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},f={...m,second:"numeric"},g={"short-date":h,"short-date-short-time":{...h,...m},"short-date-short-time-24":{...h,...m,hour12:!1},"short-date-long-time":{...h,...f},"short-date-long-time-24":{...h,...f,hour12:!1},"short-date-le":h,"short-date-le-short-time":{...h,...m},"short-date-le-short-time-24":{...h,...m,hour12:!1},"short-date-le-long-time":{...h,...f},"short-date-le-long-time-24":{...h,...f,hour12:!1},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...m},"long-month-day-year-short-time-24":{...u,...m,hour12:!1},"long-month-day-year-long-time":{...u,...f},"long-month-day-year-long-time-24":{...u,...f,hour12:!1},"day-short-month-year":c,"day-short-month-year-short-time":{...c,...m},"day-short-month-year-short-time-24":{...c,...m,hour12:!1},"day-short-month-year-long-time":{...c,...f},"day-short-month-year-long-time-24":{...c,...f,hour12:!1},"long-date":y,"long-date-short-time":{...y,...m},"long-date-short-time-24":{...y,...m,hour12:!1},"long-date-long-time":{...y,...f},"long-date-long-time-24":{...y,...f,hour12:!1},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":f},v=(0,r.w)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),b={ar:"ar-u-nu-latn-ca-gregory"};let _=new WeakMap,w=g["short-date-short-time"];function C(t){return t?g[t]:null}function I(t,e){return function(t){const e=t||w;let i=_.get(e);if(!i){const t=(0,o.Kd)(),r=b[t]||t;i=new Intl.DateTimeFormat(r,e),_.set(e,i)}return i}(e).format(t)}function x(t,e){return I(new Date(t),{...e,...d,...a})}function F(t,e){return I(new Date(`1970-01-01T${t}Z`),{...e,...d,...n})}function j(t,e){const i=s.ou.fromISO(t,{setZone:!0}),r=(0,o.Kd)(),n=b[r]??r;return i.toLocaleString(e,{locale:n})}(0,o.Ze)((()=>{_=new WeakMap,w=g["short-date-short-time"]}))},18848:(t,e,i)=>{i.d(e,{sh:()=>l,uf:()=>p});var r=i(70586),o=i(70171);const s={ar:"ar-u-nu-latn"};let n=new WeakMap,a={};function l(t={}){const e={};return null!=t.digitSeparator&&(e.useGrouping=t.digitSeparator),null!=t.places&&(e.minimumFractionDigits=e.maximumFractionDigits=t.places),e}function p(t,e){return Object.is(t,-0)&&(t=0),function(t){const e=t||a;if(!n.has(e)){const i=(0,o.Kd)(),r=s[(0,o.Kd)()]||i;n.set(e,new Intl.NumberFormat(r,t))}return(0,r.j0)(n.get(e))}(e).format(t)}(0,o.Ze)((()=>{n=new WeakMap,a={}}))},16859:(t,e,i)=>{i.d(e,{I:()=>C});var r=i(43697),o=i(68773),s=i(40330),n=i(3172),a=i(66643),l=i(20102),p=i(92604),d=i(70586),h=i(95330),u=i(17452),c=i(5600),y=(i(75215),i(67676),i(80442),i(71715)),m=i(52011),f=i(30556),g=i(84230),v=i(65587),b=i(15235),_=i(86082),w=i(14661);const C=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,d.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,i){if(e.itemId)return new b.default({id:e.itemId,portal:i&&i.portal})}writePortalItem(t,e){t&&t.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,h.k_)(e),await r.load({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap},e)}catch(t){throw(0,h.D_)(t)||p.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch((t=>((0,h.r9)(t),!0))))}async _setUserPrivileges(t,e){if(!o.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:o}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",o)}catch(t){(0,h.r9)(t)}}async _fetchUserPrivileges(t,e){let i=this.portalItem;if(!t||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(e);const r=t===i.id;if(r&&i.portal.user)return(0,w.Ss)(i);let o,n;if(r)o=i.portal.url;else try{o=await(0,g.oP)(this.url,e)}catch(t){(0,h.r9)(t)}if(!o||!(0,u.Zo)(o,i.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;n=await(s.id?.getCredential(`${o}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,h.r9)(t)}if(!n)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(r?await i.reload():(i=new b.default({id:t,portal:{url:o}}),await i.load(e)),i.portal.user)return(0,w.Ss)(i)}catch(t){(0,h.r9)(t)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,h.r9)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?s.id?.findCredential(this.url):null;if(!e)return!0;const i=I.credential===e?I.user:await this._fetchEditingUser(t);return I.credential=e,I.user=i,null==i||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const i=s.id.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=v.Z.getDefault();if(o&&o.loaded&&(0,u.Fv)(o.restUrl)===(0,u.Fv)(r))return o.user;const l=`${r}/community/self`,p=null!=t?t.signal:null,d=await(0,a.q6)((0,n.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return d.ok?_.default.fromJSON(d.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const i=e&&e.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||v.Z.getDefault());return i&&r&&!(0,u.tm)(r.restUrl,i.restUrl)?(e.messages&&e.messages.push(new l.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,r._)([(0,c.Cb)({type:b.default})],e.prototype,"portalItem",null),(0,r._)([(0,y.r)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,r._)([(0,c.Cb)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,r._)([(0,c.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,c.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,c.Cb)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,r._)([(0,m.j)("esri.layers.mixins.PortalLayer")],e),e},I={credential:null,user:null}},11223:(t,e,i)=>{i.d(e,{Z:()=>p});var r,o=i(43697),s=i(96674),n=i(5600),a=(i(75215),i(67676),i(80442),i(52011));let l=r=class extends s.wq{constructor(t){super(t),this.name=null,this.title=null,this.expression=null,this.returnType=null}clone(){return new r({name:this.name,title:this.title,expression:this.expression,returnType:this.returnType})}};(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"name",void 0),(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,o._)([(0,n.Cb)({type:["string","number"],json:{write:!0}})],l.prototype,"returnType",void 0),l=r=(0,o._)([(0,a.j)("esri.popup.ExpressionInfo")],l);const p=l},422:(t,e,i)=>{i.d(e,{Z:()=>c});var r,o=i(43697),s=i(35454),n=i(96674),a=i(22974),l=i(5600),p=(i(75215),i(36030)),d=i(52011),h=i(29986);let u=r=class extends n.wq{constructor(t){super(t),this.fieldName=null,this.format=null,this.isEditable=!1,this.label=null,this.stringFieldOption="text-box",this.statisticType=null,this.tooltip=null,this.visible=!0}clone(){return new r({fieldName:this.fieldName,format:this.format?(0,a.d9)(this.format):null,isEditable:this.isEditable,label:this.label,stringFieldOption:this.stringFieldOption,statisticType:this.statisticType,tooltip:this.tooltip,visible:this.visible})}};(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"fieldName",void 0),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],u.prototype,"format",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0,default:!1}})],u.prototype,"isEditable",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"label",void 0),(0,o._)([(0,p.J)(new s.X({richtext:"rich-text",textarea:"text-area",textbox:"text-box"}),{default:"text-box"})],u.prototype,"stringFieldOption",void 0),(0,o._)([(0,l.Cb)({type:["count","sum","min","max","avg","stddev","var"],json:{write:!0}})],u.prototype,"statisticType",void 0),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],u.prototype,"tooltip",void 0),(0,o._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],u.prototype,"visible",void 0),u=r=(0,o._)([(0,d.j)("esri.popup.FieldInfo")],u);const c=u},84649:(t,e,i)=>{i.d(e,{Z:()=>p});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(63801);let l=r=class extends a.Z{constructor(t){super(t),this.description=null,this.displayType="auto",this.title=null,this.type="attachments"}clone(){return new r({description:this.description,displayType:this.displayType,title:this.title})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"description",void 0),(0,o._)([(0,s.Cb)({type:["auto","preview","list"],json:{write:!0}})],l.prototype,"displayType",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:["attachments"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=r=(0,o._)([(0,n.j)("esri.popup.content.AttachmentsContent")],l);const p=l},41463:(t,e,i)=>{i.d(e,{Z:()=>d});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(50379),l=i(87102);let p=r=class extends a.Z{constructor(t){super(t),this.type="bar-chart"}clone(){return new r({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,o._)([(0,s.Cb)({type:["bar-chart"],readOnly:!0,json:{type:["barchart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=r=(0,o._)([(0,n.j)("esri.popup.content.BarChartMediaInfo")],p);const d=p},87131:(t,e,i)=>{i.d(e,{Z:()=>d});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(50379),l=i(87102);let p=r=class extends a.Z{constructor(t){super(t),this.type="column-chart"}clone(){return new r({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,o._)([(0,s.Cb)({type:["column-chart"],readOnly:!0,json:{type:["columnchart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=r=(0,o._)([(0,n.j)("esri.popup.content.ColumnChartMediaInfo")],p);const d=p},63801:(t,e,i)=>{i.d(e,{Z:()=>l});var r=i(43697),o=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let a=class extends o.wq{constructor(t){super(t),this.type=null}};(0,r._)([(0,s.Cb)({type:["attachments","custom","fields","media","text","expression","relationship"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,r._)([(0,n.j)("esri.popup.content.Content")],a);const l=a},48074:(t,e,i)=>{i.d(e,{Z:()=>d});var r,o=i(43697),s=i(22974),n=i(5600),a=(i(75215),i(52011)),l=i(63801);let p=r=class extends l.Z{constructor(t){super(t),this.creator=null,this.destroyer=null,this.outFields=null,this.type="custom"}clone(){return new r({creator:this.creator,destroyer:this.destroyer,outFields:Array.isArray(this.outFields)?(0,s.d9)(this.outFields):null})}};(0,o._)([(0,n.Cb)()],p.prototype,"creator",void 0),(0,o._)([(0,n.Cb)()],p.prototype,"destroyer",void 0),(0,o._)([(0,n.Cb)()],p.prototype,"outFields",void 0),(0,o._)([(0,n.Cb)({type:["custom"],readOnly:!0})],p.prototype,"type",void 0),p=r=(0,o._)([(0,a.j)("esri.popup.content.CustomContent")],p);const d=p},38745:(t,e,i)=>{i.d(e,{Z:()=>c});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(96674);let l=r=class extends a.wq{constructor(t){super(t),this.title=null,this.expression=null,this.returnType="dictionary"}clone(){return new r({title:this.title,expression:this.expression})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"title",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"expression",void 0),(0,o._)([(0,s.Cb)({type:["dictionary"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"returnType",void 0),l=r=(0,o._)([(0,n.j)("esri.popup.ElementExpressionInfo")],l);const p=l;var d,h=i(63801);let u=d=class extends h.Z{constructor(t){super(t),this.expressionInfo=null,this.type="expression"}clone(){return new d({expressionInfo:this.expressionInfo?.clone()})}};(0,o._)([(0,s.Cb)({type:p,json:{write:!0}})],u.prototype,"expressionInfo",void 0),(0,o._)([(0,s.Cb)({type:["expression"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),u=d=(0,o._)([(0,n.j)("esri.popup.content.ExpressionContent")],u);const c=u},9190:(t,e,i)=>{i.d(e,{Z:()=>u});var r,o=i(43697),s=i(22974),n=i(5600),a=(i(75215),i(52011)),l=i(30556),p=i(422),d=i(63801);let h=r=class extends d.Z{constructor(t){super(t),this.attributes=null,this.description=null,this.fieldInfos=null,this.title=null,this.type="fields"}writeFieldInfos(t,e){e.fieldInfos=t&&t.map((t=>t.toJSON()))}clone(){return new r((0,s.d9)({attributes:this.attributes,description:this.description,fieldInfos:this.fieldInfos,title:this.title}))}};(0,o._)([(0,n.Cb)({type:Object,json:{write:!0}})],h.prototype,"attributes",void 0),(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],h.prototype,"description",void 0),(0,o._)([(0,n.Cb)({type:[p.Z]})],h.prototype,"fieldInfos",void 0),(0,o._)([(0,l.c)("fieldInfos")],h.prototype,"writeFieldInfos",null),(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],h.prototype,"title",void 0),(0,o._)([(0,n.Cb)({type:["fields"],readOnly:!0,json:{read:!1,write:!0}})],h.prototype,"type",void 0),h=r=(0,o._)([(0,a.j)("esri.popup.content.FieldsContent")],h);const u=h},13151:(t,e,i)=>{i.d(e,{Z:()=>c});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(35320),l=i(96674);let p=r=class extends l.wq{constructor(t){super(t),this.linkURL=null,this.sourceURL=null}clone(){return new r({linkURL:this.linkURL,sourceURL:this.sourceURL})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"linkURL",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],p.prototype,"sourceURL",void 0),p=r=(0,o._)([(0,n.j)("esri.popup.content.support.ImageMediaInfoValue")],p);const d=p;var h;let u=h=class extends a.Z{constructor(t){super(t),this.refreshInterval=null,this.type="image",this.value=null}clone(){return new h({altText:this.altText,title:this.title,caption:this.caption,refreshInterval:this.refreshInterval,value:this.value?this.value.clone():null})}};(0,o._)([(0,s.Cb)({type:Number,json:{write:!0}})],u.prototype,"refreshInterval",void 0),(0,o._)([(0,s.Cb)({type:["image"],readOnly:!0,json:{read:!1,write:!0}})],u.prototype,"type",void 0),(0,o._)([(0,s.Cb)({type:d,json:{write:!0}})],u.prototype,"value",void 0),u=h=(0,o._)([(0,n.j)("esri.popup.content.ImageMediaInfo")],u);const c=u},55869:(t,e,i)=>{i.d(e,{Z:()=>d});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(50379),l=i(87102);let p=r=class extends a.Z{constructor(t){super(t),this.type="line-chart"}clone(){return new r({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,o._)([(0,s.Cb)({type:["line-chart"],readOnly:!0,json:{type:["linechart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=r=(0,o._)([(0,n.j)("esri.popup.content.LineChartMediaInfo")],p);const d=p},10214:(t,e,i)=>{i.d(e,{Z:()=>v});var r,o=i(43697),s=i(22974),n=i(5600),a=(i(75215),i(71715)),l=i(52011),p=i(30556),d=i(41463),h=i(87131),u=i(63801),c=i(13151),y=i(55869),m=i(13353),f=i(79742);let g=r=class extends u.Z{constructor(t){super(t),this.activeMediaInfoIndex=null,this.attributes=null,this.description=null,this.mediaInfos=null,this.title=null,this.type="media"}readMediaInfos(t){return t&&t.map((t=>"image"===t.type?c.Z.fromJSON(t):"barchart"===t.type?d.Z.fromJSON(t):"columnchart"===t.type?h.Z.fromJSON(t):"linechart"===t.type?y.Z.fromJSON(t):"piechart"===t.type?m.Z.fromJSON(t):void 0)).filter(Boolean)}writeMediaInfos(t,e){e.mediaInfos=t&&t.map((t=>t.toJSON()))}clone(){return new r((0,s.d9)({activeMediaInfoIndex:this.activeMediaInfoIndex,attributes:this.attributes,description:this.description,mediaInfos:this.mediaInfos,title:this.title}))}};(0,o._)([(0,n.Cb)()],g.prototype,"activeMediaInfoIndex",void 0),(0,o._)([(0,n.Cb)({type:Object,json:{write:!0}})],g.prototype,"attributes",void 0),(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],g.prototype,"description",void 0),(0,o._)([(0,n.Cb)({types:[f.V]})],g.prototype,"mediaInfos",void 0),(0,o._)([(0,a.r)("mediaInfos")],g.prototype,"readMediaInfos",null),(0,o._)([(0,p.c)("mediaInfos")],g.prototype,"writeMediaInfos",null),(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],g.prototype,"title",void 0),(0,o._)([(0,n.Cb)({type:["media"],readOnly:!0,json:{read:!1,write:!0}})],g.prototype,"type",void 0),g=r=(0,o._)([(0,l.j)("esri.popup.content.MediaContent")],g);const v=g},13353:(t,e,i)=>{i.d(e,{Z:()=>d});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(50379),l=i(87102);let p=r=class extends a.Z{constructor(t){super(t),this.type="pie-chart"}clone(){return new r({altText:this.altText,title:this.title,caption:this.caption,value:this.value?this.value.clone():null})}};(0,o._)([(0,s.Cb)({type:["pie-chart"],readOnly:!0,json:{type:["piechart"],read:!1,write:l.l.write}})],p.prototype,"type",void 0),p=r=(0,o._)([(0,n.j)("esri.popup.content.PieChartMediaInfo")],p);const d=p},71423:(t,e,i)=>{i.d(e,{Z:()=>h});var r=i(43697),o=i(2368),s=i(5600),n=i(75215),a=(i(67676),i(80442),i(52011)),l=i(63801),p=i(44729);let d=class extends((0,o.J)(l.Z)){constructor(t){super(t),this.description=null,this.displayCount=null,this.displayType="list",this.orderByFields=null,this.relationshipId=null,this.title=null,this.type="relationship"}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"description",void 0),(0,r._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"displayCount",void 0),(0,r._)([(0,s.Cb)({type:["list"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,r._)([(0,s.Cb)({type:[p.Z],json:{write:!0}})],d.prototype,"orderByFields",void 0),(0,r._)([(0,s.Cb)({type:Number,json:{type:n.z8,write:!0}})],d.prototype,"relationshipId",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["relationship"],readOnly:!0,json:{read:!1,write:!0}})],d.prototype,"type",void 0),d=(0,r._)([(0,a.j)("esri.popup.content.RelationshipContent")],d);const h=d},44951:(t,e,i)=>{i.d(e,{Z:()=>p});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(63801);let l=r=class extends a.Z{constructor(t){super(t),this.text=null,this.type="text"}clone(){return new r({text:this.text})}};(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],l.prototype,"text",void 0),(0,o._)([(0,s.Cb)({type:["text"],readOnly:!0,json:{read:!1,write:!0}})],l.prototype,"type",void 0),l=r=(0,o._)([(0,n.j)("esri.popup.content.TextContent")],l);const p=l},50379:(t,e,i)=>{i.d(e,{Z:()=>g});var r,o=i(43697),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011)),a=i(35320),l=i(96674),p=i(22974),d=i(15923);let h=r=class extends d.Z{constructor(t){super(t),this.fieldName=null,this.tooltip=null,this.value=null}clone(){return new r({fieldName:this.fieldName,tooltip:this.tooltip,value:this.value})}};(0,o._)([(0,s.Cb)()],h.prototype,"fieldName",void 0),(0,o._)([(0,s.Cb)()],h.prototype,"tooltip",void 0),(0,o._)([(0,s.Cb)()],h.prototype,"value",void 0),h=r=(0,o._)([(0,n.j)("esri.popup.content.support.ChartMediaInfoValueSeries")],h);const u=h;var c;let y=c=class extends l.wq{constructor(t){super(t),this.fields=[],this.normalizeField=null,this.series=[],this.tooltipField=null}clone(){return new c({fields:(0,p.d9)(this.fields),normalizeField:this.normalizeField,tooltipField:this.tooltipField})}};(0,o._)([(0,s.Cb)({type:[String],json:{write:!0}})],y.prototype,"fields",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],y.prototype,"normalizeField",void 0),(0,o._)([(0,s.Cb)({type:[u],json:{read:!1}})],y.prototype,"series",void 0),(0,o._)([(0,s.Cb)({type:String,json:{write:!0}})],y.prototype,"tooltipField",void 0),y=c=(0,o._)([(0,n.j)("esri.popup.content.support.ChartMediaInfoValue")],y);const m=y;let f=class extends a.Z{constructor(t){super(t),this.type=null,this.value=null}};(0,o._)([(0,s.Cb)({type:["bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],f.prototype,"type",void 0),(0,o._)([(0,s.Cb)({type:m,json:{write:!0}})],f.prototype,"value",void 0),f=(0,o._)([(0,n.j)("esri.popup.content.mixins.ChartMediaInfo")],f);const g=f},35320:(t,e,i)=>{i.d(e,{Z:()=>l});var r=i(43697),o=i(96674),s=i(5600),n=(i(75215),i(67676),i(80442),i(52011));let a=class extends o.wq{constructor(t){super(t),this.altText=null,this.caption="",this.title="",this.type=null}};(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"altText",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"caption",void 0),(0,r._)([(0,s.Cb)({type:String,json:{write:!0}})],a.prototype,"title",void 0),(0,r._)([(0,s.Cb)({type:["image","bar-chart","column-chart","line-chart","pie-chart"],readOnly:!0,json:{read:!1,write:!0}})],a.prototype,"type",void 0),a=(0,r._)([(0,n.j)("esri.popup.content.mixins.MediaInfo")],a);const l=a},87102:(t,e,i)=>{i.d(e,{l:()=>r});const r=(0,i(35454).w)()({barchart:"bar-chart",columnchart:"column-chart",linechart:"line-chart",piechart:"pie-chart"})},79742:(t,e,i)=>{i.d(e,{V:()=>l});var r=i(41463),o=i(87131),s=i(13151),n=i(55869),a=i(13353);const l={base:i(35320).Z,key:"type",defaultKeyValue:"image",typeMap:{"bar-chart":r.Z,"column-chart":o.Z,"line-chart":n.Z,"pie-chart":a.Z,image:s.Z}}},29986:(t,e,i)=>{i.d(e,{Z:()=>c});var r=i(43697),o=i(2368),s=i(96674),n=i(5600),a=i(75215),l=(i(67676),i(80442),i(36030)),p=i(52011),d=i(90344),h=i(18848);let u=class extends((0,o.J)(s.wq)){constructor(t){super(t),this.dateFormat=null,this.digitSeparator=!1,this.places=null}formatNumber(t){return(0,h.uf)(t,(0,h.sh)(this))}formatDate(t,e=!1){return this.dateFormat?(0,d.p6)(t,{...(0,d.Ze)(this.dateFormat),...e&&d.cZ}):this.formatNumber(t)}formatDateOnly(t){return(0,d.o8)(t,{...(0,d.Ze)(this.dateFormat)})}formatTimeOnly(t){return(0,d.LJ)(t,{...(0,d.Ze)(this.dateFormat)})}formatTimestamp(t){return(0,d.i$)(t,{...(0,d.Ze)(this.dateFormat),...d.o5,...d.D5})}formatRasterPixelValue(t){return t.includes("-")?t:t.trim().includes(",")?this._formatDelimitedString(t,",",", "):t.trim().includes(";")?this._formatDelimitedString(t,";","; "):t.trim().includes(" ")?this._formatDelimitedString(t," "," "):this.formatNumber(Number(t))}_formatDelimitedString(t,e,i){return t&&e&&i?t.trim().split(e).map((t=>this.formatNumber(Number(t)))).join(i):t}};(0,r._)([(0,l.J)(d.Xr)],u.prototype,"dateFormat",void 0),(0,r._)([(0,n.Cb)({type:Boolean,json:{write:!0}})],u.prototype,"digitSeparator",void 0),(0,r._)([(0,n.Cb)({type:a.z8,json:{write:!0}})],u.prototype,"places",void 0),u=(0,r._)([(0,p.j)("esri.popup.support.FieldInfoFormat")],u);const c=u},44729:(t,e,i)=>{i.d(e,{Z:()=>p});var r,o=i(43697),s=i(96674),n=i(5600),a=(i(75215),i(67676),i(80442),i(52011));let l=r=class extends s.wq{constructor(t){super(t),this.field=null,this.order=null}clone(){return new r({field:this.field,order:this.order})}};(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],l.prototype,"field",void 0),(0,o._)([(0,n.Cb)({type:["asc","desc"],json:{write:!0}})],l.prototype,"order",void 0),l=r=(0,o._)([(0,a.j)("esri.popup.support.RelatedRecordsInfoFieldOrder")],l);const p=l}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8079],{79583:(_,E,T)=>{function R(_){switch(_){case"u8":case"i8":return 1;case"u16":case"i16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}T.d(E,{n1:()=>R})},78079:(_,E,T)=>{T.r(E),T.d(E,{loadGLTFMesh:()=>d});var R=T(22303),A=T(3172),N=T(30175),e=T(22021),t=T(70586),n=T(21787),S=T(46521),C=T(65617),I=T(88669),O=T(62540),r=T(60746),o=T(91024),L=T(71630),D=T(56481),M=T(20773),P=T(11077),u=T(79583);Object.freeze(Object.defineProperty({__proto__:null,copy:function(_,E,T){const R=_.typedBuffer,A=_.typedBufferStride,N=E.typedBuffer,e=E.typedBufferStride,t=T?T.count:E.count;let n=(T&&T.dstIndex?T.dstIndex:0)*A,S=(T&&T.srcIndex?T.srcIndex:0)*e;for(let _=0;_<t;++_){for(let _=0;_<9;++_)R[n+_]=N[S+_];n+=A,S+=e}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(_,E,T){const R=_.typedBuffer,A=_.typedBufferStride,N=E.typedBuffer,e=E.typedBufferStride,t=T?T.count:E.count;let n=(T&&T.dstIndex?T.dstIndex:0)*A,S=(T&&T.srcIndex?T.srcIndex:0)*e;for(let _=0;_<t;++_){for(let _=0;_<16;++_)R[n+_]=N[S+_];n+=A,S+=e}}},Symbol.toStringTag,{value:"Module"})),T(93860);var G=T(10816),U=T(56067),c=T(75488);function B(_,E){return new _(new ArrayBuffer(E*_.ElementCount*(0,u.n1)(_.ElementType)))}var s=T(66459),l=T(40270),i=T(91695),f=T(91911),a=T(15317),F=T(57758),H=T(35371);async function d(_,E,T){const N=new l.C(function(_){const E=_?.resolveFile;return E?{busy:!1,request:async(_,T,R)=>{const N=E(_),e="image"===T?"image":"binary"===T?"array-buffer":"json";return(await(0,A.default)(N,{responseType:e,signal:null!=R?R.signal:null})).data}}:null}(T)),e=(await(0,i.Q)(N,E,T,!0)).model,n=e.lods.shift(),S=new Map,O=new Map;e.textures.forEach(((_,E)=>S.set(E,function(_){return new o.Z({data:((0,a.$A)(_.data),_.data),wrap:X(_.parameters.wrap)})}(_)))),e.materials.forEach(((_,E)=>O.set(E,function(_,E){const T=new R.Z(function(_,E){return(0,I.f)(y(_[0]),y(_[1]),y(_[2]),E)}(_.color,_.opacity)),A=_.emissiveFactor?new R.Z(function(_){return(0,C.f)(y(_[0]),y(_[1]),y(_[2]))}(_.emissiveFactor)):null;return new r.Z({color:T,colorTexture:(0,t.yw)(_.textureColor,(_=>E.get(_))),normalTexture:(0,t.yw)(_.textureNormal,(_=>E.get(_))),emissiveColor:A,emissiveTexture:(0,t.yw)(_.textureEmissive,(_=>E.get(_))),occlusionTexture:(0,t.yw)(_.textureOcclusion,(_=>E.get(_))),alphaMode:V(_.alphaMode),alphaCutoff:_.alphaCutoff,doubleSided:_.doubleSided,metallic:_.metallicFactor,roughness:_.roughnessFactor,metallicRoughnessTexture:(0,t.yw)(_.textureMetallicRoughness,(_=>E.get(_))),colorTextureTransform:_.colorTextureTransform,normalTextureTransform:_.normalTextureTransform,occlusionTextureTransform:_.occlusionTextureTransform,emissiveTextureTransform:_.emissiveTextureTransform,metallicRoughnessTextureTransform:_.metallicRoughnessTextureTransform})}(_,S))));const D=x(n);for(const _ of D.parts)Y(D,_,O);const{position:M,normal:P,tangent:u,color:G,texCoord0:U}=D.vertexAttributes,c={position:M.typedBuffer,normal:null!=P?P.typedBuffer:null,tangent:null!=u?u.typedBuffer:null,uv:null!=U?U.typedBuffer:null,color:null!=G?G.typedBuffer:null},B=(0,s.w1)(c,_,T);return{transform:B.transform,components:D.components,spatialReference:_.spatialReference,vertexAttributes:new L.Q({position:B.vertexAttributes.position,normal:B.vertexAttributes.normal,tangent:B.vertexAttributes.tangent,color:c.color,uv:c.uv})}}function m(_,E){if(null==_)return"-";const T=_.typedBuffer;return`${(0,N.s1)(E,T.buffer,(()=>E.size))}/${T.byteOffset}/${T.byteLength}`}function p(_){return null!=_?_.toString():"-"}function x(_){let E=0;const T={color:!1,tangent:!1,normal:!1,texCoord0:!1},R=new Map,A=new Map,e=[];for(const t of _.parts){const{attributes:{position:_,normal:n,color:S,tangent:C,texCoord0:I}}=t,O=`\n ${m(_,R)}/\n ${m(n,R)}/\n ${m(S,R)}/\n ${m(C,R)}/\n ${m(I,R)}/\n ${p(t.transform)}\n `;let r=!1;const o=(0,N.s1)(A,O,(()=>(r=!0,{start:E,length:_.count})));r&&(E+=_.count),n&&(T.normal=!0),S&&(T.color=!0),C&&(T.tangent=!0),I&&(T.texCoord0=!0),e.push({gltf:t,writeVertices:r,region:o})}return{vertexAttributes:{position:B(D.fP,E),normal:T.normal?B(D.ct,E):null,tangent:T.tangent?B(D.ek,E):null,color:T.color?B(D.mc,E):null,texCoord0:T.texCoord0?B(D.Eu,E):null},parts:e,components:[]}}function Y(_,E,T){E.writeVertices&&function(_,E){const{position:T,normal:R,tangent:A,color:N,texCoord0:t}=_.vertexAttributes,C=E.region.start,{attributes:I,transform:O}=E.gltf,r=I.position.count;if((0,M.c)(T.slice(C,r),I.position,O),null!=I.normal&&null!=R){const _=(0,n.b)((0,S.c)(),O),E=R.slice(C,r);(0,M.b)(E,I.normal,_),(0,e.oc)(_)&&(0,M.d)(E,E)}else null!=R&&(0,U.f)(R,0,0,1,{dstIndex:C,count:r});if(null!=I.tangent&&null!=A){const _=(0,n.b)((0,S.c)(),O),E=A.slice(C,r);(0,P.a)(E,I.tangent,_),(0,e.oc)(_)&&(0,P.n)(E,E)}else null!=A&&(0,c.f)(A,0,0,1,1,{dstIndex:C,count:r});if(null!=I.texCoord0&&null!=t?(0,G.a)(t.slice(C,r),I.texCoord0):null!=t&&(0,G.f)(t,0,0,{dstIndex:C,count:r}),null!=I.color&&null!=N){const _=I.color,E=N.slice(C,r);if(4===_.elementCount)_ instanceof D.ek?(0,P.b)(E,_,255):_ instanceof D.mc?(0,c.a)(E,_):_ instanceof D.v6&&(0,P.b)(E,_,1/256);else{(0,c.f)(E,255,255,255,255);const T=D.ne.fromTypedArray(E.typedBuffer,E.typedBufferStride);_ instanceof D.ct?(0,M.e)(T,_,255):_ instanceof D.ne?(0,U.a)(T,_):_ instanceof D.mw&&(0,M.e)(T,_,1/256)}}else null!=N&&(0,c.f)(N.slice(C,r),255,255,255,255)}(_,E);const{indices:R,attributes:A,primitiveType:N,material:t}=E.gltf;let C=(0,f.p)(R||A.position.count,N);const I=E.region.start;if(I){const _=C.slice();for(let E=0;E<C.length;E++)_[E]+=I;C=_}_.components.push(new O.Z({faces:C,material:T.get(t),trustSourceNormals:!0}))}function V(_){switch(_){case"OPAQUE":return"opaque";case"MASK":return"mask";case"BLEND":return"blend"}}function X(_){return{horizontal:g(_.s),vertical:g(_.t)}}function g(_){switch(_){case H.e8.CLAMP_TO_EDGE:return"clamp";case H.e8.MIRRORED_REPEAT:return"mirror";case H.e8.REPEAT:return"repeat"}}function y(_){return _**(1/F.K)*255}},35371:(_,E,T)=>{var R,A,N,e,t,n,S,C,I,O,r,o,L,D,M,P,u,G,U,c,B,s,l,i;T.d(E,{Br:()=>P,LR:()=>n,Lu:()=>f,MX:()=>A,No:()=>L,OU:()=>s,Tg:()=>u,VI:()=>D,VY:()=>i,Wf:()=>S,_g:()=>l,cw:()=>r,db:()=>e,e8:()=>o,g:()=>C,l1:()=>G,lP:()=>M,q_:()=>a,qi:()=>c,w0:()=>t,wb:()=>I,xS:()=>O,yZ:()=>B,zi:()=>N}),function(_){_[_.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT",_[_.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT",_[_.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"}(R||(R={})),function(_){_[_.POINTS=0]="POINTS",_[_.LINES=1]="LINES",_[_.LINE_LOOP=2]="LINE_LOOP",_[_.LINE_STRIP=3]="LINE_STRIP",_[_.TRIANGLES=4]="TRIANGLES",_[_.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",_[_.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(A={})),function(_){_[_.ZERO=0]="ZERO",_[_.ONE=1]="ONE",_[_.SRC_COLOR=768]="SRC_COLOR",_[_.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR",_[_.SRC_ALPHA=770]="SRC_ALPHA",_[_.ONE_MINUS_SRC_ALPHA=771]="ONE_MINUS_SRC_ALPHA",_[_.DST_ALPHA=772]="DST_ALPHA",_[_.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA",_[_.DST_COLOR=774]="DST_COLOR",_[_.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR",_[_.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE",_[_.CONSTANT_COLOR=32769]="CONSTANT_COLOR",_[_.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR",_[_.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA",_[_.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"}(N||(N={})),function(_){_[_.ADD=32774]="ADD",_[_.MIN=32775]="MIN",_[_.MAX=32776]="MAX",_[_.SUBTRACT=32778]="SUBTRACT",_[_.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"}(e||(e={})),function(_){_[_.ARRAY_BUFFER=34962]="ARRAY_BUFFER",_[_.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",_[_.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",_[_.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER",_[_.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER",_[_.COPY_READ_BUFFER=36662]="COPY_READ_BUFFER",_[_.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER"}(t||(t={})),function(_){_[_.FRONT=1028]="FRONT",_[_.BACK=1029]="BACK",_[_.FRONT_AND_BACK=1032]="FRONT_AND_BACK"}(n||(n={})),function(_){_[_.CW=2304]="CW",_[_.CCW=2305]="CCW"}(S||(S={})),function(_){_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.INT=5124]="INT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.FLOAT=5126]="FLOAT"}(C||(C={})),function(_){_[_.NEVER=512]="NEVER",_[_.LESS=513]="LESS",_[_.EQUAL=514]="EQUAL",_[_.LEQUAL=515]="LEQUAL",_[_.GREATER=516]="GREATER",_[_.NOTEQUAL=517]="NOTEQUAL",_[_.GEQUAL=518]="GEQUAL",_[_.ALWAYS=519]="ALWAYS"}(I||(I={})),function(_){_[_.ZERO=0]="ZERO",_[_.KEEP=7680]="KEEP",_[_.REPLACE=7681]="REPLACE",_[_.INCR=7682]="INCR",_[_.DECR=7683]="DECR",_[_.INVERT=5386]="INVERT",_[_.INCR_WRAP=34055]="INCR_WRAP",_[_.DECR_WRAP=34056]="DECR_WRAP"}(O||(O={})),function(_){_[_.NEAREST=9728]="NEAREST",_[_.LINEAR=9729]="LINEAR",_[_.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST",_[_.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST",_[_.NEAREST_MIPMAP_LINEAR=9986]="NEAREST_MIPMAP_LINEAR",_[_.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"}(r||(r={})),function(_){_[_.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE",_[_.REPEAT=10497]="REPEAT",_[_.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(o||(o={})),function(_){_[_.TEXTURE_2D=3553]="TEXTURE_2D",_[_.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",_[_.TEXTURE_3D=32879]="TEXTURE_3D",_[_.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",_[_.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",_[_.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",_[_.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",_[_.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",_[_.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"}(L||(L={})),function(_){_[_.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL",_[_.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",_[_.ALPHA=6406]="ALPHA",_[_.RGB=6407]="RGB",_[_.RGBA=6408]="RGBA",_[_.LUMINANCE=6409]="LUMINANCE",_[_.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",_[_.RED=6403]="RED",_[_.RG=33319]="RG",_[_.RED_INTEGER=36244]="RED_INTEGER",_[_.RG_INTEGER=33320]="RG_INTEGER",_[_.RGB_INTEGER=36248]="RGB_INTEGER",_[_.RGBA_INTEGER=36249]="RGBA_INTEGER"}(D||(D={})),function(_){_[_.RGBA4=32854]="RGBA4",_[_.R16F=33325]="R16F",_[_.RG16F=33327]="RG16F",_[_.RGB32F=34837]="RGB32F",_[_.RGBA16F=34842]="RGBA16F",_[_.R32F=33326]="R32F",_[_.RG32F=33328]="RG32F",_[_.RGBA32F=34836]="RGBA32F",_[_.R11F_G11F_B10F=35898]="R11F_G11F_B10F",_[_.RGB8=32849]="RGB8",_[_.RGBA8=32856]="RGBA8",_[_.RGB5_A1=32855]="RGB5_A1",_[_.R8=33321]="R8",_[_.RG8=33323]="RG8",_[_.R8I=33329]="R8I",_[_.R8UI=33330]="R8UI",_[_.R16I=33331]="R16I",_[_.R16UI=33332]="R16UI",_[_.R32I=33333]="R32I",_[_.R32UI=33334]="R32UI",_[_.RG8I=33335]="RG8I",_[_.RG8UI=33336]="RG8UI",_[_.RG16I=33337]="RG16I",_[_.RG16UI=33338]="RG16UI",_[_.RG32I=33339]="RG32I",_[_.RG32UI=33340]="RG32UI",_[_.RGB16F=34843]="RGB16F",_[_.RGB9_E5=35901]="RGB9_E5",_[_.SRGB8=35905]="SRGB8",_[_.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8",_[_.RGB565=36194]="RGB565",_[_.RGBA32UI=36208]="RGBA32UI",_[_.RGB32UI=36209]="RGB32UI",_[_.RGBA16UI=36214]="RGBA16UI",_[_.RGB16UI=36215]="RGB16UI",_[_.RGBA8UI=36220]="RGBA8UI",_[_.RGB8UI=36221]="RGB8UI",_[_.RGBA32I=36226]="RGBA32I",_[_.RGB32I=36227]="RGB32I",_[_.RGBA16I=36232]="RGBA16I",_[_.RGB16I=36233]="RGB16I",_[_.RGBA8I=36238]="RGBA8I",_[_.RGB8I=36239]="RGB8I",_[_.R8_SNORM=36756]="R8_SNORM",_[_.RG8_SNORM=36757]="RG8_SNORM",_[_.RGB8_SNORM=36758]="RGB8_SNORM",_[_.RGBA8_SNORM=36759]="RGBA8_SNORM",_[_.RGB10_A2=32857]="RGB10_A2",_[_.RGB10_A2UI=36975]="RGB10_A2UI"}(M||(M={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",_[_.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",_[_.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",_[_.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",_[_.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",_[_.BYTE=5120]="BYTE",_[_.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",_[_.SHORT=5122]="SHORT",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.INT=5124]="INT",_[_.HALF_FLOAT=5131]="HALF_FLOAT",_[_.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",_[_.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",_[_.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",_[_.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"}(P||(P={})),function(_){_[_.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16",_[_.STENCIL_INDEX8=36168]="STENCIL_INDEX8",_[_.DEPTH_STENCIL=34041]="DEPTH_STENCIL",_[_.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24",_[_.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F",_[_.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8",_[_.DEPTH32F_STENCIL8=36013]="DEPTH32F_STENCIL8"}(u||(u={})),function(_){_[_.STATIC_DRAW=35044]="STATIC_DRAW",_[_.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW",_[_.STREAM_DRAW=35040]="STREAM_DRAW",_[_.STATIC_READ=35045]="STATIC_READ",_[_.DYNAMIC_READ=35049]="DYNAMIC_READ",_[_.STREAM_READ=35041]="STREAM_READ",_[_.STATIC_COPY=35046]="STATIC_COPY",_[_.DYNAMIC_COPY=35050]="DYNAMIC_COPY",_[_.STREAM_COPY=35042]="STREAM_COPY"}(G||(G={})),function(_){_[_.FRAGMENT_SHADER=35632]="FRAGMENT_SHADER",_[_.VERTEX_SHADER=35633]="VERTEX_SHADER"}(U||(U={})),function(_){_[_.FRAMEBUFFER=36160]="FRAMEBUFFER",_[_.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER",_[_.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"}(c||(c={})),function(_){_[_.TEXTURE=0]="TEXTURE",_[_.CUBEMAP=1]="CUBEMAP"}(B||(B={})),function(_){_[_.NONE=0]="NONE",_[_.DEPTH_RENDER_BUFFER=1]="DEPTH_RENDER_BUFFER",_[_.STENCIL_RENDER_BUFFER=2]="STENCIL_RENDER_BUFFER",_[_.DEPTH_STENCIL_RENDER_BUFFER=3]="DEPTH_STENCIL_RENDER_BUFFER",_[_.DEPTH_STENCIL_TEXTURE=4]="DEPTH_STENCIL_TEXTURE"}(s||(s={})),function(_){_[_.Texture=0]="Texture",_[_.BufferObject=1]="BufferObject",_[_.VertexArrayObject=2]="VertexArrayObject",_[_.Shader=3]="Shader",_[_.Program=4]="Program",_[_.FramebufferObject=5]="FramebufferObject",_[_.Renderbuffer=6]="Renderbuffer",_[_.Sync=7]="Sync",_[_.COUNT=8]="COUNT"}(l||(l={})),function(_){_[_.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0",_[_.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1",_[_.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2",_[_.COLOR_ATTACHMENT3=36067]="COLOR_ATTACHMENT3",_[_.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4",_[_.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5",_[_.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6",_[_.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7",_[_.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8",_[_.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9",_[_.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10",_[_.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11",_[_.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12",_[_.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13",_[_.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14",_[_.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"}(i||(i={}));const f=33306;var a,F,H,d,m,p,x;!function(_){_[_.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",_[_.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",_[_.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",_[_.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",_[_.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",_[_.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",_[_.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",_[_.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",_[_.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",_[_.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",_[_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"}(a||(a={})),function(_){_[_.FLOAT=5126]="FLOAT",_[_.FLOAT_VEC2=35664]="FLOAT_VEC2",_[_.FLOAT_VEC3=35665]="FLOAT_VEC3",_[_.FLOAT_VEC4=35666]="FLOAT_VEC4",_[_.INT=5124]="INT",_[_.INT_VEC2=35667]="INT_VEC2",_[_.INT_VEC3=35668]="INT_VEC3",_[_.INT_VEC4=35669]="INT_VEC4",_[_.BOOL=35670]="BOOL",_[_.BOOL_VEC2=35671]="BOOL_VEC2",_[_.BOOL_VEC3=35672]="BOOL_VEC3",_[_.BOOL_VEC4=35673]="BOOL_VEC4",_[_.FLOAT_MAT2=35674]="FLOAT_MAT2",_[_.FLOAT_MAT3=35675]="FLOAT_MAT3",_[_.FLOAT_MAT4=35676]="FLOAT_MAT4",_[_.SAMPLER_2D=35678]="SAMPLER_2D",_[_.SAMPLER_CUBE=35680]="SAMPLER_CUBE",_[_.UNSIGNED_INT=5125]="UNSIGNED_INT",_[_.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2",_[_.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3",_[_.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4",_[_.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3",_[_.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4",_[_.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2",_[_.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4",_[_.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2",_[_.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3",_[_.SAMPLER_3D=35679]="SAMPLER_3D",_[_.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW",_[_.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY",_[_.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW",_[_.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW",_[_.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D",_[_.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D",_[_.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE",_[_.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY",_[_.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D",_[_.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D",_[_.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE",_[_.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"}(F||(F={})),function(_){_[_.OBJECT_TYPE=37138]="OBJECT_TYPE",_[_.SYNC_CONDITION=37139]="SYNC_CONDITION",_[_.SYNC_STATUS=37140]="SYNC_STATUS",_[_.SYNC_FLAGS=37141]="SYNC_FLAGS"}(H||(H={})),function(_){_[_.UNSIGNALED=37144]="UNSIGNALED",_[_.SIGNALED=37145]="SIGNALED"}(d||(d={})),function(_){_[_.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED",_[_.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED",_[_.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED",_[_.WAIT_FAILED=37149]="WAIT_FAILED"}(m||(m={})),function(_){_[_.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"}(p||(p={})),function(_){_[_.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"}(x||(x={}))}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3172],{3172:(e,t,r)=>{r.r(t),r.d(t,{default:()=>p});var s=r(68773),o=r(40330),n=r(20102),a=r(80442),i=r(22974),l=r(95330),c=r(17452),u=r(19745),d=r(71058),h=r(85958);async function p(e,t){const i=(0,c.HK)(e),u=(0,c.jc)(e);u||i||(e=(0,c.Fv)(e));const y={url:e,requestOptions:{...t}};let g=(0,c.oh)(e);if(g){const e=await async function(e,t){if(null!=e.responseData)return e.responseData;if(e.headers&&(t.requestOptions.headers={...t.requestOptions.headers,...e.headers}),e.query&&(t.requestOptions.query={...t.requestOptions.query,...e.query}),e.before){let r,s;try{s=await e.before(t)}catch(e){r=v("request:interceptor",e,t)}if((s instanceof Error||s instanceof n.Z)&&(r=v("request:interceptor",s,t)),r)throw e.error&&e.error(r),r;return s}}(g,y);if(null!=e)return{data:e,getHeader:q,httpStatus:200,requestOptions:y.requestOptions,url:y.url};g.after||g.error||(g=null)}if(e=y.url,"image"===(t=y.requestOptions).responseType&&((0,a.Z)("host-webworker")||(0,a.Z)("host-node")))throw v("request:invalid-parameters",new Error("responseType 'image' is not supported in Web Workers or Node environment"),y);if("head"===t.method){if(t.body)throw v("request:invalid-parameters",new Error("body parameter cannot be set when method is 'head'"),y);if(i||u)throw v("request:invalid-parameters",new Error("data and blob URLs are not supported for method 'head'"),y)}if(await async function(){(0,a.Z)("host-webworker")?f||(f=await r.e(9884).then(r.bind(r,29884))):p._abortableFetch||(p._abortableFetch=globalThis.fetch.bind(globalThis))}(),f)return f.execute(e,t);const b=new AbortController;(0,l.fu)(t,(()=>b.abort()));const T={controller:b,credential:void 0,credentialToken:void 0,fetchOptions:void 0,hasToken:!1,interceptor:g,params:y,redoRequest:!1,useIdentity:m.useIdentity,useProxy:!1,useSSL:!1,withCredentials:!1},k=await async function(e){let t,r;await async function(e){const t=e.params.url,r=e.params.requestOptions,n=e.controller.signal,a=r.body;let i=null,c=null;if(w&&"HTMLFormElement"in globalThis&&(a instanceof FormData?i=a:a instanceof HTMLFormElement&&(i=new FormData(a))),"string"==typeof a&&(c=a),e.fetchOptions={cache:r.cacheBust&&!p._abortableFetch.polyfill?"no-cache":"default",credentials:"same-origin",headers:r.headers||{},method:"head"===r.method?"HEAD":"GET",mode:"cors",priority:m.priority,redirect:"follow",signal:n},(i||c)&&(e.fetchOptions.body=i||c),"anonymous"===r.authMode&&(e.useIdentity=!1),e.hasToken=!!(/token=/i.test(t)||r.query?.token||i?.get("token")),!e.hasToken&&s.default.apiKey&&(0,d.r)(t)&&(r.query||(r.query={}),r.query.token=s.default.apiKey,e.hasToken=!0),e.useIdentity&&!e.hasToken&&!e.credentialToken&&!O(t)&&!(0,l.Hc)(n)){let s;"immediate"===r.authMode?(await C(),s=await o.id.getCredential(t,{signal:n}),e.credential=s):"no-prompt"===r.authMode?(await C(),s=await o.id.getCredential(t,{prompt:!1,signal:n}).catch((()=>{})),e.credential=s):o.id&&(s=o.id.findCredential(t)),s&&(e.credentialToken=s.token,e.useSSL=!!s.ssl)}}(e);try{do{[t,r]=await E(e)}while(!await L(e,t,r))}catch(r){const s=v("request:server",r,e.params,t);throw s.details.ssl=e.useSSL,e.interceptor&&e.interceptor.error&&e.interceptor.error(s),s}const n=e.params.url;if(r&&/\/sharing\/rest\/(accounts|portals)\/self/i.test(n)){if(!e.hasToken&&!e.credentialToken&&r.user?.username&&!(0,c.kl)(n)){const e=(0,c.P$)(n,!0);e&&m.trustedServers.push(e)}Array.isArray(r.authorizedCrossOriginNoCorsDomains)&&(0,h.Hu)(r.authorizedCrossOriginNoCorsDomains)}const a=e.credential;if(a&&o.id){const e=o.id.findServerInfo(a.server);let t=e&&e.owningSystemUrl;if(t){t=t.replace(/\/?$/,"/sharing");const e=o.id.findCredential(t,a.userId);e&&-1===o.id._getIdenticalSvcIdx(t,e)&&e.resources.unshift(t)}}return{data:r,getHeader:t?e=>t?.headers.get(e):q,httpStatus:t?.status??200,requestOptions:e.params.requestOptions,ssl:e.useSSL,url:e.params.url}}(T);return g?.after?.(k),k}let f;const m=s.default.request,w="FormData"in globalThis,y=[499,498,403,401],g=["COM_0056","COM_0057","SB_0008"],b=[/\/arcgis\/tokens/i,/\/sharing(\/rest)?\/generatetoken/i,/\/rest\/info/i],q=()=>null,T=Symbol();function k(e){const t=(0,c.P$)(e);return!t||t.endsWith(".arcgis.com")||p._corsServers.includes(t)||(0,c.kl)(t)}function v(e,t,r,s){let o="Error";const a={url:r.url,requestOptions:r.requestOptions,getHeader:q,ssl:!1};if(t instanceof n.Z)return t.details?(t.details=(0,i.d9)(t.details),t.details.url=r.url,t.details.requestOptions=r.requestOptions):t.details=a,t;if(t){const e=s&&(e=>s.headers.get(e)),r=s&&s.status,n=t.message;n&&(o=n),e&&(a.getHeader=e),a.httpStatus=(null!=t.httpCode?t.httpCode:t.code)||r||0,a.subCode=t.subcode,a.messageCode=t.messageCode,"string"==typeof t.details?a.messages=[t.details]:a.messages=t.details,a.raw=T in t?t[T]:t}return(0,l.D_)(t)?(0,l.zE)():new n.Z(e,o,a)}async function C(){o.id||await Promise.all([r.e(7126),r.e(6261),r.e(1400),r.e(450)]).then(r.bind(r,73660))}function O(e){return b.some((t=>t.test(e)))}async function E(e){let t=e.params.url;const r=e.params.requestOptions,s=e.fetchOptions??{},n=(0,c.jc)(t)||(0,c.HK)(t),i=r.responseType||"json",d=n?0:null!=r.timeout?r.timeout:m.timeout;let f=!1;if(!n){e.useSSL&&(t=(0,c.hO)(t)),r.cacheBust&&"default"===s.cache&&(t=(0,c.ZN)(t,"request.preventCache",Date.now()));let n={...r.query};e.credentialToken&&(n.token=e.credentialToken);let i=(0,c.B7)(n);(0,a.Z)("esri-url-encodes-apostrophe")&&(i=i.replace(/'/g,"%27"));const l=t.length+1+i.length;let d;f="delete"===r.method||"post"===r.method||"put"===r.method||!!r.body||l>m.maxUrlLength;const p=r.useProxy||!!(0,c.ed)(t);if(p){const e=(0,c.b7)(t);d=e.path,!f&&d.length+1+l>m.maxUrlLength&&(f=!0),e.query&&(n={...e.query,...n})}if("HEAD"===s.method&&(f||p)){if(f){if(l>m.maxUrlLength)throw v("request:invalid-parameters",new Error("URL exceeds maximum length"),e.params);throw v("request:invalid-parameters",new Error("cannot use POST request when method is 'head'"),e.params)}if(p)throw v("request:invalid-parameters",new Error("cannot use proxy when method is 'head'"),e.params)}if(f?(s.method="delete"===r.method?"DELETE":"put"===r.method?"PUT":"POST",r.body?t=(0,c.fl)(t,n):(s.body=(0,c.B7)(n),s.headers||(s.headers={}),s.headers["Content-Type"]="application/x-www-form-urlencoded")):t=(0,c.fl)(t,n),p&&(e.useProxy=!0,t=`${d}?${t}`),n.token&&w&&s.body instanceof FormData&&!(0,u.P)(t)&&s.body.set("token",n.token),r.hasOwnProperty("withCredentials"))e.withCredentials=r.withCredentials;else if(!(0,c.D6)(t,(0,c.TI)()))if((0,c.kl)(t))e.withCredentials=!0;else if(o.id){const r=o.id.findServerInfo(t);r&&r.webTierAuth&&(e.withCredentials=!0)}e.withCredentials&&(s.credentials="include",(0,h.jH)(t)&&await(0,h.jz)(f?(0,c.fl)(t,n):t))}let y,g,b=0,q=!1;d>0&&(b=setTimeout((()=>{q=!0,e.controller.abort()}),d));try{if("native-request-init"===r.responseType)g=s,g.url=t;else if("image"!==r.responseType||"default"!==s.cache||"GET"!==s.method||f||function(e){if(e)for(const t of Object.getOwnPropertyNames(e))if(e[t])return!0;return!1}(r.headers)||!n&&!e.useProxy&&m.proxyUrl&&!k(t)){if(y=await p._abortableFetch(t,s),e.useProxy||function(e){const t=(0,c.P$)(e);t&&!p._corsServers.includes(t)&&p._corsServers.push(t)}(t),"native"===r.responseType)g=y;else if("HEAD"!==s.method)if(y.ok){switch(i){case"array-buffer":g=await y.arrayBuffer();break;case"blob":case"image":g=await y.blob();break;default:g=await y.text()}if(b&&(clearTimeout(b),b=0),"json"===i||"xml"===i||"document"===i)if(g)switch(i){case"json":g=JSON.parse(g);break;case"xml":g=S(g,"application/xml");break;case"document":g=S(g,"text/html")}else g=null;if(g){if("array-buffer"===i||"blob"===i){const e=y.headers.get("Content-Type");if(e&&/application\/json|text\/plain/i.test(e)&&g["blob"===i?"size":"byteLength"]<=750)try{const e=await new Response(g).json();e.error&&(g=e)}catch{}}"image"===i&&g instanceof Blob&&(g=await x(URL.createObjectURL(g),e,!0))}}else g=await y.text()}else g=await x(t,e)}catch(s){if("AbortError"===s.name){if(q)throw new Error("Timeout exceeded");throw(0,l.zE)("Request canceled")}if(!(!y&&s instanceof TypeError&&m.proxyUrl)||r.body||"delete"===r.method||"head"===r.method||"post"===r.method||"put"===r.method||e.useProxy||k(t))throw s;e.redoRequest=!0,(0,c.tD)({proxyUrl:m.proxyUrl,urlPrefix:(0,c.P$)(t)??""})}finally{b&&clearTimeout(b)}return[y,g]}function S(e,t){let r;try{r=(new DOMParser).parseFromString(e,t)}catch{}if(!r||r.getElementsByTagName("parsererror").length)throw new SyntaxError("XML Parse error");return r}async function L(e,t,r){if(e.redoRequest)return e.redoRequest=!1,!1;const s=e.params.requestOptions;if(!t||"native"===s.responseType||"native-request-init"===s.responseType)return!0;let n,a;if(!t.ok)throw n=new Error(`Unable to load ${t.url} status: ${t.status}`),n[T]=r,n;r&&(r.error?n=r.error:"error"===r.status&&Array.isArray(r.messages)&&(n={...r},n[T]=r,n.details=r.messages));let i,l=null;n&&(a=Number(n.code),l=n.hasOwnProperty("subcode")?Number(n.subcode):null,i=n.messageCode,i=i&&i.toUpperCase());const c=s.authMode;if(403===a&&(4===l||n.message&&n.message.toLowerCase().includes("ssl")&&!n.message.toLowerCase().includes("permission"))){if(!e.useSSL)return e.useSSL=!0,!1}else if(!e.hasToken&&e.useIdentity&&("no-prompt"!==c||498===a)&&void 0!==a&&y.includes(a)&&!O(e.params.url)&&(403!==a||i&&!g.includes(i)&&(null==l||2===l&&e.credentialToken))){await C();try{const t=await o.id.getCredential(e.params.url,{error:v("request:server",n,e.params),prompt:"no-prompt"!==c,signal:e.controller.signal,token:e.credentialToken});return e.credential=t,e.credentialToken=t.token,e.useSSL=e.useSSL||t.ssl,!1}catch(t){if("no-prompt"===c)return e.credential=void 0,e.credentialToken=void 0,!1;n=t}}if(n)throw n;return!0}function x(e,t,r=!1){const s=t.controller.signal,o=new Image;return t.withCredentials?o.crossOrigin="use-credentials":o.crossOrigin="anonymous",o.alt="",o.fetchPriority=m.priority,o.src=e,(0,h.fY)(o,e,r,s)}p._abortableFetch=null,p._corsServers=["https://server.arcgisonline.com","https://services.arcgisonline.com"]},71058:(e,t,r)=>{r.d(t,{r:()=>n});var s=r(17452);const o=["elevation3d.arcgis.com","js.arcgis.com","jsdev.arcgis.com","jsqa.arcgis.com","static.arcgis.com"];function n(e){const t=(0,s.P$)(e,!0);return!!t&&t.endsWith(".arcgis.com")&&!o.includes(t)&&!e.endsWith("/sharing/rest/generateToken")}},85958:(e,t,r)=>{r.d(t,{Hu:()=>c,fY:()=>i,jH:()=>u,jz:()=>d});var s=r(68773),o=r(80442),n=r(95330),a=r(17452);function i(e,t,r=!1,s){return new Promise(((a,i)=>{if((0,n.Hc)(s))return void i(l());let c=()=>{h(),i(new Error(`Unable to load ${t}`))},u=()=>{const t=e;h(),a(t)},d=()=>{if(!e)return;const t=e;h(),t.src="",i(l())};const h=()=>{(0,o.Z)("esri-image-decode")||(e.removeEventListener("error",c),e.removeEventListener("load",u)),c=null,u=null,e=null,null!=s&&s.removeEventListener("abort",d),d=null,r&&URL.revokeObjectURL(t)};null!=s&&s.addEventListener("abort",d),(0,o.Z)("esri-image-decode")?e.decode().then(u,c):(e.addEventListener("error",c),e.addEventListener("load",u))}))}function l(){try{return new DOMException("Aborted","AbortError")}catch{const e=new Error;return e.name="AbortError",e}}function c(e){s.default.request.crossOriginNoCorsDomains||(s.default.request.crossOriginNoCorsDomains={});const t=s.default.request.crossOriginNoCorsDomains;for(let r of e)r=r.toLowerCase(),/^https?:\/\//.test(r)?t[(0,a.P$)(r)??""]=0:(t[(0,a.P$)("http://"+r)??""]=0,t[(0,a.P$)("https://"+r)??""]=0)}function u(e){const t=s.default.request.crossOriginNoCorsDomains;if(t){let r=(0,a.P$)(e);if(r)return r=r.toLowerCase(),!(0,a.D6)(r,(0,a.TI)())&&t[r]<Date.now()-36e5}return!1}async function d(e){const t=s.default.request.crossOriginNoCorsDomains,r=(0,a.P$)(e);t&&r&&(t[r.toLowerCase()]=Date.now());const o=(0,a.mN)(e);e=o.path,"json"===o.query?.f&&(e+="?f=json");try{await fetch(e,{mode:"no-cors",credentials:"include"})}catch{}}}}]);
|