@arcgis/core 4.34.0-next.20 → 4.34.0-next.21

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 (176) hide show
  1. package/analysis/VolumeMeasurement/CutFillOptions.js +5 -0
  2. package/analysis/VolumeMeasurement/volumeMeasurementUtils.js +5 -0
  3. package/analysis/VolumeMeasurementAnalysis.d.ts +4 -0
  4. package/analysis/VolumeMeasurementAnalysis.js +5 -0
  5. package/assets/esri/core/workers/RemoteClient.js +1 -1
  6. package/assets/esri/core/workers/chunks/06c3725d6cc21e7e4bcf.js +1 -0
  7. package/assets/esri/core/workers/chunks/{28b525963420f022fb0a.js → 1cc30073f8200b67cff6.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{9432a5466eec397710a4.js → 273ff53a68714e4daad5.js} +1 -1
  9. package/assets/esri/core/workers/chunks/32756905bcf11699b3f7.js +1 -0
  10. package/assets/esri/core/workers/chunks/41f487713c6278d389a1.js +1 -0
  11. package/assets/esri/core/workers/chunks/5b276962c46c57155166.js +1 -0
  12. package/assets/esri/core/workers/chunks/5ce62d9fff80d014d186.js +1 -0
  13. package/assets/esri/core/workers/chunks/5e805c9e9012dd39ec86.js +1 -0
  14. package/assets/esri/core/workers/chunks/66757fc16316a5c50e1e.js +1 -0
  15. package/assets/esri/core/workers/chunks/6a0fbc54638f7de138c1.js +1 -0
  16. package/assets/esri/core/workers/chunks/871fae52d2fddc9e7794.js +1 -0
  17. package/assets/esri/core/workers/chunks/8b19fe829a9dc26fb3fe.js +1 -0
  18. package/assets/esri/core/workers/chunks/8eea6251aa09725e654e.js +1 -0
  19. package/assets/esri/core/workers/chunks/916691122d7fb38497d6.js +1 -0
  20. package/assets/esri/core/workers/chunks/919d2fd7ebc0c840a759.js +1 -0
  21. package/assets/esri/core/workers/chunks/97324f030738fc0d456b.js +1 -0
  22. package/assets/esri/core/workers/chunks/9c510df592befb9ff892.js +1 -0
  23. package/assets/esri/core/workers/chunks/9d2cb559dd9af4e1727c.js +1 -0
  24. package/assets/esri/core/workers/chunks/{2e54be3094e41fd3026d.js → 9eb1a171f5ef1fef42ed.js} +1 -1
  25. package/assets/esri/core/workers/chunks/aba520714efc01bead36.js +1 -0
  26. package/assets/esri/core/workers/chunks/accff253af360c34e8a8.js +1 -0
  27. package/assets/esri/core/workers/chunks/ad3871f497ecea1a08c9.js +1 -0
  28. package/assets/esri/core/workers/chunks/ae6eed26fc932bc08356.js +1 -0
  29. package/assets/esri/core/workers/chunks/c317819ab0544c50c078.js +1 -0
  30. package/assets/esri/core/workers/chunks/fc8bbc571216edd9ef5a.js +1 -0
  31. package/config.js +1 -1
  32. package/core/libs/rbush/PooledRBush.js +1 -1
  33. package/core/scheduling.js +1 -1
  34. package/geometry/support/buffer/BufferView.js +1 -1
  35. package/geometry/support/float16.js +1 -1
  36. package/interfaces.d.ts +1040 -146
  37. package/kernel.js +1 -1
  38. package/layers/SubtypeGroupLayer.js +1 -1
  39. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  40. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  41. package/layers/mixins/ArcGISMapService.js +1 -1
  42. package/layers/save/mapImageLayerUtils.js +1 -1
  43. package/layers/support/TilemapCache.js +1 -1
  44. package/layers/support/TitleCreator.js +1 -1
  45. package/layers/support/arcgisLayerUrl.js +1 -1
  46. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  47. package/package.json +1 -1
  48. package/rest/knowledgeGraph/GraphAddFieldIndexResult.d.ts +4 -0
  49. package/rest/knowledgeGraph/GraphAddPropertyResult.d.ts +4 -0
  50. package/rest/knowledgeGraph/GraphDataModelOperationResult.d.ts +4 -0
  51. package/rest/knowledgeGraph/GraphDeleteFieldIndexResult.d.ts +4 -0
  52. package/rest/knowledgeGraph/GraphDeletePropertyResult.d.ts +4 -0
  53. package/rest/knowledgeGraph/GraphUpdateNamedTypesResult.d.ts +4 -0
  54. package/rest/knowledgeGraph/GraphUpdatePropertyResult.d.ts +4 -0
  55. package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.d.ts +4 -0
  56. package/rest/knowledgeGraphService.d.ts +7 -0
  57. package/support/requestUtils.js +1 -1
  58. package/support/revision.js +1 -1
  59. package/views/2d/engine/ManagedCanvas.js +1 -1
  60. package/views/2d/engine/ParentChildStage.js +5 -0
  61. package/views/2d/engine/Stage.js +1 -1
  62. package/views/2d/engine/webgl/OverlayContainer.js +1 -1
  63. package/views/2d/engine/webgl/OverlayMultipoint.js +1 -1
  64. package/views/2d/engine/webgl/Painter.js +1 -1
  65. package/views/2d/engine/webgl/VideoScreenRenderer.js +5 -0
  66. package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueType.js +1 -1
  67. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/VideoScreenShader.js +5 -0
  68. package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +5 -0
  69. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  70. package/views/2d/layers/MediaLayerView2D.js +1 -1
  71. package/views/2d/layers/TileLayerView2D.js +1 -1
  72. package/views/2d/layers/features/Processor.js +1 -1
  73. package/views/2d/layers/features/processor/AProcessorStrategy.js +1 -1
  74. package/views/2d/layers/features/support/AttributeStore.js +1 -1
  75. package/views/2d/mapViewDeps.js +1 -1
  76. package/views/3d/analysis/AnalysisViewManager3D.js +1 -1
  77. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.d.ts +4 -0
  78. package/views/3d/analysis/VolumeMeasurementAnalysisView3D.js +5 -0
  79. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  80. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  81. package/views/3d/layers/graphics/DeconflictAABR.js +1 -1
  82. package/views/3d/layers/graphics/ExtentSet.js +1 -1
  83. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  84. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  85. package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
  86. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  87. package/views/3d/layers/graphics/Labeler.js +1 -1
  88. package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
  89. package/views/3d/layers/i3s/I3SAsyncElevationUpdater.js +1 -1
  90. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  91. package/views/3d/layers/i3s/I3SLodHandling.js +1 -1
  92. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  93. package/views/3d/layers/support/FeatureTileDescriptor.js +1 -1
  94. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  95. package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
  96. package/views/3d/layers/support/FeatureTileTree3D.js +1 -1
  97. package/views/3d/layers/support/FeatureVisibilityFilter.js +1 -1
  98. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  99. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  100. package/views/3d/support/StreamDataLoader.js +1 -1
  101. package/views/3d/support/buffer/InterleavedLayout.js +1 -1
  102. package/views/3d/terrain/OverlayManager.js +1 -1
  103. package/views/3d/terrain/OverlayRenderer.js +1 -1
  104. package/views/3d/terrain/TerrainSurface.js +1 -1
  105. package/views/3d/webgl-engine/Stage.js +1 -1
  106. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  107. package/views/3d/webgl-engine/core/FBOPool.js +1 -1
  108. package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
  109. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  110. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  111. package/views/3d/webgl-engine/lib/DefaultVertexBufferLayouts.js +1 -1
  112. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  113. package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
  114. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  115. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  116. package/views/SceneView.js +1 -1
  117. package/views/VideoView.js +1 -1
  118. package/views/View2D.js +1 -1
  119. package/views/Viewport2DBaseMixin.js +5 -0
  120. package/views/Viewport2DMixin.js +1 -1
  121. package/views/layers/FeatureLayerView.js +1 -1
  122. package/views/support/Scheduler.js +1 -1
  123. package/views/video/VideoOperationalDataView.js +5 -0
  124. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  125. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.d.ts +4 -0
  126. package/widgets/BatchAttributeForm/inputs/BatchFormInputs.js +1 -1
  127. package/widgets/BatchAttributeForm/inputs/EditableInput.d.ts +4 -0
  128. package/widgets/BatchAttributeForm/inputs/EditableInput.js +1 -1
  129. package/widgets/BatchAttributeForm/inputs/FieldInput.d.ts +4 -0
  130. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  131. package/widgets/BatchAttributeForm/inputs/GroupInput.d.ts +4 -0
  132. package/widgets/BatchAttributeForm/inputs/GroupInput.js +1 -1
  133. package/widgets/BatchAttributeForm/inputs/InputBase.d.ts +4 -0
  134. package/widgets/BatchAttributeForm/inputs/InputBase.js +1 -1
  135. package/widgets/BatchAttributeForm/inputs/support/createBatchFormInputs.js +1 -1
  136. package/widgets/Directions.js +1 -1
  137. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  138. package/widgets/FeatureForm/EditableInput.d.ts +2 -2
  139. package/widgets/FeatureForm/FieldInput.d.ts +2 -2
  140. package/widgets/FeatureForm/GroupInput.d.ts +2 -2
  141. package/widgets/FeatureForm/InputBase.d.ts +2 -2
  142. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  143. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  144. package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
  145. package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
  146. package/widgets/OrientedImageryViewer.js +1 -1
  147. package/widgets/VersionManagement/VersionManagementViewModel.js +1 -1
  148. package/widgets/VideoPlayer.js +1 -1
  149. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  150. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  151. package/widgets/support/SelectionList/LayerItem.js +1 -1
  152. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  153. package/widgets/support/SelectionList.js +1 -1
  154. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  155. package/assets/esri/core/workers/chunks/034950f7d0596e77a7dd.js +0 -1
  156. package/assets/esri/core/workers/chunks/0808b7b2a18331ac0cf6.js +0 -1
  157. package/assets/esri/core/workers/chunks/093938edee5f0532d7da.js +0 -1
  158. package/assets/esri/core/workers/chunks/116bbff428cc2dc1832e.js +0 -1
  159. package/assets/esri/core/workers/chunks/1646699188ed0cd4ce24.js +0 -1
  160. package/assets/esri/core/workers/chunks/2999ae2a7d4d1ad6447b.js +0 -1
  161. package/assets/esri/core/workers/chunks/3541714d448958c9bc38.js +0 -1
  162. package/assets/esri/core/workers/chunks/629a257509b148ff38c0.js +0 -1
  163. package/assets/esri/core/workers/chunks/6b5fc9da8ae34c889b83.js +0 -1
  164. package/assets/esri/core/workers/chunks/707b34e15937c4f7902f.js +0 -1
  165. package/assets/esri/core/workers/chunks/770e609a6bd3533ceda9.js +0 -1
  166. package/assets/esri/core/workers/chunks/851baab753d9c8e967bd.js +0 -1
  167. package/assets/esri/core/workers/chunks/aa6c37f116c07ddca5fb.js +0 -1
  168. package/assets/esri/core/workers/chunks/bc0c3b5a5ab3fcb8f77a.js +0 -1
  169. package/assets/esri/core/workers/chunks/cac281604a41af9b1759.js +0 -1
  170. package/assets/esri/core/workers/chunks/d25c8c30ce4058937d4f.js +0 -1
  171. package/assets/esri/core/workers/chunks/d638ae7814acf6c0fb8e.js +0 -1
  172. package/assets/esri/core/workers/chunks/d6ce99a713afdb03e332.js +0 -1
  173. package/assets/esri/core/workers/chunks/dc3816eef53d17074eab.js +0 -1
  174. package/assets/esri/core/workers/chunks/dd70b060ea4f632c2430.js +0 -1
  175. package/assets/esri/core/workers/chunks/e2e5e8bd3406609d8996.js +0 -1
  176. package/assets/esri/core/workers/chunks/f6c815f7d3ca072172ce.js +0 -1
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2083],{6455:(e,t,n)=>{n.d(t,{FJ:()=>_,Dp:()=>b,KV:()=>w});var i=n(90237),r=n(93637),o=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),a=n(89317),l=n(69540),u=n(5503),d=n(25482),p=n(43937),c=n(83960),h=n(13069);const y={write:{overridePolicy:(e,t,n)=>({enabled:!n||"scale"===n.filterMode})}};let m=class extends(l.A.ClonableMixin(d.A)){constructor(e){super(e),this.id=(0,h.lk)(),this.maxScale=0,this.minScale=0,this.title="",this.where=null}};(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"id",void 0),(0,i._)([(0,o.MZ)({type:Number,json:y})],m.prototype,"maxScale",void 0),(0,i._)([(0,o.MZ)({type:Number,json:y})],m.prototype,"minScale",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],m.prototype,"where",void 0),m=(0,i._)([(0,s.$)("esri.layers.support.DisplayFilter")],m);var f=n(41560);let g=class extends(l.A.ClonableMixin(d.A)){constructor(e){super(e),this.activeFilterId=null,this.filters=new(u.A.ofType(m)),this.mode="manual"}writeFilters(e,t,n,i){const r=e.toArray();"scale"===this.mode&&r.sort((e,t)=>{const n=(0,c.oW)(t.minScale,e.minScale),i=e.maxScale-t.maxScale;return 0===n?i:n}),t[n]=r.map(e=>e.toJSON(i))}write(e,t){return super.write(e,(0,f.mW)(this,t))}};(0,i._)([(0,o.MZ)({type:String,json:{write:{overridePolicy:(e,t,n)=>({enabled:"manual"===n.filterMode,isRequired:!0})}}})],g.prototype,"activeFilterId",void 0),(0,i._)([(0,o.MZ)({type:u.A.ofType(m),nonNullable:!0,json:{write:!0}})],g.prototype,"filters",void 0),(0,i._)([(0,p.K)("filters")],g.prototype,"writeFilters",null),(0,i._)([(0,o.MZ)({type:["manual","scale"],nonNullable:!0,json:{name:"filterMode",write:!0}})],g.prototype,"mode",void 0),g=(0,i._)([(0,s.$)("esri.layers.support.DisplayFilterInfo")],g);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.displayFilterEnabled=!0,this.displayFilterInfo=null}};return(0,i._)([(0,o.MZ)(b)],t.prototype,"displayFilterEnabled",void 0),(0,i._)([(0,o.MZ)(w)],t.prototype,"displayFilterInfo",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.DisplayFilteredLayer")],t),t},b={type:Boolean,json:{name:"layerDefinition.disableDisplayFilter",read:{reader:e=>!e},write:{layerContainerTypes:a.K,writer(e,t,n){(0,r.sM)(n,!e,t)}},origins:{"web-scene":{write:!1,read:!1}}}},w={type:g,json:{name:"layerDefinition.displayFilterInfo",write:{enabled:!0,allowNull:!0,layerContainerTypes:a.K},origins:{"web-scene":{write:!1,read:!1}}}}},6518:(e,t,n)=>{n.d(t,{F:()=>a});var i=n(44208),r=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new r.w(9,(0,i.A)("esri-csp-restrictions")?e=>({minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const e=new Array(this._idByBounds.size);let t=0;this._idByBounds.forEach((n,i)=>{e[t++]=i}),this._indexInvalid=!1,this._index.clear(),this._index.load(e)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(e=>this._idByBounds.has(e))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const e=(0,o.Ie)();for(const t of this._boundsById.values())t&&(e[0]=Math.min(t[0],e[0]),e[1]=Math.min(t[1],e[1]),e[2]=Math.max(t[2],e[2]),e[3]=Math.max(t[3],e[3]));return e}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(e){const t=this._boundsById.get(e);this._boundsById.delete(e),t&&(this._idByBounds.delete(t),this._indexInvalid||this._index.remove(t))}forEachInBounds(e,t){this._loadIndex(),function(e,t,n){(function(e){s.minX=e[0],s.minY=e[1],s.maxX=e[2],s.maxY=e[3]})(t),e.search(s,n)}(this._index,e,e=>t(this._idByBounds.get(e)))}get(e){return this._boundsById.get(e)}has(e){return this._boundsById.has(e)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(e,t){if(!this._indexInvalid){const t=this._boundsById.get(e);t&&(this._index.remove(t),this._idByBounds.delete(t))}this._boundsById.set(e,t),t&&(this._idByBounds.set(t,e),this._indexInvalid||(this._boundsToLoad.push(t),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8460:(e,t,n)=>{n.d(t,{$C:()=>_,Hh:()=>s,J:()=>u,JT:()=>l,Tu:()=>f,Wg:()=>g,Xq:()=>w,i6:()=>I,pM:()=>m,tx:()=>a,vJ:()=>b});var i=n(2741);let r,o=null;function s(){return r||(r=n.e(3666).then(n.bind(n,3666)).then(e=>e.l).then(({default:e})=>e({locateFile:e=>(0,i.s)(`esri/libs/linkchartlayout/${e}`)})).then(e=>{!function(e){o=e}(e)}),r)}var a,l,u,d,p;(p=a||(a={}))[p.None=0]="None",p[p.IsMovable=1]="IsMovable",p[p.IsGeographic=2]="IsGeographic",p[p.IsRoot=4]="IsRoot",p[p.IsOld=8]="IsOld",function(e){e[e.Success=0]="Success",e[e.Error=1]="Error",e[e.Canceled=2]="Canceled"}(l||(l={})),function(e){e[e.Regular=0]="Regular",e[e.Curved=1]="Curved",e[e.Recursive=2]="Recursive"}(u||(u={})),function(e){e[e.right=0]="right",e[e.left=1]="left",e[e.top=2]="top",e[e.bottom=3]="bottom"}(d||(d={}));const c={none:0,"start-only":1,"start-and-end":2};function h(e){const t={timeDirection:"right",timeBannerUTCOffsetInMinutes:0,eventsTicksVisualization:"start-and-end",showDurationLineForNonZeroDurationEntityEvents:!0,durationLineWidth:5,entityPositionAtDurationRatio:1,showNonZeroDurationIntervalBounds:!1,separateTimeOverlaps:!0,separateTimelineOverlaps:!0,moveFirstBends:!0,secondBendRatio:.3,lineSeparationMultiplier:1,spaceSeparatedLinesEvenly:!1,useBezierCurves:!1,separatedLineShapeRatio:0,...e?.toJSON()??{},eventsTicksVisualization:e?.eventsTicksVisualization??"start-and-end"};return{...t,timeDirection:{value:d[t.timeDirection]??d.right},eventsTicksVisualization:{value:c[t.eventsTicksVisualization]??c["start-and-end"]}}}function y(e,t,n,i,r,s){const a=n.length,u=r.length,d=Float64Array.BYTES_PER_ELEMENT,p=Uint32Array.BYTES_PER_ELEMENT,c=Uint8Array.BYTES_PER_ELEMENT,h=16+a*(c+2*d)+u*(2*p),y=o._malloc(h);try{const c=y+16-y%16,h=c+a*d,m=h+a*d,f=m+u*p,g=f+u*p,_=()=>[o.HEAPF64.subarray(c>>3,(c>>3)+a),o.HEAPF64.subarray(h>>3,(h>>3)+a),o.HEAPU32.subarray(m>>2,(m>>2)+u),o.HEAPU32.subarray(f>>2,(f>>2)+u),o.HEAPU8.subarray(g,g+a)],[b,w,I,T,M]=_();b.set(n),w.set(i),I.set(r),T.set(s),M.set(t);const v=e(a,g,c,h,u,m,f);let E=null,x=null;if(v.value===l.Success){const e=o.getLayoutLinksTypes(),t=o.getLayoutLinksVerticesEndIndices(),n=o.getLayoutLinksVertices(),i=o.countLayoutLinksVertices();!u||e&&t?i&&!n?v.value=l.Error:(E={types:new Uint8Array(o.HEAPU8.subarray(e,e+u)),vertexEndIndex:new Uint32Array(o.HEAPU32.subarray(t>>2,(t>>2)+u)),vertices:new Float64Array(o.HEAPF64.subarray(n>>3,(n>>3)+2*i))},x=o.getAuxiliaryGraphicElements()):v.value=l.Error}const[A,S,N,C,L]=_();return n.set(A),i.set(S),r.set(N),s.set(C),t.set(L),{status:v.value,links:E,graphics:x}}finally{o._free(y),o.cleanupLayout()}}var m,f,g,_,b,w,I,T,M;!function(e){e.getMinIdealEdgeLength=function(){return o.getMinIdealEdgeLength()},e.apply=function(e,t,n,i,r,s,a=2,l=1,u=-1){return y((t,n,i,r,s,d,p)=>o.applyForceDirectedLayout(e,t,n,i,r,s,d,p,a,l,u),t,n,i,r,s)}}(m||(m={})),function(e){e.apply=function(e,t,n,i,r,s,a=2,l=1,u=-1){return y((t,n,i,r,s,d,p)=>o.applyCommunityLayout(e,t,n,i,r,s,d,p,a,l,u),t,n,i,r,s)}}(f||(f={})),function(e){e.apply=function(e,t,n,i,r,s){return y((t,n,i,r,s,a,l)=>o.applySimpleLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(g||(g={})),function(e){e.apply=function(e,t,n,i,r,s){return y((t,n,i,r,s,a,l)=>o.applyHierarchicalLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(_||(_={})),function(e){e.apply=function(e,t,n,i,r,s){return y((t,n,i,r,s,a,l)=>o.applyRadialTreeLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(b||(b={})),function(e){e.apply=function(e,t,n,i,r,s){return y((t,n,i,r,s,a,l)=>o.applySmartTreeLayout(e,t,n,i,r,s,a,l),t,n,i,r,s)}}(w||(w={})),function(e){e.apply=function(e,t,n,i,r,s,a,u,d,p,c,m){return y((t,n,i,a,u,y,f)=>{if(r.length!==t)return{value:l.Error};if(s.length!==t)return{value:l.Error};if(d.length!==u)return{value:l.Error};if(p.length!==u)return{value:l.Error};const g=Float64Array.BYTES_PER_ELEMENT,_=16,b=o._malloc(_+t*g),w=o._malloc(_+t*g),I=o._malloc(_+u*g),T=o._malloc(_+u*g),M=b+_-b%_,v=w+_-w%_,E=I+_-I%_,x=T+_-T%_;try{return o.HEAPF64.subarray(M>>3,(M>>3)+t).set(r),o.HEAPF64.subarray(v>>3,(v>>3)+t).set(s),o.HEAPF64.subarray(E>>3,(E>>3)+u).set(d),o.HEAPF64.subarray(x>>3,(x>>3)+u).set(p),o.applyChronologicalLayout(e,t,n,i,a,M,v,u,y,f,E,x,c,h(m))}finally{o._free(b),o._free(w),o._free(I),o._free(T)}},t,n,i,a,u)}}(I||(I={})),function(e){e[e.Undirected=0]="Undirected",e[e.Directed=1]="Directed",e[e.Reversed=2]="Reversed"}(T||(T={})),function(e){e[e.ByCC_Raw=0]="ByCC_Raw",e[e.ByCC_NormalizeGlobally=1]="ByCC_NormalizeGlobally",e[e.ByCC_NormalizeByCC=2]="ByCC_NormalizeByCC"}(M||(M={}))},15375:(e,t,n)=>{n.d(t,{BL:()=>l,Cz:()=>r,KQ:()=>o,M1:()=>a,T1:()=>s,dr:()=>i});const i="ESRI__ID",r="ESRI__OriginID",o="ESRI__DestID",s="ESRI__LayoutGeometry",a="ESRI__AggregationCount",l="LC.ESRI__IsSpatial"},17036:(e,t,n)=>{n.d(t,{p:()=>l});var i=n(44208),r=n(53966),o=n(20437),s=n(95466),a=n(30524);function l(){return{fields:{type:[o.A],value:null,set:function(e){if(e&&(0,i.A)("big-integer-warning-enabled")){const t=e.filter(e=>"big-integer"===e.type||"oid"===e.type&&(e.length||0)>=8);if(t.length){const e=t.map(e=>`'${e.name}'`).join(", ");r.A.getLogger(this).warn("#fields",`Layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}') references big-integer field(s): ${e}, support for which is experimental. Only integers less than ${Number.MAX_SAFE_INTEGER} (Number.MAX_SAFE_INTEGER) are supported.`)}}this._set("fields",e)}},fieldsIndex:{readOnly:!0,get(){return s.A.fromLayer(this)}},outFields:{type:[String],json:{read:!1},set:function(e){this._userOutFields=e,this.notifyChange("outFields")},get:function(){const e=this._userOutFields;if(!e?.length)return null;if(e.includes("*"))return["*"];if(!this.fields)return e;for(const t of e){const n=this.fieldsIndex?.has(t);n||r.A.getLogger("esri.layers.support.fieldProperties").error("field-attributes-layer:invalid-field",`Invalid field ${t} found in outFields`,{layer:this,outFields:e})}return(0,a.DB)(this.fieldsIndex,e)}}}}},23150:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(90237),r=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),s=n(82799),a=n(54238);let l=class extends a.A{constructor(e){super(e),this.originId=null,this.destinationId=null,this.layoutGeometry=null}};(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"originId",void 0),(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],l.prototype,"destinationId",void 0),(0,i._)([(0,r.MZ)({type:s.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.Relationship")],l)},25927:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(90237),r=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),s=n(86738),a=n(54238);let l=class extends a.A{constructor(e){super(e),this.layoutGeometry=null}};(0,i._)([(0,r.MZ)({type:s.A,json:{write:!0}})],l.prototype,"layoutGeometry",void 0),l=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.Entity")],l)},26253:(e,t,n)=>{n.d(t,{T:()=>p});var i=n(90237),r=n(69540),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(93223)),u=n(40608),d=n(73133);let p=class extends(r.A.ClonableMixin(o.A)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,i._)([(0,l.e)(d.j,{nonNullable:!0})],p.prototype,"unit",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],p.prototype,"value",void 0),p=(0,i._)([(0,u.$)("esri.time.TimeInterval")],p)},30504:(e,t,n)=>{n.d(t,{k5:()=>u,aq:()=>l,Wq:()=>d}),n(52106);var i=n(49186),r=(n(86738),n(39829),n(82799),n(94194),n(69860),n(8460),n(66552));(0,r.O)()({none:"none",startAndEnd:"start-and-end",startOnly:"start-only"}),(0,r.O)()({absoluteValue:"absolute-value",multiplier:"multiplier"});const o=new Map([["basic-grid","basic-grid"],["geographic-organic-standard","geographic-organic-standard"],["hierarchical-bottom-to-top","hierarchical-bottom-to-top"],["hierarchical-top-to-bottom","hierarchical-bottom-to-top"],["organic-community","organic-community"],["organic-fusiform","organic-standard"],["organic-leaf-circle","organic-standard"],["organic-standard","organic-standard"],["radial-node-centric","radial-root-centric"],["radial-root-centric","radial-root-centric"],["tree-bottom-to-top","tree-left-to-right"],["tree-left-to-right","tree-left-to-right"],["tree-right-to-left","tree-left-to-right"],["tree-top-to-bottom","tree-left-to-right"],["chronological-mono-timeline","chronological-mono-timeline"],["chronological-multi-timeline","chronological-multi-timeline"]]);var s=n(8916),a=n(42538);async function l(e,t,n){const i=[],r=function(e,t){const n=new Map;if(t.dataModel?.relationshipTypes)for(const e of t.dataModel.relationshipTypes)e.name&&n.set(e.name,[]);for(const t of e)n.has(t.typeName)&&n.get(t.typeName)?.push(t.id);return n}(e,t),o={},l=[];for(const[e,t]of r){if(t.length<1)continue;const n=`${e}_ids`;o[n]=t,l.push(`MATCH (n)-[r:${e}]->(m) WHERE id(r) in $${n} RETURN id(n), labels(n)[0], id(m), labels(m)[0]`)}if(0===l.length)return[];const u=l.join(" UNION "),d=new a.A({openCypherQuery:u,bindParameters:o}),p=(await(0,s.executeQueryStreaming)(t,d,n?.requestOptions)).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await p.read();if(e)break;for(const e of t)i.push({id:e[0],typeName:e[1]}),i.push({id:e[2],typeName:e[3]})}return i}n(40863),n(94985),n(68249);const u=e=>o.get(e)??"radial-root-centric";function d(e){if(!e.spatialReference.isWGS84)throw new i.A("knowledge-graph:layer-support-utils","The utilsExtentToInBoundsRings function only supports WGS84 spatial references.");return e.clone().normalize().map(e=>[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]])}},37531:(e,t,n)=>{n.d(t,{dt:()=>c,GG:()=>g,UQ:()=>f,Sx:()=>d});var i=n(68197),r=n(60999),o=(n(44208),n(51850)),s=(n(76369),n(62046)),a=(n(2741),n(78888),n(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new i.A([128,128,128]);var l=n(28975),u=n(33910);function d(e,t){if(!e)return null;let n=null;return(0,u.wk)(e)?n=function(e){const t=e.symbolLayers;if(!t)return null;let n=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(n="water"===e.type?e.color:e.material?e.material.color:null)}),n?new i.A(n):null}(e):(0,u.$y)(e)&&(n="cim"===e.type?(0,s.Nk)(e):e.color?new i.A(e.color):null),n?p(n,t):null}function p(e,t){if(null==t||null==e)return e;const n=e.toRgba();return n[3]=n[3]*t,new i.A(n)}function c(e,t,n){e&&(t||null!=n)&&(t&&(t=new i.A(t)),(0,u.wk)(e)?function(e,t,n){const r=e.symbolLayers;if(!r)return;const o=(e,r=!1)=>{let o=t??e??null;return null!=n?.override&&(!o&&r&&(o=new i.A([255,255,255])),o&&(o.a=n.override)),p(o,n?.add)};r.forEach(e=>{if("water"===e.type)return void(e.color=p(e.color,n?.add));const t=null!=e.material?e.material.color:null,i=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:i}):e.material.color=i,"outline"in e&&e.outline?.color&&null!=n?.add&&(e.outline.color=p(e.outline.color,n.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))})}(e,t,n):(0,u.$y)(e)&&function(e,t,n){t=t??e.color,null!=n?.override&&t&&(t.a=n.override),t&&(e.color=p(t,n?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,n?.add))}(e,t,n))}function h(e){for(const t of e)if("number"==typeof t)return t;return null}function y(e,t,n){for(let i=0;i<3;i++){const r=e[i];switch(r){case"symbol-value":{const e=n[i];return null!=e?e/t[i]:1}case"proportional":break;default:if(r&&t[i])return r/t[i]}}return null}function m(e,t,n,i){switch(e){case"proportional":return n*i;case"symbol-value":return null!=t?t:n;default:return e}}async function f(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const i=e.symbolLayers;i&&await(0,r.jJ)(i,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const n=t[2];"number"==typeof n&&(e.size=n)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const n=h(t);null!=n&&(e.size=n)}(e,t);break;case"path":!function(e,t){const n=y(t,o.Un,[e.width,void 0,e.height]);null!=n&&(e.width=m(t[0],e.width,1,n),e.height=m(t[2],e.height,1,n))}(e,t);break;case"object":await async function(e,t){const{resourceSize:i,symbolSize:r}=await async function(e){const{computeObjectLayerResourceSize:t}=await n.e(5404).then(n.bind(n,95404)),i=await t(e,10),{width:r,height:o,depth:s}=e,a=[r,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/i[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=i[e]*l);return{resourceSize:i,symbolSize:a}}(e),o=y(t,i,r);null!=o&&(e.width=m(t[0],r[0],i[0],o),e.depth=m(t[1],r[1],i[1],o),e.height=m(t[2],r[2],i[2],o))}(e,t)}}(e,t))}(e,t):void((0,u.$y)(e)&&function(e,t){const n=h(t);if(null!=n)switch(e.type){case"simple-marker":e.size=n;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=n,e.height=n*t):(e.width=n*t,e.height=n);break}case"simple-line":e.width=n;break;case"text":e.font.size=n}}(e,t))}function g(e,t,n){if(e&&null!=t)if((0,u.wk)(e)){const i=e.symbolLayers;i&&i.forEach(e=>{if("object"===e.type)switch(n){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else(0,u.$y)(e)&&("simple-marker"!==e.type&&"picture-marker"!==e.type&&"text"!==e.type||(e.angle+=t))}},37730:(e,t,n)=>{n.d(t,{T:()=>r});var i=n(43334);const r={getObjectId:e=>e.objectId,getAttributes:e=>e.attributes,getAttribute:(e,t)=>e.attributes[t],cloneWithGeometry:(e,t)=>new i.Om(t,e.attributes,null,e.objectId),getGeometry:e=>e.geometry,getCentroid:(e,t)=>e.ensureCentroid(t)}},40662:(e,t,n)=>{n.d(t,{A:()=>s});var i=n(90237),r=(n(53966),n(44208),n(87811),n(49186),n(40608)),o=n(77901);let s=class extends o.A{constructor(e){super(e)}};s=(0,i._)([(0,r.$)("esri.rest.knowledgeGraph.ObjectValue")],s)},42095:(e,t,n)=>{n.d(t,{A:()=>l});var i=n(90237),r=n(25482),o=n(10107),s=(n(44208),n(53966),n(87811),n(40608)),a=n(77901);let l=class extends r.A{constructor(e){super(e),this.path=[]}};(0,i._)([(0,o.MZ)({type:[a.A],json:{write:!0}})],l.prototype,"path",void 0),l=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.Path")],l)},42538:(e,t,n)=>{n.d(t,{A:()=>u});var i=n(90237),r=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),s=n(16930),a=n(69622);let l=class extends a.A{constructor(e){super(e),this.openCypherQuery=""}};(0,i._)([(0,r.MZ)()],l.prototype,"openCypherQuery",void 0),l=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.GraphQuery")],l);let u=class extends l{constructor(e){super(e),this.bindParameters=null,this.bindGeometryQuantizationParameters=null,this.outputQuantizationParameters=null,this.outputSpatialReference=null,this.provenanceBehavior=null}};(0,i._)([(0,r.MZ)()],u.prototype,"bindParameters",void 0),(0,i._)([(0,r.MZ)()],u.prototype,"bindGeometryQuantizationParameters",void 0),(0,i._)([(0,r.MZ)()],u.prototype,"outputQuantizationParameters",void 0),(0,i._)([(0,r.MZ)({type:s.A})],u.prototype,"outputSpatialReference",void 0),(0,i._)([(0,r.MZ)()],u.prototype,"provenanceBehavior",void 0),u=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.GraphQueryStreaming")],u)},54238:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(90237),r=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),s=n(77901);let a=class extends s.A{constructor(e){super(e),this.typeName=null,this.id=null}};(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"typeName",void 0),(0,i._)([(0,r.MZ)({type:String,json:{write:!0}})],a.prototype,"id",void 0),a=(0,i._)([(0,o.$)("esri.rest.knowledgeGraph.GraphNamedObject")],a)},62046:(e,t,n)=>{n.d(t,{Fe:()=>d,Nk:()=>o});var i=n(68197),r=n(93397);function o(e){const t=[];return s((0,r.lW)(e),t),t.length?new i.A((0,r.e6)(t[0])):null}function s(e,t){if(!e)return;let n;n="CIMTextSymbol"===e.type?e.symbol:e;const i="CIMPolygonSymbol"===e.type;if(n?.symbolLayers)for(const e of n.symbolLayers)if(!(e.colorLocked||i&&((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{s(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const n of e)if(n.join(".")===t.join("."))return;e.push(t)}function l(e,t){const n=t.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function d(e,t,n){t instanceof i.A||(t=new i.A(t));const o=(0,r.lW)(e);o&&p(o,t,n)}function p(e,t,n){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===i?.type;if(i?.symbolLayers)for(const e of i.symbolLayers){if(e.colorLocked)continue;if(o)if(n){const{layersToColor:t}=n;if(((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))&&"fill"===t||(0,r.jn)(e)&&"outline"===t)continue}else if((0,r.mA)(e)||(0,r.MM)(e)&&e.markerPlacement&&(0,r.zr)(e.markerPlacement))continue;const i=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=i;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{p(e.symbol,t,n)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=i;break;case"CIMGradientFill":c(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,n)}}}function c(e,t){const n=e.colorRamp?.type;switch(n){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&h(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":h(e.colorRamp,t)}}function h(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const n=t.clone();n.a=0,e.toColor=n.toArray()}}},64714:(e,t,n)=>{n.d(t,{F0:()=>a,Vx:()=>d,e2:()=>c,f:()=>h});var i=n(44208),r=n(4718),o=n(99352),s=n(93470);function a(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?s.Cb:"esriGeometryPolyline"===e?s.yM:s.WR}}}const l=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function d(e,t){if((0,i.A)("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let n=`this${p(t)} = null;`;for(const t in e)n+=`this${p(t)} = ${JSON.stringify(e[t])};`;const i=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${n};\n }\n }\n `)();return()=>new i}catch(n){return()=>({[t]:null,...e})}}function p(e){return l.test(e)?`.${e}`:`["${e}"]`}function c(e={}){return[{name:"New Feature",description:"",prototype:{attributes:(0,r.o8)(e)}}]}function h(e,t){return{analytics:{supportsCacheHint:!1},attachment:null,data:{isVersioned:!1,isBranchVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryBins:!0,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0,supportsAsyncConvert3D:!1},query:o.F,queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:o.P,editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsAsyncApplyEdits:!1,zDefault:void 0}}}},67996:(e,t,n)=>{n.d(t,{cZ:()=>R,XW:()=>B,fe:()=>F});var i,r=n(78888),o=n(49186),s=n(91869),a=(n(90708),n(92722)),l=n(16930);class u{constructor(){this.version="",this.queryResult=new d}}class d{constructor(){this.featureResult=new p}}class p{constructor(){this.objectIdFieldName="",this.uniqueIdField=new c,this.globalIdFieldName="",this.geohashFieldName="",this.geometryProperties=new h,this.geometryType=null,this.spatialReference=new l.A,this.exceededTransferLimit=!1,this.hasZ=!1,this.hasM=!1,this.transform=new y,this.fields=[],this.fieldNameToAttributeIndexMap={},this.values=[],this.features=[],this.geometryFields=[]}}class c{constructor(){this.name="",this.isSystemMaintained=!1}}class h{constructor(){this.shapeAreaFieldName="",this.shapeLengthFieldName="",this.units=""}}class y{constructor(){this.quantizeOriginPosition="upperLeft",this.scale=new m,this.translate=new f}}class m{constructor(){this.xScale=0,this.yScale=0,this.mScale=0,this.zScale=0}}class f{constructor(){this.xTranslate=0,this.yTranslate=0,this.mTranslate=0,this.zTranslate=0}}class g{constructor(){this.name="",this.fieldType="esriFieldTypeString",this.alias="",this.sqlType="sqlTypeVarchar",this.domain="",this.defaultValue=""}}class _{constructor(){this.attributes=[],this.compressedGeometry=new b,this.centroid=new b,this.aggregateGeometries=[]}}class b{constructor(){this.geometryType=null,this.lengths=[],this.coords=[]}}!function(e){e.ELEMENTUID="ELEMENTUID",e.TYPENAME="TYPENAME"}(i||(i={}));const w=[i.ELEMENTUID,i.TYPENAME];var I,T;!function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME"}(I||(I={})),function(e){e[e.ELEMENTUID=0]="ELEMENTUID",e[e.TYPENAME=1]="TYPENAME",e[e.FROMUID=2]="FROMUID",e[e.TOUID=3]="TOUID"}(T||(T={}));var M,v,E,x,A=n(45724),S=n(35448);function N(e){const t=new b;t.geometryType=S.bV[e.geometry_type.value];const n=[],i=[];for(let t=0;t<e.lengths.length;t++)n.push(e.lengths[t]);for(let t=0;t<e.coords.length;t++)i.push(e.coords[t]);return t.lengths=n,t.coords=i,t}function C(e){const t=new g;return t.name=e.name,t.alias=e.alias,t.fieldType=S.r5[e.field_type.value],t.sqlType=E[e.sql_type.value],t.domain=e.domain,t.defaultValue=e.default_value,t}function L(e){const t=C(e);return t.geometryType=S.bV[e.geometry_type.value],t}function k(e){const t=new y;t.quantizeOriginPosition=v[e.quantizeOriginPosition.value];const n=t.scale,i=e.scale;n.xScale=i.xScale,n.yScale=i.yScale,n.mScale=i.mScale,n.zScale=i.zScale;const r=t.translate,o=e.translate;return r.xTranslate=o.xTranslate,r.yTranslate=o.yTranslate,r.mTranslate=o.mTranslate,r.zTranslate=o.zTranslate,t}async function R(e,t){t??=!1;const n={generateAllSublayers:t,namedTypeDefinitions:new Map};return await async function(e){const t=await(0,r.A)(e,{responseType:"array-buffer"}),n=await t.data;return async function(e){const t=new((await(0,A.I)()).MapOfObjectIdentifierSetsDecoder),n=t.decode(new Uint8Array(e)),i=new Map;if(0!==n.error_code)throw new o.A("knowledge-graph:layer-support-utils",n.error_message);const r=t.get_map_of_identifier_sets(),s=r.keys,a=s.size();for(let e=0;e<a;e++){const t=s.get(e),n=r.query_identifier_set(t),a=[];if(n.id_array_type.value===x.GLOBALID_ARRAY){const e=n.get_globalid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_globalid_at(n))}else if(n.id_array_type.value===x.IDENTIFIER_ARRAY){const e=n.get_identifier_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_identifier_at(n).toString())}else if(n.id_array_type.value===x.STRING_ARRAY){const e=n.get_string_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_string_at(n))}else{if(n.id_array_type.value!==x.OID_ARRAY)throw new o.A("knowledge-graph:layer-support-utils","Tried to encode an unexpected ID Array type.");{const e=n.get_oid_array(),t=e.count();for(let n=0;n<t;n++)a.push(e.get_objectid_at(n).toString())}}i.set(t,a)}return t.delete(),i}(new Uint8Array(n))}(e).then(e=>{!function(e,t){for(const[n,i]of e){const e=(0,s.tE)(t.namedTypeDefinitions,n,()=>({useAllData:!1,members:new Map}));for(const t of i)e.members.has(t)||e.members.set(t,{id:t})}}(e,n)}),n}async function F(e){const t=await(0,A.I)(),n=new t.MapOfObjectIdentifierSets;!function(e,t,n){for(const[i,r]of n.namedTypeDefinitions){if(!r.members||r.useAllData)continue;const n=r.members.keys();let o=!1,s=!0;const a=new t.ObjectIdArray,l=new t.StringArray,u=new t.GlobalIdArray,d=new t.IdentifierArray,p=new t.ObjectIdentifierSet;for(const e of n)s&&(o=!isNaN(Number(e)),s=!1),o?a.add_objectid(Number(e)):(l.add_string(e),u.add_globalid(e)),d.add_identifier(e);p.set_oid_array(a),p.set_string_array(l),p.set_globalid_array(u),p.set_identifier_array(d),a.delete(),l.delete(),u.delete(),d.delete(),e.put_identifier_set(i,p),p.delete()}}(n,t,e);const i=new t.MapOfObjectIdentifierSetsEncoder;try{i.set_map_of_identifier_sets(n),i.encode();const e=i.get_encoding_result();if(0!==e.error.error_code)throw new o.A("knowledge-graph:layer-support-utils",e.error.error_message);const t=structuredClone(e.get_byte_buffer());return i.delete(),t}finally{n.delete()}}async function D(e){const t=await(0,r.A)(e,{responseType:"array-buffer"});return async function(e){const t=new((await(0,A.I)()).FeatureCollectionDecoder),n=t.decode(new Uint8Array(e));if(0!==n.error_code)throw new o.A("knowledge-graph:layer-support-utils",n.error_message);const i=function(e){const t=new u;t.version=e.version;const n=e.get_query_result();if(0!==n.results_type.value)throw new Error("Got a non-feature collection type");const i=n.get_feature_result(),r=t.queryResult.featureResult;r.objectIdFieldName=i.objectid_field_name,r.exceededTransferLimit=i.exceeded_transfer_limit,r.hasM=i.has_m,r.hasZ=i.has_z,r.geometryType=S.bV[i.geometry_type.value],r.globalIdFieldName=i.globalid_field_name,r.geohashFieldName=i.geohash_field_name;const o=r.uniqueIdField,s=i.unique_id_field;o.name=s.name,o.isSystemMaintained=s.isSystemMaintained;const a=r.geometryProperties,l=i.geometry_properties;a.shapeAreaFieldName=l.shapeAreaFieldName,a.shapeLengthFieldName=l.shapeLengthFieldName,a.units=l.units;const d=r.spatialReference,p=i.spatial_reference;d.wkid=p.wkid,d.latestWkid=p.latestWkid,d.vcsWkid=p.vcsWkid,d.latestVcsWkid=p.latestVcsWkid,d.wkt=p.wkt,r.transform=k(i.transform);const c=r.fields,h=r.fieldNameToAttributeIndexMap,y=i.fields,m=y.size();for(let e=0;e<m;e++){const t=y.get(e),n=C(t);c.push(n),h[n.name]=e,t.delete()}y.delete();const f=r.values,g=i.values_count();for(let e=0;e<g;e++)f.push(i.get_value_at(e));const b=r.features,I=i.features,T=I.size();if(T>0)for(const e of w)if(void 0===h[e])throw new Error(`Feature collection missing required attribute: ${e}`);for(let e=0;e<T;e++){const t=new _,n=I.get(e),i=t.attributes,r=n.attributes_count();for(let e=0;e<r;e++)i.push(n.get_attribute_at(e));const o=n.get_compressed_geometry();o&&(t.compressedGeometry=N(o),t.centroid=N(n.get_centroid()));const s=t.aggregateGeometries,a=n.aggregate_geometries,l=a.size();for(let e=0;e<l;e++){const t=a.get(e),n=N(t);s.push(n),t.delete()}a.delete(),b.push(t),n.delete()}I.delete();const M=r.geometryFields,v=i.geometry_fields,E=v.size();for(let e=0;e<E;e++){const t=v.get(e),n=L(t);M.push(n),t.delete()}return v.delete(),t}(t.get_feature_collection());return t.delete(),i}(await t.data)}function j(e,t){if(!e?.queryResult?.featureResult)return t;const n=e.queryResult.featureResult.fieldNameToAttributeIndexMap;for(const r of e.queryResult.featureResult.features){const e=r.attributes[n[i.TYPENAME]],o=(0,s.tE)(t.namedTypeDefinitions,e,()=>({useAllData:!1,members:new Map})),l=r.attributes[n[i.ELEMENTUID]];if(r.compressedGeometry?.coords?.length>0){let e=r.compressedGeometry.lengths;"esriGeometryPoint"===r.compressedGeometry.geometryType&&(e=[]),o.members.set(l,{id:l,linkChartLocation:new a.A(e,r.compressedGeometry.coords)})}else o.members.set(l,{id:l})}return t}!function(e){e[e.featureResult=0]="featureResult",e[e.countResult=1]="countResult",e[e.idsResult=2]="idsResult"}(M||(M={})),function(e){e[e.upperLeft=0]="upperLeft",e[e.lowerLeft=1]="lowerLeft"}(v||(v={})),function(e){e[e.sqlTypeBigInt=0]="sqlTypeBigInt",e[e.sqlTypeBinary=1]="sqlTypeBinary",e[e.sqlTypeBit=2]="sqlTypeBit",e[e.sqlTypeChar=3]="sqlTypeChar",e[e.sqlTypeDate=4]="sqlTypeDate",e[e.sqlTypeDecimal=5]="sqlTypeDecimal",e[e.sqlTypeDouble=6]="sqlTypeDouble",e[e.sqlTypeFloat=7]="sqlTypeFloat",e[e.sqlTypeGeometry=8]="sqlTypeGeometry",e[e.sqlTypeGUID=9]="sqlTypeGUID",e[e.sqlTypeInteger=10]="sqlTypeInteger",e[e.sqlTypeLongNVarchar=11]="sqlTypeLongNVarchar",e[e.sqlTypeLongVarbinary=12]="sqlTypeLongVarbinary",e[e.sqlTypeLongVarchar=13]="sqlTypeLongVarchar",e[e.sqlTypeNChar=14]="sqlTypeNChar",e[e.sqlTypeNVarChar=15]="sqlTypeNVarChar",e[e.sqlTypeOther=16]="sqlTypeOther",e[e.sqlTypeReal=17]="sqlTypeReal",e[e.sqlTypeSmallInt=18]="sqlTypeSmallInt",e[e.sqlTypeSqlXml=19]="sqlTypeSqlXml",e[e.sqlTypeTime=20]="sqlTypeTime",e[e.sqlTypeTimestamp=21]="sqlTypeTimestamp",e[e.sqlTypeTimestamp2=22]="sqlTypeTimestamp2",e[e.sqlTypeTinyInt=23]="sqlTypeTinyInt",e[e.sqlTypeVarbinary=24]="sqlTypeVarbinary",e[e.sqlTypeVarchar=25]="sqlTypeVarchar"}(E||(E={})),function(e){e[e.OID_ARRAY=0]="OID_ARRAY",e[e.GLOBALID_ARRAY=1]="GLOBALID_ARRAY",e[e.STRING_ARRAY=2]="STRING_ARRAY",e[e.IDENTIFIER_ARRAY=3]="IDENTIFIER_ARRAY"}(x||(x={}));const B={fetchAndConvertSerializedLinkChart:e=>async function(e){const t=[],n={generateAllSublayers:!1,namedTypeDefinitions:new Map};return e.entitiesUrl&&t.push(D(e.entitiesUrl).then(e=>{j(e,n)})),e.relationshipsUrl&&t.push(D(e.relationshipsUrl).then(e=>{j(e,n)})),await Promise.all(t),n}(e)}},69860:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(65864),r=n(90708),o=n(43334),s=n(15375);class a{constructor(){this._featureLookup=new Map}static getInstance(){return a.instance||(a.instance=new a),a.instance}static resetInstance(){a.instance&&(a.instance=null)}deleteFromStore(e){e.forEach(e=>{this._featureLookup.delete(e)})}readFromStoreByList(e){const t=[];return e.forEach(e=>{const n=this.readFromStoreById(e);n&&t.push(n)}),t}readFromStoreById(e){return this._featureLookup.get(e)??null}writeToStore(e,t,n){const a=[];return e.forEach(e=>{if(!e?.id)return;e.properties||(e.properties=[]);let l,u=null;if(n&&e.properties[n]&&(u=(0,r.Ux)(e.properties[n])),"originId"in e&&"destinationId"in e&&(e.properties[s.Cz]=e.originId,e.properties[s.KQ]=e.destinationId),e.properties[t]=e.id,e.id&&this._featureLookup.has(e.id)&&this._featureLookup.get(e.id).attributes){const r=this._featureLookup.get(e.id),s=JSON.parse(JSON.stringify(Object.assign(r.attributes,e.properties)));n&&e.properties[n]&&(s[n]=(0,i.rS)(e.properties[n])),l=new o.Om(u?JSON.parse(JSON.stringify(u)):r?.geometry?JSON.parse(JSON.stringify(r.geometry)):null,s,null,e.properties[t])}else l=new o.Om(u?JSON.parse(JSON.stringify(u)):null,e.properties,null,e.properties[t]);this._featureLookup.set(`${e.typeName?`${e.typeName}__${e.id}`:e.id}`,l),a.push(l)}),a}}},70643:(e,t,n)=>{n.d(t,{A:()=>ne});var i=n(90237),r=n(13874),o=n(4718),s=n(53966),a=n(92071),l=(n(29953),n(10107)),u=(n(44208),n(40608)),d=n(43937),p=n(35666),c=n(5443),h=n(86738),y=n(39829),m=n(82799),f=n(98988),g=n(16930),_=n(21325),b=n(50498),w=n(4146),I=n(83221),T=n(68298),M=n(64714),v=n(15375);n(87811);const E=(0,n(17036).p)(),x=e=>{let t=class extends e{constructor(){super(...arguments),this.fields=[],this.fieldsIndex=null}};return(0,i._)([(0,l.MZ)(E.fields)],t.prototype,"fields",void 0),(0,i._)([(0,l.MZ)(E.fieldsIndex)],t.prototype,"fieldsIndex",void 0),t=(0,i._)([(0,u.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayerBase")],t),t};var A=n(85342),S=n(63074),N=n(6455),C=n(87718),L=n(76294),k=n(32756),R=n(54310),F=n(25036),D=n(82935),j=n(10873),B=n(13213),O=n(20437),Z=n(30524),$=n(46499),G=n(39383),P=n(96184),q=n(96576),U=n(65494),Y=n(41214),z=n(22671),Q=n(61956),H=n(30291),X=n(37531),V=n(61322);function W(e){if(!e.json)return e;e.json.write=J(e.json.write);const t=e.json.origins;if(!t)return e;let n;for(n in t){const e=t[n];e&&(e.write=J(e.write))}return e}function J(e){return"object"==typeof e&&e?(!1!==e.enabled&&(e.overridePolicy=function(e){const{target:t,writer:n,overridePolicy:i,...r}=e;return function(e,t){const n=ee.call(this,e,t);return n.enabled?{...r,...n}:n}}(e)),e):!0===e?K():e}function K(){return{overridePolicy:ee}}function ee(e,t){const n=!!this.geometryType;let i={enabled:n};return n&&(i={...i,...te.call(this,e,t)}),i}function te(e,t){return{ignoreOrigin:this.originIdOf(t)>p.Gr.DEFAULTS}}let ne=class extends(x((0,N.FJ)((0,L.J)((0,C.F)((0,S.dM)((0,k.fY)((0,D.e)((0,F.j)((0,R.J)((0,a.P)(w.A))))))))))){constructor(e){super(e),this.blendMode="normal",this.capabilities=(0,M.f)(!1,!0),this.charts=null,this.definitionExpression=null,this.displayField="",this.displayFilterEnabled=!0,this.displayFilterInfo=null,this.effect=null,this.elevationInfo=null,this.featureEffect=null,this.graphType=null,this.labelsVisible=!0,this.layerType=null,this.legendEnabled=!0,this.maxScale=0,this.minScale=0,this.objectIdField=v.dr,this.objectType=null,this.opacity=1,this.orderBy=null,this.parent=null,this.parentCompositeLayer=null,this.persistenceEnabled=!0,this.popupEnabled=!0,this.popupTemplate=null,this.refreshInterval=0,this.source={openPorts:()=>this.load().then(()=>{const e=new MessageChannel;return new V.default(e.port1,{channel:e,client:{queryFeatures:(e,t={})=>{const n=Q.A.fromJSON(e);return this.queryFeaturesJSON(n,t)}}}),[e.port2]})},this.type="knowledge-graph-sublayer",this.useViewTime=!0,this.visible=!0}get userHasUpdateItemPrivileges(){return!!this.parent?.userHasUpdateItemPrivileges}get defaultPopupTemplate(){return this.createPopupTemplate()}set featureReduction(e){const t=this._normalizeFeatureReduction(e);this._set("featureReduction",t)}get fields(){const e=[];return this.objectType?.properties?.forEach(t=>{const n="esriFieldTypeOID"===t.fieldType?"esriFieldTypeInteger":t.fieldType;e.push(O.A.fromJSON({name:t.name,type:n,alias:t.alias,defaultValue:t.defaultValue,editable:t.editable,nullable:t.nullable}))}),e.push(O.A.fromJSON({name:this.objectIdField,type:"esriFieldTypeString",alias:this.objectIdField,editable:!1}),O.A.fromJSON({name:v.M1,type:"esriFieldTypeInteger",alias:v.M1,editable:!1}),O.A.fromJSON({name:v.BL,type:"esriFieldTypeInteger",alias:v.BL,editable:!1})),e}get geometryType(){if("link-chart"===this.parentCompositeLayer?.type)return"relationship"===this.graphType?"polyline":"point";const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.geometryType;return t&&"esriGeometryNull"!==t?b.gy.fromJSON(t):null}get geometryFieldName(){if("link-chart"===this.parentCompositeLayer?.type)return v.T1;const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name);return e?.name??null}get graphTypeName(){return this.objectType?.name}get hasM(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasM??!1}get hasZ(){const e=this.parentCompositeLayer?.dataManager.geographicLookup.get(this.objectType?.name),t=e?.name,n=t?this.objectType?.properties?.[t]:null;return n?.hasZ??!1}set labelingInfo(e){this._set("labelingInfo",e)}get labelingInfo(){if(this._isOverridden("labelingInfo"))return this._get("labelingInfo");if(!this.objectType||!this.parentCompositeLayer||!this.graphTypeName)return null;const e=this.objectType.properties?(0,A.MY)(this.objectType.properties):"ESRI__ID";return"link-chart"===this.parentCompositeLayer.type?(0,A.iW)(this.graphType,this.graphTypeName,e):(0,A.e$)(this.graphTypeName,this.geometryType,e)}set renderer(e){(0,Z.yp)(e,this.fieldsIndex),this._set("renderer",e)}get renderer(){if(this._isOverridden("renderer"))return this._get("renderer");const e=this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel,t=[...e?.entityTypes??[],...e?.relationshipTypes??[]].map(e=>e.name).indexOf(this.graphTypeName),n=(0,A.Td)(t);if("link-chart"===this.parentCompositeLayer?.type){if("relationship"===this.graphType)return new q.A({type:"simple",symbol:(0,A.UT)(n)});const e=(0,U.r)((0,M.F0)(b.gy.toJSON("point")).renderer);return(0,X.dt)(e.symbol,n),e}const i=(0,U.r)((0,M.F0)(b.gy.toJSON(this.geometryType)).renderer);return(0,X.dt)(i.symbol,n),i}get spatialReference(){return this.parentCompositeLayer?.dataManager?.knowledgeGraph?.dataModel?.spatialReference??g.A.WGS84}set timeInfo(e){this._set("timeInfo",e)}get title(){return this._isOverridden("title")?this._get("title"):this.graphTypeName}set title(e){this._set("title",e)}writeTitle(e,t){t.title=e??"Layer"}createPopupTemplate(e){return(0,H.tn)(this,e)}createQuery(){return new Q.A({where:"1=1",outFields:["*"]})}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){return null}async queryFeatures(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e),r=z.A.fromJSON(await i.executeQuery(n.toJSON(),t?.signal));return r.features.forEach(e=>{e.sourceLayer=this}),r}async queryFeaturesJSON(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return await i.executeQuery(n.toJSON(),t?.signal)}async queryFeatureCount(e,t){await this.load();const{resolvedQuery:n,queryEngine:i}=await this._setupQueryObjects(e);return i.executeQueryForCount(n.toJSON(),t?.signal)}async queryExtent(e={},t){await this.load();const n={...e,returnGeometry:!0},{resolvedQuery:i,queryEngine:r}=await this._setupQueryObjects(n),o=await r.executeQueryForExtent(i.toJSON(),t?.signal);let s;return s=null!=o.extent?.xmin&&null!=o.extent?.xmax&&null!=o.extent?.ymin&&null!=o.extent?.ymax?new c.A(o.extent):new c.A,{count:o.count,extent:s}}async queryObjectIds(e,t){await this.load();const n=Q.A.from(e);let i;if("link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)i=this._cachedQueryEngine;else{const e=await this.parentCompositeLayer.dataManager.getData(n,this,t);i=this.loadQueryEngine(e)}return await i.executeQueryForIds(n.toJSON(),t?.signal)}loadQueryEngine(e){const t=new I.A({geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ}),n=new T.do({fieldsIndex:this.fieldsIndex.toJSON(),geometryType:b.gy.toJSON(this.geometryType),hasM:this.hasM,hasZ:this.hasZ,featureIdInfo:{type:"object-id",fieldName:this.objectIdField},spatialReference:this.spatialReference.toJSON(),timeInfo:this.timeInfo?.toJSON(),featureStore:t});return n.featureStore.addMany(e),n}async refreshCachedQueryEngine(){const e=await this.parentCompositeLayer.dataManager.getData(new Q.A({where:"1=1",outFields:[v.dr]}),this);this._cachedQueryEngine=this.loadQueryEngine(e)}load(e){return this.addResolvingPromise(this.parent.load(e).then(()=>(0,Z.sv)(this.timeInfo,this.fieldsIndex))),Promise.resolve(this)}async _setupQueryObjects(e,t){const n=Q.A.from(e),i=n.geometry;if(i&&!i.spatialReference?.isWGS84&&(await(0,f.initializeProjection)(i.spatialReference,_.KK),n.geometry=(0,f.project)(i instanceof y.A||i instanceof m.A||i instanceof h.A?i:i.extent,_.KK)),"link-chart"===this.parentCompositeLayer.type&&this._cachedQueryEngine)return{resolvedQuery:n,queryEngine:this._cachedQueryEngine};const r=await this.parentCompositeLayer.dataManager.getData(n,this,t);return{resolvedQuery:n,queryEngine:this.loadQueryEngine(r)}}};(0,i._)([(0,l.MZ)(W((0,o.o8)(S.sU)))],ne.prototype,"blendMode",void 0),(0,i._)([(0,l.MZ)()],ne.prototype,"capabilities",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],ne.prototype,"userHasUpdateItemPrivileges",null),(0,i._)([(0,l.MZ)({json:{origins:{"web-scene":{write:!1}},write:K()}})],ne.prototype,"charts",void 0),(0,i._)([(0,l.MZ)({readOnly:!0})],ne.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.MZ)({type:String,json:{origins:{service:{read:!1}},name:"layerDefinition.definitionExpression",write:{ignoreOrigin:!0}}})],ne.prototype,"definitionExpression",void 0),(0,i._)([(0,l.MZ)()],ne.prototype,"displayField",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(N.Dp)))],ne.prototype,"displayFilterEnabled",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(N.KV)))],ne.prototype,"displayFilterInfo",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(S.LF)))],ne.prototype,"effect",void 0),(0,i._)([(0,l.MZ)()],ne.prototype,"elevationInfo",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(C.Y)))],ne.prototype,"featureEffect",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(B.d)))],ne.prototype,"featureReduction",null),(0,i._)([(0,l.MZ)()],ne.prototype,"fields",null),(0,i._)([(0,l.MZ)()],ne.prototype,"geometryType",null),(0,i._)([(0,l.MZ)()],ne.prototype,"geometryFieldName",null),(0,i._)([(0,l.MZ)({type:["entity","relationship"],nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ne.prototype,"graphType",void 0),(0,i._)([(0,l.MZ)({type:String,nonNullable:!0,json:{write:{isRequired:!0,ignoreOrigin:!0}}})],ne.prototype,"graphTypeName",null),(0,i._)([(0,l.MZ)()],ne.prototype,"hasM",null),(0,i._)([(0,l.MZ)()],ne.prototype,"hasZ",null),(0,i._)([(0,l.MZ)({type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}},write:{ignoreOrigin:!0}}})],ne.prototype,"id",void 0),(0,i._)([(0,l.MZ)({type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",default:!1,write:{overridePolicy(){return{enabled:!!this.geometryType,alwaysWriteDefaults:!0,ignoreOrigin:!0}}}}})],ne.prototype,"labelsVisible",void 0),(0,i._)([(0,l.MZ)({type:[$.A],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:function(e,t,n){const i=[["ESRI__AGGREGATION_COUNT",v.M1],["ESRI__ORIGIN_ID",v.Cz],["ESRI__DESTINATION_ID",v.KQ],["ESRI__LAYOUT_GEOMETRY",v.T1]];try{for(const t of e)for(const[e,n]of i)t.labelExpression=t.labelExpression?.replaceAll(e,n),t.labelExpressionInfo?.expression&&(t.labelExpressionInfo.expression=t.labelExpressionInfo.expression.replaceAll(e,n))}catch(e){s.A.getLogger(this).warn("Error updating labelingInfo",e)}return(0,G.w)(e,t,n)},write:K()}})],ne.prototype,"labelingInfo",null),(0,i._)([(0,l.MZ)({readOnly:!0,json:{read:!1,write:{writer(e,t){switch(this.parentCompositeLayer?.type){case"link-chart":t.layerType="LinkChartSubLayer";break;case"knowledge-graph":t.layerType=this.geometryType?"KnowledgeGraphSubLayer":"KnowledgeGraphSubTable"}},isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ne.prototype,"layerType",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(j.fV)))],ne.prototype,"legendEnabled",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(j.hG)))],ne.prototype,"maxScale",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(j.hn)))],ne.prototype,"minScale",void 0),(0,i._)([(0,l.MZ)()],ne.prototype,"objectIdField",void 0),(0,i._)([(0,l.MZ)()],ne.prototype,"objectType",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(j.ke)))],ne.prototype,"opacity",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(k.ne)))],ne.prototype,"orderBy",void 0),(0,i._)([(0,l.MZ)({clonable:!1})],ne.prototype,"parent",void 0),(0,i._)([(0,l.MZ)()],ne.prototype,"parentCompositeLayer",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(j.M6)))],ne.prototype,"popupEnabled",void 0),(0,i._)([(0,l.MZ)({type:r.A,json:{name:"popupInfo",write:{ignoreOrigin:!0}}})],ne.prototype,"popupTemplate",void 0),(0,i._)([(0,l.MZ)({type:Number,json:{write:{overridePolicy:te}}})],ne.prototype,"refreshInterval",void 0),(0,i._)([(0,l.MZ)({types:Y.Hg,json:{name:"layerDefinition.drawingInfo.renderer",write:K()}})],ne.prototype,"renderer",null),(0,i._)([(0,l.MZ)()],ne.prototype,"source",void 0),(0,i._)([(0,l.MZ)()],ne.prototype,"spatialReference",null),(0,i._)([(0,l.MZ)({type:P.A,json:{name:"layerDefinition.timeInfo",write:!0,origins:{"web-document":{name:"layerDefinition.timeInfo",read:!0,write:!0},"portal-item":{name:"layerDefinition.timeInfo",read:!0,write:!0}}}})],ne.prototype,"timeInfo",null),(0,i._)([(0,l.MZ)({type:String,json:{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],ne.prototype,"title",null),(0,i._)([(0,d.K)("title")],ne.prototype,"writeTitle",null),(0,i._)([(0,l.MZ)({json:{read:!1}})],ne.prototype,"type",void 0),(0,i._)([(0,l.MZ)(W((0,o.o8)(D.B)))],ne.prototype,"useViewTime",void 0),(0,i._)([(0,l.MZ)({type:Boolean,json:{name:"visibility",write:K()}})],ne.prototype,"visible",void 0),ne=(0,i._)([(0,u.$)("esri.layers.knowledgeGraph.KnowledgeGraphSublayer")],ne)},73133:(e,t,n)=>{n.d(t,{j:()=>i});const i=(0,n(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},75503:(e,t,n)=>{n.d(t,{E:()=>E,w:()=>a});var i=n(4576),r=n(21818),o=(n(44208),n(3694)),s=n(11006);class a{constructor(e=9,t){this._compareMinX=c,this._compareMinY=h,this._toBBox=e=>e,this._maxEntries=Math.max(4,e||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),t&&("function"==typeof t?this._toBBox=t:this._initFormat(t)),this.clear()}destroy(){this.clear(),I.prune(),T.prune(),M.prune(),v.prune()}all(e){l(this._data,e)}search(e,t){let n=this._data;const i=this._toBBox;if(b(e,n))for(I.clear();n;){for(let r=0,o=n.children.length;r<o;r++){const o=n.children[r],s=n.leaf?i(o):o;b(e,s)&&(n.leaf?t(o):_(e,s)?l(o,t):I.push(o))}n=I.pop()}}collides(e){let t=this._data;const n=this._toBBox;if(!b(e,t))return!1;for(I.clear();t;){for(let i=0,r=t.children.length;i<r;i++){const r=t.children[i],o=t.leaf?n(r):r;if(b(e,o)){if(t.leaf||_(e,o))return!0;I.push(r)}}t=I.pop()}return!1}load(e){if(!e.length)return this;if(e.length<this._minEntries){for(let t=0,n=e.length;t<n;t++)this.insert(e[t]);return this}let t=this._build(e.slice(),0,e.length-1,0);if(this._data.children.length)if(this._data.height===t.height)this._splitRoot(this._data,t);else{if(this._data.height<t.height){const e=this._data;this._data=t,t=e}this._insert(t,this._data.height-t.height-1,!0)}else this._data=t;return this}insert(e){return e&&this._insert(e,this._data.height-1),this}clear(){return this._data=new A([]),this}remove(e){if(!e)return this;let t,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(e);for(M.clear(),v.clear();n||M.length>0;){if(n||(n=M.pop(),o=M.data[M.length-1],s=v.pop()??0,a=!0),n.leaf&&(t=(0,i.qh)(n.children,(0,r.zI)(e),n.children.length,n.indexHint),-1!==t))return n.children.splice(t,1),M.push(n),this._condense(M),this;a||n.leaf||!_(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(M.push(n),v.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(e){return this._data=e,this}_build(e,t,n,i){const r=n-t+1;let o=this._maxEntries;if(r<=o){const i=new A(e.slice(t,n+1));return u(i,this._toBBox),i}i||(i=Math.ceil(Math.log(r)/Math.log(o)),o=Math.ceil(r/o**(i-1)));const s=new S([]);s.height=i;const a=Math.ceil(r/o),l=a*Math.ceil(Math.sqrt(o));w(e,t,n,l,this._compareMinX);for(let r=t;r<=n;r+=l){const t=Math.min(r+l-1,n);w(e,r,t,a,this._compareMinY);for(let n=r;n<=t;n+=a){const r=Math.min(n+a-1,t);s.children.push(this._build(e,n,r,i-1))}}return u(s,this._toBBox),s}_insert(e,t,n){const i=this._toBBox,r=n?e:i(e);M.clear();const o=function(e,t,n,i){for(;i.push(t),!0!==t.leaf&&i.length-1!==n;){let n,i=1/0,r=1/0;for(let o=0,s=t.children.length;o<s;o++){const s=t.children[o],a=y(s),l=f(e,s)-a;l<r?(r=l,i=a<i?a:i,n=s):l===r&&a<i&&(i=a,n=s)}t=n||t.children[0]}return t}(r,this._data,t,M);for(o.children.push(e),p(o,r);t>=0&&M.data[t].children.length>this._maxEntries;)this._split(M,t),t--;!function(e,t,n){for(let i=n;i>=0;i--)p(t.data[i],e)}(r,M,t)}_split(e,t){const n=e.data[t],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);const o=this._chooseSplitIndex(n,r,i);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new A(s):new S(s);a.height=n.height,u(n,this._toBBox),u(a,this._toBBox),t?e.data[t-1].children.push(a):this._splitRoot(n,a)}_splitRoot(e,t){this._data=new S([e,t]),this._data.height=e.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(e,t,n){let i,r,o;i=r=1/0;for(let s=t;s<=n-t;s++){const t=d(e,0,s,this._toBBox),a=d(e,s,n,this._toBBox),l=g(t,a),u=y(t)+y(a);l<i?(i=l,o=s,r=u<r?u:r):l===i&&u<r&&(r=u,o=s)}return o}_chooseSplitAxis(e,t,n){const i=e.leaf?this._compareMinX:c,r=e.leaf?this._compareMinY:h;this._allDistMargin(e,t,n,i)<this._allDistMargin(e,t,n,r)&&e.children.sort(i)}_allDistMargin(e,t,n,i){e.children.sort(i);const r=this._toBBox,o=d(e,0,t,r),s=d(e,n-t,n,r);let a=m(o)+m(s);for(let i=t;i<n-t;i++){const t=e.children[i];p(o,e.leaf?r(t):t),a+=m(o)}for(let i=n-t-1;i>=t;i--){const t=e.children[i];p(s,e.leaf?r(t):t),a+=m(s)}return a}_condense(e){for(let t=e.length-1;t>=0;t--){const n=e.data[t];if(0===n.children.length)if(t>0){const r=e.data[t-1],o=r.children;o.splice((0,i.qh)(o,n,o.length,r.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(e){const t=["return a"," - b",";"];this._compareMinX=new Function("a","b",t.join(e[0])),this._compareMinY=new Function("a","b",t.join(e[1])),this._toBBox=new Function("a","return {minX: a"+e[0]+", minY: a"+e[1]+", maxX: a"+e[2]+", maxY: a"+e[3]+"};")}}function l(e,t){let n=e;for(T.clear();n;){if(!0===n.leaf)for(const e of n.children)t((0,r.zI)(e));else T.pushArray(n.children);n=T.pop()??null}}function u(e,t){d(e,0,e.children.length,t,e)}function d(e,t,n,i,r){r||(r=new A([])),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(let o,s=t;s<n;s++)o=e.children[s],p(r,e.leaf?i(o):o);return r}function p(e,t){e.minX=Math.min(e.minX,t.minX),e.minY=Math.min(e.minY,t.minY),e.maxX=Math.max(e.maxX,t.maxX),e.maxY=Math.max(e.maxY,t.maxY)}function c(e,t){return e.minX-t.minX}function h(e,t){return e.minY-t.minY}function y(e){return(e.maxX-e.minX)*(e.maxY-e.minY)}function m(e){return e.maxX-e.minX+(e.maxY-e.minY)}function f(e,t){return(Math.max(t.maxX,e.maxX)-Math.min(t.minX,e.minX))*(Math.max(t.maxY,e.maxY)-Math.min(t.minY,e.minY))}function g(e,t){const n=Math.max(e.minX,t.minX),i=Math.max(e.minY,t.minY),r=Math.min(e.maxX,t.maxX),o=Math.min(e.maxY,t.maxY);return Math.max(0,r-n)*Math.max(0,o-i)}function _(e,t){return e.minX<=t.minX&&e.minY<=t.minY&&t.maxX<=e.maxX&&t.maxY<=e.maxY}function b(e,t){return t.minX<=e.maxX&&t.minY<=e.maxY&&t.maxX>=e.minX&&t.maxY>=e.minY}function w(e,t,n,i,r){const o=[t,n];for(;o.length;){const t=o.pop(),n=o.pop();if(t-n<=i)continue;const a=n+Math.ceil((t-n)/i/2)*i;(0,s.q)(e,a,n,t,r),o.push(n,a,a,t)}}const I=new o.A,T=new o.A,M=new o.A,v=new o.A({deallocator:void 0});class E{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class x extends E{constructor(){super(...arguments),this.height=1,this.indexHint=new i.vW}}class A extends x{constructor(e){super(),this.children=e,this.leaf=!0}}class S extends x{constructor(e){super(),this.children=e,this.leaf=!1}}},77901:(e,t,n)=>{n.d(t,{A:()=>a});var i=n(90237),r=n(25482),o=n(10107),s=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.A{constructor(e){super(e),this.properties=null}};(0,i._)([(0,o.MZ)({json:{write:!0}})],a.prototype,"properties",void 0),a=(0,i._)([(0,s.$)("esri.rest.knowledgeGraph.GraphObject")],a)},80340:(e,t,n)=>{n.d(t,{P:()=>T});var i=n(90237),r=n(69622),o=n(49186),s=n(53966),a=n(91869),l=n(74887),u=n(39516),d=n(10107),p=(n(44208),n(87811),n(40608)),c=n(5443),h=n(39829),y=n(98988),m=n(21325),f=n(15375),g=n(69860),_=n(30504),b=n(8916),w=n(42538),I=n(61956);let T=class extends r.A{constructor(e){super(e),this._processingCacheUpdatesLookup=new Map,this.knowledgeGraph=null,this.inclusionModeDefinition={generateAllSublayers:!0,namedTypeDefinitions:new Map},this.entityTypeNames=new Set,this.relationshipTypeNames=new Set,this.geographicLookup=new Map,this.sublayerCaches=new Map,this.nodeConnectionsLookup=new Map,this.relationshipConnectionsLookup=new Map,this.memberIdTypeLookup=new Map;const t=new Map;e.knowledgeGraph.dataModel.entityTypes?.forEach(n=>{n.name&&(t.set(n.name,"entity"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.entityTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.knowledgeGraph.dataModel.relationshipTypes?.forEach(n=>{n.name&&(t.set(n.name,"relationship"),this._processingCacheUpdatesLookup.set(n.name,[]),e.inclusionModeDefinition&&!e.inclusionModeDefinition?.generateAllSublayers||this.relationshipTypeNames.add(n.name),n.properties?.forEach(e=>{e.geometryType&&"esriGeometryNull"!==e.geometryType&&this.geographicLookup.set(n.name,{name:e.name??"",geometryType:e.geometryType})}))}),e.inclusionModeDefinition?.namedTypeDefinitions.forEach((n,i)=>{if("entity"===t.get(i))this.entityTypeNames.add(i);else{if("relationship"!==t.get(i))return s.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void e.inclusionModeDefinition?.namedTypeDefinitions.delete(i);this.relationshipTypeNames.add(i)}const r=new Map;n.members?.forEach(e=>{(0,a.tE)(this.memberIdTypeLookup,e.id,()=>new Set).add(i);const t=this.getById(e.id);t&&r.set(e.id,t)}),this.sublayerCaches.set(i,r)})}addToLayer(e){e.forEach(({typeName:e,id:t})=>{if(!this.inclusionModeDefinition)throw new o.A("knowledge-graph:layer-data-manager","You cannot add to a layer's exclusion list if it was not created with an exclusion list originally");if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){if(this.inclusionModeDefinition.namedTypeDefinitions.has(e)){const n=this.inclusionModeDefinition.namedTypeDefinitions.get(e);n.members||(n.members=new Map),n.members.set(t,{id:t}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}}else{const n=new Map;n.set(t,{id:t}),this.inclusionModeDefinition.namedTypeDefinitions.set(e,{useAllData:!1,members:n}),(0,a.tE)(this.memberIdTypeLookup,t,()=>new Set).add(e)}})}getById(e){return g.A.getInstance().readFromStoreById(e)}async getData(e,t,n){if(t.objectType.name&&this.inclusionModeDefinition?.namedTypeDefinitions&&this.inclusionModeDefinition.namedTypeDefinitions.size>0&&!this.inclusionModeDefinition.namedTypeDefinitions.has(t.objectType.name))return[];let i;if(i=e||new I.A({where:"1=1",outFields:["*"]}),"link-chart"===t.parentCompositeLayer.type){const e=t.parentCompositeLayer,n=this._processingCacheUpdatesLookup.get(t.objectType.name??""),r=i.outFields;r&&1===r.length&&r[0]===f.dr&&"1=1"===i.where||await Promise.all(n??[]);const o=this.sublayerCaches.has(t.objectType.name??"")?Array.from(this.sublayerCaches.get(t.objectType.name)?.values()):[],s=[];return o.forEach(n=>{if(this.relationshipTypeNames.has(t.objectType.name)){n.geometry=e.relationshipLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.memberIdTypeLookup.get(n.attributes[f.Cz]),r=this.memberIdTypeLookup.get(n.attributes[f.KQ]),o=this._isEndEntitySpatial(i,n,f.Cz),s=this._isEndEntitySpatial(r,n,f.KQ);n.attributes[f.BL]=Number(o&&s)}else{n.geometry=e.entityLinkChartDiagramLookup.get(n.attributes[t.objectIdField]);const i=this.geographicLookup.get(t.objectType.name);i&&n.attributes[i.name]?n.attributes[f.BL]=1:n.attributes[f.BL]=0}n.attributes[f.T1]=n.geometry,s.push(n)}),s}return this.retrieveDataFromService(i,t,n)}async getConnectedRecordIds(e,t,n){const i=[];let r="";const o=this._getNamedTypeIdMapFromNodeIds(e);if(t&&0!==t?.length){for(const e of t)r=r+e+"|";r=r.slice(0,-1)}const s={},a=[];for(const[e,n]of o){const i=`${e}_ids`;s[i]=n,t&&0!==t?.length?a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r:${r}]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`):a.push(`MATCH (n:${e}) WHERE id(n) IN $${i} WITH n MATCH (n)-[r]-(m) RETURN id(r), type(r), id(m), labels(m)[0]`)}if(!a.length)return i;const l=a.join(" UNION "),u=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:l,bindParameters:s}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];i.push({id:n[0],typeName:n[1]}),i.push({id:n[2],typeName:n[3]})}}return i}async getRelationshipsBetweenNodes(e,t,n){const i=this._getNamedTypeIdMapFromNodeIds(e);if(0===i.size)return[];const r={relationshipExclusionIds:t,possibleConnectionEntityIds:e},o=[];for(const[e,t]of i.entries()){const n=`${e}_ids`;r[n]=t,o.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]->(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const s=o.join(" UNION "),a=[],l=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:s,bindParameters:r}),{signal:n?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await l.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];a.push({id:n[0],typeName:n[1]})}}return a}async getRelationshipsFromNodes(e,t,n,i){const r=this._getNamedTypeIdMapFromNodeIds(e);if(0===r.size||0===t.length)return[];const o={relationshipExclusionIds:n,possibleConnectionEntityIds:t},s=[];for(const[e,t]of r.entries()){const n=`${e}_ids`;o[n]=t,s.push(`MATCH (n:${e}) WHERE id(n) IN $${n} WITH n MATCH (n)-[r]-(m) WHERE id(m) IN $possibleConnectionEntityIds AND NOT id(r) IN $relationshipExclusionIds RETURN id(r), type(r)`)}const a=s.join(" UNION "),l=new Map,u=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,new w.A({openCypherQuery:a,bindParameters:o}),{signal:i?.signal})).resultRowsStream.getReader();for(;;){const{done:e,value:t}=await u.read();if(e)break;for(let e=0;e<t.length;e++){const n=t[e];let i=l.get(n[1]);i||(i=new Set,l.set(n[1],i)),i.add(n[0])}}const d=[];for(const[e,t]of l)for(const n of t)d.push({id:n,typeName:e});return d}async refreshCacheContent(e,t,n,i=!0,r){const s=g.A.getInstance(),u=[],d=new Map,p=new Map;this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&p.set(e.name,e)}),this.knowledgeGraph.dataModel.relationshipTypes?.forEach(e=>{e.name&&p.set(e.name,e)}),e||this.inclusionModeDefinition?e?e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const t of this.memberIdTypeLookup.get(e))d.has(t)?d.get(t)?.push(e):d.set(t,[e])}):this.inclusionModeDefinition?.namedTypeDefinitions?.forEach((e,t)=>{e.useAllData?d.set(t,null):e.members&&e.members.forEach(e=>{d.has(t)&&null!==d.get(t)?d.get(t)?.push(e.id):d.set(t,[e.id])})}):(this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}),this.knowledgeGraph.dataModel.entityTypes?.forEach(e=>{e.name&&d.set(e.name,null)}));for(const[e,l]of d){const d=new Set(l),c=new Promise((u,c)=>{(async()=>{const u=new Set,c=[];let h,y="",m=!1;if(t||p.get(e)?.properties?.forEach(e=>{e.name&&u.add(e.name)}),n&&this.geographicLookup.has(e)){const t=this.geographicLookup.get(e)?.name;t&&u.add(t)}if(this.entityTypeNames.has(e))y=`MATCH (n:${e}) ${l?"WHERE id(n) IN $ids ":""}return ID(n)`,u.forEach(e=>{y+=`, n.${e}`,c.push(e)});else{if(!this.relationshipTypeNames.has(e))throw new o.A("knowledge-graph:layer-data-manager",`The graph type of ${e} could not be determined. Was this type set in the KG data model and inclusion definition?`);m=!0,y=`MATCH ()-[n:${e}]->() ${l?"WHERE id(n) IN $ids ":""}return ID(n), id(startNode(n)), id(endNode(n))`,u.forEach(e=>{y+=`, n.${e}`,c.push(e)})}h=new w.A(l?{openCypherQuery:y,bindParameters:{ids:l}}:{openCypherQuery:y});const g=(await(0,b.executeQueryStreaming)(this.knowledgeGraph,h,{signal:r?.signal})).resultRowsStream.getReader();for(;;){const{done:t,value:n}=await g.read();if(t)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,o=0;const s={properties:{}};for(s.id=t[i],i++,o++,m&&(s.originId=t[i],i++,o++,s.destinationId=t[i],i++,o++,(0,a.tE)(this.nodeConnectionsLookup,s.originId,()=>new Set).add(s.id),(0,a.tE)(this.nodeConnectionsLookup,s.destinationId,()=>new Set).add(s.id),(0,a.tE)(this.relationshipConnectionsLookup,s.id,()=>[s.originId,s.destinationId]));i<t.length;i++)s.properties[c[i-o]]=t[i];d.delete(s.id),r.push(s)}const o=s.writeToStore(r,f.dr,this.geographicLookup.get(e)?.name);this.sublayerCaches.has(e)||this.sublayerCaches.set(e,new Map),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.has(e)&&this.inclusionModeDefinition?.namedTypeDefinitions.set(e,{useAllData:!1,members:new Map}),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members&&(this.inclusionModeDefinition.namedTypeDefinitions.get(e).members=new Map);const l=this.sublayerCaches.get(e);o.forEach(t=>{l?.set(t.attributes[f.dr],t),i&&!this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.has(t.attributes[f.dr])&&(this.inclusionModeDefinition?.namedTypeDefinitions.get(e).members.set(t.attributes[f.dr],{id:t.attributes[f.dr]}),(0,a.tE)(this.memberIdTypeLookup,t.attributes[f.dr],()=>new Set).add(e))})}const _=this.inclusionModeDefinition?.namedTypeDefinitions.get(e);if(_)for(const e of d)_.members?.delete(e)})().then(()=>{u(null)}).catch(e=>{"AbortError"===e.name?u(null):c(e)})});u.push(c),this._processingCacheUpdatesLookup.get(e)?.push(c)}if(await Promise.all(u),r?.signal?.aborted)throw(0,l.NK)()}removeFromLayer(e){const t=new Set,n=new Set(e.map(e=>e.id));for(const n of e)t.add(n.typeName),1===this.memberIdTypeLookup.get(n.id)?.size?this.memberIdTypeLookup.delete(n.id):this.memberIdTypeLookup.get(n.id)?.delete(n.typeName),this.inclusionModeDefinition?.namedTypeDefinitions.forEach((e,t)=>{t===n.typeName&&e.members?.has(n.id)&&e.members.delete(n.id)});t.forEach(e=>{this.sublayerCaches.get(e)?.forEach((t,i)=>{n.has(i)&&this.sublayerCaches.get(e)?.delete(i)})})}async retrieveDataFromService(e,t,n){const i=g.A.getInstance(),r=new Set,s=[];let a,l="",d=[];const p="relationship"===t.graphType,I=this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData,T=t.parentCompositeLayer.sublayerIdsCache.get(t.objectType.name);let M=!I&&T?Array.from(T).sort():null;if(this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData)this.inclusionModeDefinition?.namedTypeDefinitions?.get(t.objectType.name)?.useAllData&&null!=e.objectIds&&(M=e.objectIds);else if(null!=e.objectIds&&M&&M.length>0){const t=e.objectIds;e.objectIds=M.filter(e=>t.includes(e))}else if(null!=e.objectIds)M=e.objectIds;else{if(this.inclusionModeDefinition?.namedTypeDefinitions.has(t.objectType.name)&&(!this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members||this.inclusionModeDefinition.namedTypeDefinitions.get(t.objectType.name)?.members?.size<1))return e.objectIds=[],[];e.objectIds=M}if(null!=e.outFields){const n=e.outFields;n.includes("*")?t.fields.forEach(e=>{r.add(e.name)}):n.forEach(e=>{e!==f.dr&&e!==t.geometryFieldName&&r.add(e)})}if(null!=e.geometry){const n=e.geometry;let i;const d=t.parentCompositeLayer.dataManager.knowledgeGraph.serviceDefinition,f=d?.spatialReference,g=d?.serviceCapabilities?.geometryCapabilities;let b=g?.geometryMaxBoundingRectangleSizeX,I=g?.geometryMaxBoundingRectangleSizeY;if("point"===n.type){let e=n;e.spatialReference?.isWGS84||(await(0,y.initializeProjection)(e.spatialReference,m.KK),e=(0,y.project)(e,m.KK)),i=new c.A({spatialReference:m.KK,xmin:e.x-1e-4,ymin:e.y-1e-4,xmax:e.x+1e-4,ymax:e.y+1e-4})}else n?.extent?.spatialReference&&!n.spatialReference?.isWGS84?(await(0,y.initializeProjection)(n.extent.spatialReference,m.KK),i=(0,y.project)(n.extent,m.KK)):i=n.extent;if(b&&I&&f){if(4326!==f.wkid){const e=new c.A({spatialReference:f,xmax:b,ymax:I}),t=(0,y.project)(e,m.KK);b=t.xmax,I=t.ymax}if(i.xmax-i.xmin>b)throw new o.A("knowledge-graph:layer-data-manager",`Extent x bounds should be within ${b}° latitude, limit exceeded`);if(i.ymax-i.ymin>I)throw new o.A("knowledge-graph:layer-data-manager",`Extent y bounds should be within ${I}° longitude, limit exceeded`)}if(null!=e.where&&"1=1"!==e.where){const n=await(0,u.GP)(e.where.toUpperCase(),t.fieldsIndex);t.fields.forEach(e=>{n.fieldNames.includes(e.name)&&r.add(e.name)})}l=p?`Match ()-[n:${t.objectType.name}]->() WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n), id(startNode(r)), id(endNode(r))`:`Match (n:${t.objectType.name}) WHERE esri.graph.ST_Intersects($param_filter_geom, n.${t.geometryFieldName}) return ID(n)`,t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{l+=`, n.${e}`,s.push(e)}),a=new w.A({openCypherQuery:l,bindParameters:{param_filter_geom:new h.A({rings:(0,_.Wq)(i)})}})}else{let n="";if(null!=e.where&&"1=1"!==e.where){const i=await(0,u.GP)(e.where,t.fieldsIndex);t.fields.forEach(e=>{i.fieldNames.includes(e.name)&&r.add(e.name)});const o=new Set(["column-reference","string","number","binary-expression"]),s=new Set(["=","<","<=","<>",">",">=","AND","OR","LIKE"]);let a=!1;const l=e=>{if("column-reference"===e.type)return`n.${e.column}`;if("string"===e.type)return`'${e.value}'`;if("number"===e.type)return`${e.value}`;if("binary-expression"===e.type&&o.has(e.left.type)&&o.has(e.right.type)&&s.has(e.operator))return`${l(e.left)} ${e.operator} ${l(e.right)}`;if("binary-expression"===e.type&&"LIKE"===e.operator){let t="";if("function"===e.left.type&&"column-reference"===e.left.args.value[0].type)t+=`lower(n.${e.left.args.value[0].column})`;else{if("column-reference"!==e.left.type)return a=!0,"";t+=`lower(n.${e.left.column})`}if(t+=" CONTAINS (","string"!==e.right.type)return a=!0,"";{let n=e.right.value;"%"===n.charAt(0)&&(n=n.slice(1)),"%"===n.charAt(n.length-1)&&(n=n.slice(0,-1)),t+=`'${n.toLowerCase()}')`}return t}return a=!0,""};n=l(i.parseTree),a&&(n="")}let i="";i=p?`Match ()-[n:${t.objectType.name}]->()`:`Match (n:${t.objectType.name})`;let o=!1;M&&(o=!0,i+=" WHERE ID(n) IN $ids"),n&&(i+=o?" AND":" WHERE",i+=` ${n}`),i+=" return ID(n)",p&&(i+=", id(startNode(n)), id(endNode(n))"),e.returnGeometry&&t.geometryFieldName&&r.add(t.geometryFieldName),r.forEach(e=>{i+=`, n.${e}`,s.push(e)}),a=new w.A(M?{openCypherQuery:i,bindParameters:{ids:M}}:{openCypherQuery:i})}const v=(await(0,b.executeQueryStreaming)(t.parentCompositeLayer.dataManager.knowledgeGraph,a,n)).resultRowsStream.getReader();for(;;){const{done:e,value:n}=await v.read();if(e)break;const r=[];for(let e=0;e<n.length;e++){const t=n[e];let i=0,o=0;const a={properties:{}};for(a.id=t[i],i++,o++,p&&(a.originId=t[i],i++,o++,a.destinationId=t[i],i++,o++);i<t.length;i++)a.properties[s[i-o]]=t[i];r.push(a)}d=d.concat(i.writeToStore(r,f.dr,t.parentCompositeLayer.dataManager.geographicLookup.get(t.objectType.name)?.name))}return d}_isEndEntitySpatial(e,t,n){for(const i of e??[])if(this.entityTypeNames.has(i)){const e=this.geographicLookup.get(i),r=e&&this.sublayerCaches.get(i)?.get(t.attributes[n]);if(e&&r?.attributes[e.name])return!0}return!1}_getNamedTypeIdMapFromNodeIds(e){const t=new Map;return e.forEach(e=>{if(this.memberIdTypeLookup.has(e))for(const n of this.memberIdTypeLookup.get(e)){if(!this.entityTypeNames.has(n))return;t.has(n)?t.get(n)?.push(e):t.set(n,[e])}}),t}};(0,i._)([(0,d.MZ)()],T.prototype,"knowledgeGraph",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"inclusionModeDefinition",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"entityTypeNames",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"relationshipTypeNames",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"geographicLookup",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"sublayerCaches",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"nodeConnectionsLookup",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"relationshipConnectionsLookup",void 0),(0,i._)([(0,d.MZ)()],T.prototype,"memberIdTypeLookup",void 0),T=(0,i._)([(0,p.$)("esri.layers.knowledgeGraph.KnowledgeGraphLayerDataManager")],T)},82935:(e,t,n)=>{n.d(t,{B:()=>h,e:()=>y});var i=n(90237),r=n(10107),o=(n(44208),n(53966),n(87811),n(36005)),s=n(40608),a=n(89317),l=n(30524),u=n(96184),d=n(73133),p=n(64272),c=n(26253);const h={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:a.K}}},y=e=>{let t=class extends e{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const n=t.timeInfo.exportOptions;if(!n)return null;const i=n.timeOffset,r=d.j.fromJSON(n.timeOffsetUnits);return i&&r?new c.T({value:i,unit:r}):null}set timeInfo(e){(0,l.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,i._)([(0,r.MZ)({type:p.T,json:{write:!1}})],t.prototype,"timeExtent",void 0),(0,i._)([(0,r.MZ)({type:c.T})],t.prototype,"timeOffset",void 0),(0,i._)([(0,o.w)("service","timeOffset",["timeInfo.exportOptions"])],t.prototype,"readOffset",null),(0,i._)([(0,r.MZ)({value:null,type:u.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],t.prototype,"timeInfo",null),(0,i._)([(0,r.MZ)(h)],t.prototype,"useViewTime",void 0),t=(0,i._)([(0,s.$)("esri.layers.mixins.TemporalLayer")],t),t}},83221:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(4576),r=n(49186),o=n(65529),s=n(53966),a=n(70328),l=n(19419),u=n(90708),d=n(6518),p=n(51441),c=n(37730);const h=(0,a.vt)();class y{constructor(e){this.geometryInfo=e,this._boundsStore=new d.F,this._featuresById=new Map,this._usedMemory=0,this.events=new o.A,this.featureAdapter=c.T}get usedMemory(){return this._usedMemory}get geometryType(){return this.geometryInfo.geometryType}get hasM(){return this.geometryInfo.hasM}get hasZ(){return this.geometryInfo.hasZ}get numFeatures(){return this._featuresById.size}get fullBounds(){return this._boundsStore.fullBounds}get storeStatistics(){let e=0;return this._featuresById.forEach(t=>{null!=t.geometry&&t.geometry.coords&&(e+=t.geometry.coords.length)}),{featureCount:this._featuresById.size,vertexCount:e/(this.hasZ?this.hasM?4:3:this.hasM?3:2)}}getFullExtent(e){if(null==this.fullBounds)return null;const[t,n,i,r]=this.fullBounds;return{xmin:t,ymin:n,xmax:i,ymax:r,spatialReference:(0,p.ag)(e)}}add(e){this._add(e),this._emitChanged()}addMany(e){for(const t of e)this._add(t);this._emitChanged()}upsertMany(e){const t=e.map(e=>this._upsert(e));return this._emitChanged(),t.filter(i.Ru)}clear(){this._featuresById.clear(),this._boundsStore.clear(),this._emitChanged(),this._usedMemory=0}removeById(e){const t=this._featuresById.get(e);return t?(this._remove(t),this._emitChanged(),t):null}removeManyById(e){this._boundsStore.invalidateIndex();for(const t of e){const e=this._featuresById.get(t);e&&this._remove(e)}this._emitChanged()}forEachBounds(e,t){for(const n of e){const e=this._boundsStore.get(n.objectId);e&&t((0,a.Jt)(h,e))}}getFeature(e){return this._featuresById.get(e)}has(e){return this._featuresById.has(e)}forEach(e){this._featuresById.forEach(t=>e(t))}forEachInBounds(e,t){this._boundsStore.forEachInBounds(e,e=>{t(this._featuresById.get(e))})}_emitChanged(){this.events.emit("changed",void 0)}_add(e){if(!e)return;const t=e.objectId;if(null==t)return void s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e}));const n=this._featuresById.get(t);let i;if(n?(e.displayId=n.displayId,i=this._boundsStore.get(t),this._boundsStore.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0):null!=this.onFeatureAdd&&this.onFeatureAdd(e),!e.geometry?.coords?.length)return this._boundsStore.set(t,null),void this._featuresById.set(t,e);i=(0,u.jQ)(null!=i?i:(0,l.vt)(),e.geometry,this.geometryInfo.hasZ,this.geometryInfo.hasM),null!=i&&this._boundsStore.set(t,i),this._featuresById.set(t,e),this._usedMemory+=this.estimateFeatureUsedMemory?.(e)??0}_upsert(e){const t=e?.objectId;if(null==t)return s.A.getLogger("esri.layers.graphics.data.FeatureStore").error(new r.A("featurestore:invalid-feature","feature id is missing",{feature:e})),null;const n=this._featuresById.get(t);if(!n)return this._add(e),e;this._usedMemory-=this.estimateFeatureUsedMemory?.(n)??0;const{geometry:i,attributes:o}=e;for(const e in o)n.attributes[e]=o[e];return i&&(n.geometry=i,this._boundsStore.set(t,(0,u.jQ)((0,l.vt)(),i,this.geometryInfo.hasZ,this.geometryInfo.hasM)??null)),this._usedMemory+=this.estimateFeatureUsedMemory?.(n)??0,n}_remove(e){null!=this.onFeatureRemove&&this.onFeatureRemove(e);const t=e.objectId;return this._boundsStore.delete(t),this._featuresById.delete(t),this._usedMemory-=this.estimateFeatureUsedMemory?.(e)??0,e}}},83960:(e,t,n)=>{n.d(t,{X_:()=>s,oW:()=>l,zx:()=>a});var i=n(34727),r=n(83047);const o=96;function s(e,t){const n=t||e.extent,i=e.width,s=(0,r.GA)(n?.spatialReference);return n&&i?n.width/i*s*r.dy*o:0}function a(e,t,n){return function(e,t){return 0===t||(0,i.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,i.Sp)(e,t)||e>t}(e,n)}function l(e,t){return(0,i.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},85342:(e,t,n)=>{n.d(t,{MY:()=>f,Td:()=>y,UT:()=>m,e$:()=>_,iW:()=>g,qN:()=>p});var i=n(68197),r=n(46499),o=n(73913),s=n(8916),a=n(40863),l=n(68249);const u={initializeLayersFromClientData:async(e,t,n)=>{if(t||(t=[...e.layers,...e.tables].map(e=>e.graphTypeName)),0===t?.length)return;const i=new Map;for(const n of t)i.set(n,d(e,n));const r=await(0,s.fetchClientDataAtKeys)(e.dataManager.knowledgeGraph,Array.from(i.values()),{requestOptions:{signal:n?.signal}});for(const t of[...e.layers,...e.tables]){const n=t.objectType.name;if(null==n)continue;const i=r.get(d(e,n));if(i){const e=JSON.parse(i);null===e||"object"!=typeof e||e.hasOwnProperty("showLabels")||(e.showLabels=!1),t.read(e,{origin:"service"})}}}},d=(e,t)=>"knowledge-graph"===e.type?`${t}/Map`:`${t}/LinkChart/LinkChartSubLayer`;async function p(e,t,n){return u.initializeLayersFromClientData(e,t,n)}const c=["#4a0932","#b31515","#18382e","#a64f1b","#102432","#8c213f","#ed9310","#2c6954","#144d59","#ffc730","#75351e","#454f4b","#78b1c2","#191921","#8f8f82","#9be0c0","#dbb658","#87b051","#11495c","#c43541","#9c5596","#44498b","#ad9d63","#86afb3","#5c98ca","#b0bfa2","#73241f","#b86b53","#d9d78c","#3e756d","#f260a1","#a0d17d","#c27c30","#eb82eb","#ffdf3c","#ffb259","#ab52b3","#3cccb4","#0095ba","#d92b30"],h="#8f8f82";function y(e){return e<0||e>=c.length?new i.A(h):new i.A(c[e])}function m(e){const t=e.toArray();return new a.A({data:{type:"CIMSymbolReference",symbol:{type:"CIMLineSymbol",symbolLayers:[{type:"CIMSolidStroke",enable:!0,style:"solid",width:.75,color:t},{type:"CIMVectorMarker",enable:!0,size:6,markerPlacement:{type:"CIMMarkerPlacementOnLine",angleToLine:!0,relativeTo:"LineMiddle"},frame:{xmin:-10,ymin:-5,xmax:0,ymax:5},markerGraphics:[{type:"CIMMarkerGraphic",geometry:{rings:[[[-12,-3.47],[-12,3.6],[1.96,-.03],[-12,-3.47]]]},symbol:{type:"CIMPolygonSymbol",symbolLayers:[{type:"CIMSolidFill",enable:!0,color:t}]}}]}]}}})}function f(e){let t="ESRI__ID",n=4;for(const i of e)if(i.name){if("name"===i.name.toLowerCase()){t=i.name;break}i.name.toLowerCase().includes("name")?(t=i.name,n=2):"esriFieldTypeString"===i.fieldType&&n>3&&(t=i.name,n=3)}return t}function g(e,t,n){const i={color:[80,80,80],haloColor:[255,255,255],haloSize:.7,font:{size:10,weight:"normal"}},s=new r.A({labelExpressionInfo:new o.A({expression:"ESRI__ID"===n?`${t}`:`$feature.${n}`}),labelPlacement:"above-center",symbol:new l.A(i)}),a=new r.A({labelExpressionInfo:new o.A({expression:`'${t}' + IIf($feature.ESRI__AggregationCount>1, ' (' + $feature.ESRI__AggregationCount + ')', '')`}),labelPlacement:"center-along",labelPosition:"parallel",repeatLabel:!1,symbol:new l.A({...i,yoffset:"12px"})});return"entity"===e?[s]:[a]}function _(e,t,n){const i={color:[255,255,255],haloColor:[0,0,0],haloSize:.7,font:{size:10,weight:"bold"}},s="ESRI__ID"===n?`${e}`:`$feature.${n}`;return"point"===t?[new r.A({labelExpressionInfo:new o.A({expression:s}),labelPlacement:"above-center",symbol:new l.A(i)})]:"polyline"===t?[new r.A({labelExpressionInfo:new o.A({expression:s}),labelPlacement:"center-along",repeatLabel:!0,symbol:new l.A(i)})]:"polygon"===t?[new r.A({labelExpressionInfo:new o.A({expression:s}),labelPlacement:"always-horizontal",symbol:new l.A(i)})]:null}},96184:(e,t,n)=>{n.d(t,{A:()=>y});var i=n(90237),r=n(69540),o=n(25482),s=n(10107),a=(n(44208),n(53966),n(87811),n(36005)),l=n(40608),u=n(43937),d=n(64272),p=n(26253),c=n(56400);function h(e,t){return p.T.fromJSON({value:e,unit:t})}let y=class extends(r.A.ClonableMixin(o.A)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?d.T.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?h(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?h(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,i._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],y.prototype,"cumulative",void 0),(0,i._)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"endField",void 0),(0,i._)([(0,s.MZ)({type:d.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"fullTimeExtent",void 0),(0,i._)([(0,a.w)("fullTimeExtent",["timeExtent"])],y.prototype,"readFullTimeExtent",null),(0,i._)([(0,u.K)("fullTimeExtent")],y.prototype,"writeFullTimeExtent",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{write:!0}})],y.prototype,"hasLiveData",void 0),(0,i._)([(0,s.MZ)({type:p.T,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"interval",void 0),(0,i._)([(0,a.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],y.prototype,"readInterval",null),(0,i._)([(0,u.K)("interval")],y.prototype,"writeInterval",null),(0,i._)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],y.prototype,"startField",void 0),(0,i._)([(0,s.MZ)((0,c.P6)("timeReference",!0))],y.prototype,"timeZone",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],y.prototype,"trackIdField",void 0),(0,i._)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],y.prototype,"useTime",void 0),(0,i._)([(0,s.MZ)({type:[Date],json:{read:!1}})],y.prototype,"stops",void 0),y=(0,i._)([(0,l.$)("esri.layers.support.TimeInfo")],y)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[2763,8256],{4146:(t,e,n)=>{n.d(e,{A:()=>x});var r=n(90237),i=n(78888),o=n(49186),s=n(65529),a=n(4902),l=n(92474),u=n(53966),c=n(74887),h=n(84952),p=n(10107),d=(n(44208),n(87811),n(40608)),f=n(5443),m=n(16930),g=n(92602),y=n(64272);let _=0,x=class extends(s.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,m.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+_++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=m.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await n.e(5613).then(n.bind(n,45613));try{return await r(e)}catch(t){const n=e?.portalItem,r=n?.id||"unset",i=n?.portal?.url||g.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+i+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch(t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})})}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,h.An)(this.url)}createLayerView(t,e){return Promise.reject(new o.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,i.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new o.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,p.MZ)({type:String})],x.prototype,"attributionDataUrl",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],x.prototype,"effectiveVisible",null),(0,r._)([(0,p.MZ)({type:f.A})],x.prototype,"fullExtent",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],x.prototype,"hasAttributionData",null),(0,r._)([(0,p.MZ)({type:String,clonable:!1})],x.prototype,"id",void 0),(0,r._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],x.prototype,"legendEnabled",void 0),(0,r._)([(0,p.MZ)({type:["show","hide","hide-children"]})],x.prototype,"listMode",void 0),(0,r._)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],x.prototype,"opacity",void 0),(0,r._)([(0,p.MZ)({clonable:!1})],x.prototype,"parent",void 0),(0,r._)([(0,p.MZ)({readOnly:!0})],x.prototype,"parsedUrl",null),(0,r._)([(0,p.MZ)({type:Boolean,readOnly:!0})],x.prototype,"persistenceEnabled",void 0),(0,r._)([(0,p.MZ)({type:Boolean})],x.prototype,"popupEnabled",void 0),(0,r._)([(0,p.MZ)({type:Boolean})],x.prototype,"attributionVisible",void 0),(0,r._)([(0,p.MZ)({type:m.A})],x.prototype,"spatialReference",void 0),(0,r._)([(0,p.MZ)({type:String})],x.prototype,"title",void 0),(0,r._)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],x.prototype,"type",void 0),(0,r._)([(0,p.MZ)()],x.prototype,"url",void 0),(0,r._)([(0,p.MZ)({type:y.T})],x.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,p.MZ)({type:Boolean,nonNullable:!0})],x.prototype,"visible",void 0),x=(0,r._)([(0,d.$)("esri.layers.Layer")],x)},4902:(t,e,n)=>{n.d(e,{A:()=>u});var r=n(90237),i=n(40608);let o=0;const s=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+o++})}};return e=(0,r._)([(0,i.$)("esri.core.Identifiable")],e),e};let a=class extends(s(class{})){};var l;a=(0,r._)([(0,i.$)("esri.core.Identifiable")],a),(l=a||(a={})).IdentifiableMixin=s,l.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:o++})}};return e=(0,r._)([(0,i.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=a},6518:(t,e,n)=>{n.d(e,{F:()=>a});var r=n(44208),i=n(75503),o=n(19419);const s={minX:0,minY:0,maxX:0,maxY:0};class a{constructor(){this._indexInvalid=!1,this._boundsToLoad=[],this._boundsById=new Map,this._idByBounds=new Map,this._index=new i.w(9,(0,r.A)("esri-csp-restrictions")?t=>({minX:t[0],minY:t[1],maxX:t[2],maxY:t[3]}):["[0]","[1]","[2]","[3]"]),this._loadIndex=()=>{if(this._indexInvalid){const t=new Array(this._idByBounds.size);let e=0;this._idByBounds.forEach((n,r)=>{t[e++]=r}),this._indexInvalid=!1,this._index.clear(),this._index.load(t)}else this._boundsToLoad.length&&(this._index.load(Array.from(new Set(this._boundsToLoad.filter(t=>this._idByBounds.has(t))))),this._boundsToLoad.length=0)}}get fullBounds(){if(!this._boundsById.size)return null;const t=(0,o.Ie)();for(const e of this._boundsById.values())e&&(t[0]=Math.min(e[0],t[0]),t[1]=Math.min(e[1],t[1]),t[2]=Math.max(e[2],t[2]),t[3]=Math.max(e[3],t[3]));return t}get valid(){return!this._indexInvalid}clear(){this._indexInvalid=!1,this._boundsToLoad.length=0,this._boundsById.clear(),this._idByBounds.clear(),this._index.clear()}delete(t){const e=this._boundsById.get(t);this._boundsById.delete(t),e&&(this._idByBounds.delete(e),this._indexInvalid||this._index.remove(e))}forEachInBounds(t,e){this._loadIndex(),function(t,e,n){(function(t){s.minX=t[0],s.minY=t[1],s.maxX=t[2],s.maxY=t[3]})(e),t.search(s,n)}(this._index,t,t=>e(this._idByBounds.get(t)))}get(t){return this._boundsById.get(t)}has(t){return this._boundsById.has(t)}invalidateIndex(){this._indexInvalid||(this._indexInvalid=!0,this._boundsToLoad.length=0)}set(t,e){if(!this._indexInvalid){const e=this._boundsById.get(t);e&&(this._index.remove(e),this._idByBounds.delete(e))}this._boundsById.set(t,e),e&&(this._idByBounds.set(e,t),this._indexInvalid||(this._boundsToLoad.push(e),this._boundsToLoad.length>5e4&&this._loadIndex()))}}},8303:(t,e,n)=>{n.d(e,{A:()=>w});var r=n(90237),i=n(92602),o=n(70333),s=n(78888),a=n(60999),l=n(49186),u=n(53966),c=n(97768),h=n(74887),p=n(84952),d=n(10107),f=(n(44208),n(87811),n(36005)),m=n(40608),g=n(43937),y=n(77548),_=n(20655),x=n(80812),v=n(41318),M=n(10407);const w=t=>{let e=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(t){t!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",t))}readPortalItem(t,e,n){if(e.itemId)return new x.default({id:e.itemId,portal:n?.portal})}writePortalItem(t,e){t?.id&&(e.itemId=t.id)}async loadFromPortal(t,e){if(this.portalItem?.id)try{const{load:r}=await n.e(1204).then(n.bind(n,41204));return(0,h.Te)(e),await r({instance:this,supportedTypes:t.supportedTypes,validateItem:t.validateItem,supportsData:t.supportsData,layerModuleTypeMap:t.layerModuleTypeMap,populateGroupLayer:t.populateGroupLayer},e)}catch(t){throw(0,h.zf)(t)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${t}`),t}}async finishLoadEditablePortalLayer(t){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(t).catch(t=>((0,h.QP)(t),!0)))}async setUserPrivileges(t,e){if(!i.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(e);if(this.url)try{const{features:{edit:n,fullEdit:r},content:{updateItem:i}}=await this._fetchUserPrivileges(t,e);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",i)}catch(t){(0,h.QP)(t)}}async _fetchUserPrivileges(t,e){let n=this.portalItem;if(!t||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(e);const r=!o.id?.findCredential(this.url),i=t===n.id;if(i&&n.portal.user)return this._getUserPrivileges(n,r);let s,a;if(i)s=n.portal.url;else try{s=await(0,y.wI)(this.url,e)}catch(t){(0,h.QP)(t)}if(!s||!(0,p.b8)(s,n.portal.url))return this._fetchFallbackUserPrivileges(e);try{const t=null!=e?e.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:t}))}catch(t){(0,h.QP)(t)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(i?await n.reload():(n=new x.default({id:t,portal:{url:s}}),await n.load(e)),n.portal.user)return this._getUserPrivileges(n,r)}catch(t){(0,h.QP)(t)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(t,e){const n=(0,M.It)(t);return e&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(t){let e=!0;try{e=await this._fetchUserHasEditingPrivileges(t)}catch(t){(0,h.QP)(t)}return{features:{edit:e,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(t){const e=this.url?o.id?.findCredential(this.url):null;if(!e)return!0;const n=b.credential===e?b.user:await this._fetchEditingUser(t);return b.credential=e,b.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(t){const e=this.portalItem?.portal?.user;if(e)return e;const n=o.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const r=`${n.owningSystemUrl}/sharing/rest`,i=_.A.getDefault();if(i&&i.loaded&&(0,p.S8)(i.restUrl)===(0,p.S8)(r))return i.user;const l=`${r}/community/self`,u=null!=t?t.signal:null,c=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?v.A.fromJSON(c.value.data):null}read(t,e){e&&(e.layer=this),super.read(t,e)}write(t,e){const n=e?.portal,r=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return n&&r&&!(0,p.ut)(r.restUrl,n.restUrl)?(e.messages&&e.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(t,{...e,layer:this})}};return(0,r._)([(0,d.MZ)({type:x.default})],e.prototype,"portalItem",null),(0,r._)([(0,f.w)("web-document","portalItem",["itemId"])],e.prototype,"readPortalItem",null),(0,r._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],e.prototype,"writePortalItem",null),(0,r._)([(0,d.MZ)({clonable:!1})],e.prototype,"resourceReferences",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasFullEditingPrivileges",void 0),(0,r._)([(0,d.MZ)({type:Boolean,readOnly:!0})],e.prototype,"userHasUpdateItemPrivileges",void 0),e=(0,r._)([(0,m.$)("esri.layers.mixins.PortalLayer")],e),e},b={credential:null,user:null}},11006:(t,e,n)=>{function r(t,e,n,r,o){i(t,e,n||0,r||t.length-1,o||s)}function i(t,e,n,r,s){for(;r>n;){if(r-n>600){var a=r-n+1,l=e-n+1,u=Math.log(a),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);i(t,e,Math.max(n,Math.floor(e-l*c/a+h)),Math.min(r,Math.floor(e+(a-l)*c/a+h)),s)}var p=t[e],d=n,f=r;for(o(t,n,e),s(t[r],p)>0&&o(t,n,r);d<f;){for(o(t,d,f),d++,f--;s(t[d],p)<0;)d++;for(;s(t[f],p)>0;)f--}0===s(t[n],p)?o(t,n,f):o(t,++f,r),f<=e&&(n=f+1),e<=f&&(r=f-1)}}function o(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function s(t,e){return t<e?-1:t>e?1:0}n.d(e,{q:()=>r})},13069:(t,e,n)=>{n.d(e,{AG:()=>a,lk:()=>i,vD:()=>s,yS:()=>o});const r="randomUUID"in crypto;function i(){if(r)return crypto.randomUUID();const t=crypto.getRandomValues(new Uint16Array(8));t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;const e=e=>t[e].toString(16).padStart(4,"0");return e(0)+e(1)+"-"+e(2)+"-"+e(3)+"-"+e(4)+"-"+e(5)+e(6)+e(7)}function o(){return`{${i().toUpperCase()}}`}function s(){return`{${i()}}`}function a(t){const e=t.toUpperCase();return"{"!==t[0]?`{${e}}`:e}},16494:(t,e,n)=>{n.d(e,{W5:()=>s});var r=n(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((t,e)=>(t[e]=[],t),{}),o=["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"],s=new r.I({whiteList:i,onTagAttr:(t,e,n)=>{const r=`${e}="${n}"`;if(o.includes(e))return r},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style"]},!0)},19647:(t,e,n)=>{n.r(e),n.d(e,{default:()=>ee});var r=n(90237),i=n(5503),o=n(49186),s=n(53966),a=n(92071),l=n(74887),u=n(10107),c=n(79901),h=(n(44208),n(87811),n(36005)),p=n(40608),d=n(43937),f=n(35666),m=n(4146),g=n(63074),y=n(16131),_=n(8303),x=n(25036),v=n(69540),M=n(25482),w=n(77690),b=n(29242),A=n(37585),S=n(38954);const P=(0,n(51850).vt)(),I=(0,b.vt)(),O=(0,b.vt)(),E=(0,b.vt)();function R(t,e,n){return(0,S.i)(P,e[0],e[1],1),(0,S.o)(P,P,(0,w.mg)(I,n)),0===P[2]?(0,A.hZ)(t,P[0],P[1]):(0,A.hZ)(t,P[0]/P[2],P[1]/P[2])}function T(t,e,n){return L(O,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7]),L(E,n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7]),(0,w.lw)(t,(0,w.KC)(O,O),E),0!==t[8]&&(t[0]/=t[8],t[1]/=t[8],t[2]/=t[8],t[3]/=t[8],t[4]/=t[8],t[5]/=t[8],t[6]/=t[8],t[7]/=t[8],t[8]/=t[8]),t}function L(t,e,n,r,i,o,s,a,l){(0,w.hZ)(t,e,r,o,n,i,s,1,1,1),(0,S.i)(P,a,l,1),(0,w.KC)(I,t);const[u,c,h]=(0,S.o)(P,P,(0,w.mg)(I,I));return(0,w.hZ)(I,u,0,0,0,c,0,0,0,h),(0,w.lw)(t,I,t)}var Z=n(90629),B=n(48163),j=n(86738),C=n(39829),$=n(98988),N=n(16930);let U=class extends v.A{projectOrWarn(t,e){if(null==t)return t;const{geometry:n,pending:r}=(0,$.projectOrLoad)(t,e);return r?null:r||n?n:(s.A.getLogger(this).warn("geometry could not be projected to the spatial reference",{georeference:this,geometry:t,sourceSpatialReference:t.spatialReference,targetSpatialReference:e}),null)}};U=(0,r._)([(0,p.$)("esri.layers.support.GeoreferenceBase")],U);const F=(0,b.vt)(),Y=(0,B.vt)();let X=class extends M.A{};(0,r._)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],X.prototype,"x",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:{isRequired:!0}}})],X.prototype,"y",void 0),X=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPointJSONType")],X);let D=class extends v.A{constructor(){super(...arguments),this.sourcePoint=null,this.mapPoint=null}};(0,r._)([(0,u.MZ)()],D.prototype,"sourcePoint",void 0),(0,r._)([(0,u.MZ)({type:j.A})],D.prototype,"mapPoint",void 0),D=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference.ControlPoint")],D);let q=class extends(M.A.JSONSupportMixin(U)){constructor(t){super(t),this.controlPoints=null,this.height=0,this.type="control-points",this.width=0}readControlPoints(t,e){const n=N.A.fromJSON(e.spatialReference),r=(0,b.fA)(...e.coefficients,1);return t.map(t=>((0,A.hZ)(Y,t.x,t.y),R(Y,Y,r),{sourcePoint:t,mapPoint:new j.A({x:Y[0],y:Y[1],spatialReference:n})}))}writeControlPoints(t,e,n,r){if(null!=this.transform)null!=t&&k(t[0])&&(e.controlPoints=t.map(t=>{const e=t.sourcePoint;return{x:e.x,y:e.y}}),e.spatialReference=t[0].mapPoint.spatialReference.toJSON(),e.coefficients=this.transform.slice(0,8));else{const t=new o.A("web-document-write:invalid-georeference","Invalid 'controlPoints', 'width', 'height' configuration. Make sure the parent media element is loaded i.e. the ImageElement or VideoElement set as 'MediaLayer.source'.",{layer:r?.layer,georeference:this});r?.messages?r.messages.push(t):s.A.getLogger(this).error(t.name,t.message)}}get coords(){if(null==this.controlPoints)return null;const t=this._updateTransform(F);if(null==t||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return function(t,e,n,r){const i=(0,B.fA)(0,n),o=(0,B.fA)(0,0),s=(0,B.fA)(e,0),a=(0,B.fA)(e,n);return R(i,i,t),R(o,o,t),R(s,s,t),R(a,a,t),new C.A({rings:[[i,o,s,a,i]],spatialReference:r})}(t,this.width,this.height,e)}set coords(t){if(null==this.controlPoints||!k(this.controlPoints[0]))return;const e=this.controlPoints[0].mapPoint.spatialReference;if(null==(t=this.projectOrWarn(t,e)))return;const{width:n,height:r}=this,{rings:[[i,o,s,a]]}=t,l={sourcePoint:(0,Z.tc)(0,r),mapPoint:new j.A({x:i[0],y:i[1],spatialReference:e})},u={sourcePoint:(0,Z.tc)(0,0),mapPoint:new j.A({x:o[0],y:o[1],spatialReference:e})},c={sourcePoint:(0,Z.tc)(n,0),mapPoint:new j.A({x:s[0],y:s[1],spatialReference:e})},h={sourcePoint:(0,Z.tc)(n,r),mapPoint:new j.A({x:a[0],y:a[1],spatialReference:e})};k(l)&&k(u)&&k(c)&&k(h)&&(nt(F,l,u,c,h),this.controlPoints=this.controlPoints.map(({sourcePoint:t})=>((0,A.hZ)(Y,t.x,t.y),R(Y,Y,F),{sourcePoint:t,mapPoint:new j.A({x:Y[0],y:Y[1],spatialReference:e})})))}get inverseTransform(){return null==this.transform?null:(0,w.B8)((0,b.vt)(),this.transform)}get transform(){return this._updateTransform()}toMap(t){if(null==t||null==this.transform||null==this.controlPoints||!k(this.controlPoints[0]))return null;(0,A.hZ)(Y,t.x,t.y);const e=this.controlPoints[0].mapPoint.spatialReference;return R(Y,Y,this.transform),new j.A({x:Y[0],y:Y[1],spatialReference:e})}toSource(t){if(null==t||null==this.inverseTransform||null==this.controlPoints||!k(this.controlPoints[0]))return null;const e=this.controlPoints[0].mapPoint.spatialReference;return t=t.normalize(),null==(t=(0,$.projectOrLoad)(t,e).geometry)?null:((0,A.hZ)(Y,t.x,t.y),R(Y,Y,this.inverseTransform),(0,Z.tc)(Y[0],Y[1]))}toSourceNormalized(t){const e=this.toSource(t);return null!=e&&(e.x/=this.width,e.y/=this.height),e}_updateTransform(t){const{controlPoints:e,width:n,height:r}=this;if(!(null!=e&&n>0&&r>0))return null;const[i,o,s,a]=e;if(!k(i))return null;const l=i.mapPoint.spatialReference,u=this._projectControlPoint(o,l),c=this._projectControlPoint(s,l),h=this._projectControlPoint(a,l);if(!u.valid||!c.valid||!h.valid)return null;if(!k(u.controlPoint))return null;null==t&&(t=(0,b.vt)());let p=null;return p=k(c.controlPoint)&&k(h.controlPoint)?nt(t,i,u.controlPoint,c.controlPoint,h.controlPoint):k(c.controlPoint)?function(t,e,n,r){return et(z,W,e),et(V,J,n),et(H,K,r),(0,A.Cc)(G,z,V,.5),(0,A.e$)(G,H,G,Math.PI),(0,A.Cc)(Q,W,J,.5),(0,A.e$)(Q,K,Q,Math.PI),st(t,z,V,H,G,W,J,K,Q)}(t,i,u.controlPoint,c.controlPoint):function(t,e,n){return et(z,W,e),et(V,J,n),(0,A.e$)(H,V,z,tt),(0,A.e$)(G,z,V,tt),(0,A.e$)(K,J,W,-tt),(0,A.e$)(Q,W,J,-tt),st(t,z,V,H,G,W,J,K,Q)}(t,i,u.controlPoint),p.every(t=>0===t)?null:p}_projectControlPoint(t,e){if(!k(t))return{valid:!0,controlPoint:t};const{sourcePoint:n,mapPoint:r}=t,{geometry:i,pending:o}=(0,$.projectOrLoad)(r,e);return o?{valid:!1,controlPoint:null}:o||i?{valid:!0,controlPoint:{sourcePoint:n,mapPoint:i}}:(s.A.getLogger(this).warn("map point could not be projected to the spatial reference",{georeference:this,controlPoint:t,sourceSpatialReference:r.spatialReference,targetSpatialReference:e}),{valid:!1,controlPoint:null})}};function k(t){return null!=t?.sourcePoint&&null!=t.mapPoint}(0,r._)([(0,u.MZ)({type:[D],json:{write:{allowNull:!1,isRequired:!0,target:{controlPoints:{type:[X],isRequired:!0},coefficients:{type:[Number],isRequired:!0},spatialReference:{type:N.A,isRequired:!0}}}}})],q.prototype,"controlPoints",void 0),(0,r._)([(0,h.w)("controlPoints")],q.prototype,"readControlPoints",null),(0,r._)([(0,d.K)("controlPoints")],q.prototype,"writeControlPoints",null),(0,r._)([(0,u.MZ)({clonable:!1})],q.prototype,"coords",null),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],q.prototype,"height",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],q.prototype,"inverseTransform",null),(0,r._)([(0,u.MZ)({readOnly:!0})],q.prototype,"transform",null),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],q.prototype,"width",void 0),q=(0,r._)([(0,p.$)("esri.layers.support.ControlPointsGeoreference")],q);const z=(0,B.vt)(),V=(0,B.vt)(),H=(0,B.vt)(),G=(0,B.vt)(),W=(0,B.vt)(),J=(0,B.vt)(),K=(0,B.vt)(),Q=(0,B.vt)(),tt=Math.PI/2;function et(t,e,n){(0,A.hZ)(t,n.sourcePoint.x,n.sourcePoint.y),(0,A.hZ)(e,n.mapPoint.x,n.mapPoint.y)}function nt(t,e,n,r,i){return et(z,W,e),et(V,J,n),et(H,K,r),et(G,Q,i),st(t,z,V,H,G,W,J,K,Q)}const rt=new Array(8).fill(0),it=new Array(8).fill(0);function ot(t,e,n,r,i){return t[0]=e[0],t[1]=e[1],t[2]=n[0],t[3]=n[1],t[4]=r[0],t[5]=r[1],t[6]=i[0],t[7]=i[1],t}function st(t,e,n,r,i,o,s,a,l){return T(t,ot(rt,e,n,r,i),ot(it,o,s,a,l))}var at=n(78888),lt=n(21287),ut=n(84952),ct=n(13069),ht=n(4902),pt=n(92474),dt=n(5443),ft=n(21325);const mt=(0,B.vt)();let gt=class extends U{constructor(t){super(t),this.bottomLeft=null,this.bottomRight=null,this.topLeft=null,this.topRight=null,this.type="corners"}get coords(){let{topLeft:t,topRight:e,bottomLeft:n,bottomRight:r}=this;if(null==t||null==e||null==n||null==r)return null;const i=t.spatialReference;return e=this.projectOrWarn(e,i),n=this.projectOrWarn(n,i),r=this.projectOrWarn(r,i),null==e||null==n||null==r?null:new C.A({rings:[[[n.x,n.y],[t.x,t.y],[e.x,e.y],[r.x,r.y],[n.x,n.y]]],spatialReference:i})}set coords(t){const{topLeft:e}=this;if(null==e)return;const n=e.spatialReference;if(null==(t=this.projectOrWarn(t,n)))return;const{rings:[[r,i,o,s]]}=t;this.bottomLeft=new j.A({x:r[0],y:r[1],spatialReference:n}),this.topLeft=new j.A({x:i[0],y:i[1],spatialReference:n}),this.topRight=new j.A({x:o[0],y:o[1],spatialReference:n}),this.bottomRight=new j.A({x:s[0],y:s[1],spatialReference:n})}toSourceNormalized(t){const{topLeft:e,topRight:n,bottomRight:r,bottomLeft:i}=this;if(null==t||null==e||null==n||null==r||null==i)return null;const o=e.spatialReference;t=t.normalize();const s=(0,$.projectOrLoad)(t,o).geometry;if(null==s)return null;(0,A.hZ)(mt,s.x,s.y);const a=T((0,b.vt)(),[e.x,e.y,i.x,i.y,n.x,n.y,r.x,r.y],[0,0,0,1,1,0,1,1]);return R(mt,mt,a),(0,Z.tc)(mt[0],mt[1])}};(0,r._)([(0,u.MZ)({clonable:!1})],gt.prototype,"coords",null),(0,r._)([(0,u.MZ)({type:j.A})],gt.prototype,"bottomLeft",void 0),(0,r._)([(0,u.MZ)({type:j.A})],gt.prototype,"bottomRight",void 0),(0,r._)([(0,u.MZ)({type:j.A})],gt.prototype,"topLeft",void 0),(0,r._)([(0,u.MZ)({type:j.A})],gt.prototype,"topRight",void 0),gt=(0,r._)([(0,p.$)("esri.layers.support.CornersGeoreference")],gt);const yt=gt;var _t=n(34727),xt=n(34304);let vt=class extends U{constructor(t){super(t),this.extent=null,this.rotation=0,this.type="extent-and-rotation"}get coords(){if(null==this.extent)return null;const{xmin:t,ymin:e,xmax:n,ymax:r,spatialReference:i}=this.extent;let o;if(this.rotation){const{x:i,y:s}=this.extent.center,a=Mt(i,s,this.rotation);o=[a(t,e),a(t,r),a(n,r),a(n,e)],o.push(o[0])}else o=[[t,e],[t,r],[n,r],[n,e],[t,e]];return new C.A({rings:[o],spatialReference:i})}set coords(t){if(null==t||null==this.extent)return;const e=this.extent.spatialReference;if(t=this.projectOrWarn(t,e),null==t?.extent)return;const{rings:[[n,r,i]],extent:{center:{x:o,y:s}}}=t,a=(0,_t.KJ)(Math.PI/2-Math.atan2(r[1]-n[1],r[0]-n[0])),l=Mt(o,s,-a),[u,c]=l(n[0],n[1]),[h,p]=l(i[0],i[1]);this.extent=new dt.A({xmin:u,ymin:c,xmax:h,ymax:p,spatialReference:e}),this.rotation=a}toSourceNormalized(t){const{extent:e,rotation:n}=this;if(null==t||null==e)return null;const{xmin:r,ymin:i,xmax:o,ymax:s,center:a,spatialReference:l}=e;t=t.normalize();const u=(0,$.projectOrLoad)(t,l).geometry;if(null==u)return null;let c=u.x,h=u.y;return n&&([c,h]=Mt(a.x,a.y,-n)(c,h)),(0,Z.tc)((0,_t.hs)(c,r,o,0,1),(0,_t.hs)(h,s,i,0,1))}};function Mt(t,e,n){const r=(0,xt.DF)(n),i=Math.cos(r),o=Math.sin(r);return(n,r)=>[i*(n-t)+o*(r-e)+t,i*(r-e)-o*(n-t)+e]}function wt(t,e){const n=(0,f.aB)(e);return function(t){return"media"===t?.type}(t)&&!!t.portalItem&&null!=n&&n>f.Gr.PORTAL_ITEM}function bt(t,e,n){return{enabled:!wt(n?.layer,n?.origin),ignoreOrigin:!0}}(0,r._)([(0,u.MZ)({clonable:!1})],vt.prototype,"coords",null),(0,r._)([(0,u.MZ)({type:dt.A})],vt.prototype,"extent",void 0),(0,r._)([(0,u.MZ)({type:Number})],vt.prototype,"rotation",void 0),vt=(0,r._)([(0,p.$)("esri.layers.support.ExtentAndRotationGeoreference")],vt);const At={json:{name:"url",type:String,write:{overridePolicy:bt}}},St={readOnly:!0,json:{read:!1,write:{target:"mediaType",overridePolicy:bt}}},Pt={types:{key:"type",base:U,typeMap:{"control-points":q,corners:yt,"extent-and-rotation":vt}},json:{types:{key:"type",base:U,typeMap:{"control-points":q}},write:{overridePolicy:()=>({enabled:!0,ignoreOrigin:!0})}}};let It=class extends(ht.A.NumericIdentifiableMixin((0,a.P)(pt.A))){constructor(t){super(t),this.georeference=null,this.opacity=1}readGeoreference(t){return q.fromJSON(t)}writeGeoreference(t,e,n,r){const i=r?.resources?.pendingOperations,a=()=>{const i=function(t,e,n){if(!t||"control-points"===t.type)return t;const{coords:r}=t;if(5!==r?.rings[0]?.length)return null;const[i,o,s,a]=r.rings[0],{spatialReference:l}=r;return new q({controlPoints:[{mapPoint:new j.A({x:i[0],y:i[1],spatialReference:l}),sourcePoint:(0,Z.tc)(0,n)},{mapPoint:new j.A({x:o[0],y:o[1],spatialReference:l}),sourcePoint:(0,Z.tc)(0,0)},{mapPoint:new j.A({x:s[0],y:s[1],spatialReference:l}),sourcePoint:(0,Z.tc)(e,0)},{mapPoint:new j.A({x:a[0],y:a[1],spatialReference:l}),sourcePoint:(0,Z.tc)(e,n)}],width:e,height:n})}(this.georeference,this.contentWidth,this.contentHeight);if(i){if("control-points"!==t.type&&s.A.getLogger(this).warn(`only georeference of type 'control-points' may be persisted. The georeference of type '${t.type}' has been automatically converted.`),4!==i.controlPoints?.length&&r?.messages)return void r.messages.push(new o.A("property:unsupported","only 'control-points' georeference with 4 control points may be persisted."));e[n]=i.write({},r)}};if("control-points"!==t.type&&!this.loaded&&i)return e[n]={},void i.push(this.load().then(a));a()}get contentWidth(){return 0}get contentHeight(){return 0}toSource(t){const{georeference:e,contentWidth:n,contentHeight:r}=this;if(null==t||null==e||0===n||0===r)return null;const i=e.toSourceNormalized(t);return null==i?null:(i.x*=n,i.y*=r,i)}};(0,r._)([(0,u.MZ)(Pt)],It.prototype,"georeference",void 0),(0,r._)([(0,h.w)("georeference")],It.prototype,"readGeoreference",null),(0,r._)([(0,d.K)("georeference")],It.prototype,"writeGeoreference",null),(0,r._)([(0,u.MZ)({json:{read:!1,write:!1}})],It.prototype,"opacity",void 0),It=(0,r._)([(0,p.$)("esri.layers.support.MediaElementBase")],It);var Ot=n(85648);const Et=Symbol("ImageElementInstance"),Rt=Symbol("VideoElementInstance");function Tt(t){return function(t){return null!=t&&"object"==typeof t&&Et in t}(t)||function(t){return null!=t&&"object"==typeof t&&Rt in t}(t)}var Lt,Zt=n(97159);let Bt=class extends It{static{Lt=Et}constructor(t){super(t),this.animationOptions=null,this.content=null,this.image=null,this.type="image",this[Lt]=!0,this.image=null}load(){const t=this.image;if("string"==typeof t){const e=(0,lt.M5)(t).then(t=>{this._set("content",t)});this.addResolvingPromise(e)}else if(t instanceof HTMLImageElement){const e=t.decode().then(()=>{this._set("content",t)});this.addResolvingPromise(e)}else t?this._set("content",t):this.addResolvingPromise(Promise.reject(new o.A("image-element:invalid-image-type","Invalid image type",{image:t})));return Promise.resolve(this)}get contentWidth(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalWidth:this.content.width}get contentHeight(){return null==this.content?0:this.content instanceof HTMLImageElement?this.content.naturalHeight:this.content.height}readImage(t,e,n){return(0,Zt.f)(e.url,n)}writeImage(t,e,n,r){if(null==t)return;const i=r?.portalItem,o=r?.resources;if(!i||!o)return void("string"==typeof t&&(e[n]=(0,Zt.t)(t,r)));const s=function(t){return"string"==typeof t&&!(0,ut.DB)(t)&&!(0,ut.w8)(t)}(t)?t:null;if(s){if(null==(0,Zt.i)(s))return void(e[n]=s);const t=(0,Zt.t)(s,{...r,verifyItemRelativeUrls:r?.verifyItemRelativeUrls?{writtenUrls:r.verifyItemRelativeUrls.writtenUrls,rootPath:void 0}:void 0},Zt.M.NO);if(i&&t&&!(0,ut.oP)(t))return o.toKeep.push({resource:i.resourceFromPath(t),compress:!1}),void(e[n]=t)}e[n]="<pending>",o.pendingOperations.push(async function(t){return"string"==typeof t?(0,ut.DB)(t)?(0,ut.N9)(t):(await(0,at.A)(t,{responseType:"blob"})).data:new Promise(e=>function(t){if(t instanceof HTMLCanvasElement)return t;const e=t instanceof HTMLImageElement?t.naturalWidth:t.width,n=t instanceof HTMLImageElement?t.naturalHeight:t.height,r=document.createElement("canvas"),i=r.getContext("2d");return r.width=e,r.height=n,t instanceof HTMLImageElement?i.drawImage(t,0,0,t.width,t.height):t instanceof ImageData&&i.putImageData(t,0,0),r}(t).toBlob(e))}(t).then(t=>{const r=function(t,e){const n=(0,ct.lk)(),r=`${(0,ut.fj)("media",n)}.${(0,Ot.n)({type:"blob",blob:t})}`;return e.resourceFromPath(r)}(t,i);e[n]=r.itemRelativeUrl,o.toAdd.push({resource:r,content:{type:"blob",blob:t},compress:!1,finish:t=>{this.image=t.url}})}))}};(0,r._)([(0,u.MZ)()],Bt.prototype,"animationOptions",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],Bt.prototype,"content",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],Bt.prototype,"contentWidth",null),(0,r._)([(0,u.MZ)({readOnly:!0})],Bt.prototype,"contentHeight",null),(0,r._)([(0,u.MZ)(At)],Bt.prototype,"image",void 0),(0,r._)([(0,h.w)("image",["url"])],Bt.prototype,"readImage",null),(0,r._)([(0,d.K)("image")],Bt.prototype,"writeImage",null),(0,r._)([(0,u.MZ)(St)],Bt.prototype,"type",void 0),Bt=(0,r._)([(0,p.$)("esri.layers.support.ImageElement")],Bt);var jt=n(62885),Ct=n(65529),$t=n(61893),Nt=n(36708),Ut=n(19419),Ft=n(12176),Yt=n(6518),Xt=n(69622),Dt=n(89056);let qt=class extends Xt.A{constructor(t){super(t)}get bounds(){const t=this.coords;return null==t?.extent?null:(0,Ut.VY)(t.extent)}get coords(){const t=this.element.georeference?.coords;return(0,$.projectOrLoad)(t,this.spatialReference).geometry}get normalizedCoords(){return C.A.fromJSON((0,Dt.jZ)(this.coords))}get normalizedBounds(){const t=null!=this.normalizedCoords?this.normalizedCoords.extent:null;return null!=t?(0,Ut.VY)(t):null}};(0,r._)([(0,u.MZ)()],qt.prototype,"spatialReference",void 0),(0,r._)([(0,u.MZ)()],qt.prototype,"element",void 0),(0,r._)([(0,u.MZ)()],qt.prototype,"bounds",null),(0,r._)([(0,u.MZ)()],qt.prototype,"coords",null),(0,r._)([(0,u.MZ)()],qt.prototype,"normalizedCoords",null),(0,r._)([(0,u.MZ)()],qt.prototype,"normalizedBounds",null),qt=(0,r._)([(0,p.$)("esri.layers.support.MediaElementView")],qt);var kt,zt=n(16494),Vt=n(38969);const Ht=Symbol("canplay");let Gt=class extends It{static{kt=Rt}constructor(t){super(t),this.autoplay=!0,this.content=null,this.type="video",this[kt]=!0}load(){const t=this.video;return"string"==typeof t?this.addResolvingPromise(this._preProcessVideoUrl(t).then(async t=>{const e=document.createElement("video");return e.src=zt.W5.sanitizeUrl((0,ut.s2)(t)),e.crossOrigin="anonymous",e.autoplay=this.autoplay,e.muted=!0,e.loop=!0,e.playsInline=!0,this._loadVideo(e).then(()=>{this._set("content",e)})})):t instanceof HTMLVideoElement?this.addResolvingPromise(this._loadVideo(t).then(()=>{this._set("content",t)})):this.addResolvingPromise(Promise.reject(new o.A("video-element:invalid-video-type","Invalid video type",{video:t}))),Promise.resolve(this)}get contentWidth(){return this.content?.videoWidth??0}get contentHeight(){return this.content?.videoHeight??0}get currentTime(){return this.content?.currentTime}set currentTime(t){if(!this.content)return;const e=(0,_t.qE)(t,0,this.content.duration);"fastSeek"in this.content?this.content.fastSeek(e):this.content.currentTime=e,this.content.play().then(()=>{this.content?.pause()}).catch(()=>{})}get duration(){return this.content?.duration}set video(t){"not-loaded"===this.loadStatus?this._set("video",t):s.A.getLogger(this).error("#video","video cannot be changed after the element is loaded.")}writeVideo(t,e,n,r){if(!t)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source is missing")));const i=function(t){return"string"==typeof t&&!(0,ut.DB)(t)&&!(0,ut.w8)(t)}(t)?t:null;if(!i)return void(r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source must be an absolute url")));!(0,ut.oP)(i)&&r?.blockedRelativeUrls&&r.blockedRelativeUrls.push(i);const s=(0,ut.s2)(i);(0,Zt.i)(s)?r?.messages&&r.messages.push(new o.A("video-element:unsupported-video","video source cannot be an item resource")):e[n]=s}async _preProcessVideoUrl(t){if((0,ut.zs)(t))return(0,ut.yM)(t);try{return await(0,at.A)(t,{method:"head"}),t}catch{try{return(0,ut.yM)(t,!0)}catch{return t}}}async _loadVideo(t){"anonymous"!==t.crossOrigin&&(t.crossOrigin="anonymous",(0,ut.w8)(t.src)||(t.src=t.src));try{await(0,Vt.i)(t,t=>this.addHandles(t,Ht)),this.autoplay&&await t.play().catch(t=>{throw console.error(t),t})}finally{this.removeHandles(Ht)}}};(0,r._)([(0,u.MZ)()],Gt.prototype,"autoplay",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],Gt.prototype,"content",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],Gt.prototype,"contentWidth",null),(0,r._)([(0,u.MZ)({readOnly:!0})],Gt.prototype,"contentHeight",null),(0,r._)([(0,u.MZ)({type:Number})],Gt.prototype,"currentTime",null),(0,r._)([(0,u.MZ)({type:Number})],Gt.prototype,"duration",null),(0,r._)([(0,u.MZ)(At)],Gt.prototype,"video",null),(0,r._)([(0,d.K)("video")],Gt.prototype,"writeVideo",null),(0,r._)([(0,u.MZ)(St)],Gt.prototype,"type",void 0),Gt=(0,r._)([(0,p.$)("esri.layers.support.VideoElement")],Gt);const Wt={key:"type",defaultKeyValue:"image",base:It,typeMap:{image:Bt,video:Gt}},Jt=i.A.ofType(Wt);let Kt=class extends(pt.A.LoadableMixin($t.A.EsriPromiseMixin(Ct.A.EventedAccessor))){constructor(t){super(t),this._index=new Yt.F,this._elementViewsMap=new Map,this._elementsIndexes=new Map,this._elementsChangedHandler=t=>{for(const e of t.removed){const t=this._elementViewsMap.get(e);this._elementViewsMap.delete(e),this._index.delete(t),this.removeHandles(t),t.destroy(),this.notifyChange("fullExtent")}const{spatialReference:e}=this;for(const n of t.added){if(this._elementViewsMap.get(n))continue;const t=new qt({spatialReference:e,element:n});this._elementViewsMap.set(n,t);const r=(0,Nt.wB)(()=>t.coords,()=>this._updateIndexForElement(t,!1));this._updateIndexForElement(t,!0),this.addHandles(r,t)}this._elementsIndexes.clear(),this.elements.forEach((t,e)=>this._elementsIndexes.set(t,e)),this.emit("refresh")},this.elements=new Jt}async load(t){if((0,l.Te)(t),!this.spatialReference){const t=this.elements.find(t=>null!=t.georeference?.coords);this._set("spatialReference",t?t.georeference.coords.spatialReference:N.A.WGS84)}return this._elementsChangedHandler({added:this.elements.items,removed:[]}),this.addHandles(this.elements.on("change",this._elementsChangedHandler)),this}destroy(){this._index.clear(),this._elementViewsMap.clear(),this._elementsIndexes.clear()}set elements(t){this._set("elements",(0,jt.V)(t,this._get("elements"),Jt))}get fullExtent(){if("not-loaded"===this.loadStatus)return null;const t=this._index.fullBounds;return null==t?null:new dt.A({xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3],spatialReference:this.spatialReference})}set spatialReference(t){"not-loaded"===this.loadStatus?this._set("spatialReference",t):s.A.getLogger(this).error("#spatialReference","spatialReference cannot be changed after the source is loaded.")}async queryElements(t,e){await this.load(),await(0,$.initializeProjection)(t.spatialReference,this.spatialReference,null,e);const n=(0,ft.aI)(t.spatialReference,this.spatialReference)?t:(0,$.project)(t,this.spatialReference);if(!n)return[];const r=n.normalize(),i=[];for(const t of r)this._index.forEachInBounds((0,Ut.VY)(t),({normalizedCoords:e,element:n})=>{null!=e&&(0,Ft.fA)(t,e)&&i.push(n)});return i.sort((t,e)=>this._elementsIndexes.get(t)-this._elementsIndexes.get(e)),i}hasElement(t){return this.elements.includes(t)}_updateIndexForElement(t,e){const n=t.normalizedBounds,r=this._index.has(t),i=null!=n;this._index.delete(t),i&&this._index.set(t,n),this.notifyChange("fullExtent"),e||(r!==i?this.emit("refresh"):this.emit("change",{element:t.element}))}};(0,r._)([(0,u.MZ)()],Kt.prototype,"elements",null),(0,r._)([(0,u.MZ)({readOnly:!0})],Kt.prototype,"fullExtent",null),(0,r._)([(0,u.MZ)()],Kt.prototype,"spatialReference",null),Kt=(0,r._)([(0,p.$)("esri.layers.support.LocalMediaElementSource")],Kt);var Qt=n(92935);let te=class extends((0,g.dM)((0,x.j)((0,y.q)((0,_.A)((0,a.P)(m.A)))))){constructor(t){super(t),this.effectiveSource=null,this.georeference=null,this.copyright=null,this.operationalLayerType="MediaLayer",this.spatialReference=null,this.type="media",this._debouncedSaveOperations=(0,l.sg)(async(t,e,r)=>{const{save:i,saveAs:o}=await n.e(3561).then(n.bind(n,63561));switch(t){case Qt.X.SAVE:return i(this,e);case Qt.X.SAVE_AS:return o(this,r,e)}}),this.source=new Kt}load(t){return this.addResolvingPromise(this._doLoad(t)),Promise.resolve(this)}async _doLoad(t){await this.loadFromPortal({supportedTypes:["Media Layer"]},t);let e=this.source;if(!e)throw new o.A("media-layer:source-missing","Set 'MediaLayer.source' before loading the layer.");const n=this._getSourceOverride(e,this.georeference);n&&(this.setAtOrigin("source",n,"web-map"),this.setAtOrigin("source",n,"web-scene"),e=n);const r=Tt(e)?new Kt({elements:new i.A([e])}):e;this._set("effectiveSource",r),this.spatialReference&&(r.spatialReference=this.spatialReference),await r.load(t),this.spatialReference=r.spatialReference}destroy(){this.effectiveSource?.destroy(),this.effectiveSource!==this.source&&this.source?.destroy()}readGeoreference(t,e){return t&&"itemId"in e&&e.itemId?t:void 0}get fullExtent(){return this.loaded?this.effectiveSource.fullExtent:null}get source(){return this._get("source")}set source(t){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("source",t):s.A.getLogger(this).error("#source","source cannot be changed after the layer is loaded.")}castSource(t){return t?Array.isArray(t)?new Kt({elements:new i.A(t)}):t instanceof i.A?new Kt({elements:t}):t:null}readSource(t,e,n){if("itemId"in e&&e.itemId)return;const r=this._createSource(e);return r?.read(e,n),r}writeSource(t,e,n,r){if(t&&t instanceof Kt){const e=t.elements.length;if(1!==e)return void(r?.messages&&r.messages.push(new o.A("media-layer:unsupported-source",`local media element source can only be persisted if it contains exactly one ImageElement, but it has ${e}.`)));t=t.elements.at(0)}Tt(t)?t.write(e,r):r?.messages&&(t?r.messages.push(new o.A("media-layer:unsupported-source","only media elements of type 'ImageElement' or 'VideoElement' can be persisted")):r.messages.push(new o.A("media-layer:unsupported-source","the media layer is missing a source")))}async save(t){return this._debouncedSaveOperations(Qt.X.SAVE,t)}async saveAs(t,e){return this._debouncedSaveOperations(Qt.X.SAVE_AS,e,t)}_createSource(t){if("mediaType"in t)switch(t.mediaType){case"image":return new Bt;case"video":return new Gt}return null}_getSourceOverride(t,e){if(Tt(t)&&this.originIdOf("source")===f.Gr.PORTAL_ITEM&&e&&(this.originIdOf("georeference")===f.Gr.WEB_MAP||this.originIdOf("georeference")===f.Gr.WEB_SCENE)){const n=t.toJSON(),r=this._createSource(n);return r.read({...n},{origin:"portal-item"}),r.read({georeference:e},{origin:"web-map"}),r.read({georeference:e},{origin:"web-scene"}),r}return null}};(0,r._)([(0,u.MZ)({readOnly:!0})],te.prototype,"effectiveSource",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{"web-document":{read:!0}}}})],te.prototype,"georeference",void 0),(0,r._)([(0,h.w)("web-document","georeference")],te.prototype,"readGeoreference",null),(0,r._)([(0,u.MZ)({type:String})],te.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],te.prototype,"fullExtent",null),(0,r._)([(0,u.MZ)({type:["MediaLayer"]})],te.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],te.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({nonNullable:!0,json:{write:{enabled:!0,allowNull:!1,target:{url:{type:String},mediaType:{type:["image","video"]},georeference:{type:q}},overridePolicy(t,e,n){return{enabled:!0,allowNull:!1,ignoreOrigin:wt(this,n?.origin)&&Tt(t)&&!!t.georeference&&t.originIdOf("georeference")>f.Gr.PORTAL_ITEM}}}}})],te.prototype,"source",null),(0,r._)([(0,c.w)("source")],te.prototype,"castSource",null),(0,r._)([(0,h.w)("source",["url"])],te.prototype,"readSource",null),(0,r._)([(0,d.K)("source")],te.prototype,"writeSource",null),(0,r._)([(0,u.MZ)()],te.prototype,"spatialReference",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],te.prototype,"type",void 0),te=(0,r._)([(0,p.$)("esri.layers.MediaLayer")],te);const ee=te},21287:(t,e,n)=>{n.d(e,{M5:()=>h,eV:()=>c});var r=n(78888),i=n(49186),o=n(74887),s=n(84952),a=n(26306);let l=null,u=!0;function c(t,e,n,r){if(!e||!n)throw new Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(t,e,n)}catch(t){u=!1}const i=function(t,e,n){return n||(l||(l=document.createElement("canvas"),l.width=1,l.height=1),n=l),n.getContext("2d").createImageData(t,e)}(e,n,r);return i.data.set(t,0),i}async function h(t,e){const{arrayBuffer:l,mediaType:u}=await async function(t,e){const n=(0,s.r$)(t);if(n?.isBase64)return{arrayBuffer:(0,a.M)(n.data),mediaType:n.mediaType};const i=await(0,r.A)(t,{responseType:"array-buffer",...e});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(t,e),c="image/png"===u;if("image/gif"===u){const{isAnimatedGIF:t,parseGif:r}=await n.e(820).then(n.bind(n,10820));if(t(l))return r(l,e)}if(c){const{isAnimatedPNG:t,parseApng:r}=await n.e(2390).then(n.bind(n,22390));if(t(l))return r(l,e)}return async function(t,e){const n=window.URL.createObjectURL(t);try{const{data:t}=await(0,r.A)(n,{...e,responseType:"image"});return t}catch(t){if(!(0,o.zf)(t))throw new i.A("invalid-image",`Could not fetch requested image at ${n}`);throw t}finally{window.URL.revokeObjectURL(n)}}(new Blob([l],{type:u}),e)}},25036:(t,e,n)=>{n.d(e,{j:()=>s});var r=n(90237),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608));const s=t=>{let e=class extends t{constructor(){super(...arguments),this.minScale=0,this.maxScale=0}get effectiveScaleRange(){const t={minScale:this.minScale,maxScale:this.maxScale},e=this.parent;e&&"effectiveScaleRange"in e&&function(t,e){t.minScale=t.minScale>0?e.minScale>0?Math.min(t.minScale,e.minScale):t.minScale:e.minScale,t.maxScale=t.maxScale>0?e.maxScale>0?Math.max(t.maxScale,e.maxScale):t.maxScale:e.maxScale}(t,e.effectiveScaleRange);const n=this._get("effectiveScaleRange");return n&&n.minScale===t.minScale&&n.maxScale===t.maxScale?n:t}};return(0,r._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],e.prototype,"minScale",void 0),(0,r._)([(0,i.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],e.prototype,"maxScale",void 0),(0,r._)([(0,i.MZ)({readOnly:!0})],e.prototype,"effectiveScaleRange",null),e=(0,r._)([(0,o.$)("esri.layers.mixins.ScaleRangeLayer")],e),e}},27865:(t,e,n)=>{n.d(e,{O9:()=>o,dw:()=>s,mj:()=>i});var r=n(59247);function i(t,e){const n=t.length>e.length?t:e;return(t.length>e.length?e:t).every((t,e)=>t.type===n[e].type)}function o(t,e){const n=t.length>e.length?t:e,i=t.length>e.length?e:t;for(let t=i.length;t<n.length;t++)i.push((0,r.sK)(n[t]))}function s(t){const e=t[0];return!!e&&"type"in e}},29242:(t,e,n)=>{function r(){return[1,0,0,0,1,0,0,0,1]}function i(t,e,n,r,i,o,s,a,l){return[t,e,n,r,i,o,s,a,l]}n.d(e,{fA:()=>i,vt:()=>r,zK:()=>o});const o=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:r,fromValues:i},Symbol.toStringTag,{value:"Module"}))},37585:(t,e,n)=>{n.d(e,{C:()=>i,Cc:()=>g,Io:()=>h,S8:()=>m,WQ:()=>s,e$:()=>_,hZ:()=>o,hs:()=>c,jb:()=>v,l0:()=>y});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t}function o(t,e,n){return t[0]=e,t[1]=n,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function a(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function u(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function h(t,e){const n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function p(t,e){const n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function d(t){const e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function f(t){const e=t[0],n=t[1];return e*e+n*n}function m(t,e){const n=e[0],r=e[1];let i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function g(t,e,n,r){const i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function y(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function _(t,e,n,r){const i=e[0]-n[0],o=e[1]-n[1],s=Math.sin(r),a=Math.cos(r);return t[0]=i*a-o*s+n[0],t[1]=i*s+o*a+n[1],t}const x=d,v=a,M=l,w=u,b=h,A=p,S=f;Object.freeze(Object.defineProperty({__proto__:null,add:s,angle:function(t,e){const n=t[0],r=t[1],i=e[0],o=e[1];let s=n*n+r*r;s>0&&(s=1/Math.sqrt(s));let a=i*i+o*o;a>0&&(a=1/Math.sqrt(a));const l=(n*i+r*o)*s*a;return l>1?0:l<-1?Math.PI:Math.acos(l)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},copy:i,cross:function(t,e,n){const r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},dist:b,distance:h,div:w,divide:u,dot:function(t,e){return t[0]*e[0]+t[1]*e[1]},equals:function(t,e){const n=t[0],i=t[1],o=e[0],s=e[1],a=(0,r.FD)();return Math.abs(n-o)<=a*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-s)<=a*Math.max(1,Math.abs(i),Math.abs(s))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]},floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:x,length:d,lerp:g,max:function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t},min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:M,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:m,projectAndScale:function(t,e,n,r,i){let o=e[0]-n[0],s=e[1]-n[1];const a=(r[0]*o+r[1]*s)*(i-1);return o=r[0]*a,s=r[1]*a,t[0]=e[0]+o,t[1]=e[1]+s,t},random:function(t,e=1){const n=2*(0,r.Ov)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:_,round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t},scale:c,scaleAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t},set:o,sqrDist:A,sqrLen:S,squaredDistance:p,squaredLength:f,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:v,subtract:a,transformMat2:function(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:y,transformMat3:function(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:function(t,e,n){const r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"}))},38954:(t,e,n)=>{n.d(e,{A:()=>f,B:()=>d,C:()=>c,D:()=>h,E:()=>Z,F:()=>$,H:()=>U,a:()=>B,b:()=>y,c:()=>s,d:()=>u,e:()=>A,f:()=>l,g:()=>g,h:()=>S,i:()=>a,j:()=>_,k:()=>v,l:()=>o,m:()=>P,n:()=>b,o:()=>O,q:()=>L,r:()=>w,s:()=>x,t:()=>I,u:()=>M,v:()=>E,w:()=>p,x:()=>N,y:()=>F,z:()=>m});var r=n(51850),i=n(34304);function o(t){const e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function s(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function a(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function l(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function u(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function c(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function h(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function p(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function d(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function f(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function m(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function _(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function x(t,e){const n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function v(t){const e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function M(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function w(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function b(t,e){const n=e[0],r=e[1],i=e[2];let o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function A(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function S(t,e,n){const r=e[0],i=e[1],o=e[2],s=n[0],a=n[1],l=n[2];return t[0]=i*l-o*a,t[1]=o*s-r*l,t[2]=r*a-i*s,t}function P(t,e,n,r){const i=e[0],o=e[1],s=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=s+r*(n[2]-s),t}function I(t,e,n){const r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12],t[1]=n[1]*r+n[5]*i+n[9]*o+n[13],t[2]=n[2]*r+n[6]*i+n[10]*o+n[14],t}function O(t,e,n){const r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function E(t,e,n){const r=n[0],i=n[1],o=n[2],s=n[3],a=e[0],l=e[1],u=e[2],c=i*u-o*l,h=o*a-r*u,p=r*l-i*a,d=i*p-o*h,f=o*c-r*p,m=r*h-i*c,g=2*s;return t[0]=a+c*g+2*d,t[1]=l+h*g+2*f,t[2]=u+p*g+2*m,t}const R=(0,r.vt)(),T=(0,r.vt)();function L(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function Z(t,e,n){const r=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2];let s=r*r+i*i+o*o;return s>0?(s=1/Math.sqrt(s),t[0]=r*s,t[1]=i*s,t[2]=o*s,t):(t[0]=0,t[1]=0,t[2]=0,t)}const B=u,j=c,C=h,$=_,N=x,U=o,F=v;Object.freeze(Object.defineProperty({__proto__:null,abs:p,add:l,angle:function(t,e){b(R,t),b(T,e);const n=A(R,T);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,o){const s=1-o,a=s*s,l=o*o,u=a*s,c=3*o*a,h=3*l*s,p=l*o;return t[0]=e[0]*u+n[0]*c+r[0]*h+i[0]*p,t[1]=e[1]*u+n[1]*c+r[1]*h+i[1]*p,t[2]=e[2]*u+n[2]*c+r[2]*h+i[2]*p,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:s,cross:S,crossAndNormalize:function(t,e,n){const r=e[0],i=e[1],o=e[2],s=n[0],a=n[1],l=n[2],u=i*l-o*a,c=o*s-r*l,h=r*a-i*s,p=Math.sqrt(u*u+c*c+h*h);return t[0]=u/p,t[1]=c/p,t[2]=h/p,t},direction:Z,dist:$,distance:_,div:C,divide:h,dot:A,equals:function(t,e){if(t===e)return!0;const n=t[0],r=t[1],o=t[2],s=e[0],a=e[1],l=e[2],u=(0,i.FD)();return Math.abs(n-s)<=u*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))&&Math.abs(o-l)<=u*Math.max(1,Math.abs(o),Math.abs(l))},exactEquals:L,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,o){const s=o*o,a=s*(2*o-3)+1,l=s*(o-2)+o,u=s*(o-1),c=s*(3-2*o);return t[0]=e[0]*a+n[0]*l+r[0]*u+i[0]*c,t[1]=e[1]*a+n[1]*l+r[1]*u+i[1]*c,t[2]=e[2]*a+n[2]*l+r[2]*u+i[2]*c,t},inverse:w,len:U,length:o,lerp:P,max:m,min:f,mul:j,multiply:c,negate:M,normalize:b,random:function(t,e=1){const n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,s=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(r)*s,t[1]=Math.sin(r)*s,t[2]=o*e,t},rotateX:function(t,e,n,r){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,r){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,r){const i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,set:a,sign:d,sqrDist:N,sqrLen:F,squaredDistance:x,squaredLength:v,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:B,subtract:u,transformMat3:O,transformMat4:I,transformQuat:E},Symbol.toStringTag,{value:"Module"}))},38969:(t,e,n)=>{n.d(e,{i:()=>i});var r=n(37955);function i(t,e){return new Promise((n,i)=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?n():(e((0,r.Oo)(t,"canplay",n)),e((0,r.Oo)(t,"error",i)))})}},48163:(t,e,n)=>{function r(){return[0,0]}function i(t,e){return[t,e]}function o(){return i(1,1)}function s(){return i(1,0)}function a(){return i(0,1)}n.d(e,{Un:()=>l,fA:()=>i,vt:()=>r});const l=o(),u=s(),c=a();Object.freeze(Object.defineProperty({__proto__:null,ONES:l,UNIT_X:u,UNIT_Y:c,ZEROS:[0,0],clone:function(t){return[t[0],t[1]]},create:r,freeze:function(t,e){return[t,e]},fromArray:function(t,e=[0,0]){const n=Math.min(2,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e},fromValues:i,ones:o,unitX:s,unitY:a,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},59247:(t,e,n)=>{n.d(e,{bv:()=>l,Fk:()=>u,yG:()=>c,$b:()=>h,Nd:()=>p,jm:()=>d,sK:()=>g});var r=n(40876),i=n(90629);function o(){const t=new Float32Array(16);return t[0]=1,t[5]=1,t[10]=1,t[15]=1,t}const s=o();Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:function(t){const e=new Float32Array(16);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},create:o,fromValues:function(t,e,n,r,i,o,s,a,l,u,c,h,p,d,f,m){const g=new Float32Array(16);return g[0]=t,g[1]=e,g[2]=n,g[3]=r,g[4]=i,g[5]=o,g[6]=s,g[7]=a,g[8]=l,g[9]=u,g[10]=c,g[11]=h,g[12]=p,g[13]=d,g[14]=f,g[15]=m,g}},Symbol.toStringTag,{value:"Module"}));var a=n(58083);class l{constructor(t,e,n){this.strength=t,this.radius=e,this.threshold=n,this.type="bloom"}interpolate(t,e,n){this.strength=f(t.strength,e.strength,n),this.radius=f(t.radius,e.radius,n),this.threshold=f(t.threshold,e.threshold,n)}clone(){return new l(this.strength,this.radius,this.threshold)}toJSON(){return{type:"bloom",radius:m(this.radius),strength:this.strength,threshold:this.threshold}}}class u{constructor(t){this.radius=t,this.type="blur"}interpolate(t,e,n){this.radius=Math.round(f(t.radius,e.radius,n))}clone(){return new u(this.radius)}toJSON(){return{type:"blur",radius:m(this.radius)}}}class c{constructor(t,e){this.type=t,this.amount=e,"invert"!==this.type&&"grayscale"!==this.type&&"sepia"!==this.type||(this.amount=Math.min(this.amount,1))}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.amount=f(t.amount,e.amount,n),this._updateMatrix()}clone(){return new c(this.type,this.amount)}toJSON(){return{type:this.type,amount:this.amount}}_updateMatrix(){const t=this._colorMatrix||o();switch(this.type){case"brightness":this._colorMatrix=((t,e)=>{const n=(0,a.hZ)(t,e,0,0,0,0,e,0,0,0,0,e,0,0,0,0,1);return(0,a.mg)(n,n)})(t,this.amount);break;case"contrast":this._colorMatrix=((t,e)=>{const n=(0,a.hZ)(t,e,0,0,.5-.5*e,0,e,0,.5-.5*e,0,0,e,.5-.5*e,0,0,0,1);return(0,a.mg)(n,n)})(t,this.amount);break;case"grayscale":this._colorMatrix=(t=>{const e=1-this.amount,n=(0,a.hZ)(t,.2126+.7874*e,.7152-.7152*e,.0722-.0722*e,0,.2126-.2126*e,.7152+.2848*e,.0722-.0722*e,0,.2126-.2126*e,.7152-.7152*e,.0722+.9278*e,0,0,0,0,1);return(0,a.mg)(n,n)})(t);break;case"invert":this._colorMatrix=((t,e)=>{const n=1-2*e,r=(0,a.hZ)(t,n,0,0,e,0,n,0,e,0,0,n,e,0,0,0,1);return(0,a.mg)(r,r)})(t,this.amount);break;case"saturate":this._colorMatrix=((t,e)=>{const n=(0,a.hZ)(t,.213+.787*e,.715-.715*e,.072-.072*e,0,.213-.213*e,.715+.285*e,.072-.072*e,0,.213-.213*e,.715-.715*e,.072+.928*e,0,0,0,0,1);return(0,a.mg)(n,n)})(t,this.amount);break;case"sepia":this._colorMatrix=(t=>{const e=1-this.amount,n=(0,a.hZ)(t,.393+.607*e,.769-.769*e,.189-.189*e,0,.349-.349*e,.686+.314*e,.168-.168*e,0,.272-.272*e,.534-.534*e,.131+.869*e,0,0,0,0,1);return(0,a.mg)(n,n)})(t)}}}class h{constructor(t,e,n,r){this.offsetX=t,this.offsetY=e,this.blurRadius=n,this.color=r,this.type="drop-shadow"}interpolate(t,e,n){this.offsetX=f(t.offsetX,e.offsetX,n),this.offsetY=f(t.offsetY,e.offsetY,n),this.blurRadius=f(t.blurRadius,e.blurRadius,n),this.color[0]=Math.round(f(t.color[0],e.color[0],n)),this.color[1]=Math.round(f(t.color[1],e.color[1],n)),this.color[2]=Math.round(f(t.color[2],e.color[2],n)),this.color[3]=f(t.color[3],e.color[3],n)}clone(){return new h(this.offsetX,this.offsetY,this.blurRadius,[...this.color])}toJSON(){const t=[...this.color];return t[3]*=255,{type:"drop-shadow",xoffset:m(this.offsetX),yoffset:m(this.offsetY),blurRadius:m(this.blurRadius),color:t}}}class p{constructor(t){this.angle=t,this.type="hue-rotate"}get colorMatrix(){return this._colorMatrix||this._updateMatrix(),this._colorMatrix}interpolate(t,e,n){this.angle=f(t.angle,e.angle,n),this._updateMatrix()}clone(){return new p(this.angle)}toJSON(){return{type:"hue-rotate",angle:this.angle}}_updateMatrix(){const t=this._colorMatrix||o();this._colorMatrix=((t,e)=>{const n=Math.sin(e*Math.PI/180),r=Math.cos(e*Math.PI/180),i=(0,a.hZ)(t,.213+.787*r-.213*n,.715-.715*r-.715*n,.072-.072*r+.928*n,0,.213-.213*r+.143*n,.715+.285*r+.14*n,.072-.072*r-.283*n,0,.213-.213*r-.787*n,.715-.715*r+.715*n,.072+.928*r+.072*n,0,0,0,0,1);return(0,a.mg)(i,i)})(t,this.angle)}}class d{constructor(t){this.amount=t,this.type="opacity",this.amount=Math.min(this.amount,1)}interpolate(t,e,n){this.amount=f(t.amount,e.amount,n)}clone(){return new d(this.amount)}toJSON(){return{type:"opacity",amount:this.amount}}}function f(t,e,n){return t+(e-t)*n}function m(t){return Math.round(1e3*(0,i.PN)(t))/1e3}function g(t){switch(t.type){case"grayscale":case"sepia":case"invert":return new c(t.type,0);case"saturate":case"brightness":case"contrast":return new c(t.type,1);case"opacity":return new d(1);case"hue-rotate":return new p(0);case"blur":return new u(0);case"drop-shadow":return new h(0,0,0,[...(0,r.TS)("transparent")]);case"bloom":return new l(0,0,1)}}},62885:(t,e,n)=>{n.d(e,{H:()=>o,V:()=>i});var r=n(5503);function i(t,e,n=r.A){return e||(e=new n),e===t||(e.removeAll(),(i=t)&&(Array.isArray(i)||"items"in i&&Array.isArray(i.items))?e.addMany(t):t&&e.add(t)),e;var i}function o(t){return t}},63074:(t,e,n)=>{n.d(e,{LF:()=>c,dM:()=>h,sU:()=>l});var r=n(90237),i=n(10107),o=(n(44208),n(53966),n(87811),n(40608)),s=n(89317),a=n(76369);const l={type:["average","color-burn","color-dodge","color","darken","destination-atop","destination-in","destination-out","destination-over","difference","exclusion","hard-light","hue","invert","lighten","lighter","luminosity","minus","multiply","normal","overlay","plus","reflect","saturation","screen","soft-light","source-atop","source-in","source-out","vivid-light","xor"],nonNullable:!0,json:{read:!1,write:!1,origins:{"web-map":{read:!0,write:{layerContainerTypes:s.K}},"portal-item":{read:!0,write:{layerContainerTypes:s.K}}}}},u={read:{reader:a.LF},write:{allowNull:!0,writer:a.M9,layerContainerTypes:s.K}},c={json:{read:!1,write:!1,origins:{"web-map":u,"portal-item":u}}},h=t=>{let e=class extends t{constructor(){super(...arguments),this.blendMode="normal",this.effect=null}};return(0,r._)([(0,i.MZ)(l)],e.prototype,"blendMode",void 0),(0,r._)([(0,i.MZ)(c)],e.prototype,"effect",void 0),e=(0,r._)([(0,o.$)("esri.layers.mixins.BlendLayer")],e),e}},64272:(t,e,n)=>{n.d(e,{T:()=>p});var r,i=n(90237),o=n(25482),s=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),u=n(40608),c=n(43937),h=n(98623);let p=class extends o.A{static{r=this}static get allTime(){return d}static get empty(){return f}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,i=t.end?.getTime()??t.end;return e===r&&n===i}expandTo(t,e=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,s.lL)(n,t,e));let i=this.end;if(i){const n=(0,s.lL)(i,t,e);i=i.getTime()===n.getTime()?n:(0,s.S1)(n,1,t,e)}return new r({start:n,end:i})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,i=t.start?.getTime()??-1/0,o=t.end?.getTime()??1/0;let s,a;return i>=e&&i<=n?s=i:e>=i&&e<=o&&(s=e),n>=i&&n<=o?a=n:o>=e&&o<=n&&(a=o),null==s||null==a||isNaN(s)||isNaN(a)?r.empty:new r({start:s===-1/0?null:new Date(s),end:a===1/0?null:new Date(a)})}offset(t,e,n=h.qU){if(this.isEmpty||this.isAllTime)return this.clone();const i=new r,{start:o,end:a}=this;return null!=o&&(i.start=(0,s.S1)(o,t,e,n)),null!=a&&(i.end=(0,s.S1)(a,t,e,n)),i}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return d.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:n})}};(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,i._)([(0,l.w)("end")],p.prototype,"readEnd",null),(0,i._)([(0,c.K)("end")],p.prototype,"writeEnd",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,i._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,i._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,i._)([(0,l.w)("start")],p.prototype,"readStart",null),(0,i._)([(0,c.K)("start")],p.prototype,"writeStart",null),p=r=(0,i._)([(0,u.$)("esri.time.TimeExtent")],p);const d=new p,f=new p({start:void 0,end:void 0})},69540:(t,e,n)=>{n.d(e,{A:()=>p});var r=n(90237),i=n(69622),o=(n(44208),n(4718)),s=(n(53966),n(97768)),a=n(35666),l=n(88620),u=n(40608);const c=t=>{let e=class extends t{clone(){const t=(0,l.oY)(this);(0,s.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,n=t.store,r={},i=new Map;for(const t in e){const s=e[t],l=n?.originOf(t),u=s.clonable;if(s.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const c=this[t];let h=null;h="function"==typeof u?u(c):"reference"===u?c:(0,o.TU)(c),null!=c&&null==h||(l===a.Gr.DEFAULTS?i.set(t,h):r[t]=h)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(i.size){const t=(0,l.oY)(u)?.store;if(t)for(const[e,n]of i)t.set(e,n,a.Gr.DEFAULTS)}return u}};return e=(0,r._)([(0,u.$)("esri.core.Clonable")],e),e};let h=class extends(c(i.A)){};h=(0,r._)([(0,u.$)("esri.core.Clonable")],h),(h||(h={})).ClonableMixin=c;const p=h},75503:(t,e,n)=>{n.d(e,{E:()=>S,w:()=>a});var r=n(4576),i=n(21818),o=(n(44208),n(3694)),s=n(11006);class a{constructor(t=9,e){this._compareMinX=p,this._compareMinY=d,this._toBBox=t=>t,this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&("function"==typeof e?this._toBBox=e:this._initFormat(e)),this.clear()}destroy(){this.clear(),M.prune(),w.prune(),b.prune(),A.prune()}all(t){l(this._data,t)}search(t,e){let n=this._data;const r=this._toBBox;if(x(t,n))for(M.clear();n;){for(let i=0,o=n.children.length;i<o;i++){const o=n.children[i],s=n.leaf?r(o):o;x(t,s)&&(n.leaf?e(o):_(t,s)?l(o,e):M.push(o))}n=M.pop()}}collides(t){let e=this._data;const n=this._toBBox;if(!x(t,e))return!1;for(M.clear();e;){for(let r=0,i=e.children.length;r<i;r++){const i=e.children[r],o=e.leaf?n(i):i;if(x(t,o)){if(e.leaf||_(t,o))return!0;M.push(i)}}e=M.pop()}return!1}load(t){if(!t.length)return this;if(t.length<this._minEntries){for(let e=0,n=t.length;e<n;e++)this.insert(t[e]);return this}let e=this._build(t.slice(),0,t.length-1,0);if(this._data.children.length)if(this._data.height===e.height)this._splitRoot(this._data,e);else{if(this._data.height<e.height){const t=this._data;this._data=e,e=t}this._insert(e,this._data.height-e.height-1,!0)}else this._data=e;return this}insert(t){return t&&this._insert(t,this._data.height-1),this}clear(){return this._data=new I([]),this}remove(t){if(!t)return this;let e,n=this._data,o=null,s=0,a=!1;const l=this._toBBox(t);for(b.clear(),A.clear();n||b.length>0;){if(n||(n=b.pop(),o=b.data[b.length-1],s=A.pop()??0,a=!0),n.leaf&&(e=(0,r.qh)(n.children,(0,i.zI)(t),n.children.length,n.indexHint),-1!==e))return n.children.splice(e,1),b.push(n),this._condense(b),this;a||n.leaf||!_(n,l)?o?(s++,n=o.children[s],a=!1):n=null:(b.push(n),A.push(s),s=0,o=n,n=n.children[0])}return this}toJSON(){return this._data}fromJSON(t){return this._data=t,this}_build(t,e,n,r){const i=n-e+1;let o=this._maxEntries;if(i<=o){const r=new I(t.slice(e,n+1));return u(r,this._toBBox),r}r||(r=Math.ceil(Math.log(i)/Math.log(o)),o=Math.ceil(i/o**(r-1)));const s=new O([]);s.height=r;const a=Math.ceil(i/o),l=a*Math.ceil(Math.sqrt(o));v(t,e,n,l,this._compareMinX);for(let i=e;i<=n;i+=l){const e=Math.min(i+l-1,n);v(t,i,e,a,this._compareMinY);for(let n=i;n<=e;n+=a){const i=Math.min(n+a-1,e);s.children.push(this._build(t,n,i,r-1))}}return u(s,this._toBBox),s}_insert(t,e,n){const r=this._toBBox,i=n?t:r(t);b.clear();const o=function(t,e,n,r){for(;r.push(e),!0!==e.leaf&&r.length-1!==n;){let n,r=1/0,i=1/0;for(let o=0,s=e.children.length;o<s;o++){const s=e.children[o],a=f(s),l=g(t,s)-a;l<i?(i=l,r=a<r?a:r,n=s):l===i&&a<r&&(r=a,n=s)}e=n||e.children[0]}return e}(i,this._data,e,b);for(o.children.push(t),h(o,i);e>=0&&b.data[e].children.length>this._maxEntries;)this._split(b,e),e--;!function(t,e,n){for(let r=n;r>=0;r--)h(e.data[r],t)}(i,b,e)}_split(t,e){const n=t.data[e],r=n.children.length,i=this._minEntries;this._chooseSplitAxis(n,i,r);const o=this._chooseSplitIndex(n,i,r);if(!o)return;const s=n.children.splice(o,n.children.length-o),a=n.leaf?new I(s):new O(s);a.height=n.height,u(n,this._toBBox),u(a,this._toBBox),e?t.data[e-1].children.push(a):this._splitRoot(n,a)}_splitRoot(t,e){this._data=new O([t,e]),this._data.height=t.height+1,u(this._data,this._toBBox)}_chooseSplitIndex(t,e,n){let r,i,o;r=i=1/0;for(let s=e;s<=n-e;s++){const e=c(t,0,s,this._toBBox),a=c(t,s,n,this._toBBox),l=y(e,a),u=f(e)+f(a);l<r?(r=l,o=s,i=u<i?u:i):l===r&&u<i&&(i=u,o=s)}return o}_chooseSplitAxis(t,e,n){const r=t.leaf?this._compareMinX:p,i=t.leaf?this._compareMinY:d;this._allDistMargin(t,e,n,r)<this._allDistMargin(t,e,n,i)&&t.children.sort(r)}_allDistMargin(t,e,n,r){t.children.sort(r);const i=this._toBBox,o=c(t,0,e,i),s=c(t,n-e,n,i);let a=m(o)+m(s);for(let r=e;r<n-e;r++){const e=t.children[r];h(o,t.leaf?i(e):e),a+=m(o)}for(let r=n-e-1;r>=e;r--){const e=t.children[r];h(s,t.leaf?i(e):e),a+=m(s)}return a}_condense(t){for(let e=t.length-1;e>=0;e--){const n=t.data[e];if(0===n.children.length)if(e>0){const i=t.data[e-1],o=i.children;o.splice((0,r.qh)(o,n,o.length,i.indexHint),1)}else this.clear();else u(n,this._toBBox)}}_initFormat(t){const e=["return a"," - b",";"];this._compareMinX=new Function("a","b",e.join(t[0])),this._compareMinY=new Function("a","b",e.join(t[1])),this._toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}function l(t,e){let n=t;for(w.clear();n;){if(!0===n.leaf)for(const t of n.children)e((0,i.zI)(t));else w.pushArray(n.children);n=w.pop()??null}}function u(t,e){c(t,0,t.children.length,e,t)}function c(t,e,n,r,i){i||(i=new I([])),i.minX=1/0,i.minY=1/0,i.maxX=-1/0,i.maxY=-1/0;for(let o,s=e;s<n;s++)o=t.children[s],h(i,t.leaf?r(o):o);return i}function h(t,e){t.minX=Math.min(t.minX,e.minX),t.minY=Math.min(t.minY,e.minY),t.maxX=Math.max(t.maxX,e.maxX),t.maxY=Math.max(t.maxY,e.maxY)}function p(t,e){return t.minX-e.minX}function d(t,e){return t.minY-e.minY}function f(t){return(t.maxX-t.minX)*(t.maxY-t.minY)}function m(t){return t.maxX-t.minX+(t.maxY-t.minY)}function g(t,e){return(Math.max(e.maxX,t.maxX)-Math.min(e.minX,t.minX))*(Math.max(e.maxY,t.maxY)-Math.min(e.minY,t.minY))}function y(t,e){const n=Math.max(t.minX,e.minX),r=Math.max(t.minY,e.minY),i=Math.min(t.maxX,e.maxX),o=Math.min(t.maxY,e.maxY);return Math.max(0,i-n)*Math.max(0,o-r)}function _(t,e){return t.minX<=e.minX&&t.minY<=e.minY&&e.maxX<=t.maxX&&e.maxY<=t.maxY}function x(t,e){return e.minX<=t.maxX&&e.minY<=t.maxY&&e.maxX>=t.minX&&e.maxY>=t.minY}function v(t,e,n,r,i){const o=[e,n];for(;o.length;){const e=o.pop(),n=o.pop();if(e-n<=r)continue;const a=n+Math.ceil((e-n)/r/2)*r;(0,s.q)(t,a,n,e,i),o.push(n,a,a,e)}}const M=new o.A,w=new o.A,b=new o.A,A=new o.A({deallocator:void 0});class S{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}}class P extends S{constructor(){super(...arguments),this.height=1,this.indexHint=new r.vW}}class I extends P{constructor(t){super(),this.children=t,this.leaf=!0}}class O extends P{constructor(t){super(),this.children=t,this.leaf=!1}}},76369:(t,e,n)=>{n.d(e,{LF:()=>w,M9:()=>b});var r=n(49186),i=n(93637),o=n(40876),s=n(59247),a=n(27865);class l extends SyntaxError{constructor(t,e,n,r){super(t),this.expected=e,this.found=n,this.location=r,this.name="SyntaxError"}format(t){let e="Error: "+this.message;if(this.location){let n=null;const r=t.find(t=>t.source===this.location.source);r&&(n=r.text.split(/\r\n|\n|\r/g));const i=this.location.start,o=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(i):i,s=this.location.source+":"+o.line+":"+o.column;if(n){const t=this.location.end,r="".padEnd(o.line.toString().length," "),a=n[i.line-1],l=(i.line===t.line?t.column:a.length+1)-i.column||1;e+="\n --\x3e "+s+"\n"+r+" |\n"+o.line+" | "+a+"\n"+r+" | "+"".padEnd(i.column-1," ")+"".padEnd(l,"^")}else e+="\n at "+s}return e}static buildMessage(t,e){function n(t){return t.codePointAt(0).toString(16).toUpperCase()}const r=Object.prototype.hasOwnProperty.call(RegExp.prototype,"unicode")?new RegExp("[\\p{C}\\p{Mn}\\p{Mc}]","gu"):null;function i(t){return r?t.replace(r,t=>"\\u{"+n(t)+"}"):t}function o(t){return i(t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+n(t)).replace(/[\x10-\x1F\x7F-\x9F]/g,t=>"\\x"+n(t)))}function s(t){return i(t.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,t=>"\\x0"+n(t)).replace(/[\x10-\x1F\x7F-\x9F]/g,t=>"\\x"+n(t)))}const a={literal:t=>'"'+o(t.text)+'"',class(t){const e=t.parts.map(t=>Array.isArray(t)?s(t[0])+"-"+s(t[1]):s(t));return"["+(t.inverted?"^":"")+e.join("")+"]"+(t.unicode?"u":"")},any:()=>"any character",end:()=>"end of input",other:t=>t.description};function l(t){return a[t.type](t)}return"Expected "+function(t){const e=t.map(l);if(e.sort(),e.length>0){let t=1;for(let n=1;n<e.length;n++)e[n-1]!==e[n]&&(e[t]=e[n],t++);e.length=t}switch(e.length){case 1:return e[0];case 2:return e[0]+" or "+e[1];default:return e.slice(0,-1).join(", ")+", or "+e[e.length-1]}}(t)+" but "+function(t){return t?'"'+o(t)+'"':"end of input"}(e)+" found."}}function u(t){if(!t||0===t.length)return null;if("string"==typeof t){const e=c(t);return e&&0!==e.length?e:null}const e=t.map(t=>{if(!Number.isFinite(t.scale)||t.scale<=0)throw new r.A("effect:invalid-scale","scale must be finite and greater than 0",{stop:t});return{scale:t.scale,effects:c(t.value)}});e.sort((t,e)=>e.effects.length-t.effects.length);for(let t=0;t<e.length-1;t++){if(!(0,a.mj)(e[t].effects,e[t+1].effects))throw new r.A("effect:interpolation-impossible","Cannot interpolate by scale between 2 lists of mixed effects",{a:e[t].effects,b:e[t+1].effects});(0,a.O9)(e[t].effects,e[t+1].effects)}return e.sort((t,e)=>e.scale-t.scale),e}function c(t){let e;if(!t)return[];try{e=function(t,e){const n={},r=(e=void 0!==e?e:{}).grammarSource,i={start:Mt};let o=Mt;const s="none",a=")",u=",",c="(",h="%",p="px",d="cm",f="mm",m="in",g="pt",y="pc",_="deg",x="rad",v="grad",M="turn",w="#",b=".",A="e",S=/^[ \t\n\r]/,P=/^[a-z\-]/,I=/^[0-9a-fA-F]/,O=/^[+\-]/,E=/^[0-9]/,R=yt("none"),T=mt("none",!1),L=mt(")",!1),Z=mt(",",!1),B=gt([" ","\t","\n","\r"],!1,!1,!1),j=yt("function"),C=mt("(",!1),$=yt("identifier"),N=gt([["a","z"],"-"],!1,!1,!1),U=yt("percentage"),F=mt("%",!1),Y=yt("length"),X=mt("px",!1),D=mt("cm",!1),q=mt("mm",!1),k=mt("in",!1),z=mt("pt",!1),V=mt("pc",!1),H=yt("angle"),G=mt("deg",!1),W=mt("rad",!1),J=mt("grad",!1),K=mt("turn",!1),Q=yt("number"),tt=yt("color"),et=mt("#",!1),nt=gt([["0","9"],["a","f"],["A","F"]],!1,!1,!1),rt=gt(["+","-"],!1,!1,!1),it=gt([["0","9"]],!1,!1,!1),ot=mt(".",!1),st=mt("e",!1);let at=0|e.peg$currPos,lt=at;const ut=[{line:1,column:1}];let ct,ht=at,pt=e.peg$maxFailExpected||[],dt=0|e.peg$silentFails;if(e.startRule){if(!(e.startRule in i))throw new Error("Can't start parsing from rule \""+e.startRule+'".');o=i[e.startRule]}function ft(){return t.substring(lt,at)}function mt(t,e){return{type:"literal",text:t,ignoreCase:e}}function gt(t,e,n,r){return{type:"class",parts:t,inverted:e,ignoreCase:n,unicode:r}}function yt(t){return{type:"other",description:t}}function _t(e){let n,r=ut[e];if(r)return r;if(e>=ut.length)n=ut.length-1;else for(n=e;!ut[--n];);for(r=ut[n],r={line:r.line,column:r.column};n<e;)10===t.charCodeAt(n)?(r.line++,r.column=1):r.column++,n++;return ut[e]=r,r}function xt(t,e,n){const i=_t(t),o=_t(e);return{source:r,start:{offset:t,line:i.line,column:i.column},end:{offset:e,line:o.line,column:o.column}}}function vt(t){at<ht||(at>ht&&(ht=at,pt=[]),pt.push(t))}function Mt(){let t;return t=wt(),t===n&&(t=function(){let t,e;if(t=[],e=bt(),e!==n)for(;e!==n;)t.push(e),e=bt();else t=n;return t}()),t}function wt(){let e,r;return dt++,e=at,St(),t.substr(at,4)===s?(r=s,at+=4):(r=n,0===dt&&vt(T)),r!==n?(St(),lt=e,e=[]):(at=e,e=n),dt--,e===n&&0===dt&&vt(R),e}function bt(){let e,r,i,o;return e=at,St(),r=function(){let e,r,i;return dt++,e=at,r=Pt(),r!==n?(40===t.charCodeAt(at)?(i=c,at++):(i=n,0===dt&&vt(C)),i!==n?(lt=e,e=r):(at=e,e=n)):(at=e,e=n),dt--,e===n&&(r=n,0===dt&&vt(j)),e}(),r!==n?(St(),i=function(){let e,r,i,o,s,a,l,c;if(e=at,r=At(),r!==n){for(i=[],o=at,s=St(),44===t.charCodeAt(at)?(a=u,at++):(a=n,0===dt&&vt(Z)),a===n&&(a=null),l=St(),c=At(),c!==n?(s=[s,a,l,c],o=s):(at=o,o=n);o!==n;)i.push(o),o=at,s=St(),44===t.charCodeAt(at)?(a=u,at++):(a=n,0===dt&&vt(Z)),a===n&&(a=null),l=St(),c=At(),c!==n?(s=[s,a,l,c],o=s):(at=o,o=n);lt=e,e=function(t,e){return e.length>0?function(t,e){return[t].concat(function(t){return t.map(function(t){return t[3]})}(e))}(t,e):[t]}(r,i)}else at=e,e=n;return e}(),i===n&&(i=null),St(),41===t.charCodeAt(at)?(o=a,at++):(o=n,0===dt&&vt(L)),o!==n?(St(),lt=e,e=function(t,e){return{type:"function",name:t,parameters:e||[]}}(r,i)):(at=e,e=n)):(at=e,e=n),e}function At(){let t,e;return t=at,e=It(),e===n&&(e=Ot(),e===n&&(e=Et(),e===n&&(e=function(){let t,e;return dt++,t=at,St(),e=Tt(),e!==n?(lt=t,t=function(t){return{value:t,unit:null}}(e)):(at=t,t=n),dt--,t===n&&0===dt&&vt(Q),t}()))),e!==n&&(lt=t,e=function(t){return{type:"quantity",value:t.value,unit:t.unit}}(e)),t=e,t===n&&(t=at,e=Rt(),e!==n&&(lt=t,e=function(t){return{type:"color",colorType:t.type,value:t.value}}(e)),t=e),t}function St(){let e,r;for(dt++,e=[],r=t.charAt(at),S.test(r)?at++:(r=n,0===dt&&vt(B));r!==n;)e.push(r),r=t.charAt(at),S.test(r)?at++:(r=n,0===dt&&vt(B));return dt--,e}function Pt(){let e,r,i;if(dt++,e=at,r=[],i=t.charAt(at),P.test(i)?at++:(i=n,0===dt&&vt(N)),i!==n)for(;i!==n;)r.push(i),i=t.charAt(at),P.test(i)?at++:(i=n,0===dt&&vt(N));else r=n;return r!==n&&(lt=e,r=ft()),e=r,dt--,e===n&&(r=n,0===dt&&vt($)),e}function It(){let e,r,i;return dt++,e=at,St(),r=Tt(),r!==n?(37===t.charCodeAt(at)?(i=h,at++):(i=n,0===dt&&vt(F)),i!==n?(lt=e,e=function(t){return{value:t,unit:"%"}}(r)):(at=e,e=n)):(at=e,e=n),dt--,e===n&&0===dt&&vt(U),e}function Ot(){let e,r,i;return dt++,e=at,St(),r=Tt(),r!==n?(t.substr(at,2)===p?(i=p,at+=2):(i=n,0===dt&&vt(X)),i!==n?(lt=e,e=function(t){return{value:t,unit:"px"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,St(),r=Tt(),r!==n?(t.substr(at,2)===d?(i=d,at+=2):(i=n,0===dt&&vt(D)),i!==n?(lt=e,e=function(t){return{value:t,unit:"cm"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,St(),r=Tt(),r!==n?(t.substr(at,2)===f?(i=f,at+=2):(i=n,0===dt&&vt(q)),i!==n?(lt=e,e=function(t){return{value:t,unit:"mm"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,St(),r=Tt(),r!==n?(t.substr(at,2)===m?(i=m,at+=2):(i=n,0===dt&&vt(k)),i!==n?(lt=e,e=function(t){return{value:t,unit:"in"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,St(),r=Tt(),r!==n?(t.substr(at,2)===g?(i=g,at+=2):(i=n,0===dt&&vt(z)),i!==n?(lt=e,e=function(t){return{value:t,unit:"pt"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,St(),r=Tt(),r!==n?(t.substr(at,2)===y?(i=y,at+=2):(i=n,0===dt&&vt(V)),i!==n?(lt=e,e=function(t){return{value:t,unit:"pc"}}(r)):(at=e,e=n)):(at=e,e=n)))))),dt--,e===n&&0===dt&&vt(Y),e}function Et(){let e,r,i;return dt++,e=at,r=Tt(),r!==n?(t.substr(at,3)===_?(i=_,at+=3):(i=n,0===dt&&vt(G)),i!==n?(lt=e,e=function(t){return{value:t,unit:"deg"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,r=Tt(),r!==n?(t.substr(at,3)===x?(i=x,at+=3):(i=n,0===dt&&vt(W)),i!==n?(lt=e,e=function(t){return{value:t,unit:"rad"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,r=Tt(),r!==n?(t.substr(at,4)===v?(i=v,at+=4):(i=n,0===dt&&vt(J)),i!==n?(lt=e,e=function(t){return{value:t,unit:"grad"}}(r)):(at=e,e=n)):(at=e,e=n),e===n&&(e=at,r=Tt(),r!==n?(t.substr(at,4)===M?(i=M,at+=4):(i=n,0===dt&&vt(K)),i!==n?(lt=e,e=function(t){return{value:t,unit:"turn"}}(r)):(at=e,e=n)):(at=e,e=n)))),dt--,e===n&&(r=n,0===dt&&vt(H)),e}function Rt(){let e,r,i,o;if(dt++,e=at,35===t.charCodeAt(at)?(r=w,at++):(r=n,0===dt&&vt(et)),r!==n){if(i=[],o=t.charAt(at),I.test(o)?at++:(o=n,0===dt&&vt(nt)),o!==n)for(;o!==n;)i.push(o),o=t.charAt(at),I.test(o)?at++:(o=n,0===dt&&vt(nt));else i=n;i!==n?(lt=e,e={type:"hex",value:ft()}):(at=e,e=n)}else at=e,e=n;return e===n&&(e=at,r=bt(),r!==n&&(lt=e,r=function(t){return{type:"function",value:t}}(r)),e=r,e===n&&(e=at,r=Pt(),r!==n&&(lt=e,r={type:"named",value:ft()}),e=r)),dt--,e===n&&(r=n,0===dt&&vt(tt)),e}function Tt(){let e,r,i,o,s,a,l,u;for(e=at,r=t.charAt(at),O.test(r)?at++:(r=n,0===dt&&vt(rt)),r===n&&(r=null),i=at,o=[],s=t.charAt(at),E.test(s)?at++:(s=n,0===dt&&vt(it));s!==n;)o.push(s),s=t.charAt(at),E.test(s)?at++:(s=n,0===dt&&vt(it));if(46===t.charCodeAt(at)?(s=b,at++):(s=n,0===dt&&vt(ot)),s!==n){if(a=[],l=t.charAt(at),E.test(l)?at++:(l=n,0===dt&&vt(it)),l!==n)for(;l!==n;)a.push(l),l=t.charAt(at),E.test(l)?at++:(l=n,0===dt&&vt(it));else a=n;a!==n?(o=[o,s,a],i=o):(at=i,i=n)}else at=i,i=n;if(i===n)if(i=[],o=t.charAt(at),E.test(o)?at++:(o=n,0===dt&&vt(it)),o!==n)for(;o!==n;)i.push(o),o=t.charAt(at),E.test(o)?at++:(o=n,0===dt&&vt(it));else i=n;if(i!==n){if(o=at,101===t.charCodeAt(at)?(s=A,at++):(s=n,0===dt&&vt(st)),s!==n){if(a=t.charAt(at),O.test(a)?at++:(a=n,0===dt&&vt(rt)),a===n&&(a=null),l=[],u=t.charAt(at),E.test(u)?at++:(u=n,0===dt&&vt(it)),u!==n)for(;u!==n;)l.push(u),u=t.charAt(at),E.test(u)?at++:(u=n,0===dt&&vt(it));else l=n;l!==n?(s=[s,a,l],o=s):(at=o,o=n)}else at=o,o=n;o===n&&(o=null),lt=e,e=parseFloat(ft())}else at=e,e=n;return e}ct=o();const Lt=ct!==n&&at===t.length;function Zt(){throw ct!==n&&at<t.length&&vt({type:"end"}),function(t,e,n){return new l(l.buildMessage(t,e),t,e,n)}(pt,ht<t.length?function(e=at){const n=t.codePointAt(e);return void 0===n?"":String.fromCodePoint(n)}(ht):null,ht<t.length?xt(ht,ht+1):xt(ht,ht))}return e.peg$library?{peg$result:ct,peg$currPos:at,peg$FAILED:n,peg$maxFailExpected:pt,peg$maxFailPos:ht,peg$success:Lt,peg$throw:Lt?void 0:Zt}:Lt?ct:void Zt()}(t)}catch(e){throw new r.A("effect:invalid-syntax","Invalid effect syntax",{value:t,error:e})}return e.map(t=>function(t){try{switch(t.name){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":return function(t){let e=1;return h(t.parameters,1),1===t.parameters.length&&(e=g(t.parameters[0])),new s.yG(t.name,e)}(t);case"opacity":return function(t){let e=1;return h(t.parameters,1),1===t.parameters.length&&(e=g(t.parameters[0])),new s.jm(e)}(t);case"hue-rotate":return function(t){let e=0;return h(t.parameters,1),1===t.parameters.length&&(e=function(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=f[t.unit]))throw new r.A("effect:type-error",`Expected <angle>, Actual: ${p(t)}`,{term:t})}(t),t.value*f[t.unit]||0}(t.parameters[0])),new s.Nd(e)}(t);case"blur":return function(t){let e=0;return h(t.parameters,1),1===t.parameters.length&&(e=y(t.parameters[0]),d(e,t.parameters[0])),new s.Fk(e)}(t);case"drop-shadow":return function(t){const e=[];let n=null;for(const i of t.parameters)if("color"===i.type){if(e.length&&Object.freeze(e),n)throw new r.A("effect:type-error","Accepts only one color",{});n=_(i)}else{const t=y(i);if(Object.isFrozen(e))throw new r.A("effect:type-error","<length> parameters not consecutive",{lengths:e});e.push(t),3===e.length&&d(t,i)}if(e.length<2||e.length>3)throw new r.A("effect:type-error",`Expected <length>{2,3}, Actual: <length>{${e.length}}`,{lengths:e});return new s.$b(e[0],e[1],e[2]||0,n||x("black"))}(t);case"bloom":return function(t){let e=1,n=0,r=0;return h(t.parameters,3),t.parameters[0]&&(e=g(t.parameters[0])),t.parameters[1]&&(n=y(t.parameters[1]),d(n,t.parameters[1])),t.parameters[2]&&(r=g(t.parameters[2])),new s.bv(e,n,r)}(t)}}catch(e){throw e.details.filter=t,e}throw new r.A("effect:unknown-effect",`Effect '${t.name}' is not supported`,{effect:t})}(t))}function h(t,e){if(t.length>e)throw new r.A("effect:type-error",`Function supports up to ${e} parameters, Actual: ${t.length}`,{parameters:t})}function p(t){if("color"===t.type)return"<color>";if(t.unit){if(t.unit in m)return"<length>";if(t.unit in f)return"<angle>";if("%"===t.unit)return"<percentage>"}return"<double>"}function d(t,e){if(t<0)throw new r.A("effect:type-error",`Negative values are not allowed, Actual: ${t}`,{term:e})}const f={deg:1,grad:.9,rad:180/Math.PI,turn:360},m={px:1,cm:96/2.54,mm:96/2.54/10,in:96,pc:16,pt:96/72};function g(t){!function(t){if("quantity"!==t.type||null!==t.unit&&"%"!==t.unit)throw new r.A("effect:type-error",`Expected <double> or <percentage>, Actual: ${p(t)}`,{term:t})}(t);const e=t.value;return d(e,t),"%"===t.unit?.01*e:e}function y(t){return function(t){if("quantity"!==t.type||!(0===t.value&&null===t.unit||t.unit&&null!=m[t.unit]))throw new r.A("effect:type-error",`Expected <length>, Actual: ${p(t)}`,{term:t})}(t),t.value*m[t.unit]||0}function _(t){switch(t.colorType){case"hex":return(0,o.j5)(t.value);case"named":return x(t.value);case"function":return function(t){if(h(t.parameters,4),v.test(t.name))return[g(t.parameters[0]),g(t.parameters[1]),g(t.parameters[2]),t.parameters[3]?g(t.parameters[3]):1];if(M.test(t.name))return(0,o.ay)(function(t){return function(t){if("quantity"!==t.type||null!==t.unit)throw new r.A("effect:type-error",`Expected <double>, Actual: ${p(t)}`,{term:t})}(t),d(t.value,t),t.value}(t.parameters[0]),g(t.parameters[1]),g(t.parameters[2]),t.parameters[3]?g(t.parameters[3]):1);throw new r.A("effect:syntax-error",`Invalid color function '${t.name}'`,{colorFunction:t})}(t.value)}}function x(t){if(!(0,o.V6)(t))throw new r.A("effect:unknown-color",`color '${t}' isn't valid`,{namedColor:t});return(0,o.c4)(t)}const v=/^rgba?/i,M=/^hsla?/i;function w(t,e,n){try{return function(t){if(!t||0===t.length)return null;if(function(t){const e=t[0];return!!e&&"scale"in e}(t)){const e=[];for(const n of t)e.push({scale:n.scale,value:A(n.value)});return e}return A(t)}(t)}catch(t){n?.messages?.push(t)}return null}function b(t,e,n,r){try{const r=function(t){const e=u(t);return e?(0,a.dw)(e)?e.map(t=>t.toJSON()):e.map(({scale:t,effects:e})=>({scale:t,value:e.map(t=>t.toJSON())})):null}(t);(0,i.sM)(n,r,e)}catch(t){r.messages&&r.messages.push(t)}}function A(t){if(!t?.length)return"";const e=[];for(const n of t){let t=[];switch(n.type){case"grayscale":case"sepia":case"saturate":case"invert":case"brightness":case"contrast":case"opacity":t=[S(n,"amount")];break;case"blur":t=[S(n,"radius","pt")];break;case"hue-rotate":t=[S(n,"angle","deg")];break;case"drop-shadow":t=[S(n,"xoffset","pt"),S(n,"yoffset","pt"),S(n,"blurRadius","pt"),P(n,"color")];break;case"bloom":t=[S(n,"strength"),S(n,"radius","pt"),S(n,"threshold")]}const r=`${n.type}(${t.filter(Boolean).join(" ")})`;u(r),e.push(r)}return e.join(" ")}function S(t,e,n){if(null==t[e])throw new r.A("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});return n?t[e]+n:""+t[e]}function P(t,e){if(null==t[e])throw new r.A("effect:missing-parameter",`Missing parameter '${e}' in ${t.type} effect`,{effect:t});const n=t[e];return`rgba(${n[0]||0}, ${n[1]||0}, ${n[2]||0}, ${n[3]/255||0})`}},77690:(t,e,n)=>{n.d(e,{B8:()=>a,Ge:()=>p,I0:()=>h,KC:()=>l,hZ:()=>o,hs:()=>c,lw:()=>u,mg:()=>s,z0:()=>i});var r=n(34304);function i(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[4],t[4]=e[5],t[5]=e[6],t[6]=e[8],t[7]=e[9],t[8]=e[10],t}function o(t,e,n,r,i,o,s,a,l,u){return t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=o,t[5]=s,t[6]=a,t[7]=l,t[8]=u,t}function s(t,e){if(t===e){const n=e[1],r=e[2],i=e[5];t[1]=e[3],t[2]=e[6],t[3]=n,t[5]=e[7],t[6]=r,t[7]=i}else t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8];return t}function a(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=c*s-a*u,p=-c*o+a*l,d=u*o-s*l;let f=n*h+r*p+i*d;return f?(f=1/f,t[0]=h*f,t[1]=(-c*r+i*u)*f,t[2]=(a*r-i*s)*f,t[3]=p*f,t[4]=(c*n-i*l)*f,t[5]=(-a*n+i*o)*f,t[6]=d*f,t[7]=(-u*n+r*l)*f,t[8]=(s*n-r*o)*f,t):null}function l(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8];return t[0]=s*c-a*u,t[1]=i*u-r*c,t[2]=r*a-i*s,t[3]=a*l-o*c,t[4]=n*c-i*l,t[5]=i*o-n*a,t[6]=o*u-s*l,t[7]=r*l-n*u,t[8]=n*s-r*o,t}function u(t,e,n){const r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=n[0],d=n[1],f=n[2],m=n[3],g=n[4],y=n[5],_=n[6],x=n[7],v=n[8];return t[0]=p*r+d*s+f*u,t[1]=p*i+d*a+f*c,t[2]=p*o+d*l+f*h,t[3]=m*r+g*s+y*u,t[4]=m*i+g*a+y*c,t[5]=m*o+g*l+y*h,t[6]=_*r+x*s+v*u,t[7]=_*i+x*a+v*c,t[8]=_*o+x*l+v*h,t}function c(t,e,n){const r=n[0],i=n[1],o=n[2];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t[6]=o*e[6],t[7]=o*e[7],t[8]=o*e[8],t}function h(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=n+n,a=r+r,l=i+i,u=n*s,c=r*s,h=r*a,p=i*s,d=i*a,f=i*l,m=o*s,g=o*a,y=o*l;return t[0]=1-h-f,t[3]=c-y,t[6]=p+g,t[1]=c+y,t[4]=1-u-f,t[7]=d-m,t[2]=p-g,t[5]=d+m,t[8]=1-u-h,t}function p(t,e){const n=e[0],r=e[1],i=e[2],o=e[3],s=e[4],a=e[5],l=e[6],u=e[7],c=e[8],h=e[9],p=e[10],d=e[11],f=e[12],m=e[13],g=e[14],y=e[15],_=n*a-r*s,x=n*l-i*s,v=n*u-o*s,M=r*l-i*a,w=r*u-o*a,b=i*u-o*l,A=c*m-h*f,S=c*g-p*f,P=c*y-d*f,I=h*g-p*m,O=h*y-d*m,E=p*y-d*g;let R=_*E-x*O+v*I+M*P-w*S+b*A;return R?(R=1/R,t[0]=(a*E-l*O+u*I)*R,t[1]=(l*P-s*E-u*S)*R,t[2]=(s*O-a*P+u*A)*R,t[3]=(i*O-r*E-o*I)*R,t[4]=(n*E-i*P+o*S)*R,t[5]=(r*P-n*O-o*A)*R,t[6]=(m*b-g*w+y*M)*R,t[7]=(g*v-f*b-y*x)*R,t[8]=(f*w-m*v+y*_)*R,t):null}function d(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t[3]=e[3]-n[3],t[4]=e[4]-n[4],t[5]=e[5]-n[5],t[6]=e[6]-n[6],t[7]=e[7]-n[7],t[8]=e[8]-n[8],t}const f=u,m=d;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t[3]=e[3]+n[3],t[4]=e[4]+n[4],t[5]=e[5]+n[5],t[6]=e[6]+n[6],t[7]=e[7]+n[7],t[8]=e[8]+n[8],t},adjoint:l,copy:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t},determinant:function(t){const e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],l=t[7],u=t[8];return e*(u*o-s*l)+n*(-u*i+s*a)+r*(l*i-o*a)},equals:function(t,e){const n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8],p=e[0],d=e[1],f=e[2],m=e[3],g=e[4],y=e[5],_=e[6],x=e[7],v=e[8],M=(0,r.FD)();return Math.abs(n-p)<=M*Math.max(1,Math.abs(n),Math.abs(p))&&Math.abs(i-d)<=M*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(o-f)<=M*Math.max(1,Math.abs(o),Math.abs(f))&&Math.abs(s-m)<=M*Math.max(1,Math.abs(s),Math.abs(m))&&Math.abs(a-g)<=M*Math.max(1,Math.abs(a),Math.abs(g))&&Math.abs(l-y)<=M*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(u-_)<=M*Math.max(1,Math.abs(u),Math.abs(_))&&Math.abs(c-x)<=M*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(h-v)<=M*Math.max(1,Math.abs(h),Math.abs(v))},exactEquals:function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=0,t[3]=e[2],t[4]=e[3],t[5]=0,t[6]=e[4],t[7]=e[5],t[8]=1,t},fromMat4:i,fromQuat:h,fromRotation:function(t,e){const n=Math.sin(e),r=Math.cos(e);return t[0]=r,t[1]=n,t[2]=0,t[3]=-n,t[4]=r,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=e[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=e[0],t[7]=e[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:a,isOrthoNormal:function(t){const e=(0,r.FD)(),n=t[0],i=t[1],o=t[2],s=t[3],a=t[4],l=t[5],u=t[6],c=t[7],h=t[8];return Math.abs(1-(n*n+s*s+u*u))<=e&&Math.abs(1-(i*i+a*a+c*c))<=e&&Math.abs(1-(o*o+l*l+h*h))<=e},mul:f,multiply:u,multiplyScalar:function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t[3]=e[3]*n,t[4]=e[4]*n,t[5]=e[5]*n,t[6]=e[6]*n,t[7]=e[7]*n,t[8]=e[8]*n,t},multiplyScalarAndAdd:function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t[3]=e[3]+n[3]*r,t[4]=e[4]+n[4]*r,t[5]=e[5]+n[5]*r,t[6]=e[6]+n[6]*r,t[7]=e[7]+n[7]*r,t[8]=e[8]+n[8]*r,t},normalFromMat4:p,normalFromMat4Legacy:function(t,e){const n=e[0],r=e[1],i=e[2],o=e[4],s=e[5],a=e[6],l=e[8],u=e[9],c=e[10],h=c*s-a*u,p=-c*o+a*l,d=u*o-s*l,f=n*h+r*p+i*d;if(!f)return null;const m=1/f;return t[0]=h*m,t[1]=(-c*r+i*u)*m,t[2]=(a*r-i*s)*m,t[3]=p*m,t[4]=(c*n-i*l)*m,t[5]=(-a*n+i*o)*m,t[6]=d*m,t[7]=(-u*n+r*l)*m,t[8]=(s*n-r*o)*m,t},projection:function(t,e,n){return t[0]=2/e,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/n,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,e,n){const r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=Math.sin(n),d=Math.cos(n);return t[0]=d*r+p*s,t[1]=d*i+p*a,t[2]=d*o+p*l,t[3]=d*s-p*r,t[4]=d*a-p*i,t[5]=d*l-p*o,t[6]=u,t[7]=c,t[8]=h,t},scale:c,scaleByVec2:function(t,e,n){const r=n[0],i=n[1];return t[0]=r*e[0],t[1]=r*e[1],t[2]=r*e[2],t[3]=i*e[3],t[4]=i*e[4],t[5]=i*e[5],t},set:o,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:m,subtract:d,translate:function(t,e,n){const r=e[0],i=e[1],o=e[2],s=e[3],a=e[4],l=e[5],u=e[6],c=e[7],h=e[8],p=n[0],d=n[1];return t[0]=r,t[1]=i,t[2]=o,t[3]=s,t[4]=a,t[5]=l,t[6]=p*r+d*s+u,t[7]=p*i+d*a+c,t[8]=p*o+d*l+h,t},transpose:s},Symbol.toStringTag,{value:"Module"}))},78553:(t,e,n)=>{n.d(e,{D:()=>o,p:()=>i});var r=n(56507);function i(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function o(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},80754:(t,e,n)=>{n.d(e,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>u});var r=n(82799),i=n(16930),o=n(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:i.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:i.A.WGS84})}};function a(t,e){return Math.ceil((t-e)/(2*e))}function l(t,e){const n=u(t);for(const t of n)for(const n of t)n[0]+=e;return t}function u(t){return(0,o.Bi)(t)?t.rings:t.paths}},85648:(t,e,n)=>{n.d(e,{n:()=>i});var r=n(84952);function i(t){return o[function(t){return"json"===t.type?"application/json":"blob"===t.type?t.blob.type:function(t){const e=(0,r.Zo)(t);return l[e]||s}(t.url)}(t)]||a}const o={},s="text/plain",a=o[s],l={png:"image/png",jpeg:"image/jpeg",jpg:"image/jpg",bmp:"image/bmp",gif:"image/gif",json:"application/json",txt:"text/plain",xml:"application/xml",svg:"image/svg+xml",zip:"application/zip",pbf:"application/vnd.mapbox-vector-tile",gz:"application/gzip","bin.gz":"application/octet-stream"};for(const t in l)o[l[t]]=t},89056:(t,e,n)=>{n.d(e,{b3:()=>h,jZ:()=>c});var r=n(12195),i=n(19419),o=n(537),s=n(95108),a=n(65864),l=n(80754),u=n(21325);function c(t){return p(t,!0)}function h(t){return p(t,!1)}function p(t,e){if(null==t)return null;const n=t.spatialReference,i=(0,u.Vp)(n),s=(0,r.W)(t)?t.toJSON():t;if(!i)return s;const c=(0,u.K8)(n)?102100:4326,h=l.j7[c].maxX,p=l.j7[c].minX;if((0,a.fT)(s))return f(s,h,p);if((0,a.U9)(s))return s.points=s.points.map(t=>f(t,h,p)),s;if((0,a.ZC)(s))return d(s,i);if((0,a.Bi)(s)||(0,a.Rg)(s)){const t=(0,o.Rg)(v,s),n={xmin:t[0],ymin:t[1],xmax:t[2],ymax:t[3]},r=(0,l.kd)(n.xmin,p)*(2*h),i=0===r?s:(0,l.kS)(s,r);return n.xmin+=r,n.xmax+=r,n.xmax>h?_(i,h,e):n.xmin<p?_(i,p,e):i}return s}function d(t,e){if(!e)return t;const n=function(t,e){const n=[],{ymin:r,ymax:i,xmin:o,xmax:s}=t,a=t.xmax-t.xmin,[l,u]=e.valid,{x:c,frameId:h}=m(t.xmin,e),{x:p,frameId:d}=m(t.xmax,e),f=c===p&&a>0;if(a>2*u){const t={xmin:o<s?c:p,ymin:r,xmax:u,ymax:i},e={xmin:l,ymin:r,xmax:o<s?p:c,ymax:i},a={xmin:0,ymin:r,xmax:u,ymax:i},f={xmin:l,ymin:r,xmax:0,ymax:i},m=[],y=[];g(t,a)&&m.push(h),g(t,f)&&y.push(h),g(e,a)&&m.push(d),g(e,f)&&y.push(d);for(let t=h+1;t<d;t++)m.push(t),y.push(t);n.push(new x(t,[h]),new x(e,[d]),new x(a,m),new x(f,y))}else c>p||f?n.push(new x({xmin:c,ymin:r,xmax:u,ymax:i},[h]),new x({xmin:l,ymin:r,xmax:p,ymax:i},[d])):n.push(new x({xmin:c,ymin:r,xmax:p,ymax:i},[h]));return n}(t,e).map(t=>t.extent);return n.length<2?n[0]||t:n.length>2?(t.xmin=e.valid[0],t.xmax=e.valid[1],t):{rings:n.map(t=>[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]])}}function f(t,e,n){if(Array.isArray(t)){const r=t[0];if(r>e){const n=(0,l.kd)(r,e);t[0]=r+n*(-2*e)}else if(r<n){const e=(0,l.kd)(r,n);t[0]=r+e*(-2*n)}}else{const r=t.x;if(r>e){const n=(0,l.kd)(r,e);t.x+=n*(-2*e)}else if(r<n){const e=(0,l.kd)(r,n);t.x+=e*(-2*n)}}return t}function m(t,e){const[n,r]=e.valid,i=2*r;let o,s=0;return t>r?(o=Math.ceil(Math.abs(t-r)/i),t-=o*i,s=o):t<n&&(o=Math.ceil(Math.abs(t-n)/i),t+=o*i,s=-o),{x:t,frameId:s}}function g(t,e){const{xmin:n,ymin:r,xmax:i,ymax:o}=e;return y(t,n,r)&&y(t,n,o)&&y(t,i,o)&&y(t,i,r)}function y(t,e,n){return e>=t.xmin&&e<=t.xmax&&n>=t.ymin&&n<=t.ymax}function _(t,e,n=!0){const r=!(0,a.Rg)(t);if(r&&(0,s.m3)(t),n)return(new M).cut(t,e);const i=r?t.rings:t.paths,o=r?4:2,l=i.length,u=-2*e;for(let t=0;t<l;t++){const e=i[t];if(e&&e.length>=o){const t=[];for(const n of e)t.push([n[0]+u,n[1]]);i.push(t)}}return r?t.rings=i:t.paths=i,t}class x{constructor(t,e){this.extent=t,this.frameIds=e}}const v=(0,i.vt)();class M{constructor(){this._linesIn=[],this._linesOut=[]}cut(t,e){let n;if(this._xCut=e,t.rings)this._closed=!0,n=t.rings,this._minPts=4;else{if(!t.paths)return null;this._closed=!1,n=t.paths,this._minPts=2}for(const t of n){if(!t||t.length<this._minPts)continue;let e=!0;for(const n of t)e?(this.moveTo(n),e=!1):this.lineTo(n);this._closed&&this.close()}this._pushLineIn(),this._pushLineOut(),n=[];for(const t of this._linesIn)t&&t.length>=this._minPts&&n.push(t);const r=-2*this._xCut;for(const t of this._linesOut)if(t&&t.length>=this._minPts){for(const e of t)e[0]+=r;n.push(t)}return this._closed?t.rings=n:t.paths=n,t}moveTo(t){this._pushLineIn(),this._pushLineOut(),this._prevSide=this._side(t[0]),this._moveTo(t[0],t[1],this._prevSide),this._prevPt=t,this._firstPt=t}lineTo(t){const e=this._side(t[0]);if(e*this._prevSide===-1){const n=this._intersect(this._prevPt,t);this._lineTo(this._xCut,n,0),this._prevSide=0,this._lineTo(t[0],t[1],e)}else this._lineTo(t[0],t[1],e);this._prevSide=e,this._prevPt=t}close(){const t=this._firstPt,e=this._prevPt;t[0]===e[0]&&t[1]===e[1]||this.lineTo(t),this._checkClosingPt(this._lineIn),this._checkClosingPt(this._lineOut)}_moveTo(t,e,n){this._closed?(this._lineIn.push([n<=0?t:this._xCut,e]),this._lineOut.push([n>=0?t:this._xCut,e])):(n<=0&&this._lineIn.push([t,e]),n>=0&&this._lineOut.push([t,e]))}_lineTo(t,e,n){this._closed?(w(this._lineIn,n<=0?t:this._xCut,e),w(this._lineOut,n>=0?t:this._xCut,e)):n<0?(0===this._prevSide&&this._pushLineOut(),this._lineIn.push([t,e])):n>0?(0===this._prevSide&&this._pushLineIn(),this._lineOut.push([t,e])):this._prevSide<0?(this._lineIn.push([t,e]),this._lineOut.push([t,e])):this._prevSide>0&&(this._lineOut.push([t,e]),this._lineIn.push([t,e]))}_checkClosingPt(t){const e=t.length;e>3&&t[0][0]===this._xCut&&t[e-2][0]===this._xCut&&t[1][0]===this._xCut&&(t[0][1]=t[e-2][1],t.pop())}_side(t){return t<this._xCut?-1:t>this._xCut?1:0}_intersect(t,e){const n=(this._xCut-t[0])/(e[0]-t[0]);return t[1]+n*(e[1]-t[1])}_pushLineIn(){this._lineIn&&this._lineIn.length>=this._minPts&&this._linesIn.push(this._lineIn),this._lineIn=[]}_pushLineOut(){this._lineOut&&this._lineOut.length>=this._minPts&&this._linesOut.push(this._lineOut),this._lineOut=[]}}function w(t,e,n){const r=t.length;r>1&&t[r-1][0]===e&&t[r-2][0]===e?t[r-1][1]=n:t.push([e,n])}},90629:(t,e,n)=>{n.d(e,{Lz:()=>s,PN:()=>a,cr:()=>l,tc:()=>u});const r=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,i="screenUtils.toPt: input not recognized!",o=96;function s(t){return t?t/72*o:0}function a(t){return t?72*t/o:0}function l(t){if("string"==typeof t){const e=t.match(r);if(e){const n=Number(e[1]),r=e[3]&&e[3].toLowerCase(),i="-"===t.charAt(0),o="px"===r?a(n):n;return i?-o:o}return console.warn(i),null}return t}function u(t=0,e=0){return{x:t,y:e}}},92071:(t,e,n)=>{n.d(e,{P:()=>x,L:()=>v});var r=n(90237),i=n(69622),o=n(76953),s=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach((t,n)=>{e.set(n,(0,s.o8)(t),a.Gr.DEFAULTS)});for(let n=a.Gr.SERVICE;n<a.AU;n++){const r=this._originStores[n];r&&r.forEach((r,i)=>{t&&t.has(i)||e.set(i,(0,s.o8)(r),n)})}return e}get(t,e){const n=void 0===e?this._values:this._originStores[e];return n?n.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,n=a.Gr.USER){let r=this._originStores[n];if(r||(r=new Map,this._originStores[n]=r),r.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=n){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,n),r!==e}return!1}delete(t,e=a.Gr.USER){const n=this._originStores[e];if(!n)return;const r=n.get(t);if(n.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let n=e-1;n>=0;n--){const e=this._originStores[n];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,n);break}}}return r}has(t,e){const n=void 0===e?this._values:this._originStores[e];return!!n&&n.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const n=this._originStores[e],r=n?.get(t),i=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),i!==r}originOf(t){return this._propertyOriginMap.get(t)||a.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=n(45917),c=n(88620),h=n(40608);const p=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,c.oY)(this),n=e.store,r=new l;e.store=r,(0,o.k)(e,n,r)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const n=d(this),r=(0,a.aB)(e);if("string"==typeof t)return n.get(t,r);const i={};return t.forEach(t=>{i[t]=n.get(t,r)}),i}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return d(this).originOf(t)}revert(t,e){const n=d(this),r=(0,a.aB)(e),i=(0,c.oY)(this);let o;o="string"==typeof t?"*"===t?n.keys(r):[t]:t,o.forEach(t=>{i.invalidate(t),n.revert(t,r),i.commit(t)})}};return e=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function d(t){return(0,c.oY)(t).store}let f=class extends(p(i.A)){};f=(0,r._)([(0,h.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],f);var m=n(16649),g=n(49422);const y=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,g.M)(this,t=t||{},e),t}setAtOrigin(t,e,n){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(n))}removeOrigin(t){const e=_(this),n=(0,a.aB)(t),r=e.keys(n);for(const t of r)e.originOf(t)===n&&e.set(t,e.get(t,n),a.Gr.USER)}updateOrigin(t,e){const n=_(this),r=(0,a.aB)(e),i=(0,m.Jt)(this,t);for(let e=r+1;e<a.AU;++e)n.delete(t,e);n.set(t,i,r)}toJSON(t){return this.write({},t)}};return e=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function _(t){return(0,c.oY)(t).store}const x=t=>{let e=class extends(y(p(t))){constructor(...t){super(...t)}};return e=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],e),e};let v=class extends(x(i.A)){};v=(0,r._)([(0,h.$)("esri.core.MultiOriginJSONSupport")],v)},92935:(t,e,n)=>{var r;n.d(e,{X:()=>r}),function(t){t[t.SAVE=0]="SAVE",t[t.SAVE_AS=1]="SAVE_AS"}(r||(r={}))}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9186],{25943:(e,t,i)=>{i.d(t,{d:()=>x});var l,s=i(90237),o=i(78888),r=i(69622),n=i(71903),a=i(49186),c=i(36563),h=(i(44208),i(66344)),p=i(3694),u=i(74887),f=i(36708),d=i(11932),v=i(84952),m=i(10107),y=(i(53966),i(87811),i(40608)),w=i(72802),g=i(4718),_=i(69397),A=i(34275);class b{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,g.o8)(t));const l=this.location.width,s=this.location.height;let o=!0,r=!0;const n=function(e,t=!1){return e<=A.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(l*s/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(r=!1,n[c]|=1<<t):o=!1,31===t&&++c}r?(this._availability="unavailable",this.byteSize=40):o?(this._availability="available",this.byteSize=40):(this._availability=n,this.byteSize=40+(0,_.Qf)(n))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),l=i%32,s=i>>5,o=this._availability;return s<0||s>o.length?"unknown":o[s]&1<<l?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||o.A,{row:l,col:s,width:r,height:n}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:l,left:s,width:r,height:n},valid:!0,data:new Array(r*n).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==l||e.location.left!==s||e.location.width!==r||e.location.height!==n))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:l,left:s,width:r,height:n}});return b.fromJSON(e)})}static fromJSON(e){return Object.freeze(new b(e))}}function O(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function M(e,t,i){return new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let x=class extends r.A{static{l=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=o.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2*n.u.MEGABYTES),this.addHandles((0,f.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),f.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const l=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return l?l.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,l){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(M(e,t,i)):this._fetchTilemap(e,t,i,l).catch(e=>e).then(l=>{if(l instanceof b){const s=l.getAvailability(t,i);if("unavailable"===s)throw M(e,t,i);return s}if((0,u.zf)(l))throw l;return"unknown"})}fetchAvailabilityUpsample(e,t,i,l,s){l.level=e,l.row=t,l.col=i;const o=this.layer.tileInfo;o.updateTileInfo(l);const r=this.fetchAvailability(e,t,i,s).catch(e=>{if((0,u.zf)(e))throw e;if(o.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,s);throw e});return this._fetchAvailabilityUpsamplePrefetch(l.id,e,t,i,s,r),r}async _fetchAvailabilityUpsamplePrefetch(e,t,i,s,o,r){if(!this._prefetchingEnabled||null==e)return;const n=`prefetch-${e}`;if(this.hasHandles(n))return;const a=new AbortController;r.then(()=>a.abort(),()=>a.abort());let h=!1;const p=(0,c.hA)(()=>{h||(h=!0,a.abort())});if(this.addHandles(p,n),await(0,d.md)(10,a.signal).catch(()=>{}),h||(h=!0,this.removeHandles(n)),(0,u.G4)(a))return;const f=new w.U(e,t,i,s),v={...o,signal:a.signal},m=this.layer.tileInfo;for(let e=0;l._prefetches.length<l._maxPrefetch&&m.upsampleTile(f);++e){const e=this.fetchAvailability(f.level,f.row,f.col,v);l._prefetches.push(e);const t=()=>{l._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new p.A({initialSize:l._maxPrefetch})}_fetchTilemap(e,t,i,l){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const s=this._tmpTilemapDefinition,o=this._tilemapFromCache(e,t,i,s);if(o)return Promise.resolve(o);const r=l?.signal;return l={...l,signal:null},new Promise((e,t)=>{(0,u.u7)(r,()=>t((0,u.NK)()));const i=O(s);let o=this._pendingTilemapRequests[i];if(!o){o=b.fromDefinition(s,l).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=o,o.then(e,e)}o.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,v.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,l){l.level=e,l.row=t-t%this.size,l.col=i-i%this.size;const s=O(l);return this._tilemapCache.get(s)}get test(){}};(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"layer",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"minLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"maxLOD",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"request",void 0),(0,s._)([(0,m.MZ)({constructOnly:!0})],x.prototype,"size",void 0),x=l=(0,s._)([(0,y.$)("esri.layers.support.TilemapCache")],x)},65509:(e,t,i)=>{i.d(t,{A:()=>o});var l=i(49186),s=i(74887);class o{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const l=this.tileInfo?.lodAt(e);return!l||e<this.minLOD||e>this.maxLOD?"unavailable":l.cols&&l.rows?i>=l.cols[0]&&i<=l.cols[1]&&t>=l.rows[0]&&t<=l.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,o){await(0,s.NO)(o);const r=this.getAvailability(e,t,i);if("unavailable"===r)throw new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return r}async fetchAvailabilityUpsample(e,t,i,l,o){await(0,s.NO)(o),l.level=e,l.row=t,l.col=i;const r=this.tileInfo;return r.updateTileInfo(l),this.fetchAvailability(e,t,i,o).catch(e=>{if((0,s.zf)(e))throw e;if(r.upsampleTile(l))return this.fetchAvailabilityUpsample(l.level,l.row,l.col,l,o);throw e})}}},71903:(e,t,i)=>{var l;i.d(t,{u:()=>l}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(l||(l={}))},72802:(e,t,i)=>{i.d(t,{U:()=>l});class l{constructor(e,t,i,l,s=void 0){this.id=e,this.level=t,this.row=i,this.col=l,this.extent=s}}},87045:(e,t,i)=>{i.d(t,{A:()=>A});var l,s=i(90237),o=i(66552),r=i(25482),n=i(83047),a=i(10107),c=i(56507),h=(i(44208),i(87811),i(36005)),p=i(40608),u=i(43937),f=i(86738),d=i(16930),v=i(19419),m=i(21325),y=i(28735),w=i(91806),g=i(72802);const _=new o.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let A=class extends r.A{static{l=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:s=256,spatialReference:o=d.A.WebMercator,numLODs:r=24}=e;if(!(0,m.fn)(o)){const e=[];if(i)for(let t=0;t<i.length;t++){const l=i[t];e.push(new w.A({level:t,scale:l,resolution:l}))}else{let t=5e-4;for(let i=r-1;i>=0;i--)e.unshift(new w.A({level:i,scale:t,resolution:t})),t*=2}return new l({dpi:96,lods:e,origin:new f.A(0,0,o),size:[s,s],spatialReference:o})}const a=(0,m.Vp)(o),c=e.origin?new f.A({x:e.origin.x,y:e.origin.y,spatialReference:o}):new f.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:o}:{x:0,y:0,spatialReference:o}),h=1/(39.37*(0,n.GA)(o)*96),p=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],l=t*h;p.push(new w.A({level:e,scale:t,resolution:l}))}else{let e=(0,m.EA)(o)?512/s*591657527.5917094:256/s*591657527.591555;const i=Math.ceil(r/t);p.push(new w.A({level:0,scale:e,resolution:e*h}));for(let l=1;l<i;l++){const i=e/2**t,s=i*h;p.push(new w.A({level:l,scale:i,resolution:s})),e=i}}return new l({dpi:96,lods:p,origin:c,size:[s,s],spatialReference:o})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,m.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return f.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const l=[],s=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{l.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,s[e.level]=e})),this._set("scales",l),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),l=i+1;return t[i]/(t[i]/t[l])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let l=0;for(;l<i;l++){const i=t[l],s=t[l+1];if(i<=e)return l;if(s===e)return l+1;if(i>e&&s<e)return l+Math.log(i/e)/Math.log(i/s)}return l}tileAt(e,t,i,l){const s=this.lodAt(e);if(!s)return null;let o,r;if("number"==typeof t)o=t,r=i;else if((0,m.aI)(t.spatialReference,this.spatialReference))o=t.x,r=t.y,l=i;else{const e=(0,y.Cv)(t,this.spatialReference);if(null==e)return null;o=e.x,r=e.y,l=i}const n=s.resolution*this.size[0],a=s.resolution*this.size[1];return l||(l=new g.U(null,0,0,0,(0,v.vt)())),l.level=e,l.row=Math.floor((this.origin.y-r)/a+.001),l.col=Math.floor((o-this.origin.x)/n+.001),this.updateTileInfo(l),l}updateTileInfo(e,t=l.ExtrapolateOptions.NONE){let i=this.lodAt(e.level);if(!i&&t===l.ExtrapolateOptions.POWER_OF_TWO){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return;const s=e.level-i.level,o=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;e.id=`${e.level}/${e.row}/${e.col}`,e.extent||(e.extent=(0,v.vt)()),e.extent[0]=this.origin.x+e.col*o,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+o,e.extent[3]=e.extent[1]+r}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:l}=i,s=l*this.size[0],o=l*this.size[1];return e[0]=this.origin.x+t.col*s,e[1]=this.origin.y-(t.row+1)*o,e[2]=e[0]+s,e[3]=e[1]+o,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return l.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],s=this.lods.length-t;for(let e=0;e<s;e++){const l=e+t,{scale:s,resolution:o}=l>=0?this.lods[l]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new w.A({level:e,scale:s,resolution:o}))}return new l({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const l=e[i];this._upsampleLevels[l.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/l.resolution:0},t=l}}};var b,O;(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],A.prototype,"compressionQuality",void 0),(0,s._)([(0,a.MZ)({type:Number,json:{write:!0}})],A.prototype,"dpi",void 0),(0,s._)([(0,a.MZ)({type:String,json:{read:_.read,write:_.write,origins:{"web-scene":{read:!1,write:!1}}}})],A.prototype,"format",void 0),(0,s._)([(0,a.MZ)({readOnly:!0})],A.prototype,"isWrappable",null),(0,s._)([(0,a.MZ)({type:f.A,json:{write:!0}})],A.prototype,"origin",void 0),(0,s._)([(0,h.w)("origin")],A.prototype,"readOrigin",null),(0,s._)([(0,a.MZ)({type:[w.A],value:null,json:{write:!0}})],A.prototype,"lods",null),(0,s._)([(0,a.MZ)({readOnly:!0})],A.prototype,"scales",void 0),(0,s._)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],A.prototype,"size",void 0),(0,s._)([(0,h.w)("size",["rows","cols"])],A.prototype,"readSize",null),(0,s._)([(0,u.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],A.prototype,"writeSize",null),(0,s._)([(0,a.MZ)({type:d.A,json:{write:!0}})],A.prototype,"spatialReference",void 0),A=l=(0,s._)([(0,p.$)("esri.layers.support.TileInfo")],A),(O=(b=A||(A={})).ExtrapolateOptions||(b.ExtrapolateOptions={}))[O.NONE=0]="NONE",O[O.POWER_OF_TWO=1]="POWER_OF_TWO"},89186:(e,t,i)=>{i.d(t,{f:()=>p});var l=i(90237),s=i(10107),o=(i(44208),i(53966),i(87811),i(36005)),r=i(40608),n=i(16930),a=i(87045),c=i(65509),h=i(25943);const p=e=>{let t=class extends e{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const l=t.capabilities?.includes("Tilemap");let{minLOD:s,maxLOD:o,minScale:r,maxScale:n}=t;if(null==s&&null==o&&(0!==r||0!==n)){const e=e=>Math.round(1e4*e)/1e4;r=e(r||t.tileInfo.lods[0].scale),n=e(n||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);s=t>=r?i.level:s,o=t>=n?i.level:o}}if(l)return new h.d({layer:this,minLOD:s,maxLOD:o});if(t.tileInfo){const e=new a.A;return e.read(t.tileInfo,i),new c.A(e,s,o)}return null}};return(0,l._)([(0,s.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"minScale",void 0),(0,l._)([(0,o.w)("service","minScale")],t.prototype,"readMinScale",null),(0,l._)([(0,s.MZ)()],t.prototype,"maxScale",void 0),(0,l._)([(0,o.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,l._)([(0,s.MZ)({type:n.A})],t.prototype,"spatialReference",void 0),(0,l._)([(0,s.MZ)({readOnly:!0})],t.prototype,"supportsBlankTile",null),(0,l._)([(0,s.MZ)({type:a.A})],t.prototype,"tileInfo",void 0),(0,l._)([(0,s.MZ)()],t.prototype,"tilemapCache",void 0),(0,l._)([(0,o.w)("service","tilemapCache",["capabilities","tileInfo"])],t.prototype,"readTilemapCache",null),(0,l._)([(0,s.MZ)()],t.prototype,"version",void 0),t=(0,l._)([(0,r.$)("esri.layers.mixins.ArcGISCachedService")],t),t}},91806:(e,t,i)=>{i.d(t,{A:()=>c});var l,s=i(90237),o=i(25482),r=i(10107),n=i(56507),a=(i(44208),i(87811),i(40608));let c=class extends o.A{static{l=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new l({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"cols",void 0),(0,s._)([(0,r.MZ)({type:n.jz,json:{write:!0}})],c.prototype,"level",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:!0}})],c.prototype,"levelValue",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"origin",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"resolution",void 0),(0,s._)([(0,r.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],c.prototype,"rows",void 0),(0,s._)([(0,r.MZ)({type:Number,json:{write:!0}})],c.prototype,"scale",void 0),c=l=(0,s._)([(0,a.$)("esri.layers.support.LOD")],c)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3186],{17311:(e,t,s)=>{s.d(t,{A:()=>f});var i=s(90237),r=s(69622),a=s(4576),n=s(60999),l=s(5503),o=s(10107),c=(s(44208),s(53966),s(40608)),u=s(30524),d=s(43668);let f=class extends r.A{constructor(e){super(e),this._featureUtils=null,this.effectivePopupTemplate=null}get _arcadeTask(){return this.expressionsUsedInTitle.length>0?this._get("_arcadeTask")||(0,n.UT)(()=>(0,d.l)()):null}get featureUtilsPromise(){return this._get("featureUtilsPromise")??Promise.all([s.e(4560),s.e(9926)]).then(s.bind(s,29926)).then(e=>this._featureUtils=e)}get calculatedExpressions(){const e=new l.A;if(!this.expressionsUsedInTitle.length)return e;if(!this._arcadeTask?.value){for(const t of this.expressionsUsedInTitle??[])e.push({name:t.name,invalid:!0});return e}for(const t of this.expressionsUsedInTitle)try{const s=this._arcadeTask.value.arcade.parseScript(t.expression,["$layer","$map","$datastore"]);if(s.isAsync){e.push({name:t.name,invalid:!0});break}e.push({name:t.name,syntax:s,invalid:!1,func:this._arcadeTask.value.arcade.compileScript(s,{vars:{$feature:"any"}})})}catch{e.push({name:t.name,invalid:!0});break}return e}get expressionsUsedInTitle(){let e=this.effectivePopupTemplate?.title??"";return"string"!=typeof e?[]:(e=e.toLowerCase(),this.effectivePopupTemplate?.expressionInfos?.filter(t=>e.includes(`{expression/${t.name.toLowerCase()}}`))??[])}get fieldInfoMap(){return this._featureUtils?this._createFieldInfoMap(this._featureUtils.getAllFieldInfos(this.effectivePopupTemplate)):null}get hasBadExpressions(){return this.calculatedExpressions.some(e=>!0===e.invalid)}get requiredFields(){const e=new Set;if(this._arcadeTask?.value&&!this.hasBadExpressions)for(const t of this.calculatedExpressions?.toArray()??[])try{const s=this._arcadeTask.value.arcade.extractFieldLiterals(t.syntax);for(const t of s){const s=t.split("."),i=this.fieldsIndex.get(s.at(-1)??"");i&&e.add(i.name)}}catch{}const t=this._extractFieldNames(this.workingTitle);for(const s of t){const t=this.fieldsIndex.get(s);t&&e.add(t.name)}return e}get titleFromDisplayField(){let e="";return this.displayField&&(e=this.fieldsIndex.get(this.displayField)?.name??""),e||(e=this.fieldsIndex.get(this.objectIdField)?.name??""),e?`{${e}}`:""}get workingTitle(){const e=this.effectivePopupTemplate?this.effectivePopupTemplate.title:"";return""===e||null==e||this.hasBadExpressions||"string"!=typeof e?this.titleFromDisplayField:e}async getTitle(e,t,s){return(await this.getTitles(e,[t],s)).get(t)??""}async getTitles(e,t,s){const i=new Map,r=s?.timeZone??"system";try{const[{substituteFieldsInLinksAndAttributes:a}]=await Promise.all([this.featureUtilsPromise,this._arcadeTask?.promise]);s?.fetchMissingFields&&(t=await this._checkAndReQueryGraphics(e,t));const{fieldInfoMap:n,workingTitle:l}=this,o=l&&n;t.forEach(t=>{const s=o?a({attributes:t.attributes,expressionAttributes:null,fieldInfoMap:n,globalAttributes:this._createFormattedAttributes(e,t,r).global,layer:e,text:l}):"";i.set(t,s)})}catch{}return i}async _checkAndReQueryGraphics(e,t){const s=t.map(t=>t.getObjectId()??t.attributes[e.objectIdField]).filter(a.Ru);if(s.length!==t.length)return t;if(t.some(e=>!(0,u.Kl)(e,this.requiredFields))){const i=e.createQuery();i.where="1=1",i.outFields=[...this.requiredFields],i.objectIds=s;const r=await e.queryFeatures(i);if(r?.features.length===t.length)return r.features}return t}_createFieldInfoMap(e){const t=new Map;if(!e)return t;for(const s of e){if(!s.fieldName)continue;const e=this.fieldsIndex.get(s.fieldName),i=e?.name??s.fieldName;s.fieldName=i,t.set(i.toLowerCase(),s)}return t}_createFormattedAttributes(e,t,s="system"){const i=this.effectivePopupTemplate?.fieldInfos??[],r={};if(!this._featureUtils)return{};if(!this.hasBadExpressions&&this.calculatedExpressions.length>0&&this._arcadeTask?.value){const s=this._arcadeTask.value.Feature.createFromGraphicLikeObject(t.geometry,t.attributes,e,null);for(const e of this.calculatedExpressions)try{r[`expression/${e.name}`]=e.func({vars:{$feature:s}})}catch{}}const a={...t.attributes,...r};return{global:this._featureUtils.formatAttributes({fieldInfos:i,attributes:a,graphic:t,timeZone:s,layer:e,fieldInfoMap:this.fieldInfoMap}),content:[]}}_extractFieldNames(e){return(0,u.nw)(e).filter(e=>!(0===e.indexOf("relationships/")||0===e.indexOf("expression/")))}};(0,i._)([(0,o.MZ)({readOnly:!0})],f.prototype,"_arcadeTask",null),(0,i._)([(0,o.MZ)()],f.prototype,"_featureUtils",void 0),(0,i._)([(0,o.MZ)({readOnly:!0})],f.prototype,"featureUtilsPromise",null),(0,i._)([(0,o.MZ)({readOnly:!0})],f.prototype,"calculatedExpressions",null),(0,i._)([(0,o.MZ)()],f.prototype,"displayField",void 0),(0,i._)([(0,o.MZ)()],f.prototype,"effectivePopupTemplate",void 0),(0,i._)([(0,o.MZ)()],f.prototype,"expressionsUsedInTitle",null),(0,i._)([(0,o.MZ)()],f.prototype,"fieldsIndex",void 0),(0,i._)([(0,o.MZ)()],f.prototype,"fieldInfoMap",null),(0,i._)([(0,o.MZ)()],f.prototype,"fields",void 0),(0,i._)([(0,o.MZ)()],f.prototype,"objectIdField",void 0),(0,i._)([(0,o.MZ)()],f.prototype,"requiredFields",null),f=(0,i._)([(0,c.$)("esri.layers.support.TitleCreator")],f)},41560:(e,t,s)=>{s.d(t,{Ch:()=>n,mW:()=>a});var i=s(34727),r=s(39516);function a(e,t){return{...t,filterMode:e.mode}}function n(e,t,s){const a=function(e){if("manual"===c(e))return null;const t=[Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY];for(const{minScale:s,maxScale:i}of e.filters)t[0]=Math.max(t[0],u(s)),t[1]=Math.min(t[1],d(i));return t}(e);if(a&&((0,i.gg)(t,a[0])||(0,i.ZH)(s,a[1])))return"";const n=Array.from(l(e,t,s)),o=function(e,t,s){if(0===e.length)return!0;const r=u(e.at(0)?.minScale),a=d(e.at(-1)?.maxScale);if((0,i.ZH)(r,t)||(0,i.gg)(a,s))return!0;for(let t=0;t<e.length-1;t++){const s=e[t],r=e[t+1];if((0,i.ZH)(u(r.minScale),d(s.maxScale)))return!0}return!1}(n,t,s)?"1=1":n.map(e=>e.where||"1=1").reduce((e,t)=>(0,r.IW)(e,t),"");return o&&"1=1"!==o?o:""}function*l(e,t,s){if("manual"===c(e)){const t=e.filters.find(t=>t.id===e.activeFilterId);t&&(yield t)}else{"object"==typeof t&&(t=t.scale);for(const i of e.filters)o(i.minScale,i.maxScale,t,s)&&(yield i)}}function o(e,t,s,r){return e=u(e),s=u(s),t=d(t),!(!(0,i.Sp)(s,e)&&(r??s)>e||(0,i.Hx)(t,s)||void 0!==r&&(0,i.Sp)(r,e))}function c(e){return"mode"in e?e.mode:e.filterMode}function u(e){return e||Number.POSITIVE_INFINITY}function d(e){return e||0}},92935:(e,t,s)=>{var i;s.d(t,{X:()=>i}),function(e){e[e.SAVE=0]="SAVE",e[e.SAVE_AS=1]="SAVE_AS"}(i||(i={}))}}]);