@arcgis/core 5.0.0-next.28 → 5.0.0-next.29

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 (95) hide show
  1. package/Map.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{aca72ca7f43f70eb8077.js → 0bfb7db0a151a5e85dd1.js} +1 -1
  5. package/assets/esri/core/workers/chunks/2d0d8243ed0c21f8a498.js +1 -0
  6. package/assets/esri/core/workers/chunks/{e873359e00e0866d4ef6.js → 66853ecdebfc2aa68ce7.js} +21 -22
  7. package/assets/esri/core/workers/chunks/6c8f5a56e94fdbe6a4a5.js +1 -0
  8. package/assets/esri/core/workers/chunks/6ce7ca6bebdc61d8eada.js +1 -0
  9. package/assets/esri/core/workers/chunks/{8b33732e3c2924c1f60d.js → e615983fab688d515205.js} +1 -1
  10. package/assets/esri/core/workers/chunks/e6fa6f9c278589c8a713.js +1 -0
  11. package/chunks/CheckerBoard.glsl.js +2 -2
  12. package/chunks/ColorMaterial.glsl.js +2 -2
  13. package/chunks/ComponentShader.glsl.js +2 -2
  14. package/chunks/DefaultMaterial.glsl.js +2 -2
  15. package/chunks/ImageMaterial.glsl.js +2 -2
  16. package/chunks/LineMarker.glsl.js +2 -2
  17. package/chunks/NativeLine.glsl.js +2 -2
  18. package/chunks/Path.glsl.js +3 -3
  19. package/chunks/Pattern.glsl.js +2 -2
  20. package/chunks/RealisticTree.glsl.js +2 -2
  21. package/chunks/RibbonLine.glsl.js +2 -2
  22. package/chunks/ShadedColorMaterial.glsl.js +2 -2
  23. package/chunks/Terrain.glsl.js +27 -37
  24. package/chunks/WaterSurface.glsl.js +2 -2
  25. package/config.js +1 -1
  26. package/core/accessorSupport/decorators/property.js +1 -1
  27. package/core/has.js +1 -1
  28. package/geometry/Circle.js +1 -1
  29. package/geometry/support/MeshMaterial.js +1 -1
  30. package/geometry/support/MeshMaterialMetallicRoughness.js +1 -1
  31. package/interfaces.d.ts +29 -23
  32. package/kernel.js +1 -1
  33. package/layers/orientedImagery/transformations/imageToWorld.js +1 -1
  34. package/package.json +2 -2
  35. package/renderers/support/UniqueValueClass.js +1 -1
  36. package/renderers/visualVariables/SizeVariable.js +1 -1
  37. package/support/revision.js +1 -1
  38. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterColorizerTechnique.js +1 -1
  39. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  40. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  41. package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
  42. package/views/3d/state/ViewState.js +1 -1
  43. package/views/3d/state/ViewStateManager.js +1 -1
  44. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  45. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  46. package/views/3d/support/QualityProfile.js +1 -1
  47. package/views/3d/terrain/TerrainRenderer.js +1 -1
  48. package/views/3d/terrain/TerrainSurface.js +1 -1
  49. package/views/3d/webgl-engine/Stage.js +1 -1
  50. package/views/3d/webgl-engine/collections/Component/ComponentData.js +1 -1
  51. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  52. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  53. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  54. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  55. package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
  56. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  57. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  58. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  59. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  60. package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
  61. package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
  62. package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
  63. package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
  64. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  65. package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
  66. package/views/3d/webgl-engine/shaders/{OutputColorHighlightOID.glsl.js → OutputColorHighlightOLID.glsl.js} +2 -3
  67. package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
  68. package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
  69. package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
  70. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  71. package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
  72. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  73. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  74. package/views/SceneView.js +1 -1
  75. package/views/View.js +1 -1
  76. package/views/View2D.js +1 -1
  77. package/views/Viewport2DMixin.js +1 -1
  78. package/views/navigation/Momentum.js +1 -1
  79. package/views/video/VideoOperationalDataView.js +1 -1
  80. package/webscene/Slide.js +1 -1
  81. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  82. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  83. package/widgets/Editor/UpdateFeaturesWorkflowData.js +1 -1
  84. package/widgets/FeatureTable.js +1 -1
  85. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  86. package/widgets/OrientedImageryViewer/adapters/view/MapViewAdapter.js +1 -1
  87. package/widgets/OrientedImageryViewer/adapters/view/SceneViewAdapter.js +1 -1
  88. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  89. package/widgets/UtilityNetworkTrace.js +1 -1
  90. package/widgets/Widget.js +1 -1
  91. package/assets/esri/core/workers/chunks/3f2b1d2102eef7ac29b4.js +0 -1
  92. package/assets/esri/core/workers/chunks/7532e819d2f4ee4813be.js +0 -1
  93. package/assets/esri/core/workers/chunks/76f2ce14d0d3001620a9.js +0 -1
  94. package/assets/esri/core/workers/chunks/ab5c386100b84bc564dd.js +0 -1
  95. package/views/3d/webgl-engine/lib/ComponentUtils.js +0 -5
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4903],{1626:(e,t,i)=>{i.d(t,{A:()=>c});var s,l=i(31635),r=i(4718),n=i(91429),o=i(2485),a=i(72606),u=i(43937),p=i(36005);let c=s=class extends a.A{constructor(e){super(e),this.colorRamps=null,this.type="multipart",this.weights=void 0}writeColorRamps(e,t,i,s){const l=e?.map(e=>e.toJSON(s)),{weights:r}=this;if(l&&r?.length&&l.length===r?.length){const e=100/r.reduce((e,t)=>e+t);let t=0;l.forEach((i,s)=>{i.start=t,t+=r[s]*e,i.stop=t})}t.colorRamps=l}readWeights(e,t){const i=t.colorRamps?.map(({start:e,stop:t})=>null==e||null==t?-1:t-e);if(!i?.some(e=>e<0))return i}clone(){return new s({colorRamps:(0,r.o8)(this.colorRamps)})}};(0,l.Cg)([(0,n.MZ)({type:[o.A],json:{write:{isRequired:!0}}})],c.prototype,"colorRamps",void 0),(0,l.Cg)([(0,u.K)("colorRamps")],c.prototype,"writeColorRamps",null),(0,l.Cg)([(0,n.MZ)({type:["multipart"],json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),(0,l.Cg)([(0,n.MZ)({type:[Number]})],c.prototype,"weights",void 0),(0,l.Cg)([(0,p.w)("weights",["colorRamps"])],c.prototype,"readWeights",null),c=s=(0,l.Cg)([(0,n.$K)("esri.rest.support.MultipartColorRamp")],c)},2024:(e,t,i)=>{i.d(t,{A:()=>a});var s,l=i(31635),r=i(91429),n=i(2795),o=i(72500);let a=s=class extends n.A{constructor(e){super(e),this.type="color",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value),this._set("stops",e)}clone(){return new s({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(e=>e.clone()),legendOptions:this.legendOptions?.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(e=>e.value||0)}};(0,l.Cg)([(0,r.MZ)({readOnly:!0})],a.prototype,"cache",null),(0,l.Cg)([(0,r.MZ)({type:["color"],json:{type:["colorInfo"]}})],a.prototype,"type",void 0),(0,l.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"normalizationField",void 0),(0,l.Cg)([(0,r.MZ)({type:[o.A],json:{write:!0}})],a.prototype,"stops",null),a=s=(0,l.Cg)([(0,r.$K)("esri.renderers.visualVariables.ColorVariable")],a)},2485:(e,t,i)=>{i.d(t,{A:()=>c});var s,l=i(31635),r=i(68197),n=i(4718),o=i(91429),a=i(56507),u=i(72606),p=i(93223);let c=s=class extends u.A{constructor(e){super(e),this.algorithm=null,this.fromColor=null,this.toColor=null,this.type="algorithmic"}clone(){return new s({fromColor:(0,n.o8)(this.fromColor),toColor:(0,n.o8)(this.toColor),algorithm:this.algorithm})}};(0,l.Cg)([(0,p.e)({esriCIELabAlgorithm:"cie-lab",esriHSVAlgorithm:"hsv",esriLabLChAlgorithm:"lab-lch"})],c.prototype,"algorithm",void 0),(0,l.Cg)([(0,o.MZ)({type:r.A,json:{type:[a.jz],write:{isRequired:!0}}})],c.prototype,"fromColor",void 0),(0,l.Cg)([(0,o.MZ)({type:r.A,json:{type:[a.jz],write:{isRequired:!0}}})],c.prototype,"toColor",void 0),(0,l.Cg)([(0,o.MZ)({type:["algorithmic"],json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=s=(0,l.Cg)([(0,o.$K)("esri.rest.support.AlgorithmicColorRamp")],c)},2795:(e,t,i)=>{i.d(t,{A:()=>c});var s=i(31635),l=i(66552),r=i(25482),n=i(53966),o=i(91429),a=i(56507),u=i(41078);const p=new l.J({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"});let c=class extends r.o{constructor(e){super(e),this.index=null,this.type=null,this.field=null,this.valueExpression=null,this.valueExpressionTitle=null,this.legendOptions=null}castField(e){return null==e?e:"function"==typeof e?(n.A.getLogger(this).error(".field: field must be a string value"),null):(0,a.GX)(e)}get arcadeRequired(){return!!this.valueExpression}clone(){}getAttributeHash(){return`${this.type}-${this.field}-${this.valueExpression}`}};(0,s.Cg)([(0,o.MZ)()],c.prototype,"index",void 0),(0,s.Cg)([(0,o.MZ)({type:p.apiValues,readOnly:!0,json:{read:p.read,write:{writer:p.write,isRequired:!0}}})],c.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"field",void 0),(0,s.Cg)([(0,o.wg)("field")],c.prototype,"castField",null),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"valueExpression",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],c.prototype,"valueExpressionTitle",void 0),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],c.prototype,"arcadeRequired",null),(0,s.Cg)([(0,o.MZ)({type:u.A,json:{write:!0}})],c.prototype,"legendOptions",void 0),c=(0,s.Cg)([(0,o.$K)("esri.renderers.visualVariables.VisualVariable")],c)},12330:(e,t,i)=>{i.d(t,{A:()=>a});var s,l=i(31635),r=i(25482),n=i(90629),o=i(91429);let a=s=class extends r.o{constructor(e){super(e),this.label=null,this.size=null,this.value=null,this.useMinValue=null,this.useMaxValue=null}clone(){return new s({label:this.label,size:this.size,value:this.value,useMaxValue:this.useMaxValue,useMinValue:this.useMinValue})}};(0,l.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"label",void 0),(0,l.Cg)([(0,o.MZ)({type:Number,cast:n.cr,json:{write:{isRequired:!0}}})],a.prototype,"size",void 0),(0,l.Cg)([(0,o.MZ)({type:Number,json:{write:{isRequired:!0}}})],a.prototype,"value",void 0),(0,l.Cg)([(0,o.MZ)({type:Boolean,json:{write:!1}})],a.prototype,"useMinValue",void 0),(0,l.Cg)([(0,o.MZ)({type:Boolean,json:{write:!1}})],a.prototype,"useMaxValue",void 0),a=s=(0,l.Cg)([(0,o.$K)("esri.renderers.visualVariables.support.SizeStop")],a)},20061:(e,t,i)=>{i.d(t,{A:()=>h});var s,l=i(31635),r=i(69540),n=i(66552),o=i(25482),a=i(91429),u=i(56507),p=i(93223);const c=(0,n.O)()({ascendingValues:"ascending-values",descendingValues:"descending-values"});let d=s=class extends((0,r.OU)(o.o)){static from(e){return(0,u.PZ)(s,e)}constructor(e){super(e),this.title=null,this.order=null}};(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"title",void 0),(0,l.Cg)([(0,p.e)(c)],d.prototype,"order",void 0),d=s=(0,l.Cg)([(0,a.$K)("esri.renderers.support.RendererLegendOptions")],d);const h=d},23461:(e,t,i)=>{i.d(t,{A:()=>o});var s,l=i(31635),r=i(91429),n=i(2795);let o=s=class extends n.A{constructor(e){super(e),this.axis=null,this.type="rotation",this.rotationType="geographic"}get cache(){return{hasExpression:!!this.valueExpression,compiledFunc:null}}clone(){return new s({axis:this.axis,rotationType:this.rotationType,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,legendOptions:this.legendOptions?.clone()})}};(0,l.Cg)([(0,r.MZ)({readOnly:!0})],o.prototype,"cache",null),(0,l.Cg)([(0,r.MZ)({type:["heading","tilt","roll"],json:{origins:{"web-scene":{default:"heading",write:!0}}}})],o.prototype,"axis",void 0),(0,l.Cg)([(0,r.MZ)({type:["rotation"],json:{type:["rotationInfo"]}})],o.prototype,"type",void 0),(0,l.Cg)([(0,r.MZ)({type:["geographic","arithmetic"],json:{write:!0,origins:{"web-document":{write:!0,default:"geographic"}}}})],o.prototype,"rotationType",void 0),o=s=(0,l.Cg)([(0,r.$K)("esri.renderers.visualVariables.RotationVariable")],o)},29266:(e,t,i)=>{i.d(t,{RV:()=>d,UT:()=>h,Yz:()=>g}),i(68197);var s=i(52106),l=i(21818),r=i(53966),n=i(31756),o=i(98205);const a=()=>r.A.getLogger("esri.renderers.visualVariables.support.visualVariableUtils"),u=e=>a().warn(`The visualVariable should be an instance of esri.renderers.visualVariables.${e}`),p=()=>a().error("Use of arcade expressions requires an arcade context"),c=(new s.A,Math.PI),d=/^\s*(return\s+)?\$view\.scale\s*(;)?\s*$/i;function h(e,t,i){const s="visualVariables"in e?e.visualVariables?.find(e=>"rotation"===e.type):e;if(!s)return;if("esri.renderers.visualVariables.RotationVariable"!==s.declaredClass)return void u("RotationVariable");const l=s.axis||"heading",r="heading"===l&&"arithmetic"===s.rotationType?90:0,n="heading"===l&&"arithmetic"===s.rotationType?-1:1,o="number"==typeof t?null:t,a=o?.attributes,c=s.field,{hasExpression:d}=s.cache;let h=s.cache.compiledFunc,y=null;if(!c&&!d)return y;if(d){if(null==i?.arcade)return void p();const e={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},t=i.arcade.arcadeUtils,l=t.getViewInfo(e),r=t.createExecContext(o,l,i.timeZone);if(!h){const e=t.createSyntaxTree(s.valueExpression);h=t.createFunction(e),s.cache.compiledFunc=h}y=t.executeFunction(h,r)}else a&&(y=a[c]);return y="number"!=typeof y||isNaN(y)?null:r+n*y,y}function y(e,t,i){const s="visualVariables"in e?e.visualVariables?.find(e=>"size"===e.type):e;if(!s)return;if("esri.renderers.visualVariables.SizeVariable"!==s.declaredClass)return void u("SizeVariable");const l=function(e,t,i,s,l){switch(t.transformationType){case"additive":return function(e,t,i,s){const l=m(t.minSize,i,s)||t.minDataValue;return null==e&&null==l?null:(e??0)+(l??0)}(e,t,i,s);case"constant":return function(e,t,i){const s=e.stops;let l=s?.length&&s[0].size;return null==l&&(l=e.minSize),m(l,t,i)}(t,i,s);case"clamped-linear":return function(e,t,i,s){const l=m(t.minSize,i,s);if(null==e)return l;const{minDataValue:r,maxDataValue:n}=t;if(null==r||null==n)return null;const o=(e-r)/(n-r),a=m(t.maxSize,i,s),u=null!=s?s.shape:void 0;if(e<=r)return l;if(e>=n)return a;if(null==l||null==a)return null;if("area"===t.scaleBy&&u){const e="circle"===u,t=e?c*(l/2)**2:l*l,i=t+o*((e?c*(a/2)**2:a*a)-t);return e?2*Math.sqrt(i/c):Math.sqrt(i)}return l+o*(a-l)}(e,t,i,s);case"proportional":return function(e,t,i,s){const l=m(t.minSize,i,s);if(null==e||null==l)return l;const r=null!=s?s.shape:void 0,{minDataValue:n}=t;if(null==n)return null;const o=e/n,a=m(t.maxSize,i,s);let u=null;return u="circle"===r?2*Math.sqrt(o*(l/2)**2):"square"===r||"diamond"===r||"image"===r?Math.sqrt(o*l**2):o*l,f(u,l,a)}(e,t,i,s);case"stops":return function(e,t,i,s,l){if(null==e)return null;const[r,n,o]=function(e,t){if(!t)return;let i=0,s=t.length-1;return t.some((t,l)=>e<t?(s=l,!0):(i=l,!1)),[i,s,(e-t[i])/(t[s]-t[i])]}(e,l);if(r===n)return m(t.stops?.[r].size,i,s);{const e=m(t.stops?.[r].size,i,s),l=m(t.stops?.[n].size,i,s);return null==e||null==l?null:e+(l-e)*o}}(e,t,i,s,l);case"real-world-size":return function(e,t,i,s){const l=(s?.resolution??1)*n.j[t.valueUnit],r=m(t.minSize,i,s),o=m(t.maxSize,i,s),{valueRepresentation:a}=t;if(null==e)return r;let u=null;return u="area"===a?2*Math.sqrt(e/c)/l:"radius"===a||"distance"===a?2*e/l:e/l,f(u,r,o)}(e,t,i,s);case"identity":return e;case"unknown":return null}}(function(e,t,i){const s="number"==typeof t,l=s?null:t,r=l?.attributes;let n=s?t:null;const{isScaleDriven:a}=e.cache;let u=e.cache.compiledFunc;if(a){const t=null!=i?i.scale:void 0,s=null!=i?i.view:void 0;n=null==t||"3d"===s?function(e){let t=null,i=null;const s=e.stops;return s?(t=s[0].value,i=s[s.length-1].value):(t=e.minDataValue||0,i=e.maxDataValue||0),(t+i)/2}(e):t}else if(!s)switch(e.inputValueType){case"expression":{if(null==i?.arcade)return void p();const t={viewingMode:i.viewingMode,scale:i.scale,spatialReference:i.spatialReference},s=i.arcade.arcadeUtils,r=s.getViewInfo(t),o=s.createExecContext(l,r,i.timeZone);if(!u){const t=s.createSyntaxTree(e.valueExpression);u=s.createFunction(t),e.cache.compiledFunc=u}n=s.executeFunction(u,o);break}case"field":r&&(n=r[e.field]);break;case"unknown":n=null}if(!(0,o.gf)(n))return null;if(s||!e.normalizationField)return n;const c=r?parseFloat(r[e.normalizationField]):null;return(0,o.gf)(c)&&0!==c?n/c:null}(s,t,i),s,t,i,s.cache.ipData);return null==l||isNaN(l)?void 0:l}function m(e,t,i){return null==e?null:(0,o.of)(e)?y(e,t,i):(0,o.gf)(e)?e:null}function f(e,t,i){return(0,o.gf)(i)&&e>i?i:(0,o.gf)(t)&&e<t?t:e}function g(e,t,i){const s=["proportional","proportional","proportional"];for(const r of e){const e=r.useSymbolValue?"symbol-value":y(r,t,i)??"proportional";switch(r.axis){case"width":s[0]=e;break;case"depth":s[1]=e;break;case"height":s[2]=e;break;case"width-and-depth":s[0]=e,s[1]=e;break;case"all":case void 0:case null:s[0]=e,s[1]=e,s[2]=e;break;default:(0,l.Xb)(r.axis)}}return s}},30943:(e,t,i)=>{i.d(t,{A:()=>q});var s,l=i(31635),r=i(66552),n=i(25482),o=i(4718),a=i(91429),u=i(56507);let p=s=class extends n.o{constructor(e){super(e),this.minValue=0,this.maxValue=0}clone(){return new s({minValue:this.minValue,maxValue:this.maxValue})}};var c;(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"minValue",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"maxValue",void 0),p=s=(0,l.Cg)([(0,a.$K)("esri.renderers.support.AuthoringInfoClassBreakInfo")],p);let d=c=class extends n.o{constructor(e){super(e),this.field="",this.normalizationField="",this.label="",this.classBreakInfos=new Array}clone(){return new c({field:this.field,normalizationField:this.normalizationField,label:this.label,classBreakInfos:(0,o.o8)(this.classBreakInfos)})}};(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"field",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"normalizationField",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,l.Cg)([(0,a.MZ)({type:[p],json:{write:!0}})],d.prototype,"classBreakInfos",void 0),d=c=(0,l.Cg)([(0,a.$K)("esri.renderers.support.AuthoringInfoFieldInfo")],d);var h,y=i(79901);let m=h=class extends n.o{constructor(e){super(e),this.label=null,this.size=null,this.value=null}clone(){return new h({label:this.label,value:this.value,size:this.size})}};(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],m.prototype,"label",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"size",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"value",void 0),m=h=(0,l.Cg)([(0,a.$K)("esri.renderers.support.AuthoringInfoSizeStop")],m);const f=m;var g;const v=new r.J({percentTotal:"percent-of-total",ratio:"ratio",percent:"percent"}),b=new r.J({sizeInfo:"size",colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation"}),w={key:e=>"number"==typeof e?"number":"string",typeMap:{number:Number,string:String},base:null},V=["high-to-low","above-and-below","centered-on","extremes"],S=[...new Set(["high-to-low","above-and-below","centered-on","extremes","above","below","high-to-low","above-and-below","above","below","reference-size","spike"])],C=["seconds","minutes","hours","days","months","years"];let x=g=class extends n.o{constructor(e){super(e),this.endTime=null,this.field=null,this.maxSliderValue=null,this.minSliderValue=null,this.startTime=null,this.type=null,this.units=null}castEndTime(e){return"string"==typeof e||"number"==typeof e?e:null}get normalizationField(){return"reference-size"===this.theme||"spike"===this.theme?this._get("normalizationField"):null}set normalizationField(e){this._set("normalizationField",e)}get referenceSizeScale(){return"reference-size"===this.theme?this._get("referenceSizeScale"):null}set referenceSizeScale(e){this._set("referenceSizeScale",e)}get referenceSizeSymbolStyle(){return"reference-size"===this.theme?this._get("referenceSizeSymbolStyle"):null}set referenceSizeSymbolStyle(e){this._set("referenceSizeSymbolStyle",e)}get spikeSymbolStyle(){return"spike"===this.theme?this._get("spikeSymbolStyle"):null}set spikeSymbolStyle(e){this._set("spikeSymbolStyle",e)}castStartTime(e){return"string"==typeof e||"number"==typeof e?e:null}get sizeStops(){return"reference-size"===this.theme||"spike"===this.theme?this._get("sizeStops"):null}set sizeStops(e){this._set("sizeStops",e)}get style(){return"color"===this.type?this._get("style"):null}set style(e){this._set("style",e)}get theme(){return"color"===this.type||"size"===this.type?this._get("theme")||"high-to-low":null}set theme(e){this._set("theme",e)}clone(){return new g({endTime:this.endTime,field:this.field,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,normalizationField:this.normalizationField,referenceSizeScale:this.referenceSizeScale,referenceSizeSymbolStyle:this.referenceSizeSymbolStyle,spikeSymbolStyle:this.spikeSymbolStyle,sizeStops:(0,o.o8)(this.sizeStops),startTime:this.startTime,style:this.style,theme:this.theme,type:this.type,units:this.units})}};(0,l.Cg)([(0,a.MZ)({types:w,json:{write:!0}})],x.prototype,"endTime",void 0),(0,l.Cg)([(0,y.w)("endTime")],x.prototype,"castEndTime",null),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],x.prototype,"field",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"maxSliderValue",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],x.prototype,"minSliderValue",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],x.prototype,"normalizationField",null),(0,l.Cg)([(0,a.MZ)({type:Number,value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],x.prototype,"referenceSizeScale",null),(0,l.Cg)([(0,a.MZ)({type:["circle","diamond","hexagon-flat","hexagon-pointy","square"],value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],x.prototype,"referenceSizeSymbolStyle",null),(0,l.Cg)([(0,a.MZ)({type:["triangle-closed-outline","triangle-gradient-fill-closed","triangle-gradient-fill-closed-outline","triangle-gradient-fill-open","triangle-gradient-fill-open-outline","triangle-open-outline","triangle-solid-fill-closed","triangle-solid-fill-closed-outline","triangle-solid-fill-open","triangle-solid-fill-open-outline"],value:null,json:{origins:{"web-scene":{write:!1}},write:!0}})],x.prototype,"spikeSymbolStyle",null),(0,l.Cg)([(0,a.MZ)({types:w,json:{write:!0}})],x.prototype,"startTime",void 0),(0,l.Cg)([(0,y.w)("startTime")],x.prototype,"castStartTime",null),(0,l.Cg)([(0,a.MZ)({type:[f],json:{origins:{"web-scene":{write:!1}},write:!0}})],x.prototype,"sizeStops",null),(0,l.Cg)([(0,a.MZ)({type:v.apiValues,value:null,json:{type:v.jsonValues,read:v.read,write:v.write}})],x.prototype,"style",null),(0,l.Cg)([(0,a.MZ)({type:S,value:null,json:{type:S,origins:{"web-scene":{type:V,write:{writer:(e,t)=>{V.includes(e)&&(t.theme=e)}}}},write:!0}})],x.prototype,"theme",null),(0,l.Cg)([(0,a.MZ)({type:b.apiValues,json:{type:b.jsonValues,read:b.read,write:b.write}})],x.prototype,"type",void 0),(0,l.Cg)([(0,a.MZ)({type:C,json:{type:C,write:!0}})],x.prototype,"units",void 0),x=g=(0,l.Cg)([(0,a.$K)("esri.renderers.support.AuthoringInfoVisualVariable")],x);const M=x;var z,_=i(95349),I=i(36005);const A=new r.J({esriClassifyDefinedInterval:"defined-interval",esriClassifyEqualInterval:"equal-interval",esriClassifyManual:"manual",esriClassifyNaturalBreaks:"natural-breaks",esriClassifyQuantile:"quantile",esriClassifyStandardDeviation:"standard-deviation"}),j=new r.J({classedSize:"class-breaks-size",classedColor:"class-breaks-color",univariateColorSize:"univariate-color-size",relationship:"relationship",predominance:"predominance",dotDensity:"dot-density",flow:"flow"}),Z=["inches","feet","yards","miles","nautical-miles","millimeters","centimeters","decimeters","meters","kilometers"];let q=z=class extends n.o{constructor(e){super(e),this.colorRamp=null,this.fadeRatio=null,this.isAutoGenerated=!1,this.lengthUnit=null,this.maxSliderValue=null,this.minSliderValue=null,this.visualVariables=null}get classificationMethod(){const e=this._get("classificationMethod"),t=this.type;return t&&"relationship"!==t?"class-breaks-size"===t||"class-breaks-color"===t?e||"manual":null:e}set classificationMethod(e){this._set("classificationMethod",e)}readColorRamp(e){return e?(0,_.r)(e):void 0}get fields(){return this.type&&"predominance"!==this.type?null:this._get("fields")}set fields(e){this._set("fields",e)}get field1(){return this.type&&"relationship"!==this.type?null:this._get("field1")}set field1(e){this._set("field1",e)}get field2(){return this.type&&"relationship"!==this.type?null:this._get("field2")}set field2(e){this._set("field2",e)}get flowTheme(){return"flow"===this.type?this._get("flowTheme"):null}set flowTheme(e){this._set("flowTheme",e)}get focus(){return this.type&&"relationship"!==this.type?null:this._get("focus")}set focus(e){this._set("focus",e)}get numClasses(){return this.type&&"relationship"!==this.type?null:this._get("numClasses")}set numClasses(e){this._set("numClasses",e)}get statistics(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("statistics"):null}set statistics(e){this._set("statistics",e)}get standardDeviationInterval(){const e=this.type;return e&&"relationship"!==e&&"class-breaks-size"!==e&&"class-breaks-color"!==e||this.classificationMethod&&"standard-deviation"!==this.classificationMethod?null:this._get("standardDeviationInterval")}set standardDeviationInterval(e){this._set("standardDeviationInterval",e)}get type(){return this._get("type")}set type(e){let t=e;"classed-size"===e?t="class-breaks-size":"classed-color"===e&&(t="class-breaks-color"),this._set("type",t)}get univariateSymbolStyle(){return"univariate-color-size"===this.type&&"above-and-below"===this.univariateTheme?this._get("univariateSymbolStyle"):null}set univariateSymbolStyle(e){this._set("univariateSymbolStyle",e)}get univariateTheme(){return"univariate-color-size"===this.type?this._get("univariateTheme"):null}set univariateTheme(e){this._set("univariateTheme",e)}clone(){return new z({classificationMethod:this.classificationMethod,colorRamp:(0,o.o8)(this.colorRamp),fadeRatio:(0,o.o8)(this.fadeRatio),fields:this.fields?.slice(),field1:(0,o.o8)(this.field1),field2:(0,o.o8)(this.field2),isAutoGenerated:this.isAutoGenerated,focus:this.focus,numClasses:this.numClasses,maxSliderValue:this.maxSliderValue,minSliderValue:this.minSliderValue,lengthUnit:this.lengthUnit,statistics:this.statistics,standardDeviationInterval:this.standardDeviationInterval,type:this.type,visualVariables:this.visualVariables&&this.visualVariables.map(e=>e.clone()),univariateSymbolStyle:this.univariateSymbolStyle,univariateTheme:this.univariateTheme,flowTheme:this.flowTheme})}};(0,l.Cg)([(0,a.MZ)({type:A.apiValues,value:null,json:{type:A.jsonValues,read:A.read,write:A.write,origins:{"web-document":{default:"manual",type:A.jsonValues,read:A.read,write:A.write}}}})],q.prototype,"classificationMethod",null),(0,l.Cg)([(0,a.MZ)({types:_.g,json:{write:!0}})],q.prototype,"colorRamp",void 0),(0,l.Cg)([(0,I.w)("colorRamp")],q.prototype,"readColorRamp",null),(0,l.Cg)([(0,a.MZ)({json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],q.prototype,"fadeRatio",void 0),(0,l.Cg)([(0,a.MZ)({type:[String],value:null,json:{write:!0}})],q.prototype,"fields",null),(0,l.Cg)([(0,a.MZ)({type:d,value:null,json:{write:!0}})],q.prototype,"field1",null),(0,l.Cg)([(0,a.MZ)({type:d,value:null,json:{write:!0}})],q.prototype,"field2",null),(0,l.Cg)([(0,a.MZ)({type:["flow-line","wave-front"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],q.prototype,"flowTheme",null),(0,l.Cg)([(0,a.MZ)({type:["HH","HL","LH","LL"],value:null,json:{write:!0}})],q.prototype,"focus",null),(0,l.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0,default:!1,origins:{"web-scene":{write:!1}}}})],q.prototype,"isAutoGenerated",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,value:null,json:{type:u.jz,write:!0}})],q.prototype,"numClasses",null),(0,l.Cg)([(0,a.MZ)({type:Z,json:{type:Z,read:!1,write:!1,origins:{"web-scene":{read:!0,write:!0}}}})],q.prototype,"lengthUnit",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],q.prototype,"maxSliderValue",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],q.prototype,"minSliderValue",void 0),(0,l.Cg)([(0,a.MZ)({type:Object,value:null,json:{write:!0,origins:{"web-scene":{write:!1,read:!1}}}})],q.prototype,"statistics",null),(0,l.Cg)([(0,a.MZ)({type:[.25,.33,.5,1],value:null,json:{type:[.25,.33,.5,1],write:!0}})],q.prototype,"standardDeviationInterval",null),(0,l.Cg)([(0,a.MZ)({type:j.apiValues,value:null,json:{type:j.jsonValues,read:j.read,write:j.write}})],q.prototype,"type",null),(0,l.Cg)([(0,a.MZ)({type:[M],json:{write:!0}})],q.prototype,"visualVariables",void 0),(0,l.Cg)([(0,a.MZ)({type:["caret","circle-caret","arrow","circle-arrow","plus-minus","circle-plus-minus","square","circle","triangle","happy-sad","thumb","custom"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],q.prototype,"univariateSymbolStyle",null),(0,l.Cg)([(0,a.MZ)({type:["high-to-low","above-and-below","above","below"],value:null,json:{write:!0,origins:{"web-scene":{write:!1}}}})],q.prototype,"univariateTheme",null),q=z=(0,l.Cg)([(0,a.$K)("esri.renderers.support.AuthoringInfo")],q)},41078:(e,t,i)=>{i.d(t,{A:()=>a});var s=i(31635),l=i(69540),r=i(25482),n=i(91429);let o=class extends((0,l.OU)(r.o)){constructor(){super(...arguments),this.showLegend=null,this.title=null}};(0,s.Cg)([(0,n.MZ)({type:Boolean,json:{write:!0}})],o.prototype,"showLegend",void 0),(0,s.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],o.prototype,"title",void 0),o=(0,s.Cg)([(0,n.$K)("esri.renderers.visualVariables.support.VisualVariableLegendOptions")],o);const a=o},48940:(e,t,i)=>{i.d(t,{A:()=>C});var s=i(31635),l=i(49186),r=i(66552),n=i(53966),o=i(91429),a=i(2795),u=i(90629),p=i(12330),c=i(41078);let d=class extends c.A{constructor(){super(...arguments),this.customValues=null}};(0,s.Cg)([(0,o.MZ)({type:[Number],json:{write:!0}})],d.prototype,"customValues",void 0),d=(0,s.Cg)([(0,o.$K)("esri.renderers.visualVariables.support.SizeVariableLegendOptions")],d);const h=d;var y,m=i(98205),f=i(29266),g=i(36005),v=i(43937);const b=new r.J({width:"width",depth:"depth",height:"height",widthAndDepth:"width-and-depth",all:"all"}),w=new r.J({unknown:"unknown",inch:"inches",foot:"feet",yard:"yards",mile:"miles","nautical-mile":"nautical-miles",millimeter:"millimeters",centimeter:"centimeters",decimeter:"decimeters",meter:"meters",kilometer:"kilometers"});function V(e){if(null!=e)return"string"==typeof e||"number"==typeof e?function(e){return(0,u.cr)(e)}(e):"size"===e.type?(0,m.of)(e)?e:(delete(e={...e}).type,new C(e)):void 0}function S(e,t,i){if("object"!=typeof e)return e;const s=new C;return s.read(e,i),s}let C=y=class extends a.A{constructor(e){super(e),this.axis=null,this.legendOptions=null,this.normalizationField=null,this.scaleBy=null,this.target=null,this.type="size",this.useSymbolValue=null,this.valueExpression=null,this.valueRepresentation=null,this.valueUnit=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null,isScaleDriven:null!=this.valueExpression&&f.RV.test(this.valueExpression)}}set index(e){(0,m.of)(this.maxSize)&&(this.maxSize.index=`visualVariables[${e}].maxSize`),(0,m.of)(this.minSize)&&(this.minSize.index=`visualVariables[${e}].minSize`),this._set("index",e)}get inputValueType(){return(0,m.eh)(this)}set maxDataValue(e){e&&this.stops&&(n.A.getLogger(this).warn("cannot set maxDataValue when stops is not null."),e=null),this._set("maxDataValue",e)}get maxSize(){return this._get("maxSize")}set maxSize(e){e&&this.stops&&(n.A.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",V(e))}readMaxSize(e,t,i){return S(e,0,i)}set minDataValue(e){e&&this.stops&&(n.A.getLogger(this).warn("cannot set minDataValue when stops is not null."),e=null),this._set("minDataValue",e)}get minSize(){return this._get("minSize")}set minSize(e){e&&this.stops&&(n.A.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",V(e))}readMinSize(e,t,i){return S(e,0,i)}get arcadeRequired(){return!!this.valueExpression||null!=this.minSize&&"object"==typeof this.minSize&&this.minSize.arcadeRequired||null!=this.maxSize&&"object"==typeof this.maxSize&&this.maxSize.arcadeRequired}set stops(e){null==this.minDataValue&&null==this.maxDataValue&&null==this.minSize&&null==this.maxSize?e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value):e&&(n.A.getLogger(this).warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."),e=null),this._set("stops",e)}get transformationType(){return(0,m.KZ)(this,this.inputValueType)}readValueExpression(e,t){return e||t.expression&&"$view.scale"}writeValueExpressionWebScene(e,t,i,s){if("$view.scale"===e){if(s?.messages){const e=this.index,t="string"==typeof e?e:`visualVariables[${e}]`;s.messages.push(new l.A("property:unsupported",this.type+"VisualVariable.valueExpression = '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.",{instance:this,propertyName:t+".valueExpression",context:s}))}}else t[i]=e}readValueUnit(e){return e?w.read(e):null}clone(){return new y({axis:this.axis,field:this.field,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,maxDataValue:this.maxDataValue,maxSize:(0,m.of)(this.maxSize)?this.maxSize.clone():this.maxSize,minDataValue:this.minDataValue,minSize:(0,m.of)(this.minSize)?this.minSize.clone():this.minSize,normalizationField:this.normalizationField,stops:this.stops?.map(e=>e.clone()),target:this.target,useSymbolValue:this.useSymbolValue,valueRepresentation:this.valueRepresentation,valueUnit:this.valueUnit,legendOptions:this.legendOptions?.clone()})}flipSizes(){if("clamped-linear"===this.transformationType){const{minSize:e,maxSize:t}=this;return this.minSize=t,this.maxSize=e,this}if("stops"===this.transformationType){const e=this.stops;if(!e)return this;const t=e.map(e=>e.size).reverse(),i=e.length;for(let s=0;s<i;s++)e[s].size=t[s];return this}return this}getAttributeHash(){return`${super.getAttributeHash()}-${this.target}-${this.normalizationField}`}_interpolateData(){return this.stops?.map(e=>e.value||0)}};(0,s.Cg)([(0,o.MZ)({readOnly:!0})],C.prototype,"cache",null),(0,s.Cg)([(0,o.MZ)({type:b.apiValues,json:{type:b.jsonValues,origins:{"web-map":{read:!1}},read:b.read,write:b.write}})],C.prototype,"axis",void 0),(0,s.Cg)([(0,o.MZ)()],C.prototype,"index",null),(0,s.Cg)([(0,o.MZ)({type:String,readOnly:!0})],C.prototype,"inputValueType",null),(0,s.Cg)([(0,o.MZ)({type:h,json:{write:!0}})],C.prototype,"legendOptions",void 0),(0,s.Cg)([(0,o.MZ)({type:Number,value:null,json:{write:!0}})],C.prototype,"maxDataValue",null),(0,s.Cg)([(0,o.MZ)({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],C.prototype,"maxSize",null),(0,s.Cg)([(0,g.w)("maxSize")],C.prototype,"readMaxSize",null),(0,s.Cg)([(0,o.MZ)({type:Number,value:null,json:{write:!0}})],C.prototype,"minDataValue",null),(0,s.Cg)([(0,o.MZ)({type:Number,useTypeForAutocast:!1,value:null,json:{write:!0}})],C.prototype,"minSize",null),(0,s.Cg)([(0,g.w)("minSize")],C.prototype,"readMinSize",null),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],C.prototype,"normalizationField",void 0),(0,s.Cg)([(0,o.MZ)({readOnly:!0})],C.prototype,"arcadeRequired",null),(0,s.Cg)([(0,o.MZ)({type:String})],C.prototype,"scaleBy",void 0),(0,s.Cg)([(0,o.MZ)({type:[p.A],value:null,json:{write:!0}})],C.prototype,"stops",null),(0,s.Cg)([(0,o.MZ)({type:["outline"],json:{write:!0}})],C.prototype,"target",void 0),(0,s.Cg)([(0,o.MZ)({type:String,readOnly:!0})],C.prototype,"transformationType",null),(0,s.Cg)([(0,o.MZ)({type:["size"],json:{type:["sizeInfo"]}})],C.prototype,"type",void 0),(0,s.Cg)([(0,o.MZ)({type:Boolean,json:{write:!0,origins:{"web-map":{read:!1}}}})],C.prototype,"useSymbolValue",void 0),(0,s.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],C.prototype,"valueExpression",void 0),(0,s.Cg)([(0,g.w)("valueExpression",["valueExpression","expression"])],C.prototype,"readValueExpression",null),(0,s.Cg)([(0,v.K)("web-scene","valueExpression")],C.prototype,"writeValueExpressionWebScene",null),(0,s.Cg)([(0,o.MZ)({type:["radius","diameter","area","width","distance"],json:{write:!0}})],C.prototype,"valueRepresentation",void 0),(0,s.Cg)([(0,o.MZ)({type:w.apiValues,json:{write:w.write,origins:{"web-map":{read:!1},"web-scene":{write:!0},"portal-item":{write:!0}}}})],C.prototype,"valueUnit",void 0),(0,s.Cg)([(0,g.w)("valueUnit")],C.prototype,"readValueUnit",null),C=y=(0,s.Cg)([(0,o.$K)("esri.renderers.visualVariables.SizeVariable")],C)},49849:(e,t,i)=>{i.d(t,{As:()=>c,Ug:()=>d,Wp:()=>p,z4:()=>u});var s=i(93637),l=i(90360),r=i(65365),n=i(20378),o=i(73838),a=i(33910);const u={types:a.xK,json:{write:{writer:o.M9},origins:{"web-scene":{types:a.On,write:{writer:o.M9},read:{reader:(0,l.C)({types:a.On})}}}}},p=(0,s.$N)({json:{origins:{"web-scene":{write:{isRequired:!0}}}}},u),c={types:{base:n.A,key:"type",typeMap:{"simple-fill":a.Es.typeMap["simple-fill"],"picture-fill":a.Es.typeMap["picture-fill"],"polygon-3d":a.Es.typeMap["polygon-3d"],cim:a.Es.typeMap.cim}},json:{write:{writer:o.M9},origins:{"web-scene":{type:r.A,write:{writer:o.M9}}}}},d={cast:e=>null==e||"string"==typeof e||"number"==typeof e?e:`${e}`,json:{type:String,write:{writer:(e,t)=>{t.value=e?.toString()}}}}},60999:(e,t,i)=>{i.d(t,{DZ:()=>y,Ke:()=>h,Tj:()=>p,UT:()=>m,aD:()=>g,jJ:()=>u});var s=i(31635),l=i(69622),r=i(97768),n=i(74887),o=i(10107),a=i(64108);function u(e,t,i){return(0,n.Lx)(e.map((e,s)=>t.apply(i,[e,s])))}async function p(e,t,i){return(await(0,n.Lx)(e.map((e,s)=>t.apply(i,[e,s])))).map(e=>e.value)}function c(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function h(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return c(await e)}catch(e){return d(e)}}async function y(e){try{return c(await e)}catch(e){return(0,n.QP)(e),d(e)}}function m(e,t){return new f(e,t)}let f=class extends l.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,r.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then(e=>{this._result=c(e),this._cleanup()},e=>{this._result=d(e),this._cleanup()}),this._abortHandle=(0,n.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,r.xt)(this._abortHandle),this._abortController=null}};(0,s.Cg)([(0,o.MZ)()],f.prototype,"value",null),(0,s.Cg)([(0,o.MZ)()],f.prototype,"error",null),(0,s.Cg)([(0,o.MZ)()],f.prototype,"finished",null),(0,s.Cg)([(0,o.MZ)()],f.prototype,"promise",void 0),(0,s.Cg)([(0,o.MZ)()],f.prototype,"_result",void 0),f=(0,s.Cg)([(0,a.$)("esri.core.asyncUtils.ReactiveTask")],f);class g{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,s.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,s.hk)(t)}}}},62724:(e,t,i)=>{i.d(t,{A:()=>m});var s,l=i(31635),r=i(91429),n=i(2795),o=i(25482),a=i(56507),u=i(78553),p=i(36005),c=i(43937);let d=s=class extends o.o{constructor(e){super(e),this.label=null,this.opacity=null,this.value=null}readOpacity(e,t){return(0,u.D)(t.transparency)}writeOpacity(e,t,i){t[i]=(0,u.p)(e)}clone(){return new s({label:this.label,opacity:this.opacity,value:this.value})}};(0,l.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],d.prototype,"label",void 0),(0,l.Cg)([(0,r.MZ)({type:Number,json:{type:a.jz,write:{target:"transparency",isRequired:!0}}})],d.prototype,"opacity",void 0),(0,l.Cg)([(0,p.w)("opacity",["transparency"])],d.prototype,"readOpacity",null),(0,l.Cg)([(0,c.K)("opacity")],d.prototype,"writeOpacity",null),(0,l.Cg)([(0,r.MZ)({type:Number,json:{write:{isRequired:!0}}})],d.prototype,"value",void 0),d=s=(0,l.Cg)([(0,r.$K)("esri.renderers.visualVariables.support.OpacityStop")],d);const h=d;var y;let m=y=class extends n.A{constructor(e){super(e),this.type="opacity",this.normalizationField=null}get cache(){return{ipData:this._interpolateData(),hasExpression:!!this.valueExpression,compiledFunc:null}}set stops(e){e&&Array.isArray(e)&&(e=e.filter(e=>!!e)).sort((e,t)=>e.value-t.value),this._set("stops",e)}clone(){return new y({field:this.field,normalizationField:this.normalizationField,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,stops:this.stops&&this.stops.map(e=>e.clone()),legendOptions:this.legendOptions?.clone()})}getAttributeHash(){return`${super.getAttributeHash()}-${this.normalizationField}`}_interpolateData(){return this.stops&&this.stops.map(e=>e.value||0)}};(0,l.Cg)([(0,r.MZ)({readOnly:!0})],m.prototype,"cache",null),(0,l.Cg)([(0,r.MZ)({type:["opacity"],json:{type:["transparencyInfo"]}})],m.prototype,"type",void 0),(0,l.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],m.prototype,"normalizationField",void 0),(0,l.Cg)([(0,r.MZ)({type:[h],json:{write:!0}})],m.prototype,"stops",null),m=y=(0,l.Cg)([(0,r.$K)("esri.renderers.visualVariables.OpacityVariable")],m)},63988:(e,t,i)=>{i.d(t,{h:()=>C});var s=i(31635),l=i(91429),r=i(30524),n=i(2024),o=i(62724),a=i(23461),u=i(48940),p=i(2795),c=i(69622),d=i(66552),h=i(53966),y=i(67076);const m={color:n.A,size:u.A,opacity:o.A,rotation:a.A},f=new d.J({colorInfo:"color",transparencyInfo:"opacity",rotationInfo:"rotation",sizeInfo:"size"}),g=/^\[([^\]]+)\]$/i;let v=class extends c.A{constructor(){super(...arguments),this.colorVariables=null,this.opacityVariables=null,this.rotationVariables=null,this.sizeVariables=null}set visualVariables(e){if(this._resetVariables(),e=e?.filter(e=>!!e),e?.length){for(const t of e)switch(t.type){case"color":this.colorVariables.push(t);break;case"opacity":this.opacityVariables.push(t);break;case"rotation":this.rotationVariables.push(t);break;case"size":this.sizeVariables.push(t)}this.sizeVariables.length&&this.sizeVariables.some(e=>!!e.target)&&e.sort((e,t)=>{let i=null;return i=e.target===t.target?0:e.target?1:-1,i});for(let t=0;t<e.length;t++)e[t].index=t;this._set("visualVariables",e)}else this._set("visualVariables",e)}readVariables(e,t,i){const{rotationExpression:s,rotationType:l}=t,r=s?.match(g),n=r?.[1];if(n&&(e||(e=[]),e.push({type:"rotationInfo",rotationType:l,field:n})),e)return e.map(e=>{const t=f.read(e.type),s=m[t];s||(h.A.getLogger(this).warn(`Unknown variable type: ${t}`),i?.messages&&i.messages.push(new y.A("visual-variable:unsupported",`visualVariable of type '${t}' is not supported`,{definition:e,context:i})));const l=new s;return l.read(e,i),l})}writeVariables(e,t){const i=[];for(const s of e){const e=s.toJSON(t);e&&i.push(e)}return i}_resetVariables(){this.colorVariables=[],this.opacityVariables=[],this.rotationVariables=[],this.sizeVariables=[]}};(0,s.Cg)([(0,l.MZ)()],v.prototype,"visualVariables",null),v=(0,s.Cg)([(0,l.$K)("esri.renderers.visualVariables.VisualVariableFactory")],v);var b=i(69309),w=i(36005),V=i(43937);const S={base:p.A,key:"type",typeMap:{opacity:o.A,color:n.A,rotation:a.A,size:u.A}},C=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this._vvFactory=new v}set visualVariables(e){this._vvFactory.visualVariables=e,this._set("visualVariables",this._vvFactory.visualVariables)}readVisualVariables(e,t,i){return this._vvFactory.readVariables(e,t,i)}writeVisualVariables(e,t,i,s){t[i]=this._vvFactory.writeVariables(e,s)}get arcadeRequiredForVisualVariables(){return this.visualVariables?.some(({arcadeRequired:e})=>e)??!1}hasVisualVariables(e,t){return e?this.getVisualVariablesForType(e,t).length>0:this.getVisualVariablesForType("size",t).length>0||this.getVisualVariablesForType("color",t).length>0||this.getVisualVariablesForType("opacity",t).length>0||this.getVisualVariablesForType("rotation",t).length>0}getVisualVariablesForType(e,t){return this.visualVariables?.filter(i=>i.type===e&&("string"==typeof t?i.target===t:!1!==t||!i.target))??[]}async collectVVRequiredFields(e,t){let i=[];this.visualVariables&&(i=i.concat(this.visualVariables));for(const s of i)s&&(s.field&&(0,r.rq)(e,t,s.field),s.normalizationField&&(0,r.rq)(e,t,s.normalizationField),s.valueExpression&&(x(s.valueExpression,e,t)||await(0,r.Dx)(e,t,null,s.valueExpression)))}};return(0,s.Cg)([(0,l.MZ)({types:[S],value:null,json:{write:!0}})],i.prototype,"visualVariables",null),(0,s.Cg)([(0,w.w)("visualVariables",["visualVariables","rotationType","rotationExpression"])],i.prototype,"readVisualVariables",null),(0,s.Cg)([(0,V.K)("visualVariables")],i.prototype,"writeVisualVariables",null),i=(0,s.Cg)([(0,l.$K)("esri.renderers.mixins.VisualVariablesMixin")],i),i};function x(e,t,i){const s=(0,b.D)(e);return null!=s&&((0,r.rq)(t,i,s),!0)}},72500:(e,t,i)=>{i.d(t,{A:()=>c});var s,l=i(31635),r=i(68197),n=i(25482),o=i(91429),a=i(56507),u=i(43937);let p=s=class extends n.o{constructor(e){super(e),this.color=null,this.label=null,this.value=null}writeValue(e,t,i){t[i]=e??0}clone(){return new s({color:this.color&&this.color.clone(),label:this.label,value:this.value})}};(0,l.Cg)([(0,o.MZ)({type:r.A,json:{type:[a.jz],write:{isRequired:!0}}})],p.prototype,"color",void 0),(0,l.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,l.Cg)([(0,o.MZ)({type:Number,json:{write:{writerEnsuresNonNull:!0}}})],p.prototype,"value",void 0),(0,l.Cg)([(0,u.K)("value")],p.prototype,"writeValue",null),p=s=(0,l.Cg)([(0,o.$K)("esri.renderers.visualVariables.support.ColorStop")],p);const c=p},72606:(e,t,i)=>{i.d(t,{A:()=>n});var s=i(31635),l=i(25482),r=i(91429);let n=class extends l.o{constructor(e){super(e),this.type=null}};(0,s.Cg)([(0,r.MZ)({readOnly:!0,json:{read:!1,write:!0}})],n.prototype,"type",void 0),n=(0,s.Cg)([(0,r.$K)("esri.rest.support.ColorRamp")],n)},73838:(e,t,i)=>{i.d(t,{rS:()=>k,M9:()=>j,oO:()=>Z});var s=i(49186),l=i(93637),r=i(77548),n=i(37757),o=i(13313),a=i(97887),u=i(68548),p=i(58592),c=i(75981),d=i(65365),h=i(94985),y=i(31593),m=i(53930),f=i(68249),g=i(68197),v=i(7762),b=(i(44208),i(90629)),w=i(27845),V=i(11506),S=i(39065),C=i(59868),x=i(93470);c.A.fromSimpleMarkerSymbol(C.UK),a.A.fromSimpleLineSymbol(C.A7),d.A.fromSimpleFillSymbol(C.Cx),new u.A({symbolLayers:new v.A([new w.A({material:{color:x.fT},edges:new S.A({size:(0,b.PN)(1),color:new g.A(x.JR)})})])});const M=new a.A({symbolLayers:new v.A([new V.A({material:{color:new g.A([0,0,0])},size:(0,b.PN)(1)})])}),z=new d.A({symbolLayers:new v.A([new w.A({outline:{color:new g.A([0,0,0]),size:(0,b.PN)(1)}})])});var _=i(33910);const I="#useCIMFallbackSymbology()",A={retainId:!1,ignoreDrivers:!1,hasLabelingContext:!0};function j(e,t,i,s){const r=F(e,{},{context:s,isLabelSymbol:!1});null!=r&&(0,l.sM)(i,r,t)}function Z(e,t,i,s){const l=F(e,{},{context:s,isLabelSymbol:!0});null!=l&&(t[i]=l)}function q(e){return(0,_.wk)(e)||e instanceof n.A}function F(e,t,i){if(null==e)return null;const{context:l,isLabelSymbol:g}=i,v=l?.origin,b=l?.messages;if("web-scene"===v&&!q(e)){const i=function(e,t=A){if(!e)return{symbol:null};const{retainId:i=A.retainId,ignoreDrivers:l=A.ignoreDrivers,hasLabelingContext:r=A.hasLabelingContext,retainCIM:g=A.retainCIM,cimFallbackEnabled:v=A.cimFallbackEnabled}=t;let b=null;if((0,_.wk)(e))b=e.clone();else if("web-style"===e.type)b=e.clone();else if("cim"===e.type){const i=e.data?.symbol?.type;switch(i){case"CIMPointSymbol":b=g?e.clone():c.A.fromCIMSymbol(e);break;case"CIMLineSymbol":v&&(b=M.clone(),t?.logWarning?.(I,"Unsupported CIM line symbology converted to fallback 3D line symbology"));break;case"CIMPolygonSymbol":v&&(b=z.clone(),t?.logWarning?.(I,"Unsupported CIM polygon symbology converted to fallback 3D polygon symbology"))}if(!b)return{error:new s.A("symbol-conversion:unsupported-cim-symbol",`CIM symbol of type '${i||"unknown"}' is unsupported in 3D`,{symbol:e})}}else if(e instanceof y.A)b=a.A.fromSimpleLineSymbol(e);else if(e instanceof m.A)b=c.A.fromSimpleMarkerSymbol(e);else if(e instanceof p.A)b=c.A.fromPictureMarkerSymbol(e);else if(e instanceof h.A)b=t.geometryType&&"mesh"===t.geometryType?u.A.fromSimpleFillSymbol(e):d.A.fromSimpleFillSymbol(e);else{if(!(e instanceof f.A))return{error:new s.A("symbol-conversion:unsupported-2d-symbol",`2D symbol of type '${e.type||e.declaredClass}' is unsupported in 3D`,{symbol:e})};b=r?o.A.fromTextSymbol(e):c.A.fromTextSymbol(e)}return i&&b&&"cim"!==b.type&&(b.id=e.id),!l||"cim"===b.type||b instanceof n.A||b.symbolLayers.forEach(e=>e.ignoreDrivers=!0),{symbol:b}}(e,{retainCIM:!0,hasLabelingContext:g});return null!=i.symbol?i.symbol.write(t,l):(b?.push(new s.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`,{symbol:e,context:l,error:i.error})),null)}return(0,r.TU)(l?.layer)&&(w=e,"polygon-3d"===w?.type||"line-3d"===w?.type)?(b?.push(new s.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported on layers of type '${l?.layer?.declaredClass}'.`,{symbol:e,context:l})),null):("web-map"===v||"portal-item"===v&&!(0,r.TU)(l?.layer))&&q(e)?(b?.push(new s.A("symbol:unsupported",`Symbols of type '${e.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:e,context:l})),null):e.write(t,l);var w}function k(e,t){return(0,_.Bu)(e,null,t)}},85594:(e,t,i)=>{i.d(t,{jg:()=>v,cF:()=>c,bo:()=>d,yA:()=>m,o5:()=>h});var s=i(11254),l=i(49186),r=i(44208),n=i(74887),o=i(84952),a=i(20655),u=i(16405);const p=new Map;function c(e,t,i){return null!=e?.styleUrl?async function(e,t){try{return{data:(await m(e,t)).data,baseUrl:(0,o.nM)(e),styleUrl:e}}catch(e){return(0,n.QP)(e),null}}(e.styleUrl,i):null!=e?.styleName?function(e,t,i){const s=null!=t.portal?t.portal:a.A.getDefault();let r;const n=`${s.url} - ${s.user?.username} - ${e}`,o=p.get(n);if(o)return o;const c=function(e,t,i){return t.load(i).then(()=>{const s=new u.A({disableExtraQuery:!0,query:`owner:${f} AND type:${g} AND typekeywords:"${e}"`});return t.queryItems(s,i)}).then(({results:t})=>{let s=null;const r=e.toLowerCase();if(t&&Array.isArray(t))for(const e of t){const t=e.typeKeywords?.some(e=>e.toLowerCase()===r);if(t&&e.type===g&&e.owner===f){s=e;break}}if(!s)throw new l.A("symbolstyleutils:style-not-found",`The style '${e}' could not be found`,{styleName:e});return s.load(i)})}(e,s,i).then(e=>(r=e,e.fetchData())).then(t=>({data:t,baseUrl:r.itemUrl??"",styleName:e}));return p.set(n,c),c}(e.styleName,t,i):Promise.reject(new l.A("symbolstyleutils:style-url-and-name-missing","Either styleUrl or styleName is required to resolve a style"))}function d(e){return null===e||"CIMSymbolReference"===e.type?e:{type:"CIMSymbolReference",symbol:e}}function h(e,t){for(const i of t)switch(i){case"cim":if(e.cimRef)return{format:i,url:encodeURI(e.cimRef)};break;case"web-gltf-basisu":{const t=y(e,"gltf_basisu");if(t)return{format:i,url:t};break}case"web-gltf":{const t=y(e,"gltf");if(t)return{format:i,url:t};break}case"web":{const t=y(e,"gltf");if(t)return{format:"web-gltf",url:t};if(e.webRef)return{format:i,url:encodeURI(e.webRef)};break}}}function y(e,t){if(!(0,r.A)("enable-feature:force-wosr"))return e.formatInfos?.find(e=>e.type===t)?.href}function m(e,t){const i={responseType:"json",query:{f:"json"},...t};return(0,s.A)((0,o.S8)(e),i)}const f="esri_en",g="Style",v="https://cdn.arcgis.com/sharing/rest/content/items/220936cc6ed342c9937abd8f180e7d1e/resources/styles/cim/{SymbolName}.json?f=json"},86162:(e,t,i)=>{i.d(t,{A:()=>M});var s,l=i(31635),r=i(66552),n=i(4718),o=i(53966),a=i(91429),u=i(56507),p=i(30524),c=i(92438),d=i(63988),h=i(88542),y=i(49849),m=i(20061),f=i(43668),g=i(33910),v=i(36005),b=i(43937),w=i(93223);const V="percent-of-total",S="field",C=new r.J({esriNormalizeByLog:"log",esriNormalizeByPercentOfTotal:V,esriNormalizeByField:S}),x=(0,u.dp)(h.A);let M=s=class extends((0,d.h)(c.A)){constructor(e){super(e),this._compiledValueExpression={valueExpression:null,compiledFunction:null},this.backgroundFillSymbol=null,this.classBreakInfos=null,this.defaultLabel=null,this.defaultSymbol=null,this.field=null,this.isMaxInclusive=!0,this.legendOptions=null,this.normalizationField=null,this.normalizationTotal=null,this.type="class-breaks",this.valueExpression=null,this.valueExpressionTitle=null,this._set("classBreakInfos",[])}readClassBreakInfos(e,t,i){if(!Array.isArray(e))return;let s=t.minValue;return e.map(e=>{const t=new h.A;return t.read(e,i),null==t.minValue&&(t.minValue=s),null==t.maxValue&&(t.maxValue=t.minValue),s=t.maxValue,t})}writeClassBreakInfos(e,t,i,s){const l=e.map(e=>e.write({},s));this._areClassBreaksConsecutive()&&l.forEach(e=>delete e.classMinValue),t[i]=l}castField(e){return null==e?e:"function"==typeof e?(o.A.getLogger(this).error(".field: field must be a string value"),null):(0,u.GX)(e)}get minValue(){return this.classBreakInfos&&this.classBreakInfos[0]&&this.classBreakInfos[0].minValue||0}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,i=null!=this.normalizationTotal;return t||i?(e=t&&S||i&&V||null,t&&i&&o.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==S&&e!==V||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}addClassBreakInfo(e,t,i){let s=null;s="number"==typeof e?new h.A({minValue:e,maxValue:t,symbol:(0,g.dp)(i)}):x((0,n.o8)(e)),this.classBreakInfos.push(s),1===this.classBreakInfos.length&&this.notifyChange("minValue")}removeClassBreakInfo(e,t){const i=this.classBreakInfos.length;for(let s=0;s<i;s++){const i=[this.classBreakInfos[s].minValue,this.classBreakInfos[s].maxValue];if(i[0]===e&&i[1]===t){this.classBreakInfos.splice(s,1);break}}}getBreakIndex(e,t){return this.valueExpression&&null==t?.arcade&&o.A.getLogger(this).warn(""),this.valueExpression?this._getBreakIndexForExpression(e,t):this._getBreakIndexForField(e)}async getClassBreakInfo(e,t){let i=t;this.valueExpression&&null==t?.arcade&&(i={...i,arcade:await(0,f.l)()});const s=this.getBreakIndex(e,i);return-1!==s?this.classBreakInfos[s]:null}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void o.A.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this.getBreakIndex(e,t);return i>-1?this.classBreakInfos[i].symbol:this.defaultSymbol}async getSymbolAsync(e,t){let i=t;if(this.valueExpression&&null==t?.arcade){const e=await(0,f.l)(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),i={...i,arcade:e}}const s=this.getBreakIndex(e,i);return s>-1?this.classBreakInfos[s].symbol:this.defaultSymbol}get symbols(){const e=[];return this.classBreakInfos.forEach(t=>{t.symbol&&e.push(t.symbol)}),this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),i=`${this.normalizationField}.${this.normalizationType}.${this.normalizationTotal}`;return`${e}.${t}.${this.classBreakInfos.reduce((e,t)=>e+t.getMeshHash(),"")}.${i}.${this.field}.${this.valueExpression}`}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}clone(){return new s({field:this.field,backgroundFillSymbol:this.backgroundFillSymbol?.clone(),defaultLabel:this.defaultLabel,defaultSymbol:this.defaultSymbol?.clone(),valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,classBreakInfos:(0,n.o8)(this.classBreakInfos),isMaxInclusive:this.isMaxInclusive,normalizationField:this.normalizationField,normalizationTotal:this.normalizationTotal,normalizationType:this.normalizationType,visualVariables:(0,n.o8)(this.visualVariables),legendOptions:(0,n.o8)(this.legendOptions),authoringInfo:(0,n.o8)(this.authoringInfo)})}async collectRequiredFields(e,t){const i=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(i)}async collectSymbolFields(e,t){const i=[...this.symbols.map(i=>i.collectRequiredFields(e,t)),(0,p.Dx)(e,t,null,this.valueExpression)];(0,p.rq)(e,t,this.field),(0,p.rq)(e,t,this.normalizationField),await Promise.all(i)}_getBreakIndexForExpression(e,t){const{viewingMode:i,scale:s,spatialReference:l,arcade:r,timeZone:n}=t??{},{valueExpression:o}=this;let a=this._compiledValueExpression.valueExpression===o?this._compiledValueExpression.compiledFunction:null;const u=r.arcadeUtils;if(!a){const e=u.createSyntaxTree(o);a=u.createFunction(e),this._compiledValueExpression.compiledFunction=a}this._compiledValueExpression.valueExpression=o;const p=u.executeFunction(a,u.createExecContext(e,u.getViewInfo({viewingMode:i,scale:s,spatialReference:l}),n));return this._getBreakIndexfromInfos(p)}_getBreakIndexForField(e){const t=this.field,i=e.attributes,s=this.normalizationType;let l=parseFloat(i[t]);if(s){const e=this.normalizationTotal,t=parseFloat(this.normalizationField?i[this.normalizationField]:void 0);if("log"===s)l=Math.log(l)*Math.LOG10E;else if(s!==V||null==e||isNaN(e)){if(s===S&&!isNaN(t)){if(isNaN(l)||isNaN(t))return-1;l/=t}}else l=l/e*100}return this._getBreakIndexfromInfos(l)}_getBreakIndexfromInfos(e){const t=this.isMaxInclusive;if(null!=e&&"number"==typeof e&&!isNaN(e))for(let i=0;i<this.classBreakInfos.length;i++){const s=[this.classBreakInfos[i].minValue,this.classBreakInfos[i].maxValue];if(s[0]<=e&&(t?e<=s[1]:e<s[1]))return i}return-1}_areClassBreaksConsecutive(){const e=this.classBreakInfos,t=e.length;for(let i=1;i<t;i++)if(e[i-1].maxValue!==e[i].minValue)return!1;return!0}};(0,l.Cg)([(0,a.MZ)(y.As)],M.prototype,"backgroundFillSymbol",void 0),(0,l.Cg)([(0,a.MZ)({type:[h.A],json:{write:{isRequired:!0}}})],M.prototype,"classBreakInfos",void 0),(0,l.Cg)([(0,v.w)("classBreakInfos")],M.prototype,"readClassBreakInfos",null),(0,l.Cg)([(0,b.K)("classBreakInfos")],M.prototype,"writeClassBreakInfos",null),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],M.prototype,"defaultLabel",void 0),(0,l.Cg)([(0,a.MZ)(y.z4)],M.prototype,"defaultSymbol",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],M.prototype,"field",void 0),(0,l.Cg)([(0,a.wg)("field")],M.prototype,"castField",null),(0,l.Cg)([(0,a.MZ)({type:Boolean})],M.prototype,"isMaxInclusive",void 0),(0,l.Cg)([(0,a.MZ)({type:m.A,json:{write:!0}})],M.prototype,"legendOptions",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,readOnly:!0,value:null,json:{read:!1,write:{overridePolicy(){return 0!==this.classBreakInfos.length&&this._areClassBreaksConsecutive()?{enabled:!0}:{enabled:!1}}}}})],M.prototype,"minValue",null),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],M.prototype,"normalizationField",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],M.prototype,"normalizationTotal",void 0),(0,l.Cg)([(0,a.MZ)({type:C.apiValues,value:null,json:{type:C.jsonValues,read:C.read,write:C.write}})],M.prototype,"normalizationType",null),(0,l.Cg)([(0,w.e)({classBreaks:"class-breaks"})],M.prototype,"type",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],M.prototype,"valueExpression",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],M.prototype,"valueExpressionTitle",void 0),M=s=(0,l.Cg)([(0,a.$K)("esri.renderers.ClassBreaksRenderer")],M)},88542:(e,t,i)=>{i.d(t,{A:()=>a});var s,l=i(31635),r=i(25482),n=i(91429),o=i(49849);let a=s=class extends r.o{constructor(e){super(e),this.description=null,this.label=null,this.minValue=null,this.maxValue=0,this.symbol=null}clone(){return new s({description:this.description,label:this.label,minValue:this.minValue,maxValue:this.maxValue,symbol:this.symbol?.clone()??null})}getMeshHash(){const e=JSON.stringify(this.symbol);return`${this.minValue}.${this.maxValue}.${e}`}};(0,l.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"description",void 0),(0,l.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"label",void 0),(0,l.Cg)([(0,n.MZ)({type:Number,json:{read:{source:"classMinValue"},write:{target:"classMinValue"}}})],a.prototype,"minValue",void 0),(0,l.Cg)([(0,n.MZ)({type:Number,json:{read:{source:"classMaxValue"},write:{target:"classMaxValue"}}})],a.prototype,"maxValue",void 0),(0,l.Cg)([(0,n.MZ)(o.Wp)],a.prototype,"symbol",void 0),a=s=(0,l.Cg)([(0,n.$K)("esri.renderers.support.ClassBreakInfo")],a)},92438:(e,t,i)=>{i.d(t,{A:()=>u});var s=i(31635),l=i(66552),r=i(25482),n=i(91429),o=i(30943);const a=new l.J({simple:"simple",uniqueValue:"unique-value",classBreaks:"class-breaks",heatmap:"heatmap",dotDensity:"dot-density",dictionary:"dictionary",pieChart:"pie-chart"},{ignoreUnknown:!0});let u=class extends r.o{constructor(e){super(e),this.authoringInfo=null,this.type=null}async getRequiredFields(e){if(!this.collectRequiredFields)return[];const t=new Set;return await this.collectRequiredFields(t,e),Array.from(t).sort()}getSymbol(e,t){}async getSymbolAsync(e,t){}get symbols(){return[]}get arcadeRequired(){return!1}getAttributeHash(){return JSON.stringify(this)}getMeshHash(){return JSON.stringify(this)}};(0,s.Cg)([(0,n.MZ)({type:o.A,json:{write:!0}})],u.prototype,"authoringInfo",void 0),(0,s.Cg)([(0,n.MZ)({type:a.apiValues,readOnly:!0,json:{type:a.jsonValues,read:!1,write:{writer:a.write,ignoreOrigin:!0,isRequired:!0}}})],u.prototype,"type",void 0),u=(0,s.Cg)([(0,n.$K)("esri.renderers.Renderer")],u)},93618:(e,t,i)=>{i.d(t,{A:()=>O});var s=i(31635),l=i(49186),r=i(4718),n=i(53966),o=i(93637),a=i(36708),u=i(91429),p=i(6797),c=i(56507),d=i(30524),h=i(20655),y=i(92438),m=i(63988),f=i(49849),g=i(20061),v=i(69540),b=i(25482);let w=class extends((0,v.OU)(b.o)){constructor(e){super(e),this.value=null,this.value2=null,this.value3=null}};(0,s.Cg)([(0,u.MZ)(f.Ug)],w.prototype,"value",void 0),(0,s.Cg)([(0,u.MZ)(f.Ug)],w.prototype,"value2",void 0),(0,s.Cg)([(0,u.MZ)(f.Ug)],w.prototype,"value3",void 0),w=(0,s.Cg)([(0,u.$K)("esri.renderers.support.UniqueValue")],w);var V=i(4576);let S=class extends((0,v.OU)(b.o)){constructor(e){super(e),this.description=null,this.label=null,this.symbol=null}get values(){return this._get("values")}set values(e){if(null!=e){const t=typeof(e=Array.isArray(e)?e:[e])[0];e="string"===t||"number"===t?e.map(e=>new w({value:e})):"object"===t?e[0]instanceof w?e:e.map(e=>new w(e)):null}this._set("values",e)}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"description",void 0),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],S.prototype,"label",void 0),(0,s.Cg)([(0,u.MZ)(f.z4)],S.prototype,"symbol",void 0),(0,s.Cg)([(0,u.MZ)({json:{type:[[String]],read:{reader:e=>e?e.map(e=>new w({value:e[0],value2:e[1],value3:e[2]})):null},write:{writer:(e,t)=>{const i=[];for(const t of e){const e=[t.value,t.value2,t.value3].filter(V.Ru).map(e=>e.toString());i.push(e)}t.values=i}}}})],S.prototype,"values",null),S=(0,s.Cg)([(0,u.$K)("esri.renderers.support.UniqueValueClass")],S);let C=class extends((0,v.OU)(b.o)){constructor(e){super(e),this.heading=null,this.classes=null}};(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],C.prototype,"heading",void 0),(0,s.Cg)([(0,u.MZ)({type:[S],json:{write:{isRequired:!0}}})],C.prototype,"classes",void 0),C=(0,s.Cg)([(0,u.$K)("esri.renderers.support.UniqueValueGroup")],C);var x,M=i(94833),z=i(43668),_=i(97159),I=i(37757),A=i(85594),j=i(33910),Z=i(93223),q=i(43937),F=i(36005);const k="uvInfos-watcher",E="uvGroups-watcher",U=(0,c.dp)(M.A);function T(e){return null!=e&&""!==e&&("string"!=typeof e||""!==e.trim()&&"<null>"!==e.toLowerCase())||(e=null),e+""}let O=x=class extends((0,m.h)(y.A)){constructor(e){super(e),this._valueInfoMap={},this._isDefaultSymbolDerived=!1,this._isInfosSource=null,this.type="unique-value",this.backgroundFillSymbol=null,this.orderByClassesEnabled=!1,this.valueExpressionTitle=null,this.legendOptions=null,this.defaultLabel=null,this.portal=null,this.styleOrigin=null,this.diff={uniqueValueInfos(e,t){if(!e&&!t)return;if(!e||!t)return{type:"complete",oldValue:e,newValue:t};let i=!1;const s={type:"collection",added:[],removed:[],changed:[],unchanged:[]};for(let l=0;l<t.length;l++){const r=e.find(e=>e.value===t[l].value);r?(0,p.Ui)(r,t[l])?(s.changed.push({type:"complete",oldValue:r,newValue:t[l]}),i=!0):s.unchanged.push({oldValue:r,newValue:t[l]}):(s.added.push(t[l]),i=!0)}for(let l=0;l<e.length;l++)t.find(t=>t.value===e[l].value)||(s.removed.push(e[l]),i=!0);return i?s:void 0}},this._set("uniqueValueInfos",[]),this._set("uniqueValueGroups",[])}get _cache(){return{compiledFunc:null}}set field(e){this._set("field",e),this._updateFieldDelimiter(),this._updateUniqueValues()}castField(e){return null==e||"function"==typeof e?e:(0,c.GX)(e)}writeField(e,t,i,s){"string"==typeof e?t[i]=e:s?.messages?s.messages.push(new l.A("property:unsupported","UniqueValueRenderer.field set to a function cannot be written to JSON")):n.A.getLogger(this).error(".field: cannot write field to JSON since it's not a string value")}set field2(e){this._set("field2",e),this._updateFieldDelimiter(),this._updateUniqueValues()}set field3(e){this._set("field3",e),this._updateUniqueValues()}set valueExpression(e){this._set("valueExpression",e),this._updateUniqueValues()}set defaultSymbol(e){this._isDefaultSymbolDerived=!1,this._set("defaultSymbol",e)}set fieldDelimiter(e){this._set("fieldDelimiter",e),this._updateUniqueValues()}readPortal(e,t,i){return i.portal||h.A.getDefault()}readStyleOrigin(e,t,i){if(t.styleName)return Object.freeze({styleName:t.styleName});if(t.styleUrl){const e=(0,_.f)(t.styleUrl,i);return Object.freeze({styleUrl:e})}}writeStyleOrigin(e,t,i,s){e.styleName?t.styleName=e.styleName:e.styleUrl&&(t.styleUrl=(0,_.t)(e.styleUrl,s))}set uniqueValueGroups(e){this.styleOrigin?n.A.getLogger(this).error("#uniqueValueGroups=","Cannot modify unique value groups of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueGroups",e),this._updateInfosFromGroups(),this._isInfosSource=!1,this._watchUniqueValueGroups())}set uniqueValueInfos(e){this.styleOrigin?n.A.getLogger(this).error("#uniqueValueInfos=","Cannot modify unique value infos of a UniqueValueRenderer created from a web style"):(this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos())}addUniqueValueInfo(e,t){if(this.styleOrigin)return void n.A.getLogger(this).error("#addUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");let i;i="object"==typeof e?U(e):new M.A({value:e,symbol:(0,j.dp)(t)}),this.uniqueValueInfos?.push(i),this._valueInfoMap[T(i.value)]=i,this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}removeUniqueValueInfo(e){if(this.styleOrigin)return void n.A.getLogger(this).error("#removeUniqueValueInfo()","Cannot modify unique value infos of a UniqueValueRenderer created from a web style");const t=this.uniqueValueInfos;if(t)for(let i=0;i<t.length;i++){const s=t[i];if(String(s.value)===String(e)){delete this._valueInfoMap[T(e)],t.splice(i,1);break}}this._updateGroupsFromInfos(),this._isInfosSource=!0,this._watchUniqueValueInfos()}async getUniqueValueInfo(e,t){let i=t;return this.valueExpression&&null==t?.arcade&&(i={...i,arcade:await(0,z.l)()}),this._getUniqueValueInfo(e,i)}getSymbol(e,t){if(this.valueExpression&&null==t?.arcade)return void n.A.getLogger(this).error("#getSymbol()","Please use getSymbolAsync if valueExpression is used");const i=this._getUniqueValueInfo(e,t);return i?.symbol||this.defaultSymbol}async getSymbolAsync(e,t){let i=t;if(this.valueExpression&&null==i?.arcade){const e=await(0,z.l)(),{arcadeUtils:t}=e;t.hasGeometryOperations(this.valueExpression)&&await t.enableGeometryOperations(),i={...i,arcade:e}}const s=this._getUniqueValueInfo(e,i);return s?.symbol||this.defaultSymbol}get symbols(){const e=[];if(this._isInfosSource)for(const t of this.uniqueValueInfos??[])t.symbol&&e.push(t.symbol);else for(const t of this.uniqueValueGroups??[])for(const i of t.classes??[])i.symbol&&e.push(i.symbol);return this.defaultSymbol&&e.push(this.defaultSymbol),e}getAttributeHash(){return this.visualVariables?.reduce((e,t)=>e+t.getAttributeHash(),"")??""}getMeshHash(){const e=JSON.stringify(this.backgroundFillSymbol),t=JSON.stringify(this.defaultSymbol),i=this.uniqueValueInfos?.reduce((e,t)=>e+t.getMeshHash(),"");return`${e}.${t}.${i}.${this.field}.${this.field2}.${this.field3}.${this.fieldDelimiter}.${this.valueExpression}`}clone(){const e=new x({field:this.field,field2:this.field2,field3:this.field3,defaultLabel:this.defaultLabel,defaultSymbol:(0,r.o8)(this.defaultSymbol),orderByClassesEnabled:this.orderByClassesEnabled,valueExpression:this.valueExpression,valueExpressionTitle:this.valueExpressionTitle,fieldDelimiter:this.fieldDelimiter,visualVariables:(0,r.o8)(this.visualVariables),legendOptions:(0,r.o8)(this.legendOptions),authoringInfo:(0,r.o8)(this.authoringInfo),backgroundFillSymbol:(0,r.o8)(this.backgroundFillSymbol)});this._isDefaultSymbolDerived&&(e._isDefaultSymbolDerived=!0),e._set("portal",this.portal);const t=(0,r.o8)(this.uniqueValueInfos),i=(0,r.o8)(this.uniqueValueGroups);return this.styleOrigin&&(e._set("styleOrigin",Object.freeze((0,r.o8)(this.styleOrigin))),Object.freeze(t),Object.freeze(i)),e._set("uniqueValueInfos",t),e._updateValueInfoMap(),e._set("uniqueValueGroups",i),e._isInfosSource=this._isInfosSource,e._watchUniqueValueInfosAndGroups(),e}get arcadeRequired(){return this.arcadeRequiredForVisualVariables||!!this.valueExpression}async collectRequiredFields(e,t){const i=[this.collectVVRequiredFields(e,t),this.collectSymbolFields(e,t)];await Promise.all(i)}async collectSymbolFields(e,t){const i=[...this.symbols.map(i=>i.collectRequiredFields(e,t)),(0,d.Dx)(e,t,null,this.valueExpression)];(0,d.rq)(e,t,this.field),(0,d.rq)(e,t,this.field2),(0,d.rq)(e,t,this.field3),await Promise.all(i)}populateFromStyle(){return(0,A.cF)(this.styleOrigin,{portal:this.portal}).then(e=>{const t=[];return this._valueInfoMap={},e?.data&&Array.isArray(e.data.items)&&e.data.items.forEach(i=>{const s=new I.A({styleUrl:e.styleUrl,styleName:e.styleName,portal:this.portal,name:i.name});this.defaultSymbol||i.name!==e.data.defaultItem||(this.defaultSymbol=s,this._isDefaultSymbolDerived=!0);const l=new M.A({value:i.name,symbol:s});t.push(l),this._valueInfoMap[T(i.name)]=l}),this._set("uniqueValueInfos",Object.freeze(t)),this._updateGroupsFromInfos(!0),this._isInfosSource=null,this._watchUniqueValueInfos(),!this.defaultSymbol&&this.uniqueValueInfos?.length&&(this.defaultSymbol=this.uniqueValueInfos[0].symbol,this._isDefaultSymbolDerived=!0),this})}_updateFieldDelimiter(){this.field&&this.field2&&!this.fieldDelimiter&&this._set("fieldDelimiter",",")}_updateUniqueValues(){null!=this._isInfosSource&&(this._isInfosSource?this._updateGroupsFromInfos():this._updateInfosFromGroups())}_updateValueInfoMap(){this._valueInfoMap={};const{uniqueValueInfos:e}=this;if(e)for(const t of e)this._valueInfoMap[T(t.value)]=t}_watchUniqueValueInfosAndGroups(){this._watchUniqueValueInfos(),this._watchUniqueValueGroups()}_watchUniqueValueInfos(){this.removeHandles(k);const{uniqueValueInfos:e}=this;if(e){const t=[];for(const i of e)t.push((0,a.wB)(()=>({symbol:i.symbol,value:i.value,label:i.label,description:i.description}),(e,t)=>{e!==t&&(this._updateGroupsFromInfos(),this._isInfosSource=!0)},{sync:!0}));this.addHandles(t,k)}}_watchUniqueValueGroups(){this.removeHandles(E);const{uniqueValueGroups:e}=this;if(e){const t=[];for(const i of e){t.push((0,a.wB)(()=>({classes:i.classes}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}));for(const e of i.classes??[])t.push((0,a.wB)(()=>({symbol:e.symbol,values:e.values,label:e.label,description:e.description}),(e,t)=>{e!==t&&(this._updateInfosFromGroups(),this._isInfosSource=!1)},{sync:!0}))}this.addHandles(t,E)}}_updateInfosFromGroups(){if(!this.uniqueValueGroups)return this._set("uniqueValueInfos",null),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const e=[],{field:t,field2:i,field3:s,fieldDelimiter:l,uniqueValueGroups:r,valueExpression:n}=this;if(!t&&!n)return this._set("uniqueValueInfos",e),this._updateValueInfoMap(),void this._watchUniqueValueInfos();const o=!(!t||!i);for(const t of r)for(const r of t.classes??[]){const{symbol:t,label:n,values:a,description:u}=r;for(const r of a??[]){const{value:a,value2:p,value3:c}=r,d=[a];i&&d.push(p),s&&d.push(c);const h=o?d.join(l||""):d[0]??void 0;e.push(new M.A({symbol:t,label:n,value:h,description:u}))}}this._set("uniqueValueInfos",e),this._updateValueInfoMap(),this._watchUniqueValueInfos()}_updateGroupsFromInfos(e=!1){if(!this.uniqueValueInfos)return this._set("uniqueValueGroups",null),void this._watchUniqueValueGroups();const{field:t,field2:i,valueExpression:s,fieldDelimiter:l,uniqueValueInfos:r}=this;if(!t&&!s||!r.length)return this._set("uniqueValueGroups",[]),void this._watchUniqueValueGroups();const n=!(!t||!i),o=r.map(e=>{const{symbol:t,label:i,value:s,description:r}=e,[o,a,u]=n?s?.toString()?.split(l||"")||[]:[s];return new S({symbol:t,label:i,description:r,values:[new w({value:o,value2:a,value3:u})]})}),a=[new C({classes:o})];e&&Object.freeze(a),this._set("uniqueValueGroups",a),this._watchUniqueValueGroups()}_getUniqueValueInfo(e,t){return this.valueExpression?this._getUnqiueValueInfoForExpression(e,t):this._getUnqiueValueInfoForFields(e)}_getUnqiueValueInfoForExpression(e,t){const{viewingMode:i,scale:s,spatialReference:l,arcade:r,timeZone:n}=t??{};let o=this._cache.compiledFunc;const a=r.arcadeUtils;if(!o){const e=a.createSyntaxTree(this.valueExpression);o=a.createFunction(e),this._cache.compiledFunc=o}const u=a.executeFunction(o,a.createExecContext(e,a.getViewInfo({viewingMode:i,scale:s,spatialReference:l}),n));return this._valueInfoMap[T(u)]}_getUnqiueValueInfoForFields(e){const t=this.field,i=e.attributes;let s;if(this.field2){const e=this.field2,l=this.field3,r=[];t&&r.push(i[t]),e&&r.push(i[e]),l&&r.push(i[l]),s=r.join(this.fieldDelimiter||"")}else t&&(s=i[t]);return this._valueInfoMap[T(s)]}static fromPortalStyle(e,t){const i=new x(t?.properties);i._set("styleOrigin",Object.freeze({styleName:e})),i._set("portal",t?.portal||h.A.getDefault());const s=i.populateFromStyle();return s.catch(t=>{n.A.getLogger(this.prototype).error(`#fromPortalStyle('${e}'[, ...])`,"Failed to create unique value renderer from style name",t)}),s}static fromStyleUrl(e,t){const i=new x(t?.properties);i._set("styleOrigin",Object.freeze({styleUrl:e}));const s=i.populateFromStyle();return s.catch(t=>{n.A.getLogger(this.prototype).error(`#fromStyleUrl('${e}'[, ...])`,"Failed to create unique value renderer from style URL",t)}),s}};(0,s.Cg)([(0,u.MZ)({readOnly:!0})],O.prototype,"_cache",null),(0,s.Cg)([(0,Z.e)({uniqueValue:"unique-value"})],O.prototype,"type",void 0),(0,s.Cg)([(0,u.MZ)(f.As)],O.prototype,"backgroundFillSymbol",void 0),(0,s.Cg)([(0,u.MZ)({value:null,json:{type:String,read:{source:"field1"},write:{target:"field1"}}})],O.prototype,"field",null),(0,s.Cg)([(0,u.wg)("field")],O.prototype,"castField",null),(0,s.Cg)([(0,q.K)("field")],O.prototype,"writeField",null),(0,s.Cg)([(0,u.MZ)({type:String,value:null,json:{write:!0}})],O.prototype,"field2",null),(0,s.Cg)([(0,u.MZ)({type:String,value:null,json:{write:!0}})],O.prototype,"field3",null),(0,s.Cg)([(0,u.MZ)({type:Boolean,json:{name:"drawInClassOrder",default:!1,write:!0,origins:{"web-scene":{write:!1}}}})],O.prototype,"orderByClassesEnabled",void 0),(0,s.Cg)([(0,u.MZ)({type:String,value:null,json:{write:!0}})],O.prototype,"valueExpression",null),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],O.prototype,"valueExpressionTitle",void 0),(0,s.Cg)([(0,u.MZ)({type:g.A,json:{write:!0}})],O.prototype,"legendOptions",void 0),(0,s.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],O.prototype,"defaultLabel",void 0),(0,s.Cg)([(0,u.MZ)((0,o.$N)({...f.z4},{json:{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}},origins:{"web-scene":{write:{overridePolicy(){return{enabled:!this._isDefaultSymbolDerived}}}}}}}))],O.prototype,"defaultSymbol",null),(0,s.Cg)([(0,u.MZ)({type:String,value:null,json:{write:!0}})],O.prototype,"fieldDelimiter",null),(0,s.Cg)([(0,u.MZ)({type:h.A,readOnly:!0})],O.prototype,"portal",void 0),(0,s.Cg)([(0,F.w)("portal",["styleName"])],O.prototype,"readPortal",null),(0,s.Cg)([(0,u.MZ)({readOnly:!0,json:{write:{enabled:!1,overridePolicy:()=>({enabled:!0})}}})],O.prototype,"styleOrigin",void 0),(0,s.Cg)([(0,F.w)("styleOrigin",["styleName","styleUrl"])],O.prototype,"readStyleOrigin",null),(0,s.Cg)([(0,q.K)("styleOrigin",{styleName:{type:String},styleUrl:{type:String}})],O.prototype,"writeStyleOrigin",null),(0,s.Cg)([(0,u.MZ)({type:[C],json:{read:{source:["uniqueValueGroups","uniqueValueInfos"],reader:(e,t,i)=>(t.uniqueValueGroups||function(e){const{field1:t,field2:i,field3:s,fieldDelimiter:l,uniqueValueInfos:r,valueExpression:n}=e,o=!(!t||!i);return[{classes:(r??[]).map(e=>{const{symbol:r,label:a,value:u,description:p}=e,[c,d,h]=o?u?.toString()?.split(l||"")||[]:[u],y=[];return(t||n)&&y.push(c),i&&y.push(d),s&&y.push(h),{symbol:r,label:a,values:[y],description:p}})}]}(t)).map(e=>C.fromJSON(e,i))},write:{overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0}}}}})],O.prototype,"uniqueValueGroups",null),(0,s.Cg)([(0,u.MZ)({type:[M.A],json:{read:!1,write:{isRequired:!0,overridePolicy(){return this.styleOrigin?{enabled:!1}:{enabled:!0,isRequired:!0}}}}})],O.prototype,"uniqueValueInfos",null),O=x=(0,s.Cg)([(0,u.$K)("esri.renderers.UniqueValueRenderer")],O)},94833:(e,t,i)=>{i.d(t,{A:()=>a});var s,l=i(31635),r=i(25482),n=i(91429),o=i(49849);let a=s=class extends r.o{constructor(e){super(e),this.description=null,this.label=null,this.symbol=null,this.value=null}clone(){return new s({value:this.value,description:this.description,label:this.label,symbol:this.symbol?this.symbol.clone():null})}getMeshHash(){const e=JSON.stringify(this.symbol?.toJSON());return`${this.value}.${e}`}};(0,l.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"description",void 0),(0,l.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],a.prototype,"label",void 0),(0,l.Cg)([(0,n.MZ)(o.Wp)],a.prototype,"symbol",void 0),(0,l.Cg)([(0,n.MZ)(o.Ug)],a.prototype,"value",void 0),a=s=(0,l.Cg)([(0,n.$K)("esri.renderers.support.UniqueValueInfo")],a)},95349:(e,t,i)=>{i.d(t,{g:()=>n,r:()=>o});var s=i(2485),l=i(72606),r=i(1626);const n={key:"type",base:l.A,typeMap:{algorithmic:s.A,multipart:r.A}};function o(e){return e?.type?"algorithmic"===e.type?s.A.fromJSON(e):"multipart"===e.type?r.A.fromJSON(e):null:null}},98205:(e,t,i)=>{function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function l(e){return null!=e&&!isNaN(e)&&isFinite(e)}function r(e){return e.valueExpression?"expression":e.field&&"string"==typeof e.field?"field":"unknown"}function n(e,t){const i=t||r(e),s=e.valueUnit||"unknown";return"unknown"===i?"constant":e.stops?"stops":null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?"clamped-linear":"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?"proportional":"additive":"identity":"real-world-size"}i.d(t,{KZ:()=>n,eh:()=>r,gf:()=>l,of:()=>s})}}]);
@@ -197,7 +197,7 @@ return dpDummy * hiD + loD;
197
197
  // multiply or tint (or something invalid)
198
198
  return allMixed;
199
199
  }
200
- `)}},27993:(e,t,r)=>{r.d(t,{F:()=>s});var i=r(91218),o=r(16930),n=r(9762),a=r(65806);function s(e,t,r,o){return!(null==t||null==o||e.length<2)&&((0,i.canProjectWithoutEngine)(t,o)?(0,n.projectBuffer)(e,t,0,r,o,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,o)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},28421:(e,t,r)=>{r.d(t,{J:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"float",2,(i,o,n)=>i.setUniform1f(e,t(o,n),r))}}},28491:(e,t,r)=>{r.d(t,{D:()=>U,b:()=>G});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(60864),c=r(43519),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(35640),v=r(40261),g=r(77695),_=r(14527),x=r(89390),w=r(98619),b=r(62602),y=r(22393),M=r(59469),T=r(32482),C=r(96598),S=r(51406),E=r(42398),A=r(58614),I=r(27950),R=r(25178),F=r(33079),P=r(71988),O=r(20304),D=r(31821),H=r(63761),N=r(10906),z=r(43616),L=r(60517),B=r(14113),V=r(49788);function G(e){const t=new B.N5,{attributes:r,vertex:G,fragment:U,varyings:j}=t,{output:W,normalType:k,offsetBackfaces:$,spherical:Z,snowCover:q,pbrMode:Y,textureAlphaPremultiplied:X,instancedDoublePrecision:K,hasVertexColors:J,hasVertexTangents:Q,hasColorTexture:ee,hasNormalTexture:te,hasNormalTextureTransform:re,hasColorTextureTransform:ie}=e;if((0,R.NB)(G,e),r.add("position","vec3"),j.add("vpos","vec3",{invariant:!0}),t.include(E.A,e),t.include(l.B,e),t.include(f.Ge,e),t.include(S.q2,e),!(0,o._o)(W))return t.include(v.E,e),t;t.include(S.Sx,e),t.include(S.MU,e),t.include(S.O1,e),t.include(S.QM,e),(0,R.yu)(G,e),t.include(d.Y,e),t.include(a.d);const oe=0===k||1===k;return oe&&$&&t.include(i.M),t.include(g.W,e),t.include(p.Mh,e),t.include(s.v,e),j.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(u.K,e),t.include(m.c,e),G.uniforms.add(new P.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),j.add("vcolorExt","vec4"),t.include(C.Z,e),G.include(c.WD),G.include(c.oF),t.include(K?T.G:T.Bz,e),G.main.add(D.H`
200
+ `)}},27993:(e,t,r)=>{r.d(t,{F:()=>s});var i=r(91218),o=r(16930),n=r(9762),a=r(65806);function s(e,t,r,o){return!(null==t||null==o||e.length<2)&&((0,i.canProjectWithoutEngine)(t,o)?(0,n.projectBuffer)(e,t,0,r,o,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,a.g)(l,r,o)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:o.A.WGS84,type:"point"}},28421:(e,t,r)=>{r.d(t,{J:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"float",2,(i,o,n)=>i.setUniform1f(e,t(o,n),r))}}},28491:(e,t,r)=>{r.d(t,{D:()=>U,b:()=>G});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(60864),c=r(43519),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(72824),f=r(35640),v=r(40261),g=r(77695),_=r(14527),x=r(89390),w=r(98619),b=r(62602),y=r(22393),M=r(59469),T=r(32482),C=r(96598),S=r(51406),E=r(42398),A=r(58614),I=r(27950),R=r(25178),F=r(33079),P=r(71988),O=r(20304),D=r(31821),H=r(63761),N=r(10906),z=r(43616),L=r(51255),B=r(14113),V=r(49788);function G(e){const t=new B.N5,{attributes:r,vertex:G,fragment:U,varyings:j}=t,{output:W,normalType:k,offsetBackfaces:$,spherical:Z,snowCover:q,pbrMode:Y,textureAlphaPremultiplied:X,instancedDoublePrecision:K,hasVertexColors:J,hasVertexTangents:Q,hasColorTexture:ee,hasNormalTexture:te,hasNormalTextureTransform:re,hasColorTextureTransform:ie}=e;if((0,R.NB)(G,e),r.add("position","vec3"),j.add("vpos","vec3",{invariant:!0}),t.include(E.A,e),t.include(l.B,e),t.include(f.Ge,e),t.include(S.q2,e),!(0,o._o)(W))return t.include(v.E,e),t;t.include(S.Sx,e),t.include(S.MU,e),t.include(S.O1,e),t.include(S.QM,e),(0,R.yu)(G,e),t.include(d.Y,e),t.include(a.d);const oe=0===k||1===k;return oe&&$&&t.include(i.M),t.include(g.W,e),t.include(p.Mh,e),t.include(s.v,e),j.add("vPositionLocal","vec3"),t.include(h.U,e),t.include(u.K,e),t.include(m.c,e),G.uniforms.add(new P.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),j.add("vcolorExt","vec4"),t.include(C.Z,e),G.include(c.WD),G.include(c.oF),t.include(K?T.G:T.Bz,e),G.main.add(D.H`
201
201
  forwardNormalizedVertexColor();
202
202
 
203
203
  MaskedColor maskedColor =
@@ -227,7 +227,7 @@ return dpDummy * hiD + loD;
227
227
  gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
228
228
  }
229
229
  forwardLinearDepthToReadShadowMap();
230
- `),t.include(x.kA,e),U.include(_.n,e),t.include(A.S,e),U.include(n.HQ,e),t.include(L.z,e),(0,R.yu)(U,e),U.uniforms.add(G.uniforms.get("localOrigin"),new F.t("ambient",e=>e.ambient),new F.t("diffuse",e=>e.diffuse),new O.m("opacity",e=>e.opacity),new O.m("layerOpacity",e=>e.layerOpacity)),ee&&U.uniforms.add(new H.N("tex",e=>e.texture)),t.include(M._,e),U.include(y.c,e),U.include(I.N),t.include(b.r,e),U.include(N.b,e),(0,x.a8)(U),(0,x.eU)(U),(0,w.O4)(U),U.main.add(D.H`
230
+ `),t.include(x.kA,e),U.include(_.n,e),t.include(A.S,e),U.include(n.HQ,e),t.include(L.D,e),(0,R.yu)(U,e),U.uniforms.add(G.uniforms.get("localOrigin"),new F.t("ambient",e=>e.ambient),new F.t("diffuse",e=>e.diffuse),new O.m("opacity",e=>e.opacity),new O.m("layerOpacity",e=>e.layerOpacity)),ee&&U.uniforms.add(new H.N("tex",e=>e.texture)),t.include(M._,e),U.include(y.c,e),U.include(I.N),t.include(b.r,e),U.include(N.b,e),(0,x.a8)(U),(0,x.eU)(U),(0,w.O4)(U),U.main.add(D.H`
231
231
  discardBySlice(vpos);
232
232
  discardByTerrainDepth();
233
233
  ${ee?D.H`
@@ -265,7 +265,7 @@ return dpDummy * hiD + loD;
265
265
  ${(0,D.If)(q,"mrr = applySnowToMRR(mrr, snow);")}
266
266
  vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:D.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
267
267
  vec4 finalColor = vec4(shadedColor, opacity_);
268
- outputColorHighlightOID(finalColor, vpos, albedo ${(0,D.If)(q,", snow")});
268
+ outputColorHighlightOLID(finalColor, vpos, albedo ${(0,D.If)(q,", snow")});
269
269
  `),t}const U=Object.freeze(Object.defineProperty({__proto__:null,build:G},Symbol.toStringTag,{value:"Module"}))},29920:(e,t,r)=>{r.d(t,{j:()=>s});var i=r(15142),o=r(38954),n=r(51850),a=r(620);class s{get center(){return(0,n.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,n.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,n.fA)(this._data[7],this._data[8],this._data[9])}constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,a.vA)(e.length>=1),(0,a.vA)(3===r.size||4===r.size);const{data:i,size:s,indices:c}=r;(0,a.vA)(c.length%this._numIndexPerPrimitive===0),(0,a.vA)(c.length>=e.length*this._numIndexPerPrimitive);const d=e.length;let u=s*c[this._numIndexPerPrimitive*e[0]];l.clear(),l.push(u);const h=(0,n.fA)(i[u],i[u+1],i[u+2]),m=(0,n.o8)(h);for(let t=0;t<d;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){u=s*c[r+e],l.push(u);let t=i[u];h[0]=Math.min(t,h[0]),m[0]=Math.max(t,m[0]),t=i[u+1],h[1]=Math.min(t,h[1]),m[1]=Math.max(t,m[1]),t=i[u+2],h[2]=Math.min(t,h[2]),m[2]=Math.max(t,m[2])}}for(let e=0;e<3;++e)this._data[4+e]=h[e],this._data[7+e]=m[e];const p=(0,o.l)((0,n.vt)(),this.bbMin,this.bbMax,.5);let f=.5*Math.max(Math.max(m[0]-h[0],m[1]-h[1]),m[2]-h[2]),v=f*f;for(let e=0;e<l.length;++e){u=l.at(e);const t=i[u]-p[0],r=i[u+1]-p[1],o=i[u+2]-p[2],n=t*t+r*r+o*o;if(n<=v)continue;const a=Math.sqrt(n),s=.5*(a-f);f+=s,v=f*f;const c=s/a;p[0]+=t*c,p[1]+=r*c,p[2]+=o*c}this._data[3]=f;for(let e=0;e<3;++e)this._data[0+e]=p[e];l.clear()}getChildren(){if(this._children||(0,o.s)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,o.l)((0,n.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:a,size:l,indices:c}=this.position;for(let o=0;o<t;++o){let t=0;const n=this._numIndexPerPrimitive*this.primitiveIndices[o];let s=l*c[n],d=a[s],u=a[s+1],h=a[s+2];for(let e=1;e<this._numIndexPerPrimitive;++e){s=l*c[n+e];const t=a[s],r=a[s+1],i=a[s+2];t<d&&(d=t),r<u&&(u=r),i<h&&(h=i)}d<e[0]&&(t|=1),u<e[1]&&(t|=2),h<e[2]&&(t|=4),r[o]=t,++i[t]}let d=0;for(let e=0;e<8;++e)i[e]>0&&++d;if(d<2)return;const u=new Array(8);for(let e=0;e<8;++e)u[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];u[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==u[e]&&this._children.push(new s(u[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){l.prune()}}const l=new i.A({deallocator:null})},31217:(e,t,r)=>{r.d(t,{D:()=>o});var i=r(11254);async function o(e,t){return(await(0,i.A)(e,{responseType:"image",...t})).data}},31821:(e,t,r)=>{r.d(t,{H:()=>i,If:()=>o});const i=(e,...t)=>{let r="";for(let i=0;i<t.length;i++)r+=e[i]+t[i];return r+=e[e.length-1],r};function o(e,t,r=""){return e?t:r}i.int=e=>Math.round(e).toString(),i.float=e=>e.toPrecision(8)},32482:(e,t,r)=>{r.d(t,{Bz:()=>w,G:()=>x}),r(51850);var i=r(46686),o=r(49255),n=r(31821);function a(e,t){const r=(0,o._o)(t.output)&&t.receiveShadows;r&&(0,i.o)(e,!0),e.vertex.code.add(n.H`
270
270
  void forwardLinearDepthToReadShadowMap() { ${(0,n.If)(r,"forwardLinearDepth(gl_Position.w);")} }
271
271
  `)}var s=r(14314),l=r(35818),c=r(74333);class d extends c.n{constructor(e,t,r,i){super(e,"mat4",2,(r,o,n,a)=>r.setUniformMatrices4fv(e,t(o,n,a),i),r)}}class u extends c.n{constructor(e,t,r,i){super(e,"mat4",1,(r,o,n)=>r.setUniformMatrices4fv(e,t(o,n),i),r)}}var h=r(65786);function m(e){e.fragment.uniforms.add(new u("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),f(e)}function p(e){e.fragment.uniforms.add(new d("shadowMapMatrix",(e,t)=>t.shadowMap.getShadowMapMatrices(e.origin),4)),f(e)}function f(e){const{fragment:t}=e;t.uniforms.add(new s.I("cascadeDistances",e=>e.shadowMap.cascadeDistances),new l.W("numCascades",e=>e.shadowMap.numCascades)),t.code.add(n.H`const vec3 invalidShadowmapUVZ = vec3(0.0, 0.0, -1.0);
@@ -516,7 +516,20 @@ return MaskedColor(masked1 * masked2, bvec4(ivec4(color1.mask) & ivec4(color2.ma
516
516
  return MaskedColor(color, isnan(color));
517
517
  }`)}},43616:(e,t,r)=>{r.d(t,{MB:()=>l,Um:()=>c,kE:()=>a});var i=r(4576),o=r(34727),n=r(77194);function a(e,t,r,i,n,a){let s=r.screenLength*e.pixelRatio;null!=n&&(d.update(i,t,n,a),s=d.apply(s));const l=s*Math.tan(.5*e.fovY)/(.5*e.fullHeight);return(0,o.qE)(l*t,r.minWorldLength,r.maxWorldLength)}const s=(0,i.VO)();function l(e,t){let r=!1;for(const i in t){const o=t[i];void 0!==o&&(Array.isArray(o)?Array.isArray(e[i])&&s(o,e[i])||(e[i]=o.slice(),r=!0):e[i]!==o&&(r=!0,e[i]=o))}return r}const c={multiply:1,ignore:2,replace:3,tint:4},d=new n.PS},46140:(e,t,r)=>{r.d(t,{R:()=>o});var i=r(49186);let o=class e{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}greaterEqual(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 i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new e(this.major,this.minor,this._context)}static parse(t,r=""){const[o,n]=t.split("."),a=/^\s*\d+\s*$/;if(!o?.match||!a.test(o))throw new i.A((r&&r+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:t});if(!n?.match||!a.test(n))throw new i.A((r&&r+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:t});const s=parseInt(o,10),l=parseInt(n,10);return new e(s,l,r)}}},46686:(e,t,r)=>{r.d(t,{o:()=>o});var i=r(31821);function o(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
518
518
  void forwardLinearDepth(float _linearDepth) { ${(0,i.If)(t,"linearDepth = _linearDepth;")} }
519
- `)}},46859:(e,t,r)=>{r.d(t,{h:()=>B}),r(44208);var i=r(49186),o=r(65529),n=r(97768),a=r(74887),s=r(34275),l=r(24326),c=r(84952),d=r(38969),u=r(31217),h=r(95117),m=r(2741);let p;var f=r(63907),v=r(76284),g=r(42293);let _=null,x=null;async function w(){return null==x&&(p??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,m.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=p,_=await x),x}function b(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=T(r)?M(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}function y(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=C(r)?M(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}function M(e,t,r,i,o){const n=(0,g.MW)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*a)}function T(e){return e.getNumImages()>=1&&!e.isUASTC()}function C(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,o,n,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[1,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,f.CQ.COMPRESSED_RGB8_ETC2]:c?i?[3,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=o,t.height=n,new v.g(e,t,{type:"compressed",levels:m})}var E=r(53966);const A=()=>E.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function I(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const R=I("DXT1"),F=I("DXT3"),P=I("DXT5");function O(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return A().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return A().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,n;switch(i){case R:o=8,n=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case F:o=16,n=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case P:o=16,n=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return A().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(A().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const p=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e.buffer,m,h),p.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:n,width:c,height:d}}function D(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function H(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const o=Math.max(e,t),n=e*t;if(o<=i&&n<=r)return[e,t];const a=Math.min(Math.sqrt(r/n),i/o);return[D(Math.round(e*a),i),D(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:N(e,r,i)}function N(e,t,r){if(e instanceof ImageData)return N(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const o=document.createElement("canvas");return o.width=t,o.height=r,o.getContext("2d").drawImage(e,0,0,o.width,o.height),o}var z=r(620),L=r(67171);class B{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new o.bk,this._parameters={...G,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,d.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new L.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return"image/ktx2"===t.encoding?y(e,!!t.mipmap):"image/x.basis"===t.encoding?b(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?V(e):t,o=t.pixelFormat??6408,n=(0,g.wH)(o);return(t.mipmap?4/3:1)*r*i*n||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new v.g(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,s.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,s.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=O(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:n,width:a,height:s}=i;return t.samplingMode=o.levels.length>1?9987:9729,t.hasMipmap=o.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new v.g(e,t,o)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.KTX2File(new Uint8Array(r));if(!C(i))return null;i.startTranscoding();const o=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.BasisFile(new Uint8Array(r));if(!T(i))return null;i.startTranscoding();const o=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,z.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new v.g(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await(0,u.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,h.y)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((o,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,n.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),o(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,()=>d((0,a.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=H(r,e.parameters));const i=V(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.width=i.width,o.height=i.height,o.compress=this._parameters.compressionOptions,this._texture=new v.g(e,o,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,n.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function V(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const G={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},47286:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,o,n)=>i.setUniform2fv(e,t(o,n),r))}}},49255:(e,t,r)=>{function i(e){return 3===e||4===e||5===e||6===e||7===e}function o(e){return function(e){return a(e)||s(e)}(e)||2===e}function n(e){return 0===e}function a(e){return n(e)||function(e){return 8===e||9===e}(e)}function s(e){return 1===e}function l(e){return s(e)||i(e)}r.d(t,{Bf:()=>i,Dz:()=>l,_o:()=>n,dX:()=>a,iq:()=>o})},49718:(e,t,r)=>{r(51850),r(6867).i},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>c,QM:()=>d,Sx:()=>s,q2:()=>a});var i=r(29242),o=r(31821),n=r(35644);function a(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new n.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(o.H`void forwardColorUV(){
519
+ `)}},46859:(e,t,r)=>{r.d(t,{h:()=>B}),r(44208);var i=r(49186),o=r(65529),n=r(97768),a=r(74887),s=r(34275),l=r(24326),c=r(84952),d=r(38969),u=r(31217),h=r(95117),m=r(2741);let p;var f=r(63907),v=r(76284),g=r(42293);let _=null,x=null;async function w(){return null==x&&(p??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,m.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),x=p,_=await x),x}function b(e,t){if(null==_)return e.byteLength;const r=new _.BasisFile(new Uint8Array(e)),i=T(r)?M(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}function y(e,t){if(null==_)return e.byteLength;const r=new _.KTX2File(new Uint8Array(e)),i=C(r)?M(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}function M(e,t,r,i,o){const n=(0,g.MW)(t?f.CQ.COMPRESSED_RGBA8_ETC2_EAC:f.CQ.COMPRESSED_RGB8_ETC2),a=o&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*n*a)}function T(e){return e.getNumImages()>=1&&!e.isUASTC()}function C(e){return e.getFaces()>=1&&e.isETC1S()}function S(e,t,r,i,o,n,a,s){const{compressedTextureETC:l,compressedTextureS3TC:c}=e.capabilities,[d,u]=l?i?[1,f.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,f.CQ.COMPRESSED_RGB8_ETC2]:c?i?[3,f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],h=t.hasMipmap?r:Math.min(1,r),m=[];for(let e=0;e<h;e++)m.push(new Uint8Array(a(e,d))),s(e,d,m[e]);return t.internalFormat=u,t.hasMipmap=m.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=o,t.height=n,new v.g(e,t,{type:"compressed",levels:m})}var E=r(53966);const A=()=>E.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function I(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const R=I("DXT1"),F=I("DXT3"),P=I("DXT5");function O(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return A().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return A().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let o,n;switch(i){case R:o=8,n=f.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case F:o=16,n=f.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case P:o=16,n=f.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return A().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let a=1,s=r[4],l=r[3];(3&s||3&l)&&(A().warn("Rounding up compressed texture size to nearest multiple of 4."),s=s+3&-4,l=l+3&-4);const c=s,d=l;let u,h;131072&r[2]&&!1!==t&&(a=Math.max(1,r[7]));let m=e.byteOffset+r[1]+4;const p=[];for(let t=0;t<a;++t)h=(s+3>>2)*(l+3>>2)*o,u=new Uint8Array(e.buffer,m,h),p.push(u),m+=h,s=Math.max(1,s>>1),l=Math.max(1,l>>1);return{textureData:{type:"compressed",levels:p},internalFormat:n,width:c,height:d}}function D(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function H(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const o=Math.max(e,t),n=e*t;if(o<=i&&n<=r)return[e,t];const a=Math.min(Math.sqrt(r/n),i/o);return[D(Math.round(e*a),i),D(Math.round(t*a),i)]}(e,t);return e.width===r&&e.height===i?e:N(e,r,i)}function N(e,t,r){if(e instanceof ImageData)return N(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new i.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const o=document.createElement("canvas");return o.width=t,o.height=r,o.getContext("2d").drawImage(e,0,0,o.width,o.height),o}var z=r(620),L=r(67171);class B{constructor(e,t){this._data=e,this.id=(0,l.c)(),this.events=new o.bk,this._parameters={...G,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,c.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,d.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,c.DB)(e.src)||(0,c.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new L.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,s.mw)(e)||(0,s.mg)(e))return"image/ktx2"===t.encoding?y(e,!!t.mipmap):"image/x.basis"===t.encoding?b(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?V(e):t,o=t.pixelFormat??6408,n=(0,g.wH)(o);return(t.mipmap?4/3:1)*r*i*n||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new v.g(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,s.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,s.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,s.mw)(t)||(0,s.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,s.mw)(t)||(0,s.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,s.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,s.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=O(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:o,internalFormat:n,width:a,height:s}=i;return t.samplingMode=o.levels.length>1?9987:9729,t.hasMipmap=o.levels.length>1,t.internalFormat=n,t.width=a,t.height=s,new v.g(e,t,o)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.KTX2File(new Uint8Array(r));if(!C(i))return null;i.startTranscoding();const o=S(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==_&&(_=await w());const i=new _.BasisFile(new Uint8Array(r));if(!T(i))return null;i.startTranscoding();const o=S(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),o}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,z.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new v.g(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await(0,u.D)(t,{signal:r});return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,h.y)(t,t.src,!1,r);return(0,a.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((o,s)=>{const l=()=>{t.removeEventListener("loadeddata",c),t.removeEventListener("error",d),(0,n.xt)(u)},c=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(l(),o(this._loadFromImage(e,t)))},d=e=>{l(),s(e||new i.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",c),t.addEventListener("error",d);const u=(0,a.u7)(r,()=>d((0,a.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=H(r,e.parameters));const i=V(r);this._parameters.width=i.width,this._parameters.height=i.height;const o=this._createDescriptor(e);return o.width=i.width,o.height=i.height,o.compress=this._parameters.compressionOptions,this._texture=new v.g(e,o,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,n.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function V(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const G={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1}},47286:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(74333);class o extends i.n{constructor(e,t,r){super(e,"vec2",1,(i,o,n)=>i.setUniform2fv(e,t(o,n),r))}}},49255:(e,t,r)=>{function i(e){return 3===e||4===e||5===e||6===e||7===e}function o(e){return function(e){return a(e)||s(e)}(e)||2===e}function n(e){return 0===e}function a(e){return n(e)||function(e){return 8===e||9===e}(e)}function s(e){return 1===e}function l(e){return s(e)||i(e)}r.d(t,{Bf:()=>i,Dz:()=>l,_o:()=>n,dX:()=>a,iq:()=>o})},49718:(e,t,r)=>{r(51850),r(6867).i},49788:(e,t,r)=>{r.d(t,{Q:()=>i});const i=1/255.5},51255:(e,t,r)=>{r.d(t,{D:()=>c});var i=r(49255),o=r(63201),n=r(42593),a=r(63365),s=r(31821),l=r(49788);function c(e,t){e.include(n.Q,t),e.include(o.NL,t),e.fragment.include(a.a);const{output:r,oitPass:c,hasEmission:d,discardInvisibleFragments:u,snowCover:h}=t,m=9===r,p=(0,i._o)(r)&&1===c,f=(0,i._o)(r)&&1!==c;let v=0;(f||p)&&e.outputs.add("fragColor","vec4",v++),d&&e.outputs.add("fragEmission","vec4",v++),p&&e.outputs.add("fragAlpha","float",v++),e.fragment.code.add(s.H`
520
+ void outputColorHighlightOLID(vec4 finalColor, const in vec3 vWorldPosition, vec3 emissiveSymbolColor ${(0,s.If)(h,", float snow")}) {
521
+ ${(0,s.If)(m,"finalColor.a = 1.0;")}
522
+ ${(0,s.If)(u,`if (finalColor.a < ${s.H.float(l.Q)}) { discard; }`)}
523
+
524
+ finalColor = applySlice(finalColor, vWorldPosition);
525
+ ${(0,s.If)(p,s.H`fragColor = premultiplyAlpha(finalColor);
526
+ fragAlpha = finalColor.a;`)}
527
+ ${(0,s.If)(f,"fragColor = finalColor;")}
528
+ ${(0,s.If)(d,`fragEmission = ${(0,s.If)(h,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}`)}
529
+ calculateOcclusionAndOutputHighlight();
530
+ ${(0,s.If)(m,"outputObjectAndLayerIdColor();")}
531
+ }
532
+ `)}},51406:(e,t,r)=>{r.d(t,{MU:()=>l,O1:()=>c,QM:()=>d,Sx:()=>s,q2:()=>a});var i=r(29242),o=r(31821),n=r(35644);function a(e,t){t.hasColorTextureTransform?(e.varyings.add("colorUV","vec2"),e.vertex.uniforms.add(new n.k("colorTextureTransformMatrix",e=>e.colorTextureTransformMatrix??i.zK)).code.add(o.H`void forwardColorUV(){
520
533
  colorUV = (colorTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
521
534
  }`)):e.vertex.code.add(o.H`void forwardColorUV(){}`)}function s(e,t){t.hasNormalTextureTransform&&0!==t.textureCoordinateType?(e.varyings.add("normalUV","vec2"),e.vertex.uniforms.add(new n.k("normalTextureTransformMatrix",e=>e.normalTextureTransformMatrix??i.zK)).code.add(o.H`void forwardNormalUV(){
522
535
  normalUV = (normalTextureTransformMatrix * vec3(vuv0, 1.0)).xy;
@@ -565,7 +578,7 @@ return applyScreenSizePerspectiveScaleFactorVec2(size, screenSizePerspectiveScal
565
578
  }`)}function l(e){e.uniforms.add(new n.t("screenSizePerspective",e=>d(e.screenSizePerspective,e.screenSizePerspectiveMinPixelReferenceSize)))}function c(e){e.uniforms.add(new n.t("screenSizePerspectiveAlignment",e=>d(e.screenSizePerspectiveAlignment||e.screenSizePerspective,e.screenSizePerspectiveAlignment?null:e.screenSizePerspectiveMinPixelReferenceSize)))}function d(e,t){const r=null!=t&&null!=e?Math.min(e.minPixelSize/t,1):0;return e?(0,i.h)(u,e.divisor,e.offset,r):(0,i.h)(u,0,0,0)}const u=(0,o.vt)()},53466:(e,t,r)=>{r.d(t,{U:()=>n});var i=r(21818),o=r(31821);function n(e,t){switch(t.textureCoordinateType){case 1:return e.attributes.add("uv0","vec2"),e.varyings.add("vuv0","vec2"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() { vuv0 = uv0; }`);case 2:return e.attributes.add("uv0","vec2"),e.attributes.add("uvRegion","vec4"),e.varyings.add("vuv0","vec2"),e.varyings.add("vuvRegion","vec4"),void e.vertex.code.add(o.H`void forwardTextureCoordinates() {
566
579
  vuv0 = uv0;
567
580
  vuvRegion = uvRegion;
568
- }`);default:(0,i.Xb)(t.textureCoordinateType);case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},57323:(e,t,r)=>{r.d(t,{R:()=>L,b:()=>z});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(60864),c=r(43519),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(35640),f=r(40261),v=r(14527),g=r(89390),_=r(98619),x=r(22393),w=r(59469),b=r(32482),y=r(96598),M=r(42398),T=r(58614),C=r(27950),S=r(25178),E=r(33079),A=r(71988),I=r(20304),R=r(31821),F=r(63761),P=r(10906),O=r(43616),D=r(60517),H=r(14113),N=r(49788);function z(e){const t=new H.N5,{attributes:r,vertex:z,fragment:L,varyings:B}=t,{output:V,offsetBackfaces:G,pbrMode:U,snowCover:j,spherical:W}=e,k=1===U||2===U;if((0,S.NB)(z,e),r.add("position","vec3"),B.add("vpos","vec3",{invariant:!0}),t.include(M.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(y.Z,e),!(0,o._o)(V))return t.include(f.E,e),t;(0,S.yu)(t.vertex,e),t.include(d.Y,e),t.include(a.d),G&&t.include(i.M),B.add("vNormalWorld","vec3"),B.add("localvpos","vec3",{invariant:!0}),t.include(h.U,e),t.include(u.K,e),t.include(s.v,e),t.include(m.c,e),z.include(c.WD),z.include(c.oF),z.uniforms.add(new A.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),B.add("vcolorExt","vec4"),t.include(e.instancedDoublePrecision?b.G:b.Bz,e),z.main.add(R.H`
581
+ }`);default:(0,i.Xb)(t.textureCoordinateType);case 0:return void e.vertex.code.add(o.H`void forwardTextureCoordinates() {}`);case 3:return}}},57323:(e,t,r)=>{r.d(t,{R:()=>L,b:()=>z});var i=r(32680),o=r(49255),n=r(76591),a=r(76597),s=r(24321),l=r(60864),c=r(43519),d=r(96336),u=r(71955),h=r(53466),m=r(92700),p=r(35640),f=r(40261),v=r(14527),g=r(89390),_=r(98619),x=r(22393),w=r(59469),b=r(32482),y=r(96598),M=r(42398),T=r(58614),C=r(27950),S=r(25178),E=r(33079),A=r(71988),I=r(20304),R=r(31821),F=r(63761),P=r(10906),O=r(43616),D=r(51255),H=r(14113),N=r(49788);function z(e){const t=new H.N5,{attributes:r,vertex:z,fragment:L,varyings:B}=t,{output:V,offsetBackfaces:G,pbrMode:U,snowCover:j,spherical:W}=e,k=1===U||2===U;if((0,S.NB)(z,e),r.add("position","vec3"),B.add("vpos","vec3",{invariant:!0}),t.include(M.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(y.Z,e),!(0,o._o)(V))return t.include(f.E,e),t;(0,S.yu)(t.vertex,e),t.include(d.Y,e),t.include(a.d),G&&t.include(i.M),B.add("vNormalWorld","vec3"),B.add("localvpos","vec3",{invariant:!0}),t.include(h.U,e),t.include(u.K,e),t.include(s.v,e),t.include(m.c,e),z.include(c.WD),z.include(c.oF),z.uniforms.add(new A.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),B.add("vcolorExt","vec4"),t.include(e.instancedDoublePrecision?b.G:b.Bz,e),z.main.add(R.H`
569
582
  forwardNormalizedVertexColor();
570
583
 
571
584
  MaskedColor maskedColorExt =
@@ -588,7 +601,7 @@ vuvRegion = uvRegion;
588
601
  forwardLinearDepthToReadShadowMap();
589
602
  gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
590
603
  ${(0,R.If)(G,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
591
- `);const{hasColorTexture:$,hasColorTextureTransform:Z}=e;return t.include(g.kA,e),L.include(v.n,e),t.include(T.S,e),L.include(n.HQ,e),t.include(D.z,e),(0,S.yu)(L,e),(0,_.Gc)(L),(0,g.a8)(L),(0,g.eU)(L),L.uniforms.add(z.uniforms.get("localOrigin"),z.uniforms.get("view"),new E.t("ambient",e=>e.ambient),new E.t("diffuse",e=>e.diffuse),new I.m("opacity",e=>e.opacity),new I.m("layerOpacity",e=>e.layerOpacity)),$&&L.uniforms.add(new F.N("tex",e=>e.texture)),t.include(w._,e),L.include(x.c,e),L.include(C.N),L.include(P.b,e),(0,_.O4)(L),L.main.add(R.H`
604
+ `);const{hasColorTexture:$,hasColorTextureTransform:Z}=e;return t.include(g.kA,e),L.include(v.n,e),t.include(T.S,e),L.include(n.HQ,e),t.include(D.D,e),(0,S.yu)(L,e),(0,_.Gc)(L),(0,g.a8)(L),(0,g.eU)(L),L.uniforms.add(z.uniforms.get("localOrigin"),z.uniforms.get("view"),new E.t("ambient",e=>e.ambient),new E.t("diffuse",e=>e.diffuse),new I.m("opacity",e=>e.opacity),new I.m("layerOpacity",e=>e.layerOpacity)),$&&L.uniforms.add(new F.N("tex",e=>e.texture)),t.include(w._,e),L.include(x.c,e),L.include(C.N),L.include(P.b,e),(0,_.O4)(L),L.main.add(R.H`
592
605
  discardBySlice(vpos);
593
606
  discardByTerrainDepth();
594
607
  vec4 texColor = ${$?`texture(tex, ${Z?"colorUV":"vuv0"})`:" vec4(1.0)"};
@@ -623,7 +636,7 @@ vuvRegion = uvRegion;
623
636
  ${(0,R.If)(j,"mrr = applySnowToMRR(mrr, snow);")}
624
637
  vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:R.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
625
638
  vec4 finalColor = vec4(shadedColor, opacity_);
626
- outputColorHighlightOID(finalColor, vpos, albedo ${(0,R.If)(j,", 1.0")});`),t}const L=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>n});var i=r(34275),o=r(20498);function n(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.LW)(e)?(0,o.pX)().from(e):(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},58614:(e,t,r)=>{r.d(t,{S:()=>a}),r(28421);var i=r(20304),o=r(31821),n=r(49788);function a(e,t){!function(e,t,r){const i=e.fragment,a=t.alphaDiscardMode,s=0===a;2!==a&&3!==a||i.uniforms.add(r),i.code.add(o.H`
639
+ outputColorHighlightOLID(finalColor, vpos, albedo ${(0,R.If)(j,", 1.0")});`),t}const L=Object.freeze(Object.defineProperty({__proto__:null,build:z},Symbol.toStringTag,{value:"Module"}))},57917:(e,t,r)=>{r.d(t,{S:()=>n});var i=r(34275),o=r(20498);function n(e){if(e.length<i.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,i.LW)(e)?(0,o.pX)().from(e):(0,i.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}},58614:(e,t,r)=>{r.d(t,{S:()=>a}),r(28421);var i=r(20304),o=r(31821),n=r(49788);function a(e,t){!function(e,t,r){const i=e.fragment,a=t.alphaDiscardMode,s=0===a;2!==a&&3!==a||i.uniforms.add(r),i.code.add(o.H`
627
640
  void discardOrAdjustAlpha(inout vec4 color) {
628
641
  ${1===a?"color.a = 1.0;":`if (color.a < ${s?o.H.float(n.Q):"textureAlphaCutoff"}) {\n discard;\n } ${(0,o.If)(2===a,"else { color.a = 1.0; }")}`}
629
642
  }
@@ -652,21 +665,7 @@ float occlusion;`),d&&c.uniforms.add(1===p?new l.N("texMetallicRoughness",e=>e.t
652
665
  ${(0,a.If)(d,`applyMetallicRoughness(${u?"metallicRoughnessUV":"vuv0"});`)}
653
666
  ${(0,a.If)(h,`applyOcclusion(${m?"occlusionUV":"vuv0"});`)}
654
667
  }
655
- `)}(r(74810),r(65786)).Y},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>u,Ue:()=>l,Ut:()=>d,p1:()=>m,tb:()=>p,uO:()=>s,vJ:()=>v,vx:()=>f}),r(38954);var i=r(51850),o=r(58083),n=r(13030),a=r(620);function s(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e)a[r]=o[n[e]],r+=s;else for(let e=0;e<l;++e){const t=o[n[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function l(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length;r*=a;for(let e=0;e<s;++e){const t=2*o[e];n[r]=i[t],n[r+1]=i[t+1],r+=a}}function c(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=3*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}}function d(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}}function u(e,t,r){const i=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=o}function h(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=t[0],m=t[1],p=t[2],f=t[4],v=t[5],g=t[6],_=t[8],x=t[9],w=t[10],b=t[12],y=t[13],M=t[14];i*=d;let T=0,C=0,S=0;const E=(0,o.tZ)(t)?e=>{T=a[e]+b,C=a[e+1]+y,S=a[e+2]+M}:e=>{const t=a[e],r=a[e+1],i=a[e+2];T=h*t+f*r+_*i+b,C=m*t+v*r+x*i+y,S=p*t+g*r+w*i+M};if(1===n)for(let e=0;e<u;++e)E(3*s[e]),l[i]=T,l[i+1]=C,l[i+2]=S,i+=d;else for(let e=0;e<u;++e){E(3*s[e]);for(let e=0;e<n;++e)l[i]=T,l[i+1]=C,l[i+2]=S,i+=d}}function m(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=t,d=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;i*=u;let C=0,S=0,E=0;const A=(0,o.tZ)(l)?e=>{C=a[e],S=a[e+1],E=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];C=m*t+v*r+x*i,S=p*t+g*r+w*i,E=f*t+_*r+b*i};if(1===n)if(y)for(let e=0;e<h;++e){A(3*s[e]);const t=C*C+S*S+E*E;if(t<T&&t>M){const e=1/Math.sqrt(t);d[i]=C*e,d[i+1]=S*e,d[i+2]=E*e}else d[i]=C,d[i+1]=S,d[i+2]=E;i+=u}else for(let e=0;e<h;++e)A(3*s[e]),d[i]=C,d[i+1]=S,d[i+2]=E,i+=u;else for(let e=0;e<h;++e){if(A(3*s[e]),y){const e=C*C+S*S+E*E;if(e<T&&e>M){const t=1/Math.sqrt(e);C*=t,S*=t,E*=t}}for(let e=0;e<n;++e)d[i]=C,d[i+1]=S,d[i+2]=E,i+=u}}function p(e,t,r,i,o=1){const{data:n,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===n.length&&4===t){s[i]=n[0],s[i+1]=n[1],s[i+2]=n[2],s[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=a,i+=t;return}if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}}}function f(e,t,r,i,o=1){const n=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===o)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a}function v(e,t,r,i,o,a,s){let l={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),d=r?.indices;if(r&&d)"position"===c&&(l={numItems:1,numVerticesPerItem:d.length}),g(c,r,i,o,a,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;f(t,a.getField(c,n.XP),e,s)}}}return l}function g(e,t,r,i,s,u){switch(e){case"position":{(0,a.vA)(3===t.size);const i=s.getField(e,n.xs);(0,a.vA)(!!i,`No buffer view for ${e}`),h(t,r,i,u);break}case"normal":{(0,a.vA)(3===t.size);const r=s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),m(t,i,r,u);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uv0":{(0,a.vA)(2===t.size);const r=s.getField(e,n.ZD)??s.getField(e,n.gH);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uvi":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"color":case"symbolColor":{const r=s.getField(e,n.XP);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(3===t.size||4===t.size),p(t,t.size,r,u);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=s.getField(e,n.Y$)??s.getField(e,n.Y$);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(1===t.size),function(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length,l=i[0];r*=a;for(let e=0;e<s;++e)n[r]=l,r+=a}(t,r,u);break}case"tangent":{(0,a.vA)(4===t.size);const i=s.getField(e,n.Eq);(0,a.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void d(e,r,i,n);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let d=m*r+v*o+x*n,h=p*r+g*o+w*n,C=f*r+_*o+b*n;if(y){const e=d*d+h*h+C*C;if(e<T&&e>M){const t=1/Math.sqrt(e);d*=t,h*=t,C*=t}}c[i]=d,c[i+1]=h,c[i+2]=C,c[i+3]=l,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],l=a[t+2],d=a[t+3];let h=m*r+v*o+x*l,C=p*r+g*o+w*l,S=f*r+_*o+b*l;if(y){const e=h*h+C*C+S*S;if(e<T&&e>M){const t=1/Math.sqrt(e);h*=t,C*=t,S*=t}}for(let e=0;e<n;++e)c[i]=h,c[i+1]=C,c[i+2]=S,c[i+3]=d,i+=u}}(t,r,i,u);break}case"profileVertexAndNormal":{(0,a.vA)(4===t.size);const r=s.getField(e,n.jz)??s.getField(e,n.Eq);(0,a.vA)(!!r,`No buffer view for ${e}`),d(t,r,u);break}case"profileAuxData":{(0,a.vA)(3===t.size);const r=s.getField(e,n.EC)??s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),c(t,r,u);break}}}(0,i.vt)()},60517:(e,t,r)=>{r.d(t,{z:()=>c});var i=r(49255),o=r(63201),n=r(42593),a=r(63365),s=r(31821),l=r(49788);function c(e,t){e.include(n.Q,t),e.include(o.NL,t),e.fragment.include(a.a);const{output:r,oitPass:c,hasEmission:d,discardInvisibleFragments:u,snowCover:h}=t,m=9===r,p=(0,i._o)(r)&&1===c,f=(0,i._o)(r)&&1!==c;let v=0;(f||p)&&e.outputs.add("fragColor","vec4",v++),d&&e.outputs.add("fragEmission","vec4",v++),p&&e.outputs.add("fragAlpha","float",v++),e.fragment.code.add(s.H`
656
- void outputColorHighlightOID(vec4 finalColor, const in vec3 vWorldPosition, vec3 emissiveSymbolColor ${(0,s.If)(h,", float snow")}) {
657
- ${(0,s.If)(m,"finalColor.a = 1.0;")}
658
-
659
- ${(0,s.If)(u,`if (finalColor.a < ${s.H.float(l.Q)}) { discard; }`)}
660
-
661
- finalColor = applySlice(finalColor, vWorldPosition);
662
- ${(0,s.If)(p,s.H`fragColor = premultiplyAlpha(finalColor);
663
- fragAlpha = finalColor.a;`)}
664
- ${(0,s.If)(f,"fragColor = finalColor;")}
665
- ${(0,s.If)(d,`fragEmission = ${(0,s.If)(h,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}`)}
666
- calculateOcclusionAndOutputHighlight();
667
- ${(0,s.If)(m,"outputObjectAndLayerIdColor();")}
668
- }
669
- `)}},60864:(e,t,r)=>{r.d(t,{B:()=>_});var i=r(77690),o=r(29242),n=r(9093),a=r(38954),s=r(51850),l=r(26425),c=r(25178),d=r(23205),u=r(31821),h=r(35644),m=r(40095);function p(e,t){const r=e.length;for(let i=0;i<r;++i)v[0]=e[i],t[i]=v[0];return t}function f(e,t){const r=e.length;for(let i=0;i<r;++i)v[0]=e[i],v[1]=e[i]-v[0],t[i]=v[1];return t}const v=new Float32Array(2);r(65786).Y;const g=(0,o.vt)();function _(e,t){const{hasModelTransformation:r,instancedDoublePrecision:o,instanced:s,output:v,hasVertexTangents:_}=t;r&&(e.vertex.uniforms.add(new m.X("model",e=>e.modelTransformation??n.zK)),e.vertex.uniforms.add(new h.k("normalLocalOriginFromModel",e=>((0,i.Ge)(g,e.modelTransformation??n.zK),g)))),s&&o&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));const w=e.vertex;o&&(w.include(l.u,t),w.uniforms.add(new d.d("viewOriginHi",e=>p((0,a.h)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)),new d.d("viewOriginLo",e=>f((0,a.h)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)))),w.code.add(u.H`
668
+ `)}(r(74810),r(65786)).Y},59907:(e,t,r)=>{r.d(t,{Hk:()=>h,Pq:()=>u,Ue:()=>l,Ut:()=>d,p1:()=>m,tb:()=>p,uO:()=>s,vJ:()=>v,vx:()=>f}),r(38954);var i=r(51850),o=r(58083),n=r(13030),a=r(620);function s(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e)a[r]=o[n[e]],r+=s;else for(let e=0;e<l;++e){const t=o[n[e]];for(let e=0;e<i;e++)a[r]=t,r+=s}}function l(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length;r*=a;for(let e=0;e<s;++e){const t=2*o[e];n[r]=i[t],n[r+1]=i[t+1],r+=a}}function c(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=3*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}else for(let e=0;e<l;++e){const t=3*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],r+=s}}function d(e,t,r,i=1){const{data:o,indices:n}=e,a=t.typedBuffer,s=t.typedBufferStride,l=n.length;if(r*=s,1===i)for(let e=0;e<l;++e){const t=4*n[e];a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}else for(let e=0;e<l;++e){const t=4*n[e];for(let e=0;e<i;++e)a[r]=o[t],a[r+1]=o[t+1],a[r+2]=o[t+2],a[r+3]=o[t+3],r+=s}}function u(e,t,r){const i=e.typedBuffer,o=e.typedBufferStride;t*=o;for(let e=0;e<r;++e)i[t]=0,i[t+1]=0,i[t+2]=0,i[t+3]=0,t+=o}function h(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=r.typedBuffer,d=r.typedBufferStride,u=s.length,h=t[0],m=t[1],p=t[2],f=t[4],v=t[5],g=t[6],_=t[8],x=t[9],w=t[10],b=t[12],y=t[13],M=t[14];i*=d;let T=0,C=0,S=0;const E=(0,o.tZ)(t)?e=>{T=a[e]+b,C=a[e+1]+y,S=a[e+2]+M}:e=>{const t=a[e],r=a[e+1],i=a[e+2];T=h*t+f*r+_*i+b,C=m*t+v*r+x*i+y,S=p*t+g*r+w*i+M};if(1===n)for(let e=0;e<u;++e)E(3*s[e]),l[i]=T,l[i+1]=C,l[i+2]=S,i+=d;else for(let e=0;e<u;++e){E(3*s[e]);for(let e=0;e<n;++e)l[i]=T,l[i+1]=C,l[i+2]=S,i+=d}}function m(e,t,r,i,n=1){if(!t)return void c(e,r,i,n);const{data:a,indices:s}=e,l=t,d=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;i*=u;let C=0,S=0,E=0;const A=(0,o.tZ)(l)?e=>{C=a[e],S=a[e+1],E=a[e+2]}:e=>{const t=a[e],r=a[e+1],i=a[e+2];C=m*t+v*r+x*i,S=p*t+g*r+w*i,E=f*t+_*r+b*i};if(1===n)if(y)for(let e=0;e<h;++e){A(3*s[e]);const t=C*C+S*S+E*E;if(t<T&&t>M){const e=1/Math.sqrt(t);d[i]=C*e,d[i+1]=S*e,d[i+2]=E*e}else d[i]=C,d[i+1]=S,d[i+2]=E;i+=u}else for(let e=0;e<h;++e)A(3*s[e]),d[i]=C,d[i+1]=S,d[i+2]=E,i+=u;else for(let e=0;e<h;++e){if(A(3*s[e]),y){const e=C*C+S*S+E*E;if(e<T&&e>M){const t=1/Math.sqrt(e);C*=t,S*=t,E*=t}}for(let e=0;e<n;++e)d[i]=C,d[i+1]=S,d[i+2]=E,i+=u}}function p(e,t,r,i,o=1){const{data:n,indices:a}=e,s=r.typedBuffer,l=r.typedBufferStride,c=a.length;if(i*=l,t===n.length&&4===t){s[i]=n[0],s[i+1]=n[1],s[i+2]=n[2],s[i+3]=n[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=l/4,a=e[i/=4];i+=t;const d=c*o;for(let r=1;r<d;++r)e[i]=a,i+=t;return}if(1!==o)if(4!==t)for(let e=0;e<c;++e){const t=3*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}else for(let e=0;e<c;++e){const t=4*a[e];for(let e=0;e<o;++e)s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}else{if(4===t){for(let e=0;e<c;++e){const t=4*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=n[t+3],i+=l}return}for(let e=0;e<c;++e){const t=3*a[e];s[i]=n[t],s[i+1]=n[t+1],s[i+2]=n[t+2],s[i+3]=255,i+=l}}}function f(e,t,r,i,o=1){const n=t.typedBuffer,a=t.typedBufferStride;if(i*=a,1===o)for(let t=0;t<r;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a;else for(let t=0;t<r;++t)for(let t=0;t<o;++t)n[i]=e[0],n[i+1]=e[1],n[i+2]=e[2],n[i+3]=e[3],i+=a}function v(e,t,r,i,o,a,s){let l={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),d=r?.indices;if(r&&d)"position"===c&&(l={numItems:1,numVerticesPerItem:d.length}),g(c,r,i,o,a,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;f(t,a.getField(c,n.XP),e,s)}}}return l}function g(e,t,r,i,s,u){switch(e){case"position":{(0,a.vA)(3===t.size);const i=s.getField(e,n.xs);(0,a.vA)(!!i,`No buffer view for ${e}`),h(t,r,i,u);break}case"normal":{(0,a.vA)(3===t.size);const r=s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),m(t,i,r,u);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uv0":{(0,a.vA)(2===t.size);const r=s.getField(e,n.ZD)??s.getField(e,n.gH);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"uvi":{(0,a.vA)(2===t.size);const r=s.getField(e,n.mJ);(0,a.vA)(!!r,`No buffer view for ${e}`),l(t,r,u);break}case"color":case"symbolColor":{const r=s.getField(e,n.XP);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(3===t.size||4===t.size),p(t,t.size,r,u);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=s.getField(e,n.Y$)??s.getField(e,n.Y$);(0,a.vA)(!!r,`No buffer view for ${e}`),(0,a.vA)(1===t.size),function(e,t,r){const{data:i,indices:o}=e,n=t.typedBuffer,a=t.typedBufferStride,s=o.length,l=i[0];r*=a;for(let e=0;e<s;++e)n[r]=l,r+=a}(t,r,u);break}case"tangent":{(0,a.vA)(4===t.size);const i=s.getField(e,n.Eq);(0,a.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void d(e,r,i,n);const{data:a,indices:s}=e,l=t,c=r.typedBuffer,u=r.typedBufferStride,h=s.length,m=l[0],p=l[1],f=l[2],v=l[4],g=l[5],_=l[6],x=l[8],w=l[9],b=l[10],y=!(0,o.ut)(l),M=1e-6,T=1-M;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],n=a[t+2],l=a[t+3];let d=m*r+v*o+x*n,h=p*r+g*o+w*n,C=f*r+_*o+b*n;if(y){const e=d*d+h*h+C*C;if(e<T&&e>M){const t=1/Math.sqrt(e);d*=t,h*=t,C*=t}}c[i]=d,c[i+1]=h,c[i+2]=C,c[i+3]=l,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=a[t],o=a[t+1],l=a[t+2],d=a[t+3];let h=m*r+v*o+x*l,C=p*r+g*o+w*l,S=f*r+_*o+b*l;if(y){const e=h*h+C*C+S*S;if(e<T&&e>M){const t=1/Math.sqrt(e);h*=t,C*=t,S*=t}}for(let e=0;e<n;++e)c[i]=h,c[i+1]=C,c[i+2]=S,c[i+3]=d,i+=u}}(t,r,i,u);break}case"profileVertexAndNormal":{(0,a.vA)(4===t.size);const r=s.getField(e,n.jz)??s.getField(e,n.Eq);(0,a.vA)(!!r,`No buffer view for ${e}`),d(t,r,u);break}case"profileAuxData":{(0,a.vA)(3===t.size);const r=s.getField(e,n.EC)??s.getField(e,n.xs);(0,a.vA)(!!r,`No buffer view for ${e}`),c(t,r,u);break}}}(0,i.vt)()},60864:(e,t,r)=>{r.d(t,{B:()=>_});var i=r(77690),o=r(29242),n=r(9093),a=r(38954),s=r(51850),l=r(26425),c=r(25178),d=r(23205),u=r(31821),h=r(35644),m=r(40095);function p(e,t){const r=e.length;for(let i=0;i<r;++i)v[0]=e[i],t[i]=v[0];return t}function f(e,t){const r=e.length;for(let i=0;i<r;++i)v[0]=e[i],v[1]=e[i]-v[0],t[i]=v[1];return t}const v=new Float32Array(2);r(65786).Y;const g=(0,o.vt)();function _(e,t){const{hasModelTransformation:r,instancedDoublePrecision:o,instanced:s,output:v,hasVertexTangents:_}=t;r&&(e.vertex.uniforms.add(new m.X("model",e=>e.modelTransformation??n.zK)),e.vertex.uniforms.add(new h.k("normalLocalOriginFromModel",e=>((0,i.Ge)(g,e.modelTransformation??n.zK),g)))),s&&o&&(e.attributes.add("instanceModelOriginHi","vec3"),e.attributes.add("instanceModelOriginLo","vec3"),e.attributes.add("instanceModel","mat3"),e.attributes.add("instanceModelNormal","mat3"));const w=e.vertex;o&&(w.include(l.u,t),w.uniforms.add(new d.d("viewOriginHi",e=>p((0,a.h)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)),new d.d("viewOriginLo",e=>f((0,a.h)(x,e.camera.viewInverseTransposeMatrix[3],e.camera.viewInverseTransposeMatrix[7],e.camera.viewInverseTransposeMatrix[11]),x)))),w.code.add(u.H`
670
669
  vec3 getVertexInLocalOriginSpace() {
671
670
  return ${r?o?"(model * vec4(instanceModel * localPosition().xyz, 1.0)).xyz":"(model * localPosition()).xyz":o?"instanceModel * localPosition().xyz":"localPosition().xyz"};
672
671
  }
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[36],{1193:(e,t,n)=>{n.d(t,{H:()=>f});var r,o=n(31635),i=n(69540),s=n(25482),a=n(4718),l=n(53966),u=n(91429),c=n(31199);let f=r=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},l.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&l.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},l.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},l.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},l.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},l.A.getLogger(this))}clonePositional(){const e={position:(0,a.o8)(this.position),normal:(0,a.o8)(this.normal),tangent:(0,a.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"color",void 0),(0,o.Cg)([(0,u.wg)("color")],f.prototype,"castColor",null),(0,o.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],f.prototype,"position",void 0),(0,o.Cg)([(0,u.wg)("position")],f.prototype,"castPosition",null),(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"uv",void 0),(0,o.Cg)([(0,u.wg)("uv")],f.prototype,"castUv",null),(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"normal",void 0),(0,o.Cg)([(0,u.wg)("normal")],f.prototype,"castNormal",null),(0,o.Cg)([(0,u.MZ)({json:{write:c.B}})],f.prototype,"tangent",void 0),(0,o.Cg)([(0,u.wg)("tangent")],f.prototype,"castTangent",null),f=r=(0,o.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],f)},9318:(e,t,n)=>{n.d(t,{b:()=>i});var r=n(34727),o=n(97146);function i(e,t,n){const i=Array.isArray(e),c=i?e.length/t:e.byteLength/(4*t),f=i?e:new Uint32Array(e,0,c*t),p=n?.minReduction??0,h=n?.originalIndices||null,g=h?h.length:0,y=n?.componentOffsets||null;let m=0;if(y)for(let e=0;e<y.length-1;e++){const t=y[e+1]-y[e];t>m&&(m=t)}else m=c;const d=Math.floor(1.1*m)+1;(null==u||u.length<2*d)&&(u=new Uint32Array((0,r.cU)(2*d)));for(let e=0;e<2*d;e++)u[e]=0;let x=0;const v=!!y&&!!h,w=v?g:c;let A=(0,o.my)(c);const b=new Uint32Array(g),M=1.96;let C=0!==p?Math.ceil(4*M*M/(p*p)*p*(1-p)):w,T=1,S=y?y[1]:w;for(let e=0;e<w;e++){if(e===C){const t=1-x/e;if(t+M*Math.sqrt(t*(1-t)/e)<p)return null;C*=2}if(e===S){for(let e=0;e<2*d;e++)u[e]=0;if(h)for(let e=y[T-1];e<y[T];e++)b[e]=A[h[e]];S=y[++T]}const n=v?h[e]:e,r=n*t,o=l(f,r,t);let i=o%d,a=x;for(;0!==u[2*i+1];){if(u[2*i]===o){const e=u[2*i+1]-1;if(s(f,r,e*t,t)){a=A[e];break}}i++,i>=d&&(i-=d)}a===x&&(u[2*i]=o,u[2*i+1]=n+1,x++),A[n]=a}if(0!==p&&1-x/c<p)return null;if(v){for(let e=y[T-1];e<b.length;e++)b[e]=A[h[e]];A=(0,o.uW)(b)}const R=i?new Array(x):new Uint32Array(x*t);x=0;for(let e=0;e<w;e++)A[e]===x&&(a(f,(v?h[e]:e)*t,R,x*t,t),x++);if(h&&!v){const e=new Uint32Array(g);for(let t=0;t<e.length;t++)e[t]=A[h[t]];A=(0,o.uW)(e)}return{buffer:Array.isArray(R)?R:R.buffer,indices:A,uniqueCount:x}}function s(e,t,n,r){for(let o=0;o<r;o++)if(e[t+o]!==e[n+o])return!1;return!0}function a(e,t,n,r,o){for(let i=0;i<o;i++)n[r+i]=e[t+i]}function l(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 u=null},16939:(e,t,n)=>{n.d(t,{A:()=>h});var r,o=n(31635),i=n(69540),s=n(25482),a=n(53966),l=n(91429),u=n(56507),c=n(19211),f=n(80882),p=n(31199);let h=r=class extends((0,i.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.faces=null,this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}castFaces(e){return(0,p.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},a.A.getLogger(this))}castMaterial(e){return(0,u.PZ)(e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?f.A:c.A,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,o.Cg)([(0,l.MZ)({json:{write:p.B}})],h.prototype,"faces",void 0),(0,o.Cg)([(0,l.wg)("faces")],h.prototype,"castFaces",null),(0,o.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],h.prototype,"material",void 0),(0,o.Cg)([(0,l.wg)("material")],h.prototype,"castMaterial",null),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],h.prototype,"name",void 0),(0,o.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],h.prototype,"shading",void 0),(0,o.Cg)([(0,l.MZ)({type:Boolean})],h.prototype,"trustSourceNormals",void 0),h=r=(0,o.Cg)([(0,l.$K)("esri.geometry.support.MeshComponent")],h)},18251:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(31635),o=n(69540),i=n(25482),s=n(91429),a=n(51850),l=n(93223);let u=class extends((0,o.OU)(i.o)){constructor(e){super(e),this.type="local",this.origin=(0,a.vt)()}};(0,r.Cg)([(0,l.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211:(e,t,n)=>{n.d(t,{A:()=>f});var r=n(31635),o=n(68197),i=n(69540),s=n(25482),a=n(91429),l=n(35063),u=n(51147),c=n(66895);let f=class extends((0,i.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:l.A.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:l.A.from(e))}clone(e){const t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;const r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null!=this.color?16:0,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null!=this.normalTextureTransform?20:0,e}};(0,r.Cg)([(0,a.MZ)({type:o.A,json:{write:!0}})],f.prototype,"color",void 0),(0,r.Cg)([(0,a.MZ)({type:l.A,json:{write:!0},value:null})],f.prototype,"colorTexture",null),(0,r.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],f.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,a.MZ)({type:l.A,json:{write:!0},value:null})],f.prototype,"normalTexture",null),(0,r.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],f.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaMode",void 0),(0,r.Cg)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,a.MZ)({nonNullable:!0,json:{write:!0}})],f.prototype,"doubleSided",void 0),f=(0,r.Cg)([(0,a.$K)("esri.geometry.support.MeshMaterial")],f)},21287:(e,t,n)=>{n.d(t,{M5:()=>f,eV:()=>c});var r=n(11254),o=n(49186),i=n(74887),s=n(84952),a=n(26306);let l=null,u=!0;function c(e,t,n,r){if(!t||!n)throw new Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch(e){u=!1}const o=function(e,t,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(e,t)}(t,n,r);return o.data.set(e,0),o}async function f(e,t){const{arrayBuffer:l,mediaType:u}=await async function(e,t){const n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const o=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:o.data,mediaType:o.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){const{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(e(l))return r(l,t)}if(c){const{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(e(l))return r(l,t)}return async function(e,t){const n=window.URL.createObjectURL(e);try{const{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){if(!(0,i.zf)(e))throw new o.A("invalid-image",`Could not fetch requested image at ${n}`);throw e}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:u}),t)}},22141:(e,t,n)=>{n.d(t,{$5:()=>b,CN:()=>x,JP:()=>d,KM:()=>C,Mv:()=>S,X4:()=>v,gr:()=>A,qs:()=>M,si:()=>w,xA:()=>T});var r=n(34727),o=n(77690),i=n(29242),s=n(58083),a=n(9093),l=n(38954),u=n(51850),c=n(48353),f=n(9762),p=(n(79258),n(21325)),h=n(28735),g=n(13030),y=n(73354),m=n(65686);const d="Projection may be possible after calling projection.load().";function x(e,t,n,r){e.error(`Failed to project from (wkid:${t.wkid}) to (wkid:${n.wkid}).${r?" ":""}${r}`)}function v(e,t,n,r,o,i){return Z(0,g.xs.fromTypedArray(e),0,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i))?i:null}function w(e,t,n,r,o,i){return Z(1,g.xs.fromTypedArray(e),0,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i))?i:null}function A(e,t,n,r){return(0,f.projectBuffer)(e,t,0,n,r,0)?n:null}function b(e,t,n,r){return(0,f.projectBuffer)(e,t,0,n,r,0)?n:null}function M(e,t,n){return(0,o.Ge)(L,n),(0,y.b)(t,e,L),(0,r.or)(L)&&(0,y.n)(t,t),t}function C(e,t,n){return(0,o.z0)(L,n),(0,m.t)(t,e,L),(0,r.or)(L)&&(0,y.n)(t,t,4),t}function T(e,t,n,r,o,i){if(!Z(0,g.xs.fromTypedArray(e,4*Float32Array.BYTES_PER_ELEMENT),1,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i,4*Float32Array.BYTES_PER_ELEMENT)))return null;for(let t=3;t<e.length;t+=4)i[t]=e[t];return i}function S(e,t,n,r,o,i){if(!Z(1,g.xs.fromTypedArray(e,16),1,g.Xm.fromTypedArray(t),n,g.Xm.fromTypedArray(r),o,g.xs.fromTypedArray(i,16)))return null;for(let t=3;t<e.length;t+=4)i[t]=e[t];return i}function R(e,t,n,r,i){switch((0,c.l)(r,n,B,r),1===e&&(0,s.B8)(B,B),t){case 0:return(0,o.Ge)(i,B);case 1:return(0,o.z0)(i,B)}}function Z(e,t,n,r,o,i,s,a){if(!t)return;const u=r.count;if(function(e){return e.isWGS84||(0,p.x1)(e)||(0,p.q8)(e)||(0,p.KQ)(e)}(o))for(let r=0;r<u;r++)i.getVec(r,U),t.getVec(r,N),(0,l.t)(N,N,R(e,n,U,s,L)),a.setVec(r,N);else for(let o=0;o<u;o++){i.getVec(o,U),t.getVec(o,N);const u=(0,h.jg)(r.get(o,1));let c=Math.cos(u);1===n!=(0===e)&&(c=1/c),R(e,n,U,s,L),0===e?(L[0]*=c,L[1]*=c,L[2]*=c,L[3]*=c,L[4]*=c,L[5]*=c):(L[0]*=c,L[3]*=c,L[6]*=c,L[1]*=c,L[4]*=c,L[7]*=c),(0,l.t)(N,N,L),(0,l.n)(N,N),a.setVec(o,N)}return a}const U=(0,u.vt)(),N=(0,u.vt)(),B=(0,a.vt)(),L=(0,i.vt)()},27615:(e,t,n)=>{n.d(t,{CK:()=>l,Hq:()=>a,MW:()=>u,TE:()=>c,yJ:()=>f});var r=n(38954),o=n(86738),i=n(95696),s=n(18251);function a(e){return null!=e.origin}function l(e){return a(e.vertexSpace)}function u(e,t){if(!a(e))return null;const[n,r,i]=e.origin;return new o.A({x:n,y:r,z:i,spatialReference:t})}function c(e,t){const{x:n,y:r,z:o,spatialReference:a}=e,l=[n,r,o??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(a))?new s.A({origin:l}):new i.A({origin:l})}function f(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.m)(e.origin,t.origin))}},31199:(e,t,n)=>{function r(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 o(e,t,n,o,i){if(!e)return e;if(e instanceof t)return r(e,o,t,i);for(const s of n)if(e instanceof s)return r(new t(e),o,t,i);if(Array.isArray(e))return r(new t(e),o,t,i);{const r=n.map(e=>`'${e.name}'`);return i.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function i(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)}n.d(t,{B:()=>i,b:()=>o})},35063:(e,t,n)=>{n.d(t,{A:()=>m});var r,o=n(31635),i=n(69540),s=(n(44208),n(21287)),a=n(25482),l=n(91429),u=n(56507),c=n(66895),f=n(97159),p=n(43937),h=n(36005);const g=new WeakMap;let y=0,m=class extends((0,i.OU)(a.o)){static{r=this}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,f.t)(e.src,r),crossOrigin:e.crossOrigin};t[n]=o}else if(e instanceof HTMLCanvasElement){const r={type:"canvas-element",imageData:d(e.getContext("2d").getImageData(0,0,e.width,e.height))};t[n]=r}else if(e instanceof HTMLVideoElement){const o={type:"video-element",src:(0,f.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload};t[n]=o}else if(e instanceof ImageData){const r={type:"image-data",imageData:d(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=x(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 x(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{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!(!t||!n(t))||!!(e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}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,++y),t(g.get(this.data))):t()}get memoryUsage(){let e=0;if(e+=null!=this.url?this.url.length:0,null!=this.data){const t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){const t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;const r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function d(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}}function x(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(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,o.Cg)([(0,l.MZ)({type:String,json:{write:f.w}})],m.prototype,"url",null),(0,o.Cg)([(0,l.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],m.prototype,"data",null),(0,o.Cg)([(0,p.K)("data")],m.prototype,"writeData",null),(0,o.Cg)([(0,h.w)("data")],m.prototype,"readData",null),(0,o.Cg)([(0,l.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],m.prototype,"transparent",null),(0,o.Cg)([(0,l.MZ)({json:{write:!0}})],m.prototype,"wrap",void 0),(0,o.Cg)([(0,l.MZ)({readOnly:!0})],m.prototype,"contentHash",null),m=r=(0,o.Cg)([(0,l.$K)("esri.geometry.support.MeshTexture")],m)},40036:(e,t,n)=>{n.d(t,{default:()=>We});var r=n(31635),o=n(69540),i=n(49186),s=n(92474),a=n(53966),l=n(61893),u=n(74887),c=n(36708),f=n(91429),p=n(51850),h=n(91075),g=n(86738),y=n(39829),m=n(70328),d=n(24770),x=n(16939);const v="Expected location to be a Point instance";class w extends i.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),S=n(83349),R=n(95108),Z=n(4197),U=n(97146),N=n(34727),B=n(86211),L=n(38954),F=n(27921);function j(e,t,n){const r=function(e,t,n,r){const o=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],i=r?(0,B.GA)(r)/(0,B.G9)(r):1;return(0,F.lU)(e,(e,t)=>(0,L.h)(e,o(t,0)*i,o(t,1)*i,o(t,2)),n)}(O,e,t,n)?(0,F.Qj)(O):[0,0,1];return Math.abs(r[2])>Math.cos((0,N.kU)(80))?2:Math.abs(r[1])>Math.abs(r[0])?1:0}const O=(0,F.vt)();var E=n(9318);function _(e,t,n,r){const o=e.length,i=new Array(o),s=new Array(o),a=new Array(o),l=e.reduce((e,t)=>e+t.length,0);let u=0,c=0,f=0;const p=(0,Z.jh)(3*l);let h=0;for(let l=o-1;l>=0;l--){const g=e[l],y=1===n&&P(g,t,r);if(y&&1!==o)i[u++]=g;else{let e=g.length;for(let t=0;t<u;++t)e+=i[t].length;const n={index:h,pathLengths:new Array(u+1),count:e,holeIndices:new Array(u)};n.pathLengths[0]=g.length,g.length>0&&(a[f++]={index:h,count:g.length}),h=y?$(g,g.length-1,-1,p,h,g.length,t):$(g,0,1,p,h,g.length,t);for(let e=0;e<u;++e){const r=i[e];n.holeIndices[e]=h,n.pathLengths[e+1]=r.length,r.length>0&&(a[f++]={index:h,count:r.length}),h=$(r,0,1,p,h,r.length,t)}u=0,n.count>0&&(s[c++]=n)}}for(let e=0;e<u;++e){const n=i[e];n.length>0&&(a[f++]={index:h,count:n.length}),h=$(n,0,1,p,h,n.length,t)}return s.length=c,a.length=f,{position:p,polygons:s,outlines:a}}function $(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]?i[2]:0,t+=n}return o/3}function P(e,t,n){if(!t)return!(0,R.$3)(e);switch(j(e,e.length-1,n)){case 0:return!(0,R.$3)(e,1,2);case 1:return!(0,R.$3)(e,0,2);case 2:return!(0,R.$3)(e,0,1)}}var z=n(65806),I=n(51447);function D(e,t,n,r){if(void 0!==r){(0,I.io)(e(),"option: geographic",{replacement:"Use mesh `vertexSpace` and spatial reference to control how operations are performed instead.",version:"4.30",warnOnce:!0});const o="local"===t.type;if(!(0,T.Hq)(t)||r===o)return n.isGeographic||n.isWebMercator&&r;e().warnOnce(`Specifying the 'geographic' parameter (${r}) for a Mesh vertex space of type "${t.type}" is not supported. This parameter will be ignored.`)}switch(t.type){case"georeferenced":return n.isGeographic;case"local":return n.isGeographic||n.isWebMercator}}var H=n(22141),q=n(72258);const K=()=>a.A.getLogger("esri.geometry.support.meshUtils.centerAt");const k=(0,p.vt)(),G=(0,p.vt)(),V=(0,p.vt)();var W=n(9093),X=n(5443),Y=n(91218),J=n(98764),Q=n(48353),ee=n(9762),te=n(73354);const ne=(0,W.vt)(),re=(0,Z.jh)(24);var oe=n(21818),ie=n(84952);async function se(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){const{source:o}=t,{loadGLTFMesh:s}=await(0,u.qr)(n.e(7375).then(n.bind(n,97375)),r),a=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new i.A("mesh-load-external:missing-assets","There must be at least one file to load");return ge(e.map(e=>({name:e.name,mimeType:e.type,source:le(e)})))}(e.files):le(e.files);case"service":return async function(e,t){if(!e.length)throw new i.A("mesh-load-external:missing-assets","There must be at least one file to load");const n=await(0,u.nA)(e.map(async e=>{const n=await async function(e,t){const{parts:n,assetMimeType:r,assetName:o}=e;if(1===n.length)return new ye(n[0].partUrl);const i=await e.toBlob(t);return(0,u.Te)(t),ye.fromBlob(i,me(o,r))}(e);return(0,u.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,u.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,u.NK)();return ge(n)}(e.assets,t);default:throw new i.A("mesh-load-external:invalid-source","Invalid source type")}}(o,r);(0,u.Te)(r);const l=s(new g.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),a.url,{resolveFile:ae(a),signal:r?.signal,expectedType:a.type,unitConversionDisabled:t.unitConversionDisabled});l.then(()=>a.dispose(),()=>a.dispose());const{mesh:{vertexAttributes:c,components:f},meta:{isDracoDecompressed:p}}=await l;if(p)throw new i.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=c,e.components=f}(e,t,r);case"loadable":return t.source.load(e,r);default:(0,oe.Xb)(t.source)}}function ae(e){const t=(0,ie.nM)(e.url);return n=>{const r=(0,ie.V1)(n,t,t),o=r?r.replace(/^ *\.\//,""):null;return(o?e.files.get(o):null)??n}}function le(e){return ye.fromBlob(e,me(e.name,e.type))}const ue=/^model\/gltf\+json$/,ce=/^model\/gltf-binary$/,fe=/\.gltf$/i,pe=/\.glb$/i;function he({mimeType:e,source:t,name:n}){return ue.test(e)||fe.test(n)?{url:t.url,type:"gltf"}:ce.test(e)||pe.test(n)?{url:t.url,type:"glb"}:null}function ge(e){const t=new Map;let n=null,r=null;for(const o of e){const{source:e,name:i}=o;n??=he(o),"ESRI3DO_NORM.glb"===i&&(r=he(o)),t.set(i,e.url),e.files.forEach((e,n)=>t.set(n,e))}const o=r??n;if(null==o)throw new i.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ye(o.url,()=>e.forEach(({source:e})=>e.dispose()),t,o.type)}class ye{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){const n=URL.createObjectURL(e);return new ye(n,()=>URL.revokeObjectURL(n),void 0,t)}}function me(e,t){return ue.test(t)||fe.test(e)?"gltf":ce.test(t)||fe.test(e)?"glb":void 0}var de=n(66895),xe=n(7762),ve=n(63579);let we=class extends o.Pw{constructor(e){super(e),this.externalSources=new xe.A,this._explicitDisplaySource=null,this.georeferenced=!1,this.addHandles((0,c.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,ve.yr)(e))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,ve.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,ve.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(ve.yr)}};(0,r.Cg)([(0,f.MZ)()],we.prototype,"externalSources",void 0),(0,r.Cg)([(0,f.MZ)()],we.prototype,"displaySource",null),(0,r.Cg)([(0,f.MZ)()],we.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,f.MZ)()],we.prototype,"_explicitDisplaySource",void 0),(0,r.Cg)([(0,f.MZ)()],we.prototype,"georeferenced",void 0),we=(0,r.Cg)([(0,f.$K)("esri.geometry.support.meshUtils.Metadata")],we);var Ae=n(29242);const be={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 Me(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){Re[0]=t[0],Re[4]=t[1],Re[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)Se[n]=e.position[t+n];(0,L.t)(Se,Se,Re);for(let n=0;n<3;n++)e.position[t+n]=Se[n]}if(t[0]!==t[1]||t[1]!==t[2]){Re[0]=1/t[0],Re[4]=1/t[1],Re[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)Se[n]=e.normal[t+n];(0,L.t)(Se,Se,Re),(0,L.n)(Se,Se);for(let n=0;n<3;n++)e.normal[t+n]=Se[n]}}}}(e,function(e,t,n){const r=(0,q.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){const t=e*r;return[t,t,t]}return[null!=e.width?e.width*r:r,null!=e.depth?e.depth*r:r,null!=e.height?e.height*r:r]}(n?.size,n?.unit,t.spatialReference));const r=(0,T.TE)(t,n),o=t.spatialReference.isGeographic?(0,T.TE)(t):r,i=(0,q.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new C.H({...i,uv:e.uv}),vertexSpace:r,components:[new x.A({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const Ce={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},Se=(0,p.vt)(),Re=(0,Ae.vt)();var Ze=n(77690),Ue=n(58083),Ne=n(67026),Be=n(82534);const Le=()=>a.A.getLogger("esri.geometry.support.meshUtils.rotate");function Fe(e,t,n,r=p.uY){if(null!=e){(0,Ue.$0)(_e,(0,d.$I)(t),(0,d.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)je[n]=e[t+n]-r[n];(0,L.p)(je,je,_e);for(let n=0;n<3;n++)e[t+n]=je[n]+r[n]}}}const je=(0,p.vt)(),Oe=(0,W.vt)(),Ee=(0,d.vt)(),_e=(0,W.vt)(),$e=(0,Ae.vt)(),Pe=(0,p.vt)(),ze=(0,Be.vt)(),Ie=()=>a.A.getLogger("esri.geometry.support.meshUtils.scale");function De(e,t,n=p.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)He[t]=e[r+t]-n[t];(0,L.j)(He,He,t);for(let t=0;t<3;t++)e[r+t]=He[t]+n[t]}}const He=(0,p.vt)(),qe=(0,p.vt)(),Ke=(0,W.vt)(),ke=(0,p.vt)();var Ge;const Ve={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let We=Ge=class extends((0,o.OU)((0,s.WV)((0,l.g)(h.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new we,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.H,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,c.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){const{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,o=(0,m.gE)(r,re);if((0,T.Hq)(n)&&e.transform&&(0,te.t)(o,o,e.transform.localMatrix),"georeferenced"===n.type){const e=n.origin;return e&&(0,te.a)(o,o,e),(0,m.w1)((0,m.vY)(o),t)}const i=(0,J.lO)(t),s=n.origin;if(!(0,Y.canProjectWithoutEngine)(i,t)){const[e,n,r]=s;return new X.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,Q.l)(t,s,ne,i),(0,te.t)(o,o,ne),(0,ee.projectBuffer)(o,i,0,o,t,0),(0,m.w1)((0,m.vY)(o),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){const{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,m.vt)(m.v_):(0,m.vY)(e)}get origin(){const e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;const{center:t,zmin:n}=this._transformedExtent;return new g.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||(this.components=[]),this.components.push(x.A.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){const t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}a.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,d.AU)(e,t,n,Xe),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;const{spatialReference:r,vertexSpace:o}=e,i=n?.origin??e.origin,s=n?.geographic,a=D(Le,o,r,s);(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;const{vertexSpace:r,transform:o,spatialReference:i}=e,[s,a,l]=r.origin,u=new g.A({x:s,y:a,z:l,spatialReference:i}),c=je;if(u.equals(n))(0,L.h)(c,0,0,0);else if(!(0,q.p5)(c,n,e))return void(0,H.CN)(Le(),n.spatialReference,i,H.JP);(0,Ne.x8)(ze,(0,d.yo)(t),(0,d.$I)(t));const f=(0,Ue.O7)(Oe,ze,p.uY,p.Un,c),{localMatrix:h}=o,y=(0,Ue.lw)(Oe,f,h);o.scale=(0,Ue.X_)((0,p.vt)(),y),(0,Ue.hs)(y,y,(0,L.o)(je,o.scale));const m=o.rotationAxis;o.rotation=(0,d.ui)(y),0===o.rotationAngle&&(o.rotationAxis=m),o.translation=(0,Ue.sC)((0,p.vt)(),y)}(e,t,i):a?function(e,t,n){const r=e.spatialReference,o=(0,J.lO)(r),i=Pe;if(!(0,z.g)(n,i,o)&&((0,H.CN)(Le(),n.spatialReference,o,"Falling back to mesh origin"),!(0,z.g)(e.origin,i,o)))return void(0,H.CN)(Le(),e.origin.spatialReference,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null!=a?new Float32Array(a.length):null,f=null!=l?new Float32Array(l.length):null;(0,Q.l)(o,i,_e,o),(0,Ze.z0)($e,_e);const p=Ee;(0,L.t)((0,d.yo)(Ee),(0,d.yo)(t),$e),p[3]=t[3],!(0,H.gr)(s,r,u,o)||null!=a&&null!=c&&!(0,H.X4)(a,s,r,u,o,c)||null!=l&&null!=f&&!(0,H.xA)(l,s,r,u,o,f)?(0,H.CN)(Le(),r,o):(Fe(u,p,3,i),!(0,H.$5)(u,o,s,r)||null!=a&&null!=c&&(Fe(c,p,3),!(0,H.si)(c,s,r,u,o,a))||null!=l&&null!=f&&(Fe(f,p,4),!(0,H.Mv)(f,s,r,u,o,l))?(0,H.CN)(Le(),o,r):e.vertexAttributesChanged())}(e,t,i):function(e,t,n){const r=Pe;if(!(0,z.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(Le(),n.spatialReference,e.spatialReference,H.JP)}Fe(e.vertexAttributes.position,t,3,r),Fe(e.vertexAttributes.normal,t,3),Fe(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,i)}(this,Xe,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;const{vertexSpace:r,vertexAttributes:o}=this,i=o?.position;if(!i)return this;if((0,T.Hq)(r)){const[o,i,s]=r.origin;r.origin=(0,p.fA)(o+e,i+t,s+n)}else{for(let r=0;r<i.length;r+=3)i[r]+=e,i[r+1]+=t,i[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")?(function(e,t,n){if(!e.vertexAttributes?.position)return;const{vertexSpace:r,spatialReference:o}=e,i=n?.origin??e.origin,s=n?.geographic,a=D(Ie,r,o,s);(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;const{vertexSpace:r,transform:o,spatialReference:i}=e,[s,a,l]=r.origin,u=new g.A({x:s,y:a,z:l,spatialReference:i}),c=He;if(u.equals(n))(0,L.h)(c,0,0,0);else if(!(0,q.p5)(c,n,e))return void(0,H.CN)(Ie(),n.spatialReference,i,H.JP);const f=(0,L.h)(qe,t,t,t),h=(0,Ue.O7)(Ke,Be.zK,p.uY,f,c),{localMatrix:y}=o,m=(0,Ue.lw)(Ke,h,y);o.scale=(0,Ue.X_)((0,p.vt)(),m),(0,Ue.hs)(m,m,(0,L.o)(He,o.scale));const x=o.rotationAxis;o.rotation=(0,d.ui)(m),0===o.rotationAngle&&(o.rotationAxis=x),o.translation=(0,Ue.sC)((0,p.vt)(),m)}(e,t,i):a?function(e,t,n){const r=e.spatialReference,o=(0,J.lO)(r),i=ke;if(!(0,z.g)(n,i,o)&&((0,H.CN)(Ie(),n.spatialReference,o,"Falling back to mesh origin"),!(0,z.g)(e.origin,i,o)))return void(0,H.CN)(Ie(),e.origin.spatialReference,o);const s=e.vertexAttributes.position,a=e.vertexAttributes.normal,l=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null!=a?new Float32Array(a.length):null,f=null!=l?new Float32Array(l.length):null;!(0,H.gr)(s,r,u,o)||null!=a&&null!=c&&!(0,H.X4)(a,s,r,u,o,c)||null!=l&&null!=f&&!(0,H.xA)(l,s,r,u,o,f)?(0,H.CN)(Ie(),r,o):(De(u,t,i),!(0,H.$5)(u,o,s,r)||null!=a&&null!=c&&!(0,H.si)(c,s,r,u,o,a)||null!=l&&null!=f&&!(0,H.Mv)(f,s,r,u,o,l)?(0,H.CN)(Ie(),o,r):e.vertexAttributesChanged())}(e,t,i):function(e,t,n){const r=ke;if(!(0,z.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(Ie(),n.spatialReference,e.spatialReference,H.JP)}De(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,i)}(this,e,t),this):this}centerAt(e,t){return this._checkIfLoaded("centerAt()")?(function(e,t,n){if(!e.vertexAttributes?.position)return;const{vertexSpace:r}=e,o=n?.origin??e.origin,i=D(K,r,o.spatialReference,n?.geographic);(0,T.Hq)(r)?function(e,t,n){const{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;const o=G,i=k;if(!(0,z.g)(t,i,e.spatialReference))return void(0,H.CN)(K(),t.spatialReference,e.spatialReference,H.JP);if(!(0,z.g)(n,o,e.spatialReference)){const t=e.origin;return o[0]=t.x,o[1]=t.y,o[2]=t.z,void(0,H.CN)(K(),n.spatialReference,e.spatialReference,H.JP)}const s=(0,L.e)(V,i,o);r.origin=(0,L.i)((0,p.vt)(),r.origin,s)}(e,t,o):i?function(e,t,n){const r=(0,p.fA)(n.x,n.y,n.z??0),o=(0,q.UR)(e,new b.A({origin:r}));if(!o)return;const i=(0,p.fA)(t.x,t.y,t.z??0),s=(0,q.UR)({vertexAttributes:o,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:i})},A.A.absolute);if(!s)return;const{position:a,normal:l,tangent:u}=s;e.vertexAttributes.position=a,e.vertexAttributes.normal=l,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,o):function(e,t,n){const r=G,o=k;if((0,z.g)(t,o,e.spatialReference)){if(!(0,z.g)(n,r,e.spatialReference)){const t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,H.CN)(K(),n.spatialReference,e.spatialReference,H.JP)}(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(0,H.CN)(K(),t.spatialReference,e.spatialReference,H.JP)}(e,t,o)}(this,e,t),this):this}load(e){const{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(se(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,de.WO)((0,de.QN)(e)))}cloneShallow(){return new Ge({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){const[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(n.bind(n,84038)),this.load(e)]);return(0,u.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(a.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof g.A))return a.A.getLogger(this.prototype).error(".createBox()",v),null;const n=new Ge(Me(function(){const{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=Ce,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,u=0,c=0,f=0;for(let r=0;r<e.length;r++){const p=e[r],h=l/3;for(const e of t)a[f++]=h+e;const g=p.corners;for(let e=0;e<4;e++){const t=g[e];let r=0;s[c++]=.25*n[e][0]+p.uvOrigin[0],s[c++]=p.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0!==p.axis[e]?(o[l++]=.5*p.axis[e],i[u++]=p.axis[e]):(o[l++]=.5*t[r++],i[u++]=0)}}return{position:o,normal:i,uv:s,faces:a}}(),e,t));return t?.imageFace&&"all"!==t.imageFace?function(e,t){const n=e.components[0],r=n.faces,o=Te[t],i=6*o,s=new Array(6),a=new Array(r.length-6);let l=0,u=0;for(let e=0;e<r.length;e++)e>=i&&e<i+6?s[l++]=r[e]:a[u++]=r[e];if(null!=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 x.A({faces:s,material:n.material}),new x.A({faces:a})],e}(n,t.imageFace):n}static createSphere(e,t){return e instanceof g.A?new Ge(Me(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,u=0,c=0,f=0;for(let e=0;e<=t;e++){const r=e/t*Math.PI+.5*Math.PI,p=Math.cos(r),h=Math.sin(r);Se[2]=h;const g=0===e||e===t,y=g?n-1:n;for(let r=0;r<=y;r++){const h=r/y*2*Math.PI;Se[0]=-Math.sin(h)*p,Se[1]=Math.cos(h)*p;for(let e=0;e<3;e++)o[l]=.5*Se[e],i[l]=Se[e],++l;s[u++]=(r+(g?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(a[c++]=f,a[c++]=f+1,a[c++]=f-n),1!==e&&(a[c++]=f,a[c++]=f-n,a[c++]=f-n-1)),f++}}return{position:o,normal:i,uv:s,faces:a}}(t?.densificationFactor||0),e,t)):(a.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof g.A?new Ge(Me(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,u=0,c=0,f=0;for(let e=0;e<=5;e++){const n=0===e||5===e,p=e<=1||e>=4,h=2===e||4===e,g=n?t-1:t;for(let y=0;y<=g;y++){const m=y/g*2*Math.PI,d=n?0:.5;Se[0]=d*Math.sin(m),Se[1]=d*-Math.cos(m),Se[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[a++]=Se[t],o[l++]=p?2===t?e<=1?1:-1:0:2===t?0:Se[t]/d;i[u++]=(y+(n?.5:0))/t,i[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,h||0===e||y===t||(5!==e&&(s[c++]=f,s[c++]=f+1,s[c++]=f-t),1!==e&&(s[c++]=f,s[c++]=f-t,s[c++]=f-t-1)),f++}}return{position:r,normal:o,uv:i,faces:s}}(t?.densificationFactor||0),e,t)):(a.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof g.A))return a.A.getLogger(this.prototype).error(".createPlane()",v),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 Ge(Me(function(e){const t=be.facingAxisOrderSwap[e],n=be.position,r=be.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],u=Math.abs(l)-1,c=l>=0?1:-1;o[s]=n[e+u]*c,i[s]=r[e+u]*c,s++}}return{position:o,normal:i,uv:new Float32Array(be.uv),faces:new Uint32Array(be.faces),isPlane:!0}}(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof y.A))return a.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;const n=function(e){const t=_(e.rings,e.hasZ,1,e.spatialReference),n=new Array;let r=0,o=0;for(const e of t.polygons){const i=e.count,s=e.index,a=(0,Z.l5)(t.position,3*s,3*i),l=e.holeIndices.map(e=>e-s),u=(0,U.uW)((0,S.e)(a,l,3));n.push({position:a,faces:u}),r+=a.length,o+=u.length}const i=function(e,t,n){if(1===e.length)return e[0];const r=(0,Z.jh)(t),o=new Array(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(const e of t.faces)o[s++]=e+a;a=i/3}return{position:r,faces:(0,U.uW)(o)}}(n,r,o),s=Array.isArray(i.position)?(0,E.b)(i.position,3,{originalIndices:i.faces}):(0,E.b)(i.position.buffer,6,{originalIndices:i.faces});return i.position=(0,Z.xm)(new Float64Array(s.buffer)),i.faces=s.indices,i}(e);return new Ge({vertexAttributes:new C.H({position:n.position}),components:[new x.A({faces:n.faces,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof g.A)){const e=new w;throw a.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}const{loadGLTFMesh:o}=await(0,u.qr)(n.e(7375).then(n.bind(n,97375)),r);return new Ge((await o(e,t,r)).mesh)}static createWithExternalSource(e,t,n){const r=n?.extent??null,{spatialReference:o}=e,i=n?.transform?.clone()??new M.A,s=(0,T.TE)(e,n),a=n?.unitConversionDisabled,l={source:t,extent:r,unitConversionDisabled:a},u=new we;return u.externalSources.push(l),new Ge({metadata:u,transform:i,vertexSpace:s,spatialReference:o})}static createIncomplete(e,t){const{spatialReference:n}=e,r=t?.transform?.clone()??new M.A,o=(0,T.TE)(e,t),s=new Ge({transform:r,vertexSpace:o,spatialReference:n});return s.addResolvingPromise(Promise.reject(new i.A("mesh-incomplete","Mesh resources are not complete"))),s}};(0,r.Cg)([(0,f.MZ)({type:[x.A],json:{write:!0}})],We.prototype,"components",void 0),(0,r.Cg)([(0,f.MZ)({nonNullable:!0,types:Ve,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,de.o2)(t)?.vertexSpace??e.clone(t)})],We.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,f.MZ)({type:M.A,clonable:(e,t)=>{const n=(0,de.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],We.prototype,"transform",void 0),(0,r.Cg)([(0,f.MZ)({constructOnly:!0,type:we,clonable:(e,t)=>(0,de.o2)(t)?.metadata??e.clone()})],We.prototype,"metadata",void 0),(0,r.Cg)([(0,f.MZ)()],We.prototype,"hasExtent",null),(0,r.Cg)([(0,f.MZ)()],We.prototype,"_transformedExtent",null),(0,r.Cg)([(0,f.MZ)()],We.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,f.MZ)()],We.prototype,"origin",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],We.prototype,"extent",null),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],We.prototype,"hasZ",void 0),(0,r.Cg)([(0,f.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],We.prototype,"hasM",void 0),(0,r.Cg)([(0,f.MZ)({type:C.H,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,de.o2)(t)?.vertexAttributes??e.clone(t)})],We.prototype,"vertexAttributes",void 0),We=Ge=(0,r.Cg)([(0,f.$K)("esri.geometry.Mesh")],We);const Xe=(0,d.vt)()},51147:(e,t,n)=>{n.d(t,{A:()=>a});var r=n(31635),o=n(69540),i=n(25482),s=n(91429);let a=class extends((0,o.OU)(i.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],a.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],a.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],a.prototype,"scale",void 0),a=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],a)},63579:(e,t,n)=>{n.d(t,{Bq:()=>l,Qp:()=>a,WN:()=>m,dK:()=>d,eN:()=>h,fH:()=>y,in:()=>g,yr:()=>u});var r=n(11254),o=n(4576),i=(n(44208),n(74887)),s=n(20557);class a{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,o.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(const t of this.parts)e+=t.partHash;return e}async toBlob(e){const{parts:t}=this;if(1===t.length)return t[0].toBlob(e);const n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,i.Te)(e),new Blob(n)}}class l{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){const{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,i.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(p):p(e.files);case"service":return e.assets.some(p);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(e){if(e instanceof File){const{type:t,name:n}=e;return c.test(t)||f.test(n)}return c.test(e.assetMimeType)||f.test(e.assetName)}function h(e,t){if(!e)return!1;const{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;const{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;const e=(e,t)=>e.assetName<t.assetName?-1:e.assetName>t.assetName?1:0,t=[...n.assets].sort(e),o=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(o[e]))return!1;return!0}return!1}function y(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function m(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function d(e){return!!e.original}},66895:(e,t,n)=>{n.d(t,{$N:()=>c,Lz:()=>i,QN:()=>f,WO:()=>l,hz:()=>a,o2:()=>o});const r=Symbol("meshContext");function o(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function i(e,t){const n=o(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function a(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function l(e){const t=a(e);if(t?.materialMap)return e;const n={materialMap:new Map};return{...e,[s]:n}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function f(e){const t=c(e);if(t?.textureMap)return e;const n={textureMap:new Map};return{...e,[u]:n}}},72258:(e,t,n)=>{n.d(t,{UR:()=>A,p5:()=>w,xK:()=>R});var r=n(53966),o=n(34727),i=n(86211),s=n(77690),a=n(29242),l=n(58083),u=n(9093),c=n(38954),f=n(51850),p=n(98764),h=n(48353),g=n(65806),y=n(27615),m=n(21325),d=n(73354),x=n(22141);const v=()=>r.A.getLogger("esri.geometry.support.meshUtils.vertexSpaceConversion");function w(e,t,{vertexSpace:n,spatialReference:r}){if("georeferenced"===n.type){const o=e;if(!(0,g.g)(t,o,r))return!1;const{origin:i}=n;return(0,c.e)(e,o,i),!0}const o=(0,p.lO)(r),i=e;if(!(0,g.g)(t,i,o))return!1;const{origin:s}=n,a=L;if(!(0,h.l)(r,s,a,o))return!1;const u=(0,l.B8)(L,a);return null!=u&&((0,c.p)(e,i,u),!0)}function A(e,t,n){const{vertexSpace:r,transform:o,vertexAttributes:i}=e,a=(0,y.Hq)(r)?o:null,f=T(e.spatialReference,n,3);if((0,y.yJ)(r,t)&&(!a||(0,l.t2)(a.localMatrix,u.zK))&&S(f)){const{position:e,normal:t,tangent:r}=i,o=n?.allowBufferReuse;return{position:o?e:e.slice(),normal:o?t:t?.slice(),tangent:o?r:r?.slice()}}switch(e.vertexSpace.type){case"local":return"local"===t.type?function({vertexAttributes:e,spatialReference:t,transform:n},{origin:r},o,i){const s=b(t,i);if(!(0,h.l)(t,r,Z,s))return(0,x.CN)(v(),t,s),null;if(n&&(0,l.lw)(Z,Z,n.localMatrix),!(0,h.l)(t,o,U,s))return(0,x.CN)(v(),s,t),null;(0,l.B8)(U,U);const a=(0,l.lw)(Z,U,Z);return C(a,t,i,3),M(e,a)}(e,e.vertexSpace,t.origin,n):function({spatialReference:e,vertexAttributes:t,transform:n},{origin:r},o,i){const s=b(e,i);if(!(0,h.l)(e,r,Z,s))return(0,x.CN)(v(),e,s),null;n&&(0,l.lw)(Z,Z,n.localMatrix),C(Z,e,i,1);const a=new Float64Array(t.position.length),u=function(e,t,n,r,o){(0,d.t)(r,e,t);const i=new Float64Array(e.length);return(0,x.$5)(r,o,i,n)?i:((0,x.CN)(v(),o,n),null)}(t.position,Z,e,a,s);if(!u)return null;const f=function(e,t,n,r,o,i){if(null==o)return null;const s=new Float32Array(o.length);return(0,x.qs)(o,s,i),(0,x.si)(s,e,t,n,r,s)?s:((0,x.CN)(v(),r,t),null)}(u,e,a,s,t.normal,Z);if(t.normal&&!f)return null;const p=function(e,t,n,r,o,i){if(null==o)return null;const s=new Float32Array(o.length);return(0,x.KM)(o,s,i),(0,x.Mv)(s,e,t,n,r,s)?s:((0,x.CN)(v(),r,t),null)}(u,e,a,s,t.tangent,Z);if(t.tangent&&!p)return null;if(o){const e=(0,c.q)(B,o);(0,d.a)(u,u,e)}return{position:u,normal:f,tangent:p}}(e,e.vertexSpace,t.origin,n);case"georeferenced":return"local"===t.type?function({vertexAttributes:e,spatialReference:t,transform:n},{origin:r},o,i){const a=b(t,i);if(!(0,h.l)(t,o,Z,a))return(0,x.CN)(v(),t,a),null;const u=1/T(t,i,2);(0,l.hs)(Z,Z,[u,u,u]);const c=(0,l.B8)(U,Z),{position:f,normal:p,tangent:g}=function(e,t,n){if(!t)return e;if(!n){const{position:n,normal:r,tangent:o}=e;return{position:(0,d.a)(new Float64Array(n.length),n,t),tangent:o,normal:r}}const r=M(e,n.localMatrix);return(0,d.a)(r.position,r.position,t),r}(e,r,n),y=new Float64Array(f.length),m=function(e,t,n,r,o){const i=(0,x.gr)(e,t,r,o);if(!i)return(0,x.CN)(v(),t,o),null;const s=new Float64Array(i.length);return(0,d.t)(s,i,n),s}(f,t,c,y,a);if(!m)return null;const w=(0,s.Ge)(N,c),A=function(e,t,n,r,o,i,s){if(null==e)return null;const a=s??new Float32Array(e.length);return(0,x.X4)(e,t,n,r,o,a)?((0,d.b)(a,a,i),a):((0,x.CN)(v(),n,o),null)}(p,f,t,y,a,w,p!==e.normal?p:void 0);if(!A&&p)return null;const C=function(e,t,n,r,o,i,s){if(null==e)return null;const a=s??new Float32Array(e.length);return(0,x.xA)(e,t,n,r,o,a)?((0,d.b)(a,a,i,4),a):((0,x.CN)(v(),n,o),null)}(g,f,t,y,a,w,g!==e.tangent?g:void 0);return!C&&g?null:{position:m,normal:A,tangent:C}}(e,e.vertexSpace,t.origin,n):function({vertexAttributes:e,transform:t,spatialReference:n},{origin:r},o,i){const s=T(n,i,3),a=r||!S(s)?(0,l.C)(Z,t?.localMatrix??u.zK):null;a&&C(a,n,i,3);const{position:f,normal:p,tangent:h}=a?M(e,a):e,g=i?.allowBufferReuse,y=g?f:new Float64Array(f.length);let m=f;if(r&&(m=(0,d.a)(y,m,r)),o){const e=(0,c.q)(B,o);m=(0,d.a)(y,m,e)}return{position:m!==e.position||g?m:m.slice(),normal:p!==e.normal||g?p:p?.slice(),tangent:h!==e.tangent||g?h:h?.slice()}}(e,e.vertexSpace,t.origin,n)}}function b(e,t){return t?.useEllipsoid&&(0,m.B3)(e)?p.Y0:(0,p.lO)(e)}function M(e,t){const n=new Float64Array(e.position.length);(0,d.t)(n,e.position,t);const r=e.normal?new Float32Array(e.normal.length):null,o=e.tangent?new Float32Array(e.tangent.length):null;return r&&e.normal&&(0,x.qs)(e.normal,r,t),o&&e.tangent&&(0,x.KM)(e.tangent,o,t),{position:n,normal:r,tangent:o}}function C(e,t,n,r){const o=T(t,n,r);S(o)||(0,l.hs)(e,e,[o,o,o])}function T(e,t,n){const r=!!(1&n),o=!!(2&n),i=t?.sourceUnit,s=t?.targetUnit;if(!i&&!s)return 1;let a=R(i,e);r||!i||S(a)||(v().warn("source unit conversion not supported"),a=1);let l=1/R(s,e);return o||!s||S(l)||(v().warn("target unit conversion not supported"),l=1),a*l}function S(e){return(0,o.Io)(e,1)}function R(e,t){if(null==e)return 1;const n=(0,i.KX)(t);return 1/(0,i.oU)(n,"meters",e)}const Z=(0,u.vt)(),U=(0,u.vt)(),N=(0,a.vt)(),B=(0,f.vt)(),L=(0,u.vt)()},73354:(e,t,n)=>{n.d(t,{a:()=>f,b:()=>a,c:()=>s,d:()=>o,e:()=>p,f:()=>c,l:()=>u,n:()=>h,t:()=>i});var r=n(40876);function o(e,t,n){i(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function i(e,t,n,r=3,o=r){if(e.length/r!==Math.ceil(t.length/o))return e;const i=e.length/r,s=n[0],a=n[1],l=n[2],u=n[4],c=n[5],f=n[6],p=n[8],h=n[9],g=n[10],y=n[12],m=n[13],d=n[14];let x=0,v=0;for(let n=0;n<i;n++){const n=t[x],i=t[x+1],w=t[x+2];e[v]=s*n+u*i+p*w+y,e[v+1]=a*n+c*i+h*w+m,e[v+2]=l*n+f*i+g*w+d,x+=o,v+=r}return e}function s(e,t,n){a(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)}function a(e,t,n,r=3,o=r){if(e.length/r!==Math.ceil(t.length/o))return;const i=e.length/r,s=n[0],a=n[1],l=n[2],u=n[3],c=n[4],f=n[5],p=n[6],h=n[7],g=n[8];let y=0,m=0;for(let n=0;n<i;n++){const n=t[y],i=t[y+1],d=t[y+2];e[m]=s*n+u*i+p*d,e[m+1]=a*n+c*i+h*d,e[m+2]=l*n+f*i+g*d,y+=o,m+=r}}function l(e,t,n,r=3,o=r){const i=Math.min(e.length/r,t.length/o);let s=0,a=0;for(let l=0;l<i;l++)e[a]=n*t[s],e[a+1]=n*t[s+1],e[a+2]=n*t[s+2],s+=o,a+=r;return e}function u(e,t,n,r){c(e.typedBuffer,t.typedBuffer,n,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,n,o,i=3,s=i){const a=Math.min(e.length/i,t.length/s);let l=0,u=0;const c=1/r.Tf;for(let r=0;r<a;r++)e[u]=o*(n*t[l])**c,e[u+1]=o*(n*t[l+1])**c,e[u+2]=o*(n*t[l+2])**c,l+=s,u+=i}function f(e,t,n,r=3,o=r){const i=e.length/r;if(i!==Math.ceil(t.length/o))return e;let s=0,a=0;for(let l=0;l<i;l++)e[a]=t[s]+n[0],e[a+1]=t[s+1]+n[1],e[a+2]=t[s+2]+n[2],s+=o,a+=r;return e}function p(e,t){h(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function h(e,t,n=3,r=n){const o=Math.min(e.length/n,t.length/r);let i=0,s=0;for(let a=0;a<o;a++){const o=t[i],a=t[i+1],l=t[i+2],u=o*o+a*a+l*l;if(u>0){const t=1/Math.sqrt(u);e[s]=t*o,e[s+1]=t*a,e[s+2]=t*l}i+=r,s+=n}}n(44208),n(53966),Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:c,linearToSRGBView:u,normalize:h,normalizeView:p,scale:l,scaleView:function(e,t,n){l(e.typedBuffer,t.typedBuffer,n,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,n){const r=Math.min(e.count,t.count),o=e.typedBuffer,i=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let l=0,u=0;for(let e=0;e<r;e++)o[u]=s[l]>>n,o[u+1]=s[l+1]>>n,o[u+2]=s[l+2]>>n,l+=a,u+=i},transformMat3:a,transformMat3View:s,transformMat4:i,transformMat4View:o,translate:f},Symbol.toStringTag,{value:"Module"}))},80882:(e,t,n)=>{n.d(t,{A:()=>u});var r=n(31635),o=n(68197),i=n(91429),s=n(19211),a=n(35063),l=n(51147);let u=class extends s.A{constructor(e){super(e),this.emissiveColor=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:a.A.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:a.A.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:a.A.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null!=this.metallicRoughnessTextureTransform?20:0,e}};(0,r.Cg)([(0,i.MZ)({type:o.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,i.MZ)({type:a.A,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,i.MZ)({type:a.A,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,i.MZ)({type:a.A,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,i.MZ)({type:l.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),u=(0,r.Cg)([(0,i.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},83349:(e,t,n)=>{function r(e,t,n){n=n||2;var r,i,a,l,u,c,p,h=t&&t.length,g=h?t[0]*n:e.length,y=o(e,0,g,n,!0),m=[];if(!y||y.next===y.prev)return m;if(h&&(y=f(e,t,y,n)),e.length>80*n){r=a=e[0],i=l=e[1];for(var d=n;d<g;d+=n)(u=e[d])<r&&(r=u),(c=e[d+1])<i&&(i=c),u>a&&(a=u),c>l&&(l=c);p=0!==(p=Math.max(a-r,l-i))?1/p:0}return s(y,m,n,r,i,p),m}function o(e,t,n,r,o){var i,s;if(o===B(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&&b(s,s.next)){var a=s.next;U(s),s=a}return s}function i(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!b(r,r.next)&&0!==A(r.prev,r,r.next))r=r.next;else{var o=r.prev;if(U(r),(r=t=o)===r.next)break;n=!0}}while(n||r!==t);return t}function s(e,t,n,r,o,f,p){if(e){!p&&f&&m(e,r,o,f);for(var h,g,y=e;e.prev!==e.next;)if(h=e.prev,g=e.next,f?l(e,r,o,f):a(e))t.push(h.i/n),t.push(e.i/n),t.push(g.i/n),U(e),e=g.next,y=g.next;else if((e=g)===y){p?1===p?s(e=u(i(e),t,n),t,n,r,o,f,2):2===p&&c(e,t,n,r,o,f):s(i(e),t,n,r,o,f,1);break}}}function a(e){var t=e.prev,n=e,r=e.next;if(A(t,n,r)>=0)return!1;for(var o=e.next.next;o!==e.prev;){if(v(t.x,t.y,n.x,n.y,r.x,r.y,o.x,o.y)&&A(o.prev,o,o.next)>=0)return!1;o=o.next}return!0}function l(e,t,n,r){var o=e.prev,i=e,s=e.next;if(A(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,u=o.x>i.x?o.x>s.x?o.x:s.x:i.x>s.x?i.x:s.x,c=o.y>i.y?o.y>s.y?o.y:s.y:i.y>s.y?i.y:s.y,f=d(a,l,t,n,r),p=d(u,c,t,n,r),h=e.prevZ,g=e.nextZ;h&&h.z>=f&&g&&g.z<=p;){if(h!==e.prev&&h!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,h.x,h.y)&&A(h.prev,h,h.next)>=0)return!1;if(h=h.prevZ,g!==e.prev&&g!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,g.x,g.y)&&A(g.prev,g,g.next)>=0)return!1;g=g.nextZ}for(;h&&h.z>=f;){if(h!==e.prev&&h!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,h.x,h.y)&&A(h.prev,h,h.next)>=0)return!1;h=h.prevZ}for(;g&&g.z<=p;){if(g!==e.prev&&g!==e.next&&v(o.x,o.y,i.x,i.y,s.x,s.y,g.x,g.y)&&A(g.prev,g,g.next)>=0)return!1;g=g.nextZ}return!0}function u(e,t,n){var r=e;do{var o=r.prev,s=r.next.next;!b(o,s)&&M(o,r,r.next,s)&&S(o,s)&&S(s,o)&&(t.push(o.i/n),t.push(r.i/n),t.push(s.i/n),U(r),U(r.next),r=e=s),r=r.next}while(r!==e);return i(r)}function c(e,t,n,r,o,a){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&w(l,u)){var c=R(l,u);return l=i(l,l.next),c=i(c,c.next),s(l,t,n,r,o,a),void s(c,t,n,r,o,a)}u=u.next}l=l.next}while(l!==e)}function f(e,t,n,r){var s,a,l,u=[];for(s=0,a=t.length;s<a;s++)(l=o(e,t[s]*r,s<a-1?t[s+1]*r:e.length,r,!1))===l.next&&(l.steiner=!0),u.push(x(l));for(u.sort(p),s=0;s<u.length;s++)n=i(n=g(u[s],n),n.next);return n}function p(e,t){return e.x-t.x}function h(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 g(e,t){var n=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,u=n,c=n.x,f=n.y,p=1/0;r=n;do{o>=r.x&&r.x>=c&&o!==r.x&&v(i<f?o:s,i,c,f,i<f?s:o,i,r.x,r.y)&&(l=Math.abs(i-r.y)/(o-r.x),S(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&y(n,r)))&&(n=r,p=l)),r=r.next}while(r!==u);return n}(e,t);if(!n)return t;var r=R(n,e),o=i(n,n.next);let s=h(r);return i(s,s.next),o=h(o),h(t===n?o:t)}function y(e,t){return A(e.prev,e,t.prev)<0&&A(t.next,e,e.next)<0}function m(e,t,n,r){var o=e;do{null===o.z&&(o.z=d(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,u=1;do{for(n=e,e=null,i=null,s=0;n;){for(s++,r=n,a=0,t=0;t<u&&(a++,r=r.nextZ);t++);for(l=u;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,u*=2}while(s>1)}(o)}function d(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 v(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 w(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&&M(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(S(e,t)&&S(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)&&(A(e.prev,e,t.prev)||A(e,t.prev,t))||b(e,t)&&A(e.prev,e,e.next)>0&&A(t.prev,t,t.next)>0)}function A(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function b(e,t){return e.x===t.x&&e.y===t.y}function M(e,t,n,r){var o=T(A(e,t,n)),i=T(A(e,t,r)),s=T(A(n,r,e)),a=T(A(n,r,t));return o!==i&&s!==a||!(0!==o||!C(e,n,t))||!(0!==i||!C(e,r,t))||!(0!==s||!C(n,e,r))||!(0!==a||!C(n,t,r))}function C(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 T(e){return e>0?1:e<0?-1:0}function S(e,t){return A(e.prev,e,e.next)<0?A(e,t,e.next)>=0&&A(e,e.prev,t)>=0:A(e,t,e.prev)<0||A(e,e.next,t)<0}function R(e,t){var n=new N(e.i,e.x,e.y),r=new N(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 N(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 U(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 N(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 B(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}n.d(t,{e:()=>r}),r.deviation=function(e,t,n,r){var o=t&&t.length,i=o?t[0]*n:e.length,s=Math.abs(B(e,0,i,n));if(o)for(var a=0,l=t.length;a<l;a++){var u=t[a]*n,c=a<l-1?t[a+1]*n:e.length;s-=Math.abs(B(e,u,c,n))}var f=0;for(a=0;a<r.length;a+=3){var p=r[a]*n,h=r[a+1]*n,g=r[a+2]*n;f+=Math.abs((e[p]-e[g])*(e[h+1]-e[p+1])-(e[p]-e[h])*(e[g+1]-e[p+1]))}return 0===s&&0===f?0:Math.abs((f-s)/s)},r.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}},95696:(e,t,n)=>{n.d(t,{A:()=>u});var r,o=n(31635),i=n(69540),s=n(25482),a=n(91429),l=n(93223);let u=class extends((0,i.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,o.Cg)([(0,l.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,o.Cg)([(0,a.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,o.Cg)([(0,a.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},97146:(e,t,n)=>{n.d(t,{Dg:()=>i,my:()=>s,tM:()=>c,uW:()=>o});var r=n(34275);function o(e){return i(e,!0)}function i(e,t){if(Array.isArray(e)){if(e.length<r.y9)return e}else if(e.length<r.y9)return Array.from(e);let n=!0,o=!0;return e.some((e,t)=>(n=n&&0===e,o=o&&e===t,!n&&!o)),n?function(e){if(1===e)return l;if(e<r.y9)return new Array(e).fill(0);if(e>p.length){const t=Math.max(2*p.length,e);p=new Uint8Array(t)}return new Uint8Array(p.buffer,0,e)}(e.length):o?c(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=r.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=f(131072);const l=[0],u=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function c(e){return 1===e?l:e<r.y9?Array.from(new Uint16Array(u.buffer,0,e)):e<u.length?new Uint16Array(u.buffer,0,e):(e>a.length&&(a=f(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function f(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let p=new Uint8Array(65536)}}]);