@arcgis/core 4.25.0-next.20220721 → 4.25.0-next.20220722

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{791220164501a791b2cd.js → 0896986aa60516f716f1.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{59e18862b803fdc41786.js → 0c145b87c24bf6c7d572.js} +1 -1
  4. package/assets/esri/core/workers/chunks/2504c43fac77ecd9ec2a.js +1 -0
  5. package/assets/esri/core/workers/chunks/{39de883f236e2a8d9024.js → 30d7796ee6f7e4a6a3e1.js} +2 -2
  6. package/assets/esri/core/workers/chunks/{39de883f236e2a8d9024.js.LICENSE.txt → 30d7796ee6f7e4a6a3e1.js.LICENSE.txt} +0 -0
  7. package/assets/esri/core/workers/chunks/3281656a9bd3627e41ff.js +1 -0
  8. package/assets/esri/core/workers/chunks/374ee2b2cad26f7ad572.js +1 -0
  9. package/assets/esri/core/workers/chunks/4d14be8c7e8adaa91876.js +1011 -0
  10. package/assets/esri/core/workers/chunks/{c22d7622294fe4aefe0b.js → 4f2d2cc71f5ff5ac2a60.js} +1 -1
  11. package/assets/esri/core/workers/chunks/8b1d5b7e9de73bc9da3a.js +1 -0
  12. package/assets/esri/core/workers/chunks/9dc4db35c387e11e9beb.js +1 -0
  13. package/assets/esri/core/workers/chunks/{42987dcfda665c860151.js → a23376df9696ebe5b5cd.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e4ad2cf5d6bded02e392.js → ed763fc352d0b55e5867.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{a05f6afcf56245824853.js → f1fdb335c5f9ec8b27cb.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{9493a8e5d6001b6bf275.js → f59f82a43437a51c934c.js} +1 -1
  17. package/assets/esri/widgets/support/t9n/DatePicker.json +1 -1
  18. package/assets/esri/widgets/support/t9n/DatePicker_en.json +1 -1
  19. package/assets/esri/widgets/support/t9n/TimePicker.json +1 -1
  20. package/assets/esri/widgets/support/t9n/TimePicker_en.json +1 -1
  21. package/chunks/DefaultMaterial.glsl.js +42 -37
  22. package/chunks/RealisticTree.glsl.js +25 -25
  23. package/geometry/support/MeshMaterial.js +1 -1
  24. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  25. package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
  26. package/layers/mixins/ArcGISImageService.js +1 -1
  27. package/package.json +2 -2
  28. package/support/revision.js +1 -1
  29. package/views/2d/engine/webgl/util/Matcher.js +1 -1
  30. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  31. package/views/3d/environment/ChapmanAtmosphere.js +1 -1
  32. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  33. package/views/3d/environment/PanoramicAtmosphere.js +1 -1
  34. package/views/3d/environment/SimpleAtmosphere.js +1 -1
  35. package/views/3d/environment/resources/MarsAtmosphereTexture.js +1 -1
  36. package/views/3d/environment/resources/SimpleAtmosphereTexture.js +1 -1
  37. package/views/3d/glTF/LoaderResult.js +1 -1
  38. package/views/3d/glTF/internal/Resource.js +1 -1
  39. package/views/3d/glTF/internal/TextureTransformUtils.js +5 -0
  40. package/views/3d/glTF/loader.js +1 -1
  41. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  42. package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
  43. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  44. package/views/3d/layers/I3SMeshView3D.js +1 -1
  45. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  46. package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
  47. package/views/3d/layers/PointCloudLayerView3D.js +1 -1
  48. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  49. package/views/3d/layers/SceneLayerView3D.js +1 -1
  50. package/views/3d/layers/TileLayerView3D.js +1 -1
  51. package/views/3d/layers/VoxelLayerView3D.js +1 -1
  52. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  53. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  54. package/views/3d/layers/i3s/I3SElevationProvider.js +1 -1
  55. package/views/3d/layers/i3s/I3SQueryEngine.js +1 -1
  56. package/views/3d/layers/support/FeatureTileTree3DDebugger.js +1 -1
  57. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  58. package/views/3d/support/CombinedElevationProvider.js +1 -1
  59. package/views/3d/support/pointsOfInterest/StableSurfaceCenter.js +1 -1
  60. package/views/3d/terrain/OverlayManager.js +1 -1
  61. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  62. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  63. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +22 -22
  64. package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js +19 -10
  65. package/views/3d/webgl-engine/core/shaderLibrary/shading/TextureTransformUV.glsl.js +15 -0
  66. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  67. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  68. package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
  69. package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
  70. package/views/3d/webgl-engine/shaders/RealisticTreeTechnique.js +1 -1
  71. package/views/input/recognizers/DoubleTapDrag.js +1 -1
  72. package/views/input/recognizers/Drag.js +1 -1
  73. package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
  74. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  75. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  76. package/views/input/recognizers/VerticalTwoFingerDrag.js +1 -1
  77. package/views/input/recognizers/support.js +1 -1
  78. package/views/interactive/editGeometry/operations/OffsetEdgeVertex.js +1 -1
  79. package/views/overlay/ViewOverlay.js +1 -1
  80. package/widgets/AreaMeasurement3D.js +1 -1
  81. package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
  82. package/widgets/BuildingExplorer.js +1 -1
  83. package/widgets/CoordinateConversion/support/Format.js +1 -1
  84. package/widgets/Daylight.js +1 -1
  85. package/widgets/DirectLineMeasurement3D.js +1 -1
  86. package/widgets/ElevationProfile.js +1 -1
  87. package/widgets/LineOfSight.js +1 -1
  88. package/widgets/ShadowCast.js +1 -1
  89. package/widgets/Slice.js +1 -1
  90. package/widgets/Slider.js +1 -1
  91. package/widgets/TimeSlider.js +1 -1
  92. package/widgets/Weather.js +1 -1
  93. package/widgets/Zoom.js +1 -1
  94. package/widgets/support/DatePicker.js +1 -1
  95. package/widgets/support/TimePicker.js +1 -1
  96. package/assets/esri/core/workers/chunks/0b269862733afe740a63.js +0 -1
  97. package/assets/esri/core/workers/chunks/290cd411d0d18b1d0efd.js +0 -1
  98. package/assets/esri/core/workers/chunks/85a2cf095f002b2c486f.js +0 -1
  99. package/assets/esri/core/workers/chunks/b312dd3027492007d75e.js +0 -1
  100. package/assets/esri/core/workers/chunks/bf348f6f52701fa6016e.js +0 -987
  101. package/assets/esri/core/workers/chunks/c79d4cb3332550fb0df5.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2134],{42134:(e,r,t)=>{t.r(r),t.d(r,{clearBoundingBoxCache:()=>y,computeIconLayerResourceSize:()=>m,computeLayerResourceSize:()=>f,computeLayerSize:()=>p,computeObjectLayerResourceSize:()=>h});var n=t(3172),o=t(20102),i=t(74669),s=t(70586),u=t(60437),c=t(45119);let a=l();function l(){return new i.Z(50)}function y(){a=l()}function f(e,r){if("icon"===e.type)return m(e,r);if("object"===e.type)return h(e,r);throw new o.Z("symbol3d:unsupported-symbol-layer","computeLayerSize only works with symbol layers of type Icon and Object")}async function p(e,r){if("icon"===e.type)return function(e,r){return m(e,r).then((r=>{if(null==e.size)return r;const t=r[0]/r[1];return t>1?[e.size,e.size/t]:[e.size*t,e.size]}))}(e,r);if("object"===e.type)return async function(e,r){const t=await h(e,r);return(0,c.$K)(t,e)}(e,r);throw new o.Z("symbol3d:unsupported-symbol-layer","computeLayerSize only works with symbol layers of type Icon and Object")}async function m(e,r){if(e.resource.href)return(t=e.resource.href,(0,n.default)(t,{responseType:"image"}).then((e=>e.data))).then((e=>[e.width,e.height]));var t;if(e.resource.primitive)return(0,s.pC)(r)?[r,r]:[256,256];throw new o.Z("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource")}function h(e,r){return async function(e,r){if(!e.isPrimitive){const r=e.resource.href,n=a.get(r);if(void 0!==n)return n;const o=await Promise.all([t.e(6481),t.e(2631),t.e(2133),t.e(276)]).then(t.bind(t,70276)),i=await o.fetch(r,{disableTextures:!0});return a.put(r,i.referenceBoundingBox),i.referenceBoundingBox}let n=null;if(e.resource&&e.resource.primitive&&(n=(0,u.Ue)((0,c.Uz)(e.resource.primitive)),(0,s.pC)(r)))for(let e=0;e<n.length;e++)n[e]*=r;return n?Promise.resolve(n):Promise.reject(new o.Z("symbol:invalid-resource","The symbol does not have a valid resource"))}(e,r).then((e=>(0,u.dp)(e)))}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2134],{42134:(e,r,t)=>{t.r(r),t.d(r,{clearBoundingBoxCache:()=>y,computeIconLayerResourceSize:()=>m,computeLayerResourceSize:()=>f,computeLayerSize:()=>p,computeObjectLayerResourceSize:()=>h});var n=t(3172),o=t(20102),i=t(74669),s=t(70586),u=t(60437),c=t(45119);let a=l();function l(){return new i.Z(50)}function y(){a=l()}function f(e,r){if("icon"===e.type)return m(e,r);if("object"===e.type)return h(e,r);throw new o.Z("symbol3d:unsupported-symbol-layer","computeLayerSize only works with symbol layers of type Icon and Object")}async function p(e,r){if("icon"===e.type)return function(e,r){return m(e,r).then((r=>{if(null==e.size)return r;const t=r[0]/r[1];return t>1?[e.size,e.size/t]:[e.size*t,e.size]}))}(e,r);if("object"===e.type)return async function(e,r){const t=await h(e,r);return(0,c.$K)(t,e)}(e,r);throw new o.Z("symbol3d:unsupported-symbol-layer","computeLayerSize only works with symbol layers of type Icon and Object")}async function m(e,r){if(e.resource.href)return(t=e.resource.href,(0,n.default)(t,{responseType:"image"}).then((e=>e.data))).then((e=>[e.width,e.height]));var t;if(e.resource.primitive)return(0,s.pC)(r)?[r,r]:[256,256];throw new o.Z("symbol3d:invalid-symbol-layer","symbol layers of type Icon must have either an href or a primitive resource")}function h(e,r){return async function(e,r){if(!e.isPrimitive){const r=e.resource.href,n=a.get(r);if(void 0!==n)return n;const o=await Promise.all([t.e(6481),t.e(2631),t.e(2133),t.e(9228)]).then(t.bind(t,89228)),i=await o.fetch(r,{disableTextures:!0});return a.put(r,i.referenceBoundingBox),i.referenceBoundingBox}let n=null;if(e.resource&&e.resource.primitive&&(n=(0,u.Ue)((0,c.Uz)(e.resource.primitive)),(0,s.pC)(r)))for(let e=0;e<n.length;e++)n[e]*=r;return n?Promise.resolve(n):Promise.reject(new o.Z("symbol:invalid-resource","The symbol does not have a valid resource"))}(e,r).then((e=>(0,u.dp)(e)))}}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6459],{21787:(t,n,r)=>{r.d(n,{b:()=>c,f:()=>o,i:()=>s,m:()=>i,t:()=>a});var e=r(46851);function o(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function a(t,n){if(t===n){const r=n[1],e=n[2],o=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=o}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function i(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=r[0],p=r[1],y=r[2],d=r[3],M=r[4],m=r[5],g=r[6],b=r[7],T=r[8];return t[0]=h*e+p*i+y*s,t[1]=h*o+p*c+y*f,t[2]=h*a+p*u+y*l,t[3]=d*e+M*i+m*s,t[4]=d*o+M*c+m*f,t[5]=d*a+M*u+m*l,t[6]=g*e+b*i+T*s,t[7]=g*o+b*c+T*f,t[8]=g*a+b*u+T*l,t}function c(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8],l=n[9],h=n[10],p=n[11],y=n[12],d=n[13],M=n[14],m=n[15],g=r*c-e*i,b=r*u-o*i,T=r*s-a*i,P=e*u-o*c,A=e*s-a*c,_=o*s-a*u,F=f*d-l*y,S=f*M-h*y,v=f*m-p*y,B=l*M-h*d,E=l*m-p*d,x=h*m-p*M;let w=g*x-b*E+T*B+P*v-A*S+_*F;return w?(w=1/w,t[0]=(c*x-u*E+s*B)*w,t[1]=(u*v-i*x-s*S)*w,t[2]=(i*E-c*v+s*F)*w,t[3]=(o*E-e*x-a*B)*w,t[4]=(r*x-o*v+a*S)*w,t[5]=(e*v-r*E-a*F)*w,t[6]=(d*_-M*A+m*P)*w,t[7]=(M*T-y*_-m*b)*w,t[8]=(y*A-d*T+m*g)*w,t):null}function u(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}function s(t){const n=(0,e.g)(),r=t[0],o=t[1],a=t[2],i=t[3],c=t[4],u=t[5],s=t[6],f=t[7],l=t[8];return Math.abs(1-(r*r+i*i+s*s))<=n&&Math.abs(1-(o*o+c*c+f*f))<=n&&Math.abs(1-(a*a+u*u+l*l))<=n}const f=i,l=u;Object.freeze(Object.defineProperty({__proto__:null,fromMat4:o,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},set:function(t,n,r,e,o,a,i,c,u,s){return t[0]=n,t[1]=r,t[2]=e,t[3]=o,t[4]=a,t[5]=i,t[6]=c,t[7]=u,t[8]=s,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},transpose:a,invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8],l=f*i-c*s,h=-f*a+c*u,p=s*a-i*u;let y=r*l+e*h+o*p;return y?(y=1/y,t[0]=l*y,t[1]=(-f*e+o*s)*y,t[2]=(c*e-o*i)*y,t[3]=h*y,t[4]=(f*r-o*u)*y,t[5]=(-c*r+o*a)*y,t[6]=p*y,t[7]=(-s*r+e*u)*y,t[8]=(i*r-e*a)*y,t):null},adjoint:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=n[4],c=n[5],u=n[6],s=n[7],f=n[8];return t[0]=i*f-c*s,t[1]=o*s-e*f,t[2]=e*c-o*i,t[3]=c*u-a*f,t[4]=r*f-o*u,t[5]=o*a-r*c,t[6]=a*s-i*u,t[7]=e*u-r*s,t[8]=r*i-e*a,t},determinant:function(t){const n=t[0],r=t[1],e=t[2],o=t[3],a=t[4],i=t[5],c=t[6],u=t[7],s=t[8];return n*(s*a-i*u)+r*(-s*o+i*c)+e*(u*o-a*c)},multiply:i,translate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=r[0],p=r[1];return t[0]=e,t[1]=o,t[2]=a,t[3]=i,t[4]=c,t[5]=u,t[6]=h*e+p*i+s,t[7]=h*o+p*c+f,t[8]=h*a+p*u+l,t},rotate:function(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=n[4],u=n[5],s=n[6],f=n[7],l=n[8],h=Math.sin(r),p=Math.cos(r);return t[0]=p*e+h*i,t[1]=p*o+h*c,t[2]=p*a+h*u,t[3]=p*i-h*e,t[4]=p*c-h*o,t[5]=p*u-h*a,t[6]=s,t[7]=f,t[8]=l,t},scale:function(t,n,r){const e=r[0],o=r[1],a=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t[6]=a*n[6],t[7]=a*n[7],t[8]=a*n[8],t},scaleByVec2:function(t,n,r){const e=r[0],o=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=o*n[3],t[4]=o*n[4],t[5]=o*n[5],t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},fromRotation:function(t,n){const r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromQuat:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r+r,c=e+e,u=o+o,s=r*i,f=e*i,l=e*c,h=o*i,p=o*c,y=o*u,d=a*i,M=a*c,m=a*u;return t[0]=1-l-y,t[3]=f-m,t[6]=h+M,t[1]=f+m,t[4]=1-s-y,t[7]=p-d,t[2]=h-M,t[5]=p+d,t[8]=1-s-l,t},normalFromMat4Legacy:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[4],i=n[5],c=n[6],u=n[8],s=n[9],f=n[10],l=f*i-c*s,h=-f*a+c*u,p=s*a-i*u,y=r*l+e*h+o*p;if(!y)return null;const d=1/y;return t[0]=l*d,t[1]=(-f*e+o*s)*d,t[2]=(c*e-o*i)*d,t[3]=h*d,t[4]=(f*r-o*u)*d,t[5]=(-c*r+o*a)*d,t[6]=p*d,t[7]=(-s*r+e*u)*d,t[8]=(i*r-e*a)*d,t},normalFromMat4:c,projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},subtract:u,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},equals:function(t,n){const r=t[0],o=t[1],a=t[2],i=t[3],c=t[4],u=t[5],s=t[6],f=t[7],l=t[8],h=n[0],p=n[1],y=n[2],d=n[3],M=n[4],m=n[5],g=n[6],b=n[7],T=n[8],P=(0,e.g)();return Math.abs(r-h)<=P*Math.max(1,Math.abs(r),Math.abs(h))&&Math.abs(o-p)<=P*Math.max(1,Math.abs(o),Math.abs(p))&&Math.abs(a-y)<=P*Math.max(1,Math.abs(a),Math.abs(y))&&Math.abs(i-d)<=P*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(c-M)<=P*Math.max(1,Math.abs(c),Math.abs(M))&&Math.abs(u-m)<=P*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(s-g)<=P*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(f-b)<=P*Math.max(1,Math.abs(f),Math.abs(b))&&Math.abs(l-T)<=P*Math.max(1,Math.abs(l),Math.abs(T))},isOrthoNormal:s,mul:f,sub:l},Symbol.toStringTag,{value:"Module"}))},46521:(t,n,r)=>{function e(){return[1,0,0,0,1,0,0,0,1]}function o(t,n){return new Float64Array(t,n,9)}r.d(n,{a:()=>o,c:()=>e}),Object.freeze(Object.defineProperty({__proto__:null,create:e,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},fromValues:function(t,n,r,e,o,a,i,c,u){return[t,n,r,e,o,a,i,c,u]},createView:o},Symbol.toStringTag,{value:"Module"}))},13598:(t,n,r)=>{function e(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]}function a(t,n){return new Float64Array(t,n,16)}r.d(n,{I:()=>i,a:()=>a,b:()=>o,c:()=>e});const i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:e,clone:o,fromValues:function(t,n,r,e,o,a,i,c,u,s,f,l,h,p,y,d){return[t,n,r,e,o,a,i,c,u,s,f,l,h,p,y,d]},createView:a,IDENTITY:i},Symbol.toStringTag,{value:"Module"}))},51305:(t,n,r)=>{r.d(n,{c:()=>p,g:()=>f,j:()=>E,k:()=>d,m:()=>l,s:()=>s});var e=r(46521),o=r(94961),a=r(65617),i=r(46851),c=r(17896),u=r(98766);function s(t,n,r){r*=.5;const e=Math.sin(r);return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=Math.cos(r),t}function f(t,n){const r=2*Math.acos(n[3]),e=Math.sin(r/2);return e>(0,i.g)()?(t[0]=n[0]/e,t[1]=n[1]/e,t[2]=n[2]/e):(t[0]=1,t[1]=0,t[2]=0),r}function l(t,n,r){const e=n[0],o=n[1],a=n[2],i=n[3],c=r[0],u=r[1],s=r[2],f=r[3];return t[0]=e*f+i*c+o*s-a*u,t[1]=o*f+i*u+a*c-e*s,t[2]=a*f+i*s+e*u-o*c,t[3]=i*f-e*c-o*u-a*s,t}function h(t,n,r,e){const o=n[0],a=n[1],c=n[2],u=n[3];let s,f,l,h,p,y=r[0],d=r[1],M=r[2],m=r[3];return f=o*y+a*d+c*M+u*m,f<0&&(f=-f,y=-y,d=-d,M=-M,m=-m),1-f>(0,i.g)()?(s=Math.acos(f),l=Math.sin(s),h=Math.sin((1-e)*s)/l,p=Math.sin(e*s)/l):(h=1-e,p=e),t[0]=h*o+p*y,t[1]=h*a+p*d,t[2]=h*c+p*M,t[3]=h*u+p*m,t}function p(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=n[3],t}function y(t,n){const r=n[0]+n[4]+n[8];let e;if(r>0)e=Math.sqrt(r+1),t[3]=.5*e,e=.5/e,t[0]=(n[5]-n[7])*e,t[1]=(n[6]-n[2])*e,t[2]=(n[1]-n[3])*e;else{let r=0;n[4]>n[0]&&(r=1),n[8]>n[3*r+r]&&(r=2);const o=(r+1)%3,a=(r+2)%3;e=Math.sqrt(n[3*r+r]-n[3*o+o]-n[3*a+a]+1),t[r]=.5*e,e=.5/e,t[3]=(n[3*o+a]-n[3*a+o])*e,t[o]=(n[3*o+r]+n[3*r+o])*e,t[a]=(n[3*a+r]+n[3*r+a])*e}return t}function d(t,n,r,e){const o=.5*Math.PI/180;n*=o,r*=o,e*=o;const a=Math.sin(n),i=Math.cos(n),c=Math.sin(r),u=Math.cos(r),s=Math.sin(e),f=Math.cos(e);return t[0]=a*u*f-i*c*s,t[1]=i*c*f+a*u*s,t[2]=i*u*s-a*c*f,t[3]=i*u*f+a*c*s,t}const M=u.c,m=u.s,g=u.a,b=l,T=u.b,P=u.d,A=u.l,_=u.e,F=_,S=u.f,v=S,B=u.n,E=u.g,x=u.h,w=(0,a.c)(),C=(0,a.f)(1,0,0),R=(0,a.f)(0,1,0),O=(0,o.a)(),j=(0,o.a)(),I=(0,e.c)();Object.freeze(Object.defineProperty({__proto__:null,identity:function(t){return t[0]=0,t[1]=0,t[2]=0,t[3]=1,t},setAxisAngle:s,getAxisAngle:f,multiply:l,rotateX:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u+i*c,t[1]=o*u+a*c,t[2]=a*u-o*c,t[3]=i*u-e*c,t},rotateY:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u-a*c,t[1]=o*u+i*c,t[2]=a*u+e*c,t[3]=i*u-o*c,t},rotateZ:function(t,n,r){r*=.5;const e=n[0],o=n[1],a=n[2],i=n[3],c=Math.sin(r),u=Math.cos(r);return t[0]=e*u+o*c,t[1]=o*u-e*c,t[2]=a*u+i*c,t[3]=i*u-a*c,t},calculateW:function(t,n){const r=n[0],e=n[1],o=n[2];return t[0]=r,t[1]=e,t[2]=o,t[3]=Math.sqrt(Math.abs(1-r*r-e*e-o*o)),t},slerp:h,random:function(t){const n=i.R,r=n(),e=n(),o=n(),a=Math.sqrt(1-r),c=Math.sqrt(r);return t[0]=a*Math.sin(2*Math.PI*e),t[1]=a*Math.cos(2*Math.PI*e),t[2]=c*Math.sin(2*Math.PI*o),t[3]=c*Math.cos(2*Math.PI*o),t},invert:function(t,n){const r=n[0],e=n[1],o=n[2],a=n[3],i=r*r+e*e+o*o+a*a,c=i?1/i:0;return t[0]=-r*c,t[1]=-e*c,t[2]=-o*c,t[3]=a*c,t},conjugate:p,fromMat3:y,fromEuler:d,str:function(t){return"quat("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+")"},copy:M,set:m,add:g,mul:b,scale:T,dot:P,lerp:A,length:_,len:F,squaredLength:S,sqrLen:v,normalize:B,exactEquals:E,equals:x,rotationTo:function(t,n,r){const e=(0,c.e)(n,r);return e<-.999999?((0,c.f)(w,C,n),(0,c.u)(w)<1e-6&&(0,c.f)(w,R,n),(0,c.n)(w,w),s(t,w,Math.PI),t):e>.999999?(t[0]=0,t[1]=0,t[2]=0,t[3]=1,t):((0,c.f)(w,n,r),t[0]=w[0],t[1]=w[1],t[2]=w[2],t[3]=1+e,B(t,t))},sqlerp:function(t,n,r,e,o,a){return h(O,n,o,a),h(j,r,e,a),h(t,O,j,2*a*(1-a)),t},setAxes:function(t,n,r,e){const o=I;return o[0]=r[0],o[3]=r[1],o[6]=r[2],o[1]=e[0],o[4]=e[1],o[7]=e[2],o[2]=-n[0],o[5]=-n[1],o[8]=-n[2],B(t,y(t,o))}},Symbol.toStringTag,{value:"Module"}))},94961:(t,n,r)=>{function e(){return[0,0,0,1]}function o(t){return[t[0],t[1],t[2],t[3]]}function a(t,n){return new Float64Array(t,n,4)}r.d(n,{I:()=>i,a:()=>e,b:()=>o,c:()=>a});const i=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,create:e,clone:o,fromValues:function(t,n,r,e){return[t,n,r,e]},createView:a,IDENTITY:i},Symbol.toStringTag,{value:"Module"}))},20773:(t,n,r)=>{r.d(n,{a:()=>a,b:()=>u,n:()=>c,s:()=>i,t:()=>o});var e=r(72220);function o(t,n,r){if(t.count!==n.count)return void e.c.error("source and destination buffers need to have the same number of elements");const o=t.count,a=r[0],i=r[1],c=r[2],u=r[4],s=r[5],f=r[6],l=r[8],h=r[9],p=r[10],y=r[12],d=r[13],M=r[14],m=t.typedBuffer,g=t.typedBufferStride,b=n.typedBuffer,T=n.typedBufferStride;for(let t=0;t<o;t++){const n=t*g,r=t*T,e=b[r],o=b[r+1],P=b[r+2];m[n]=a*e+u*o+l*P+y,m[n+1]=i*e+s*o+h*P+d,m[n+2]=c*e+f*o+p*P+M}}function a(t,n,r){if(t.count!==n.count)return void e.c.error("source and destination buffers need to have the same number of elements");const o=t.count,a=r[0],i=r[1],c=r[2],u=r[3],s=r[4],f=r[5],l=r[6],h=r[7],p=r[8],y=t.typedBuffer,d=t.typedBufferStride,M=n.typedBuffer,m=n.typedBufferStride;for(let t=0;t<o;t++){const n=t*d,r=t*m,e=M[r],o=M[r+1],g=M[r+2];y[n]=a*e+u*o+l*g,y[n+1]=i*e+s*o+h*g,y[n+2]=c*e+f*o+p*g}}function i(t,n,r){const e=Math.min(t.count,n.count),o=t.typedBuffer,a=t.typedBufferStride,i=n.typedBuffer,c=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*a,e=t*c;o[n]=r*i[e],o[n+1]=r*i[e+1],o[n+2]=r*i[e+2]}}function c(t,n){const r=Math.min(t.count,n.count),e=t.typedBuffer,o=t.typedBufferStride,a=n.typedBuffer,i=n.typedBufferStride;for(let t=0;t<r;t++){const n=t*o,r=t*i,c=a[r],u=a[r+1],s=a[r+2],f=c*c+u*u+s*s;if(f>0){const t=1/Math.sqrt(f);e[n]=t*c,e[n+1]=t*u,e[n+2]=t*s}}}function u(t,n,r){const e=Math.min(t.count,n.count),o=t.typedBuffer,a=t.typedBufferStride,i=n.typedBuffer,c=n.typedBufferStride;for(let t=0;t<e;t++){const n=t*a,e=t*c;o[n]=i[e]>>r,o[n+1]=i[e+1]>>r,o[n+2]=i[e+2]>>r}}Object.freeze(Object.defineProperty({__proto__:null,transformMat4:o,transformMat3:a,scale:i,normalize:c,shiftRight:u},Symbol.toStringTag,{value:"Module"}))},56067:(t,n,r)=>{function e(t,n,r){const e=t.typedBuffer,o=t.typedBufferStride,a=n.typedBuffer,i=n.typedBufferStride,c=r?r.count:n.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,s=(r&&r.srcIndex?r.srcIndex:0)*i;for(let t=0;t<c;++t)e[u]=a[s],e[u+1]=a[s+1],e[u+2]=a[s+2],u+=o,s+=i}function o(t,n,r,e,o){const a=t.typedBuffer,i=t.typedBufferStride,c=o?.count??t.count;let u=(o?.dstIndex??0)*i;for(let t=0;t<c;++t)a[u]=n,a[u+1]=r,a[u+2]=e,u+=i}r.d(n,{c:()=>e,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,copy:e,fill:o},Symbol.toStringTag,{value:"Module"}))},2674:(t,n,r)=>{r.d(n,{Z:()=>P});var e,o=r(43697),a=r(96674),i=r(70586),c=r(5600),u=(r(67676),r(80442),r(75215),r(52011)),s=r(52138),f=r(13598),l=r(17896),h=r(65617),p=r(13473),y=r(44547),d=r(24678),M=r(3709),m=r(56481),g=r(20773),b=r(56067);let T=e=class extends a.wq{constructor(t){super(t),this.origin=(0,h.c)(),this.translation=(0,h.c)(),this.rotation=(0,M.Ue)(),this.scale=(0,h.f)(1,1,1),this.geographic=!0}get localMatrix(){const t=(0,f.c)();return(0,s.g)(t,this.scale),(0,s.e)(t,t,(0,M.WH)(this.rotation),(0,M.ZZ)(this.rotation)),(0,s.h)(t,t,this.translation),t}get localMatrixInverse(){return(0,s.a)((0,f.c)(),this.localMatrix)}applyLocal(t,n){return(0,l.m)(n,t,this.localMatrix)}applyLocalInverse(t,n){return(0,l.m)(n,t,this.localMatrixInverse)}project(t,n){const r=new Float64Array(t.length),e=m.fP.fromTypedArray(r),o=m.fP.fromTypedArray(t);if(this.geographic){const t=(0,d.rS)(n),a=(0,f.c)();return(0,y.Bm)(n,this.origin,a,t),(0,s.m)(a,a,this.localMatrix),(0,g.t)(e,o,a),(0,y.CM)(r,t,0,r,n,0,r.length/3),r}const{localMatrix:a,origin:i}=this;(0,s.j)(a,f.I)?(0,b.c)(e,o):(0,g.t)(e,o,a);for(let t=0;t<r.length;t+=3)r[t+0]+=i[0],r[t+1]+=i[1],r[t+2]+=i[2];return r}getOriginPoint(t){const[n,r,e]=this.origin;return new p.Z({x:n,y:r,z:e,spatialReference:t})}equals(t){return(0,i.pC)(t)&&this.geographic===t.geographic&&(0,l.k)(this.origin,t.origin)&&(0,s.k)(this.localMatrix,t.localMatrix)}clone(){const t={origin:(0,h.a)(this.origin),translation:(0,h.a)(this.translation),rotation:(0,M.Ue)(this.rotation),scale:(0,h.a)(this.scale),geographic:this.geographic};return new e(t)}};(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],T.prototype,"origin",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],T.prototype,"translation",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],T.prototype,"rotation",void 0),(0,o._)([(0,c.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],T.prototype,"scale",void 0),(0,o._)([(0,c.Cb)({type:Boolean,nonNullable:!0,json:{write:!0}})],T.prototype,"geographic",void 0),(0,o._)([(0,c.Cb)()],T.prototype,"localMatrix",null),(0,o._)([(0,c.Cb)()],T.prototype,"localMatrixInverse",null),T=e=(0,o._)([(0,u.j)("esri.geometry.support.MeshTransform")],T);const P=T},3709:(t,n,r)=>{r.d(n,{Ue:()=>c,WH:()=>l,ZZ:()=>f,qC:()=>s,uT:()=>u});var e=r(22021),o=r(51305),a=r(94961),i=r(17896);function c(t=h){return[t[0],t[1],t[2],t[3]]}function u(t,n,r=c()){return(0,i.c)(r,t),r[3]=n,r}function s(t,n,r=c()){return(0,o.s)(p,t,l(t)),(0,o.s)(y,n,l(n)),(0,o.m)(p,y,p),function(t,n){return t[3]=n,t}(r,(0,e.BV)((0,o.g)(r,p)))}function f(t){return t}function l(t){return(0,e.Vl)(t[3])}const h=[0,0,1,0],p=(0,a.a)(),y=(0,a.a)();c()},72220:(t,n,r)=>{r.d(n,{c:()=>e});const e=r(92604).Z.getLogger("esri.views.3d.support.buffer.math")},13442:(t,n,r)=>{function e(t,n){return t.isGeographic||t.isWebMercator&&(n?.geographic??!0)}r.d(n,{h:()=>e})},66459:(t,n,r)=>{r.d(n,{FF:()=>b,I5:()=>m,Yq:()=>T,iv:()=>M,w1:()=>g});var e=r(70586),o=r(67900),a=r(46521),i=r(52138),c=r(13598),u=r(21787),s=r(44547),f=r(24678),l=r(2674),h=r(56481),p=r(20773),y=r(13442),d=r(56493);function M(t,n,r){return(0,y.h)(n.spatialReference,r)?function(t,n,r){const e=n.spatialReference,o=S(n,r,x),a=new Float64Array(t.position.length),i=function(t,n,r,e){(0,p.t)(h.fP.fromTypedArray(e),h.fP.fromTypedArray(t),n);const o=new Float64Array(t.length);return(0,d.To)(e,o,r)}(t.position,o,e,a),c=(0,u.b)(C,o);return{position:i,normal:P(i,a,t.normal,c,e),tangent:A(i,a,t.tangent,c,e)}}(t,n,r):function(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,c=n.z||0,{horizontal:u,vertical:s}=E(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t+0]=o[t+0]*u+a,e[t+1]=o[t+1]*u+i,e[t+2]=o[t+2]*s+c;return{position:e,normal:t.normal,tangent:t.tangent}}(t,n,r)}function m(t,n,r){const{position:o,normal:a,tangent:i}=t;if((0,e.Wi)(n))return{position:o,normal:a,tangent:i};const c=n.localMatrix;return M({position:(0,d.zZ)(o,new Float64Array(o.length),c),normal:(0,e.pC)(a)?(0,d.w9)(a,new Float32Array(a.length),c):null,tangent:(0,e.pC)(i)?(0,d.VS)(i,new Float32Array(i.length),c):null},n.getOriginPoint(r),{geographic:n.geographic})}function g(t,n,r){if(r?.useTransform){const{position:e,normal:o,tangent:a}=t;return{vertexAttributes:{position:e,normal:o,tangent:a},transform:new l.Z({origin:[n.x,n.y,n.z??0],geographic:(0,y.h)(n.spatialReference,r)})}}return{vertexAttributes:M(t,n,r),transform:null}}function b(t,n,r){return(0,y.h)(n.spatialReference,r)?F(t,n,r):_(t,n,r)}function T(t,n,r,o){if((0,e.Wi)(n))return b(t,r,o);const a=m(t,n,r.spatialReference);return r.equals(n.getOriginPoint(r.spatialReference))?_(a,r,o):(0,y.h)(r.spatialReference,o)?F(a,r,o):_(a,r,o)}function P(t,n,r,o,a){if((0,e.Wi)(r))return null;const i=new Float32Array(r.length);return(0,p.a)(h.ct.fromTypedArray(i),h.ct.fromTypedArray(r),o),(0,d.Yk)(i,t,n,a,i),i}function A(t,n,r,o,a){if((0,e.Wi)(r))return null;const i=new Float32Array(r.length);(0,p.a)(h.ct.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT),h.ct.fromTypedArray(r,4*Float32Array.BYTES_PER_ELEMENT),o);for(let t=3;t<i.length;t+=4)i[t]=r[t];return(0,d.M2)(i,t,n,a,i),i}function _(t,n,r){const e=new Float64Array(t.position.length),o=t.position,a=n.x,i=n.y,c=n.z||0,{horizontal:u,vertical:s}=E(r?r.unit:null,n.spatialReference);for(let t=0;t<o.length;t+=3)e[t+0]=(o[t+0]-a)/u,e[t+1]=(o[t+1]-i)/u,e[t+2]=(o[t+2]-c)/s;return{position:e,normal:t.normal,tangent:t.tangent}}function F(t,n,r){const e=n.spatialReference;S(n,r,x);const o=(0,i.a)(w,x),a=new Float64Array(t.position.length),c=function(t,n,r,e){const o=(0,d.XO)(t,n,e),a=h.fP.fromTypedArray(o),i=new Float64Array(o.length),c=h.fP.fromTypedArray(i);return(0,p.t)(c,a,r),i}(t.position,e,o,a),s=(0,u.b)(C,o);return{position:c,normal:v(t.normal,t.position,a,e,s),tangent:B(t.tangent,t.position,a,e,s)}}function S(t,n,r){(0,s.Bm)(t.spatialReference,[t.x,t.y,t.z||0],r,(0,f.rS)(t.spatialReference));const{horizontal:e,vertical:o}=E(n?n.unit:null,t.spatialReference);return(0,i.l)(r,r,[e,e,o]),r}function v(t,n,r,o,a){if((0,e.Wi)(t))return null;const i=(0,d.Iz)(t,n,r,o,new Float32Array(t.length)),c=h.ct.fromTypedArray(i);return(0,p.a)(c,c,a),i}function B(t,n,r,o,a){if((0,e.Wi)(t))return null;const i=(0,d.wi)(t,n,r,o,new Float32Array(t.length)),c=h.ct.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT);return(0,p.a)(c,c,a),i}function E(t,n){if((0,e.Wi)(t))return R;const r=n.isGeographic?1:(0,o.c9)(n),a=n.isGeographic?1:(0,o._R)(n),i=(0,o.En)(1,t,"meters");return{horizontal:i*r,vertical:i*a}}const x=(0,c.c)(),w=(0,c.c)(),C=(0,a.c)(),R={horizontal:1,vertical:1}},56493:(t,n,r)=>{r.d(n,{Iz:()=>m,M2:()=>S,To:()=>T,VS:()=>_,XO:()=>b,Yk:()=>g,w9:()=>A,wi:()=>F,zZ:()=>P});var e=r(92604),o=r(70586),a=r(21787),i=r(46521),c=r(13598),u=r(17896),s=r(65617),f=r(44547),l=r(24678),h=r(8744),p=r(40488),y=r(56481),d=r(20773);const M=e.Z.getLogger("esri.geometry.support.meshUtils.normalProjection");function m(t,n,r,e,o){return B(e)?(v(x.TO_PCPF,y.ct.fromTypedArray(t),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o)),o):(M.error("Cannot convert spatial reference to PCPF"),o)}function g(t,n,r,e,o){return B(e)?(v(x.FROM_PCPF,y.ct.fromTypedArray(t),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o)),o):(M.error("Cannot convert to spatial reference from PCPF"),o)}function b(t,n,r){return(0,f.CM)(t,n,0,r,(0,l.rS)(n),0,t.length/3),r}function T(t,n,r){return(0,f.CM)(t,(0,l.rS)(r),0,n,r,0,t.length/3),n}function P(t,n,r){if((0,o.Wi)(t))return n;const e=y.fP.fromTypedArray(t),a=y.fP.fromTypedArray(n);return(0,d.t)(a,e,r),n}function A(t,n,r){if((0,o.Wi)(t))return n;(0,a.b)(j,r);const e=y.ct.fromTypedArray(t),i=y.ct.fromTypedArray(n);return(0,d.a)(i,e,j),(0,a.i)(j)||(0,d.n)(i,i),n}function _(t,n,r){if((0,o.Wi)(t))return n;(0,a.b)(j,r);const e=y.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),i=y.ct.fromTypedArray(n,4*Float32Array.BYTES_PER_ELEMENT);if((0,d.a)(i,e,j),(0,a.i)(j)||(0,d.n)(i,i),t!==n)for(let r=3;r<t.length;r+=4)n[r]=t[r];return n}function F(t,n,r,e,o){if(!B(e))return M.error("Cannot convert spatial reference to PCPF"),o;v(x.TO_PCPF,y.ct.fromTypedArray(t,4*Float32Array.BYTES_PER_ELEMENT),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o,4*Float32Array.BYTES_PER_ELEMENT));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function S(t,n,r,e,o){if(!B(e))return M.error("Cannot convert to spatial reference from PCPF"),o;v(x.FROM_PCPF,y.ct.fromTypedArray(t,16),y.fP.fromTypedArray(n),y.fP.fromTypedArray(r),e,y.ct.fromTypedArray(o,16));for(let n=3;n<t.length;n+=4)o[n]=t[n];return o}function v(t,n,r,e,o,i){if(!n)return;const c=r.count,s=(0,l.rS)(o);if(E(o))for(let r=0;r<c;r++)e.getVec(r,C),n.getVec(r,R),(0,f.Bm)(s,C,O,s),(0,a.f)(j,O),t===x.FROM_PCPF&&(0,a.t)(j,j),(0,u.t)(R,R,j),i.setVec(r,R);else for(let o=0;o<c;o++){e.getVec(o,C),n.getVec(o,R),(0,f.Bm)(s,C,O,s),(0,a.f)(j,O);const c=(0,p.mZ)(r.get(o,1));let l=Math.cos(c);t===x.TO_PCPF&&(l=1/l),j[0]*=l,j[1]*=l,j[2]*=l,j[3]*=l,j[4]*=l,j[5]*=l,t===x.FROM_PCPF&&(0,a.t)(j,j),(0,u.t)(R,R,j),(0,u.n)(R,R),i.setVec(o,R)}return i}function B(t){return E(t)||function(t){return t.isWebMercator}(t)}function E(t){return t.isWGS84||(0,h.yW)(t)||(0,h.BZ)(t)||(0,h.V2)(t)}var x,w;(w=x||(x={}))[w.TO_PCPF=0]="TO_PCPF",w[w.FROM_PCPF=1]="FROM_PCPF";const C=(0,s.c)(),R=(0,s.c)(),O=(0,c.c)(),j=(0,i.c)()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8163],{95401:(e,t,n)=>{n.d(t,{e:()=>a});var r,o,i,s={exports:{}};r=s,o=function(){function e(e,n,o){o=o||2;var i,s,a,c,u,p,h,f=n&&n.length,g=f?n[0]*o:e.length,x=t(e,0,g,o,!0),d=[];if(!x||x.next===x.prev)return d;if(f&&(x=l(e,n,x,o)),e.length>80*o){i=a=e[0],s=c=e[1];for(var m=o;m<g;m+=o)(u=e[m])<i&&(i=u),(p=e[m+1])<s&&(s=p),u>a&&(a=u),p>c&&(c=p);h=0!==(h=Math.max(a-i,c-s))?1/h:0}return r(x,d,o,i,s,h),d}function t(e,t,n,r,o){var i,s;if(o===F(e,t,n,r)>0)for(i=t;i<n;i+=r)s=Z(i,e[i],e[i+1],s);else for(i=n-r;i>=t;i-=r)s=Z(i,e[i],e[i+1],s);if(s&&v(s,s.next)){var a=s.next;M(s),s=a}return s}function n(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(M(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function r(e,t,l,c,u,p,h){if(e){!h&&p&&f(e,c,u,p);for(var g,x,d=e;e.prev!==e.next;)if(g=e.prev,x=e.next,p?i(e,c,u,p):o(e))t.push(g.i/l),t.push(e.i/l),t.push(x.i/l),M(e),e=x.next,d=x.next;else if((e=x)===d){h?1===h?r(e=s(n(e),t,l),t,l,c,u,p,2):2===h&&a(e,t,l,c,u,p):r(n(e),t,l,c,u,p,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(y(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(d(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&y(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function i(e,t,n,r){var o=e.prev,i=e,s=e.next;if(y(o,i,s)>=0)return!1;for(var a=o.x<i.x?o.x<s.x?o.x:s.x:i.x<s.x?i.x:s.x,l=o.y<i.y?o.y<s.y?o.y:s.y:i.y<s.y?i.y:s.y,c=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,u=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,p=g(a,l,t,n,r),h=g(c,u,t,n,r),f=e.prevZ,x=e.nextZ;f&&f.z>=p&&x&&x.z<=h;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;if(f=f.prevZ,x!==e.prev&&x!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,x.x,x.y)&&y(x.prev,x,x.next)>=0)return!1;x=x.nextZ}for(;f&&f.z>=p;){if(f!==e.prev&&f!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.prevZ}for(;x&&x.z<=h;){if(x!==e.prev&&x!==e.next&&d(o.x,o.y,i.x,i.y,s.x,s.y,x.x,x.y)&&y(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function s(e,t,r){var o=e;do{var i=o.prev,s=o.next.next;!v(i,s)&&w(i,o,o.next,s)&&A(i,s)&&A(s,i)&&(t.push(i.i/r),t.push(o.i/r),t.push(s.i/r),M(o),M(o.next),o=e=s),o=o.next}while(o!==e);return n(o)}function a(e,t,o,i,s,a){var l=e;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&m(l,c)){var u=T(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,t,o,i,s,a),void r(u,t,o,i,s,a)}c=c.next}l=l.next}while(l!==e)}function l(e,r,o,i){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=t(e,r[s]*i,s<a-1?r[s+1]*i:e.length,i,!1))===l.next&&(l.steiner=!0),u.push(x(l));for(u.sort(c),s=0;s<u.length;s++)o=n(o=p(u[s],o),o.next);return o}function c(e,t){return e.x-t.x}function u(e){if(e.next.prev===e)return e;let t=e;for(;;){const n=t.next;if(n.prev===t||n===t||n===e)break;t=n}return t}function p(e,t){var r=function(e,t){var n,r=t,o=e.x,i=e.y,s=-1/0;do{if(i<=r.y&&i>=r.next.y&&r.next.y!==r.y){var a=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=o&&a>s){if(s=a,a===o){if(i===r.y)return r;if(i===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(o===s)return n;var l,c=n,u=n.x,p=n.y,f=1/0;r=n;do{o>=r.x&&r.x>=u&&o!==r.x&&d(i<p?o:s,i,u,p,i<p?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),A(r,e)&&(l<f||l===f&&(r.x>n.x||r.x===n.x&&h(n,r)))&&(n=r,f=l)),r=r.next}while(r!==c);return n}(e,t);if(!r)return t;var o=T(r,e),i=n(r,r.next);let s=u(o);return n(s,s.next),i=u(i),u(t===r?i:t)}function h(e,t){return y(e.prev,e,t.prev)<0&&y(t.next,e,e.next)<0}function f(e,t,n,r){var o=e;do{null===o.z&&(o.z=g(o.x,o.y,t,n,r)),o.prevZ=o.prev,o.nextZ=o.next,o=o.next}while(o!==e);o.prevZ.nextZ=null,o.prevZ=null,function(e){var t,n,r,o,i,s,a,l,c=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<c&&(a++,r=r.nextZ);t++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(o=n,n=n.nextZ,a--):(o=r,r=r.nextZ,l--),i?i.nextZ=o:e=o,o.prevZ=i,i=o;n=r}i.nextZ=null,c*=2}while(s>1)}(o)}function g(e,t,n,r,o){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*o)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*o)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function x(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function d(e,t,n,r,o,i,s,a){return(o-s)*(t-a)-(e-s)*(i-a)>=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(i-a)-(o-s)*(r-a)>=0}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&w(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(A(e,t)&&A(t,e)&&function(e,t){var n=e,r=!1,o=(e.x+t.x)/2,i=(e.y+t.y)/2;do{n.y>i!=n.next.y>i&&n.next.y!==n.y&&o<(n.next.x-n.x)*(i-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(y(e.prev,e,t.prev)||y(e,t.prev,t))||v(e,t)&&y(e.prev,e,e.next)>0&&y(t.prev,t,t.next)>0)}function y(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function w(e,t,n,r){var o=C(y(e,t,n)),i=C(y(e,t,r)),s=C(y(n,r,e)),a=C(y(n,r,t));return o!==i&&s!==a||!(0!==o||!b(e,n,t))||!(0!==i||!b(e,r,t))||!(0!==s||!b(n,e,r))||!(0!==a||!b(n,t,r))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function C(e){return e>0?1:e<0?-1:0}function A(e,t){return y(e.prev,e,e.next)<0?y(e,t,e.next)>=0&&y(e,e.prev,t)>=0:y(e,t,e.prev)<0||y(e,e.next,t)<0}function T(e,t){var n=new _(e.i,e.x,e.y),r=new _(t.i,t.x,t.y),o=e.next,i=t.prev;return e.next=t,t.prev=e,n.next=o,o.prev=n,r.next=n,n.prev=r,i.next=r,r.prev=i,r}function Z(e,t,n,r){var o=new _(e,t,n);return r?(o.next=r.next,o.prev=r,r.next.prev=o,r.next=o):(o.prev=o,o.next=o),o}function M(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function F(e,t,n,r){for(var o=0,i=t,s=n-r;i<n;i+=r)o+=(e[s]-e[i])*(e[i+1]+e[s+1]),s=i;return o}return e.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(F(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var c=t[a]*n,u=a<l-1?t[a+1]*n:e.length;s-=Math.abs(F(e,c,u,n))}var p=0;for(a=0;a<r.length;a+=3){var h=r[a]*n,f=r[a+1]*n,g=r[a+2]*n;p+=Math.abs((e[h]-e[g])*(e[f+1]-e[h+1])-(e[h]-e[f])*(e[g+1]-e[h+1]))}return 0===s&&0===p?0:Math.abs((p-s)/s)},e.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,o=0;o<e.length;o++){for(var i=0;i<e[o].length;i++)for(var s=0;s<t;s++)n.vertices.push(e[o][i][s]);o>0&&(r+=e[o-1].length,n.holes.push(r))}return n},e},void 0!==(i=o())&&(r.exports=i);const a=s.exports},62540:(e,t,n)=>{n.d(t,{Z:()=>y});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),p=n(75215),h=n(65542),f=n(60746),g=n(71630);const x="esri.geometry.support.MeshComponent",d=a.Z.getLogger(x);let m=r=class extends i.wq{constructor(e){super(e),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}static from(e){return(0,p.TJ)(r,e)}castFaces(e){return(0,g.X)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},d)}castMaterial(e){return(0,p.TJ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.Z:h.Z,e)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(e,t){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(e,t):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}};(0,o._)([(0,l.Cb)({json:{write:!0}})],m.prototype,"faces",void 0),(0,o._)([(0,c.p)("faces")],m.prototype,"castFaces",null),(0,o._)([(0,l.Cb)({type:h.Z,json:{write:!0}})],m.prototype,"material",void 0),(0,o._)([(0,c.p)("material")],m.prototype,"castMaterial",null),(0,o._)([(0,l.Cb)({type:String,json:{write:!0}})],m.prototype,"shading",void 0),(0,o._)([(0,l.Cb)({type:Boolean})],m.prototype,"trustSourceNormals",void 0),m=r=(0,o._)([(0,u.j)(x)],m);const y=m},65542:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(96674),a=n(70586),l=n(5600),c=(n(67676),n(80442),n(75215),n(52011)),u=n(81118);let p=r=class extends s.wq{constructor(e){super(e),this.color=null,this.colorTexture=null,this.normalTexture=null,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=(0,a.pC)(e)?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return(0,a.pC)(e)&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{color:(0,a.pC)(this.color)?this.color.clone():null,colorTexture:(0,a.pC)(this.colorTexture)?this.colorTexture.cloneWithDeduplication(e):null,normalTexture:(0,a.pC)(this.normalTexture)?this.normalTexture.cloneWithDeduplication(e):null,alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:(0,a.pC)(this.colorTextureTransform)?this.colorTextureTransform:null,normalTextureTransform:(0,a.pC)(this.normalTextureTransform)?this.normalTextureTransform:null}}};(0,o._)([(0,l.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"color",void 0),(0,o._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"colorTexture",void 0),(0,o._)([(0,l.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"normalTexture",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaMode",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"alphaCutoff",void 0),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:!0}})],p.prototype,"doubleSided",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"colorTextureTransform",void 0),(0,o._)([(0,l.Cb)()],p.prototype,"normalTextureTransform",void 0),p=r=(0,o._)([(0,c.j)("esri.geometry.support.MeshMaterial")],p);const h=p},60746:(e,t,n)=>{n.d(t,{Z:()=>h});var r,o=n(43697),i=n(22303),s=n(70586),a=n(5600),l=(n(67676),n(80442),n(75215),n(52011)),c=n(65542),u=n(81118);let p=r=class extends c.Z{constructor(e){super(e),this.emissiveColor=null,this.emissiveTexture=null,this.occlusionTexture=null,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(e,t){const n=(0,s.pC)(e)?e.get(this):null;if(n)return n;const o=new r(this.clonePropertiesWithDeduplication(t));return(0,s.pC)(e)&&e.set(this,o),o}clonePropertiesWithDeduplication(e){return{...super.clonePropertiesWithDeduplication(e),emissiveColor:(0,s.pC)(this.emissiveColor)?this.emissiveColor.clone():null,emissiveTexture:(0,s.pC)(this.emissiveTexture)?this.emissiveTexture.cloneWithDeduplication(e):null,occlusionTexture:(0,s.pC)(this.occlusionTexture)?this.occlusionTexture.cloneWithDeduplication(e):null,metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:(0,s.pC)(this.metallicRoughnessTexture)?this.metallicRoughnessTexture.cloneWithDeduplication(e):null,occlusionTextureTransform:(0,s.pC)(this.occlusionTextureTransform)?this.occlusionTextureTransform:null,emissiveTextureTransform:(0,s.pC)(this.emissiveTextureTransform)?this.emissiveTextureTransform:null,metallicRoughnessTextureTransform:(0,s.pC)(this.metallicRoughnessTextureTransform)?this.metallicRoughnessTextureTransform:null}}};(0,o._)([(0,a.Cb)({type:i.Z,json:{write:!0}})],p.prototype,"emissiveColor",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"emissiveTexture",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"occlusionTexture",void 0),(0,o._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"metallic",void 0),(0,o._)([(0,a.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],p.prototype,"roughness",void 0),(0,o._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],p.prototype,"metallicRoughnessTexture",void 0),(0,o._)([(0,a.Cb)()],p.prototype,"occlusionTextureTransform",void 0),(0,o._)([(0,a.Cb)()],p.prototype,"emissiveTextureTransform",void 0),(0,o._)([(0,a.Cb)()],p.prototype,"metallicRoughnessTextureTransform",void 0),p=r=(0,o._)([(0,l.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],p);const h=p},81118:(e,t,n)=>{n.d(t,{Z:()=>m});var r=n(43697),o=(n(80442),n(96674)),i=n(5600),s=(n(67676),n(75215)),a=n(71715),l=n(52011),c=n(30556),u=n(25929);n(22021);let p=null,h=!0;var f;const g=new WeakMap;let x=0,d=f=class extends o.wq{constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){if(e instanceof HTMLImageElement){const o={type:"image-element",src:(0,u.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r=e.getContext("2d").getImageData(0,0,e.width,e.height),o={type:"canvas-element",imageData:this._encodeImageData(r)};t[n]=o}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,u.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else{const r={type:"image-data",imageData:this._encodeImageData(e)};t[n]=r}}readData(e){switch(e.type){case"image-element":{const t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{const t=this._decodeImageData(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return this._decodeImageData(e.imageData);case"video-element":{const t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){const e=this.data,t=this.url;if(e instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(e.getContext("2d").getImageData(0,0,e.width,e.height));if(e instanceof ImageData)return this._imageDataContainsTransparent(e);if(t){const e=t.substr(t.length-4,4).toLowerCase(),n=t.substr(0,15).toLocaleLowerCase();if(".png"===e||"data:image/png;"===n)return!0}return!1}set transparent(e){null!=e?this._override("transparent",e):this._clearOverride("transparent")}get contentHash(){const e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null!=this.url?t(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++x),t(g.get(this.data))):t()}clone(){const e={url:this.url,data:this.data,wrap:this._cloneWrap()};return new f(e)}cloneWithDeduplication(e){const t=e.get(this);if(t)return t;const n=this.clone();return e.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}_decodeImageData(e){const t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return function(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(h)try{return new ImageData(e,t,n)}catch(e){h=!1}const o=function(e,t,n){return n||(p||(p=document.createElement("canvas"),p.width=1,p.height=1),n=p),n.getContext("2d").createImageData(e,t)}(t,n,void 0);return o.data.set(e,0),o}(n,e.width,e.height)}_imageDataContainsTransparent(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}static from(e){return"string"==typeof e?new f({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new f({data:e}):(0,s.TJ)(f,e)}};(0,r._)([(0,i.Cb)({type:String,json:{write:u.w}})],d.prototype,"url",null),(0,r._)([(0,i.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,i.Cb)()],d.prototype,"data",null),(0,r._)([(0,c.c)("data")],d.prototype,"writeData",null),(0,r._)([(0,a.r)("data")],d.prototype,"readData",null),(0,r._)([(0,i.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],d.prototype,"transparent",null),(0,r._)([(0,i.Cb)({json:{write:!0}})],d.prototype,"wrap",void 0),(0,r._)([(0,i.Cb)({readOnly:!0})],d.prototype,"contentHash",null),d=f=(0,r._)([(0,l.j)("esri.geometry.support.MeshTexture")],d);const m=d},71630:(e,t,n)=>{n.d(t,{Q:()=>f,X:()=>x});var r,o=n(43697),i=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const p="esri.geometry.support.MeshVertexAttributes",h=a.Z.getLogger(p);let f=r=class extends i.wq{constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return x(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},h)}castPosition(e){return e&&e instanceof Float32Array&&h.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),x(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},h)}castUv(e){return x(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},h)}castNormal(e){return x(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},h)}castTangent(e){return x(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},h)}clone(){const e={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(e)}clonePositional(){const e={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(e)}};function g(e,t,n,r){const{loggerTag:o,stride:i}=t;return e.length%i!=0?(r.error(o,`Invalid array length, expected a multiple of ${i}`),new n([])):e}function x(e,t,n,r,o){if(!e)return e;if(e instanceof t)return g(e,r,t,o);for(const i of n)if(e instanceof i)return g(new t(e),r,t,o);if(Array.isArray(e))return g(new t(e),r,t,o);{const r=n.map((e=>`'${e.name}'`));return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function d(e,t,n){t[n]=function(e){const t=new Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"color",void 0),(0,o._)([(0,c.p)("color")],f.prototype,"castColor",null),(0,o._)([(0,l.Cb)({nonNullable:!0,json:{write:d}})],f.prototype,"position",void 0),(0,o._)([(0,c.p)("position")],f.prototype,"castPosition",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"uv",void 0),(0,o._)([(0,c.p)("uv")],f.prototype,"castUv",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"normal",void 0),(0,o._)([(0,c.p)("normal")],f.prototype,"castNormal",null),(0,o._)([(0,l.Cb)({json:{write:d}})],f.prototype,"tangent",void 0),(0,o._)([(0,c.p)("tangent")],f.prototype,"castTangent",null),f=r=(0,o._)([(0,u.j)(p)],f)},47545:(e,t,n)=>{n.d(t,{d:()=>o});var r=n(22021);function o(e,t,n){const o=e.byteLength/(4*t),c=new Uint32Array(e,0,o*t);let u=new Uint32Array(o);const p=n?.minReduction??0,h=n?.originalIndices||null,f=h?h.length:0,g=n?.componentOffsets||null;let x=0;if(g)for(let e=0;e<g.length-1;e++){const t=g[e+1]-g[e];t>x&&(x=t)}else x=o;const d=Math.floor(1.1*x)+1;(null==l||l.length<2*d)&&(l=new Uint32Array((0,r.Sf)(2*d)));for(let e=0;e<2*d;e++)l[e]=0;let m=0;const y=!!g&&!!h,v=y?f:o,w=y?new Uint32Array(f):null,b=1.96;let C=0!==p?Math.ceil(4*b*b/(p*p)*p*(1-p)):v,A=1,T=g?g[1]:v;for(let e=0;e<v;e++){if(e===C){const t=1-m/e;if(t+b*Math.sqrt(t*(1-t)/e)<p)return null;C*=2}if(e===T){for(let e=0;e<2*d;e++)l[e]=0;if(h)for(let e=g[A-1];e<g[A];e++)w[e]=u[h[e]];T=g[++A]}const n=y?h[e]:e,r=n*t,o=a(c,r,t);let s=o%d,f=m;for(;0!==l[2*s+1];){if(l[2*s]===o){const e=l[2*s+1]-1;if(i(c,r,e*t,t)){f=u[e];break}}s++,s>=d&&(s-=d)}f===m&&(l[2*s]=o,l[2*s+1]=n+1,m++),u[n]=f}if(0!==p&&1-m/o<p)return null;if(y){for(let e=g[A-1];e<w.length;e++)w[e]=u[h[e]];u=w}const Z=new Uint32Array(t*m);m=0;for(let e=0;e<v;e++)u[e]===m&&(s(c,(y?h[e]:e)*t,Z,m*t,t),m++);if(h&&!y){const e=new Uint32Array(f);for(let t=0;t<e.length;t++)e[t]=u[h[t]];u=e}return{buffer:Z.buffer,indices:u,uniqueCount:m}}function i(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function s(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function a(e,t,n){let r=0;for(let o=0;o<n;o++)r=e[t+o]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null},38163:(e,t,n)=>{n.r(t),n.d(t,{meshFeatureSetFromJSON:()=>Ie});var r,o,i=n(38171),s=n(70586),a=n(6570),l=n(43697),c=n(20102),u=n(3920),p=n(83379),h=n(92604),f=n(609),g=n(95330),x=n(17445),d=n(5600),m=(n(67676),n(80442),n(75215),n(52011)),y=n(65617),v=n(9361),w=n(13473),b=n(38913),C=n(3709),A=n(62540),T=n(2674),Z=n(71630),M=n(95401),_=n(86662),F=n(47545);function R(e,t,n){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o);let l=0,c=0,u=0,p=0;for(let t=0;t<o;++t)p+=e[t].length;const h=new Float64Array(3*p);let f=0;for(let p=o-1;p>=0;p--){const g=e[p],x=n===r.CCW_IS_HOLE&&D(g);if(x&&1!==o)i[l++]=g;else{let e=g.length;for(let t=0;t<l;++t)e+=i[t].length;const n={index:f,pathLengths:new Array(l+1),count:e,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:f,count:g.length}),f=x?L(g,g.length-1,-1,h,f,g.length,t):L(g,0,1,h,f,g.length,t);for(let e=0;e<l;++e){const r=i[e];n.holeIndices[e]=f,n.pathLengths[e+1]=r.length,r.length>0&&(a[u++]={index:f,count:r.length}),f=L(r,0,1,h,f,r.length,t)}l=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<l;++e){const n=i[e];n.length>0&&(a[u++]={index:f,count:n.length}),f=L(n,0,1,h,f,n.length,t)}return c<o&&(s.length=c),u<o&&(a.length=u),{position:h,polygons:s,outlines:a}}function L(e,t,n,r,o,i,s){o*=3;for(let a=0;a<i;++a){const i=e[t];r[o++]=i[0],r[o++]=i[1],r[o++]=s?i[2]:0,t+=n}return o/3}function D(e){return!(0,_.bu)(e,!1,!1)}(o=r||(r={}))[o.NONE=0]="NONE",o[o.CCW_IS_HOLE=1]="CCW_IS_HOLE";var I=n(44547),E=n(13442),O=n(66459);const P=h.Z.getLogger("esri.geometry.support.meshUtils.centerAt");const S=(0,y.c)(),j=(0,y.c)();var z=n(17452);function N(e){const t=(0,z.Yd)(e.url);return n=>{const r=(0,z.PF)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return e.files.get(o)??n}}async function U(e,t){return e instanceof Blob?W.fromBlob(e):"string"==typeof e?new W(e):Array.isArray(e)?async function(e,t){const n=new Map;let r=null;const o=await(0,g.WW)(e.map((async e=>({name:e.name,source:await U(e instanceof Blob?e:e.source,t)})))),i=[];for(const e of o)e&&((0,g.Hc)(t)?e.source.dispose():i.push(e));(0,g.k_)(t);for(const{name:e,source:t}of i)((0,s.Wi)(r)||/\.(gltf|glb)/i.test(e))&&(r=t.url),n.set(e,t.url),t.files&&t.files.forEach(((e,t)=>n.set(t,e)));if((0,s.Wi)(r))throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new W(r,(()=>i.forEach((({source:e})=>e.dispose()))),n)}(e,t):async function(e,t){const{default:r}=await(0,g.Hl)(Promise.resolve().then(n.bind(n,3172)),t),o="string"==typeof e.multipart[0]?await Promise.all(e.multipart.map((async e=>(await r(e,{responseType:"array-buffer"})).data))):e.multipart;return W.fromBlob(new Blob(o))}(e,t)}class W{constructor(e,t=(()=>{}),n=new Map){this.url=e,this.dispose=t,this.files=n}static fromBlob(e){const t=URL.createObjectURL(e);return new W(t,(()=>URL.revokeObjectURL(t)))}}var k=n(21787),$=n(46521),H=n(13598),B=n(17896),G=n(24678),q=n(56493);function Y(e,t){if(e)for(let n=0;n<e.length;n+=3)for(let r=0;r<3;r++)e[n+r]+=t[r]}const X=(0,y.c)(),K=(0,H.c)(),J=(0,$.c)(),V={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function Q(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null==t)return;const n="number"==typeof t?[t,t,t]:[null!=t.width?t.width:1,null!=t.depth?t.depth:1,null!=t.height?t.height:1];re[0]=n[0],re[4]=n[1],re[8]=n[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)ne[n]=e.position[t+n];(0,B.t)(ne,ne,re);for(let n=0;n<3;n++)e.position[t+n]=ne[n]}if(n[0]!==n[1]||n[1]!==n[2]){re[0]=1/n[0],re[4]=1/n[1],re[8]=1/n[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)ne[n]=e.normal[t+n];(0,B.t)(ne,ne,re),(0,B.n)(ne,ne);for(let n=0;n<3;n++)e.normal[t+n]=ne[n]}}}(e,n&&n.size);const{vertexAttributes:r,transform:o}=(0,O.w1)(e,t,n);return{vertexAttributes:new Z.Q({...r,uv:e.uv}),transform:o,components:[new A.Z({faces:e.faces,material:n&&n.material||null})],spatialReference:t.spatialReference}}const ee={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},te={south:0,east:1,north:2,west:3,up:4,down:5},ne=(0,y.c)(),re=(0,$.c)();var oe=n(52138);const ie=h.Z.getLogger("esri.geometry.support.meshUtils.rotate");function se(e,t,n,r=y.Z){if(!(0,s.Wi)(e)){(0,oe.d)(ue,(0,C.WH)(t),(0,C.ZZ)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)ae[n]=e[t+n]-r[n];(0,B.m)(ae,ae,ue);for(let n=0;n<3;n++)e[t+n]=ae[n]+r[n]}}}const ae=(0,y.c)(),le=(0,y.c)(),ce=(0,C.Ue)(),ue=(0,H.c)(),pe=(0,$.c)(),he=(0,y.c)(),fe=h.Z.getLogger("esri.geometry.support.meshUtils.scale");function ge(e,t,n=y.Z){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)xe[t]=e[r+t]-n[t];(0,B.g)(xe,xe,t);for(let t=0;t<3;t++)e[r+t]=xe[t]+n[t]}}const xe=(0,y.c)(),de=(0,y.c)(),me=(0,y.c)();var ye;const ve="esri.geometry.Mesh";let we=ye=class extends((0,u.p)(p.Z.LoadableMixin((0,f.v)(v.Z)))){constructor(e){super(e),this.components=null,this.transform=null,this.external=null,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new Z.Q,this.type="mesh"}initialize(){((0,s.Wi)(this.external)||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.handles.add((0,x.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((e=>e.clone())),transform:(0,s.pC)(this.transform)?this.transform.clone():null})),(()=>this._set("external",null)),{once:!0,sync:!0}))}))}get hasExtent(){return!this.loaded&&(0,s.pC)(this.external)&&(0,s.pC)(this.external.extent)||this.loaded&&this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0)}get _boundingInfo(){const e=this.vertexAttributes.position,t=this.spatialReference;if(0===e.length||this.components&&0===this.components.length)return{extent:new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:t}),center:new w.Z({x:0,y:0,z:0,spatialReference:t})};const n=(0,s.pC)(this.transform)?this.transform.project(e,t):e;let r=1/0,o=1/0,i=1/0,l=-1/0,c=-1/0,u=-1/0,p=0,h=0,f=0;const g=n.length,x=1/(g/3);let d=0;for(;d<g;){const e=n[d++],t=n[d++],s=n[d++];r=Math.min(r,e),o=Math.min(o,t),i=Math.min(i,s),l=Math.max(l,e),c=Math.max(c,t),u=Math.max(u,s),p+=x*e,h+=x*t,f+=x*s}return{extent:new a.Z({xmin:r,ymin:o,zmin:i,xmax:l,ymax:c,zmax:u,spatialReference:t}),center:new w.Z({x:p,y:h,z:f,spatialReference:t})}}get anchor(){if((0,s.pC)(this.transform))return this.transform.getOriginPoint(this.spatialReference);const e=this._boundingInfo;return new w.Z({x:e.center.x,y:e.center.y,z:e.extent.zmin,spatialReference:this.spatialReference})}get origin(){return(0,s.pC)(this.transform)?this.transform.getOriginPoint(this.spatialReference):this._boundingInfo.center}get extent(){return!this.loaded&&(0,s.pC)(this.external)&&(0,s.pC)(this.external.extent)?this.external.extent.clone():this._boundingInfo.extent}addComponent(e){this.loaded?(this.components||(this.components=[]),this.components.push(A.Z.from(e)),this.notifyChange("components")):h.Z.getLogger(this.declaredClass).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(e){if(this.loaded){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}h.Z.getLogger(this.declaredClass).error("removeComponent()","Provided component is not part of the list of components")}else h.Z.getLogger(this.declaredClass).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(e,t,n,r){return(0,C.uT)(be.x,e,Ce),(0,C.uT)(be.y,t,Ae),(0,C.uT)(be.z,n,Te),(0,C.qC)(Ce,Ae,Ce),(0,C.qC)(Ce,Te,Ce),function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position||0===t[3])return;const r=e.spatialReference;if((0,s.pC)(e.transform)){null!=n?.geographic&&n.geographic!==e.transform.geographic&&ie.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`);const o=n?.origin??e.transform.getOriginPoint(r);!function(e,t,n){const r=(0,B.s)(ae,n.x,n.y,n.z),o=(0,B.b)(ae,r,e.origin);e.applyLocalInverse(o,le),e.rotation=(0,C.qC)(e.rotation,t,(0,C.Ue)()),e.applyLocalInverse(o,o),(0,B.b)(o,o,le),e.translation=(0,B.a)((0,y.c)(),e.translation,o)}(e.transform,t,o)}else{const r=n?.origin??e.origin;(0,E.h)(e.spatialReference,n)?function(e,t,n){const r=e.spatialReference,o=(0,G.rS)(r),i=he;(0,I.KC)(n,i,o)||(0,I.KC)(e.origin,i,o);const a=e.vertexAttributes.position,l=e.vertexAttributes.normal,c=e.vertexAttributes.tangent,u=new Float64Array(a.length),p=(0,s.pC)(l)?new Float32Array(l.length):null,h=(0,s.pC)(c)?new Float32Array(c.length):null;(0,I.Bm)(o,i,ue,o),(0,k.f)(pe,ue);const f=ce;(0,B.t)((0,C.ZZ)(ce),(0,C.ZZ)(t),pe),f[3]=t[3],(0,q.XO)(a,r,u),(0,s.pC)(l)&&(0,q.Iz)(l,a,u,r,p),(0,s.pC)(c)&&(0,q.wi)(c,a,u,r,h),se(u,f,3,i),(0,q.To)(u,a,r),(0,s.pC)(l)&&(se(p,f,3),(0,q.Yk)(p,a,u,r,l)),(0,s.pC)(c)&&(se(h,f,4),(0,q.M2)(h,a,u,r,c)),e.vertexAttributesChanged()}(e,t,r):function(e,t,n){const r=he;if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,ie.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}se(e.vertexAttributes.position,t,3,r),se(e.vertexAttributes.normal,t,3),se(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,r)}}(this,Ce,r),this}offset(e,t,n,r){return this.loaded?(Ze[0]=e,Ze[1]=t,Ze[2]=n,function(e,t,n){var r,o;e.vertexAttributes&&e.vertexAttributes.position&&((0,s.pC)(e.transform)?(null!=n?.geographic&&n.geographic!==e.transform.geographic&&h.Z.getLogger("esri.geometry.support.meshUtils.offset").warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`),function(e,t){const n=e.origin;e.origin=(0,B.a)((0,y.c)(),n,t)}(e.transform,t)):(0,E.h)(e.spatialReference,n)?function(e,t){const n=e.spatialReference,r=e.vertexAttributes.position,o=e.vertexAttributes.normal,i=e.vertexAttributes.tangent,a=new Float64Array(r.length),l=(0,s.pC)(o)?new Float32Array(o.length):null,c=(0,s.pC)(i)?new Float32Array(i.length):null,u=e.extent.center,p=X;(0,I.Bm)(n,[u.x,u.y,u.z],K,(0,G.rS)(n)),(0,k.f)(J,K),(0,B.t)(p,t,J),(0,q.XO)(r,n,a),(0,s.pC)(o)&&(0,q.Iz)(o,r,a,n,l),(0,s.pC)(i)&&(0,q.wi)(i,r,a,n,c),Y(a,p),(0,q.To)(a,r,n),(0,s.pC)(o)&&(0,q.Yk)(l,r,a,n,o),(0,s.pC)(i)&&(0,q.M2)(c,r,a,n,i),e.vertexAttributesChanged()}(e,t):(o=t,Y((r=e).vertexAttributes.position,o),r.vertexAttributesChanged()))}(this,Ze,r),this):(h.Z.getLogger(this.declaredClass).error("offset()","Mesh must be loaded before applying operations"),this)}scale(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const r=e.spatialReference;if((0,s.pC)(e.transform)){null!=n?.geographic&&n.geographic!==e.transform.geographic&&fe.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`);const o=n?.origin??e.transform.getOriginPoint(r);!function(e,t,n){const r=(0,B.s)(xe,n.x,n.y,n.z),o=(0,B.b)(xe,r,e.origin);e.applyLocalInverse(o,de);const i=(0,B.g)((0,y.c)(),e.scale,t);e.scale=i,e.applyLocalInverse(o,o),(0,B.b)(o,o,de),e.translation=(0,B.a)((0,y.c)(),e.translation,o)}(e.transform,t,o)}else{const r=(0,E.h)(e.spatialReference,n),o=n&&n.origin||e.origin;r?function(e,t,n){const r=e.spatialReference,o=(0,G.rS)(r),i=me;(0,I.KC)(n,i,o)||(0,I.KC)(e.origin,i,o);const a=e.vertexAttributes.position,l=e.vertexAttributes.normal,c=e.vertexAttributes.tangent,u=new Float64Array(a.length),p=(0,s.pC)(l)?new Float32Array(l.length):null,h=(0,s.pC)(c)?new Float32Array(c.length):null;(0,q.XO)(a,r,u),(0,s.pC)(l)&&(0,q.Iz)(l,a,u,r,p),(0,s.pC)(c)&&(0,q.wi)(c,a,u,r,h),ge(u,t,i),(0,q.To)(u,a,r),(0,s.pC)(l)&&(0,q.Yk)(p,a,u,r,l),(0,s.pC)(c)&&(0,q.M2)(h,a,u,r,c),e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=me;if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,fe.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}ge(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,o)}}(this,e,t),this):(h.Z.getLogger(this.declaredClass).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(e,t){return this.loaded?(function(e,t,n){if(!e.vertexAttributes||!e.vertexAttributes.position)return;const r=n?.origin??e.origin;(0,s.pC)(e.transform)?(null!=n?.geographic&&n.geographic!==e.transform.geographic&&P.warn(`Specifying the 'geographic' parameter (${n.geographic}) different from the Mesh transform setting (${e.transform.geographic}) is not supported`),function(e,t,n){const r=t.x-n.x,o=t.y-n.y,i=t.hasZ&&n.hasZ?t.z-n.z:0,s=e.origin;e.origin=[s[0]+r,s[1]+o,s[2]+i]}(e.transform,t,r)):(0,E.h)(e.spatialReference,n)?function(e,t,n){const r=(0,O.FF)(e.vertexAttributes,n,{geographic:!0}),{position:o,normal:i,tangent:s}=(0,O.iv)(r,t,{geographic:!0});e.vertexAttributes.position=o,e.vertexAttributes.normal=i,e.vertexAttributes.tangent=s,e.vertexAttributesChanged()}(e,t,r):function(e,t,n){const r=j,o=S;if((0,I.KC)(t,o,e.spatialReference)){if(!(0,I.KC)(n,r,e.spatialReference)){const t=e.origin;r[0]=t.x,r[1]=t.y,r[2]=t.z,P.error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid}).`)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let o=0;o<3;o++)e[r+o]+=t[o]-n[o]})(e.vertexAttributes.position,o,r),e.vertexAttributesChanged()}else P.error(`Failed to project centerAt location (wkid:${t.spatialReference.wkid}) to mesh spatial reference (wkid:${e.spatialReference.wkid})`)}(e,t,r)}(this,e,t),this):(h.Z.getLogger(this.declaredClass).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(e){return(0,s.pC)(this.external)&&this.addResolvingPromise(async function(e,t,r){const{loadGLTFMesh:o}=await(0,g.Hl)(Promise.all([n.e(2631),n.e(2133),n.e(9070)]).then(n.bind(n,99070)),r),i=await U(t,r),a=o(new w.Z({x:0,y:0,z:0,spatialReference:e.spatialReference}),i.url,{resolveFile:N(i),useTransform:!0,signal:(0,s.pC)(r)?r.signal:null});a.then((()=>i.dispose()),(()=>i.dispose()));const{vertexAttributes:l,components:c}=await a;e.vertexAttributes=l,e.components=c}(this,this.external.source,e)),Promise.resolve(this)}clone(){const e=this.components?new Map:null,t=this.components?new Map:null,n={components:this.components?this.components.map((n=>n.cloneWithDeduplication(e,t))):null,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),transform:(0,s.pC)(this.transform)?this.transform.clone():null,external:(0,s.pC)(this.external)?{source:this.external.source,extent:(0,s.pC)(this.external.extent)?this.external.extent.clone():null}:null};return new ye(n)}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const{toBinaryGLTF:t}=await n.e(7277).then(n.bind(n,7277));return t(this,e)}static createBox(e,t){if(!(e instanceof w.Z))return h.Z.getLogger(ve).error(".createBox()","expected location to be a Point instance"),null;const n=new ye(Q(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=ee,r=4*e.length,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*e.length*3);let l=0,c=0,u=0,p=0;for(let r=0;r<e.length;r++){const h=e[r],f=l/3;for(const e of t)a[p++]=f+e;const g=h.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[u++]=.25*n[e][0]+h.uvOrigin[0],s[u++]=h.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==h.axis[e]?(o[l++]=.5*h.axis[e],i[c++]=h.axis[e]):(o[l++]=.5*t[r++],i[c++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t&&t.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=te[t],i=6*o,a=new Uint32Array(6),l=new Uint32Array(r.length-6);let c=0,u=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?a[c++]=r[e]:l[u++]=r[e];if((0,s.pC)(e.vertexAttributes.uv)){const t=new Float32Array(e.vertexAttributes.uv),n=4*o*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new A.Z({faces:a,material:n.material}),new A.Z({faces:l})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof w.Z?new ye(Q(function(e=0){const t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,o=new Float64Array(3*r),i=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((t-1)*n*2*3);let l=0,c=0,u=0,p=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,h=Math.cos(r),f=Math.sin(r);ne[2]=f;const g=0===e||e===t,x=g?n-1:n;for(let r=0;r<=x;r++){const f=r/x*2*Math.PI;ne[0]=-Math.sin(f)*h,ne[1]=Math.cos(f)*h;for(let e=0;e<3;e++)o[l]=.5*ne[e],i[l]=ne[e],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=e/t,0!==e&&r!==n&&(e!==t&&(a[u++]=p,a[u++]=p+1,a[u++]=p-n),1!==e&&(a[u++]=p,a[u++]=p-n,a[u++]=p-n-1)),p++}}return{position:o,normal:i,uv:s,faces:a}}(t&&t.densificationFactor||0),e,t)):(h.Z.getLogger(ve).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(e,t){return e instanceof w.Z?new ye(Q(function(e=0){const t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),o=new Float32Array(3*n),i=new Float32Array(2*n),s=new Uint32Array(4*t*3);let a=0,l=0,c=0,u=0,p=0;for(let e=0;e<=5;e++){const n=0===e||5===e,h=e<=1||e>=4,f=2===e||4===e,g=n?t-1:t;for(let x=0;x<=g;x++){const d=x/g*2*Math.PI,m=n?0:.5;ne[0]=m*Math.sin(d),ne[1]=m*-Math.cos(d),ne[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=ne[t],o[l++]=h?2===t?e<=1?1:-1:0:2===t?0:ne[t]/m;i[c++]=(x+(n?.5:0))/t,i[c++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,f||0===e||x===t||(5!==e&&(s[u++]=p,s[u++]=p+1,s[u++]=p-t),1!==e&&(s[u++]=p,s[u++]=p-t,s[u++]=p-t-1)),p++}}return{position:r,normal:o,uv:i,faces:s}}(t&&t.densificationFactor||0),e,t)):(h.Z.getLogger(ve).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(e,t){if(!(e instanceof w.Z))return h.Z.getLogger(ve).error(".createPlane()","expected location to be a Point instance"),null;const n=t?.facing??"up",r=function(e,t){const n="number"==typeof t?t:null!=t?t.width:1,r="number"==typeof t?t:null!=t?t.height:1;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,t?.size);return new ye(Q(function(e){const t=V.facingAxisOrderSwap[e],n=V.position,r=V.normal,o=new Float64Array(n.length),i=new Float32Array(r.length);let s=0;for(let e=0;e<4;e++){const e=s;for(let a=0;a<3;a++){const l=t[a],c=Math.abs(l)-1,u=l>=0?1:-1;o[s]=n[e+c]*u,i[s]=r[e+c]*u,s++}}return{position:o,normal:i,uv:new Float32Array(V.uv),faces:new Uint32Array(V.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof b.Z))return h.Z.getLogger(ve).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(e){const t=R(e.rings,e.hasZ,r.CCW_IS_HOLE),n=[];let o=0,i=0;for(const e of t.polygons){const r=e.count,s=e.index,a=new Float64Array(t.position.buffer,3*s*t.position.BYTES_PER_ELEMENT,3*r),l=e.holeIndices.map((e=>e-s)),c=new Uint32Array((0,M.e)(a,l,3));n.push({position:a,faces:c}),o+=a.length,i+=c.length}const s=function(e,t,n){if(1===e.length)return e[0];const r=new Float64Array(t),o=new Uint32Array(n);let i=0,s=0,a=0;for(const t of e){for(let e=0;e<t.position.length;e++)r[i++]=t.position[e];for(let e=0;e<t.faces.length;e++)o[s++]=t.faces[e]+a;a=i/3}return{position:r,faces:o}}(n,o,i),a=(0,F.d)(s.position.buffer,6,{originalIndices:s.faces});return s.position=new Float64Array(a.buffer),s.faces=a.indices,s}(e);return new ye({vertexAttributes:new Z.Q({position:n.position}),components:[new A.Z({faces:n.faces,shading:"flat",material:t&&t.material||null})],spatialReference:e.spatialReference})}static async createFromGLTF(e,t,r){if(!(e instanceof w.Z))throw h.Z.getLogger(ve).error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,g.Hl)(Promise.all([n.e(2631),n.e(2133),n.e(9070)]).then(n.bind(n,99070)),r);return new ye(await o(e,t,r))}static createWithExternalSource(e,t,n){const r=n?.extent??null,o=n?.transform.clone()??new T.Z;o.origin=[e.x,e.y,e.z??0];const i=e.spatialReference;return new ye({external:{source:t,extent:r},transform:o,spatialReference:i})}static createIncomplete(e,t){const n=t?.transform.clone()??new T.Z;n.origin=[e.x,e.y,e.z??0];const r=e.spatialReference,o=new ye({transform:n,spatialReference:r});return o.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),o}};(0,l._)([(0,d.Cb)({type:[A.Z],json:{write:!0}})],we.prototype,"components",void 0),(0,l._)([(0,d.Cb)({type:T.Z,json:{write:!0}})],we.prototype,"transform",void 0),(0,l._)([(0,d.Cb)({constructOnly:!0})],we.prototype,"external",void 0),(0,l._)([(0,d.Cb)({readOnly:!0})],we.prototype,"hasExtent",null),(0,l._)([(0,d.Cb)({readOnly:!0})],we.prototype,"_boundingInfo",null),(0,l._)([(0,d.Cb)({readOnly:!0})],we.prototype,"anchor",null),(0,l._)([(0,d.Cb)({readOnly:!0})],we.prototype,"origin",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1}})],we.prototype,"extent",null),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],we.prototype,"hasZ",void 0),(0,l._)([(0,d.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],we.prototype,"hasM",void 0),(0,l._)([(0,d.Cb)({type:Z.Q,nonNullable:!0,json:{write:!0}})],we.prototype,"vertexAttributes",void 0),we=ye=(0,l._)([(0,m.j)(ve)],we);const be={x:(0,y.f)(1,0,0),y:(0,y.f)(0,1,0),z:(0,y.f)(0,0,1)},Ce=(0,C.Ue)(),Ae=(0,C.Ue)(),Te=(0,C.Ue)(),Ze=(0,y.c)(),Me=we;var _e,Fe;!function(e){e.featureGUID="featureGUID",e.assetName="assetName",e.hash="hash",e.type="type",e.conversionStatus="conversionStatus",e.flags="flags",e.complexity="complexity",e.size="size",e.seqNo="seqNo",e.sourceHash="sourceHash",e.assetURL="assetURL"}(_e||(_e={})),function(e){e.SUBMITTED="SUBMITTED",e.INPROGRESS="INPROGRESS",e.FAILED="FAILED",e.COMPLETED="COMPLETED"}(Fe||(Fe={}));var Re,Le,De=n(74889);function Ie(e,t,n){const r=n.features;n.features=[],delete n.geometryType;const o=De.default.fromJSON(n);o.geometryType="mesh";const a=o.spatialReference,l=(0,s.Wi)(e.outFields)||!e.outFields.length?()=>({}):(c=e.outFields.includes("*")?null:new Set(e.outFields),({attributes:e})=>{if(!e)return{};if(!c)return e;for(const t in e)c.has(t)||delete e[t];return e});var c;for(const e of r){const n=Ee(e,a,t);(0,s.pC)(n)&&o.features.push(new i.Z({geometry:n,attributes:l(e)}))}return o}function Ee(e,t,n){const{status:r,source:o}=function(e){if(!e.assetMappings)return{status:Re.FAILED};const t=[],n=new Map;for(const r of e.assetMappings){const e=r[_e.seqNo],o=r[_e.assetName],i=r[_e.assetURL],s=r[_e.conversionStatus];if(s===Fe.FAILED)return{status:Re.FAILED};if(s!==Fe.COMPLETED)return{status:Re.PENDING};if(null==e)t.push({name:o,source:i});else{const r=n.get(o);let s;r?s=r.multipart:(s=[],t.push({name:o,source:{multipart:s}}),n.set(o,{multipart:s})),s[e]=i}}return{status:Re.COMPLETED,source:t}}(e);if(r===Re.FAILED)return null;const i=function({attributes:e},t,{transformFieldRoles:n}){return new w.Z({x:e[n.originX],y:e[n.originY],z:e[n.originZ],spatialReference:t})}(e,t,n),s=a.Z.fromJSON(e.geometry);s.spatialReference=t;const l=function({attributes:e,assetMappings:t},{transformFieldRoles:n}){return new T.Z({translation:[e[n.translationX],e[n.translationY],e[n.translationZ]],rotation:(0,C.uT)([e[n.rotationX],e[n.rotationY],e[n.rotationZ]],e[n.rotationDeg]),scale:[e[n.scaleX],e[n.scaleY],e[n.scaleZ]],geographic:!t[_e.flags]?.includes("PROJECT_VERTICES")})}(e,n);return r===Re.PENDING?Me.createIncomplete(i,{extent:s,transform:l}):Me.createWithExternalSource(i,o,{extent:s,transform:l})}(Le=Re||(Re={}))[Le.FAILED=0]="FAILED",Le[Le.PENDING=1]="PENDING",Le[Le.COMPLETED=2]="COMPLETED"}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5787],{57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(46791),l=i(3920),n=i(70586),o=(i(80442),i(20102),i(92604),i(26258),i(87538)),a=i(5600),d=(i(67676),i(75215),i(52011));let y=class extends((0,l.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,n.pC)(this.getCollections)?this.getCollections():null;if((0,n.Wi)(e))return void this.removeAll();let t=0;for(const i of e)(0,n.pC)(i)&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,a.Cb)()],y.prototype,"getCollections",void 0),(0,r._)([(0,a.Cb)()],y.prototype,"getChildrenFunction",void 0),(0,r._)([(0,a.Cb)()],y.prototype,"itemFilterFunction",void 0),y=(0,r._)([(0,d.j)("esri.core.CollectionFlattener")],y);const u=y},70921:(e,t,i)=>{i.d(t,{R:()=>l,Z:()=>s});var r=i(46791);function s(e,t,i=r.Z){return t||(t=new i),t===e||(t.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?t.addMany(e):e&&t.add(e)),t;var s}function l(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>o,w:()=>a});var r=i(66643),s=i(46791),l=i(83379),n=i(70586);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],o=(...e)=>{for(const t of e)(0,n.Wi)(t)||(Array.isArray(t)?o(...t):s.Z.isCollection(t)?t.forEach((e=>o(e))):l.Z.isLoadable(t)&&i.push(t))};t(o);let a=null;if(await(0,r.UI)(i,(async e=>{!1!==(await(0,r.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||a||(a=e)})),a)throw a.loadError;return e}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var r=i(43697),s=i(57435),l=i(68668),n=i(70586),o=i(16453),a=i(17445),d=i(5600),y=(i(67676),i(80442),i(1153)),u=(i(75215),i(52011)),h=i(30556),p=i(87085),c=i(71612),f=i(38009),m=i(16859),b=i(72965),v=i(46791),g=i(70921),_=i(92604),w=i(95330);function C(e,t,i){let r,s;if(e)for(let l=0,n=e.length;l<n;l++){if(r=e.getItemAt(l),r[t]===i)return r;if("group"===r?.type&&(s=C(r.layers,t,i),s))return s}}const I=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||_.Z.getLogger(this.declaredClass).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))}destroy(){const e=this.layers.removeAll();for(const t of e)this.layerRemoved(t),t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,g.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof p.Z){const r=e;r.parent===this?this.reorder(r,t):i.add(r,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):_.Z.getLogger(this.declaredClass).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;t=i.getNextIndex(t),e.slice().forEach((e=>{e.parent!==this?(i.add(e,t),t+=1):this.reorder(e,t)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,r._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,r._)([(0,u.j)("esri.support.LayersMixin")],t),t};function L(e,t,i){if(e)for(let r=0,s=e.length;r<s;r++){const s=e.getItemAt(r);if(s[t]===i)return s;if("group"===s?.type){const e=L(s.tables,t,i);if(e)return e}}}const A=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&_.Z.getLogger(this.declaredClass).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,g.Z)(e,this._get("tables")))}findTableById(e){return L(this.tables,"id",e)}findTableByUid(e){return L(this.tables,"uid",e)}};return(0,r._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,r._)([(0,u.j)("esri.support.TablesMixin")],t),t};var Z=i(15650);let M=class extends((0,c.h)((0,b.M)((0,f.q)((0,m.I)(A(I((0,o.R)(p.Z)))))))){constructor(e){var t;super(e),this._visibilityHandles={},this.allLayers=new s.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}_writeLayers(e,t,i,r){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,Z.Nw)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);(0,n.pC)(t)&&t.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e)),Promise.resolve(this)}loadAll(){return(0,l.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this._visibilityHandles[e.uid]=(0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_)}layerRemoved(e){const t=this._visibilityHandles[e.uid];t&&(t.remove(),delete this._visibilityHandles[e.uid]),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,y.vw)(this).initialized)return;const i=this.layers;let r=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!r&&(r=i.getItemAt(0),r.visible=!0),this._turnOffOtherLayers(r);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,r._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],M.prototype,"allLayers",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],M.prototype,"allTables",void 0),(0,r._)([(0,d.Cb)()],M.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],M.prototype,"layers",void 0),(0,r._)([(0,h.c)("layers")],M.prototype,"_writeLayers",null),(0,r._)([(0,d.Cb)({type:["GroupLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"portalItem",null),(0,r._)([(0,d.Cb)()],M.prototype,"spatialReference",void 0),(0,r._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],M.prototype,"type",void 0),(0,r._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],M.prototype,"visibilityMode",null),M=(0,r._)([(0,u.j)("esri.layers.GroupLayer")],M);const x=M},16859:(e,t,i)=>{i.d(t,{I:()=>g});var r=i(43697),s=i(40330),l=i(3172),n=i(66643),o=i(20102),a=i(92604),d=i(70586),y=i(95330),u=i(17452),h=i(5600),p=(i(67676),i(80442),i(75215),i(71715)),c=i(52011),f=i(30556),m=i(65587),b=i(15235),v=i(86082);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,y.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,y.D_)(e)||a.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=i,(0,d.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=m.Z.getDefault();if(o&&o.loaded&&(0,u.Fv)(o.restUrl)===(0,u.Fv)(r))return o.user;const a=`${r}/community/self`,y=(0,d.pC)(e)?e.signal:null,h=await(0,n.q6)((0,l.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:y}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||m.Z.getDefault());return i&&r&&!(0,u.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.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(e,{...t,layer:this})}};return(0,r._)([(0,h.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,r._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,c.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},84230:(e,t,i)=>{function r(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function s(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}i.d(t,{rQ:()=>r,y2:()=>s})},15650:(e,t,i)=>{i.d(t,{Nw:()=>h});var r=i(20102),s=i(22974),l=i(70586),n=i(78286),o=i(827),a=i(84230);const d=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),y=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,o.k)(e.maxScale)),"minScale"in e&&(t.minScale=(0,o.k)(e.minScale))}function h(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new r.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?d:"operational-layers"===e.layerContainerType?y:null}(t);return!(0,l.pC)(i)||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return(0,l.pC)(t)&&function(e,t){if(function(e,t){if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),r=i&&i[0]&&i[0].layerDefinition;r&&u(e,r)}else"stream"===e.type?u(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&u(e,t)}(e,t),"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,o.k)(e.opacity),t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,s.d9)(t)),t}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5787],{57435:(e,t,i)=>{i.d(t,{Z:()=>u});var r=i(43697),s=i(46791),l=i(3920),n=i(70586),o=(i(80442),i(20102),i(92604),i(26258),i(87538)),a=i(5600),d=(i(67676),i(75215),i(52011));let y=class extends((0,l.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,o.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,n.pC)(this.getCollections)?this.getCollections():null;if((0,n.Wi)(e))return void this.removeAll();let t=0;for(const i of e)(0,n.pC)(i)&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,a.Cb)()],y.prototype,"getCollections",void 0),(0,r._)([(0,a.Cb)()],y.prototype,"getChildrenFunction",void 0),(0,r._)([(0,a.Cb)()],y.prototype,"itemFilterFunction",void 0),y=(0,r._)([(0,d.j)("esri.core.CollectionFlattener")],y);const u=y},70921:(e,t,i)=>{i.d(t,{R:()=>l,Z:()=>s});var r=i(46791);function s(e,t,i=r.Z){return t||(t=new i),t===e||(t.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?t.addMany(e):e&&t.add(e)),t;var s}function l(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>o,w:()=>a});var r=i(66643),s=i(46791),l=i(83379),n=i(70586);async function o(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],o=(...e)=>{for(const t of e)(0,n.Wi)(t)||(Array.isArray(t)?o(...t):s.Z.isCollection(t)?t.forEach((e=>o(e))):l.Z.isLoadable(t)&&i.push(t))};t(o);let a=null;if(await(0,r.UI)(i,(async e=>{!1!==(await(0,r.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||a||(a=e)})),a)throw a.loadError;return e}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var r=i(43697),s=i(57435),l=i(68668),n=i(70586),o=i(16453),a=i(17445),d=i(5600),y=(i(67676),i(80442),i(1153)),u=(i(75215),i(52011)),h=i(30556),p=i(87085),c=i(71612),f=i(38009),m=i(16859),b=i(72965),v=i(46791),g=i(70921),_=i(92604),w=i(95330);function C(e,t,i){let r,s;if(e)for(let l=0,n=e.length;l<n;l++){if(r=e.getItemAt(l),r[t]===i)return r;if("group"===r?.type&&(s=C(r.layers,t,i),s))return s}}const I=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||_.Z.getLogger(this.declaredClass).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))}destroy(){const e=this.layers.removeAll();for(const t of e)this.layerRemoved(t),t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,g.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof p.Z){const r=e;r.parent===this?this.reorder(r,t):i.add(r,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):_.Z.getLogger(this.declaredClass).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;t=i.getNextIndex(t),e.slice().forEach((e=>{e.parent!==this?(i.add(e,t),t+=1):this.reorder(e,t)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,r._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,r._)([(0,u.j)("esri.support.LayersMixin")],t),t};function L(e,t,i){if(e)for(let r=0,s=e.length;r<s;r++){const s=e.getItemAt(r);if(s[t]===i)return s;if("group"===s?.type){const e=L(s.tables,t,i);if(e)return e}}}const A=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&_.Z.getLogger(this.declaredClass).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,g.Z)(e,this._get("tables")))}findTableById(e){return L(this.tables,"id",e)}findTableByUid(e){return L(this.tables,"uid",e)}};return(0,r._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,r._)([(0,u.j)("esri.support.TablesMixin")],t),t};var Z=i(20081);let M=class extends((0,c.h)((0,b.M)((0,f.q)((0,m.I)(A(I((0,o.R)(p.Z)))))))){constructor(e){var t;super(e),this._visibilityHandles={},this.allLayers=new s.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}_writeLayers(e,t,i,r){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,Z.Nw)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);(0,n.pC)(t)&&t.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e)),Promise.resolve(this)}loadAll(){return(0,l.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this._visibilityHandles[e.uid]=(0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_)}layerRemoved(e){const t=this._visibilityHandles[e.uid];t&&(t.remove(),delete this._visibilityHandles[e.uid]),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,y.vw)(this).initialized)return;const i=this.layers;let r=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!r&&(r=i.getItemAt(0),r.visible=!0),this._turnOffOtherLayers(r);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,r._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],M.prototype,"allLayers",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],M.prototype,"allTables",void 0),(0,r._)([(0,d.Cb)()],M.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],M.prototype,"layers",void 0),(0,r._)([(0,h.c)("layers")],M.prototype,"_writeLayers",null),(0,r._)([(0,d.Cb)({type:["GroupLayer"]})],M.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"portalItem",null),(0,r._)([(0,d.Cb)()],M.prototype,"spatialReference",void 0),(0,r._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],M.prototype,"type",void 0),(0,r._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],M.prototype,"visibilityMode",null),M=(0,r._)([(0,u.j)("esri.layers.GroupLayer")],M);const x=M},16859:(e,t,i)=>{i.d(t,{I:()=>g});var r=i(43697),s=i(40330),l=i(3172),n=i(66643),o=i(20102),a=i(92604),d=i(70586),y=i(95330),u=i(17452),h=i(5600),p=(i(67676),i(80442),i(75215),i(71715)),c=i(52011),f=i(30556),m=i(65587),b=i(15235),v=i(86082);const g=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,y.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,y.D_)(e)||a.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,y.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=i,(0,d.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=m.Z.getDefault();if(o&&o.loaded&&(0,u.Fv)(o.restUrl)===(0,u.Fv)(r))return o.user;const a=`${r}/community/self`,y=(0,d.pC)(e)?e.signal:null,h=await(0,n.q6)((0,l.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:y}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||m.Z.getDefault());return i&&r&&!(0,u.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.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(e,{...t,layer:this})}};return(0,r._)([(0,h.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,r._)([(0,p.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,c.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},84230:(e,t,i)=>{function r(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function s(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}i.d(t,{rQ:()=>r,y2:()=>s})},20081:(e,t,i)=>{i.d(t,{Nw:()=>h});var r=i(20102),s=i(22974),l=i(70586),n=i(78286),o=i(827),a=i(84230);const d=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),y=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function u(e,t){"maxScale"in e&&(t.maxScale=(0,o.k)(e.maxScale)),"minScale"in e&&(t.minScale=(0,o.k)(e.minScale))}function h(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new r.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?d:"operational-layers"===e.layerContainerType?y:null}(t);return!(0,l.pC)(i)||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return(0,l.pC)(t)&&function(e,t){if(function(e,t){if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),r=i&&i[0]&&i[0].layerDefinition;r&&u(e,r)}else"stream"===e.type?u(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&u(e,t)}(e,t),"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,o.k)(e.opacity),t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,s.d9)(t)),t}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9291],{79291:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(13598),l(1391),l(62707),l(55039),l(51546),l(77171),l(47624),l(64267),l(37099),l(76056),l(135),l(11317),l(15719),l(92555),l(89136),l(15817),l(66242),l(14482),l(83603),l(19419),l(26322),l(85504),l(22539),l(82550),l(85787),l(90692),l(93669),l(172),l(71250),l(21437),l(74709),l(8319),l(33680),l(98069),l(93144),l(35065),l(9749);var s=l(32078)}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9291],{79291:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(13598),l(1391),l(62707),l(55039),l(51546),l(77171),l(47624),l(64267),l(37099),l(76056),l(135),l(11317),l(15719),l(92555),l(89136),l(15817),l(66242),l(14482),l(83603),l(19419),l(26322),l(85504),l(22539),l(57806),l(82550),l(85787),l(90692),l(93669),l(172),l(71250),l(21437),l(74709),l(8319),l(33680),l(98069),l(93144),l(35065),l(9749);var s=l(32078)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9348,5787],{57435:(e,t,i)=>{i.d(t,{Z:()=>p});var r=i(43697),s=i(46791),o=i(3920),n=i(70586),l=(i(80442),i(20102),i(92604),i(26258),i(87538)),a=i(5600),d=(i(67676),i(75215),i(52011));let u=class extends((0,o.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,n.pC)(this.getCollections)?this.getCollections():null;if((0,n.Wi)(e))return void this.removeAll();let t=0;for(const i of e)(0,n.pC)(i)&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,a.Cb)()],u.prototype,"getCollections",void 0),(0,r._)([(0,a.Cb)()],u.prototype,"getChildrenFunction",void 0),(0,r._)([(0,a.Cb)()],u.prototype,"itemFilterFunction",void 0),u=(0,r._)([(0,d.j)("esri.core.CollectionFlattener")],u);const p=u},10699:(e,t,i)=>{i.d(t,{IG:()=>n});var r=i(43697),s=i(52011);let o=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,s.j)("esri.core.Identifiable")],t),t};let l=class extends(n(class{})){};l=(0,r._)([(0,s.j)("esri.core.Identifiable")],l)},16453:(e,t,i)=>{i.d(t,{R:()=>m,w:()=>_});var r=i(43697),s=i(15923),o=i(70586),n=i(41103),l=i(22974),a=i(31263);class d{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new d,i=this._originStores[a.s3.DEFAULTS];i&&i.forEach(((e,i)=>{t.set(i,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let i=a.s3.SERVICE;i<a.kk;i++){const r=this._originStores[i];r&&r.forEach(((r,s)=>{e&&e.has(s)||t.set(s,(0,l.d9)(r),i)}))}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=a.s3.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||(0,o.j0)(this._propertyOriginMap.get(e))<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=a.s3.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i&&i.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=i(50549),p=i(1153),h=i(52011);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,o.j0)((0,p.vw)(this)),i=t.store,r=new d;t.store=r,(0,n.M)(t,i,r)}read(e,t){(0,u.i)(this,e,t)}getAtOrigin(e,t){const i=y(this),r=(0,a.M9)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach((e=>{s[e]=i.get(e,r)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const i=y(this),r=(0,a.M9)(t),s=(0,p.vw)(this);let o;o="string"==typeof e?"*"===e?i.keys(r):[e]:e,o.forEach((e=>{s.invalidate(e),i.revert(e,r),s.commit(e)}))}};return t=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,p.vw)(e).store}let f=class extends(c(s.Z)){};f=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var b=i(76169);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e={},t){return(0,b.c)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,p.vw)(this).setAtOrigin(e,t,(0,a.M9)(i))}removeOrigin(e){const t=v(this),i=(0,a.M9)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),a.s3.USER)}updateOrigin(e,t){const i=v(this),r=(0,a.M9)(t),s=this.get(e);for(let t=r+1;t<a.kk;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,p.vw)(e).store}const m=e=>{let t=class extends(g(c(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],t),t};let _=class extends(m(s.Z)){};_=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],_)},70921:(e,t,i)=>{i.d(t,{R:()=>o,Z:()=>s});var r=i(46791);function s(e,t,i=r.Z){return t||(t=new i),t===e||(t.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?t.addMany(e):e&&t.add(e)),t;var s}function o(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var r=i(66643),s=i(46791),o=i(83379),n=i(70586);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)(0,n.Wi)(t)||(Array.isArray(t)?l(...t):s.Z.isCollection(t)?t.forEach((e=>l(e))):o.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,r.UI)(i,(async e=>{!1!==(await(0,r.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||a||(a=e)})),a)throw a.loadError;return e}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var r=i(43697),s=i(57435),o=i(68668),n=i(70586),l=i(16453),a=i(17445),d=i(5600),u=(i(67676),i(80442),i(1153)),p=(i(75215),i(52011)),h=i(30556),c=i(87085),y=i(71612),f=i(38009),b=i(16859),g=i(72965),v=i(46791),m=i(70921),_=i(92604),w=i(95330);function C(e,t,i){let r,s;if(e)for(let o=0,n=e.length;o<n;o++){if(r=e.getItemAt(o),r[t]===i)return r;if("group"===r?.type&&(s=C(r.layers,t,i),s))return s}}const I=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||_.Z.getLogger(this.declaredClass).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))}destroy(){const e=this.layers.removeAll();for(const t of e)this.layerRemoved(t),t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,m.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof c.Z){const r=e;r.parent===this?this.reorder(r,t):i.add(r,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):_.Z.getLogger(this.declaredClass).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;t=i.getNextIndex(t),e.slice().forEach((e=>{e.parent!==this?(i.add(e,t),t+=1):this.reorder(e,t)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,r._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,r._)([(0,p.j)("esri.support.LayersMixin")],t),t};function S(e,t,i){if(e)for(let r=0,s=e.length;r<s;r++){const s=e.getItemAt(r);if(s[t]===i)return s;if("group"===s?.type){const e=S(s.tables,t,i);if(e)return e}}}const O=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&_.Z.getLogger(this.declaredClass).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,m.Z)(e,this._get("tables")))}findTableById(e){return S(this.tables,"id",e)}findTableByUid(e){return S(this.tables,"uid",e)}};return(0,r._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,r._)([(0,p.j)("esri.support.TablesMixin")],t),t};var M=i(15650);let L=class extends((0,y.h)((0,g.M)((0,f.q)((0,b.I)(O(I((0,l.R)(c.Z)))))))){constructor(e){var t;super(e),this._visibilityHandles={},this.allLayers=new s.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}_writeLayers(e,t,i,r){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,M.Nw)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);(0,n.pC)(t)&&t.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e)),Promise.resolve(this)}loadAll(){return(0,o.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this._visibilityHandles[e.uid]=(0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_)}layerRemoved(e){const t=this._visibilityHandles[e.uid];t&&(t.remove(),delete this._visibilityHandles[e.uid]),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.vw)(this).initialized)return;const i=this.layers;let r=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!r&&(r=i.getItemAt(0),r.visible=!0),this._turnOffOtherLayers(r);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,r._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],L.prototype,"allLayers",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],L.prototype,"allTables",void 0),(0,r._)([(0,d.Cb)()],L.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],L.prototype,"layers",void 0),(0,r._)([(0,h.c)("layers")],L.prototype,"_writeLayers",null),(0,r._)([(0,d.Cb)({type:["GroupLayer"]})],L.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],L.prototype,"portalItem",null),(0,r._)([(0,d.Cb)()],L.prototype,"spatialReference",void 0),(0,r._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],L.prototype,"type",void 0),(0,r._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],L.prototype,"visibilityMode",null),L=(0,r._)([(0,p.j)("esri.layers.GroupLayer")],L);const E=L},87085:(e,t,i)=>{i.d(t,{Z:()=>m});var r=i(43697),s=(i(66577),i(3172)),o=i(20102),n=i(32448),l=i(10699),a=i(83379),d=i(92604),u=i(95330),p=i(17452),h=i(5600),c=(i(67676),i(80442),i(75215),i(52011)),y=i(68773),f=i(6570),b=i(82971);let g=0,v=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,b.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=b.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},r=await Promise.all([i.e(4547),i.e(8008)]).then(i.bind(i,28008));try{return await r.fromItem(t)}catch(e){const i=t&&t.portalItem,r=i&&i.id||"unset",s=i&&i.portal&&i.portal.url||y.Z.portalUrl;throw d.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||d.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,p.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.Cb)({type:f.Z})],v.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,h.Cb)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,h.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,h.Cb)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,h.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,h.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,h.Cb)({type:b.Z})],v.prototype,"spatialReference",void 0),(0,r._)([(0,h.Cb)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,h.Cb)()],v.prototype,"url",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,c.j)("esri.layers.Layer")],v);const m=v},16859:(e,t,i)=>{i.d(t,{I:()=>m});var r=i(43697),s=i(40330),o=i(3172),n=i(66643),l=i(20102),a=i(92604),d=i(70586),u=i(95330),p=i(17452),h=i(5600),c=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),f=i(30556),b=i(65587),g=i(15235),v=i(86082);const m=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||a.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=i,(0,d.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,l=b.Z.getDefault();if(l&&l.loaded&&(0,p.Fv)(l.restUrl)===(0,p.Fv)(r))return l.user;const a=`${r}/community/self`,u=(0,d.pC)(e)?e.signal:null,h=await(0,n.q6)((0,o.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return i&&r&&!(0,p.tm)(r.restUrl,i.restUrl)?(t.messages&&t.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(e,{...t,layer:this})}};return(0,r._)([(0,h.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,c.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},84230:(e,t,i)=>{function r(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function s(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}i.d(t,{rQ:()=>r,y2:()=>s})},15650:(e,t,i)=>{i.d(t,{Nw:()=>h});var r=i(20102),s=i(22974),o=i(70586),n=i(78286),l=i(827),a=i(84230);const d=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),u=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function p(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale))}function h(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new r.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?d:"operational-layers"===e.layerContainerType?u:null}(t);return!(0,o.pC)(i)||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return(0,o.pC)(t)&&function(e,t){if(function(e,t){if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),r=i&&i[0]&&i[0].layerDefinition;r&&p(e,r)}else"stream"===e.type?p(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&p(e,t)}(e,t),"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity),t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,s.d9)(t)),t}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9348,5787],{57435:(e,t,i)=>{i.d(t,{Z:()=>p});var r=i(43697),s=i(46791),o=i(3920),n=i(70586),l=(i(80442),i(20102),i(92604),i(26258),i(87538)),a=i(5600),d=(i(67676),i(75215),i(52011));let u=class extends((0,o.p)(s.Z)){constructor(e){super(e),this.getCollections=null}initialize(){this.handles.add((0,l.EH)((()=>this._refresh())))}destroy(){this.getCollections=null}_refresh(){const e=(0,n.pC)(this.getCollections)?this.getCollections():null;if((0,n.Wi)(e))return void this.removeAll();let t=0;for(const i of e)(0,n.pC)(i)&&(t=this._processCollection(t,i));this.splice(t,this.length)}_createNewInstance(e){return new s.Z(e)}_processCollection(e,t){if(!t)return e;const i=this.itemFilterFunction?this.itemFilterFunction:e=>!!e;for(const r of t)if(r){if(i(r)){const t=this.indexOf(r,e);t>=0?t!==e&&this.reorder(r,e):this.add(r,e),++e}if(this.getChildrenFunction){const t=this.getChildrenFunction(r);if(Array.isArray(t))for(const i of t)e=this._processCollection(e,i);else e=this._processCollection(e,t)}}return e}};(0,r._)([(0,a.Cb)()],u.prototype,"getCollections",void 0),(0,r._)([(0,a.Cb)()],u.prototype,"getChildrenFunction",void 0),(0,r._)([(0,a.Cb)()],u.prototype,"itemFilterFunction",void 0),u=(0,r._)([(0,d.j)("esri.core.CollectionFlattener")],u);const p=u},10699:(e,t,i)=>{i.d(t,{IG:()=>n});var r=i(43697),s=i(52011);let o=0;const n=e=>{let t=class extends e{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return t=(0,r._)([(0,s.j)("esri.core.Identifiable")],t),t};let l=class extends(n(class{})){};l=(0,r._)([(0,s.j)("esri.core.Identifiable")],l)},16453:(e,t,i)=>{i.d(t,{R:()=>m,w:()=>_});var r=i(43697),s=i(15923),o=i(70586),n=i(41103),l=i(22974),a=i(31263);class d{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.kk),this._values=new Map,this.multipleOriginsSupported=!0}clone(e){const t=new d,i=this._originStores[a.s3.DEFAULTS];i&&i.forEach(((e,i)=>{t.set(i,(0,l.d9)(e),a.s3.DEFAULTS)}));for(let i=a.s3.SERVICE;i<a.kk;i++){const r=this._originStores[i];r&&r.forEach(((r,s)=>{e&&e.has(s)||t.set(s,(0,l.d9)(r),i)}))}return t}get(e,t){const i=void 0===t?this._values:this._originStores[t];return i?i.get(e):void 0}keys(e){const t=null==e?this._values:this._originStores[e];return t?[...t.keys()]:[]}set(e,t,i=a.s3.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(e,t),!this._values.has(e)||(0,o.j0)(this._propertyOriginMap.get(e))<=i){const r=this._values.get(e);return this._values.set(e,t),this._propertyOriginMap.set(e,i),r!==t}return!1}delete(e,t=a.s3.USER){const i=this._originStores[t];if(!i)return;const r=i.get(e);if(i.delete(e),this._values.has(e)&&this._propertyOriginMap.get(e)===t){this._values.delete(e);for(let i=t-1;i>=0;i--){const t=this._originStores[i];if(t&&t.has(e)){this._values.set(e,t.get(e)),this._propertyOriginMap.set(e,i);break}}}return r}has(e,t){const i=void 0===t?this._values:this._originStores[t];return!!i&&i.has(e)}revert(e,t){for(;t>0&&!this.has(e,t);)--t;const i=this._originStores[t],r=i&&i.get(e),s=this._values.get(e);return this._values.set(e,r),this._propertyOriginMap.set(e,t),s!==r}originOf(e){return this._propertyOriginMap.get(e)||a.s3.DEFAULTS}forEach(e){this._values.forEach(e)}}var u=i(50549),p=i(1153),h=i(52011);const c=e=>{let t=class extends e{constructor(...e){super(...e);const t=(0,o.j0)((0,p.vw)(this)),i=t.store,r=new d;t.store=r,(0,n.M)(t,i,r)}read(e,t){(0,u.i)(this,e,t)}getAtOrigin(e,t){const i=y(this),r=(0,a.M9)(t);if("string"==typeof e)return i.get(e,r);const s={};return e.forEach((e=>{s[e]=i.get(e,r)})),s}originOf(e){return(0,a.x3)(this.originIdOf(e))}originIdOf(e){return y(this).originOf(e)}revert(e,t){const i=y(this),r=(0,a.M9)(t),s=(0,p.vw)(this);let o;o="string"==typeof e?"*"===e?i.keys(r):[e]:e,o.forEach((e=>{s.invalidate(e),i.revert(e,r),s.commit(e)}))}};return t=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],t),t};function y(e){return(0,p.vw)(e).store}let f=class extends(c(s.Z)){};f=(0,r._)([(0,h.j)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var b=i(76169);const g=e=>{let t=class extends e{constructor(...e){super(...e)}clear(e,t="user"){return v(this).delete(e,(0,a.M9)(t))}write(e={},t){return(0,b.c)(this,e=e||{},t),e}setAtOrigin(e,t,i){(0,p.vw)(this).setAtOrigin(e,t,(0,a.M9)(i))}removeOrigin(e){const t=v(this),i=(0,a.M9)(e),r=t.keys(i);for(const e of r)t.originOf(e)===i&&t.set(e,t.get(e,i),a.s3.USER)}updateOrigin(e,t){const i=v(this),r=(0,a.M9)(t),s=this.get(e);for(let t=r+1;t<a.kk;++t)i.delete(e,t);i.set(e,s,r)}toJSON(e){return this.write({},e)}};return t=(0,r._)([(0,h.j)("esri.core.WriteableMultiOriginJSONSupport")],t),t.prototype.toJSON.isDefaultToJSON=!0,t};function v(e){return(0,p.vw)(e).store}const m=e=>{let t=class extends(g(c(e))){constructor(...e){super(...e)}};return t=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],t),t};let _=class extends(m(s.Z)){};_=(0,r._)([(0,h.j)("esri.core.MultiOriginJSONSupport")],_)},70921:(e,t,i)=>{i.d(t,{R:()=>o,Z:()=>s});var r=i(46791);function s(e,t,i=r.Z){return t||(t=new i),t===e||(t.removeAll(),(s=e)&&(Array.isArray(s)||"items"in s&&Array.isArray(s.items))?t.addMany(e):e&&t.add(e)),t;var s}function o(e){return e}},68668:(e,t,i)=>{i.d(t,{G:()=>l,w:()=>a});var r=i(66643),s=i(46791),o=i(83379),n=i(70586);async function l(e,t){return await e.load(),a(e,t)}async function a(e,t){const i=[],l=(...e)=>{for(const t of e)(0,n.Wi)(t)||(Array.isArray(t)?l(...t):s.Z.isCollection(t)?t.forEach((e=>l(e))):o.Z.isLoadable(t)&&i.push(t))};t(l);let a=null;if(await(0,r.UI)(i,(async e=>{!1!==(await(0,r.q6)(function(e){return"loadAll"in e&&"function"==typeof e.loadAll}(e)?e.loadAll():e.load())).ok||a||(a=e)})),a)throw a.loadError;return e}},89348:(e,t,i)=>{i.r(t),i.d(t,{default:()=>E});var r=i(43697),s=i(57435),o=i(68668),n=i(70586),l=i(16453),a=i(17445),d=i(5600),u=(i(67676),i(80442),i(1153)),p=(i(75215),i(52011)),h=i(30556),c=i(87085),y=i(71612),f=i(38009),b=i(16859),g=i(72965),v=i(46791),m=i(70921),_=i(92604),w=i(95330);function C(e,t,i){let r,s;if(e)for(let o=0,n=e.length;o<n;o++){if(r=e.getItemAt(o),r[t]===i)return r;if("group"===r?.type&&(s=C(r.layers,t,i),s))return s}}const I=e=>{let t=class extends e{constructor(...e){super(...e),this.layers=new v.Z;const t=e=>{e.parent=this,this.layerAdded(e),"elevation"!==e.type&&"base-elevation"!==e.type||_.Z.getLogger(this.declaredClass).error(`Layer 'title:${e.title}, id:${e.id}' of type '${e.type}' is not supported as an operational layer and will therefore be ignored.`)},i=e=>{e.parent=null,this.layerRemoved(e)};this.layers.on("before-add",(e=>(e=>{e.parent&&"remove"in e.parent&&e.parent.remove(e)})(e.item))),this.layers.on("after-add",(e=>t(e.item))),this.layers.on("after-remove",(e=>i(e.item)))}destroy(){const e=this.layers.removeAll();for(const t of e)this.layerRemoved(t),t.destroy();this.layers.destroy()}set layers(e){this._set("layers",(0,m.Z)(e,this._get("layers")))}add(e,t){const i=this.layers;if(t=i.getNextIndex(t),e instanceof c.Z){const r=e;r.parent===this?this.reorder(r,t):i.add(r,t)}else(0,w.y8)(e)?e.then((e=>{this.destroyed||this.add(e,t)})):_.Z.getLogger(this.declaredClass).error("#add()","The item being added is not a Layer or a Promise that resolves to a Layer.")}addMany(e,t){const i=this.layers;t=i.getNextIndex(t),e.slice().forEach((e=>{e.parent!==this?(i.add(e,t),t+=1):this.reorder(e,t)}))}findLayerById(e){return C(this.layers,"id",e)}findLayerByUid(e){return C(this.layers,"uid",e)}remove(e){return this.layers.remove(e)}removeMany(e){return this.layers.removeMany(e)}removeAll(){return this.layers.removeAll()}reorder(e,t){return this.layers.reorder(e,t)}layerAdded(e){}layerRemoved(e){}};return(0,r._)([(0,d.Cb)()],t.prototype,"layers",null),t=(0,r._)([(0,p.j)("esri.support.LayersMixin")],t),t};function S(e,t,i){if(e)for(let r=0,s=e.length;r<s;r++){const s=e.getItemAt(r);if(s[t]===i)return s;if("group"===s?.type){const e=S(s.tables,t,i);if(e)return e}}}const O=e=>{let t=class extends e{constructor(...e){super(...e),this.tables=new v.Z,this.tables.on("after-add",(e=>{const t=e.item;t.parent&&t.parent!==this&&"tables"in t.parent&&t.parent.tables.remove(t),t.parent=this,"feature"!==t.type&&_.Z.getLogger(this.declaredClass).error(`Layer 'title:${t.title}, id:${t.id}' of type '${t.type}' is not supported as a table and will therefore be ignored.`)})),this.tables.on("after-remove",(e=>{e.item.parent=null}))}destroy(){const e=this.tables.removeAll();for(const t of e)t.destroy();this.tables.destroy()}set tables(e){this._set("tables",(0,m.Z)(e,this._get("tables")))}findTableById(e){return S(this.tables,"id",e)}findTableByUid(e){return S(this.tables,"uid",e)}};return(0,r._)([(0,d.Cb)()],t.prototype,"tables",null),t=(0,r._)([(0,p.j)("esri.support.TablesMixin")],t),t};var M=i(20081);let L=class extends((0,y.h)((0,g.M)((0,f.q)((0,b.I)(O(I((0,l.R)(c.Z)))))))){constructor(e){var t;super(e),this._visibilityHandles={},this.allLayers=new s.Z({getCollections:()=>[this.layers],getChildrenFunction:e=>"layers"in e?e.layers:null}),this.allTables=(t=this,new s.Z({getCollections:()=>[t.tables,t.layers],getChildrenFunction:e=>{const t=[];return"tables"in e&&t.push(e.tables),"layers"in e&&t.push(e.layers),t},itemFilterFunction:e=>{const t=e.parent;return t&&"tables"in t&&t.tables.includes(e)}})),this.fullExtent=void 0,this.operationalLayerType="GroupLayer",this.spatialReference=void 0,this.type="group"}initialize(){this._enforceVisibility(this.visibilityMode,this.visible),this.addHandles((0,a.YP)((()=>this.visible),this._onVisibilityChange.bind(this),a.Z_))}_writeLayers(e,t,i,r){const s=[];if(!e)return s;e.forEach((e=>{const t=(0,M.Nw)(e,r.webmap?r.webmap.getLayerJSONFromResourceInfo(e):null,r);(0,n.pC)(t)&&t.layerType&&s.push(t)})),t.layers=s}set portalItem(e){this._set("portalItem",e)}set visibilityMode(e){const t=this._get("visibilityMode")!==e;this._set("visibilityMode",e),t&&this._enforceVisibility(e,this.visible)}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e)),Promise.resolve(this)}loadAll(){return(0,o.G)(this,(e=>{e(this.layers,this.tables)}))}layerAdded(e){e.visible&&"exclusive"===this.visibilityMode?this._turnOffOtherLayers(e):"inherited"===this.visibilityMode&&(e.visible=this.visible),this._visibilityHandles[e.uid]=(0,a.YP)((()=>e.visible),(t=>this._onChildVisibilityChange(e,t)),a.Z_)}layerRemoved(e){const t=this._visibilityHandles[e.uid];t&&(t.remove(),delete this._visibilityHandles[e.uid]),this._enforceVisibility(this.visibilityMode,this.visible)}_turnOffOtherLayers(e){this.layers.forEach((t=>{t!==e&&(t.visible=!1)}))}_enforceVisibility(e,t){if(!(0,u.vw)(this).initialized)return;const i=this.layers;let r=i.find((e=>e.visible));switch(e){case"exclusive":i.length&&!r&&(r=i.getItemAt(0),r.visible=!0),this._turnOffOtherLayers(r);break;case"inherited":i.forEach((e=>{e.visible=t}))}}_onVisibilityChange(e){"inherited"===this.visibilityMode&&this.layers.forEach((t=>{t.visible=e}))}_onChildVisibilityChange(e,t){switch(this.visibilityMode){case"exclusive":t?this._turnOffOtherLayers(e):this._isAnyLayerVisible()||(e.visible=!0);break;case"inherited":e.visible=this.visible}}_isAnyLayerVisible(){return this.layers.some((e=>e.visible))}};(0,r._)([(0,d.Cb)({readOnly:!0,dependsOn:[]})],L.prototype,"allLayers",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],L.prototype,"allTables",void 0),(0,r._)([(0,d.Cb)()],L.prototype,"fullExtent",void 0),(0,r._)([(0,d.Cb)({json:{read:!1,write:{ignoreOrigin:!0}}})],L.prototype,"layers",void 0),(0,r._)([(0,h.c)("layers")],L.prototype,"_writeLayers",null),(0,r._)([(0,d.Cb)({type:["GroupLayer"]})],L.prototype,"operationalLayerType",void 0),(0,r._)([(0,d.Cb)({json:{origins:{"web-document":{read:!1,write:!1}}}})],L.prototype,"portalItem",null),(0,r._)([(0,d.Cb)()],L.prototype,"spatialReference",void 0),(0,r._)([(0,d.Cb)({json:{read:!1},readOnly:!0,value:"group"})],L.prototype,"type",void 0),(0,r._)([(0,d.Cb)({type:["independent","inherited","exclusive"],value:"independent",json:{write:!0,origins:{"web-map":{read:!1,write:!1}}}})],L.prototype,"visibilityMode",null),L=(0,r._)([(0,p.j)("esri.layers.GroupLayer")],L);const E=L},87085:(e,t,i)=>{i.d(t,{Z:()=>m});var r=i(43697),s=(i(66577),i(3172)),o=i(20102),n=i(32448),l=i(10699),a=i(83379),d=i(92604),u=i(95330),p=i(17452),h=i(5600),c=(i(67676),i(80442),i(75215),i(52011)),y=i(68773),f=i(6570),b=i(82971);let g=0,v=class extends(n.Z.EventedMixin((0,l.IG)(a.Z))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.Z(-180,-90,180,90,b.Z.WGS84),this.id=Date.now().toString(16)+"-layer-"+g++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=b.Z.WGS84,this.title=null,this.type=null,this.url=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await i.e(3529).then(i.bind(i,63529))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},r=await Promise.all([i.e(4547),i.e(8008)]).then(i.bind(i,28008));try{return await r.fromItem(t)}catch(e){const i=t&&t.portalItem,r=i&&i.id||"unset",s=i&&i.portal&&i.portal.url||y.Z.portalUrl;throw d.Z.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+s+"', id: '"+r+"')",e),e}}(e)}initialize(){this.when().catch((e=>{(0,u.D_)(e)||d.Z.getLogger(this.declaredClass).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})}))}destroy(){if(this.parent){const e=this,t=this.parent;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"baseLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e)}}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){const e=this.url;return e?(0,p.mN)(e):null}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,s.default)(e,{query:{f:"json"},responseType:"json"})).data;throw new o.Z("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.Cb)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.Cb)({type:f.Z})],v.prototype,"fullExtent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,r._)([(0,h.Cb)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,r._)([(0,h.Cb)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,r._)([(0,h.Cb)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,r._)([(0,h.Cb)({clonable:!1})],v.prototype,"parent",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,r._)([(0,h.Cb)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,r._)([(0,h.Cb)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,r._)([(0,h.Cb)({type:b.Z})],v.prototype,"spatialReference",void 0),(0,r._)([(0,h.Cb)({type:String})],v.prototype,"title",void 0),(0,r._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,r._)([(0,h.Cb)()],v.prototype,"url",void 0),(0,r._)([(0,h.Cb)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,r._)([(0,c.j)("esri.layers.Layer")],v);const m=v},16859:(e,t,i)=>{i.d(t,{I:()=>m});var r=i(43697),s=i(40330),o=i(3172),n=i(66643),l=i(20102),a=i(92604),d=i(70586),u=i(95330),p=i(17452),h=i(5600),c=(i(67676),i(80442),i(75215),i(71715)),y=i(52011),f=i(30556),b=i(65587),g=i(15235),v=i(86082);const m=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,u.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,u.D_)(e)||a.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,u.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=_.credential===t?_.user:await this._fetchEditingUser(e);return _.credential=t,_.user=i,(0,d.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,l=b.Z.getDefault();if(l&&l.loaded&&(0,p.Fv)(l.restUrl)===(0,p.Fv)(r))return l.user;const a=`${r}/community/self`,u=(0,d.pC)(e)?e.signal:null,h=await(0,n.q6)((0,o.default)(a,{authMode:"no-prompt",query:{f:"json"},signal:u}));return h.ok?v.default.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return i&&r&&!(0,p.tm)(r.restUrl,i.restUrl)?(t.messages&&t.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(e,{...t,layer:this})}};return(0,r._)([(0,h.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,c.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,h.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,h.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},_={credential:null,user:null}},84230:(e,t,i)=>{function r(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function s(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}i.d(t,{rQ:()=>r,y2:()=>s})},20081:(e,t,i)=>{i.d(t,{Nw:()=>h});var r=i(20102),s=i(22974),o=i(70586),n=i(78286),l=i(827),a=i(84230);const d=new Set(["bing-maps","imagery","imagery-tile","map-image","open-street-map","tile","unknown","unsupported","vector-tile","web-tile","wms","wmts"]),u=new Set(["csv","feature","geo-rss","geojson","group","imagery","imagery-tile","kml","map-image","map-notes","ogc-feature","route","tile","unknown","unsupported","vector-tile","web-tile","wfs","wms","wmts"]);function p(e,t){"maxScale"in e&&(t.maxScale=(0,l.k)(e.maxScale)),"minScale"in e&&(t.minScale=(0,l.k)(e.minScale))}function h(e,t,i){if(!("write"in e)||!e.write)return i&&i.messages&&i.messages.push(new r.Z("layer:unsupported",`Layers (${e.title}, ${e.id}) of type '${e.declaredClass}' cannot be persisted`,{layer:e})),null;if(function(e,t){if(t.restrictedWebMapWriting){const i=function(e){return"basemap"===e.layerContainerType?d:"operational-layers"===e.layerContainerType?u:null}(t);return!(0,o.pC)(i)||i.has(e.type)&&!(0,a.rQ)(e)}return!0}(e,i)){const t={};return e.write(t,i)?t:null}return(0,o.pC)(t)&&function(e,t){if(function(e,t){if((0,a.rQ)(e)){const i=(0,n.hS)("featureCollection.layers",t),r=i&&i[0]&&i[0].layerDefinition;r&&p(e,r)}else"stream"===e.type?p(e,t.layerDefinition=t.layerDefinition||{}):"group"!==e.type&&p(e,t)}(e,t),"blendMode"in e&&(t.blendMode=e.blendMode,"normal"===t.blendMode&&delete t.blendMode),t.opacity=(0,l.k)(e.opacity),t.title=e.title||"Layer",t.visibility=e.visible,"legendEnabled"in e&&"wmts"!==e.type)if((0,a.rQ)(e)){const i=t.featureCollection;i&&(i.showLegend=e.legendEnabled)}else t.showLegend=e.legendEnabled}(e,t=(0,s.d9)(t)),t}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2133],{93860:(e,t,r)=>{function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[c],u+=o,c+=a},makeDense:n},Symbol.toStringTag,{value:"Module"}))},10816:(e,t,r)=>{r.d(t,{f:()=>a,n:()=>s});var n=r(79583);function o(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[c],n[u+1]=s[c+1],u+=o,c+=a}function s(e,t,r){const s=e.typedBuffer,a=e.typedBufferStride,i=t.typedBuffer,u=t.typedBufferStride,c=r?r.count:t.count;let d=(r&&r.dstIndex?r.dstIndex:0)*a,f=(r&&r.srcIndex?r.srcIndex:0)*u;if((0,n.U)(t.elementType)){const e=(0,n.Op)(t.elementType);if((0,n.B3)(t.elementType))for(let t=0;t<c;++t)s[d]=Math.max(i[f]/e,-1),s[d+1]=Math.max(i[f+1]/e,-1),d+=a,f+=u;else for(let t=0;t<c;++t)s[d]=i[f]/e,s[d+1]=i[f+1]/e,d+=a,f+=u}else o(e,t,r);return e}function a(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,a=n?.count??e.count;let i=(n?.dstIndex??0)*s;for(let e=0;e<a;++e)o[i]=t,o[i+1]=r,i+=s}Object.freeze(Object.defineProperty({__proto__:null,copy:o,normalizeIntegerBuffer:s,fill:a},Symbol.toStringTag,{value:"Module"}))},11077:(e,t,r)=>{r.d(t,{a:()=>i,n:()=>s,s:()=>a,t:()=>o});var n=r(72220);function o(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");const o=e.count,s=r[0],a=r[1],i=r[2],u=r[3],c=r[4],d=r[5],f=r[6],l=r[7],p=r[8],h=e.typedBuffer,m=e.typedBufferStride,y=t.typedBuffer,_=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*m,r=e*_,n=y[r],o=y[r+1],b=y[r+2],T=y[r+3];h[t]=s*n+u*o+f*b,h[t+1]=a*n+c*o+l*b,h[t+2]=i*n+d*o+p*b,h[t+3]=T}}function s(e,t){const r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*o,r=e*a,i=s[r],u=s[r+1],c=s[r+2],d=i*i+u*u+c*c;if(d>0){const e=1/Math.sqrt(d);n[t]=e*i,n[t+1]=e*u,n[t+2]=e*c}}}function a(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*s,n=e*i;o[t]=r*a[n],o[t+1]=r*a[n+1],o[t+2]=r*a[n+2],o[t+3]=r*a[n+3]}}function i(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*s,n=e*i;o[t]=a[n]>>r,o[t+1]=a[n+1]>>r,o[t+2]=a[n+2]>>r,o[t+3]=a[n+3]>>r}}Object.freeze(Object.defineProperty({__proto__:null,transformMat4:function(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");const o=e.count,s=r[0],a=r[1],i=r[2],u=r[3],c=r[4],d=r[5],f=r[6],l=r[7],p=r[8],h=r[9],m=r[10],y=r[11],_=r[12],b=r[13],T=r[14],x=r[15],w=e.typedBuffer,g=e.typedBufferStride,S=t.typedBuffer,I=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*g,r=e*I,n=S[r],o=S[r+1],A=S[r+2],O=S[r+3];w[t]=s*n+c*o+p*A+_*O,w[t+1]=a*n+d*o+h*A+b*O,w[t+2]=i*n+f*o+m*A+T*O,w[t+3]=u*n+l*o+y*A+x*O}},transformMat3:o,normalize:s,scale:a,shiftRight:i},Symbol.toStringTag,{value:"Module"}))},75488:(e,t,r)=>{function n(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[c],n[u+1]=s[c+1],n[u+2]=s[c+2],n[u+3]=s[c+3],u+=o,c+=a}function o(e,t,r,n,o,s){const a=e.typedBuffer,i=e.typedBufferStride,u=s?.count??e.count;let c=(s?.dstIndex??0)*i;for(let e=0;e<u;++e)a[c]=t,a[c+1]=r,a[c+2]=n,a[c+3]=o,c+=i}r.d(t,{c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,fill:o},Symbol.toStringTag,{value:"Module"}))},23670:(e,t,r)=>{r.d(t,{G:()=>o});var n=r(20102);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){const[r,s]=e.split("."),a=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!s||!s.match||!s.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const i=parseInt(r,10),u=parseInt(s,10);return new o(i,u,t)}}},8323:(e,t,r)=>{r.d(t,{gS:()=>o});var n=r(79583);function o(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,n.n1)(e.ElementType)))}Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e){for(let e=0;e<9;++e)n[u+e]=s[c+e];u+=o,c+=a}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e){for(let e=0;e<16;++e)n[u+e]=s[c+e];u+=o,c+=a}}},Symbol.toStringTag,{value:"Module"})),r(93860),r(10816),r(56067),r(75488)},40270:(e,t,r)=>{r.d(t,{C:()=>c});var n=r(3172),o=r(66643),s=r(20102),a=r(70586),i=r(95330),u=r(17452);class c{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,u.HK)(e)?((0,i.k_)(t),(0,u.AH)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if((0,a.Wi)(this._streamDataRequester))return(await(0,n.default)(t,{responseType:d[e]})).data;const u=await(0,o.q6)(this._streamDataRequester.request(t,e,r));if(!0===u.ok)return u.value;throw(0,i.r9)(u.error),new s.Z("",`Request for resource failed: ${u.error}`)}}const d={image:"image",binary:"array-buffer",json:"json"}},91911:(e,t,r)=>{r.d(t,{DA:()=>a,jX:()=>i,nh:()=>s});var n=r(1533),o=r(17753);function s(e,t=o.p){return"number"==typeof e?t(e):(0,n.Uc)(e)||(0,n.lq)(e)?new Uint32Array(e):e}function a(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)if(o%2==0){const r=e[o],s=e[o+1],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}else{const r=e[o+1],s=e[o],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}}return n}function i(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}{const t=e[0];let o=e[1],s=0;for(let a=0;a<r;++a){const r=e[a+2];n[s++]=t,n[s++]=o,n[s++]=r,o=r}return n}}},88246:(e,t,r)=>{r.d(t,{z:()=>F});var n,o,s=r(70586),a=r(13598),i=r(20102),u=r(92604),c=r(35371),d=r(30175),f=r(17452),l=r(23670),p=r(52138),h=r(51305),m=r(94961),y=r(56481),_=r(93860);class b{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(n||(n={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={}));var T=r(74085);const x={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},w={pbrMetallicRoughness:x,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},g={ESRI_externalColorMixMode:"tint"},S=(e={})=>{const t={...x,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,T.Bg)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...g,...e.extras});return{...w,...e,pbrMetallicRoughness:t,extras:r}},I={magFilter:c.cw.LINEAR,minFilter:c.cw.LINEAR_MIPMAP_LINEAR,wrapS:c.e8.REPEAT,wrapT:c.e8.REPEAT},A=e=>({...I,...e}),O=1179937895;class E{constructor(e,t,r,n,o){this._context=e,this._errorContext=t,this.uri=r,this.json=n,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,n,o)=>(t=n||"",r=o||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),t.errorUnsupportedIf(null==n.scenes,"Scenes must be defined."),t.errorUnsupportedIf(null==n.meshes,"Meshes must be defined"),t.errorUnsupportedIf(null==n.nodes,"Nodes must be defined."),this._computeNodeParents()}static async load(e,t,r,n){if((0,f.HK)(r)){const n=(0,f.sJ)(r);if(n&&"model/gltf-binary"!==n.mediaType)try{const o=JSON.parse(n.isBase64?atob(n.data):n.data);return new E(e,t,r,o)}catch{}const o=(0,f.AH)(r);if(E._isGLBData(o))return this._fromGLBData(e,t,r,o)}if(r.endsWith(".gltf")){const o=await e.loadJSON(r,n);return new E(e,t,r,o)}const o=await e.loadBinary(r,n);if(E._isGLBData(o))return this._fromGLBData(e,t,r,o);const s=await e.loadJSON(r,n);return new E(e,t,r,s)}static _isGLBData(e){if(null==e)return!1;const t=new b(e);return t.remainingBytes()>=4&&t.readUint32()===O}static async _fromGLBData(e,t,r,n){const o=await E._parseGLBData(t,n);return new E(e,t,r,o.json,o.binaryData)}static async _parseGLBData(e,t){const r=new b(t);e.assert(r.remainingBytes()>=12,"GLB binary data is insufficiently large.");const n=r.readUint32(),o=r.readUint32(),s=r.readUint32();e.assert(n===O,"Magic first 4 bytes do not fit to expected GLB value."),e.assert(t.byteLength>=s,"GLB binary data is smaller than header specifies."),e.errorUnsupportedIf(2!==o,"An unsupported GLB container version was detected. Only version 2 is supported.");let a,i,u=0;for(;r.remainingBytes()>=8;){const t=r.readUint32(),n=r.readUint32();0===u?(e.assert(1313821514===n,"First GLB chunk must be JSON."),e.assert(t>=0,"No JSON data found."),a=await B(r.readUint8Array(t))):1===u?(e.errorUnsupportedIf(5130562!==n,"Second GLB chunk expected to be BIN."),i=r.readUint8Array(t)):e.warnUnsupported("More than 2 GLB chunks detected. Skipping."),u+=1}return a||e.error("No GLB JSON chunk detected."),{json:a,binaryData:i}}async getBuffer(e,t){const r=this.json.buffers[e],n=this._errorContext;if(null==r.uri)return n.assert(null!=this._glbBuffer,"GLB buffer not present"),this._glbBuffer;const o=await this._getBufferLoader(e,t);return n.assert(o.byteLength===r.byteLength,"Buffer byte lengths should match."),o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const n=this.json.buffers[e].uri,o=this._context.loadBinary(this._resolveUri(n),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,o),o}async getAccessor(e,t){const r=this._errorContext;r.errorUnsupportedIf(!this.json.accessors,"Accessors missing.");const o=this.json.accessors[e];r.errorUnsupportedIf(null==o?.bufferView,"Some accessor does not specify a bufferView."),r.errorUnsupportedIf(o.type in[n.MAT2,n.MAT3,n.MAT4],`AttributeType ${o.type} is not supported`);const s=this.json.bufferViews[o.bufferView],a=await this.getBuffer(s.buffer,t),i=C[o.type],u=v[o.componentType],c=i*u,d=s.byteStride||c;return{raw:a.buffer,byteStride:d,byteOffset:a.byteOffset+(s.byteOffset||0)+(o.byteOffset||0),entryCount:o.count,isDenselyPacked:d===c,componentCount:i,componentByteSize:u,componentType:o.componentType,min:o.min,max:o.max,normalized:!!o.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case c.g.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case c.g.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case c.g.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case c.g.UNSIGNED_BYTE:return(0,_.m)(this._wrapAccessor(y.D_,r));case c.g.UNSIGNED_SHORT:return(0,_.m)(this._wrapAccessor(y.av,r));case c.g.UNSIGNED_INT:return(0,_.m)(this._wrapAccessor(y.Nu,r))}}async getPositionData(e,t){const r=this._errorContext;r.errorUnsupportedIf(null==e.attributes.POSITION,"No POSITION vertex data found.");const n=await this.getAccessor(e.attributes.POSITION,t);return r.errorUnsupportedIf(n.componentType!==c.g.FLOAT,"Expected type FLOAT for POSITION vertex attribute, but found "+M[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"POSITION vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(y.ct,n)}async getNormalData(e,t){const r=this._errorContext;r.assert(null!=e.attributes.NORMAL,"No NORMAL vertex data found.");const n=await this.getAccessor(e.attributes.NORMAL,t);return r.errorUnsupportedIf(n.componentType!==c.g.FLOAT,"Expected type FLOAT for NORMAL vertex attribute, but found "+M[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"NORMAL vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(y.ct,n)}async getTangentData(e,t){const r=this._errorContext;r.assert(null!=e.attributes.TANGENT,"No TANGENT vertex data found.");const n=await this.getAccessor(e.attributes.TANGENT,t);return r.errorUnsupportedIf(n.componentType!==c.g.FLOAT,"Expected type FLOAT for TANGENT vertex attribute, but found "+M[n.componentType]),r.errorUnsupportedIf(4!==n.componentCount,"TANGENT vertex attribute must have 4 components, but found "+n.componentCount.toFixed()),new y.ek(n.raw,n.byteOffset,n.byteStride,n.byteOffset+n.byteStride*n.entryCount)}async getTextureCoordinates(e,t){const r=this._errorContext;r.assert(null!=e.attributes.TEXCOORD_0,"No TEXCOORD_0 vertex data found.");const n=await this.getAccessor(e.attributes.TEXCOORD_0,t);return r.errorUnsupportedIf(2!==n.componentCount,"TEXCOORD_0 vertex attribute must have 2 components, but found "+n.componentCount.toFixed()),n.componentType===c.g.FLOAT?this._wrapAccessor(y.Eu,n):(r.errorUnsupportedIf(!n.normalized,"Integer component types are only supported for a normalized accessor for TEXCOORD_0."),function(e){switch(e.componentType){case c.g.BYTE:return new y.Vs(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.UNSIGNED_BYTE:return new y.xA(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.SHORT:return new y.or(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.UNSIGNED_SHORT:return new y.TS(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.UNSIGNED_INT:return new y.qt(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.FLOAT:return new y.Eu(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(n))}async getVertexColors(e,t){const r=this._errorContext;r.assert(null!=e.attributes.COLOR_0,"No COLOR_0 vertex data found.");const n=await this.getAccessor(e.attributes.COLOR_0,t);if(r.errorUnsupportedIf(4!==n.componentCount&&3!==n.componentCount,"COLOR_0 attribute must have 3 or 4 components, but found "+n.componentCount.toFixed()),4===n.componentCount){if(n.componentType===c.g.FLOAT)return this._wrapAccessor(y.ek,n);if(n.componentType===c.g.UNSIGNED_BYTE)return this._wrapAccessor(y.mc,n);if(n.componentType===c.g.UNSIGNED_SHORT)return this._wrapAccessor(y.v6,n)}else if(3===n.componentCount){if(n.componentType===c.g.FLOAT)return this._wrapAccessor(y.ct,n);if(n.componentType===c.g.UNSIGNED_BYTE)return this._wrapAccessor(y.ne,n);if(n.componentType===c.g.UNSIGNED_SHORT)return this._wrapAccessor(y.mw,n)}r.errorUnsupported("Unsupported component type for COLOR_0 attribute: "+M[n.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=e.material?this._materialCache.get(e.material):void 0;if(!n){const o=null!=e.material?S(this.json.materials[e.material]):S(),s=o.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(o.normalTexture,t),c=r?this.getTexture(o.occlusionTexture,t):void 0,d=r?this.getTexture(o.emissiveTexture,t):void 0,f=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,l=null!=e.material?e.material:-1;n={alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,color:s.baseColorFactor,doubleSided:!!o.doubleSided,colorTexture:await i,normalTexture:await u,name:o.name,id:l,occlusionTexture:await c,emissiveTexture:await d,emissiveFactor:o.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await f,hasVertexColors:a,ESRI_externalColorMixMode:o.extras.ESRI_externalColorMixMode}}return n}async getTexture(e,t){if(!e)return;this._errorContext.errorUnsupportedIf(0!==(e.texCoord||0),"Only TEXCOORD with index 0 is supported.");const r=e.index,n=this._errorContext,o=this.json.textures[r],s=A(null!=o.sampler?this.json.samplers[o.sampler]:{});n.errorUnsupportedIf(null==o.source,"Source is expected to be defined for a texture.");const a=this.json.images[o.source],i=await this._loadTextureImageData(r,o,t);return(0,d.s1)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>(n.error(`Unexpected TextureSampler WrapMode: ${e}. Using default REPEAT(10497).`),10497);return{data:i,wrapS:e(s.wrapS)?s.wrapS:t(s.wrapS),wrapT:e(s.wrapT)?s.wrapT:t(s.wrapT),minFilter:s.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return U;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,p.m)((0,a.c)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,a.b)(r),n.translation&&(0,p.h)(t,t,n.translation),n.rotation&&(R[3]=(0,h.g)(R,n.rotation),(0,p.e)(t,t,R[3],R)),n.scale&&(0,p.l)(t,t,n.scale)):t=r,this._nodeTransformCache.set(e,t)}return t}_wrapAccessor(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}_resolveUri(e){return(0,f.hF)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=l.G.parse(this.json.asset.version,"glTF");N.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json,t=this._errorContext;e.extensionsRequired&&0!==e.extensionsRequired.length&&t.errorUnsupported("gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const n=this._textureLoaders.get(e);if(n)return n;const o=this._createTextureLoader(t,r);return this._textureLoaders.set(e,o),o}async _createTextureLoader(e,t){const r=this.json.images[e.source];if(r.uri)return this._context.loadImage(this._resolveUri(r.uri),t);const n=this._errorContext;n.errorUnsupportedIf(null==r.bufferView,"Image bufferView must be defined."),n.errorUnsupportedIf(null==r.mimeType,"Image mimeType must be defined.");const o=this.json.bufferViews[r.bufferView],s=await this.getBuffer(o.buffer,t);return n.errorUnsupportedIf(null!=o.byteStride,"byteStride not supported for image buffer"),async function(e,t){return new Promise(((r,n)=>{const o=new Blob([e],{type:t}),s=URL.createObjectURL(o),a=new Image;a.addEventListener("load",(()=>{URL.revokeObjectURL(s),"decode"in a?a.decode().then((()=>r(a)),(()=>r(a))):r(a)})),a.addEventListener("error",(e=>{URL.revokeObjectURL(s),n(e)})),a.src=s}))}(new Uint8Array(s.buffer,s.byteOffset+(o.byteOffset||0),o.byteLength),r.mimeType)}}const N=new l.G(2,0,"glTF"),U=(0,p.w)((0,a.c)(),Math.PI/2),R=(0,m.a)(),C={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},v={[c.g.BYTE]:1,[c.g.UNSIGNED_BYTE]:1,[c.g.SHORT]:2,[c.g.UNSIGNED_SHORT]:2,[c.g.FLOAT]:4,[c.g.UNSIGNED_INT]:4};async function B(e){return new Promise(((t,r)=>{const n=new Blob([e]),o=new FileReader;o.onload=()=>{const e=o.result;t(JSON.parse(e))},o.onerror=e=>{r(e)},o.readAsText(n)}))}const M={5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5125:"UNSIGNED_INT",5126:"FLOAT"};let L=0;async function F(e,t,r={},n=!0){const o=await E.load(e,k,t,r),i="gltf_"+L++,u={lods:[],materials:new Map,textures:new Map,meta:D(o)},d=!(!o.json.asset.extras||"symbolResource"!==o.json.asset.extras.ESRI_type),f=new Map;await j(o,(async(e,t,d,l)=>{const p=f.get(d)??0;f.set(d,p+1);const h=void 0!==e.mode?e.mode:c.MX.TRIANGLES,m=h===c.MX.TRIANGLES||h===c.MX.TRIANGLE_STRIP||h===c.MX.TRIANGLE_FAN?h:null;if((0,s.Wi)(m))return void k.warnUnsupported("Unsupported primitive mode ("+z[h]+"). Skipping primitive.");if(!o.hasPositions(e))return void k.warn("Skipping primitive without POSITION vertex attribute.");const y=o.getPositionData(e,r),_=o.getMaterial(e,r,n),b=o.hasNormals(e)?o.getNormalData(e,r):null,T=o.hasTangents(e)?o.getTangentData(e,r):null,x=o.hasTextureCoordinates(e)?o.getTextureCoordinates(e,r):null,w=o.hasVertexColors(e)?o.getVertexColors(e,r):null,g=o.getIndexData(e,r),S={transform:(0,a.b)(t),attributes:{position:await y,normal:b?await b:null,texCoord0:x?await x:null,color:w?await w:null,tangent:T?await T:null},indices:await g,primitiveType:m,material:P(u,await _,i)};let I=null;(0,s.pC)(u.meta)&&(0,s.pC)(u.meta.ESRI_lod)&&"screenSpaceRadius"===u.meta.ESRI_lod.metric&&(I=u.meta.ESRI_lod.thresholds[d]),u.lods[d]=u.lods[d]||{parts:[],name:l,lodThreshold:I},u.lods[d].parts[p]=S}));for(const e of u.lods)e.parts=e.parts.filter((e=>!!e));return{model:u,meta:{isEsriSymbolResource:d,uri:o.uri},customMeta:{}}}function D(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;(0,s.pC)(t)&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function j(e,t){const r=e.json,n=r.scenes[r.scene||0].nodes,o=n.length>1,s=[];for(const e of n){const t=r.nodes[e];s.push(a(e,0)),G(t)&&!o&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>a(e,t+1)))}async function a(n,o){const i=r.nodes[n],u=e.getNodeTransform(n);if(k.warnUnsupportedIf(null!=i.weights,"Morph targets are not supported."),null!=i.mesh){const e=r.meshes[i.mesh];for(const r of e.primitives)s.push(t(r,u,o,e.name))}for(const e of i.children||[])s.push(a(e,o))}await Promise.all(s)}function G(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function P(e,t,r){const n=t=>{const n=`${r}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:c.e8.REPEAT,t:c.e8.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:V.includes(t.minFilter),noUnpackFlip:!0});e.textures.set(n,r)}return n},o=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(o)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?n(t.colorTexture):void 0,textureNormal:t.normalTexture?n(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?n(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?n(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(o,r)}return o}const k=new class{error(e){throw new i.Z("gltf-loader-error",e)}errorUnsupported(e){throw new i.Z("gltf-loader-unsupported-feature",e)}errorUnsupportedIf(e,t){e&&this.errorUnsupported(t)}assert(e,t){e||this.error(t)}warn(e){u.Z.getLogger("esri.views.3d.glTF").warn(e)}warnUnsupported(e){this.warn("[Unsupported Feature] "+e)}warnUnsupportedIf(e,t){e&&this.warnUnsupported(t)}},V=[c.cw.LINEAR_MIPMAP_LINEAR,c.cw.LINEAR_MIPMAP_NEAREST],z=["POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN"]},17753:(e,t,r)=>{r.d(t,{NO:()=>y,cM:()=>m,p:()=>p,DX:()=>h});var n=r(17896),o=r(65617),s=r(22807),a=r(16996);function i(e,t,r){return(0,n.b)(u,t,e),(0,n.b)(c,r,e),(0,n.l)((0,n.f)(u,u,c))/2}r(12981),new s.x(a.Ue),new s.x((()=>{return e?{p0:(0,o.a)(e.p0),p1:(0,o.a)(e.p1),p2:(0,o.a)(e.p2)}:{p0:(0,o.c)(),p1:(0,o.c)(),p2:(0,o.c)()};var e}));const u=(0,o.c)(),c=(0,o.c)();let d=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const f=new Uint16Array([0]),l=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function p(e){if(1===e)return f;if(e<l.length)return new Uint16Array(l.buffer,0,e);if(e>d.length){const t=Math.max(2*d.length,e);d=new Uint32Array(t);for(let e=0;e<d.length;e++)d[e]=e}return new Uint32Array(d.buffer,0,e)}function h(e){if(1===e)return new Uint16Array(f);if(e<l.length)return new Uint16Array(l.slice(0,e));if(e>d.length){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}return new Uint32Array(d.slice(0,e))}function m(e,t,r){if(!e||!t)return!1;const{size:o,data:s}=e;(0,n.s)(r,0,0,0),(0,n.s)(x,0,0,0);let a=0,u=0;for(let e=0;e<t.length-2;e+=3){const c=t[e+0]*o,d=t[e+1]*o,f=t[e+2]*o;(0,n.s)(_,s[c+0],s[c+1],s[c+2]),(0,n.s)(b,s[d+0],s[d+1],s[d+2]),(0,n.s)(T,s[f+0],s[f+1],s[f+2]);const l=i(_,b,T);l?((0,n.a)(_,_,b),(0,n.a)(_,_,T),(0,n.g)(_,_,1/3*l),(0,n.a)(r,r,_),a+=l):((0,n.a)(x,x,_),(0,n.a)(x,x,b),(0,n.a)(x,x,T),u+=3)}return!(0===u&&0===a||(0!==a?((0,n.g)(r,r,1/a),0):0===u||((0,n.g)(r,x,1/u),0)))}function y(e,t,r){if(!e||!t)return!1;const{size:o,data:s}=e;(0,n.s)(r,0,0,0);let a=-1,i=0;for(let e=0;e<t.length;e++){const n=t[e]*o;a!==n&&(r[0]+=s[n+0],r[1]+=s[n+1],r[2]+=s[n+2],i++),a=n}return i>1&&(0,n.g)(r,r,1/i),i>0}const _=(0,o.c)(),b=(0,o.c)(),T=(0,o.c)(),x=(0,o.c)()},57758:(e,t,r)=>{r.d(t,{K:()=>n});const n=2.1}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2133],{93860:(e,t,r)=>{function n(e,t){const r=e.count;t||(t=new e.TypedArrayConstructor(r));for(let n=0;n<r;n++)t[n]=e.get(n);return t}r.d(t,{m:()=>n}),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[c],u+=o,c+=a},makeDense:n},Symbol.toStringTag,{value:"Module"}))},10816:(e,t,r)=>{r.d(t,{f:()=>a,n:()=>s});var n=r(79583);function o(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[c],n[u+1]=s[c+1],u+=o,c+=a}function s(e,t,r){const s=e.typedBuffer,a=e.typedBufferStride,i=t.typedBuffer,u=t.typedBufferStride,c=r?r.count:t.count;let f=(r&&r.dstIndex?r.dstIndex:0)*a,d=(r&&r.srcIndex?r.srcIndex:0)*u;if((0,n.U)(t.elementType)){const e=(0,n.Op)(t.elementType);if((0,n.B3)(t.elementType))for(let t=0;t<c;++t)s[f]=Math.max(i[d]/e,-1),s[f+1]=Math.max(i[d+1]/e,-1),f+=a,d+=u;else for(let t=0;t<c;++t)s[f]=i[d]/e,s[f+1]=i[d+1]/e,f+=a,d+=u}else o(e,t,r);return e}function a(e,t,r,n){const o=e.typedBuffer,s=e.typedBufferStride,a=n?.count??e.count;let i=(n?.dstIndex??0)*s;for(let e=0;e<a;++e)o[i]=t,o[i+1]=r,i+=s}Object.freeze(Object.defineProperty({__proto__:null,copy:o,normalizeIntegerBuffer:s,fill:a},Symbol.toStringTag,{value:"Module"}))},11077:(e,t,r)=>{r.d(t,{a:()=>i,n:()=>s,s:()=>a,t:()=>o});var n=r(72220);function o(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");const o=e.count,s=r[0],a=r[1],i=r[2],u=r[3],c=r[4],f=r[5],d=r[6],l=r[7],p=r[8],m=e.typedBuffer,h=e.typedBufferStride,y=t.typedBuffer,T=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*h,r=e*T,n=y[r],o=y[r+1],x=y[r+2],_=y[r+3];m[t]=s*n+u*o+d*x,m[t+1]=a*n+c*o+l*x,m[t+2]=i*n+f*o+p*x,m[t+3]=_}}function s(e,t){const r=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;for(let e=0;e<r;e++){const t=e*o,r=e*a,i=s[r],u=s[r+1],c=s[r+2],f=i*i+u*u+c*c;if(f>0){const e=1/Math.sqrt(f);n[t]=e*i,n[t+1]=e*u,n[t+2]=e*c}}}function a(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*s,n=e*i;o[t]=r*a[n],o[t+1]=r*a[n+1],o[t+2]=r*a[n+2],o[t+3]=r*a[n+3]}}function i(e,t,r){const n=Math.min(e.count,t.count),o=e.typedBuffer,s=e.typedBufferStride,a=t.typedBuffer,i=t.typedBufferStride;for(let e=0;e<n;e++){const t=e*s,n=e*i;o[t]=a[n]>>r,o[t+1]=a[n+1]>>r,o[t+2]=a[n+2]>>r,o[t+3]=a[n+3]>>r}}Object.freeze(Object.defineProperty({__proto__:null,transformMat4:function(e,t,r){if(e.count!==t.count)return void n.c.error("source and destination buffers need to have the same number of elements");const o=e.count,s=r[0],a=r[1],i=r[2],u=r[3],c=r[4],f=r[5],d=r[6],l=r[7],p=r[8],m=r[9],h=r[10],y=r[11],T=r[12],x=r[13],_=r[14],b=r[15],g=e.typedBuffer,w=e.typedBufferStride,S=t.typedBuffer,I=t.typedBufferStride;for(let e=0;e<o;e++){const t=e*w,r=e*I,n=S[r],o=S[r+1],A=S[r+2],O=S[r+3];g[t]=s*n+c*o+p*A+T*O,g[t+1]=a*n+f*o+m*A+x*O,g[t+2]=i*n+d*o+h*A+_*O,g[t+3]=u*n+l*o+y*A+b*O}},transformMat3:o,normalize:s,scale:a,shiftRight:i},Symbol.toStringTag,{value:"Module"}))},75488:(e,t,r)=>{function n(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e)n[u]=s[c],n[u+1]=s[c+1],n[u+2]=s[c+2],n[u+3]=s[c+3],u+=o,c+=a}function o(e,t,r,n,o,s){const a=e.typedBuffer,i=e.typedBufferStride,u=s?.count??e.count;let c=(s?.dstIndex??0)*i;for(let e=0;e<u;++e)a[c]=t,a[c+1]=r,a[c+2]=n,a[c+3]=o,c+=i}r.d(t,{c:()=>n,f:()=>o}),Object.freeze(Object.defineProperty({__proto__:null,copy:n,fill:o},Symbol.toStringTag,{value:"Module"}))},23670:(e,t,r)=>{r.d(t,{G:()=>o});var n=r(20102);class o{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}since(e,t){return!this.lessThan(e,t)}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new n.Z(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new o(this.major,this.minor,this._context)}static parse(e,t=""){const[r,s]=e.split("."),a=/^\s*\d+\s*$/;if(!r||!r.match||!r.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!s||!s.match||!s.match(a))throw new n.Z((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const i=parseInt(r,10),u=parseInt(s,10);return new o(i,u,t)}}},8323:(e,t,r)=>{r.d(t,{gS:()=>o});var n=r(79583);function o(e,t){return new e(new ArrayBuffer(t*e.ElementCount*(0,n.n1)(e.ElementType)))}Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e){for(let e=0;e<9;++e)n[u+e]=s[c+e];u+=o,c+=a}}},Symbol.toStringTag,{value:"Module"})),Object.freeze(Object.defineProperty({__proto__:null,copy:function(e,t,r){const n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride,i=r?r.count:t.count;let u=(r&&r.dstIndex?r.dstIndex:0)*o,c=(r&&r.srcIndex?r.srcIndex:0)*a;for(let e=0;e<i;++e){for(let e=0;e<16;++e)n[u+e]=s[c+e];u+=o,c+=a}}},Symbol.toStringTag,{value:"Module"})),r(93860),r(10816),r(56067),r(75488)},40270:(e,t,r)=>{r.d(t,{C:()=>c});var n=r(3172),o=r(66643),s=r(20102),a=r(70586),i=r(95330),u=r(17452);class c{constructor(e){this._streamDataRequester=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,u.HK)(e)?((0,i.k_)(t),(0,u.AH)(e)):this._load("binary",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){if((0,a.Wi)(this._streamDataRequester))return(await(0,n.default)(t,{responseType:f[e]})).data;const u=await(0,o.q6)(this._streamDataRequester.request(t,e,r));if(!0===u.ok)return u.value;throw(0,i.r9)(u.error),new s.Z("",`Request for resource failed: ${u.error}`)}}const f={image:"image",binary:"array-buffer",json:"json"}},91911:(e,t,r)=>{r.d(t,{DA:()=>a,jX:()=>i,nh:()=>s});var n=r(1533),o=r(17753);function s(e,t=o.p){return"number"==typeof e?t(e):(0,n.Uc)(e)||(0,n.lq)(e)?new Uint32Array(e):e}function a(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(n[e++]=t,n[e++]=t+1,n[e++]=t+2):(n[e++]=t+1,n[e++]=t,n[e++]=t+2)}else{let t=0;for(let o=0;o<r;o+=1)if(o%2==0){const r=e[o],s=e[o+1],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}else{const r=e[o+1],s=e[o],a=e[o+2];n[t++]=r,n[t++]=s,n[t++]=a}}return n}function i(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,n=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)n[e++]=0,n[e++]=t+1,n[e++]=t+2;return n}{const t=e[0];let o=e[1],s=0;for(let a=0;a<r;++a){const r=e[a+2];n[s++]=t,n[s++]=o,n[s++]=r,o=r}return n}}},88246:(e,t,r)=>{r.d(t,{z:()=>F});var n,o,s=r(70586),a=r(13598),i=r(20102),u=r(92604),c=r(35371),f=r(30175),d=r(17452),l=r(23670),p=r(52138),m=r(51305),h=r(94961),y=r(56481),T=r(93860);class x{constructor(e){this._data=e,this._offset4=0,this._dataUint32=new Uint32Array(this._data,0,Math.floor(this._data.byteLength/4))}readUint32(){const e=this._offset4;return this._offset4+=1,this._dataUint32[e]}readUint8Array(e){const t=4*this._offset4;return this._offset4+=e/4,new Uint8Array(this._data,t,e)}remainingBytes(){return this._data.byteLength-4*this._offset4}}!function(e){e.SCALAR="SCALAR",e.VEC2="VEC2",e.VEC3="VEC3",e.VEC4="VEC4",e.MAT2="MAT2",e.MAT3="MAT3",e.MAT4="MAT4"}(n||(n={})),function(e){e[e.ARRAY_BUFFER=34962]="ARRAY_BUFFER",e[e.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER"}(o||(o={}));var _=r(74085);const b={baseColorFactor:[1,1,1,1],metallicFactor:1,roughnessFactor:1},g={pbrMetallicRoughness:b,emissiveFactor:[0,0,0],alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1},w={ESRI_externalColorMixMode:"tint"},S=(e={})=>{const t={...b,...e.pbrMetallicRoughness},r=function(e){switch(e.ESRI_externalColorMixMode){case"multiply":case"tint":case"ignore":case"replace":break;default:(0,_.Bg)(e.ESRI_externalColorMixMode),e.ESRI_externalColorMixMode="tint"}return e}({...w,...e.extras});return{...g,...e,pbrMetallicRoughness:t,extras:r}},I={magFilter:c.cw.LINEAR,minFilter:c.cw.LINEAR_MIPMAP_LINEAR,wrapS:c.e8.REPEAT,wrapT:c.e8.REPEAT},A=e=>({...I,...e}),O=1179937895;class E{constructor(e,t,r,n,o){this._context=e,this._errorContext=t,this.uri=r,this.json=n,this._glbBuffer=o,this._bufferLoaders=new Map,this._textureLoaders=new Map,this._textureCache=new Map,this._materialCache=new Map,this._nodeParentMap=new Map,this._nodeTransformCache=new Map,this._baseUri=function(e){let t,r;return e.replace(/^(.*\/)?([^/]*)$/,((e,n,o)=>(t=n||"",r=o||"",""))),{dirPart:t,filePart:r}}(this.uri).dirPart,this._checkVersionSupported(),this._checkRequiredExtensionsSupported(),t.errorUnsupportedIf(null==n.scenes,"Scenes must be defined."),t.errorUnsupportedIf(null==n.meshes,"Meshes must be defined"),t.errorUnsupportedIf(null==n.nodes,"Nodes must be defined."),this._computeNodeParents()}static async load(e,t,r,n){if((0,d.HK)(r)){const n=(0,d.sJ)(r);if(n&&"model/gltf-binary"!==n.mediaType)try{const o=JSON.parse(n.isBase64?atob(n.data):n.data);return new E(e,t,r,o)}catch{}const o=(0,d.AH)(r);if(E._isGLBData(o))return this._fromGLBData(e,t,r,o)}if(r.endsWith(".gltf")){const o=await e.loadJSON(r,n);return new E(e,t,r,o)}const o=await e.loadBinary(r,n);if(E._isGLBData(o))return this._fromGLBData(e,t,r,o);const s=await e.loadJSON(r,n);return new E(e,t,r,s)}static _isGLBData(e){if(null==e)return!1;const t=new x(e);return t.remainingBytes()>=4&&t.readUint32()===O}static async _fromGLBData(e,t,r,n){const o=await E._parseGLBData(t,n);return new E(e,t,r,o.json,o.binaryData)}static async _parseGLBData(e,t){const r=new x(t);e.assert(r.remainingBytes()>=12,"GLB binary data is insufficiently large.");const n=r.readUint32(),o=r.readUint32(),s=r.readUint32();e.assert(n===O,"Magic first 4 bytes do not fit to expected GLB value."),e.assert(t.byteLength>=s,"GLB binary data is smaller than header specifies."),e.errorUnsupportedIf(2!==o,"An unsupported GLB container version was detected. Only version 2 is supported.");let a,i,u=0;for(;r.remainingBytes()>=8;){const t=r.readUint32(),n=r.readUint32();0===u?(e.assert(1313821514===n,"First GLB chunk must be JSON."),e.assert(t>=0,"No JSON data found."),a=await B(r.readUint8Array(t))):1===u?(e.errorUnsupportedIf(5130562!==n,"Second GLB chunk expected to be BIN."),i=r.readUint8Array(t)):e.warnUnsupported("More than 2 GLB chunks detected. Skipping."),u+=1}return a||e.error("No GLB JSON chunk detected."),{json:a,binaryData:i}}async getBuffer(e,t){const r=this.json.buffers[e],n=this._errorContext;if(null==r.uri)return n.assert(null!=this._glbBuffer,"GLB buffer not present"),this._glbBuffer;const o=await this._getBufferLoader(e,t);return n.assert(o.byteLength===r.byteLength,"Buffer byte lengths should match."),o}async _getBufferLoader(e,t){const r=this._bufferLoaders.get(e);if(r)return r;const n=this.json.buffers[e].uri,o=this._context.loadBinary(this._resolveUri(n),t).then((e=>new Uint8Array(e)));return this._bufferLoaders.set(e,o),o}async getAccessor(e,t){const r=this._errorContext;r.errorUnsupportedIf(!this.json.accessors,"Accessors missing.");const o=this.json.accessors[e];r.errorUnsupportedIf(null==o?.bufferView,"Some accessor does not specify a bufferView."),r.errorUnsupportedIf(o.type in[n.MAT2,n.MAT3,n.MAT4],`AttributeType ${o.type} is not supported`);const s=this.json.bufferViews[o.bufferView],a=await this.getBuffer(s.buffer,t),i=v[o.type],u=C[o.componentType],c=i*u,f=s.byteStride||c;return{raw:a.buffer,byteStride:f,byteOffset:a.byteOffset+(s.byteOffset||0)+(o.byteOffset||0),entryCount:o.count,isDenselyPacked:f===c,componentCount:i,componentByteSize:u,componentType:o.componentType,min:o.min,max:o.max,normalized:!!o.normalized}}async getIndexData(e,t){if(null==e.indices)return;const r=await this.getAccessor(e.indices,t);if(r.isDenselyPacked)switch(r.componentType){case c.g.UNSIGNED_BYTE:return new Uint8Array(r.raw,r.byteOffset,r.entryCount);case c.g.UNSIGNED_SHORT:return new Uint16Array(r.raw,r.byteOffset,r.entryCount);case c.g.UNSIGNED_INT:return new Uint32Array(r.raw,r.byteOffset,r.entryCount)}else switch(r.componentType){case c.g.UNSIGNED_BYTE:return(0,T.m)(this._wrapAccessor(y.D_,r));case c.g.UNSIGNED_SHORT:return(0,T.m)(this._wrapAccessor(y.av,r));case c.g.UNSIGNED_INT:return(0,T.m)(this._wrapAccessor(y.Nu,r))}}async getPositionData(e,t){const r=this._errorContext;r.errorUnsupportedIf(null==e.attributes.POSITION,"No POSITION vertex data found.");const n=await this.getAccessor(e.attributes.POSITION,t);return r.errorUnsupportedIf(n.componentType!==c.g.FLOAT,"Expected type FLOAT for POSITION vertex attribute, but found "+M[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"POSITION vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(y.ct,n)}async getNormalData(e,t){const r=this._errorContext;r.assert(null!=e.attributes.NORMAL,"No NORMAL vertex data found.");const n=await this.getAccessor(e.attributes.NORMAL,t);return r.errorUnsupportedIf(n.componentType!==c.g.FLOAT,"Expected type FLOAT for NORMAL vertex attribute, but found "+M[n.componentType]),r.errorUnsupportedIf(3!==n.componentCount,"NORMAL vertex attribute must have 3 components, but found "+n.componentCount.toFixed()),this._wrapAccessor(y.ct,n)}async getTangentData(e,t){const r=this._errorContext;r.assert(null!=e.attributes.TANGENT,"No TANGENT vertex data found.");const n=await this.getAccessor(e.attributes.TANGENT,t);return r.errorUnsupportedIf(n.componentType!==c.g.FLOAT,"Expected type FLOAT for TANGENT vertex attribute, but found "+M[n.componentType]),r.errorUnsupportedIf(4!==n.componentCount,"TANGENT vertex attribute must have 4 components, but found "+n.componentCount.toFixed()),new y.ek(n.raw,n.byteOffset,n.byteStride,n.byteOffset+n.byteStride*n.entryCount)}async getTextureCoordinates(e,t){const r=this._errorContext;r.assert(null!=e.attributes.TEXCOORD_0,"No TEXCOORD_0 vertex data found.");const n=await this.getAccessor(e.attributes.TEXCOORD_0,t);return r.errorUnsupportedIf(2!==n.componentCount,"TEXCOORD_0 vertex attribute must have 2 components, but found "+n.componentCount.toFixed()),n.componentType===c.g.FLOAT?this._wrapAccessor(y.Eu,n):(r.errorUnsupportedIf(!n.normalized,"Integer component types are only supported for a normalized accessor for TEXCOORD_0."),function(e){switch(e.componentType){case c.g.BYTE:return new y.Vs(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.UNSIGNED_BYTE:return new y.xA(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.SHORT:return new y.or(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.UNSIGNED_SHORT:return new y.TS(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.UNSIGNED_INT:return new y.qt(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount);case c.g.FLOAT:return new y.Eu(e.raw,e.byteOffset,e.byteStride,e.byteOffset+e.byteStride*e.entryCount)}}(n))}async getVertexColors(e,t){const r=this._errorContext;r.assert(null!=e.attributes.COLOR_0,"No COLOR_0 vertex data found.");const n=await this.getAccessor(e.attributes.COLOR_0,t);if(r.errorUnsupportedIf(4!==n.componentCount&&3!==n.componentCount,"COLOR_0 attribute must have 3 or 4 components, but found "+n.componentCount.toFixed()),4===n.componentCount){if(n.componentType===c.g.FLOAT)return this._wrapAccessor(y.ek,n);if(n.componentType===c.g.UNSIGNED_BYTE)return this._wrapAccessor(y.mc,n);if(n.componentType===c.g.UNSIGNED_SHORT)return this._wrapAccessor(y.v6,n)}else if(3===n.componentCount){if(n.componentType===c.g.FLOAT)return this._wrapAccessor(y.ct,n);if(n.componentType===c.g.UNSIGNED_BYTE)return this._wrapAccessor(y.ne,n);if(n.componentType===c.g.UNSIGNED_SHORT)return this._wrapAccessor(y.mw,n)}r.errorUnsupported("Unsupported component type for COLOR_0 attribute: "+M[n.componentType])}hasPositions(e){return void 0!==e.attributes.POSITION}hasNormals(e){return void 0!==e.attributes.NORMAL}hasVertexColors(e){return void 0!==e.attributes.COLOR_0}hasTextureCoordinates(e){return void 0!==e.attributes.TEXCOORD_0}hasTangents(e){return void 0!==e.attributes.TANGENT}async getMaterial(e,t,r){let n=e.material?this._materialCache.get(e.material):void 0;if(!n){const o=null!=e.material?S(this.json.materials[e.material]):S(),s=o.pbrMetallicRoughness,a=this.hasVertexColors(e),i=this.getTexture(s.baseColorTexture,t),u=this.getTexture(o.normalTexture,t),c=r?this.getTexture(o.occlusionTexture,t):void 0,f=r?this.getTexture(o.emissiveTexture,t):void 0,d=r?this.getTexture(s.metallicRoughnessTexture,t):void 0,l=null!=e.material?e.material:-1;n={alphaMode:o.alphaMode,alphaCutoff:o.alphaCutoff,color:s.baseColorFactor,doubleSided:!!o.doubleSided,colorTexture:await i,normalTexture:await u,name:o.name,id:l,occlusionTexture:await c,emissiveTexture:await f,emissiveFactor:o.emissiveFactor,metallicFactor:s.metallicFactor,roughnessFactor:s.roughnessFactor,metallicRoughnessTexture:await d,hasVertexColors:a,ESRI_externalColorMixMode:o.extras.ESRI_externalColorMixMode,colorTextureTransform:s?.baseColorTexture?.extensions?.KHR_texture_transform,normalTextureTransform:o.normalTexture?.extensions?.KHR_texture_transform,occlusionTextureTransform:o.occlusionTexture?.extensions?.KHR_texture_transform,emissiveTextureTransform:o.emissiveTexture?.extensions?.KHR_texture_transform,metallicRoughnessTextureTransform:s?.metallicRoughnessTexture?.extensions?.KHR_texture_transform}}return n}async getTexture(e,t){if(!e)return;this._errorContext.errorUnsupportedIf(0!==(e.texCoord||0),"Only TEXCOORD with index 0 is supported.");const r=e.index,n=this._errorContext,o=this.json.textures[r],s=A(null!=o.sampler?this.json.samplers[o.sampler]:{});n.errorUnsupportedIf(null==o.source,"Source is expected to be defined for a texture.");const a=this.json.images[o.source],i=await this._loadTextureImageData(r,o,t);return(0,f.s1)(this._textureCache,r,(()=>{const e=e=>33071===e||33648===e||10497===e,t=e=>(n.error(`Unexpected TextureSampler WrapMode: ${e}. Using default REPEAT(10497).`),10497);return{data:i,wrapS:e(s.wrapS)?s.wrapS:t(s.wrapS),wrapT:e(s.wrapT)?s.wrapT:t(s.wrapT),minFilter:s.minFilter,name:a.name,id:r}}))}getNodeTransform(e){if(void 0===e)return N;let t=this._nodeTransformCache.get(e);if(!t){const r=this.getNodeTransform(this._getNodeParent(e)),n=this.json.nodes[e];n.matrix?t=(0,p.m)((0,a.c)(),r,n.matrix):n.translation||n.rotation||n.scale?(t=(0,a.b)(r),n.translation&&(0,p.h)(t,t,n.translation),n.rotation&&(U[3]=(0,m.g)(U,n.rotation),(0,p.e)(t,t,U[3],U)),n.scale&&(0,p.l)(t,t,n.scale)):t=r,this._nodeTransformCache.set(e,t)}return t}_wrapAccessor(e,t){return new e(t.raw,t.byteOffset,t.byteStride,t.byteOffset+t.byteStride*(t.entryCount-1)+t.componentByteSize*t.componentCount)}_resolveUri(e){return(0,d.hF)(e,this._baseUri)}_getNodeParent(e){return this._nodeParentMap.get(e)}_checkVersionSupported(){const e=l.G.parse(this.json.asset.version,"glTF");R.validate(e)}_checkRequiredExtensionsSupported(){const e=this.json,t=this._errorContext;e.extensionsRequired&&0!==e.extensionsRequired.length&&t.errorUnsupported("gltf loader was not able to load unsupported feature. Required extensions: "+e.extensionsRequired.join(", "))}_computeNodeParents(){this.json.nodes.forEach(((e,t)=>{e.children&&e.children.forEach((e=>{this._nodeParentMap.set(e,t)}))}))}async _loadTextureImageData(e,t,r){const n=this._textureLoaders.get(e);if(n)return n;const o=this._createTextureLoader(t,r);return this._textureLoaders.set(e,o),o}async _createTextureLoader(e,t){const r=this.json.images[e.source];if(r.uri)return this._context.loadImage(this._resolveUri(r.uri),t);const n=this._errorContext;n.errorUnsupportedIf(null==r.bufferView,"Image bufferView must be defined."),n.errorUnsupportedIf(null==r.mimeType,"Image mimeType must be defined.");const o=this.json.bufferViews[r.bufferView],s=await this.getBuffer(o.buffer,t);return n.errorUnsupportedIf(null!=o.byteStride,"byteStride not supported for image buffer"),async function(e,t){return new Promise(((r,n)=>{const o=new Blob([e],{type:t}),s=URL.createObjectURL(o),a=new Image;a.addEventListener("load",(()=>{URL.revokeObjectURL(s),"decode"in a?a.decode().then((()=>r(a)),(()=>r(a))):r(a)})),a.addEventListener("error",(e=>{URL.revokeObjectURL(s),n(e)})),a.src=s}))}(new Uint8Array(s.buffer,s.byteOffset+(o.byteOffset||0),o.byteLength),r.mimeType)}}const R=new l.G(2,0,"glTF"),N=(0,p.w)((0,a.c)(),Math.PI/2),U=(0,h.a)(),v={SCALAR:1,VEC2:2,VEC3:3,VEC4:4},C={[c.g.BYTE]:1,[c.g.UNSIGNED_BYTE]:1,[c.g.SHORT]:2,[c.g.UNSIGNED_SHORT]:2,[c.g.FLOAT]:4,[c.g.UNSIGNED_INT]:4};async function B(e){return new Promise(((t,r)=>{const n=new Blob([e]),o=new FileReader;o.onload=()=>{const e=o.result;t(JSON.parse(e))},o.onerror=e=>{r(e)},o.readAsText(n)}))}const M={5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5125:"UNSIGNED_INT",5126:"FLOAT"};let L=0;async function F(e,t,r={},n=!0){const o=await E.load(e,k,t,r),i="gltf_"+L++,u={lods:[],materials:new Map,textures:new Map,meta:D(o)},f=!(!o.json.asset.extras||"symbolResource"!==o.json.asset.extras.ESRI_type),d=new Map;await j(o,(async(e,t,f,l)=>{const p=d.get(f)??0;d.set(f,p+1);const m=void 0!==e.mode?e.mode:c.MX.TRIANGLES,h=m===c.MX.TRIANGLES||m===c.MX.TRIANGLE_STRIP||m===c.MX.TRIANGLE_FAN?m:null;if((0,s.Wi)(h))return void k.warnUnsupported("Unsupported primitive mode ("+H[m]+"). Skipping primitive.");if(!o.hasPositions(e))return void k.warn("Skipping primitive without POSITION vertex attribute.");const y=o.getPositionData(e,r),T=o.getMaterial(e,r,n),x=o.hasNormals(e)?o.getNormalData(e,r):null,_=o.hasTangents(e)?o.getTangentData(e,r):null,b=o.hasTextureCoordinates(e)?o.getTextureCoordinates(e,r):null,g=o.hasVertexColors(e)?o.getVertexColors(e,r):null,w=o.getIndexData(e,r),S={transform:(0,a.b)(t),attributes:{position:await y,normal:x?await x:null,texCoord0:b?await b:null,color:g?await g:null,tangent:_?await _:null},indices:await w,primitiveType:h,material:P(u,await T,i)};let I=null;(0,s.pC)(u.meta)&&(0,s.pC)(u.meta.ESRI_lod)&&"screenSpaceRadius"===u.meta.ESRI_lod.metric&&(I=u.meta.ESRI_lod.thresholds[f]),u.lods[f]=u.lods[f]||{parts:[],name:l,lodThreshold:I},u.lods[f].parts[p]=S}));for(const e of u.lods)e.parts=e.parts.filter((e=>!!e));return{model:u,meta:{isEsriSymbolResource:f,uri:o.uri},customMeta:{}}}function D(e){const t=e.json;let r=null;return t.nodes.forEach((e=>{const t=e.extras;(0,s.pC)(t)&&(t.ESRI_proxyEllipsoid||t.ESRI_lod)&&(r=t)})),r}async function j(e,t){const r=e.json,n=r.scenes[r.scene||0].nodes,o=n.length>1,s=[];for(const e of n){const t=r.nodes[e];s.push(a(e,0)),G(t)&&!o&&t.extensions.MSFT_lod.ids.forEach(((e,t)=>a(e,t+1)))}async function a(n,o){const i=r.nodes[n],u=e.getNodeTransform(n);if(k.warnUnsupportedIf(null!=i.weights,"Morph targets are not supported."),null!=i.mesh){const e=r.meshes[i.mesh];for(const r of e.primitives)s.push(t(r,u,o,e.name))}for(const e of i.children||[])s.push(a(e,o))}await Promise.all(s)}function G(e){return e.extensions&&e.extensions.MSFT_lod&&Array.isArray(e.extensions.MSFT_lod.ids)}function P(e,t,r){const n=t=>{const n=`${r}_tex_${t&&t.id}${t&&t.name?"_"+t.name:""}`;if(t&&!e.textures.has(n)){const r=function(e,t={}){return{data:e,parameters:{wrap:{s:c.e8.REPEAT,t:c.e8.REPEAT,...t.wrap},noUnpackFlip:!0,mipmap:!1,...t}}}(t.data,{wrap:{s:t.wrapS,t:t.wrapT},mipmap:V.includes(t.minFilter),noUnpackFlip:!0});e.textures.set(n,r)}return n},o=`${r}_mat_${t.id}_${t.name}`;if(!e.materials.has(o)){const r=function(e={}){return{color:[1,1,1],opacity:1,alphaMode:"OPAQUE",alphaCutoff:.5,doubleSided:!1,castShadows:!0,receiveShadows:!0,receiveAmbientOcclustion:!0,textureColor:null,textureNormal:null,textureOcclusion:null,textureEmissive:null,textureMetallicRoughness:null,colorTextureTransform:null,normalTextureTransform:null,occlusionTextureTransform:null,emissiveTextureTransform:null,metallicRoughnessTextureTransform:null,emissiveFactor:[0,0,0],metallicFactor:1,roughnessFactor:1,colorMixMode:"multiply",...e}}({color:[t.color[0],t.color[1],t.color[2]],opacity:t.color[3],alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,colorMixMode:t.ESRI_externalColorMixMode,textureColor:t.colorTexture?n(t.colorTexture):void 0,textureNormal:t.normalTexture?n(t.normalTexture):void 0,textureOcclusion:t.occlusionTexture?n(t.occlusionTexture):void 0,textureEmissive:t.emissiveTexture?n(t.emissiveTexture):void 0,textureMetallicRoughness:t.metallicRoughnessTexture?n(t.metallicRoughnessTexture):void 0,emissiveFactor:[t.emissiveFactor[0],t.emissiveFactor[1],t.emissiveFactor[2]],colorTextureTransform:t.colorTextureTransform,normalTextureTransform:t.normalTextureTransform,occlusionTextureTransform:t.occlusionTextureTransform,emissiveTextureTransform:t.emissiveTextureTransform,metallicRoughnessTextureTransform:t.metallicRoughnessTextureTransform,metallicFactor:t.metallicFactor,roughnessFactor:t.roughnessFactor});e.materials.set(o,r)}return o}const k=new class{error(e){throw new i.Z("gltf-loader-error",e)}errorUnsupported(e){throw new i.Z("gltf-loader-unsupported-feature",e)}errorUnsupportedIf(e,t){e&&this.errorUnsupported(t)}assert(e,t){e||this.error(t)}warn(e){u.Z.getLogger("esri.views.3d.glTF").warn(e)}warnUnsupported(e){this.warn("[Unsupported Feature] "+e)}warnUnsupportedIf(e,t){e&&this.warnUnsupported(t)}},V=[c.cw.LINEAR_MIPMAP_LINEAR,c.cw.LINEAR_MIPMAP_NEAREST],H=["POINTS","LINES","LINE_LOOP","LINE_STRIP","TRIANGLES","TRIANGLE_STRIP","TRIANGLE_FAN"]},17753:(e,t,r)=>{r.d(t,{NO:()=>y,cM:()=>h,p:()=>p,DX:()=>m});var n=r(17896),o=r(65617),s=r(22807),a=r(16996);function i(e,t,r){return(0,n.b)(u,t,e),(0,n.b)(c,r,e),(0,n.l)((0,n.f)(u,u,c))/2}r(12981),new s.x(a.Ue),new s.x((()=>{return e?{p0:(0,o.a)(e.p0),p1:(0,o.a)(e.p1),p2:(0,o.a)(e.p2)}:{p0:(0,o.c)(),p1:(0,o.c)(),p2:(0,o.c)()};var e}));const u=(0,o.c)(),c=(0,o.c)();let f=(()=>{const e=new Uint32Array(131072);for(let t=0;t<e.length;++t)e[t]=t;return e})();const d=new Uint16Array([0]),l=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function p(e){if(1===e)return d;if(e<l.length)return new Uint16Array(l.buffer,0,e);if(e>f.length){const t=Math.max(2*f.length,e);f=new Uint32Array(t);for(let e=0;e<f.length;e++)f[e]=e}return new Uint32Array(f.buffer,0,e)}function m(e){if(1===e)return new Uint16Array(d);if(e<l.length)return new Uint16Array(l.slice(0,e));if(e>f.length){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}return new Uint32Array(f.slice(0,e))}function h(e,t,r){if(!e||!t)return!1;const{size:o,data:s}=e;(0,n.s)(r,0,0,0),(0,n.s)(b,0,0,0);let a=0,u=0;for(let e=0;e<t.length-2;e+=3){const c=t[e+0]*o,f=t[e+1]*o,d=t[e+2]*o;(0,n.s)(T,s[c+0],s[c+1],s[c+2]),(0,n.s)(x,s[f+0],s[f+1],s[f+2]),(0,n.s)(_,s[d+0],s[d+1],s[d+2]);const l=i(T,x,_);l?((0,n.a)(T,T,x),(0,n.a)(T,T,_),(0,n.g)(T,T,1/3*l),(0,n.a)(r,r,T),a+=l):((0,n.a)(b,b,T),(0,n.a)(b,b,x),(0,n.a)(b,b,_),u+=3)}return!(0===u&&0===a||(0!==a?((0,n.g)(r,r,1/a),0):0===u||((0,n.g)(r,b,1/u),0)))}function y(e,t,r){if(!e||!t)return!1;const{size:o,data:s}=e;(0,n.s)(r,0,0,0);let a=-1,i=0;for(let e=0;e<t.length;e++){const n=t[e]*o;a!==n&&(r[0]+=s[n+0],r[1]+=s[n+1],r[2]+=s[n+2],i++),a=n}return i>1&&(0,n.g)(r,r,1/i),i>0}const T=(0,o.c)(),x=(0,o.c)(),_=(0,o.c)(),b=(0,o.c)()},57758:(e,t,r)=>{r.d(t,{K:()=>n});const n=2.1}}]);
@@ -1 +1 @@
1
- {"setDate":"Set date","selectMonth":"Select month","goToPreviousMonth":"Go to previous month","goToNextMonth":"Go to next month","goToPreviousYear":"Go to previous year","goToNextYear":"Go to next year"}
1
+ {"widgetLabel":"Date picker","setDate":"Set date","selectMonth":"Select month","goToPreviousMonth":"Go to previous month","goToNextMonth":"Go to next month","goToPreviousYear":"Go to previous year","goToNextYear":"Go to next year"}
@@ -1 +1 @@
1
- {"setDate":"Set date","selectMonth":"Select month","goToPreviousMonth":"Go to previous month","goToNextMonth":"Go to next month","goToPreviousYear":"Go to previous year","goToNextYear":"Go to next year"}
1
+ {"widgetLabel":"Date picker","setDate":"Set date","selectMonth":"Select month","goToPreviousMonth":"Go to previous month","goToNextMonth":"Go to next month","goToPreviousYear":"Go to previous year","goToNextYear":"Go to next year"}
@@ -1 +1 @@
1
- {"inputTitle":"Set time"}
1
+ {"widgetLabel":"Time picker","inputTitle":"Set time"}
@@ -1 +1 @@
1
- {"inputTitle":"Set time"}
1
+ {"widgetLabel":"Time picker","inputTitle":"Set time"}