@arcgis/core 5.0.0-next.27 → 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
@@ -1 +0,0 @@
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=i(95349),_=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,I.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:I.g,json:{write:!0}})],q.prototype,"colorRamp",void 0),(0,l.Cg)([(0,_.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)}set maxSize(e){e&&this.stops&&(n.A.getLogger(this).warn("cannot set maxSize when stops is not null."),e=null),this._set("maxSize",e)}castMaxSize(e){return 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)}set minSize(e){e&&this.stops&&(n.A.getLogger(this).warn("cannot set minSize when stops is not null."),e=null),this._set("minSize",e)}castMinSize(e){return 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,value:null,json:{write:!0}})],C.prototype,"maxSize",null),(0,s.Cg)([(0,o.wg)("maxSize")],C.prototype,"castMaxSize",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,value:null,json:{write:!0}})],C.prototype,"minSize",null),(0,s.Cg)([(0,o.wg)("minSize")],C.prototype,"castMinSize",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=i(33910);const _="#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,I.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,I.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?.(_,"Unsupported CIM line symbology converted to fallback 3D line symbology"));break;case"CIMPolygonSymbol":v&&(b=z.clone(),t?.logWarning?.(_,"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,I.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,this.values=null}castValues(e){if(null==e)return null;const t=typeof(e=Array.isArray(e)?e:[e])[0];return"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}};(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)({type:[w],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",void 0),(0,s.Cg)([(0,u.wg)("values")],S.prototype,"castValues",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=i(97159),_=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,I.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,I.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 _.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})}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9466],{7142:(t,e,r)=>{function n(t,e){return s(t,"any",e?.origin)}function o(t,e){return s(t,"read",e?.origin)}function i(t,e){return s(t,"write",e?.origin)}function s(t,e,r){let n=t?.json;if(n?.origins&&r){let t;t="link-chart"===r?n.origins[r]&&("any"===e||e in n.origins[r])?n.origins[r]:n.origins["web-map"]:n.origins[r],t&&("any"===e||e in t)&&(n=t)}return n}r.d(e,{N5:()=>o,k4:()=>i,xF:()=>n})},10107:(t,e,r)=>{r.d(e,{MZ:()=>c,rM:()=>l});var n=r(53966),o=r(56507),i=r(16649),s=r(96156),a=r(47821);function c(t={}){return(e,r)=>{if(e===Function.prototype)throw new Error(`Inappropriate use of @property() on a static field: ${e.name}.${r}. Accessor does not support static properties.`);const c=Object.getOwnPropertyDescriptor(e,r),l=(0,s.z4)(e,r);c&&(c.get||c.set?(l.get=c.get||l.get,l.set=c.set||l.set):"value"in c&&("value"in t&&n.A.getLogger("esri.core.accessorSupport.decorators.property").warn(`@property() will redefine the value of "${r}" on "${e.constructor.name}" already defined in the metadata`,t),l.value=t.value=c.value)),null!=t.readOnly&&(l.readOnly=t.readOnly);const u=t.aliasOf;if(u){const t="string"==typeof u?u:u.source,e="string"==typeof u?null:!0===u.overridable;let n;l.dependsOn=[t],l.get=function(){let e=(0,i.Jt)(this,t);if("function"==typeof e){n||(n=t.split(".").slice(0,-1).join("."));const r=(0,i.Jt)(this,n);r&&(e=e.bind(r))}return e},l.readOnly||(l.set=e?function(t){this._override(r,t)}:function(e){(0,a.h)(this,t,e)})}const f=t.type,h=t.types;if(!l.cast){let e;f?e=function(t){let e=0,r=t;if((0,o.Zu)(t))return(0,o.Nd)(t);for(;Array.isArray(r)&&1===r.length&&"string"!=typeof r[0]&&"number"!=typeof r[0];)r=r[0],e++;const n=r;if((0,o.EK)(n))return 0===e?(0,o.MB)(n):(0,o._e)((0,o.MB)(n),e);if(1===e)return(0,o.eC)(n);if(e>1)return(0,o.e6)(n,e);const i=t;return i.from?i.from:(0,o.dp)(i)}(f):h&&(e=Array.isArray(h)?(0,o.wB)((0,o.aq)(h[0])):(0,o.aq)(h)),t.cast=function(t,e){if(t||e)return t?e?(r,n)=>e(t(r,n),n):t:e}(t.cast,e)}(0,s.CX)(l,t),t.range&&(l.cast=(0,o.Qp)(l.cast,t.range))}}function l(t,e,r){const n=(0,s.z4)(t,r);n.json||(n.json={});let o=n.json;return void 0!==e&&(o.origins||(o.origins={}),o.origins[e]||(o.origins[e]={}),o=o.origins[e]),o}},15142:(t,e,r)=>{r.d(e,{A:()=>l});var n=r(4576),o=r(21818);const i=(t,e,r,n)=>{let o=e,i=e;const s=r>>>1,a=t[o-1];for(;i<=s;){i=o<<1,i<r&&n(t[i-1],t[i])<0&&++i;const e=t[i-1];if(n(e,a)<=0)break;t[o-1]=e,o=i}t[o-1]=a},s=(t,e)=>t<e?-1:t>e?1:0;function a(t,e,r,n){void 0===e&&(e=0),void 0===r&&(r=t.length),void 0===n&&(n=s);for(let o=r>>>1;o>e;o--)i(t,o,r,n);const o=e+1;for(let s=r-1;s>e;s--){const r=t[e];t[e]=t[s],t[s]=r,i(t,o,s,n)}}function*c(t,e,r,n){void 0===e&&(e=0),void 0===r&&(r=t.length),void 0===n&&(n=s);for(let o=r>>>1;o>e;o--)i(t,o,r,n),yield;const o=e+1;for(let s=r-1;s>e;s--){const r=t[e];t[e]=t[s],t[s]=r,i(t,o,s,n),yield}}class l{constructor(t){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new n.vW,t&&(t.initialSize&&(this.data=new Array(t.initialSize)),t.allocator&&(this._allocator=t.allocator),void 0!==t.deallocator&&(this._deallocator=t.deallocator),t.shrink&&(this._shrink=()=>u(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const e=new Array;for(let r=0;r<this._length;r++){const n=this.data[r];t(n)&&e.push(n)}return e}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,e){const r=this.data.indexOf(t,e);return-1!==r&&r<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let e=t;e<this._length;++e)this.data[e]=this._deallocator(this.data[e]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,e=t.length){for(let r=0;r<e;r++)this.data[this._length++]=t[r]}fill(t,e){for(let r=0;r<e;r++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,u(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const e=(0,n.qh)(this.data,(0,o.zI)(t),this.length,this._hint);if(-1!==e)return this.data.splice(e,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex((0,n.qh)(this.data,(0,o.zI)(t),this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,e=t.length,r){this.length=(0,n.mW)(this.data,t,this.length,e,this._hint,r),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,e){if(t>=this.length||e>=this.length||t===e)return;const r=this.data[t];this.data[t]=this.data[e],this.data[e]=r}sort(t){a(this.data,0,this.length,t)}iterableSort(t){return c(this.data,0,this.length,t)}some(t,e){for(let r=0;r<this.length;++r)if(t.call(e,this.data[r],r,this.data))return!0;return!1}find(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)if(t.call(e,r[o]))return r[o]}filterInPlace(t,e){let r=0;for(let n=0;n<this._length;++n){const o=this.data[n];t.call(e,o,n,this.data)&&(this.data[n]=this.data[r],this.data[r]=o,r++)}if(this._deallocator)for(let t=r;t<this._length;t++)this.data[t]=this._deallocator(this.data[t]);return this._length=r,this._shrink(),this}forAll(t,e){const{data:r,length:n}=this;for(let o=0;o<n;++o)t.call(e,r[o],o,r)}forEach(t,e){this.data.slice(0,this.length).forEach(t,e)}map(t,e){const r=new Array(this.length);for(let n=0;n<this.length;++n)r[n]=t.call(e,this.data[n],n,this.data);return r}reduce(t,e){let r=e;for(let e=0;e<this.length;++e)r=t(r,this.data[e],e,this.data);return r}has(t){const e=this.length,r=this.data;for(let n=0;n<e;++n)if(r[n]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function u(t){t.data.length>1.5*t.length&&(t.data.length=Math.floor(1.1*t.length))}},15903:(t,e,r)=>{function n(t){return!!t&&t.prototype?.declaredClass&&0===t.prototype.declaredClass.indexOf("esri.core.Collection")}r.d(e,{P:()=>n})},16649:(t,e,r)=>{r.d(e,{Jt:()=>a,RP:()=>s,t2:()=>c});var n=r(88620);function o(t,e){const r=t.endsWith("?")?t.slice(0,-1):t;if(null!=e.getItemAt||Array.isArray(e)){const t=parseInt(r,10);if(!isNaN(t))return Array.isArray(e)?e[t]:e.at(t)}const o=(0,n.oY)(e);return(0,n.yh)(o,r)?o.get(r):e[r]}function i(t,e,r){if(null==t)return t;const n=o(e[r],t);return!n&&r<e.length-1?void 0:r===e.length-1?n:i(n,e,r+1)}function s(t,e,r=0){return"string"!=typeof e||e.includes(".")?i(t,(0,n.AH)(e),r):o(e,t)}function a(t,e){return s(t,e)}function c(t,e){return void 0!==s(e,t)}},24326:(t,e,r)=>{r.d(e,{c:()=>o});let n=0;function o(){return++n}},26390:(t,e,r)=>{r.d(e,{d:()=>o});const n=[];function o(t){n.push(t),1===n.length&&queueMicrotask(()=>{const t=n.slice();n.length=0;for(const e of t)e()})}},36005:(t,e,r)=>{r.d(e,{w:()=>o});var n=r(10107);function o(t,e,r){let o,i;return void 0===e||Array.isArray(e)?(i=t,r=e,o=[void 0]):(i=e,o=Array.isArray(t)?t:[t]),(t,e)=>{const s=t.constructor.prototype;o.forEach(o=>{const a=(0,n.rM)(t,o,i);a.read&&"object"==typeof a.read||(a.read={}),a.read.reader=s[e],r&&(a.read.source=(a.read.source||[]).concat(r))})}}},43937:(t,e,r)=>{r.d(e,{K:()=>o});var n=r(10107);function o(t,e,r){let o,i;return void 0===e?(i=t,o=[void 0]):"string"!=typeof e?(i=t,o=[void 0],r=e):(i=e,o=Array.isArray(t)?t:[t]),(t,e)=>{const s=t.constructor.prototype;for(const a of o){const o=(0,n.rM)(t,a,i);o.write&&"object"==typeof o.write||(o.write={}),r&&(o.write.target=r),o.write.writer=s[e]}}}},47328:(t,e,r)=>{r.d(e,{i:()=>n});const n={Dirty:1,Overridden:2,Computing:4,NonNullable:8,HasDefaultValue:16,DepTrackingInitialized:32,AutoTracked:64,ExplicitlyTracking:128}},47821:(t,e,r)=>{r.d(e,{h:()=>s});var n=r(49186),o=r(44208),i=(r(53966),r(16649));function s(t,e,r){if(t&&e)if("object"==typeof e)for(const r of Object.getOwnPropertyNames(e))s(t,r,e[r]);else{if(e.includes(".")){const n=e.split("."),o=n.splice(-1,1)[0];return void s((0,i.Jt)(t,n),o,r)}const a=t.__accessor__;null!=a&&function(t,e){if((0,o.A)("esri-unknown-property-errors")&&!function(t,e){return null!=e.metadata[t]}(t,e))throw new n.A("set:unknown-property",function(t,e){return"setting unknown property '"+t+"' on instance of "+e.host.declaredClass}(t,e))}(e,a),t[e]=r}}},56454:(t,e,r)=>{r.d(e,{G:()=>n});const n=Symbol("Accessor-beforeDestroy")},56507:(t,e,r)=>{r.d(e,{EK:()=>S,GB:()=>l,GX:()=>c,MB:()=>T,Nd:()=>z,PZ:()=>v,Qp:()=>h,Uv:()=>E,Vr:()=>u,Zu:()=>C,_e:()=>k,aq:()=>M,dp:()=>A,e6:()=>N,eC:()=>j,gK:()=>P,jz:()=>$,wB:()=>m}),r(44208);var n=r(53966),o=r(91869);const i=()=>n.A.getLogger("esri.core.accessorSupport.ensureTypes");function s(t){if(null==t)return t;const e=new Date(t);return isNaN(e.getTime())?(i().error("Accessor#set",`Invalid date value: '${t}', falling back to current date`),new Date):e}function a(t){return null==t?t:!!t}function c(t){return null==t?t:t.toString()}function l(t,e=0){return null==t?t:(t=parseFloat(t),isNaN(t)?e:t)}function u(t){return null==t?t:Math.round(parseFloat(t))}function f(t){return null}function h(t,e){return r=>{let n=t(r);return null!=e.step&&(n=Math.round(n/e.step)*e.step),null!=e.min&&(n=Math.max(e.min,n)),null!=e.max&&(n=Math.min(e.max,n)),n}}function p(t){return t?.constructor&&void 0!==t.constructor.__accessorMetadata__}function d(t,e){return null!=e&&t&&!(e instanceof t)}function y(t){return t&&"isCollection"in t}function g(t){return t?.Type?"function"==typeof t.Type?t.Type:t.Type.base:null}function _(t,e){return!!p(e)&&(i().error("Accessor#set","Assigning an instance of '"+(e.declaredClass||"unknown")+"' which is not a subclass of '"+w(t)+"'"),!0)}function v(t,e){return null==e?e:y(t)?function(t,e){if(!e?.constructor||!y(e.constructor))return _(t,e)?e:new t(e);const r=g(t.prototype.itemType),n=g(e.constructor.prototype.itemType);return r?n?r===n?e:r.prototype.isPrototypeOf(n.prototype)?new t(e):(_(t,e),e):new t(e):e}(t,e):d(t,e)?_(t,e)?e:new t(e):e}function w(t){return t?.prototype?.declaredClass||"unknown"}const b=new WeakMap;function A(t,e){const r=function(t){switch(t){case Number:return t=>l(t);case $:return u;case Boolean:return a;case String:return c;case Date:return s;case E:return f;default:return(0,o.tE)(b,t,()=>v.bind(null,t))}}(t);return 1===arguments.length?r:r(e)}function m(t,e,r){return 1===arguments.length?m.bind(null,t):e?Array.isArray(e)?e.map(e=>t(e,r)):[t(e,r)]:e}function j(t,e){return 1===arguments.length?m(e=>A(t,e)):m(e=>A(t,e),e)}function O(t,e,r){return 0!==e&&Array.isArray(r)?r.map(r=>O(t,e-1,r)):t(r)}function k(t,e,r){if(2===arguments.length)return r=>k(t,e,r);if(!r)return r;r=O(t,e,r);let n=e,o=r;for(;n>0&&Array.isArray(o);)n--,o=o[0];if(void 0!==o)for(let t=0;t<n;t++)r=[r];return r}function N(t,e,r){return 2===arguments.length?k(e=>A(t,e),e):k(e=>A(t,e),e,r)}function S(t){return!!Array.isArray(t)&&!t.some(e=>{const r=typeof e;return!("string"===r||"number"===r||"function"===r&&t.length>1)})}function T(t,e){if(2===arguments.length)return T(t).call(null,e);const r=new Set,n=t.filter(t=>"function"!=typeof t),o=t.filter(t=>"function"==typeof t);for(const e of t)"string"!=typeof e&&"number"!=typeof e||r.add(e);let s=null,a=null;return(t,e)=>{if(null==t)return t;const c=typeof t,l="string"===c||"number"===c;return l&&(r.has(t)||o.some(t=>"string"===c&&t===String||"number"===c&&t===Number))||"object"===c&&o.some(e=>!d(e,t))?t:(l&&n.length?(s||(s=n.map(t=>"string"==typeof t?`'${t}'`:`${t}`).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, only the following values are valid: ${s}`)):"object"==typeof t&&o.length?(a||(a=o.map(t=>w(t)).join(", ")),i().error("Accessor#set",`'${t}' is not a valid value for this property, value must be one of ${a}`)):i().error("Accessor#set",`'${t}' is not a valid value for this property`),e&&(e.valid=!1),null)}}function M(t,e){if(2===arguments.length)return M(t).call(null,e);const r={},n=[],o=[];for(const e in t.typeMap){const i=t.typeMap[e];r[e]=A(i),n.push(w(i)),o.push(e)}const s=()=>`'${n.join("', '")}'`,a=()=>`'${o.join("', '")}'`,c="string"==typeof t.key?e=>e[t.key]:t.key;return e=>{if(t.base&&!d(t.base,e))return e;if(null==e)return e;const n=c(e)||t.defaultKeyValue,o=r[n];if(!o)return i().error("Accessor#set",`Invalid property value, value needs to be one of ${s()}, or a plain object that can autocast (having .type = ${a()})`),null;if(!d(t.typeMap[n],e))return e;if("string"==typeof t.key&&!p(e)){const r={};for(const n in e)n!==t.key&&(r[n]=e[n]);return o(r)}return o(e)}}class ${}class E{}const P={native:t=>({type:"native",value:t}),array:t=>({type:"array",value:t}),oneOf:t=>({type:"one-of",values:t})};function C(t){if(!t||"object"!=typeof t&&"function"!=typeof t||!("type"in t))return!1;switch(t.type){case"native":case"array":case"one-of":return!0}return!1}function z(t){switch(t.type){case"native":return A(t.value);case"array":return m(z(t.value));case"one-of":return function(t){let e=null;return(r,n)=>D(r,t)?r:(null==e&&(e=I(t)),i().error("Accessor#set",`Invalid property value, value needs to be of type ${e}`),n&&(n.valid=!1),null)}(t);default:return null}}function I(t){switch(t.type){case"native":switch(t.value){case Number:return"number";case String:return"string";case Boolean:return"boolean";case $:return"integer";case Date:return"date";case E:return"null";default:return w(t.value)}case"array":return`array of ${I(t.value)}`;case"one-of":{const e=t.values.map(t=>I(t));return`one of ${e.slice(0,-1)} or ${e[e.length-1]}`}}return"unknown"}function D(t,e){if(null==t)return!0;switch(e.type){case"native":switch(e.value){case Number:case $:return"number"==typeof t;case Boolean:return"boolean"==typeof t;case String:return"string"==typeof t;case E:return null===t}return t instanceof e.value;case"array":return!!Array.isArray(t)&&!t.some(t=>!D(t,e.value));case"one-of":return e.values.some(e=>D(t,e))}}},62788:(t,e,r)=>{r.d(e,{F_:()=>p,Xr:()=>w,a:()=>h,fE:()=>_,gc:()=>l}),r(44208);var n=r(53966),o=r(88620),i=r(47328);const s=new(r(67867).R),a=[];let c=s;function l(t){c.onAccessed(t)}let u=!1,f=!1;function h(t,e,r){if(u)return d(t,e,r);let n=null;return y(t),n=e.call(r),g(),n}function p(t,e){return h(s,t,e)}function d(t,e,r){const o=u;u=!0,y(t);let i=null;try{i=e.call(r)}catch(t){f&&n.A.getLogger("esri.core.accessorSupport.tracking").error(t)}return g(),u=o,i}function y(t){c=t,a.push(t)}function g(){const t=a.length;if(t>1){const e=a.pop();c=a[t-2],e.onTrackingEnd()}else if(1===t){const t=a.pop();c=s,t.onTrackingEnd()}else c=s}function _(t,e){if(e.flags&i.i.DepTrackingInitialized)return;e.flags|=i.i.DepTrackingInitialized;const r=f;f=!1,e.flags&i.i.AutoTracked?d(e.trackingTarget,e.metadata.get,t):w(t,e),f=r}const v=[];function w(t,e){e.flags&i.i.ExplicitlyTracking||(e.flags|=i.i.ExplicitlyTracking,d(e.trackingTarget,()=>{const r=e.metadata.dependsOn||v;for(const e of r)if("string"!=typeof e||e.includes(".")){const r=(0,o.AH)(e);for(let e=0,n=t;e<r.length&&null!=n&&"object"==typeof n;++e)n=b(n,r[e],e!==r.length-1)}else b(t,e,!1)}),e.flags&=~i.i.ExplicitlyTracking)}function b(t,e,r){const n=e.endsWith("?")?e.slice(0,-1):e;if(null!=t.getItemAt||Array.isArray(t)){const e=parseInt(n,10);if(!isNaN(e))return Array.isArray(t)?t[e]:t.at(e)}const i=(0,o.oY)(t);if(i){const e=i.propertiesByName.get(n);e&&(l(e),_(t,e))}return r?t[n]:void 0}},64108:(t,e,r)=>{r.d(e,{$:()=>A}),r(44208);var n=r(53966),o=r(56454),i=r(85537),s=r(96156),a=r(62788),c=r(56507),l=r(90360);function u(t){if(t.json||(t.json={}),h(t.json),p(t.json),f(t.json),t.json.origins)for(const e in t.json.origins)h(t.json.origins[e]),p(t.json.origins[e]),f(t.json.origins[e]);return!0}function f(t){t.name&&(t.read&&"object"==typeof t.read?void 0===t.read.source&&(t.read.source=t.name):t.read={source:t.name},t.write&&"object"==typeof t.write?void 0===t.write.target&&(t.write.target=t.name):t.write={target:t.name})}function h(t){"boolean"==typeof t.read?t.read={enabled:t.read}:"function"==typeof t.read?t.read={enabled:!0,reader:t.read}:t.read&&"object"==typeof t.read&&void 0===t.read.enabled&&(t.read.enabled=!0)}function p(t){"boolean"==typeof t.write?t.write={enabled:t.write}:"function"==typeof t.write?t.write={enabled:!0,writer:t.write}:t.write&&"object"==typeof t.write&&void 0===t.write.enabled&&(t.write.enabled=!0)}var d=r(67124);function y(t){return t.type?g(t):_(t)}function g(t){if(!t.type)return;let e=0,r=t.type;for(;Array.isArray(r)&&!(0,c.EK)(r);)r=r[0],e++;return{type:r,ndimArray:e}}function _(t){if(!t.types)return;let e=0,r=t.types;for(;Array.isArray(r);)r=r[0],e++;return{types:r,ndimArray:e}}function v(t){u(t)&&(function(t){if(t.json&&t.json.origins){const e=t.json.origins,r={"web-document":["web-scene","web-map"]};for(const t in r)if(e[t]){const n=e[t];r[t].forEach(t=>{e[t]=n}),delete e[t]}}}(t),function(t){const e=function(t){return t.json.types?_(t.json):t.type?g(t):_(t)}(t);if(t.json.origins)for(const r in t.json.origins){const n=t.json.origins[r],o=n.types?y(n):e;(0,l.v)(o,n,!1),n.types&&!n.write&&t.json.write?.enabled&&(n.write={...t.json.write}),(0,d.v)(o,n)}(0,l.v)(e,t.json,!0),(0,d.v)(e,t.json)}(t))}const w=new Set,b=new Set;function A(t){return e=>{t??="esri.core.Accessor",e.prototype.declaredClass=t,j(e);const r=[],n=[];let a=e.prototype;for(;a;)a.hasOwnProperty("initialize")&&!w.has(a.initialize)&&(w.add(a.initialize),r.push(a.initialize)),a.hasOwnProperty("destroy")&&!b.has(a.destroy)&&(b.add(a.destroy),n.push(a.destroy)),a=Object.getPrototypeOf(a);w.clear(),b.clear();const c=class extends e{constructor(...t){if(super(...t),this.constructor===c&&"function"==typeof this.postscript){if(r.length&&Object.defineProperty(this,"initialize",{enumerable:!1,configurable:!0,value(){for(let t=r.length-1;t>=0;t--)r[t].call(this)}}),n.length){let t=!1;const e=this[o.G];Object.defineProperty(this,"destroy",{enumerable:!1,configurable:!0,value(){if(!t){this.__accessor__.lifecycle=i.v.DESTROYING,t=!0,e.call(this);for(let t=0;t<n.length;t++)n[t].call(this)}}})}Object.defineProperty(this,Symbol.dispose,{enumerable:!1,configurable:!0,value(){this.destroy()}}),this.postscript()}}};c.__accessorMetadata__=(0,s.tD)(e.prototype),c.prototype.declaredClass=t;const l=(t||"AccessorSubclass").split(".").slice(-1)[0];return Object.defineProperty(c,"name",{value:l,configurable:!0}),c}}function m(t,e){return null==e.get?function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0===r)return;e.mutable&&(0,a.gc)(r);const n=e.store;return n.has(t)?n.get(t):r.metadata.value}:function(){const e=this.__accessor__,r=e.propertiesByName.get(t);if(void 0!==r)return r.getComputed(e)}}function j(t){const e=t.prototype,r=(0,s.tD)(e),n={};for(const t of Object.getOwnPropertyNames(r)){const e=r[t];v(e),n[t]={enumerable:!0,configurable:!0,get:m(t,e),set(r){const n=this.__accessor__;if(void 0!==n){if(n.mutable)return n.initialized&&e.readOnly?O("read-only",t):n.lifecycle===i.v.CONSTRUCTED&&e.constructOnly?O("construct-only",t):void n.set(t,r)}else Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:r})}}}Object.defineProperties(t.prototype,n)}const O=(t,e)=>{n.A.getLogger("esri.core.Accessor").error(`cannot assign to ${t} property '${e}'`)}},66552:(t,e,r)=>{r.d(e,{J:()=>o,O:()=>s});var n=r(93637);class o{constructor(t,e={ignoreUnknown:!1,useNumericKeys:!1}){this._jsonToAPI=t,this._options=e,this.apiValues=[],this.jsonValues=[],this._apiToJSON=function(t){const e={};for(const r in t)e[t[r]]=r;return e}(t),this.apiValues=i(this._apiToJSON),this.jsonValues=i(this._jsonToAPI),this.read=t=>this.fromJSON(t),this.write=(t,e,r)=>{const o=this.toJSON(t);void 0!==o&&(0,n.sM)(r,o,e)},this.write.isJSONMapWriter=!0}toJSON(t){if(null==t)return null;if(this._apiToJSON.hasOwnProperty(t)){const e=this._apiToJSON[t];return this._options.useNumericKeys?+e:e}return this._options.ignoreUnknown?null:t}fromJSON(t){return null!=t&&this._jsonToAPI.hasOwnProperty(t)?this._jsonToAPI[t]:this._options.ignoreUnknown?void 0:t}}function i(t){const e=[];for(const r in t)e.push(r);return e.sort(),e}function s(){return function(t,e){return new o(t,{ignoreUnknown:!0,...e})}}},67076:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(79907);class o extends n.A{constructor(t,e,r){super(t,e,r)}}o.prototype.type="warning"},67124:(t,e,r)=>{r.d(e,{B:()=>f,v:()=>a});var n=r(49186),o=r(53966),i=r(93637),s=r(15903);function a(t,e){if(!e.write||e.write.writer||!1===e.write.enabled&&!e.write.overridePolicy)return;const r=t?.ndimArray??0;t&&(1===r||"type"in t&&(0,s.P)(t.type))?e.write.writer=h:r>1?e.write.writer=function(t){return(e,r,n,o)=>{let s;if(null===e)s=null;else{s=p(e,o,t);let r=t,n=s;for(;r>0&&Array.isArray(n);)r--,n=n[0];if(void 0!==n)for(let t=0;t<r;t++)s=[s]}(0,i.sM)(n,s,r)}}(r):e.types?Array.isArray(e.types)?e.write.writer=function(t){return(e,r,n,o)=>e&&Array.isArray(e)?l(e.filter(e=>c(e,t,o)),r,n,o):l(e,r,n,o)}(e.types[0]):e.write.writer=function(t){return(e,r,n,o)=>e?c(e,t,o)?l(e,r,n,o):void 0:l(e,r,n,o)}(e.types):e.write.writer=l}function c(t,e,r){for(const r in e.typeMap)if(t instanceof e.typeMap[r])return!0;if(r?.messages){const i=e.errorContext??"type",s=`Values of type '${("function"!=typeof e.key?t[e.key]:t.declaredClass)??"Unknown"}' cannot be written`;r&&r.messages&&t&&r.messages.push(new n.A(`${i}:unsupported`,s,{definition:t,context:r})),o.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.writer").error(s)}return!1}function l(t,e,r,n){(0,i.sM)(r,u(t,n),e)}function u(t,e){return t&&"function"==typeof t.write?t.write({},e):t&&"function"==typeof t.toJSON?t.toJSON():"number"==typeof t?f(t):t}function f(t){return t===-1/0?-Number.MAX_VALUE:t===1/0?Number.MAX_VALUE:isNaN(t)?null:t}function h(t,e,r,n){let o;null===t?o=null:t&&"function"==typeof t.map?(o=t.map(t=>u(t,n)),"function"==typeof o.toArray&&(o=o.toArray())):o=[u(t,n)],(0,i.sM)(r,o,e)}function p(t,e,r){return 0!==r&&Array.isArray(t)?t.map(t=>p(t,e,r-1)):u(t,e)}},67867:(t,e,r)=>{r.d(e,{R:()=>n});class n{constructor(t){this.accessed=void 0,this._handles=void 0,this._observer=t}destroy(){this.accessed?.clear(),this.clear()}onAccessed(t){null!=this._observer&&t!==this._observer&&(null==this.accessed&&(this.accessed=new Set),this.accessed.add(t))}onTrackingEnd(){null!=this._observer&&(this.clear(),null!=this.accessed&&(null==this._handles&&(this._handles=[]),this.accessed.forEach(t=>{this._handles.push(t.observe(this._observer))}),this.accessed.clear()))}clear(){if(null!=this._handles){for(let t=0;t<this._handles.length;++t)this._handles[t].remove();this._handles.length=0}}}},79901:(t,e,r)=>{r.d(e,{w:()=>c});var n=r(56507),o=r(96156);const i=Object.prototype.toString;function s(t){const e="__accessorMetadata__"in t?(0,n.dp)(t):t;return function(...t){if(t.push(e),"number"==typeof t[2])throw new Error("Using @cast has parameter decorator is not supported since 4.16");return a.apply(this,t)}}function a(t,e,r,n){(0,o.z4)(t,e).cast=n}function c(...t){if(3!==t.length||"string"!=typeof t[1])return 1===t.length&&"[object Function]"===i.call(t[0])?s(t[0]):1===t.length&&"string"==typeof t[0]?function(t){return(e,r)=>{(0,o.z4)(e,t).cast=e[r]}}(t[0]):void 0}},85537:(t,e,r)=>{r.d(e,{v:()=>n});const n={INITIALIZING:0,CONSTRUCTING:1,CONSTRUCTED:2,DESTROYING:3,DESTROYED:4}},88620:(t,e,r)=>{r.d(e,{AH:()=>l,h1:()=>a,oY:()=>i,qg:()=>f,yh:()=>s});var n=r(36563),o=r(4718);function i(t){return t.__accessor__??null}function s(t,e){return null!=t?.metadata?.[e]}function a(t,e,r){return c(t,e,r?{policy:r,path:""}:null)}function c(t,e,r){return e?Object.keys(e).reduce((t,n)=>{const i=n;if("__proto__"===i)return t;let s=null,a="merge";if(r&&(s=r.path?`${r.path}.${n}`:n,a=r.policy(s)),"replace"===a)return t[i]=e[i],t;if("replace-arrays"===a&&Array.isArray(t[i]))return t[i]=e[i],t;if(void 0===t[i])return t[i]=(0,o.o8)(e[i]),t;let l=t[i],u=e[i];if(l===u)return t;if(Array.isArray(u)||Array.isArray(t))l=l?Array.isArray(l)?t[i]=l.slice():t[i]=[l]:t[i]=[],u&&(Array.isArray(u)||(u=[u]),u.forEach(t=>{l.includes(t)||l.push(t)}));else if(u&&"object"==typeof u)if(r){const e=r.path;r.path=s,t[i]=c(l,u,r),r.path=e}else t[i]=c(l,u,null);else t.hasOwnProperty(n)&&!e.hasOwnProperty(n)||(t[i]=u);return t},t||{}):t}function l(t){return Array.isArray(t)?t:t.split(".")}function u(t){return t.includes(",")?t.split(",").map(t=>t.trim()):[t.trim()]}function f(t,e,r,o){const i=function(t){if(Array.isArray(t)){const e=[];for(const r of t)e.push(...u(r));return e}return u(t)}(e);if(1!==i.length){const e=i.map(e=>o(t,e,r));return(0,n.vE)(e)}return o(t,i[0],r)}},90360:(t,e,r)=>{r.d(e,{C:()=>f,v:()=>u});var n=r(53966),o=r(93637),i=r(67076),s=r(96156),a=r(15903),c=r(7142);const l=()=>n.A.getLogger("esri.core.accessorSupport.extensions.serializableProperty.reader");function u(t,e,r){t&&(!r&&!e.read||e.read?.reader||!1===e.read?.enabled||function(t){return"types"in t?_(t.types):g(t.type)}(t)&&(0,o.sM)("read.reader",f(t),e))}function f(t){const e=t.ndimArray??0;if(e>1)return function(t){const e=h(t),r=p.bind(null,e),n=t.ndimArray??0;return(t,e,o)=>{if(null==t)return t;t=r(t,o,n);let i=n,s=t;for(;i>0&&Array.isArray(s);)i--,s=s[0];if(void 0!==s)for(let e=0;e<i;e++)t=[t];return t}}(t);if(1===e)return d(t);if("type"in t&&y(t.type)){const e=t.type.prototype?.itemType?.Type,r=d("function"==typeof e?{type:e}:{types:e});return(e,n,o)=>{const i=r(e,n,o);return i?new t.type(i):i}}return h(t)}function h(t){return"type"in t?function(t){return t.prototype.read?(e,r,n)=>{if(null==e)return e;const o=typeof e;if("object"!==o)return void l().error(`Expected JSON value of type 'object' to deserialize type '${t.prototype.declaredClass}', but got '${o}'`);const i=new t;return i.read(e,n),i}:t.fromJSON}(t.type):function(t){let e=null;const r=t.errorContext??"type",n=t.validate;return(o,a,u)=>{if(null==o)return o;const f=typeof o;if("object"!==f)return void l().error(`Expected JSON value of type 'object' to deserialize, but got '${f}'`);e||(e=function(t){const e={};for(const r in t.typeMap){const n=t.typeMap[r],o=(0,s.tD)(n.prototype);if("function"==typeof t.key)continue;const i=o[t.key];if(!i)continue;if(i.json?.type&&Array.isArray(i.json.type)&&1===i.json.type.length&&"string"==typeof i.json.type[0]){e[i.json.type[0]]=n;continue}const a=i.json?.write;if(!a?.writer){e[r]=n;continue}const c=a.target,l="string"==typeof c?c:t.key,u={};a.writer(r,u,l),u[l]&&(e[u[l]]=n)}return e}(t));const h=t.key;if("string"!=typeof h)return;const p=o[function(t,e,r){const n=Object.values(e)[0],o=(0,s.tD)(n.prototype)[t],i=(0,c.N5)(o,r),a=i?.read?.source;return a&&"string"==typeof a?a:t}(h,e,u)],d=p?e[p]:t.defaultKeyValue?t.typeMap[t.defaultKeyValue]:void 0;if(!d){const t=`Type '${p||"unknown"}' is not supported`;return u?.messages&&o&&u.messages.push(new i.A(`${r}:unsupported`,t,{definition:o,context:u})),void l().error(t)}const y=new d;return y.read(o,u),n?n(y):y}}(t.types)}function p(t,e,r,n){return 0!==n&&Array.isArray(e)?e.map(e=>p(t,e,r,n-1)):t(e,void 0,r)}function d(t){const e=h(t);return(t,r,n)=>{if(null==t)return t;if(Array.isArray(t)){const r=[];for(const o of t){const t=e(o,void 0,n);void 0!==t&&r.push(t)}return r}const o=e(t,void 0,n);return void 0!==o?[o]:void 0}}function y(t){if(!(0,a.P)(t))return!1;const e=t.prototype.itemType;return!(!e||!e.Type)&&("function"==typeof e.Type?g(e.Type):_(e.Type))}function g(t){return!Array.isArray(t)&&!!t&&("object"==typeof t||"function"==typeof t)&&t.prototype&&("read"in t.prototype||"fromJSON"in t||y(t))}function _(t){for(const e in t.typeMap)if(!g(t.typeMap[e]))return!1;return!0}},91429:(t,e,r)=>{r.d(e,{wg:()=>c,MZ:()=>s,$K:()=>a});var n=r(10107),o=r(79901),i=r(64108);r(93223),r(36005),r(43937);const s=n.MZ,a=i.$;function c(...t){return(0,o.w)(...t)}},93223:(t,e,r)=>{r.d(e,{e:()=>i});var n=r(66552),o=r(10107);function i(t,e={}){const r=t instanceof n.J?t:new n.J(t,e),{alwaysWriteDefaults:i,default:s,ignoreUnknown:a=!0,name:c,nonNullable:l,readOnly:u=!1}=e;return(0,o.MZ)({type:a?r.apiValues:String,json:{type:r.jsonValues,default:s,name:c,read:!u&&{reader:r.read},write:{writer:r.write,alwaysWriteDefaults:i}},nonNullable:l,readOnly:u})}},93687:(t,e,r)=>{r.d(e,{A:()=>o});var n=r(44208);class o{constructor(t,e,r,n=1,o=0){this._creator=t,this._acquireFunction=e,this._releaseFunction=r,this.allocationSize=n,this._pool=new Array(o),this._initialSize=o;for(let t=0;t<o;t++)this._pool[t]=this._creator();this.allocationSize=Math.max(n,1)}destroy(){this.prune(0)}acquire(...t){let e;if(o.test.disabled)e=this._creator();else{if(0===this._pool.length){const t=this.allocationSize;for(let e=0;e<t;e++)this._pool[e]=this._creator()}e=this._pool.pop()}return this._acquireFunction?this._acquireFunction(e,...t):function(t){return t?.acquire&&"function"==typeof t.acquire}(e)&&e.acquire(...t),e}release(t){var e;t&&!o.test.disabled&&(this._releaseFunction?this._releaseFunction(t):(e=t,e?.release&&"function"==typeof e.release&&t.release()),this._pool.push(t))}prune(t=this._initialSize){if(!(t>=this._pool.length)){for(let e=t;e<this._pool.length;++e){const t=this._pool[e];this._dispose(t)}this._pool.length=t}}_dispose(t){t.dispose&&"function"==typeof t.dispose&&t.dispose()}static{this.test={disabled:!!(0,n.A)("esri-tests-disable-memory-pools")}}}},96156:(t,e,r)=>{r.d(e,{CX:()=>a,tD:()=>i,z4:()=>s});var n=r(4718),o=r(88620);function i(t){let e=t.constructor.__accessorMetadata__;const r=Object.prototype.hasOwnProperty.call(t.constructor,"__accessorMetadata__");if(e){if(!r){e=Object.create(e);for(const t in e)e[t]=(0,n.o8)(e[t]);Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0})}}else e={},Object.defineProperty(t.constructor,"__accessorMetadata__",{value:e,enumerable:!1,configurable:!0,writable:!0});return t.constructor.__accessorMetadata__}function s(t,e){const r=i(t);let n=r[e];return n||(n=r[e]={}),n}function a(t,e){return(0,o.h1)(t,e,l)}const c=/^(?:[^.]+\.)?(?:value|type|(?:json\.type|json\.origins\.[^.]\.type))$/;function l(t){return c.test(t)?"replace":"merge"}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5125],{13069:(e,t,r)=>{r.d(t,{AG:()=>a,lk:()=>i,vD:()=>o,yS:()=>n});const s="randomUUID"in crypto;function i(){if(s)return crypto.randomUUID();const e=crypto.getRandomValues(new Uint16Array(8));e[3]=4095&e[3]|16384,e[4]=16383&e[4]|32768;const t=t=>e[t].toString(16).padStart(4,"0");return t(0)+t(1)+"-"+t(2)+"-"+t(3)+"-"+t(4)+"-"+t(5)+t(6)+t(7)}function n(){return`{${i().toUpperCase()}}`}function o(){return`{${i()}}`}function a(e){const t=e.toUpperCase();return e.startsWith("{")?t:`{${t}}`}},16494:(e,t,r)=>{r.d(t,{Nd:()=>a,W5:()=>o});var s=r(37330);const i=["dd","dl","dt","h1","h2","h3","h4","h5","h6","sub","sup","animate","animatetransform","circle","clippath","defs","ellipse","g","image","line","lineargradient","marker","mask","path","pattern","polygon","polyline","radialgradient","rect","stop","svg","switch","symbol","text","textpath","tspan","use"].reduce((e,t)=>(e[t]=[],e),{}),n=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","class","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],o=new s.I({whiteList:i,onTagAttr:(e,t,r)=>{const s=`${t}="${r}"`;if(n.includes(t))return s},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0),a=new s.I({whiteList:{br:[]},stripIgnoreTag:!0,escapeHtml:e=>e},!1)},18047:(e,t,r)=>{r.d(t,{Up:()=>l,ZV:()=>h,yx:()=>a});var s=r(73444);const i={ar:"ar-u-nu-latn",bs:"sr-Latn-CS",nn:"no-NN"};let n=new WeakMap,o={};function a(e={}){const t={};return null!=e.digitSeparator&&(t.useGrouping=e.digitSeparator),null!=e.places&&(t.minimumFractionDigits=t.maximumFractionDigits=e.places),t}function l(e){const{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:s}=e;return{minimumFractionDigits:t,maximumFractionDigits:r,useGrouping:"auto"===s?"auto":"always"===s}}function h(e,t){return Object.is(e,-0)&&(e=0),function(e){const t=e||o;if(!n.has(t)){const r=(0,s.lR)(),o=r&&i[r]||(0,s.QC)();n.set(t,new Intl.NumberFormat(o,e))}return n.get(t)}(t).format(e)}(0,s.Ml)(()=>{n=new WeakMap,o={}}),new Map},36708:(e,t,r)=>{r.d(t,{C_:()=>u,OH:()=>g,Vh:()=>m,on:()=>c,pc:()=>v,wB:()=>l,z7:()=>h});var s=r(37955),i=r(36563),n=r(97768),o=r(74887),a=r(14012);function l(e,t,r={}){return d(e,t,r,p)}function h(e,t,r={}){return d(e,t,r,f)}function d(e,t,r={},s){let i=null;const o=r.once?(e,r)=>{s(e)&&((0,n.xt)(i),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(i=(0,a.Cn)(e,o,r.sync,r.equals),r.initial){const t=e();o(t,t)}return i}function c(e,t,r,o={}){let a=null,h=null,d=null;function c(){a&&h&&(h.remove(),o.onListenerRemove?.(a),a=null,h=null)}function u(e){o.once&&o.once&&(0,n.xt)(d),r(e)}const p=l(e,(e,r)=>{c(),(0,s.wb)(e)&&(a=e,h=(0,s.on)(e,t,u),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return d=(0,i.hA)(()=>{p.remove(),c()}),d}function u(e,t){return function(e,t,r){if((0,o.G4)(r))return Promise.reject((0,o.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let a=null;function l(){a=(0,n.xt)(a)}return new Promise((s,n)=>{a=(0,i.vE)([(0,o.u7)(r,()=>{l(),n((0,o.NK)())}),d(e,e=>{l(),s(e)},{sync:!1,once:!0},t??p)])})}(e,f,t)}function p(e){return!0}function f(e){return!!e}r(80559);const g={sync:!0},m={initial:!0},v={sync:!0,initial:!0}},55125:(e,t,r)=>{r.r(t),r.d(t,{default:()=>at});var s=r(70333),i=r(92602),n=r(11254),o=r(49186),a=r(65529),l=r(37955),h=r(4718),d=r(93637),c=r(74887),u=r(84952),p=r(31635),f=r(91429),g=r(64108);let m=class extends a.nJ{constructor(e){super(e),this._oAuthCred=null,this.tokenRefreshBuffer=2,e?._oAuthCred&&(this._oAuthCred=e._oAuthCred)}initialize(){this.resources=this.resources||[],null==this.creationTime&&(this.creationTime=Date.now())}refreshToken(){return s.id.refreshToken(this)}refreshServerTokens(){return s.id.refreshServerTokens(this)}emitTokenChange(e){clearTimeout(this._refreshTimer);const t=s.id,r=this.server?t.findServerInfo(this.server):null,i=r?.owningSystemUrl,n=i?t.findServerInfo(i):null;!1===e||i&&"portal"!==this.scope&&(!n?.webTierAuth||t.normalizeWebTierAuth)||null==this.expires&&null==this.validity||this._startRefreshTimer(),this.emit("token-change")}destroy(){this.userId=this.server=this.token=this.expires=this.validity=this.resources=this.creationTime=null,this._oAuthCred&&(this._oAuthCred.destroy(),this._oAuthCred=null);const e=s.id,t=e.credentials.indexOf(this);t>-1&&e.credentials.splice(t,1),this.emitTokenChange(),this.emit("destroy")}toJSON(){const e=(0,h.oy)({userId:this.userId,server:this.server,token:this.token,expires:this.expires,validity:this.validity,ssl:this.ssl,isAdmin:this.isAdmin,creationTime:this.creationTime,scope:this.scope}),t=this.resources;return t&&t.length>0&&(e.resources=t.slice()),e}_startRefreshTimer(){clearTimeout(this._refreshTimer);const e=6e4*this.tokenRefreshBuffer,t=2**31-1;let r=(this.validity?this.creationTime+6e4*this.validity:this.expires)-Date.now();r<0?r=0:r>t&&(r=t),this._refreshTimer=setTimeout(this.refreshToken.bind(this),r>e?r-e:r)}};(0,p.Cg)([(0,f.MZ)()],m.prototype,"creationTime",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"expires",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"isAdmin",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"oAuthState",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"resources",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"scope",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"ssl",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"token",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"tokenRefreshBuffer",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"userId",void 0),(0,p.Cg)([(0,f.MZ)()],m.prototype,"validity",void 0),m=(0,p.Cg)([(0,g.$)("esri.identity.Credential")],m);const v=m;var _=r(79783),y=r(20150);function w(e){return function(){const e=getComputedStyle(document.body).getPropertyValue("--esri-calcite-mode-name").replaceAll(/\W/g,"").toLowerCase();return"dark"===e||"light"===e?e:void 0}()??(0,y.eg)(e??document.body)}function S(e){return`calcite-mode-${w(e)}`}r(44208);var I=r(53966),A=r(97768),k=r(61893),U=r(36708),C=r(13069),b=r(62788),P=r(71429),T=r(16494);const x="http://www.w3.org/",R=`${x}2000/svg`,O=`${x}1999/xlink`;let N=[],M=(e,t)=>{let r={};return Object.keys(e).forEach(t=>{r[t]=e[t]}),t&&Object.keys(t).forEach(e=>{r[e]=t[e]}),r},D=(e,t)=>e.vnodeSelector===t.vnodeSelector&&(e.properties&&t.properties?e.properties.key===t.properties.key&&e.properties.bind===t.properties.bind:!e.properties&&!t.properties),j=e=>{if("string"!=typeof e)throw new Error("Style values must be strings")},E=(e,t,r)=>{if(""!==t.vnodeSelector)for(let s=r;s<e.length;s++)if(D(e[s],t))return s;return-1},L=(e,t,r,s)=>{let i=e[t];if(""===i.vnodeSelector)return;let n=i.properties;if(!(n?void 0===n.key?n.bind:n.key:void 0))for(let n=0;n<e.length;n++)if(n!==t){let t=e[n];if(D(t,i))throw new Error(`${r.vnodeSelector} had a ${i.vnodeSelector} child ${"added"===s?s:"removed"}, but there is now more than one. You must add unique key properties to make them distinguishable.`)}},q=e=>{if(e.properties){let t=e.properties.enterAnimation;t&&t(e.domNode,e.properties)}},$=[],Z=!1,F=e=>{(e.children||[]).forEach(F),e.properties&&e.properties.afterRemoved&&e.properties.afterRemoved.apply(e.properties.bind||e.properties,[e.domNode])},V=()=>{Z=!1,$.forEach(F),$.length=0},B=e=>{$.push(e),Z||(Z=!0,"undefined"!=typeof window&&"requestIdleCallback"in window?window.requestIdleCallback(V,{timeout:16}):setTimeout(V,16))},H=e=>{let t=e.domNode;if(e.properties){let r=e.properties.exitAnimation;if(r){t.style.pointerEvents="none";let s=()=>{t.parentNode&&(t.parentNode.removeChild(t),B(e))};return void r(t,s,e.properties)}}t.parentNode&&(t.parentNode.removeChild(t),B(e))},z=(e,t,r)=>{if(!t)return;let s=r.eventHandlerInterceptor,i=Object.keys(t),n=i.length;for(let o=0;o<n;o++){let n=i[o],a=t[n];if("className"===n)throw new Error('Property "className" is not supported, use "class".');if("class"===n)X(e,a,!0);else if("classes"===n){let t=Object.keys(a),r=t.length;for(let s=0;s<r;s++){let r=t[s];a[r]&&e.classList.add(r)}}else if("styles"===n){let t=Object.keys(a),s=t.length;for(let i=0;i<s;i++){let s=t[i],n=a[s];n&&(j(n),r.styleApplyer(e,s,n))}}else if("key"!==n&&null!=a){let i=typeof a;"function"===i?(0===n.lastIndexOf("on",0)&&(s&&(a=s(n,a,e,t)),"oninput"===n&&function(){let e=a;a=function(t){e.apply(this,[t]),t.target["oninput-value"]=t.target.value}}()),e[n]=a):r.namespace===R?"href"===n?e.setAttributeNS(O,n,a):e.setAttribute(n,a):"string"===i&&"value"!==n?"innerHTML"===n?e[n]=T.W5.sanitize(a):W(e)&&n in e?e[n]=a:e.setAttribute(n,a):e[n]=a}}};function W(e){if(!(e instanceof Element&&e.tagName.includes("-")))return!1;const t=window.customElements.get(e.tagName.toLowerCase());return!!t&&e instanceof t}let J,G=(e,t,r)=>{((e,t,r)=>{if(t)for(let s of t)K(s,e,void 0,r)})(e,t.children,r),t.text&&(e.textContent=t.text),z(e,t.properties,r),t.properties&&t.properties.afterCreate&&t.properties.afterCreate.apply(t.properties.bind||t.properties,[e,r,t.vnodeSelector,t.properties,t.children])},K=(e,t,r,s)=>{let i,n=0,o=e.vnodeSelector,a=t.ownerDocument;if(""===o)i=e.domNode=a.createTextNode(e.text),void 0!==r?t.insertBefore(i,r):t.appendChild(i);else{for(let l=0;l<=o.length;++l){let h=o.charAt(l);if(l===o.length||"."===h||"#"===h){let h=o.charAt(n-1),d=o.slice(n,l);"."===h?i.classList.add(d):"#"===h?i.id=d:("svg"===d&&(s=M(s,{namespace:R})),void 0!==s.namespace?i=e.domNode=a.createElementNS(s.namespace,d):(i=e.domNode=e.domNode||a.createElement(d),"input"===d&&e.properties&&void 0!==e.properties.type&&i.setAttribute("type",e.properties.type)),void 0!==r?t.insertBefore(i,r):i.parentNode!==t&&t.appendChild(i)),n=l+1}}G(i,e,s)}},X=(e,t,r)=>{t&&t.split(" ").forEach(t=>{t&&e.classList.toggle(t,r)})},Y=(e,t,r,s,i)=>{if(r===s)return!1;s=s||N;let n,o=(r=r||N).length,a=s.length,l=0,h=0,d=!1;for(;h<a;){let a=l<o?r[l]:void 0,c=s[h];if(void 0!==a&&D(a,c))d=J(a,c,i)||d,l++;else{let a=E(r,c,l+1);if(a>=0){for(n=l;n<a;n++)H(r[n]),L(r,n,e,"removed");d=J(r[a],c,i)||d,l=a+1}else K(c,t,l<o?r[l].domNode:void 0,i),q(c),L(s,h,e,"added")}h++}if(o>l)for(n=l;n<o;n++)H(r[n]),L(r,n,e,"removed");return d};J=(e,t,r)=>{let s=e.domNode,i=!1;if(e===t)return!1;let n=!1;if(""===t.vnodeSelector){if(t.text!==e.text){let e=s.ownerDocument.createTextNode(t.text);return s.parentNode.replaceChild(e,s),t.domNode=e,i=!0,i}t.domNode=s}else 0===t.vnodeSelector.lastIndexOf("svg",0)&&(r=M(r,{namespace:R})),e.text!==t.text&&(n=!0,void 0===t.text?s.removeChild(s.firstChild):s.textContent=t.text),t.domNode=s,n=Y(t,s,e.children,t.children,r)||n,n=((e,t,r,s)=>{if(!r)return;let i=!1,n=Object.keys(r),o=n.length;for(let a=0;a<o;a++){let o=n[a],l=r[o],h=t[o];if("class"===o)h!==l&&(X(e,h,!1),X(e,l,!0));else if("classes"===o){let t=e.classList,r=Object.keys(l),s=r.length;for(let e=0;e<s;e++){let s=r[e],n=!!l[s];n!==!!h[s]&&(i=!0,n?t.add(s):t.remove(s))}}else if("styles"===o){let t=Object.keys(l),r=t.length;for(let n=0;n<r;n++){let r=t[n],o=l[r];o!==h[r]&&(i=!0,o?(j(o),s.styleApplyer(e,r,o)):s.styleApplyer(e,r,""))}}else if(l||"string"!=typeof h||(l=""),"value"!==o||W(e)){if(l!==h){let t=typeof l;"function"===t&&s.eventHandlerInterceptor||(s.namespace===R?"href"===o?e.setAttributeNS(O,o,l):e.setAttribute(o,l):"string"===t?"innerHTML"===o?e[o]=T.W5.sanitize(l):"role"===o&&""===l?e.removeAttribute(o):W(e)&&o in e?e[o]=l:e.setAttribute(o,l):e[o]!==l&&(e[o]=l),i=!0)}}else{let t=e[o];t!==l&&(e["oninput-value"]?t===e["oninput-value"]:l!==h)&&(e[o]=l,e["oninput-value"]=void 0),l!==h&&(i=!0)}}return i})(s,e.properties,t.properties,r)||n,t.properties&&t.properties.afterUpdate&&t.properties.afterUpdate.apply(t.properties.bind||t.properties,[s,r,t.vnodeSelector,t.properties,t.children]);return n&&t.properties&&t.properties.updateAnimation&&t.properties.updateAnimation(s,t.properties,e.properties),i};let Q=(e,t)=>({getLastRender:()=>e,update:r=>{if(e.vnodeSelector!==r.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");let s=e;e=r,J(s,r,t)},domNode:e.domNode});const ee={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{"-"===t.charAt(0)?e.style.setProperty(t,r):e.style[t]=r}};let te,re=e=>M(ee,e),se=(e,t,r)=>(r=re(r),K(t,e,void 0,r),Q(t,r)),ie=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),Q(t,r)),ne=(e,t,r)=>(r=re(r),t.domNode=e,G(e,t,r),Q(t,r)),oe=(e,t,r)=>(r=re(r),K(t,e.parentNode,e,r),e.parentNode.removeChild(e),Q(t,r));te=Array.prototype.find?(e,t)=>e.find(t):(e,t)=>e.filter(t)[0];const ae={handleInterceptedEvent:(e,t,r,s)=>(e.scheduleRender(),t.properties[`on${s.type}`].apply(t.properties.bind||r,[s]))},le={namespace:void 0,performanceLogger:()=>{},eventHandlerInterceptor:void 0,styleApplyer:(e,t,r)=>{t.startsWith("-")?e.style.setProperty(t,r):e.style[t]=r}},he=(e,t,r=!1)=>{let s=e;return t.forEach((e,i)=>{const n=s?.children?((e,t)=>e.find(t))(s.children,t=>t.domNode===e):void 0;r&&!n&&i!==t.length-1||(s=n)}),s};var de=r(14813),ce=r(2741);let ue;ue="components/assets";var pe=r(36563);const fe=Symbol("widget"),ge=Symbol("widget-test-data"),me=[],ve={},_e=new WeakMap;function ye(e,t){let r=t.children;if(r?.length)for(let t=0;t<r.length;++t)r[t]=ye(e,r[t]);else r=me;const s=t.vnodeSelector;if(Ae(s)){const i=t.properties||ve,n=i.key||s,o={key:n,afterCreate:we,afterUpdate:Se,afterRemoved:Ie,parentWidget:e,widgetConstructor:s,widgetProperties:{...i,key:n,children:r}};return{vnodeSelector:s.vnodeSelector,properties:o,children:void 0,text:void 0,domNode:null}}return t}function we(e,t,r,{parentWidget:s,widgetConstructor:i,widgetProperties:n}){const o=new i(n);o.container=e,_e.set(e,o),o.afterCreate?.(o,e),s.addHandles((0,pe.hA)(()=>Ie(e))),queueMicrotask(()=>{o[ge].projector?.renderNow()})}function Se(e,t,r,{widgetProperties:s}){const i=_e.get(e);i&&(i.set(s),i.afterUpdate?.(i,e))}function Ie(e){const t=_e.get(e);t&&(t.afterRemoved?.(t,e),t.destroy(),_e.delete(e))}function Ae(e){return"function"==typeof e&&e[fe]}const ke=new Set;new Map;const Ue=new Map;function Ce(){Ue.clear()}function be(e){Ue.delete(e)}var Pe=r(98291),Te=r(76030);(()=>{const e=new Map;new ResizeObserver(t=>{Ce();for(const r of t)e.get(r.target)?.(r)})})();var xe=function(e){return{vnodeSelector:"",properties:void 0,children:void 0,text:e.toString(),domNode:null}},Re=function(e,t){for(var r=0,s=e.length;r<s;r++){var i=e[r];Array.isArray(i)?Re(i,t):null!=i&&!1!==i&&(i.hasOwnProperty("vnodeSelector")||(i=xe(i)),t.push(i))}};const Oe=function(...e){const t=Pe.A.acquire();for(let r=0;r<e.length;r++){const s=e[r],i=typeof s;if("string"===i)t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if("object"===i)for(const e in s)s[e]&&t.push(e)}const r=t.join(" ");return Pe.A.release(t),r},Ne=function(e){return(t,r)=>{t.hasOwnProperty("_messageBundleProps")||(t._messageBundleProps=t._messageBundleProps?t._messageBundleProps.slice():[]),t._messageBundleProps.push({bundlePath:e,propertyName:r})}};function Me(e,t,...r){return"function"!=typeof e||Ae(e)?function(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(1===r.length&&"string"==typeof r[0])return{vnodeSelector:e,properties:t||void 0,children:void 0,text:r[0],domNode:null};var i=[];return Re(r,i),{vnodeSelector:e,properties:t||void 0,children:i,text:void 0,domNode:null}}(e,t??null,...r):e(t,...r)}var De;let je=0;function Ee(e,t){const r=Object.prototype.hasOwnProperty;for(const s in t)r.call(t,s)&&r.call(e,s)&&(null!=e[s]&&null!=t[s]&&"object"==typeof e[s]&&"object"==typeof t[s]?Ee(e[s],t[s]):e[s]=t[s]);return e}const Le=(e=>{let t;const r={...ae,...e},s=(n=r,{...le,...n}),i=s.performanceLogger;var n;let o,a=!0,l=!1;const h=[],d=[],c=(e,n,o)=>{let a;s.eventHandlerInterceptor=(e,s,n,o)=>function(e){let s;i("domEvent",e);const n=((e,t)=>{const r=[];for(;e&&e!==t;)r.push(e),e=e.parentNode;return r})(e.currentTarget,a.domNode),o=n.some(e=>customElements.get(e?.tagName?.toLowerCase()));if(e.eventPhase!==Event.CAPTURING_PHASE&&o){const t=e.composedPath(),r=t.slice(t.indexOf(e.currentTarget),t.indexOf(a.domNode)).reverse();s=he(a.getLastRender(),r,!0)}else n.reverse(),s=he(a.getLastRender(),n);let l;return s&&(l=r.handleInterceptedEvent(t,s,this,e)),i("domEventProcessed",e),l},r.postProcessProjectionOptions?.(s);const l=o();a=e(n,l,s),s.eventHandlerInterceptor=void 0,h.push(a),d.push(o),r.afterFirstVNodeRendered&&r.afterFirstVNodeRendered(a,l)};let u=()=>{if(o=void 0,a){a=!1,i("renderStart",void 0);for(let e=0;e<h.length;e++){const t=d[e]();i("rendered",void 0);try{h[e].update(t)}catch(e){console.error(e)}i("patched",void 0)}i("renderDone",void 0),a=!0}};return r.modifyDoRenderImplementation&&(u=r.modifyDoRenderImplementation(u,h,d)),t={renderNow:u,scheduleRender:()=>{o||l||(o=requestAnimationFrame(u))},stop:()=>{o&&(cancelAnimationFrame(o),o=void 0),l=!0},resume:()=>{l=!1,a=!0,t.scheduleRender()},append:(e,t)=>{c(se,e,t)},insertBefore:(e,t)=>{c(ie,e,t)},merge:(e,t)=>{c(ne,e,t)},replace:(e,t)=>{c(oe,e,t)},detach:e=>{for(let t=0;t<d.length;t++)if(d[t]===e)return d.splice(t,1),h.splice(t,1)[0];throw new Error("renderFunction was not found")}},t})({postProcessProjectionOptions(e){const t=e.eventHandlerInterceptor,r=/capture$/i;e.eventHandlerInterceptor=(e,s,i,n)=>{const o=t?.(e,s,i,n),a=r.test(e);if(!((e=e.replace(r,"")).toLowerCase()in i)||a){const t=e[2].toLowerCase()+e.slice(3),r=e=>o?.call(i,e);i.addEventListener(t,r,a);const s=()=>i.removeEventListener(t,r,a),l=n.afterRemoved;n.afterRemoved=e=>{l?.(e),s()}}return o}},handleInterceptedEvent(e,t,r,s){const{eventPhase:i,type:n}=s,o=i===Event.CAPTURING_PHASE;let a=`on${n}${o?"capture":""}`;const l=t.properties;(l&&a in l||(a=`on${n[0].toUpperCase()}${n.slice(1)}${o?"Capture":""}`,l&&a in l))&&(Ce(),e.scheduleRender(),l[a].call(l.bind||r,s))}});let qe=!1,$e=class extends((0,k.g)(a.nJ)){static{this[De]=!0}constructor(e,t){super(e,t),this._attached=!1,this._projector=Le,this._readyForTrueRender=!1,this.key=this,this.autoRenderingEnabled=!0,this._loadLocale=(0,c.sg)(async()=>{if(this._messageBundleProps?.length){const e=await Promise.allSettled(this._messageBundleProps.map(async({bundlePath:e,propertyName:t})=>{if(this.destroyed)return;let r=await(0,_.ud)(e);this.destroyed||(this.uiStrings&&Object.keys(this.uiStrings)&&(r=Ee((0,h.o8)(r),this.uiStrings)),this[t]=r)}));if(this.destroyed)return;for(const t of e)"rejected"===t.status&&I.A.getLogger(this).error("widget-intl:locale-error",this.declaredClass,t.reason)}await this.loadLocale()}),this.addHandles((0,pe.hA)()),de.qu||(0,de.Qu)((0,u.s2)((0,ce.s)("components/assets")));const r="esri-widget-uid-"+(0,C.lk)(),s=this.render.bind(this);this._trackingTarget=new P.r(()=>{this.autoRenderingEnabled&&this.scheduleRender()});const i=()=>({vnodeSelector:"div",properties:{key:`${r}-hidden`,class:"",styles:{display:"none"}},domNode:null,children:void 0,text:void 0}),n=()=>{if(!this._readyForTrueRender||this.destroyed)return null;const e=s()??i(),t=e.properties??={};if(t.key??=r,Ae(e.vnodeSelector)){if(!this.visible)return i()}else this.visible?t.styles||(t.styles={}):(t.class="",t.styles={display:"none"}),t.styles.display??="";let n=0;return e.children?.forEach(e=>{Ae(e.vnodeSelector)||(e.properties??={},e.properties.key??=`${this.id}--${n++}`)}),ye(this,e)};this.render=()=>{if(qe)return n();let e=(t=this,Ue.get(t)??null);var t;if(e)return e;this._trackingTarget.clear(),qe=!0;try{e=(0,b.a)(this._trackingTarget,n)}catch(t){throw I.A.getLogger(this).error(t),t}finally{qe=!1}return e&&function(e,t){Ue.set(e,t)}(this,e),e};const o=this.beforeFirstRender();o?this._resourcesFetch=o.then(()=>{this.destroyed||(this._readyForTrueRender=!0,this._postInitialize())}):(this._resourcesFetch=Promise.resolve().then(()=>{this.destroyed||this._postInitialize()}),this._readyForTrueRender=!0),this.addResolvingPromise(this._resourcesFetch),function(e){ke.add(e),e.finally(()=>ke.delete(e))}(this._resourcesFetch)}normalizeCtorArgs(e,t){const r={...e};return t&&(r.container=t),r}postInitialize(){}beforeFirstRender(){const e=this.loadDependencies();return this._messageBundleProps?.length||e?Promise.all([e,this._loadLocale()]).then(()=>{}).catch(c.jH):null}loadDependencies(){return null}loadLocale(){return null}destroy(){this.destroyed||((0,A.pR)(this._trackingTarget),(0,A.pR)(this.viewModel),this._detach(this.container),this._set("container",null),this.render=()=>null,this._projector=null,be(this))}set container(e){this._get("container")||this._set("container",e)}castContainer(e){return"string"==typeof(t=e)?document.getElementById(t):t??null;var t}get destroyed(){return super.destroyed}get domNode(){return this.container}set domNode(e){this.container=e}get icon(){return null}set icon(e){this._overrideIfSome("icon",e)}get id(){return this._get("id")||this.container?.id||Date.now().toString(16)+"-widget-"+je++}set id(e){e&&this._set("id",e)}get label(){return this.declaredClass.split(".").pop()}set label(e){this._overrideIfSome("label",e)}get renderable(){return this._resourcesFetch}get visible(){return this._get("visible")}set visible(e){this._set("visible",e)}get[(De=fe,ge)](){return{projector:this._projector}}static{this.vnodeSelector="div"}render(){throw new Error("not implemented")}scheduleRender(){this.destroyed||(be(this),this._projector.scheduleRender())}classes(...e){return Oe.apply(this,e)}renderNow(){be(this),this._projector.renderNow()}_postInitialize(){if(this.destroyed)return;this.scheduleRender(),this._delegatedEventNames?.length&&this.addHandles((0,U.wB)(()=>this.viewModel,(e,t)=>{t&&this.removeHandles("delegated-events"),e&&(0,l.wb)(e)&&this.addHandles(this._delegatedEventNames.map(t=>(0,l.on)(e,t,e=>{this.emit(t,e)})),"delegated-events")},U.pc)),this.postInitialize();const e=async()=>{await this._loadLocale().catch(c.jH),this.scheduleRender()};this.addHandles([(0,_.oQ)(e),(0,U.wB)(()=>this.uiStrings,e)]),this.addHandles((0,U.z7)(()=>this.container,e=>{this.destroyed||this._attach(e)},{initial:!0,once:!0}))}_attach(e){e&&(this._projector.merge(e,this.render),this._attached=!0)}_detach(e){this._attached&&(this._projector.detach(this.render),this._attached=!1),e?.parentNode?.removeChild(e)}};(0,p.Cg)([(0,f.MZ)()],$e.prototype,"_readyForTrueRender",void 0),(0,p.Cg)([(0,f.MZ)({value:null})],$e.prototype,"container",null),(0,p.Cg)([(0,f.wg)("container")],$e.prototype,"castContainer",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"icon",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"id",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"label",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"renderable",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"uiStrings",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"viewModel",void 0),(0,p.Cg)([(0,f.MZ)({value:!0})],$e.prototype,"visible",null),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"key",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"children",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterCreate",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterUpdate",void 0),(0,p.Cg)([(0,f.MZ)()],$e.prototype,"afterRemoved",void 0),$e=(0,p.Cg)([(0,f.$K)("esri.widgets.Widget")],$e);const Ze=$e,Fe="esri-identity-modal",Ve={base:Fe,info:`${Fe}__info`,notice:`${Fe}__notice`};let Be=class extends Ze{constructor(e,t){super(e,t),this.container=document.createElement("div"),this.error=null,this.oAuthPrompt=!1,this.open=!1,this.signingIn=!1,this.server=null,this.resource=null,this._usernameInputNode=null,this._passwordInputNode=null,document.body.appendChild(this.container)}loadDependencies(){return function(e){const t=[];for(const r of Object.keys(e))customElements.get(`calcite-${r}`)||t.push(e[r]?.());return t.length>0?Promise.all(t):null}({button:()=>Promise.all([r.e(9e3),r.e(1436),r.e(6395),r.e(5455)]).then(r.bind(r,37836)),dialog:()=>Promise.all([r.e(9e3),r.e(1436),r.e(6395),r.e(985)]).then(r.bind(r,70985)),input:()=>Promise.all([r.e(9e3),r.e(1436),r.e(3263)]).then(r.bind(r,63263)),label:()=>Promise.all([r.e(9e3),r.e(224)]).then(r.bind(r,87843)),notice:()=>Promise.all([r.e(9e3),r.e(1436),r.e(8098)]).then(r.bind(r,48098))})}get title(){return this.commonMessages?.auth.signIn}render(){const{open:e,title:t,messages:r,signingIn:s,oAuthPrompt:i,server:n,resource:o,error:a}=this,{info:l,oAuthInfo:h,lblItem:d,invalidUser:c,noAuthService:u,lblUser:p,lblPwd:f,lblCancel:g,lblSigning:m,lblOk:v}=r;return Me("div",{class:this.classes(Ve.base,S(this.container))},Me("form",{bind:this,onsubmit:this._submit},Me("calcite-dialog",{bind:this,heading:t,modal:!0,open:e,outsideCloseDisabled:!0,scale:"s",widthScale:"s",onCalciteDialogClose:this._cancel,onCalciteDialogOpen:this._focusUsernameInput},Me("div",{class:Ve.info},(0,_.V2)(i?h:l,{server:n&&/\.arcgis\.com/i.test(n)?"ArcGIS Online":n,resource:`(${o||d})`})),a?Me("calcite-notice",{class:Ve.notice,icon:"exclamation-mark-triangle",kind:"danger",open:!0},Me("div",{slot:"message"},a.details?.httpStatus?c:u)):null,i?null:[Me("calcite-label",null,p,Me("calcite-input",{afterCreate:e=>this._usernameInputNode=e,autocomplete:"off",bind:this,name:"username",required:!0,spellcheck:!1,type:"text",value:""})),Me("calcite-label",null,f,Me("calcite-input",{afterCreate:e=>this._passwordInputNode=e,bind:this,name:"password",required:!0,type:"password",value:""}))],Me("calcite-button",{appearance:"outline",bind:this,onclick:this._cancel,slot:"footer-end",type:"button"},g),Me("calcite-button",{loading:!!s,slot:"footer-end",type:"submit"},s?m:v))))}_focusUsernameInput(){return async function(e){await(0,Te.$m)((0,c.Mq)(void 0));const t=e();t&&("setFocus"in t&&"function"==typeof t.setFocus?await t.setFocus():t instanceof HTMLElement&&t.focus())}(()=>this._usernameInputNode)}_cancel(){this._set("signingIn",!1),this.open=!1,this._usernameInputNode&&(this._usernameInputNode.value=""),this._passwordInputNode&&(this._passwordInputNode.value=""),this.emit("cancel")}_submit(e){e.preventDefault(),this._set("signingIn",!0);const t=this.oAuthPrompt?{}:{username:this._usernameInputNode?.value,password:this._passwordInputNode?.value};this.emit("submit",t)}};(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"container",void 0),(0,p.Cg)([(0,f.MZ)(),Ne("esri/t9n/common")],Be.prototype,"commonMessages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"error",void 0),(0,p.Cg)([(0,f.MZ)(),Ne("esri/identity/t9n/identity")],Be.prototype,"messages",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"oAuthPrompt",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"open",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"signingIn",void 0),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({readOnly:!0})],Be.prototype,"title",null),(0,p.Cg)([(0,f.MZ)()],Be.prototype,"resource",void 0),Be=(0,p.Cg)([(0,f.$K)("esri.identity.IdentityModal")],Be);const He=Be,ze="esriJSAPIOAuth";class We{constructor(e,t){this.oAuthInfo=null,this.storage=null,this.appId=null,this.codeVerifier=null,this.expires=null,this.refreshToken=null,this.ssl=null,this.stateUID=null,this.token=null,this.userId=null,this.oAuthInfo=e,this.storage=t,this._init()}isValid(){let e=!1;if(this.oAuthInfo&&this.userId&&(this.refreshToken||this.token))if(null==this.expires&&this.refreshToken)e=!0;else if(this.expires){const t=Date.now();this.expires>t&&(this.expires-t)/1e3>60*this.oAuthInfo.minTimeUntilExpiration&&(e=!0)}return e}save(){if(!this.storage)return!1;const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r||(r=e[t.authNamespace]={}),this.appId||(this.appId=t.appId),r[t.portalUrl]={appId:this.appId,codeVerifier:this.codeVerifier,expires:this.expires,refreshToken:this.refreshToken,ssl:this.ssl,stateUID:this.stateUID,token:this.token,userId:this.userId};try{this.storage.setItem(ze,JSON.stringify(e))}catch(e){return console.warn(e),!1}return!0}return!1}destroy(){const e=this._load(),t=this.oAuthInfo;if(t?.appId&&t?.portalUrl&&(null==this.expires||this.expires>Date.now())&&(this.refreshToken||this.token)){const e=t.portalUrl.replace(/^http:/i,"https:")+"/sharing/rest/oauth2/revokeToken";(0,n.A)(e,{authMode:"anonymous",keepAlive:!0,method:"post",query:{f:"json",auth_token:this.refreshToken||this.token,client_id:t.appId,token_type_hint:this.refreshToken?"refresh_token":"access_token"}})}if(t?.authNamespace&&t.portalUrl&&this.storage){const r=e[t.authNamespace];if(r){delete r[t.portalUrl];try{this.storage.setItem(ze,JSON.stringify(e))}catch(e){console.log(e)}}}t&&(t._oAuthCred=null,this.oAuthInfo=null)}_init(){const e=this._load(),t=this.oAuthInfo;if(t?.authNamespace&&t.portalUrl){let r=e[t.authNamespace];r&&(r=r[t.portalUrl],r&&(this.appId=r.appId,this.codeVerifier=r.codeVerifier,this.expires=r.expires,this.refreshToken=r.refreshToken,this.ssl=r.ssl,this.stateUID=r.stateUID,this.token=r.token,this.userId=r.userId))}}_load(){let e={};if(this.storage){const t=this.storage.getItem(ze);if(t)try{e=JSON.parse(t)}catch(e){console.warn(e)}}return e}}We.prototype.declaredClass="esri.identity.OAuthCredential";var Je,Ge=r(25482);let Ke=class extends Ge.o{static{Je=this}constructor(e){super(e),this._oAuthCred=null,this.appId=null,this.authNamespace="/",this.expiration=20160,this.flowType="auto",this.forceLogin=!1,this.forceUserId=!1,this.locale=null,this.minTimeUntilExpiration=30,this.popup=!1,this.popupCallbackUrl="oauth-callback.html",this.popupWindowFeatures="height=490,width=800,resizable,scrollbars,status",this.portalUrl="https://www.arcgis.com",this.preserveUrlHash=!1,this.userId=null}clone(){return Je.fromJSON(this.toJSON())}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"appId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"authNamespace",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"expiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"flowType",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"forceLogin",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"forceUserId",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"locale",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"minTimeUntilExpiration",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popup",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popupCallbackUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"popupWindowFeatures",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"portalUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"preserveUrlHash",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ke.prototype,"userId",void 0),Ke=Je=(0,p.Cg)([(0,f.$K)("esri.identity.OAuthInfo")],Ke);const Xe=Ke;let Ye=class extends Ge.o{constructor(e){super(e),this.adminTokenServiceUrl=null,this.currentVersion=null,this.hasPortal=null,this.hasServer=null,this.owningSystemUrl=null,this.owningTenant=null,this.server=null,this.shortLivedTokenValidity=null,this.tokenServiceUrl=null,this.webTierAuth=null}};(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"adminTokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"currentVersion",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"hasPortal",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"hasServer",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"owningSystemUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"owningTenant",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"server",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"shortLivedTokenValidity",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"tokenServiceUrl",void 0),(0,p.Cg)([(0,f.MZ)({json:{write:!0}})],Ye.prototype,"webTierAuth",void 0),Ye=(0,p.Cg)([(0,f.$K)("esri.identity.ServerInfo")],Ye);const Qe=Ye;var et=r(39131);const tt={},rt=e=>{const t=new u.s0(e.owningSystemUrl).host,r=new u.s0(e.server).host,s=/.+\.arcgis\.com$/i;return s.test(t)&&s.test(r)},st=(e,t)=>!!(rt(e)&&t&&t.some(t=>t.test(e.server)));let it=null,nt=null;try{it=window.localStorage,nt=window.sessionStorage}catch{}class ot extends a.a${constructor(){super(),this._portalConfig=globalThis.esriGeowConfig,this.serverInfos=[],this.oAuthInfos=[],this.credentials=[],this._soReqs=[],this._xoReqs=[],this._portals=[],this._defaultOAuthInfo=null,this._defaultTokenValidity=60,this.dialog=null,this.tokenValidity=null,this.normalizeWebTierAuth=!1,this._appOrigin="null"!==window.origin?window.origin:window.location.origin,this._appUrlObj=(0,u.An)(window.location.href),this._busy=null,this._rejectOnPersistedPageShow=!1,this._oAuthLocationParams=null,this._gwTokenUrl="/sharing/rest/generateToken",this._agsRest="/rest/services",this._agsPortal=/\/sharing(\/|$)/i,this._agsAdmin=/(https?:\/\/[^/]+\/[^/]+)\/admin\/?(\/.*)?$/i,this._adminSvcs=/\/rest\/admin\/services(\/|$)/i,this._gwDomains=[{regex:/^https?:\/\/www\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:dev|[a-z\d-]+\.mapsdev)\.arcgis\.com/i,customBaseUrl:"mapsdev.arcgis.com",tokenServiceUrl:"https://dev.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:devext|[a-z\d-]+\.mapsdevext)\.arcgis\.com/i,customBaseUrl:"mapsdevext.arcgis.com",tokenServiceUrl:"https://devext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/(?:qaext|[a-z\d-]+\.mapsqa)\.arcgis\.com/i,customBaseUrl:"mapsqa.arcgis.com",tokenServiceUrl:"https://qaext.arcgis.com/sharing/rest/generateToken"},{regex:/^https?:\/\/[a-z\d-]+\.maps\.arcgis\.com/i,customBaseUrl:"maps.arcgis.com",tokenServiceUrl:"https://www.arcgis.com/sharing/rest/generateToken"}],this._legacyFed=[],this._regexSDirUrl=/http.+\/rest\/services\/?/gi,this._regexServerType=/(\/(FeatureServer|GPServer|GeoDataServer|GeocodeServer|GeoenrichmentServer|GeometryServer|GlobeServer|ImageServer|KnowledgeGraphServer|MapServer|MissionServer|MobileServer|NAServer|NetworkDiagramServer|OGCFeatureServer|ParcelFabricServer|RelationalCatalogServer|SceneServer|StreamServer|UtilityNetworkServer|ValidationServer|VectorTileServer|VersionManagementServer|VideoServer)).*/gi,this._gwUser=/http.+\/users\/([^/]+).*/i,this._gwItem=/http.+\/items\/([^/]+).*/i,this._gwGroup=/http.+\/groups\/([^/]+).*/i,this._rePortalTokenSvc=/\/sharing(\/rest)?\/generatetoken/i,this._createDefaultOAuthInfo=!0,this._hasTestedIfAppIsOnPortal=!1,this._getPlatformSelfError=null,this._getOAuthLocationParams(),window.addEventListener("pageshow",e=>{this._pageShowHandler(e)})}registerServers(e){const t=this.serverInfos;t?(e=e.filter(e=>!this.findServerInfo(e.server)),this.serverInfos=t.concat(e)):this.serverInfos=e,e.forEach(e=>{e.owningSystemUrl&&this._portals.push(e.owningSystemUrl),e.hasPortal&&this._portals.push(e.server)})}registerOAuthInfos(e){const t=this.oAuthInfos;if(t){for(const r of e){const e=this.findOAuthInfo(r.portalUrl);e&&t.splice(t.indexOf(e),1)}this.oAuthInfos=t.concat(e)}else this.oAuthInfos=e}registerToken(e){e={...e};const t=this._sanitizeUrl(e.server),r=this._isServerRsrc(t);let s,i=this.findServerInfo(t),n=!0;i||(i=new Qe,i.server=this._getServerInstanceRoot(t),r?i.hasServer=!0:(i.tokenServiceUrl=this._getTokenSvcUrl(t),i.hasPortal=!0),this.registerServers([i])),s=this._findCredential(t),s?(delete e.server,Object.assign(s,e),n=!1):(s=new v({userId:e.userId,server:i.server??void 0,token:e.token,expires:e.expires,ssl:e.ssl,scope:r?"server":"portal"}),s.resources=[t],this.credentials.push(s)),s.emitTokenChange(!1),n||s.refreshServerTokens()}toJSON(){return(0,h.oy)({serverInfos:this.serverInfos.map(e=>e.toJSON()),oAuthInfos:this.oAuthInfos.map(e=>e.toJSON()),credentials:this.credentials.map(e=>e.toJSON())})}initialize(e){if(!e)return;"string"==typeof e&&(e=JSON.parse(e));const t=e.serverInfos,r=e.oAuthInfos,s=e.credentials;if(t){const e=[];t.forEach(t=>{t.server&&t.tokenServiceUrl&&e.push(t.declaredClass?t:new Qe(t))}),e.length&&this.registerServers(e)}if(r){const e=[];r.forEach(t=>{t.appId&&e.push(t.declaredClass?t:new Xe(t))}),e.length&&this.registerOAuthInfos(e)}s&&s.forEach(e=>{e.server&&e.token&&e.expires&&e.expires>Date.now()&&((e=e.declaredClass?e:new v(e)).emitTokenChange(),this.credentials.push(e))})}findServerInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.serverInfos)if(this._hasSameServerInstance(r.server,e)){t=r;break}return t}findOAuthInfo(e){let t;e=this._sanitizeUrl(e);for(const r of this.oAuthInfos)if(this._hasSameServerInstance(r.portalUrl,e)){t=r;break}return t}findCredential(e,t){if(!e)return;let r;e=this._sanitizeUrl(e);const s=this._isServerRsrc(e)?"server":"portal";if(t){for(const i of this.credentials)if(this._hasSameServerInstance(i.server,e)&&t===i.userId&&i.scope===s){r=i;break}}else for(const t of this.credentials)if(this._hasSameServerInstance(t.server,e)&&-1!==this._getIdenticalSvcIdx(e,t)&&t.scope===s){r=t;break}return r}getCredential(e,t){let r,s=!1,i=!0;t&&(s=!(!t.token&&!t.credential),r=t.error,i=!1!==t.prompt),t={...t},e=this._sanitizeUrl(e);const n=new AbortController,a=(0,c.Tw)();if(t.signal&&(0,c.u7)(t.signal,()=>{n.abort()}),(0,c.u7)(n,()=>{a.reject(new o.A("identity-manager:user-aborted","ABORTED"))}),(0,c.G4)(n))return a.promise;t.signal=n.signal;const l=this._isAdminResource(e),h=s?this.findCredential(e):null;let d;if(h&&498===r?.details?.httpStatus)h.destroy();else if(h)return d=new o.A("identity-manager:not-authorized","You are currently signed in as: '"+h.userId+"'. You do not have access to this resource: "+e,{error:r}),a.reject(d),a.promise;const p=this._findCredential(e,t);if(p)return a.resolve(p),a.promise;let f=this.findServerInfo(e);if(f)!f.hasPortal&&f.server&&f.owningSystemUrl&&this._hasSameServerInstance(f.server,f.owningSystemUrl)&&(f.hasPortal=!0),!f.hasServer&&this._isServerRsrc(e)&&(f._restInfoPms=this._getTokenSvcUrl(e),f.hasServer=!0);else{const t=this._getTokenSvcUrl(e);if(!t)return d=new o.A("identity-manager:unknown-resource","Unknown resource - could not find token service endpoint."),a.reject(d),a.promise;f=new Qe,f.server=this._getServerInstanceRoot(e),"string"==typeof t?(f.tokenServiceUrl=t,f.hasPortal=!0):(f._restInfoPms=t,f.hasServer=!0),this.registerServers([f])}return f.hasPortal&&void 0===f._selfReq&&(i||(0,u.FX)(f.tokenServiceUrl,this._appOrigin)||this._gwDomains.some(e=>e.tokenServiceUrl===f.tokenServiceUrl))&&(f._selfReq={owningTenant:t?.owningTenant,selfDfd:this._getPortalSelf(f.tokenServiceUrl.replace(this._rePortalTokenSvc,"/sharing/rest/portals/self"),e)}),this._enqueue(e,f,t,a,l)}getResourceName(e){return this._isRESTService(e)?e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"")||"":this._gwUser.test(e)&&e.replace(this._gwUser,"$1")||this._gwItem.test(e)&&e.replace(this._gwItem,"$1")||this._gwGroup.test(e)&&e.replace(this._gwGroup,"$1")||""}generateToken(e,t,r){const s=this._rePortalTokenSvc.test(e.tokenServiceUrl),i=new u.s0(this._appOrigin),a=e.shortLivedTokenValidity;let l,h,d,c,p,f,g,m;t&&(m=this.tokenValidity||a||this._defaultTokenValidity,m>a&&a>0&&(m=a)),r&&(l=r.isAdmin,h=r.serverUrl,d=r.token,f=r.signal,g=r.ssl,e.customParameters=r.customParameters),l?c=e.adminTokenServiceUrl:(c=e.tokenServiceUrl,p=new u.s0(c.toLowerCase()),e.webTierAuth&&r?.serverUrl&&!g&&"http"===i.scheme&&((0,u.FX)(i.uri,c,!0)||"https"===p.scheme&&i.host===p.host&&"7080"===i.port&&"7443"===p.port)&&(c=c.replace(/^https:/i,"http:").replace(/:7443/i,":7080")));const v={query:{request:"getToken",username:t?.username,password:t?.password,serverUrl:h,token:d,expiration:m,referer:l||s?this._appOrigin:null,client:l?"referer":null,f:"json",...e.customParameters},method:"post",authMode:"anonymous",useProxy:this._useProxy(e,r),signal:f};return s||(v.withCredentials=!1),(0,n.A)(c,v).then(r=>{const s=r.data;if(!s?.token)return new o.A("identity-manager:authentication-failed","Unable to generate token");const i=e.server;return tt[i]||(tt[i]={}),t&&(tt[i][t.username]=t.password),s.validity=m,s})}isBusy(){return!!this._busy}async checkSignInStatus(e){return(await this.checkAppAccess(e,"")).credential}checkAppAccess(e,t,r){let s=!1;return this.getCredential(e,{prompt:!1}).then(i=>{let a;const l={f:"json"};if("portal"===i.scope)if(t&&(this._doPortalSignIn(e)||r?.force))a=i.server+"/sharing/rest/oauth2/validateAppAccess",l.client_id=t;else{if(!i.token)return{credential:i};a=i.server+"/sharing/rest"}else{if(!i.token)return{credential:i};a=i.server+"/rest/services"}return i.token&&(l.token=i.token),(0,n.A)(a,{query:l,authMode:"anonymous"}).then(e=>{if(!1===e.data.valid)throw new o.A("identity-manager:not-authorized",`You are currently signed in as: '${i.userId}'.`,e.data);return s=!!e.data.viewOnlyUserTypeApp,{credential:i}}).catch(e=>{if("identity-manager:not-authorized"===e.name)throw e;const t=e.details?.httpStatus;if(498===t)throw i.destroy(),new o.A("identity-manager:not-authenticated","User is not signed in.");if(400===t)throw new o.A("identity-manager:invalid-request","Bad request");return{credential:i}})}).then(e=>({credential:e.credential,viewOnly:s}))}setOAuthResponseHash(e){e&&(e.startsWith("#")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}setOAuthRedirectionHandler(e){this._oAuthRedirectFunc=e}setProtocolErrorHandler(e){this._protocolFunc=e}signIn(e,t,r={}){const s=(0,c.Tw)(),i=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=l=h=null},n=()=>{i(),this._oAuthDfd=null,s.reject(new o.A("identity-manager:user-aborted","ABORTED"))};r.signal&&(0,c.u7)(r.signal,()=>{n()});const a=new He({open:!0,resource:this.getResourceName(e),server:t.server});this.dialog=a,this.emit("dialog-create");let l=a.on("cancel",n),h=a.on("submit",e=>{this.generateToken(t,e,{isAdmin:r.isAdmin,signal:r.signal}).then(n=>{i();const o=new v({userId:e.username,server:t.server??void 0,token:n.token,expires:null!=n.expires?Number(n.expires):null,ssl:!!n.ssl,isAdmin:r.isAdmin,validity:n.validity});s.resolve(o)}).catch(e=>{a.error=e,a.signingIn=!1})});return s.promise}oAuthSignIn(e,t,r,s){this._oAuthDfd=(0,c.Tw)();const i=this._oAuthDfd;let n;s?.signal&&(0,c.u7)(s.signal,()=>{const e=this._oAuthDfd&&this._oAuthDfd.oAuthWin_;e&&!e.closed?e.close():this.dialog&&d()}),i.resUrl_=e,i.sinfo_=t,i.oinfo_=r;const a=r._oAuthCred;if(a.storage&&("authorization-code"===r.flowType||"auto"===r.flowType&&t.currentVersion>=8.4)){let e=crypto.getRandomValues(new Uint8Array(32));n=(0,u.$1)(e),a.codeVerifier=n,e=crypto.getRandomValues(new Uint8Array(32)),a.stateUID=(0,u.$1)(e),a.save()||(a.codeVerifier=n=null)}else a.codeVerifier=null;let l,h;this._getCodeChallenge(n).then(i=>{const n=!s||!1!==s.oAuthPopupConfirmation;if(!r.popup||!n)return void this._doOAuthSignIn(e,t,r,i);const o=new He({oAuthPrompt:!0,server:t.server,open:!0});this.dialog=o,this.emit("dialog-create"),l=o.on("cancel",d),h=o.on("submit",()=>{p(),this._doOAuthSignIn(e,t,r,i)})});const d=()=>{p(),this._oAuthDfd=null,i.reject(new o.A("identity-manager:user-aborted","ABORTED"))},p=()=>{l?.remove(),h?.remove(),this.dialog?.destroy(),this.dialog=null};return i.promise}async refreshToken(e){const t=this.findServerInfo(e.server),r=t?.owningSystemUrl,s=!!r&&"server"===e.scope,i=s&&st(t,this._legacyFed),n=t.webTierAuth,o=n&&this.normalizeWebTierAuth,a=tt[e.server],l=a?.[e.userId];let h,d=e.resources&&e.resources[0],c=s?this.findServerInfo(r):null,u={username:e.userId,password:l};if(n&&!o)return;s&&!c&&this.serverInfos.some(e=>(this._isIdProvider(r,e.server)&&(c=e),!!c));const p=c?this.findCredential(c.server,e.userId):null;if(!s||p){if(!i){if(s)h={serverUrl:d,token:p?.token,ssl:p?.ssl};else if(o)u=null,h={ssl:e.ssl};else{if(!l){let r;return d&&(d=this._sanitizeUrl(d),e._enqueued=1,r=this._enqueue(d,t,null,null,e.isAdmin,e),r.then(()=>{e._enqueued=0,e.refreshServerTokens()}).catch(()=>{e._enqueued=0})),r}e.isAdmin&&(h={isAdmin:!0})}return this.generateToken(s?c:t,s?null:u,h).then(t=>{e.token=t.token,e.expires=null!=t.expires?Number(t.expires):null,e.creationTime=Date.now(),e.validity=t.validity,e.emitTokenChange(),e.refreshServerTokens()}).catch(()=>{})}p?.refreshToken()}}refreshServerTokens(e){"portal"===e.scope&&this.credentials.forEach(t=>{const r=this.findServerInfo(t.server),s=r?.owningSystemUrl;t!==e&&t.userId===e.userId&&s&&"server"===t.scope&&(this._hasSameServerInstance(e.server,s)||this._isIdProvider(s,e.server))&&(st(r,this._legacyFed)?(t.token=e.token,t.expires=e.expires,t.creationTime=e.creationTime,t.validity=e.validity,t.emitTokenChange()):t.refreshToken())})}destroyCredentials(){this.credentials&&this.credentials.slice().forEach(e=>{e.destroy()}),this.emit("credentials-destroy")}enablePostMessageAuth(e="https://www.arcgis.com/sharing/rest"){this._postMessageAuthHandle&&this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=(0,l.on)(window,"message",t=>{if((t.origin===this._appOrigin||t.origin.endsWith(".arcgis.com"))&&"arcgis:auth:requestCredential"===t.data?.type){const r=t.source;this.getCredential(e).then(e=>{r.postMessage({type:"arcgis:auth:credential",credential:{expires:e.expires,server:e.server,ssl:e.ssl,token:e.token,userId:e.userId}},t.origin)}).catch(e=>{r.postMessage({type:"arcgis:auth:error",error:{name:e.name,message:e.message}},t.origin)})}})}disablePostMessageAuth(){this._postMessageAuthHandle&&(this._postMessageAuthHandle.remove(),this._postMessageAuthHandle=null)}_getOAuthLocationParams(){let e=window.location.hash;if(e){e.startsWith("#")&&(e=e.slice(1));const t=(0,u.zf)(e);let r=!1;if(t.access_token&&t.expires_in&&t.state&&t.hasOwnProperty("username"))try{t.state=JSON.parse(t.state),t.state.portalUrl&&(this._oAuthLocationParams=t,r=!0)}catch{}else if(t.error&&t.error_description&&(console.log("IdentityManager OAuth Error: ",t.error," - ",t.error_description),"access_denied"===t.error&&(r=!0,t.state)))try{t.state=JSON.parse(t.state)}catch{}r&&(window.location.hash=t.state?.hash||"")}let t=window.location.search;if(t){t.startsWith("?")&&(t=t.slice(1));const e=(0,u.zf)(t);let r=!1;if(e.code&&e.state)try{e.state=JSON.parse(e.state),e.state.portalUrl&&e.state.uid&&(this._oAuthLocationParams=e,r=!0)}catch{}else if(e.error&&e.error_description&&(console.log("IdentityManager OAuth Error: ",e.error," - ",e.error_description),"access_denied"===e.error&&(r=!0,e.state)))try{e.state=JSON.parse(e.state)}catch{}if(r){const t={...e};["code","error","error_description","message_code","persist","state"].forEach(e=>{delete t[e]});const r=(0,u.x0)(t),s=window.location.pathname+(r?`?${r}`:"")+(e.state?.hash||"");window.history.replaceState(window.history.state,"",s)}}}_getOAuthToken(e,t,r,s,i){return e=e.replace(/^http:/i,"https:"),(0,n.A)(`${e}/sharing/rest/oauth2/token`,{authMode:"anonymous",method:"post",query:s&&i?{grant_type:"authorization_code",code:t,redirect_uri:s,client_id:r,code_verifier:i}:{grant_type:"refresh_token",refresh_token:t,client_id:r}}).then(e=>e.data)}async _getCodeChallenge(e){if(e&&globalThis.isSecureContext){const t=(new TextEncoder).encode(e),r=await crypto.subtle.digest("SHA-256",t);return(0,u.$1)(new Uint8Array(r))}return null}_pageShowHandler(e){if(e.persisted&&this.isBusy()&&this._rejectOnPersistedPageShow){const e=new o.A("identity-manager:user-aborted","ABORTED");this._errbackFunc(e)}}_findCredential(e,t){let r,s,i,n,o=-1;const a=t?.token,l=t?.resource,h=this._isServerRsrc(e)?"server":"portal",d=this.credentials.filter(t=>this._hasSameServerInstance(t.server,e)&&t.scope===h);if(e=l||e,d.length)if(1===d.length){if(r=d[0],i=this.findServerInfo(r.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,r.userId):void 0,o=this._getIdenticalSvcIdx(e,r),!a)return-1===o&&r.resources.push(e),this._addResource(e,n),r;-1!==o&&(r.resources.splice(o,1),this._removeResource(e,n))}else{let t,r;if(d.some(a=>(r=this._getIdenticalSvcIdx(e,a),-1!==r&&(t=a,i=this.findServerInfo(t.server),s=i?.owningSystemUrl,n=s?this.findCredential(s,t.userId):void 0,o=r,!0))),a)t&&(t.resources.splice(o,1),this._removeResource(e,n));else if(t)return this._addResource(e,n),t}}_findOAuthInfo(e){let t=this.findOAuthInfo(e);if(!t)for(const r of this.oAuthInfos)if(this._isIdProvider(r.portalUrl,e)){t=r;break}return t}_addResource(e,t){t&&-1===this._getIdenticalSvcIdx(e,t)&&t.resources.push(e)}_removeResource(e,t){let r=-1;t&&(r=this._getIdenticalSvcIdx(e,t),r>-1&&t.resources.splice(r,1))}_useProxy(e,t){return t?.isAdmin&&!(0,u.FX)(e.adminTokenServiceUrl,this._appOrigin)||!this._isPortalDomain(e.tokenServiceUrl)&&"10.1"===String(e.currentVersion)&&!(0,u.FX)(e.tokenServiceUrl,this._appOrigin)}_getOrigin(e){const t=new u.s0(e);return t.scheme+"://"+t.host+(null!=t.port?":"+t.port:"")}_getServerInstanceRoot(e){const t=e.toLowerCase();let r=t.indexOf(this._agsRest);return-1===r&&this._isAdminResource(e)&&(r=this._agsAdmin.test(e)?e.replace(this._agsAdmin,"$1").length:e.search(this._adminSvcs)),-1!==r||(0,et.$E)(t)||(r=t.indexOf("/sharing")),-1===r&&t.endsWith("/")&&(r=t.length-1),r>-1?e.slice(0,r):e}_hasSameServerInstance(e,t){return e.endsWith("/")&&(e=e.slice(0,-1)),e=e.toLowerCase(),t=this._getServerInstanceRoot(t).toLowerCase(),e=(0,et.qG)(e),t=(0,et.qG)(t),(e=e.slice(Math.max(0,e.indexOf(":"))))===t.slice(Math.max(0,t.indexOf(":")))}_sanitizeUrl(e){const t=(i.A.request.proxyUrl||"").toLowerCase(),r=t?e.toLowerCase().indexOf(t+"?"):-1;return-1!==r&&(e=e.slice(r+t.length+1)),e=(0,u.S8)(e),(0,u.An)(e).path}_isRESTService(e){return e.includes(this._agsRest)}_isAdminResource(e){return this._agsAdmin.test(e)||this._adminSvcs.test(e)}_isServerRsrc(e){return this._isRESTService(e)||this._isAdminResource(e)}_isIdenticalService(e,t){let r=!1;if(this._isRESTService(e)&&this._isRESTService(t)){const s=this._getSuffix(e).toLowerCase(),i=this._getSuffix(t).toLowerCase();if(r=s===i,!r){const e=/(.*)\/(MapServer|FeatureServer|UtilityNetworkServer).*/gi;r=s.replaceAll(e,"$1")===i.replaceAll(e,"$1")}}else this._isAdminResource(e)&&this._isAdminResource(t)?r=!0:this._isServerRsrc(e)||this._isServerRsrc(t)||!this._isPortalDomain(e)||(r=!0);return r}_isPortalDomain(e){const t=new u.s0(e.toLowerCase()),r=this._portalConfig;let s=this._gwDomains.some(e=>e.regex.test(t.uri));return!s&&r&&(s=this._hasSameServerInstance(this._getServerInstanceRoot(r.restBaseUrl),t.uri)),s||i.A.portalUrl&&(s=(0,u.FX)(t,i.A.portalUrl,!0)),s||(s=this._portals.some(e=>this._hasSameServerInstance(e,t.uri))),s=s||this._agsPortal.test(t.path),s}_isIdProvider(e,t){let r=-1,s=-1;this._gwDomains.forEach((i,n)=>{-1===r&&i.regex.test(e)&&(r=n),-1===s&&i.regex.test(t)&&(s=n)});let i=!1;if(r>-1&&s>-1&&(0===r||4===r?0!==s&&4!==s||(i=!0):1===r?1!==s&&2!==s||(i=!0):2===r?2===s&&(i=!0):3===r&&3===s&&(i=!0)),!i){const r=this.findServerInfo(t),s=r?.owningSystemUrl;s&&rt(r)&&this._isPortalDomain(s)&&this._isIdProvider(e,s)&&(i=!0)}return i}_getIdenticalSvcIdx(e,t){let r=-1;for(let s=0;s<t.resources.length;s++){const i=t.resources[s];if(this._isIdenticalService(e,i)){r=s;break}}return r}_getSuffix(e){return e.replace(this._regexSDirUrl,"").replace(this._regexServerType,"$1")}_getTokenSvcUrl(e){let t,r,s;if(this._isRESTService(e)||this._isAdminResource(e)){const s=this._getServerInstanceRoot(e);return t=s+"/admin/generateToken",r=(0,n.A)(e=s+"/rest/info",{query:{f:"json"}}).then(e=>e.data),{adminUrl:t,promise:r}}if(this._isPortalDomain(e)){let t="";if(this._gwDomains.some(r=>(r.regex.test(e)&&(t=r.tokenServiceUrl),!!t)),t||this._portals.some(r=>(this._hasSameServerInstance(r,e)&&(t=r+this._gwTokenUrl),!!t)),t||(s=e.toLowerCase().indexOf("/sharing"),-1!==s&&(t=e.slice(0,s)+this._gwTokenUrl)),t||(t=this._getOrigin(e)+this._gwTokenUrl),t){const r=new u.s0(e).port;/^http:\/\//i.test(e)&&"7080"===r&&(t=t.replace(/:7080/i,":7443")),t=t.replace(/http:/i,"https:")}return t}}_processOAuthResponseParams(e,t,r){const s=t._oAuthCred;if(e.code){const i=s.codeVerifier;return s.codeVerifier=null,s.stateUID=null,s.save(),this._getOAuthToken(r.server,e.code,t.appId,this._getRedirectURI(t,!0),i).then(i=>{const n=new v({userId:i.username,server:r.server??void 0,token:i.access_token,expires:Date.now()+1e3*i.expires_in,ssl:i.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=n.userId,s.storage=i.persist?it:nt,s.refreshToken=i.refresh_token,s.token=null,s.expires=i.refresh_token_expires_in?Date.now()+1e3*i.refresh_token_expires_in:null,s.userId=n.userId,s.ssl=n.ssl,s.save(),n})}const i=new v({userId:e.username,server:r.server??void 0,token:e.access_token,expires:Date.now()+1e3*Number(e.expires_in),ssl:"true"===e.ssl,oAuthState:e.state,_oAuthCred:s});return t.userId=i.userId,s.storage=e.persist?it:nt,s.refreshToken=null,s.token=i.token,s.expires=i.expires,s.userId=i.userId,s.ssl=i.ssl,s.save(),Promise.resolve(i)}_processOAuthPopupParams(e){const t=this._oAuthDfd;if(this._oAuthDfd=null,t)if(clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle?.remove(),e.error){const r="access_denied"===e.error,s=new o.A(r?"identity-manager:user-aborted":"identity-manager:authentication-failed",r?"ABORTED":"OAuth: "+e.error+" - "+e.error_description);t.reject(s)}else this._processOAuthResponseParams(e,t.oinfo_,t.sinfo_).then(e=>{t.resolve(e)}).catch(e=>{t.reject(e)})}_setOAuthResponseQueryString(e){e&&(e.startsWith("?")&&(e=e.slice(1)),this._processOAuthPopupParams((0,u.zf)(e)))}async _exchangeToken(e,t,r){return(await(0,n.A)(`${e}/sharing/rest/oauth2/exchangeToken`,{authMode:"anonymous",method:"post",query:{f:"json",client_id:t,token:r}})).data.token}async _getPlatformSelf(e,t){if(this._getPlatformSelfError&&Date.now()-this._getPlatformSelfError[1]<1e3)throw this._getPlatformSelfError[0];e=e.replace(/^http:/i,"https:");try{const r=await(0,n.A)(`${e}/sharing/rest/oauth2/platformSelf`,{authMode:"anonymous",headers:{"X-Esri-Auth-Client-Id":t,"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/,"")},method:"post",query:{f:"json",expiration:30},withCredentials:!0});return this._getPlatformSelfError=null,r.data}catch(e){throw"OAUTH_0066"===e.details?.messageCode&&(this._getPlatformSelfError=[e,Date.now()]),e}}_getPortalSelf(e,t){let r;return this._gwDomains.some(t=>(t.regex.test(e)&&(r=t.customBaseUrl),!!r)),r?Promise.resolve({allSSL:!0,currentVersion:"8.4",customBaseUrl:r,portalMode:"multitenant",supportsOAuth:!0}):(this._appOrigin.startsWith("https:")?e=e.replace(/^http:/i,"https:").replace(/:7080/i,":7443"):/^http:/i.test(t)&&(e=e.replace(/^https:/i,"http:").replace(/:7443/i,":7080")),(0,n.A)(e,{query:{f:"json"},authMode:"anonymous",withCredentials:!0}).then(e=>e.data))}_doPortalSignIn(e){const t=this._portalConfig,r=window.location.href,s=this.findServerInfo(e);return!(!t&&!this._isPortalDomain(r)||!(s?s.hasPortal||s.owningSystemUrl&&this._isPortalDomain(s.owningSystemUrl):this._isPortalDomain(e))||!(this._isIdProvider(r,e)||t&&(this._hasSameServerInstance(this._getServerInstanceRoot(t.restBaseUrl),e)||this._isIdProvider(t.restBaseUrl,e))||(0,u.FX)(r,e,!0)))}_checkProtocol(e,t,r,s){let i=!0;const n=s?t.adminTokenServiceUrl:t.tokenServiceUrl;return n.trim().toLowerCase().startsWith("https:")&&!this._appOrigin.startsWith("https:")&&(0,u.zs)(n)&&(i=!!this._protocolFunc&&!!this._protocolFunc({resourceUrl:e,serverInfo:t}),!i)&&r(new o.A("identity-manager:aborted","Aborted the Sign-In process to avoid sending password over insecure connection.")),i}_enqueue(e,t,r,s,i,n){return s||(s=(0,c.Tw)()),s.resUrl_=e,s.sinfo_=t,s.options_=r,s.admin_=i,s.refresh_=n,this._busy?this._hasSameServerInstance(this._getServerInstanceRoot(e),this._busy.resUrl_)?(this._oAuthDfd&&this._oAuthDfd.oAuthWin_&&this._oAuthDfd.oAuthWin_.focus(),this._soReqs.push(s)):this._xoReqs.push(s):this._doSignIn(s),s.promise}_doSignIn(e){this._busy=e,this._rejectOnPersistedPageShow=!1;const t=t=>{const r=e.options_?.resource,s=e.resUrl_,i=e.refresh_;let n=!1;this.credentials.includes(t)||(i&&this.credentials.includes(i)?(i.userId=t.userId,i.token=t.token,i.expires=t.expires,i.validity=t.validity,i.ssl=t.ssl,i.creationTime=t.creationTime,n=!0,t=i):this.credentials.push(t)),t.resources||(t.resources=[]),t.resources.includes(r||s)||t.resources.push(r||s),t.scope=this._isServerRsrc(s)?"server":"portal",t.emitTokenChange();const o=this._soReqs,a={};this._soReqs=[],o.forEach(e=>{if(!this._isIdenticalService(s,e.resUrl_)){const r=this._getSuffix(e.resUrl_);a[r]||(a[r]=!0,t.resources.push(e.resUrl_))}}),e.resolve(t),o.forEach(e=>{this._hasSameServerInstance(this._getServerInstanceRoot(s),e.resUrl_)?e.resolve(t):this._soReqs.push(e)}),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,n||this.emit("credential-create",{credential:t}),this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},r=t=>{e.reject(t),this._busy=e.resUrl_=e.sinfo_=e.refresh_=null,this._soReqs.length?this._doSignIn(this._soReqs.shift()):this._xoReqs.length&&this._doSignIn(this._xoReqs.shift())},s=(i,n,a,h)=>{const d=e.sinfo_,p=!e.options_||!1!==e.options_.prompt,f=d.hasPortal&&this._findOAuthInfo(e.resUrl_);let g,m;if(i)t(new v({userId:i,server:d.server??void 0,token:a??void 0,expires:null!=h?Number(h):null,ssl:!!n}));else if(window!==window.parent&&this._appUrlObj.query?.["arcgis-auth-origin"]&&this._appUrlObj.query?.["arcgis-auth-portal"]&&this._hasSameServerInstance(this._getServerInstanceRoot(this._appUrlObj.query["arcgis-auth-portal"]),e.resUrl_)){window.parent.postMessage({type:"arcgis:auth:requestCredential"},this._appUrlObj.query["arcgis-auth-origin"]);const s=(0,l.on)(window,"message",e=>{e.source===window.parent&&e.data&&("arcgis:auth:credential"===e.data.type?(s.remove(),e.data.credential.expires<Date.now()?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):t(new v(e.data.credential))):"arcgis:auth:error"===e.data.type&&(s.remove(),"tokenExpiredError"===e.data.error.name?r(new o.A("identity-manager:credential-request-failed","Parent application's token has expired.")):r(o.A.fromJSON(e.data.error))))});(0,c.u7)(e.options_?.signal,()=>{s.remove()})}else if(f){let i=f._oAuthCred;if(!i){const e=new We(f,it),t=new We(f,nt);e.isValid()&&t.isValid()?e.expires>t.expires?(i=e,t.destroy()):(i=t,e.destroy()):i=e.isValid()?e:t,f._oAuthCred=i}if(i.isValid()){g=new v({userId:i.userId??void 0,server:d.server??void 0,token:i.token??void 0,expires:i.expires,ssl:i.ssl??void 0,_oAuthCred:i});const n=f.appId!==i.appId&&this._doPortalSignIn(e.resUrl_);n||i.refreshToken?(e._pendingDfd=i.refreshToken?this._getOAuthToken(d.server,i.refreshToken,i.appId).then(e=>(g.expires=Date.now()+1e3*e.expires_in,g.token=e.access_token,g)):Promise.resolve(g),e._pendingDfd.then(e=>n?this._exchangeToken(e.server,f.appId,e.token).then(t=>(e.token=t,e)).catch(()=>e):e).then(e=>{t(e)}).catch(e=>{const t=e.details?.httpStatus;t>0&&404!==t?(i.destroy(),s()):r(e)})):t(g)}else if(this._oAuthLocationParams&&this._hasSameServerInstance(f.portalUrl,this._oAuthLocationParams.state.portalUrl)&&(this._oAuthLocationParams.access_token||this._oAuthLocationParams.code&&this._oAuthLocationParams.state.uid===i.stateUID&&i.codeVerifier)){const s=this._oAuthLocationParams;this._oAuthLocationParams=null,e._pendingDfd=this._processOAuthResponseParams(s,f,d).then(e=>{t(e)}).catch(r)}else{const s=()=>{p?e._pendingDfd=this.oAuthSignIn(e.resUrl_,d,f,e.options_).then(t,r):(m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m))};this._doPortalSignIn(e.resUrl_)?e._pendingDfd=this._getPlatformSelf(d.server,f.appId).then(e=>{(0,u.FX)(e.portalUrl,this._appOrigin,!0)?(g=new v({userId:e.username,server:d.server??void 0,expires:Date.now()+1e3*e.expires_in,token:e.token}),t(g)):s()}).catch(s):s()}}else if(p){if(this._checkProtocol(e.resUrl_,d,r,e.admin_)){let s=e.options_;e.admin_&&(s=s||{},s.isAdmin=!0),e._pendingDfd=this.signIn(e.resUrl_,d,s).then(t,r)}}else m=new o.A("identity-manager:not-authenticated","User is not signed in."),r(m)},i=()=>{const s=e.sinfo_,i=s.owningSystemUrl,n=e.options_;let o,a,l,h;if(n&&(o=n.token,a=n.error,l=n.prompt),h=this._findCredential(i,{token:o,resource:e.resUrl_}),!h)for(const e of this.credentials)if(this._isIdProvider(i,e.server)){h=e;break}if(h){const i=this.findCredential(e.resUrl_,h.userId);if(i)t(i);else if(st(s,this._legacyFed)){const e=h.toJSON();e.server=s.server,e.resources=null,t(new v(e))}else(e._pendingDfd=this.generateToken(this.findServerInfo(h.server),null,{serverUrl:e.resUrl_,token:h.token,signal:e.options_.signal,ssl:h.ssl})).then(r=>{t(new v({userId:h?.userId,server:s.server??void 0,token:r.token,expires:null!=r.expires?Number(r.expires):null,ssl:!!r.ssl,isAdmin:e.admin_,validity:r.validity}))},r)}else this._busy=null,o&&(e.options_.token=null),(e._pendingDfd=this.getCredential(i.replace(/\/?$/,"/sharing"),{resource:e.resUrl_,owningTenant:s.owningTenant,signal:e.options_.signal,token:o,error:a,prompt:l})).then(()=>{this._enqueue(e.resUrl_,e.sinfo_,e.options_,e,e.admin_)},t=>{e.resUrl_=e.sinfo_=e.refresh_=null,e.reject(t)})};this._errbackFunc=r;const n=e.sinfo_.owningSystemUrl,a=this._isServerRsrc(e.resUrl_),h=e.sinfo_._restInfoPms;h?h.promise.then(t=>{const r=e.sinfo_;if(r._restInfoPms){r.adminTokenServiceUrl=r._restInfoPms.adminUrl,r._restInfoPms=null,r.tokenServiceUrl=((0,d.wc)("authInfo.tokenServicesUrl",t)||(0,d.wc)("authInfo.tokenServiceUrl",t)||(0,d.wc)("tokenServiceUrl",t))??null,r.shortLivedTokenValidity=(0,d.wc)("authInfo.shortLivedTokenValidity",t)??null,r.currentVersion=t.currentVersion,r.owningTenant=t.owningTenant;const e=r.owningSystemUrl=t.owningSystemUrl;e&&this._portals.push(e)}a&&r.owningSystemUrl?i():s()},()=>{e.sinfo_._restInfoPms=null;const t=new o.A("identity-manager:server-identification-failed","Unknown resource - could not find token service endpoint.");r(t)}):a&&n?i():e.sinfo_._selfReq?e.sinfo_._selfReq.selfDfd.then(t=>{const r={};let s,i,n,o;return t&&(s=t.user?.username,r.username=s,r.allSSL=t.allSSL,i=t.supportsOAuth,o=parseFloat(t.currentVersion),"multitenant"===t.portalMode&&(n=t.customBaseUrl),e.sinfo_.currentVersion=o),e.sinfo_.webTierAuth=!!s,s&&this.normalizeWebTierAuth?this.generateToken(e.sinfo_,null,{ssl:r.allSSL}).catch(()=>null).then(e=>(r.portalToken=e?.token,r.tokenExpiration=e?.expires,r)):!s&&i&&o>=4.4&&!this._findOAuthInfo(e.resUrl_)?this._generateOAuthInfo({portalUrl:e.sinfo_.server,customBaseUrl:n,owningTenant:e.sinfo_._selfReq.owningTenant}).catch(()=>null).then(()=>r):r}).catch(()=>null).then(t=>{e.sinfo_._selfReq=null,t?s(t.username,t.allSSL,t.portalToken,t.tokenExpiration):s()}):s()}_generateOAuthInfo(e){let t,r=null,s=e.portalUrl;const i=e.customBaseUrl,o=e.owningTenant,a=!this._defaultOAuthInfo&&this._createDefaultOAuthInfo&&!this._hasTestedIfAppIsOnPortal;if(a){r=this._appUrlObj.path;const e=r.search(/\/(apps|home)\//);r=e>-1?r.slice(0,e):null}return a&&r?(this._hasTestedIfAppIsOnPortal=!0,t=(0,n.A)(r+"/sharing/rest",{query:{f:"json"}}).then(()=>{this._defaultOAuthInfo=new Xe({appId:"arcgisonline",popupCallbackUrl:r+"/home/oauth-callback.html"})})):t=Promise.resolve(),t.then(()=>{if(this._defaultOAuthInfo)return s=s.replace(/^http:/i,"https:"),(0,n.A)(s+"/sharing/rest/oauth2/validateRedirectUri",{query:{accountId:o,client_id:this._defaultOAuthInfo.appId,redirect_uri:(0,u.s2)(this._defaultOAuthInfo.popupCallbackUrl),f:"json"}}).then(e=>{if(e.data.valid){const t=this._defaultOAuthInfo.clone();e.data.urlKey&&i?t.portalUrl="https://"+e.data.urlKey.toLowerCase()+"."+i:t.portalUrl=s,t.popup=window!==window.top||!((0,u.FX)(s,this._appOrigin)||this._gwDomains.some(e=>e.regex.test(s)&&e.regex.test(this._appOrigin))),this.oAuthInfos.push(t)}})})}_doOAuthSignIn(e,t,r,s){const i=r._oAuthCred,n={portalUrl:r.portalUrl};!r.popup&&r.preserveUrlHash&&window.location.hash&&(n.hash=window.location.hash),i.stateUID&&(n.uid=i.stateUID);const a={client_id:r.appId,response_type:i.codeVerifier?"code":"token",state:JSON.stringify(n),expiration:r.expiration,locale:r.locale,redirect_uri:this._getRedirectURI(r,!!i.codeVerifier)};r.forceLogin&&(a.force_login=!0),r.forceUserId&&r.userId&&(a.prepopulatedusername=r.userId),!r.popup&&this._doPortalSignIn(e)&&(a.redirectToUserOrgUrl=!0),i.codeVerifier&&(a.code_challenge=s||i.codeVerifier,a.code_challenge_method=s?"S256":"plain");const h=r.portalUrl.replace(/^http:/i,"https:")+"/sharing/oauth2/authorize",d=h+"?"+(0,u.x0)(a);if(r.popup){const e=window.open(d,"esriJSAPIOAuth",r.popupWindowFeatures);if(e)e.focus(),this._oAuthDfd.oAuthWin_=e,this._oAuthIntervalId=setInterval(()=>{if(e.closed){clearInterval(this._oAuthIntervalId),this._oAuthOnPopupHandle.remove();const e=this._oAuthDfd;if(e){const t=new o.A("identity-manager:user-aborted","ABORTED");e.reject(t)}}},500),this._oAuthOnPopupHandle=(0,l.on)(window,["arcgis:auth:hash","arcgis:auth:location:search"],e=>{"arcgis:auth:hash"===e.type?this.setOAuthResponseHash(e.detail):this._setOAuthResponseQueryString(e.detail)});else{const e=new o.A("identity-manager:popup-blocked","ABORTED");this._oAuthDfd.reject(e)}}else this._rejectOnPersistedPageShow=!0,this._oAuthRedirectFunc?this._oAuthRedirectFunc({authorizeParams:a,authorizeUrl:h,resourceUrl:e,serverInfo:t,oAuthInfo:r}):window.location.href=d}_getRedirectURI(e,t){const r=window.location.href.replace(/#.*$/,"");if(e.popup)return(0,u.s2)(e.popupCallbackUrl);if(t){const e=(0,u.An)(r);return e.query&&["code","error","error_description","message_code","persist","state"].forEach(t=>{delete e.query[t]}),(0,u.a6)(e.path,e.query)}return r}}ot.prototype.declaredClass="esri.identity.IdentityManagerBase";const at=new ot;(0,s.Aq)(at)},61893:(e,t,r)=>{r.d(t,{Z:()=>d,g:()=>h});var s=r(31635),i=r(69622),n=r(36563),o=r(74887),a=r(64108);class l{constructor(){this._resolver=(0,o.Tw)(),this._status=0,this._resolvingPromises=[],this._resolver.promise.then(()=>{this._status=1,this._cleanUp()},()=>{this._status=2,this._cleanUp()}),this.promise=this._resolver.promise}destroy(){this._cleanUp()}addResolvingPromise(e){this._resolvingPromises.push(e),this._tryResolve()}isResolved(){return 1===this._status}isRejected(){return 2===this._status}isFulfilled(){return 0!==this._status}abort(){this._resolver.reject((0,o.NK)())}_cleanUp(){this._allPromise=null,this._resolvingPromises=null}_tryResolve(){if(this.isFulfilled())return;const e=(0,o.Tw)(),t=[...this._resolvingPromises,e.promise],r=this._allPromise=Promise.all(t);r.then(()=>{this.isFulfilled()||this._allPromise!==r||this._resolver.resolve()},e=>{this.isFulfilled()||this._allPromise!==r||(0,o.zf)(e)||this._resolver.reject(e)}),e.resolve()}}const h=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),this._promiseProps=new l,this.addResolvingPromise(Promise.resolve())}destroy(){this._promiseProps.destroy()}isResolved(){return this._promiseProps.isResolved()}isRejected(){return this._promiseProps.isRejected()}isFulfilled(){return this._promiseProps.isFulfilled()}when(e,t){return this._promiseProps.promise.then(()=>this).then(e,t)}catch(e){return this.when(null,e)}addResolvingPromise(e){e&&!this._promiseProps.isFulfilled()&&this._promiseProps.addResolvingPromise("_promiseProps"in e?e.when():e)}addResolvingTask(e){e&&!this._promiseProps.isFulfilled()&&(this.addHandles((0,n.rE)(e)),this._promiseProps.addResolvingPromise(e.promise))}};return r=(0,s.Cg)([(0,a.$)("esri.core.Promise")],r),r},d=h(i.A)},79783:(e,t,r)=>{r.d(t,{ud:()=>w,JK:()=>S,oQ:()=>I,V2:()=>k});var s=r(2741),i=r(97770),n=r(73444),o=r(10838),a=r(18047),l=r(53966),h=r(93637),d=r(799);const c=()=>l.A.getLogger("esri.intl.substitute");function u(e,t){switch(t.type){case"date":return(0,i.Yq)(e,t.intlOptions);case"number":return(0,a.ZV)(e,t.intlOptions);default:return c().warn("missing format descriptor for key {key}"),f(e)}}function p(e,t){switch(t.toLowerCase()){case"dateformat":return(0,i.Yq)(e);case"numberformat":return(0,a.ZV)(e);default:return c().warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,i.Yq)(e):/^numberformat/i.test(t)?(0,a.ZV)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,a.ZV)(e);case"boolean":return""+e;default:return e instanceof Date?(0,i.Yq)(e):""}}var g=r(11254),m=r(49186);async function v(e){if(null!=y.fetchBundleAsset)return y.fetchBundleAsset(e);const t=await(0,g.A)(e,{responseType:"text"});return JSON.parse(t.data)}class _{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let s;s="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=s,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)\\/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const i=t.exec(r);if(!i)throw new m.A("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const n=i[1]?`${i[1]}/`:"",a=i[2],l=(0,o.xO)(s),h=`${n}${a}.json`,d=l?`${n}${a}_${l}.json`:h;let c;try{c=await v(e(d))}catch(t){if(d===h)throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{c=await v(e(h))}catch(e){throw new m.A("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return c}(this.getAssetUrl,this.matcher,e,t)}}const y={},w=o.ud,S=n.JK,I=n.oQ,A=o.ao,k=function(e,t,r={}){const{format:s={}}=r;return(0,d.HC)(e,e=>function(e,t,r){let s,i;const n=e.indexOf(":");if(-1===n?s=e.trim():(s=e.slice(0,n).trim(),i=e.slice(n+1).trim()),!s)return"";const o=(0,h.wc)(s,t);if(null==o)return"";const a=(i?r?.[i]:null)??r?.[s];return a?u(o,a):i?p(o,i):f(o)}(e,t,s))};var U;A((U={pattern:"esri/",location:s.s},new _(U)))}}]);