@arcgis/core 5.2.0-next.126 → 5.2.0-next.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WebScene.js +1 -1
- package/applications/Components/basemapToggleUtils.d.ts +53 -0
- package/applications/Components/basemapToggleUtils.js +2 -0
- package/applications/SceneViewer/sceneViewerUtils.d.ts +14 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/applications/WebEditor/sketchUtils.js +1 -1
- package/arcgisGlobal.d.ts +1 -0
- package/assets/esri/core/libs/libtess/libtess-f32.wasm +0 -0
- package/assets/esri/core/libs/libtess/libtess-f64.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{e35eb93c0fb1f6de8db0.js → 00d9e41deecf5828975c.js} +1 -1
- package/assets/esri/core/workers/chunks/038d2b80d96237c25b6f.js +1 -0
- package/assets/esri/core/workers/chunks/{ab8a1140bf31f46f8ebf.js → 1262918b2161d79851c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{d3ef23923424ad8c5048.js → 1c2723f9630e7d597843.js} +1 -1
- package/assets/esri/core/workers/chunks/{9ca98fffd43e63d5ade3.js → 1c33aa349beea9a3792f.js} +1 -1
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js → 2226c20c38e20713bcb5.js} +2 -2
- package/assets/esri/core/workers/chunks/{54eeb4cac4fa092359ab.js.LICENSE.txt → 2226c20c38e20713bcb5.js.LICENSE.txt} +2 -2
- package/assets/esri/core/workers/chunks/{4d18451e0ea6ca54101a.js → 2ebad7e588b26e74cefe.js} +1 -1
- package/assets/esri/core/workers/chunks/{a8258636096416c837a2.js → 3b7dff15a0058ea29886.js} +1 -1
- package/assets/esri/core/workers/chunks/{4716693eca44e8f89f5c.js → 3bf56c33876ba56c4b21.js} +1 -1
- package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +1 -0
- package/assets/esri/core/workers/chunks/3f045f09ac95e7f22a97.js +1 -0
- package/assets/esri/core/workers/chunks/500f6d6f0ffa235cae85.js +1 -0
- package/assets/esri/core/workers/chunks/{56acda1eed3a013430e2.js → 58fb92775d668cfd295c.js} +1 -1
- package/assets/esri/core/workers/chunks/{e6637f9176566382ed3e.js → 606cca69eaea84bfcdc6.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdbda3d2afea25142b86.js → 6267a1fe1603daa399b4.js} +1 -1
- package/assets/esri/core/workers/chunks/{b013b70e40dfb6ce013e.js → 668ec0bdfb2095e90c9e.js} +1 -1
- package/assets/esri/core/workers/chunks/{806f96ad09e882be41af.js → 67fd2cdb2e6834bfa710.js} +1 -1
- package/assets/esri/core/workers/chunks/{5fe5ef5ccf480634d159.js → 75294f515c7f8393181c.js} +1 -1
- package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +1 -0
- package/assets/esri/core/workers/chunks/761ea719ec1b4d562db2.js +1 -0
- package/assets/esri/core/workers/chunks/{24673aac70d6c949b6fa.js → 86d7a3ae672a51b75fcc.js} +1 -1
- package/assets/esri/core/workers/chunks/{30604a29df320d7a4c6b.js → 88e11b645a1361f1bdbe.js} +1 -1
- package/assets/esri/core/workers/chunks/89dad6c1bfd81e4d7f8e.js +1 -0
- package/assets/esri/core/workers/chunks/{8daed13400d9e63e65ae.js → 8a842cde240aef12e417.js} +1 -1
- package/assets/esri/core/workers/chunks/{c692e583e87af58f6d91.js → 8b0d6205ceeec1ab446f.js} +1 -1
- package/assets/esri/core/workers/chunks/{57ab87e70ef85b9405f9.js → 8cb216404a6254bc695c.js} +1 -0
- package/assets/esri/core/workers/chunks/92509dd25996c6390a31.js +1 -0
- package/assets/esri/core/workers/chunks/9ccc2c8f7416943cc373.js +29 -0
- package/assets/esri/core/workers/chunks/a0a9c41400ae98df1912.js +1 -0
- package/assets/esri/core/workers/chunks/{b96358d475dc98034aa4.js → a15ed056e7493ddf3b4c.js} +1 -1
- package/assets/esri/core/workers/chunks/{25e212fe9a2ea37c9e81.js → a3a33ffa34f4d645ddfe.js} +1 -1
- package/assets/esri/core/workers/chunks/af0704494398f33aa315.js +1 -0
- package/assets/esri/core/workers/chunks/{ce1ccf9ec90b786591e5.js → b396c4b4bb144200acc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{97602019a1ccad22a03a.js → bbfb80a6983574007ce5.js} +1 -1
- package/assets/esri/core/workers/chunks/{d5f72670634e73c0b53a.js → bcf2e5cf6b9c6d0442bb.js} +1 -1
- package/assets/esri/core/workers/chunks/{17218d714cb07b607c2f.js → c35e9dee87937f483a3d.js} +1 -1
- package/assets/esri/core/workers/chunks/{85739ed6af0f0a3cb302.js → c94bdfed831c775e04c0.js} +1 -1
- package/assets/esri/core/workers/chunks/{2e3fd81653dc0d86456c.js → cfeba0ffb7fdc2a9af05.js} +1 -1
- package/assets/esri/core/workers/chunks/d1187ad6cc4959683819.js +1 -0
- package/assets/esri/core/workers/chunks/d94a2b3b2ef49af9c2e3.js +1 -0
- package/assets/esri/core/workers/chunks/{cb7cb7d57c4e7f76600f.js → dc92710a8fdfb9135e55.js} +1 -1
- package/assets/esri/core/workers/chunks/ec187933b42fe65594b7.js +1 -0
- package/assets/esri/core/workers/chunks/eec5a93dbc258a90b6de.js +1 -0
- package/assets/esri/core/workers/chunks/{e1ae83ff3e0225708d4d.js → f479b4a4cee4bb2e046c.js} +1 -1
- package/assets/esri/core/workers/chunks/{78abd6c42f39e6f6ffbb.js → f983296b6f4a62a911eb.js} +1 -1
- package/assets/esri/images/portal/gaussiansplatlayer16.png +0 -0
- package/assets/esri/images/portal/knowledgegraphlayer16.png +0 -0
- package/assets/esri/images/portal/propresentation16.png +0 -0
- package/assets/esri/images/portal/urbanproject16.png +0 -0
- package/assets/esri/images/support/loading-throb.gif +0 -0
- package/assets/esri/layers/raster/formats/lerc-wasm.wasm +0 -0
- package/assets/esri/themes/base/icons/style.scss +0 -0
- package/assets/esri/themes/base/icons/variables.scss +0 -0
- package/assets/esri/themes/base/images/files/archive-32.svg +0 -0
- package/assets/esri/themes/base/images/files/cad-32.svg +0 -0
- package/assets/esri/themes/base/images/files/code-32.svg +0 -0
- package/assets/esri/themes/base/images/files/csv-32.svg +0 -0
- package/assets/esri/themes/base/images/files/excel-32.svg +0 -0
- package/assets/esri/themes/base/images/files/generic-32.svg +0 -0
- package/assets/esri/themes/base/images/files/gpx-32.svg +0 -0
- package/assets/esri/themes/base/images/files/image-32.svg +0 -0
- package/assets/esri/themes/base/images/files/pdf-32.svg +0 -0
- package/assets/esri/themes/base/images/files/report-32.svg +0 -0
- package/assets/esri/themes/base/images/files/sound-32.svg +0 -0
- package/assets/esri/themes/base/images/files/text-32.svg +0 -0
- package/assets/esri/themes/base/images/files/video-32.svg +0 -0
- package/assets/esri/themes/base/images/files/word-32.svg +0 -0
- package/assets/esri/themes/base/images/files/zip-32.svg +0 -0
- package/assets/esri/themes/base/images/loading-throb.gif +0 -0
- package/assets/esri/themes/base/widgets/_Bookmarks.scss +0 -0
- package/assets/esri/themes/base/widgets/_Tooltip.scss +42 -3
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/assets/esri/views/interactive/tooltip/t9n/messages.en.json +1 -1
- package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
- package/chunks/GlobalIllumination.glsl.js +1 -0
- package/config.js +1 -1
- package/core/Accessor.d.ts +1 -1
- package/core/lang.js +1 -1
- package/core/units.js +1 -1
- package/geometry/HeightModelInfo.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/support/heightModelInfoUtils.js +1 -1
- package/interfaces.d.ts +1 -0
- package/kernel.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/ParquetLayer.d.ts +21 -13
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/graphics/transferFeatures.js +2 -0
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/mixins/HeightModelInfoMixin.js +2 -0
- package/layers/mixins/SceneService.js +1 -1
- package/layers/orientedImagery/core/ExposurePoint.js +1 -1
- package/layers/raster/datasets/RasterFactory.js +1 -1
- package/package.json +3 -3
- package/popup/FeatureContentCollection.d.ts +15 -25
- package/popup/FeatureContentCollection.js +1 -1
- package/rest/query/operations/pbfDehydratedFeatureSet.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/cim/callouts/calloutAnalysisUtils.js +2 -0
- package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
- package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
- package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
- package/symbols/cim/callouts/effects/SimpleLineCallout.js +1 -1
- package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
- package/symbols/cim/cimAnalyzer.js +1 -1
- package/views/2d/engine/webgl/ClipMesh.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/CalloutMeshWriterCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/factories/MeshWriterGroupCoordinator.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/templateUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedMarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/AFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/ComplexOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterReferences.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextMeshWriter.js +1 -1
- package/views/2d/engine/webgl/util/AnnotationMatcher.js +1 -1
- package/views/2d/engine/webgl/util/Matcher.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/layers/support/annodime/MatcherGeometryOverride.js +1 -1
- package/views/2d/layers/support/annodime/PrivateMatcherGeometryOverrideEffect.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightAuthoringUtils.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightPlacementController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRootPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
- package/views/3d/analysis/LineOfSight/lineOfSightPlacementUtils.js +1 -1
- package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +5 -3
- package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedPlacementRootPlugin.js +1 -1
- package/views/3d/camera/constraintUtils/surfaceCollision.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/interactive/editingTools/manipulatedObjectUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/graphics/FeatureGraphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
- package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
- package/views/3d/layers/i3s/I3SClientMaterialUtil.js +1 -1
- package/views/3d/layers/support/FeatureMemory.js +2 -0
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/featureReference.js +1 -1
- package/views/3d/navigation/modes/GroundNavigationMode3D.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/support/PBFDecoder.js +1 -1
- package/views/3d/support/PBFDecoderWorker.js +1 -1
- package/views/3d/support/QualityProfile.js +1 -1
- package/views/3d/support/popupHitTest.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/materials/stippleTextureRepository.js +1 -1
- package/views/DOMContainer.d.ts +2 -2
- package/views/DOMContainer.js +1 -1
- package/views/PopupView.d.ts +1 -1
- package/views/SceneView.js +1 -1
- package/views/ToolViewManager.js +1 -1
- package/views/interactive/options/TooltipVisibleElements.d.ts +11 -1
- package/views/interactive/options/TooltipVisibleElements.js +1 -1
- package/views/interactive/tooltip/components/ElevationModeSelect.js +2 -0
- package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/interactive/tooltip/infos/DynamicTooltipInfo.js +1 -1
- package/views/interactive/tooltip/infos/SketchTooltipInfo.js +1 -1
- package/views/support/hitTestSelectUtils.js +1 -1
- package/widgets/BasemapToggle/BasemapToggleViewModel.d.ts +1 -0
- package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
- package/widgets/BasemapToggle.js +1 -1
- package/widgets/BatchAttributeForm/inputs/AttachmentElementInput.d.ts +9 -1
- package/widgets/BatchAttributeForm/inputs/support/DynamicChoiceController.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +1 -0
- package/widgets/DirectionalPad/DirectionalPadViewModel.js +1 -1
- package/widgets/DirectionalPad.js +1 -1
- package/widgets/Editor/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/legacy/UpdateFeatureWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/Popup/types.d.ts +0 -7
- package/widgets/Popup.d.ts +7 -7
- package/widgets/TimeSlider/TimeSliderViewModel.d.ts +2 -0
- package/widgets/TimeSlider/TimeSliderViewModel.js +1 -1
- package/widgets/TimeSlider.js +1 -1
- package/assets/esri/core/workers/chunks/0a2b7c691a577cb3d189.js +0 -1
- package/assets/esri/core/workers/chunks/2146c25c01c9fc11b16c.js +0 -1
- package/assets/esri/core/workers/chunks/4678a8170d8a3ccd1a7b.js +0 -1
- package/assets/esri/core/workers/chunks/56e97b98dcb8a3f2bcb7.js +0 -1
- package/assets/esri/core/workers/chunks/6c3535aa7250c08b9e5b.js +0 -1
- package/assets/esri/core/workers/chunks/6e75f09fb9452bd5f9fb.js +0 -1
- package/assets/esri/core/workers/chunks/7441d121f00ce747c08e.js +0 -1
- package/assets/esri/core/workers/chunks/76548469fe1b9c3b2051.js +0 -1
- package/assets/esri/core/workers/chunks/82ce034b5ba54de9b970.js +0 -29
- package/assets/esri/core/workers/chunks/ba435cc73956d9c64a11.js +0 -1
- package/assets/esri/core/workers/chunks/c77496c350004ee66eb2.js +0 -1
- package/assets/esri/core/workers/chunks/d371d9279b30548efa02.js +0 -1
- package/assets/esri/core/workers/chunks/dc52e036547612949d32.js +0 -1
- package/assets/esri/core/workers/chunks/e5ee64e2fb5bfcb716d8.js +0 -1
- package/views/2d/engine/webgl/mesh/bufcut.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3981],{83349(t,e,n){n.d(e,{e:()=>s});const r=new Set;let i=!1;function s(t,e,n=2){const i=e&&e.length,s=i?e[0]*n:t.length;r.size&&r.clear();let a=o(t,0,s,n,!0);const l=[];if(!a||a.next===a.prev)return l;let c=0,u=0,f=0;if(i&&(a=x(t,e,a,n)),t.length>80*n){c=t[0],u=t[1];let e=c,r=u;for(let i=n;i<s;i+=n){const n=t[i],s=t[i+1];n<c&&(c=n),s<u&&(u=s),n>e&&(e=n),s>r&&(r=s)}f=Math.max(e-c,r-u),f=0!==f?32767/f:0}return h(a,l,c,u,f),l}function o(t,e,n,r,i){let s=null;if(i===Y(t,e,n,r)>0)for(let i=e;i<n;i+=r)s=O(i/r|0,t[i],t[i+1],s);else for(let i=n-r;i>=e;i-=r)s=O(i/r|0,t[i],t[i+1],s);return s&&R(s,s.next)&&(G(s),s=s.next),s}function a(t,e=t){const n=e===t;let s,o=t;do{s=!1,o===o.next||0!==r.size&&r.has(o)||!R(o,o.next)&&0!==C(o.prev,o,o.next)?(n||o!==e)&&(o=o.next,s=!n):((n||o===e)&&(e=o.prev),i=!0,G(o),o=o.prev,s=!0)}while(s||o!==e);return e}function h(t,e,n,r,s){s&&function(t,e,n,r){let i=t,s=0;do{i.z=N(i.x,i.y,e,n,r),T[s++]=i,i=i.next}while(i!==t);!function(t){if(t<=32)for(let e=1;e<t;e++){const t=T[e],n=t.z;let r=e-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=t}else{A.length<t&&(A=new Uint32Array(t),S=new Uint32Array(t),v=new Array(t));for(let e=0;e<t;e++)A[e]=T[e].z;k(t,T,A,v,S,0),k(t,v,S,T,A,8),k(t,T,A,v,S,16),k(t,v,S,T,A,24)}}(s);let o=null;for(let t=0;t<s;t++){const e=T[t];e.prevZ=o,o&&(o.nextZ=e),o=e}o.nextZ=null,T.fill(null,0,s),v.fill(null,0,s)}(t,n,r,s);let o=t,h=!1;for(;t.prev!==t.next;){const d=t.prev,x=t.next;if(C(d,t,x)<0&&(s?c(t,n,r,s):l(t)))e.push(d.i,t.i,x.i),G(t),t=x,o=x;else if((t=x)===o){if(i=!1,t=a(t),i){o=t;continue}if(!h){o=t=u(t,e),h=!0;continue}f(t,e,n,r,s);break}}}function l(t){const e=t.prev,n=t,r=t.next,i=e.x,s=n.x,o=r.x,a=e.y,h=n.y,l=r.y,c=Math.min(i,s,o),u=Math.min(a,h,l),f=Math.max(i,s,o),d=Math.max(a,h,l);let x=r.next;for(;x!==e;){if(x.x>=c&&x.x<=f&&x.y>=u&&x.y<=d&&(i!==x.x||a!==x.y)&&V(i,a,s,h,o,l,x.x,x.y)&&C(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function c(t,e,n,r){const i=t.prev,s=t,o=t.next,a=i.x,h=s.x,l=o.x,c=i.y,u=s.y,f=o.y,d=Math.min(a,h,l),x=Math.min(c,u,f),y=Math.max(a,h,l),g=Math.max(c,u,f),p=N(d,x,e,n,r),_=N(y,g,e,n,r);let m=t.prevZ;for(;m&&m.z>=p;){if(m.x>=d&&m.x<=y&&m.y>=x&&m.y<=g&&m!==o&&(a!==m.x||c!==m.y)&&V(a,c,h,u,l,f,m.x,m.y)&&C(m.prev,m,m.next)>=0)return!1;m=m.prevZ}let I=t.nextZ;for(;I&&I.z<=_;){if(I.x>=d&&I.x<=y&&I.y>=x&&I.y<=g&&I!==o&&(a!==I.x||c!==I.y)&&V(a,c,h,u,l,f,I.x,I.y)&&C(I.prev,I,I.next)>=0)return!1;I=I.nextZ}return!0}function u(t,e){let n=t,r=!1;do{const i=n.prev,s=n.next.next;E(i,n,n.next,s,!1)&&F(i,s)&&F(s,i)&&(e.push(i.i,n.i,s.i),G(n),G(n.next),n=t=s,r=!0),n=n.next}while(n!==t);return r?a(n):n}function f(t,e,n,r,i){let s=t;do{let t=s.next.next;for(;t!==s.prev;){if(s.i!==t.i&&z(s,t)){let o=U(s,t);return s=a(s,s.next),o=a(o,o.next),h(s,e,n,r,i),void h(o,e,n,r,i)}t=t.next}s=s.next}while(s!==t)}let d=!1;function x(t,e,n,i){const s=[];for(let n=0,a=e.length;n<a;n++){const h=o(t,e[n]*i,n<a-1?e[n+1]*i:t.length,i,!1);h===h.next&&r.add(h),s.push(B(h))}s.sort(y),function(t,e){const n=Math.ceil((t+2*e)/16)+e+2;p.length<4*n&&(p=new Float64Array(4*n)),_=0}(t.length/i,e.length),w(n,n),d=!0;for(let t=0;t<s.length;t++)n=g(s[t],n);return d=!1,a(n)}function y(t,e){return t.x-e.x||t.y-e.y||(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)}function g(t,e){const n=function(t,e){let n=e;const r=t.x,i=t.y;let s,o=-1/0;if(R(t,n))return n;for(let e=0,a=0;e<_;e++,a+=4){if(i<p[a+1]||i>p[a+3]||p[a]>r||p[a+2]<=o)continue;const h=b(e);n=P(e);do{if(n.prev.next===n){if(R(t,n.next))return n.next;if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const t=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(t<=r&&t>o&&(o=t,s=n.x<n.next.x?n:n.next,t===r))return s}}n=n.next}while(n!==h)}if(!s)return null;const a=s.x,h=s.y,l=Math.min(i,h),c=Math.max(i,h);let u=1/0;for(let e=0,f=0;e<_;e++,f+=4){if(p[f+2]<a||p[f]>r||p[f+3]<l||p[f+1]>c)continue;const d=b(e);n=P(e);do{if(n.prev.next===n&&r>=n.x&&n.x>=a&&r!==n.x&&V(i<h?r:o,i,a,h,i<h?o:r,i,n.x,n.y)){const e=Math.abs(i-n.y)/(r-n.x);(F(n,t)||n.y===i&&n.next.y===i&&n.next.x>r)&&(e<u||e===u&&(n.x>s.x||n.x===s.x&&M(s,n)))&&(s=n,u=e)}n=n.next}while(n!==d)}return s}(t,e);if(!n)return e;const r=U(n,t);return w(n,r.next.next),a(r,r.next),a(n,n.next)}let p=new Float64Array(0),_=0;const m=[],I=[];function w(t,e){let n=t;do{const t=_++;m[t]=n;let r=1/0,i=1/0,s=-1/0,o=-1/0,a=0;do{const e=n.next;n.z=t,n.x<r&&(r=n.x),n.x>s&&(s=n.x),n.y<i&&(i=n.y),n.y>o&&(o=n.y),e.x<r&&(r=e.x),e.x>s&&(s=e.x),e.y<i&&(i=e.y),e.y>o&&(o=e.y),n=e}while(++a<16&&n!==e);I[t]=n;const h=4*t;p[h]=r,p[h+1]=i,p[h+2]=s,p[h+3]=o}while(n!==e)}function b(t){let e=I[t];for(;e.prev.next!==e;)e=e.next;return I[t]=e,e}function P(t){let e=m[t];for(;e.prev.next!==e;)e=e.next;return m[t]=e,e}function M(t,e){return C(t.prev,t,e.prev)<0&&C(e.next,t,t.next)<0}const T=[];let v=[],A=new Uint32Array(0),S=new Uint32Array(0);const L=new Uint32Array(256);function k(t,e,n,r,i,s){L.fill(0);for(let e=0;e<t;e++)L[n[e]>>>s&255]++;let o=0;for(let t=0;t<256;t++){const e=L[t];L[t]=o,o+=e}for(let o=0;o<t;o++){const t=n[o],a=L[t>>>s&255]++;r[a]=e[o],i[a]=t}}function N(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function B(t){let e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function V(t,e,n,r,i,s,o,a){return(i-o)*(e-a)>=(t-o)*(s-a)&&(t-o)*(r-a)>=(n-o)*(e-a)&&(n-o)*(s-a)>=(i-o)*(r-a)}function z(t,e){const n=R(t,e)&&C(t.prev,t,t.next)>0&&C(e.prev,e,e.next)>0;return t.next.i!==e.i&&(n||F(t,e)&&F(e,t)&&(0!==C(t.prev,t,e.prev)||0!==C(t,e.prev,e)))&&!function(t,e){const n=Math.min(t.x,e.x),r=Math.max(t.x,e.x),i=Math.min(t.y,e.y),s=Math.max(t.y,e.y);let o=t;do{const a=o.next;if(o.x>r&&a.x>r||o.x<n&&a.x<n||o.y>s&&a.y>s||o.y<i&&a.y<i)o=a;else{if(o.i!==t.i&&a.i!==t.i&&o.i!==e.i&&a.i!==e.i&&E(o,a,t,e))return!0;o=a}}while(o!==t);return!1}(t,e)&&(n||function(t,e){let n=t,r=!1;const i=(t.x+e.x)/2,s=(t.y+e.y)/2;do{const t=n.next;n.y>s!=t.y>s&&i<(t.x-n.x)*(s-n.y)/(t.y-n.y)+n.x&&(r=!r),n=t}while(n!==t);return r}(t,e))}function C(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function R(t,e){return t.x===e.x&&t.y===e.y}function E(t,e,n,r,i=!0){const s=C(t,e,n),o=C(t,e,r),a=C(n,r,t),h=C(n,r,e);return(s>0&&o<0||s<0&&o>0)&&(a>0&&h<0||a<0&&h>0)||!!i&&(!(0!==s||!D(t,n,e))||!(0!==o||!D(t,r,e))||!(0!==a||!D(n,t,r))||!(0!==h||!D(n,e,r)))}function D(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function F(t,e){return C(t.prev,t,t.next)<0?C(t,e,t.next)>=0&&C(t,t.prev,e)>=0:C(t,e,t.prev)<0||C(t,t.next,e)<0}function U(t,e){const n=Z(t.i,t.x,t.y),r=Z(e.i,e.x,e.y),i=t.next,s=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,s.next=r,r.prev=s,r}function O(t,e,n,r){const i=Z(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function G(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ),d&&function(t,e){const n=4*t.z;e.x<p[n]&&(p[n]=e.x),e.y<p[n+1]&&(p[n+1]=e.y),e.x>p[n+2]&&(p[n+2]=e.x),e.y>p[n+3]&&(p[n+3]=e.y)}(t.prev,t.next)}function Z(t,e,n){return{i:t,x:e,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function Y(t,e,n,r){let i=0;for(let s=e,o=n-r;s<n;s+=r)i+=(t[o]-t[s])*(t[s+1]+t[o+1]),o=s;return i}let W,q,j,K,J,H=0,$=0;function Q(t,e,n,r,i,s){return(n-t)*(s-e)-(r-e)*(i-t)}function X(t,e,n,r,i,s,o,a){const h=t-o,l=e-a,c=n-o,u=r-a,f=i-o,d=s-a,x=h*h+l*l,y=c*c+u*u,g=f*f+d*d,p=x+y+g;return h*(u*g-y*d)-l*(c*g-y*f)+x*(c*d-u*f)<=1e-13*p*p}function tt(t){return t-t%3+(t+1)%3}s.deviation=function(t,e,n,r){const i=e&&e.length,s=i?e[0]*n:t.length;let o=Math.abs(Y(t,0,s,n));if(i)for(let r=0,i=e.length;r<i;r++){const s=e[r]*n,a=r<i-1?e[r+1]*n:t.length;o-=Math.abs(Y(t,s,a,n))}let a=0;for(let e=0;e<r.length;e+=3){const i=r[e]*n,s=r[e+1]*n,o=r[e+2]*n;a+=Math.abs((t[i]-t[o])*(t[s+1]-t[i+1])-(t[i]-t[s])*(t[o+1]-t[i+1]))}return 0===o&&0===a?0:Math.abs((a-o)/o)},s.flatten=function(t){const e=[],n=[],r=t[0][0].length;let i=0,s=0;for(const o of t){for(const t of o)for(let n=0;n<r;n++)e.push(t[n]);s&&(i+=s,n.push(i)),s=o.length}return{vertices:e,holes:n,dimensions:r}},s.refine=function(t,e,n=2){const r=t,i=r.length;if(i<6)return;(function(t){(!W||W.length<t)&&(W=new Int32Array(t)),(!q||q.length<t)&&(q=new Int32Array(t)),(!J||J.length<t)&&(J=new Uint8Array(t));let e=1;for(;e<4*t;)e<<=1;(!j||j.length<e)&&(j=new Int32Array(e),K=new Uint32Array(e)),H=e-1})(i),$++,q.fill(-1,0,i);let s=0;for(let t=0;t<i;t++){const e=r[t],n=r[tt(t)],i=e<n?e:n,o=e<n?n:e;let a=(Math.imul(i,2654435761)^Math.imul(o,2246822507))&H;for(;K[a]===$;){const e=j[a];if(-1!==e){const n=r[e],h=r[tt(e)];if(n===i&&h===o||n===o&&h===i){q[t]=e,q[e]=t,j[a]=-1,J[e]=1,W[s++]=e;break}}a=a+1&H}K[a]!==$&&(j[a]=t,K[a]=$)}for(;s>0;){const t=W[--s];J[t]=0;const i=q[t];if(-1===i)continue;const o=t-t%3,a=i-i%3,h=o+(t+2)%3,l=o+(t+1)%3,c=a+(i+2)%3,u=a+(i+1)%3,f=r[h],d=r[t],x=r[l],y=r[c],g=e[f*n],p=e[f*n+1],_=e[d*n],m=e[d*n+1],I=e[x*n],w=e[x*n+1],b=e[y*n],P=e[y*n+1];if(!X(g,p,_,m,I,w,b,P)&&Q(g,p,_,m,b,P)>0&&Q(g,p,b,P,I,w)>0){r[t]=y,r[i]=f;const e=q[c],n=q[h];q[t]=e,-1!==e&&(q[e]=t),q[i]=n,-1!==n&&(q[n]=i),q[h]=c,q[c]=h,-1!==e&&0===J[t]&&(J[t]=1,W[s++]=t),-1!==n&&0===J[i]&&(J[i]=1,W[s++]=i),-1!==q[l]&&0===J[l]&&(J[l]=1,W[s++]=l),-1!==q[u]&&0===J[u]&&(J[u]=1,W[s++]=u)}}}},32488(t,e,n){n.d(e,{A:()=>T});const r=[["(",")"],[")","("],["<",">"],[">","<"],["[","]"],["]","["],["{","}"],["}","{"],["«","»"],["»","«"],["‹","›"],["›","‹"],["⁽","⁾"],["⁾","⁽"],["₍","₎"],["₎","₍"],["≤","≥"],["≥","≤"],["〈","〉"],["〉","〈"],["﹙","﹚"],["﹚","﹙"],["﹛","﹜"],["﹜","﹛"],["﹝","﹞"],["﹞","﹝"],["﹤","﹥"],["﹥","﹤"]],i=["آ","أ","إ","ا"],s=["ﻵ","ﻷ","ﻹ","ﻻ"],o=["ﻶ","ﻸ","ﻺ","ﻼ"],a=["ا","ب","ت","ث","ج","ح","خ","د","ذ","ر","ز","س","ش","ص","ض","ط","ظ","ع","غ","ف","ق","ك","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ل","م","ن","ه","و","ي","إ","أ","آ","ة","ى","ی","ئ","ؤ"],h=["ﺍ","ﺏ","ﺕ","ﺙ","ﺝ","ﺡ","ﺥ","ﺩ","ﺫ","ﺭ","ﺯ","ﺱ","ﺵ","ﺹ","ﺽ","ﻁ","ﻅ","ﻉ","ﻍ","ﻑ","ﻕ","ﻙ","ﻝ","ﻡ","ﻥ","ﻩ","ﻭ","ﻱ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯼ","ﺉ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺉ","ﺅ"],l=["ﺎ","ﺐ","ﺖ","ﺚ","ﺞ","ﺢ","ﺦ","ﺪ","ﺬ","ﺮ","ﺰ","ﺲ","ﺶ","ﺺ","ﺾ","ﻂ","ﻆ","ﻊ","ﻎ","ﻒ","ﻖ","ﻚ","ﻞ","ﻢ","ﻦ","ﻪ","ﻮ","ﻲ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯽ","ﺊ","ﺆ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺊ","ﺆ"],c=["ﺎ","ﺒ","ﺘ","ﺜ","ﺠ","ﺤ","ﺨ","ﺪ","ﺬ","ﺮ","ﺰ","ﺴ","ﺸ","ﺼ","ﻀ","ﻄ","ﻈ","ﻌ","ﻐ","ﻔ","ﻘ","ﻜ","ﻠ","ﻤ","ﻨ","ﻬ","ﻮ","ﻴ","ﺈ","ﺄ","ﺂ","ﺔ","ﻰ","ﯿ","ﺌ","ﺆ","ﹱ","ﹲ","ﹴ","ﹷ","ﹹ","ﹻ","ﹽ","ﹿ","ﺀ","ﺌ","ﺆ"],u=["ﺍ","ﺑ","ﺗ","ﺛ","ﺟ","ﺣ","ﺧ","ﺩ","ﺫ","ﺭ","ﺯ","ﺳ","ﺷ","ﺻ","ﺿ","ﻃ","ﻇ","ﻋ","ﻏ","ﻓ","ﻗ","ﻛ","ﻟ","ﻣ","ﻧ","ﻫ","ﻭ","ﻳ","ﺇ","ﺃ","ﺁ","ﺓ","ﻯ","ﯾ","ﺋ","ﺅ","ﹰ","ﹲ","ﹴ","ﹶ","ﹸ","ﹺ","ﹼ","ﹾ","ﺀ","ﺋ","ﺅ"],f=["ء","آ","أ","ؤ","إ","ا","ة","د","ذ","ر","ز","و","ى"],d=["ً","ً","ٌ","؟","ٍ","؟","َ","َ","ُ","ُ","ِ","ِ","ّ","ّ","ْ","ْ","ء","آ","آ","أ","أ","ؤ","ؤ","إ","إ","ئ","ئ","ئ","ئ","ا","ا","ب","ب","ب","ب","ة","ة","ت","ت","ت","ت","ث","ث","ث","ث","ج","ج","ج","ج","ح","ح","ح","ح","خ","خ","خ","خ","د","د","ذ","ذ","ر","ر","ز","ز","س","س","س","س","ش","ش","ش","ش","ص","ص","ص","ص","ض","ض","ض","ض","ط","ط","ط","ط","ظ","ظ","ظ","ظ","ع","ع","ع","ع","غ","غ","غ","غ","ف","ف","ف","ف","ق","ق","ق","ق","ك","ك","ك","ك","ل","ل","ل","ل","م","م","م","م","ن","ن","ن","ن","ه","ه","ه","ه","و","و","ى","ى","ي","ي","ي","ي","ﻵ","ﻶ","ﻷ","ﻸ","ﻹ","ﻺ","ﻻ","ﻼ","؟","؟","؟"],x=["ء","ف"],y=["غ","ي"],g=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],p=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],_=10,m=11,I=12,w=18,b=["UBAT_L","UBAT_R","UBAT_EN","UBAT_AN","UBAT_ON","UBAT_B","UBAT_S","UBAT_AL","UBAT_WS","UBAT_CS","UBAT_ES","UBAT_ET","UBAT_NSM","UBAT_LRE","UBAT_RLE","UBAT_PDF","UBAT_LRO","UBAT_RLO","UBAT_BN"],P=[100,0,0,0,0,101,102,103,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,104,4,4,4,0,4,0,4,0,4,4,4,0,0,4,4,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,4,4,0,0,4,4,0,0,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,105,7,7,106,107],M=[[w,w,w,w,w,w,w,w,w,6,5,6,8,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,5,5,5,6,8,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,w,w,w,w,w,w,5,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,w,9,4,m,m,m,m,4,4,4,4,0,4,4,w,4,4,m,m,2,2,4,0,4,4,4,2,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,4,4,4,4,4,4,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,1,I,1,I,I,1,I,I,1,I,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,4,4,4,4,4,1,1,1,1,1,4,4,4,4,4,4,4,4,4,4,4],[3,3,3,3,4,4,4,4,7,m,m,7,9,7,4,4,I,I,I,I,I,I,I,I,I,I,I,7,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,3,3,3,3,3,3,3,3,3,3,m,3,3,7,7,7,I,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,3,4,I,I,I,I,I,I,7,7,I,I,4,I,I,I,I,7,7,2,2,2,2,2,2,2,2,2,2,7,7,7,7,7,7],[7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,7,7,I,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,I,I,I,I,I,I,I,I,I,I,I,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,I,I,I,I,I,I,I,I,I,1,1,4,4,4,4,1,4,4,4,4,4],[8,8,8,8,8,8,8,8,8,8,8,w,w,w,0,1,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,5,13,14,15,16,17,9,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,w,w,w,w,w,4,4,4,4,4,w,w,w,w,w,w,2,0,4,4,2,2,2,2,2,2,_,_,4,4,4,0,2,2,2,2,2,2,2,2,2,2,_,_,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4],[0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4,4,1,I,1,1,1,1,1,1,1,1,1,1,_,1,1,1,1,1,1,1,1,1,1,1,1,1,4,1,1,1,1,1,4,1,4,1,1,4,1,1,4,1,1,1,1,1,1,1,1,1,1,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7],[I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,I,I,I,I,I,I,I,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,4,9,4,4,9,4,4,4,4,4,4,4,4,4,m,4,4,_,_,4,4,4,4,4,m,m,4,4,4,4,4,7,7,7,7,7,4,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,4,4,w],[4,4,4,m,m,m,4,4,4,4,4,_,9,_,9,9,2,2,2,2,2,2,2,2,2,2,9,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,0,0,0,4,4,0,0,0,4,4,4,m,m,4,4,4,m,m,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4]];class T{constructor(){this.inputFormat="ILYNN",this.outputFormat="VLNNN",this.sourceToTarget=[],this.targetToSource=[],this.levels=[]}bidiTransform(t,e,n){if(this.sourceToTarget=[],this.targetToSource=[],!t)return"";if(function(t,e,n){j=[],J=[];for(let r=0;r<n;r++)t[r]=r,e[r]=r,j[r]=r}(this.sourceToTarget,this.targetToSource,t.length),!this.checkParameters(e,n))return t;e=this.inputFormat,n=this.outputFormat;let r=t;const a=H,c=Z(e.charAt(1)),f=Z(n.charAt(1)),x=(e.startsWith("I")?"L":e.charAt(0))+c,y=(n.startsWith("I")?"L":n.charAt(0))+f,g=e.charAt(2)+n.charAt(2);a.defInFormat=x,a.defOutFormat=y,a.defSwap=g;const p=v(t,x,y,g,a);let _=!1;return"R"===n.charAt(1)?_=!0:"C"!==n.charAt(1)&&"D"!==n.charAt(1)||(_="rtl"===this.checkContextual(p)),this.sourceToTarget=j,this.targetToSource=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[t[n]]=n;return e}(this.sourceToTarget),K=this.targetToSource,r=e.charAt(3)===n.charAt(3)?p:"S"===n.charAt(3)?function(t,e){if(0===e.length)return"";void 0===t&&(t=!0);const n=(e=String(e)).split("");let r=0,i=1,a=n.length;t||(r=n.length-1,i=-1,a=1);const c=function(t,e,n,r){let i=0;const a=[];let c=0;for(let f=e;f*n<r;f+=n)if(V(t[f])||G(t[f])){if("ل"===t[f]&&C(t,f+n,n,r)){t[f]=W(t[f+n],0===i?s:o),f+=n,Y(t,f,n,r),a[c]=f,c++,i=0;continue}const e=t[f];1===i?t[f]=z(t,f+n,n,r)?U(t[f]):O(t[f],l):!0===z(t,f+n,n,r)?t[f]=O(t[f],u):t[f]=O(t[f],h),G(e)||(i=1),!0===F(e)&&(i=0)}else i=0;return a}(n,r,i,a);let f="";for(let e=0;e<n.length;e++)B(c,c.length,e)>-1?(q(K,e,!t,-1),j.splice(e,1)):f+=n[e];return f}(_,p):function(t,e){if(0===t.length)return"";void 0===e&&(e=!0);let n="";const r=(t=String(t)).split("");for(let s=0;s<t.length;s++){let o=!1;if(r[s]>="ﹰ"&&r[s]<"\ufeff"){const a=t.charCodeAt(s);r[s]>="ﻵ"&&r[s]<="ﻼ"?(e?(s>0&&" "===r[s-1]?n=n.slice(0,-1)+"ل":(n+="ل",o=!0),n+=i[(a-65269)/2]):(n+=i[(a-65269)/2],n+="ل",s+1<t.length&&" "===r[s+1]?s++:o=!0),o&&(q(K,s,!0,1),j.splice(s,0,j[s]))):n+=d[a-65136]}else n+=r[s]}return n}(p,_),this.sourceToTarget=j,this.targetToSource=K,this.levels=J,r}_inputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.inputFormat=t}_outputFormatSetter(t){if(!et.test(t))throw new Error("dojox/string/BidiEngine: the bidi layout string is wrong!");this.outputFormat=t}checkParameters(t,e){return t?this._inputFormatSetter(t):t=this.inputFormat,e?this._outputFormatSetter(e):e=this.outputFormat,t!==e}checkContextual(t){let e=A(t);if("ltr"!==e&&"rtl"!==e){try{e=document.dir.toLowerCase()}catch(t){}"ltr"!==e&&"rtl"!==e&&(e="ltr")}return e}hasBidiChar(t){return nt.test(t)}}function v(t,e,n,r,i){const s=function(t,e,n){if(void 0===e.inFormat&&(e.inFormat=n.defInFormat),void 0===e.outFormat&&(e.outFormat=n.defOutFormat),void 0===e.swap&&(e.swap=n.defSwap),e.inFormat===e.outFormat)return e;const r=e.inFormat.slice(0,1),i=e.outFormat.slice(0,1);let s,o=e.inFormat.slice(1,4),a=e.outFormat.slice(1,4);return o.startsWith("C")&&(s=A(t),o="ltr"===s||"rtl"===s?s.toUpperCase():"L"===e.inFormat.charAt(2)?"LTR":"RTL",e.inFormat=r+o),a.startsWith("C")&&(s=A(t),"rtl"===s?a="RTL":"ltr"===s?(s=function(t){const e=t.split("");return e.reverse(),A(e.join(""))}(t),a=s.toUpperCase()):a="L"===e.outFormat.charAt(2)?"LTR":"RTL",e.outFormat=i+a),e}(t,{inFormat:e,outFormat:n,swap:r},i);if(s.inFormat===s.outFormat)return t;e=s.inFormat,n=s.outFormat,r=s.swap;const o=e.slice(0,1),a=e.slice(1,4),h=n.slice(0,1),l=n.slice(1,4);if(i.inFormat=e,i.outFormat=n,i.swap=r,"L"===o&&"VLTR"===n){if("LTR"===a)return i.dir=X,S(t,i);if("RTL"===a)return i.dir=tt,S(t,i)}if("V"===o&&"V"===h)return i.dir="RTL"===a?tt:X,N(t,i);if("L"===o&&"VRTL"===n)return"LTR"===a?(i.dir=X,t=S(t,i)):(i.dir=tt,t=S(t,i)),N(t);if("VLTR"===e&&"LLTR"===n)return i.dir=X,S(t,i);if("V"===o&&"L"===h&&a!==l)return t=N(t),"RTL"===a?v(t,"LLTR","VLTR",r,i):v(t,"LRTL","VRTL",r,i);if("VRTL"===e&&"LRTL"===n)return v(t,"LRTL","VRTL",r,i);if("L"===o&&"L"===h){const e=i.swap;return i.swap=e.slice(0,1)+"N","RTL"===a?(i.dir=tt,t=S(t,i),i.swap="N"+e.slice(1,3),i.dir=X,t=S(t,i)):(i.dir=X,t=S(t,i),i.swap="N"+e.slice(1,3),t=v(t,"VLTR","LRTL",i.swap,i)),t}return t}function A(t){const e=/[A-Za-z\u05d0-\u065f\u066a-\u06ef\u06fa-\u07ff\ufb1d-\ufdff\ufe70-\ufefc]/.exec(t);return e?e[0]<="z"?"ltr":"rtl":""}function S(t,e){const n=t.split(""),r=[];return L(n,r,e),function(t,e,n){if(0!==n.hiLevel&&n.swap[0]!==n.swap[1])for(let n=0;n<t.length;n++)1===e[n]&&(t[n]=D(t[n]))}(n,r,e),R(2,n,r,e),R(1,n,r,e),J=r,n.join("")}function L(t,e,n){const r=t.length,i=n.dir?p:g;let s=0,o=-1;const a=[],h=[];n.hiLevel=n.dir,n.lastArabic=!1,n.hasUbatAl=!1,n.hasUbatB=!1,n.hasUbatS=!1;for(let e=0;e<r;e++)a[e]=k(t[e]);for(let l=0;l<r;l++){const r=s,c=E(t,a,h,l,n);h[l]=c,s=i[r][c];const u=240&s;s&=15;const f=i[s][$];if(e[l]=f,u>0)if(16===u){for(let t=o;t<l;t++)e[t]=1;o=-1}else o=-1;if(i[s][Q])-1===o&&(o=l);else if(o>-1){for(let t=o;t<l;t++)e[t]=f;o=-1}5===a[l]&&(e[l]=0),n.hiLevel|=f}n.hasUbatS&&function(t,e,n,r){for(let i=0;i<n;i++)if(6===t[i]){e[i]=r.dir;for(let n=i-1;n>=0&&8===t[n];n--)e[n]=r.dir}}(a,e,r,n)}function k(t){const e=t.charCodeAt(0),n=P[e>>8];return n<100?n:M[n-100][255&e]}function N(t,e){const n=t.split("");if(e){const t=[];L(n,t,e),J=t}return n.reverse(),j.reverse(),n.join("")}function B(t,e,n){for(let r=0;r<e;r++)if(t[r]===n)return r;return-1}function V(t){for(let e=0;e<x.length;e++)if(t>=x[e]&&t<=y[e])return!0;return!1}function z(t,e,n,r){for(;e*n<r&&G(t[e]);)e+=n;return!!(e*n<r&&V(t[e]))}function C(t,e,n,r){for(;e*n<r&&G(t[e]);)e+=n;let s=" ";if(!(e*n<r))return!1;s=t[e];for(let t=0;t<i.length;t++)if(i[t]===s)return!0;return!1}function R(t,e,n,r){if(r.hiLevel<t)return;if(1===t&&r.dir===tt&&!r.hasUbatB)return e.reverse(),void j.reverse();const i=e.length;let s,o,a,h,l,c=0;for(;c<i;){if(n[c]>=t){for(s=c+1;s<i&&n[s]>=t;)s++;for(o=c,a=s-1;o<a;o++,a--)h=e[o],e[o]=e[a],e[a]=h,l=j[o],j[o]=j[a],j[a]=l;c=s}c++}}function E(t,e,n,r,i){const s=e[r];return{UBAT_L:()=>(i.lastArabic=!1,0),UBAT_R:()=>(i.lastArabic=!1,1),UBAT_ON:()=>4,UBAT_AN:()=>3,UBAT_EN:()=>i.lastArabic?3:2,UBAT_AL:()=>(i.lastArabic=!0,i.hasUbatAl=!0,1),UBAT_WS:()=>4,UBAT_CS:()=>{let t,s;return r<1||r+1>=e.length||2!==(t=n[r-1])&&3!==t||2!==(s=e[r+1])&&3!==s?4:(i.lastArabic&&(s=3),s===t?s:4)},UBAT_ES:()=>2===(r>0?n[r-1]:5)&&r+1<e.length&&2===e[r+1]?2:4,UBAT_ET:()=>{if(r>0&&2===n[r-1])return 2;if(i.lastArabic)return 4;let t=r+1;const s=e.length;for(;t<s&&11===e[t];)t++;return t<s&&2===e[t]?2:4},UBAT_NSM:()=>{if("VLTR"===i.inFormat){const n=e.length;let i=r+1;for(;i<n&&12===e[i];)i++;if(i<n){const n=t[r].charCodeAt(0),s=n>=1425&&n<=2303||64286===n,o=e[i];if(s&&(1===o||7===o))return 1}}return r<1||5===e[r-1]?4:n[r-1]},UBAT_B:()=>(i.lastArabic=!0,i.hasUbatB=!0,i.dir),UBAT_S:()=>(i.hasUbatS=!0,4),UBAT_LRE:()=>(i.lastArabic=!1,4),UBAT_RLE:()=>(i.lastArabic=!1,4),UBAT_LRO:()=>(i.lastArabic=!1,4),UBAT_RLO:()=>(i.lastArabic=!1,4),UBAT_PDF:()=>(i.lastArabic=!1,4),UBAT_BN:()=>4}[b[s]]()}function D(t){let e,n=0,i=r.length-1;for(;n<=i;)if(e=Math.floor((n+i)/2),t<r[e][0])i=e-1;else{if(!(t>r[e][0]))return r[e][1];n=e+1}return t}function F(t){for(let e=0;e<f.length;e++)if(f[e]===t)return!0;return!1}function U(t){for(let e=0;e<a.length;e++)if(t===a[e])return c[e];return t}function O(t,e){for(let n=0;n<a.length;n++)if(t===a[n])return e[n];return t}function G(t){return t>="ً"&&t<="ٕ"}function Z(t){return"L"===t?"LTR":"R"===t?"RTL":"C"===t?"CLR":"D"===t?"CRL":""}function Y(t,e,n,r){for(;e*n<r&&G(t[e]);)e+=n;return e*n<r&&(t[e]=" ",!0)}function W(t,e){for(let n=0;n<i.length;n++)if(t===i[n])return e[n];return t}function q(t,e,n,r){for(let i=0;i<t.length;i++)(t[i]>e||!n&&t[i]===e)&&(t[i]+=r)}let j=[],K=[],J=[];const H={dir:0,defInFormat:"LLTR",defSwap:"YN",inFormat:"LLTR",outFormat:"VLTR",swap:"YN",hiLevel:0,lastArabic:!1,hasUbatAl:!1,defOutFormat:""},$=5,Q=6,X=0,tt=1,et=/^[(I|V)][(L|RCD)][(Y|N)][(S|N)]N$/,nt=/[\u0591-\u06ff\ufb1d-\ufefc]/},95488(t,e,n){n.d(e,{I:()=>i});var r=n(11406);class i extends r.T{notify(){const t=this._observers;if(t&&t.length>0){const e=t.slice();for(const t of e)t.onInvalidated(),t.onCommitted()}}}},34304(t,e,n){n.d(e,{DF:()=>h,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const s=Math.random,o=Math.PI/180,a=180/Math.PI;function h(t){return t*o}function l(t){return t*a}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:s,equals:function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))},getEpsilon:i,setEpsilon:function(t){r=t},toDegree:l,toRadian:h},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,s])},51624(t,e,n){n.d(e,{A:()=>l});var r=n(44208),i=n(69397),s=n(93687);const o=4294967296,a=new TextDecoder("utf-8"),h=(0,r.A)("safari")||(0,r.A)("ios")?6:(0,r.A)("ff")?12:32;class l{constructor(t,e,n=0,r=t?.byteLength??0){this._tag=0,this._dataType=99,this._init(t,e,n,r)}[Symbol.dispose](){this.release()}_init(t,e,n,r){this._data=t,this._dataView=e,this._pos=n,this._end=r}get usedMemory(){return 64+(0,i.Qf)(this._data)}asUnsafe(){return this}clone(){return new l(this._data,this._dataView,this._pos,this._end)}clonePooled(){return l.constructPooled(this._data,this._dataView,this._pos,this._end)}static constructPooled(t,e,n=0,r=t?.byteLength??0){const i=l.pool.acquire();return i._init(t,e,n,r),i}pos(){return this._pos}move(t){this._pos=t}nextTag(t){for(;;){if(this._pos===this._end)return!1;const e=this._decodeVarint();if(this._tag=e>>3,this._dataType=7&e,!t||t===this._tag)break;this.skip()}return!0}next(){if(this._pos===this._end)return!1;const t=this._decodeVarint();return this._tag=t>>3,this._dataType=7&t,!0}empty(){return this._pos>=this._end}tag(){return this._tag}getInt32(){return this._decodeVarint()}getInt64(){return this._decodeVarint()}getUInt32(){let t=4294967295;if(t=(127&this._data[this._pos])>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<7)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<14)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(127&this._data[this._pos])<<21)>>>0,this._data[this._pos++]<128)return t;if(t=(t|(15&this._data[this._pos])<<28)>>>0,this._data[this._pos++]<128)return t;throw new Error("Varint overflow")}getPackedEnd(){const t=this.getUInt32();return this._pos+t}getUInt64(){return this._decodeVarint()}getSInt32(){const t=this.getUInt32();return t>>>1^-(1&t)}getSInt64(){return this._decodeSVarint()}getBool(){const t=0!==this._data[this._pos];return this._skip(1),t}getEnum(){return this._decodeVarint()}getFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getUint32(e+4,!0)*o;return this._skip(8),n}getSFixed64(){const t=this._dataView,e=this._pos,n=t.getUint32(e,!0)+t.getInt32(e+4,!0)*o;return this._skip(8),n}getDouble(){const t=this._dataView.getFloat64(this._pos,!0);return this._skip(8),t}getFixed32(){const t=this._dataView.getUint32(this._pos,!0);return this._skip(4),t}getSFixed32(){const t=this._dataView.getInt32(this._pos,!0);return this._skip(4),t}getFloat(){const t=this._dataView.getFloat32(this._pos,!0);return this._skip(4),t}getString(){const t=this._getLength(),e=this._pos,n=this._toString(this._data,e,e+t);return this._skip(t),n}getBytes(){const t=this._getLength(),e=this._pos,n=this._toBytes(this._data,e,e+t);return this._skip(t),n}getLength(){return this._getLengthUnsafe()}processMessageWithArgs(t,e,n,r){const i=this.getMessage(),s=t(i,e,n,r);return i.release(),s}processMessage(t){const e=this.getMessage(),n=t(e);return e.release(),n}getMessage(){const t=this._getLength(),e=l.pool.acquire();return e._init(this._data,this._dataView,this._pos,this._pos+t),this._skip(t),e}release(){l.pool.release(this)}dataType(){return this._dataType}skip(){switch(this._dataType){case 0:this._decodeVarint();break;case 1:this._skip(8);break;case 2:this._skip(this._getLength());break;case 5:this._skip(4);break;default:throw new Error("Invalid data type!")}}skipToEnd(){for(;this.next();)this.skip()}skipLen(t){this._skip(t)}_skip(t){if(this._pos+t>this._end)throw new Error("Attempt to skip past the end of buffer!");this._pos+=t}_decodeVarint(){const t=this._data;let e=this._pos,n=0,r=0;if(this._end-e>=10)do{if(r=t[e++],n|=127&r,!(128&r))break;if(r=t[e++],n|=(127&r)<<7,!(128&r))break;if(r=t[e++],n|=(127&r)<<14,!(128&r))break;if(r=t[e++],n|=(127&r)<<21,!(128&r))break;if(r=t[e++],n+=268435456*(127&r),!(128&r))break;if(r=t[e++],n+=34359738368*(127&r),!(128&r))break;if(r=t[e++],n+=4398046511104*(127&r),!(128&r))break;if(r=t[e++],n+=562949953421312*(127&r),!(128&r))break;if(r=t[e++],n+=72057594037927940*(127&r),!(128&r))break;if(r=t[e++],n+=0x8000000000000000*(127&r),!(128&r))break;throw new Error("Varint too long!")}while(0);else{let i=1;for(;e!==this._end&&(r=t[e],128&r);)++e,n+=(127&r)*i,i*=128;if(e===this._end)throw new Error("Varint overrun!");++e,n+=r*i}return this._pos=e,n}_decodeSVarint(){const t=this._data;let e,n=0,r=0;const i=1&t[this._pos];if(r=t[this._pos++],n|=127&r,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<7,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<14,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n|=(127&r)<<21,!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=268435456*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=34359738368*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(r=t[this._pos++],n+=4398046511104*(127&r),!(128&r))return i?-(n+1)/2:n/2;if(e=BigInt(n),r=t[this._pos++],e+=0x2000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x100000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);if(r=t[this._pos++],e+=0x8000000000000000n*BigInt(127&r),!(128&r))return Number(i?-(e+1n)/2n:e/2n);throw new Error("Varint too long!")}_getLength(){if(2!==this._dataType)throw new Error("Not a delimited data type!");return this._decodeVarint()}_getLengthUnsafe(){return this.getUInt32()}_toString(t,e,n){if((n=Math.min(this._end,n))-e>h){const r=t.subarray(e,n);return a.decode(r)}let r="",i="";for(let s=e;s<n;++s){const e=t[s];128&e?i+="%"+e.toString(16):(r+=decodeURIComponent(i)+String.fromCharCode(e),i="")}return i.length&&(r+=decodeURIComponent(i)),r}_toBytes(t,e,n){return n=Math.min(this._end,n),new Uint8Array(t.buffer,e,n-e)}static{this.pool=new s.A(()=>new l(null,null),void 0,t=>{t._data=null,t._dataView=null})}}},36745(t,e,n){n.d(e,{z:()=>a});var r=n(4718),i=n(51118),s=n(60408),o=n(92722);class a{static fromOptimized(t,e,n=1){return(new h).initialize(t,e,n)}static fromJSON(t){const[e,n]=c(t),r=(0,s.Pv)(t),i=(0,s.W0)(t);return(new u).initialize(e,n,r,i,1)}static fromOptimizedCIM(t,e,n=1){return(new f).initialize(t,e,n)}static fromJSONCIM(t,e=1){const[n,r]=c(t),i=(0,s.Pv)(t),o=(0,s.W0)(t);return(new d).initialize(n,r,i,o,e)}static fromFeatureSetReader(t){const e=t.readGeometryForDisplay(),n=t.geometryType;return e&&n?this.fromOptimized(e,n):null}static fromFeatureSetReaderCIM(t){const e=t.readGeometryForDisplay(),n=t.geometryType;return e&&n?this.fromOptimizedCIM(e,n):null}static createEmptyOptimized(t,e=!1,n=!1,r=1){return(new f).initialize(new o.A([],[],e,n),t,r)}static createEmptyJSON(t,e=!1,n=!1){return(new u).initialize([],t,e,n,1)}static createEmptyOptimizedCIM(t,e=!1,n=!1,r=1){return(new f).initialize(new o.A([],[],e,n),t,r)}static createEmptyJSONCIM(t,e=!1,n=!1,r=1){return(new d).initialize([],t,e,n,r)}asJSON(){const t=(0,i.x)(this),{hasZ:e,hasM:n}=this;return"esriGeometryEnvelope"===this.geometryType?{xmin:t[0][0][0],ymin:t[0][0][1],xmax:t[0][2][0],ymax:t[0][2][1]}:"esriGeometryMultipoint"===this.geometryType?{points:t.flat(),hasZ:e,hasM:n}:"esriGeometryPoint"===this.geometryType?{x:t[0][0][0],y:t[0][0][1],z:e?t[0][0][2]:void 0,m:n?t[0][0][e?3:2]:void 0}:"esriGeometryPolygon"===this.geometryType?{rings:t,hasZ:e,hasM:n}:{paths:t,hasZ:e,hasM:n}}getCurrentRingArea(){if(this.pathSize<3)return 0;let t,e,n=0;if(this.seekPathStart(),!this.nextPoint())return 0;t=this.x,e=this.y;const r=t,i=e;for(;this.nextPoint();)n+=(t-this.x)*(e+this.y),t=this.x,e=this.y;return n+=(t-r)*(e+i),-.5*n}invertY(){this.yFactor*=-1}}class h extends a{constructor(){super(...arguments),this._end=-1}get hasZ(){return this._geometry?.hasZ}get hasM(){return this._geometry?.hasM}initialize(t,e,n){return this.geometryType=e,this._stride=t.stride,this._geometry=t,this._pathIndex=-1,this._pathOffset=0,this._pointOffset=-this._stride,this._end=-1,this.yFactor=n,this}reset(){this.initialize(this._geometry,this.geometryType,this.yFactor)}seekPath(t){if(t>=0&&t<this.totalSize){if(this._pathIndex<t)for(;this._pathIndex<t&&this.nextPath(););else if(this._pathIndex>t)for(;this._pathIndex>t&&this.prevPath(););return!0}return!1}seekPathStart(){this._pointOffset=this._pathOffset-this._stride}seekPathEnd(){this._pointOffset=this._end}seekInPath(t){const e=this._pathOffset+t*this._stride;return e>=0&&e<this._end&&(this._pointOffset=e,!0)}nextPoint(){return(this._pointOffset+=this._stride)<this._end}prevPoint(){return(this._pointOffset-=this._stride)>=this._pathOffset}nextPath(){return!(this.pathIndex>=this.totalSize-1||(this._pathIndex>=0&&(this._pathOffset+=this._stride*this.pathSize),this._pathIndex++,this._pointOffset=this._pathOffset-this._stride,this._end=this._pointOffset+this._stride+this._stride*this.pathSize,0))}prevPath(){return!(this.pathIndex<=0||(this._pathIndex--,this._end=this._pathOffset,this._pathOffset-=this._stride*this.pathSize,this._pointOffset=this._pathOffset-this._stride,0))}getCurrentPath(){const t=this._end,e=this._geometry.coords,n=this._pathOffset;return(new h).initialize(new o.A([this.pathSize],e.slice(n,t),this.hasZ,this.hasM),this.geometryType,this.yFactor)}pathLength(){const t=this._end,e=this._stride,n=this._geometry.coords;let r=0;for(let i=this._pathOffset+e;i<t;i+=e){const t=n[i-e],s=n[i-e+1],o=n[i]-t,a=n[i+1]-s;r+=Math.sqrt(o*o+a*a)}return r}startPath(){this._geometry.lengths.push(0)}pushPath(t){this.startPath(),this.pushPoints(t)}pushPoint(t){for(let e=0;e<this._stride;++e)this._geometry.coords.push(t[e]);this._geometry.lengths[this.totalSize-1]++}pushXY(t,e){this._geometry.coords.push(t,e),this._geometry.lengths[this.totalSize-1]++}pushPoints(t){for(const e of t)for(let t=0;t<this._stride;++t)this._geometry.coords.push(e[t]);this._geometry.lengths[this.totalSize-1]+=t.length}pushCursor(t){const e=t.asOptimized();this._geometry.coords.push(...e.coords),this._geometry.lengths.push(...e.lengths)}asOptimized(){const t=this._geometry.clone();if(1!==this.yFactor)for(let e=1;e<t.coords.length;e+=this._stride)t.coords[e]*=this.yFactor;return"esriGeometryPoint"===this.geometryType&&(t.lengths.length=0),t}isClosed(){const t=this._geometry.coords,e=this._pathOffset,n=this._end-this._stride;for(let r=0;r<this._stride;r++)if(t[e+r]!==t[n+r])return!1;return!0}clone(){return(new h).initialize(this._geometry.clone(),this.geometryType,this.yFactor)}get totalPoints(){return this._geometry.isPoint?1:this._geometry.lengths.reduce((t,e)=>t+e)}get pathSize(){const{lengths:t}=this._geometry;return this._geometry.isPoint?1:this._pathIndex<0||this._pathIndex>t.length-1?0:t[this._pathIndex]}get totalSize(){return this._geometry.isPoint?1:this._geometry.lengths.length}get x(){return this._geometry.coords[this._pointOffset]}set x(t){this._geometry.coords[this._pointOffset]=t}get y(){return this.yFactor*this._geometry.coords[this._pointOffset+1]}set y(t){this._geometry.coords[this._pointOffset+1]=this.yFactor*t}get z(){return this._geometry.coords[this._pointOffset+2]}set z(t){this._geometry.coords[this._pointOffset+2]=t}get m(){const t=this.hasZ?3:2;return this._geometry.coords[this._pointOffset+t]}set m(t){this._geometry.coords[this._pointOffset+3]=t}get pathIndex(){return this._pathIndex}get _coordIndex(){return this._pointOffset/this._stride}}function l(t){const e=[t.x,t.y];return t.z&&e.push(t.z),t.m&&e.push(t.m),e}function c(t){return(0,s.Bi)(t)?[t.rings,"esriGeometryPolygon"]:(0,s.Rg)(t)?[t.paths,"esriGeometryPolyline"]:(0,s.U9)(t)?[[t.points],"esriGeometryMultipoint"]:(0,s.ZC)(t)?[[[[t.xmin,t.ymin],[t.xmin,t.ymax],[t.xmax,t.ymax],[t.xmax,t.ymin],[t.xmin,t.ymin]]],"esriGeometryEnvelope"]:(0,s.fT)(t)?[[[l(t)]],"esriGeometryPoint"]:[[],"esriGeometryPolyline"]}class u extends a{initialize(t,e,n,r,i){return this._paths=t,this.geometryType=e,this.hasZ=n,this.hasM=r,this._pathIndex=this._pointIndex=-1,this.yFactor=i,this._mIndex=this.hasZ?3:2,this}reset(){this._pathIndex=this._pointIndex=-1}seekPath(t){return this._pathIndex=t,this._pointIndex=-1,t>=0&&t<this.totalSize&&(this._currentPath=this._paths[t],!0)}seekPathStart(){this._pointIndex=-1}seekPathEnd(){this._pointIndex=this._currentPath.length}seekInPath(t){return t>=0&&t<this._currentPath.length&&(this._pointIndex=t,this._currentPoint=this._currentPath[this._pointIndex],!0)}nextPoint(){return this._currentPoint=this._currentPath[++this._pointIndex],this._pointIndex<this._currentPath.length}prevPoint(){return this._currentPoint=this._currentPath[--this._pointIndex],this._pointIndex>=0}nextPath(){return this._pointIndex=-1,this._currentPath=this._paths[++this._pathIndex],this._pathIndex<this.totalSize}prevPath(){return this.pathIndex>0&&(this._pointIndex=-1,this._pathIndex--,this._currentPath=this._paths[this._pathIndex],!0)}pathLength(){const t=this._currentPath.length,e=this._currentPath;let n=0;for(let r=1;r<t;r++){const t=e[r-1],i=e[r],s=t[0],o=t[1],a=i[0]-s,h=i[1]-o;n+=Math.sqrt(a*a+h*h)}return n}startPath(){this._paths.push([])}getCurrentPath(){return(new u).initialize([this._currentPath],this.geometryType,this.hasZ,this.hasM,this.yFactor)}pushPath(t){this._paths.push(t)}pushPoint(t){this._paths[this.totalSize-1].push(t)}pushXY(t,e){this._paths[this.totalSize-1].push([t,e])}pushPoints(t){this._paths[this.totalSize-1].push(...t)}pushCursor(t){const e=(0,i.x)(t);for(const t of e)this.pushPath(t)}asOptimized(){const{hasZ:t,hasM:e}=this,n=new o.A([],[],t,e),{coords:r,lengths:i}=n;if("esriGeometryPoint"===this.geometryType)r.push(...this._paths[0][0]),i.length=0;else for(const n of this._paths){for(const i of n)r.push(i[0]),r.push(i[1]*this.yFactor),t&&r.push(i[2]),e&&r.push(i[this._mIndex]);i.push(n.length)}return n}isClosed(){const t=this._currentPath[0],e=this._currentPath[this._currentPath.length-1];for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}clone(){return(new u).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}get totalPoints(){return this._paths.map(t=>t.length).reduce((t,e)=>t+e)}get pathSize(){return this._pathIndex<0||this._pathIndex>this.totalSize-1?-1:this._paths[this._pathIndex].length}get totalSize(){return this._paths.length}get x(){return this._currentPoint[0]}set x(t){this._currentPoint[0]=t}get y(){return this.yFactor*this._currentPoint[1]}set y(t){this._currentPoint[1]=this.yFactor*t}get z(){return this._currentPoint[2]}set z(t){this._currentPoint[2]=t}get m(){return this._currentPoint[this._mIndex]}set m(t){this._currentPoint[this._mIndex]=t}get pathIndex(){return this._pathIndex}}class f extends h{initialize(t,e,n){return super.initialize(t,e,n),this._controlPoints||(this._controlPoints=this._controlPoints=new Array(this.totalSize).fill(void 0).map(t=>new Set)),this}startPath(){super.startPath(),this._controlPoints.push(new Set)}clone(){const t=(new f).initialize(this._geometry.clone(),this.geometryType,this.yFactor);return t._controlPoints=this._controlPoints,t}setControlPoint(){this._controlPoints[this.pathIndex].add(this._coordIndex)}getControlPoint(){return this._controlPoints[this.pathIndex].has(this._coordIndex)}setControlPointAt(t){this._controlPoints[this.pathIndex].add(t)}getControlPointAt(t){return this._controlPoints[this.pathIndex].has(t)}}class d extends u{initialize(t,e,n,r,i){return super.initialize(t,e,n,r,i)}clone(){return(new d).initialize((0,r.o8)(this._paths),this.geometryType,this.hasZ,this.hasM,this.yFactor)}setControlPoint(){this._paths[this.pathIndex][this._pointIndex][4]=1}getControlPoint(){return 1===this._paths[this.pathIndex][this._pointIndex][4]}setControlPointAt(t){this._paths[this.pathIndex][t][4]=1}getControlPointAt(t){return 1===this._paths[this.pathIndex][t][4]}}},51118(t,e,n){function r(t){const e=[];for(t.reset();t.nextPath();){const n=[];for(;t.nextPoint();){const e=[t.x,t.y];t.hasZ&&e.push(t.z),t.hasM&&e.push(t.m),n.push(e)}e.push(n)}return t.reset(),e}function i(t){const e=[];for(;t.nextPoint();)e.push([t.x,t.y]);return t.seekPathStart(),e}n.d(e,{A:()=>i,x:()=>r})},15585(t,e,n){n.d(e,{If:()=>d,O5:()=>p,O9:()=>y,QT:()=>g,l3:()=>x});var r=n(32198),i=n(2741),s=n(49186),o=n(44208),a=n(34727);let h=null,l=null,c=null,u=null;const f=(new Float32Array(0),new Uint32Array(0),new Uint32Array(0),new Uint32Array(0),{vertices:new Float64Array(0),indices:new Uint32Array(0),outlineIndices:new Uint32Array(0),outlineRingLengths:new Uint32Array(0),vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function d(){return h??=async function(){const t=await n.e(2997).then(()=>n(42997)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});c=e}(),h}async function x(){return l??=async function(){const t=await n.e(9134).then(()=>n(99134)),e=await t.default({locateFile:t=>(0,i.s)(`esri/core/libs/libtess/${t}`)});u=e}(),l}function y(){return null!==u}function g(t,e,n=2){const i={stack:[],error:void 0,hasError:!1};try{const a=c;if(!a)throw new s.A("libtess:not-loaded","libtessF32 not loaded");const h=(0,r.mS)(i,w.from(a,t),!1),l=(0,r.mS)(i,P.from(a,e),!1),u=t.length/n*4,f=(0,r.mS)(i,new w(a,u*n),!1),d=a.triangulate(h.ptr,l.ptr,l.size,n,f.ptr,u);if((0,o.A)("esri-tessellation-debug")){const t=a.getError();0!==t&&console.warn("libtess:triangulation",M(t))}return{buffer:f.slice(0,d*n),vertexCount:d}}catch(t){i.error=t,i.hasError=!0}finally{(0,r.hk)(i)}}function p(t,e,n=2,i=!0){const h={stack:[],error:void 0,hasError:!1};try{const l=u;if(!l)throw new s.A("libtess:not-loaded","libtessF64 not loaded");const c=(0,r.mS)(h,b.from(l,t),!1),d=(0,r.mS)(h,P.from(l,e),!1),x=(0,r.mS)(h,new P(l,1),!1),y=(0,r.mS)(h,new P(l,1),!1),g=(0,r.mS)(h,new P(l,1),!1),p=(0,r.mS)(h,new P(l,1),!1),{maxVertexCount:_,maxIndexCount:m,maxOutlineIndexCount:w,maxOutlineRingCount:T}=function(t,e){const n=t.reduce((t,e)=>t+e,0),r=t.length,i=Math.max(0,t.length-1),s=Math.max(0,n+2*i-2),o=Math.max(0,Math.ceil(2*n)),h=Math.max(0,Math.ceil(3*s*2)),l=(0,a.mP)(h,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,u=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:o,maxIndexCount:l,maxOutlineIndexCount:e?Math.max(0,n+r+c):0,maxOutlineRingCount:e?Math.max(0,r+u):0}}(e,i);let v=0,A=0,S=0,L=0,k=0;{const t={stack:[],error:void 0,hasError:!1};try{const e=(0,r.mS)(t,new b(l,_*n),!1),s=(0,r.mS)(t,new P(l,m),!1),o=(0,r.mS)(t,i?new P(l,w):null,!1),a=(0,r.mS)(t,i?new P(l,T):null,!1);if(l.triangulateIndexed(c.ptr,d.ptr,d.size,n,e.ptr,_,n,s.ptr,m,x.ptr,y.ptr,o?.ptr??0,w,a?.ptr??0,T,g.ptr,p.ptr),k=l.getError(),v=I(l)[x.ptr/Int32Array.BYTES_PER_ELEMENT],A=I(l)[y.ptr/Int32Array.BYTES_PER_ELEMENT],S=I(l)[g.ptr/Int32Array.BYTES_PER_ELEMENT],L=I(l)[p.ptr/Int32Array.BYTES_PER_ELEMENT],0===k){const t=e.slice(0,v*n);return{vertices:t,indices:s.slice(0,A),outlineIndices:i&&o?o.slice(0,S):f.outlineIndices,outlineRingLengths:i&&a?a.slice(0,L):f.outlineRingLengths,vertexCount:v,indexCount:A,outlineIndexCount:i?S:0,outlineRingCount:i?L:0}}}catch(e){t.error=e,t.hasError=!0}finally{(0,r.hk)(t)}}if(100903!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(k)),f;const N=(0,r.mS)(h,new b(l,v*n),!1),B=(0,r.mS)(h,new P(l,A),!1),V=(0,r.mS)(h,i?new P(l,S):null,!1),z=(0,r.mS)(h,i?new P(l,L):null,!1);if(l.triangulateIndexed(c.ptr,d.ptr,d.size,n,N.ptr,v,n,B.ptr,A,x.ptr,y.ptr,V?.ptr??0,i?S:0,z?.ptr??0,i?L:0,g.ptr,p.ptr),k=l.getError(),0!==k)return(0,o.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",M(k)),f;const C=I(l)[x.ptr/Int32Array.BYTES_PER_ELEMENT],R=I(l)[y.ptr/Int32Array.BYTES_PER_ELEMENT],E=I(l)[g.ptr/Int32Array.BYTES_PER_ELEMENT],D=I(l)[p.ptr/Int32Array.BYTES_PER_ELEMENT],F=N.slice(0,C*n);return{vertices:F,indices:B.slice(0,R),outlineIndices:i&&V?V.slice(0,E):f.outlineIndices,outlineRingLengths:i&&z?z.slice(0,D):f.outlineRingLengths,vertexCount:C,indexCount:R,outlineIndexCount:i?E:0,outlineRingCount:i?D:0}}catch(t){h.error=t,h.hasError=!0}finally{(0,r.hk)(h)}}function _(t){return t.HEAPF64}function m(t){return t.HEAPF32}function I(t){return t.HEAP32}class w{static from(t,e){const n=new w(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(t){m(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return m(this._libtess).slice(n+t,n+e)}}class b{static from(t,e){const n=new b(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateCoordinateArray(e)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(t){_(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return _(this._libtess).slice(n+t,n+e)}}class P{static from(t,e){const n=new P(t,e.length);return n.set(e),n}constructor(t,e){this._libtess=t,this.size=e,this.ptr=t.allocateLengthsArray(e)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(t){I(this._libtess).set(t,this.ptr/this.bytesPerCoordinate)}slice(t,e){const n=this.ptr/this.bytesPerCoordinate;return function(t){const e=I(t);return new Uint32Array(e.buffer,e.byteOffset,e.length)}(this._libtess).slice(n+t,n+e)}}function M(t){switch(t){case 100903:return"Insufficient output buffer";case 100902:return"Out of memory";case 100151:return"Missing begin polygon";case 100152:return"Missing begin contour";case 100153:return"Missing end polygon";case 100154:return"Missing end countour";case 100155:return"Coordinates too large";case 100156:return"Missing combine callback";default:return`Unknown: ${t}`}}},537(t,e,n){n.d(e,{B$:()=>g,LJ:()=>p,Pj:()=>I,Rg:()=>x,Yz:()=>_,z8:()=>y});var r=n(19419),i=n(79567),s=n(52006);function o(t){return void 0!==t.xmin&&void 0!==t.ymin&&void 0!==t.xmax&&void 0!==t.ymax}function a(t){return void 0!==t.points}function h(t){return void 0!==t.x&&void 0!==t.y}function l(t){return void 0!==t.paths}function c(t){return void 0!==t.rings}function u(t){return function(e,n){return null==e?n:null==n?e:t(e,n)}}const f=u(Math.min),d=u(Math.max);function x(t,e){return l(e)?_(t,e.curvePaths??e.paths,!1,!1)??t:c(e)?_(t,e.curveRings??e.rings,!1,!1)??t:a(e)?I(t,e.points,!1,!1,!1,!1):o(e)?m(t,e):(h(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.x,t[3]=e.y),t)}function y(t){let e,n,i,s;for(t.reset(),e=i=1/0,n=s=-1/0;t.nextPath();){const r=g(t);e=Math.min(r[0],e),i=Math.min(r[1],i),n=Math.max(r[2],n),s=Math.max(r[3],s)}return(0,r.vt)([e,i,n,s])}function g(t){let e,n,i,s;for(e=i=1/0,n=s=-1/0;t.nextPoint();)e=Math.min(t.x,e),i=Math.min(t.y,i),n=Math.max(t.x,n),s=Math.max(t.y,s);return(0,r.vt)([e,i,n,s])}function p(t,e){return l(e)?_(t,e.curvePaths??e.paths,!0,!1)??t:c(e)?_(t,e.curveRings??e.rings,!0,!1)??t:a(e)?I(t,e.points,!0,!1,!0,!1):o(e)?m(t,e,0,0,!0,!1):(h(e)&&(t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.x,t[4]=e.y,t[5]=e.z),t)}function _(t,e,n,o){const a=n?3:2;if(!e.length||!e[0].length)return null;let h,l,c,u,[x,y]=(0,s.yP)(e[0][0]),g=x,p=y;for(let t=0;t<e.length;t++){const _=e[t];for(let t=0;t<_.length;t++){const e=(0,s.yP)(_[t]),[m,I]=e;if(x=f(x,m),y=f(y,I),g=d(g,m),p=d(p,I),n&&e.length>2){const t=e[2];h=f(h,t),l=d(l,t)}if(o&&e.length>a){const t=e[a];c=f(c,t),u=d(u,t)}const w=_[t];if((0,s.Xq)(w)||t<1)continue;const b=(0,s.yP)(_[t-1]),P=(0,r.fA)(x,y,g,p);[x,y,g,p]=(0,i.e)(P,b,w)}}return n?o?(t[0]=x,t[1]=y,t[2]=h,t[3]=c,t[4]=g,t[5]=p,t[6]=l,t[7]=u,t.length=8,t):(t[0]=x,t[1]=y,t[2]=h,t[3]=g,t[4]=p,t[5]=l,t.length=6,t):o?(t[0]=x,t[1]=y,t[2]=c,t[3]=g,t[4]=p,t[5]=u,t.length=6,t):(t[0]=x,t[1]=y,t[2]=g,t[3]=p,t.length=4,t)}function m(t,e,n,r,i,s){const o=e.xmin,a=e.xmax,h=e.ymin,l=e.ymax;let c=e.zmin,u=e.zmax,f=e.mmin,d=e.mmax;return i?(c=c||0,u=u||0,s?(f=f||0,d=d||0,t[0]=o,t[1]=h,t[2]=c,t[3]=f,t[4]=a,t[5]=l,t[6]=u,t[7]=d,t):(t[0]=o,t[1]=h,t[2]=c,t[3]=a,t[4]=l,t[5]=u,t)):s?(f=f||0,d=d||0,t[0]=o,t[1]=h,t[2]=f,t[3]=a,t[4]=l,t[5]=d,t):(t[0]=o,t[1]=h,t[2]=a,t[3]=l,t)}function I(t,e,n,r,i,s){const o=n?3:2,a=r&&s,h=n&&i;if(!e.length||!e[0].length)return null;let l,c,u,x,[y,g]=e[0],[p,_]=e[0];for(let t=0;t<e.length;t++){const n=e[t],[r,i]=n;if(y=f(y,r),g=f(g,i),p=d(p,r),_=d(_,i),h&&n.length>2){const t=n[2];l=f(l,t),c=d(c,t)}if(a&&n.length>o){const t=n[o];u=f(l,t),x=d(c,t)}}return i?(l=l||0,c=c||0,s?(u=u||0,x=x||0,t[0]=y,t[1]=g,t[2]=l,t[3]=u,t[4]=p,t[5]=_,t[6]=c,t[7]=x,t):(t[0]=y,t[1]=g,t[2]=l,t[3]=p,t[4]=_,t[5]=c,t)):s?(u=u||0,x=x||0,t[0]=y,t[1]=g,t[2]=u,t[3]=p,t[4]=_,t[5]=x,t):(t[0]=y,t[1]=g,t[2]=p,t[3]=_,t)}},12359(t,e,n){n.d(e,{IK:()=>c,TP:()=>u,Ve:()=>a,Z4:()=>s,l8:()=>o,w2:()=>l});var r=n(51118),i=n(95108);function s({xmin:t,xmax:e,ymin:n,ymax:r,zmin:i,zmax:s,hasZ:o}){const a=[(t+e)/2,(n+r)/2];return o&&a.push((i+s)/2),a}function o(t){return function(t,e){if(!t?.length)return null;const n=[],r=[],s=e?[1/0,-1/0,1/0,-1/0,1/0,-1/0]:[1/0,-1/0,1/0,-1/0];for(let n=0,i=t.length;n<i;n++){const i=h(t[n],e,s);i&&r.push(i)}if(r.sort((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r}),r.length&&(n[0]=r[0][0],n[1]=r[0][1],e&&(n[2]=r[0][3]),(n[0]<s[0]||n[0]>s[1]||n[1]<s[2]||n[1]>s[3]||e&&(n[2]<s[4]||n[2]>s[5]))&&(n.length=0)),!n.length){const r=t[0]&&t[0].length?function(t,e){const n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;for(let l=0,c=t.length;l<c-1;l++){const c=t[l],u=t[l+1];if(c&&u){n[0]=c[0],n[1]=c[1],r[0]=u[0],r[1]=u[1],e&&c.length>2&&u.length>2&&(n[2]=c[2],r[2]=u[2]);const t=(0,i.R3)(n,r);if(t){s+=t;const n=(0,i.t9)(c,u);o+=t*n[0],a+=t*n[1],e&&n.length>2&&(h+=t*n[2])}}}return s>0?e?[o/s,a/s,h/s]:[o/s,a/s]:t.length?t[0]:null}(t[0],e):null;if(!r)return null;n[0]=r[0],n[1]=r[1],e&&r.length>2&&(n[2]=r[2])}return n}(t.rings,t.hasZ??!1)}function a(t){const e=o(t);if(!e)return null;const{hasZ:n,spatialReference:r}=t,[i,s,a]=e;return isNaN(i)||isNaN(s)||n&&isNaN(a)?null:{x:i,y:s,z:n?a:void 0,spatialReference:r}}function h(t,e,n){let r=0,i=0,s=0,o=0,a=0;const h=t.length?t[0][0]:0,l=t.length?t[0][1]:0,c=t.length&&e?t[0][2]:0;for(let u=0;u<t.length;u++){const f=t[u],d=t[(u+1)%t.length],[x,y,g]=f,p=x-h,_=y-l,[m,I,w]=d,b=m-h,P=I-l,M=p*P-b*_;if(o+=M,r+=(p+b)*M,i+=(_+P)*M,e&&f.length>2&&d.length>2){const t=g-c,e=w-c,n=p*e-b*t;s+=(t+e)*n,a+=n}x<n[0]&&(n[0]=x),x>n[1]&&(n[1]=x),y<n[2]&&(n[2]=y),y>n[3]&&(n[3]=y),e&&(g<n[4]&&(n[4]=g),g>n[5]&&(n[5]=g))}if(o>0&&(o*=-1),a>0&&(a*=-1),!o)return null;o*=.5,a*=.5;const u=[r/(6*o)+h,i/(6*o)+l,o];return e&&(n[4]===n[5]||0===a?(u[3]=(n[4]+n[5])/2,u[4]=0):(u[3]=s/(6*a)+c,u[4]=a)),u}function l(t,e){let n=0,r=0,i=0;t.nextPoint();const s=t.pathSize?t.x:0,o=t.pathSize?t.y:0;for(let a=0;a<t.pathSize;a++){t.seekInPath(a);const h=[t.x,t.y];t.seekInPath((a+1)%t.pathSize);const l=[t.x,t.y],[c,u]=h,f=c-s,d=u-o,[x,y]=l,g=x-s,p=y-o,_=f*p-g*d;i+=_,n+=(f+g)*_,r+=(d+p)*_,c<e[0]&&(e[0]=c),c>e[1]&&(e[1]=c),u<e[2]&&(e[2]=u),u>e[3]&&(e[3]=u)}return i>0&&(i*=-1),i?(i*=.5,[n/(6*i)+s,r/(6*i)+o,i]):null}function c(t){const{hasZ:e,totalSize:n}=t;if(0===n)return null;const s=[],o=[],a=e?[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY]:[Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.POSITIVE_INFINITY,Number.NEGATIVE_INFINITY];for(t.reset();t.nextPath();){const e=h((0,r.A)(t),t.hasZ,a);e&&o.push(e)}if(o.sort((t,n)=>{let r=t[2]-n[2];return 0===r&&e&&(r=t[4]-n[4]),r}),o.length&&(s[0]=o[0][0],s[1]=o[0][1],e&&(s[2]=o[0][3]),(s[0]<a[0]||s[0]>a[1]||s[1]<a[2]||s[1]>a[3]||e&&(s[2]<a[4]||s[2]>a[5]))&&(s.length=0)),!s.length){t.reset(),t.nextPath();const n=t.pathSize?function(t){const{hasZ:e}=t,n=e?[0,0,0]:[0,0],r=e?[0,0,0]:[0,0];let s=0,o=0,a=0,h=0;if(t.nextPoint()){let l=t.x,c=t.y,u=t.z;for(;t.nextPoint();){const f=t.x,d=t.y,x=t.z;n[0]=l,n[1]=c,r[0]=f,r[1]=d,e&&(n[2]=u,r[2]=x);const y=(0,i.R3)(n,r);if(y){s+=y;const t=(0,i.t9)(n,r);o+=y*t[0],a+=y*t[1],e&&t.length>2&&(h+=y*t[2])}l=f,c=d,u=x}}return s>0?e?[o/s,a/s,h/s]:[o/s,a/s]:t.pathSize?(t.seekPathStart(),t.nextPoint(),[t.x,t.y]):null}(t):null;if(!n)return null;s[0]=n[0],s[1]=n[1],e&&n.length>2&&(s[2]=n[2])}return s}function u(t){let e=0;for(t.reset();t.nextPath();)e+=t.getCurrentRingArea();if(e<1e-6){const e=c(t);return e?[e[0],e[1]]:null}const n=[0,0];if(t.reset(),!t.nextPath()||!t.nextPoint())return null;const r=[t.x,t.y];for(t.reset();t.nextPath();)d(n,r,t);return n[0]*=1/e,n[1]*=1/e,n[0]+=r[0],n[1]+=r[1],n}const f=1/3;function d(t,e,n){if(!t||!n||n.pathSize<3)return null;n.nextPoint();const r=n.x,i=n.y;n.nextPoint();let s,o=n.x-r,a=n.y-i,h=0,l=0;for(;n.nextPoint();)h=n.x-r,l=n.y-i,s=.5*f*(h*a-l*o),t[0]+=s*(o+h),t[1]+=s*(a+l),o=h,a=l;const c=n.getCurrentRingArea(),u=[r,i];return u[0]-=e[0],u[1]-=e[1],u[0]*=c,u[1]*=c,t[0]+=u[0],t[1]+=u[1],t}},95108(t,e,n){n.d(e,{$3:()=>c,Ng:()=>a,R3:()=>i,Xf:()=>o,Yl:()=>l,gR:()=>s,m3:()=>f,t9:()=>h});var r=n(4576);function i(t,e){const n=e[0]-t[0],r=e[1]-t[1];if(t.length>2&&e.length>2){const i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}return Math.sqrt(n*n+r*r)}function s(t,e,n,r){const[i,s]=e,[o,a]=n,[h,l]=r,c=h-o,u=l-a,f=c*c+u*u,d=(i-o)*c+(s-a)*u,x=Math.min(1,Math.max(0,d/f));return t[0]=o+c*x,t[1]=a+u*x,t}function o(t,e,n){let r,i,s,o,h=!1,l=1/0;for(n.reset();n.nextPath();)if(n.nextPoint())for(r=n.x,i=n.y;n.nextPoint();)s=n.x,o=n.y,i>e!=o>e&&t<(s-r)*(e-i)/(o-i)+r&&(h=!h),l=Math.min(l,a(t,e,r,i,s,o)),r=s,i=o;return 0===l?0:(h?1:-1)*Math.sqrt(l)}function a(t,e,n,r,i,s){let o=n,a=r,h=i-o,l=s-a;if(0!==h||0!==l){const n=((t-o)*h+(e-a)*l)/(h*h+l*l);n>1?(o=i,a=s):n>0&&(o+=h*n,a+=l*n)}return h=t-o,l=e-a,h*h+l*l}function h(t,e){return function(t,e,n){const r=t[0]+n*(e[0]-t[0]),i=t[1]+n*(e[1]-t[1]);return t.length>2&&e.length>2?[r,i,t[2]+n*(e[2]-t[2])]:[r,i]}(t,e,.5)}function l(t){const e=t.length;let n=0;for(let r=0;r<e-1;++r)n+=i(t[r],t[r+1]);return n}function c(t,e=0,n=1){let r=0;const i=t.length;let s=t[0];for(let o=1;o<i;o++){const i=t[o];r+=(i[e]-s[e])*(i[n]+s[n]),s=i}if(u(t)){const i=t[0];r+=(i[e]-s[e])*(i[n]+s[n])}return r>=0}function u(t){const e=t.length;return e>0&&!(0,r.aI)(t[0],t[e-1])}function f(t){if("rings"in t)for(const e of t.rings)u(e)&&e.push(e[0].slice())}n(52006)},52006(t,e,n){function r(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function i(t){return"curveRings"in t?t.curveRings:t.curvePaths}function s(t){return"b"in t}function o(t){return"c"in t}function a(t){return Array.isArray(t)}function h(t){return"a"in t}function l(t){return"a"in t&&4===t.a.length}function c(t){return"a"in t&&7===t.a.length}function u(t,e){return i(t).flat().some(t=>function(t,e){return!(a(t)||(s(t)?e.has("cubic-bezier"):o(t)?e.has("circular-arc"):!l(t)&&!c(t)||e.has("elliptic-arc")))}(t,e))}function f(t){return a(t)?t:s(t)?t.b[0]:o(t)?t.c[0]:t.a[0]}function d(t){if(s(t)){const[e,n,r]=t.b;return{b:[[...e],[...n],[...r]]}}if(o(t)){const[e,n]=t.c;return{c:[[...e],[...n]]}}if(a(t))return[...t];if(l(t)){const[e,n,r,i]=t.a;return{a:[[...e],[...n],r,i]}}if(c(t)){const[e,n,r,i,s,o,a]=t.a;return{a:[[...e],[...n],r,i,s,o,a]}}return t}n.d(e,{DA:()=>l,Ed:()=>r,FD:()=>i,FG:()=>h,V8:()=>u,Xq:()=>a,aO:()=>o,n1:()=>s,tk:()=>d,wY:()=>c,yP:()=>f}),n(4576)},78957(t,e,n){n.d(e,{d:()=>c,R:()=>w});class r{constructor(t=i){this._data=[],this._compare=t}get size(){return this._data.length}enqueue(t){if(null==t)return;const{_data:e,_compare:n}=this;e.push(t);let r=e.length-1>>>0;const i=e[r];for(;r>0;){const t=r-1>>1,s=e[t];if(!(n(s,i)<=0))break;e[t]=i,e[r]=s,r=t}}dequeue(){const{_data:t,_compare:e}=this,n=t[0],r=t.pop();if(0===t.length)return n;t[0]=r;let i=0;const s=t.length,o=t[0];let a,h,l=null;for(;;){const n=2*i+1,r=2*i+2;if(l=null,n<s&&(a=t[n],e(a,o)>0&&(l=n)),r<s&&(h=t[r],(null===l&&e(h,o)<=0||null!==l&&e(h,a)<=0)&&(l=r)),null===l)break;t[i]=t[l],t[l]=o,i=l}return n}}const i=(t,e)=>t<e?-1:t>e?1:0;var s=n(19419),o=n(537),a=n(12359),h=n(95108),l=n(12176);function c(t){if(0===t.totalSize)return null;const e=(0,o.z8)(t);if(!e)return null;const n=4*(Math.abs(e[0])+Math.abs(e[2])+Math.abs(e[1])+Math.abs(e[3])+1)*222045e-19;let r=0,i=0;t.reset();for(let e=0;t.nextPath();e++){const n=t.getCurrentRingArea();n>i&&(i=n,r=e)}if(t.seekPath(r),0===t.pathSize)return null;t.seekPathStart();const h=(0,o.B$)(t);if(Math.abs(i)<=2*n*n)return[(h[0]+h[2])/2,(h[1]+h[3])/2];t.seekPathStart();const l=(0,a.w2)(t,(0,s.vt)());if(null===l)return null;if(t.totalPoints<4)return l;const c=[[NaN,NaN],[NaN,NaN],[NaN,NaN],[NaN,NaN]],x=[NaN,NaN,NaN,NaN],y=[NaN,NaN,NaN,NaN];let g=!1,I=f(l,t,!0);0===I.distance&&(g=!0,c[0][0]=l[0],c[0][1]=l[1],I=f(l,t,!1)),x[0]=I.distance,y[0]=0;const w=[NaN,NaN];let b=!1,P=.25,M=-1,T=NaN;do{if(T=NaN,c[1]=d(t,p(h[0],h[2],P),0,e),isNaN(c[1][0])||isNaN(c[1][1])||(I=f(c[1],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[1],t))b=!0,x[1]=T,y[1]=_(c[1],l);else if(!isNaN(T)&&T>M&&(M=T,w[0]=c[1][0],w[1]=c[1][1]),P-=.01,P<.1){if(!(M>=0))break;b=!0,x[1]=M,c[1][0]=w[0],c[1][1]=w[1],y[1]=_(c[1],l)}}while(!b);b=!1,P=.5,M=-1;let v=.01,A=1;do{if(T=NaN,c[2]=d(t,p(h[0],h[2],P),0,e),isNaN(c[2][0])||isNaN(c[2][1])||(I=f(c[2],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[2],t))b=!0,x[2]=T,y[2]=_(c[2],l);else if(!isNaN(T)&&T>M)M=T,w[0]=c[2][0],w[1]=c[2][1];else if(T>M&&(M=T,w[0]=c[2][0],w[1]=c[2][1]),P=.5+v*A,v+=.01,A*=-1,P<.3||P>.7){if(!(M>=0))break;b=!0,x[2]=M,c[2][0]=w[0],c[2][1]=w[1],y[2]=_(c[2],l)}}while(!b);b=!1,P=.75,M=-1;do{if(T=NaN,c[3]=d(t,p(h[0],h[2],P),0,e),isNaN(c[3][0])||isNaN(c[3][1])||(I=f(c[3],t,!1),T=I.distance),!isNaN(T)&&T>n&&u(c[3],t))b=!0,x[3]=T,y[3]=_(c[3],l);else if(T>M&&(M=T,w[0]=c[3][0],w[1]=c[3][1]),P+=.01,P>.9){if(!(M>=0))break;b=!0,x[3]=M,c[3][0]=w[0],c[3][1]=w[1],y[3]=_(c[3],l)}}while(!b);const S=[0,1,2,3],L=g?0:1;let k;for(let t=L;t<4;t++)for(let t=L;t<3;t++){const e=y[t],n=y[t+1];m(e,n)>0&&(k=S[t],S[t]=S[t+1],S[t+1]=k,y[t]=n,y[t+1]=e)}let N=L,B=0,V=0;for(let t=L;t<4;t++){switch(t){case 0:V=2*x[S[t]];break;case 1:V=1.66666666*x[S[t]];break;case 2:V=1.33333333*x[S[t]];break;case 3:V=x[S[t]]}V>B&&(B=V,N=S[t])}return c[N]}function u(t,e){let n,r,i,s,o=0;for(e.reset();e.nextPath()&&e.nextPoint();)for(n=e.x,r=e.y;e.nextPoint();n=i,r=s)i=e.x,s=e.y,r>t[1]!=s>t[1]&&((i-n)*(t[1]-r)-(s-r)*(t[0]-n)>0?o++:o--);return 0!==o}function f(t,e,n){if(n&&u(t,e))return{coord:t,distance:0};let r=1/0,i=0,s=0,o=[0,0],a=[0,0];const l=[0,0];for(e.reset();e.nextPath()&&e.nextPoint();)if(!(e.pathSize<2))for(o[0]=e.x,o[1]=e.y;e.nextPoint();o=a){a=[e.x,e.y],(0,h.gR)(l,t,o,a);const n=_(t,l);n<r&&(r=n,i=l[0],s=l[1])}return{coord:[i,s],distance:Math.sqrt(r)}}function d(t,e,n,r){const i=[e,0];let o=1/0,a=1/0,h=!1,c=!1;const u=[[e,r[1]-1],[e,r[3]+1]],f=[0,0],d=[0,0],g=[0,0],p=[[0,0],[0,0]],_=(0,s.vt)();for(t.reset();t.nextPath()&&t.nextPoint();)if(!(t.pathSize<2))for(p[0][0]=t.x,p[0][1]=t.y;t.nextPoint();p[0][0]=p[1][0],p[0][1]=p[1][1]){if(p[1][0]=t.x,p[1][1]=t.y,null===x(_,p))continue;if(d[0]=u[0][0],d[1]=u[0][1],g[0]=u[1][0],g[1]=u[1][1],0===y(_,d,g))continue;if(!(0,l.Ql)(u[0],u[1],p[0],p[1],f))continue;const e=f[1];o>a?e<o&&(o=e,h=!0):e<a&&(a=e,c=!0)}return h&&c?i[1]=(o+a)/2:i[0]=i[1]=NaN,i}function x(t,e){if(e.length<2)return null;t||(t=(0,s.vt)());const[n,r]=e[0],[i,o]=e[1];return t[0]=Math.min(n,i),t[1]=Math.min(r,o),t[2]=Math.max(n,i),t[3]=Math.max(r,o),t}function y(t,e,n){let r=g(e,t),i=g(n,t);const s=t[0],o=t[1],a=t[2],h=t[3];if(r&i)return 0;if(!(r|i))return 4;const l=(r?1:0)|(i?2:0);do{const l=n[0]-e[0],c=n[1]-e[1];if(l>c)3&r?(1&r?(e[1]+=c*(s-e[0])/l,e[0]=s):(e[1]+=c*(a-e[0])/l,e[0]=a),r=g(e,t)):3&i?(1&i?(n[1]+=c*(s-n[0])/l,n[0]=s):(n[1]+=c*(a-n[0])/l,n[0]=a),i=g(n,t)):r?(4&r?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),r=g(e,t)):(4&i?(n[0]+=l*(o-n[1])/c,n[1]=o):(n[0]+=l*(h-n[1])/c,n[1]=h),i=g(n,t));else if(12&r?(4&r?(e[0]+=l*(o-e[1])/c,e[1]=o):(e[0]+=l*(h-e[1])/c,e[1]=h),r=g(e,t)):12&i?(4&i?(n[0]+=l*(o-n[1])/c,n[1]=o):(n[0]+=l*(h-n[1])/c,n[1]=h),i=g(n,t)):r?(1&r?(e[1]+=c*(s-e[0])/l,e[0]=s):(e[1]+=c*(a-e[0])/l,e[0]=a),r=g(e,t)):(1&i?(n[1]+=c*(s-n[0])/l,n[0]=s):(n[1]+=c*(a-n[0])/l,n[0]=a),i=g(n,t)),r&i)return 0}while(r|i);return l}function g(t,e){return(t[0]<e[0]?1:0)|(t[0]>e[2]?1:0)<<1|(t[1]<e[1]?1:0)<<2|(t[1]>e[3]?1:0)<<3}function p(t,e,n){return t+(e-t)*n}function _(t,e){return(t[0]-e[0])*(t[0]-e[0])+(t[1]-e[1])*(t[1]-e[1])}function m(t,e){if(t<e)return-1;if(t>e)return 1;if(t===e)return 0;const n=isNaN(t),r=isNaN(e);return n<r?-1:n>r?1:0}class I{constructor(t,e,n,r){this.x=t,this.y=e,this.cellSize=n,this.distancefromCellCenter=(0,h.Xf)(t,e,r),this.maxDistanceToPolygon=this.distancefromCellCenter+this.cellSize*Math.SQRT2}}function w(t){if(!t.nextPath()||!t.pathSize)return null;const e=(0,o.B$)(t),n=e[2]-e[0],i=e[3]-e[1];if(0===n||0===i)return[e[0]+n/2,e[1]+i/2];const s=Math.max(Math.min(n,i)/100,1),h=new r((t,e)=>e.maxDistanceToPolygon-t.maxDistanceToPolygon),l=Math.min(n,i);let c=l/2,u=0,f=0;for(u=e[0];u<e[2];u+=l)for(f=e[1];f<e[3];f+=l)h.enqueue(new I(u+c,f+c,c,t));t.reset(),t.nextPath();const d=(0,a.IK)(t);if(null===d)return null;let x,y=new I(d[0],d[1],0,t);for(;h.size>0;)x=h.dequeue(),x.distancefromCellCenter>y.distancefromCellCenter&&(y=x),x.maxDistanceToPolygon-y.distancefromCellCenter<=s||(c=x.cellSize/2,h.enqueue(new I(x.x-c,x.y-c,c,t)),h.enqueue(new I(x.x+c,x.y-c,c,t)),h.enqueue(new I(x.x-c,x.y+c,c,t)),h.enqueue(new I(x.x+c,x.y+c,c,t)));return[y.x,y.y]}},97770(t,e,n){n.d(e,{Ey:()=>B,F8:()=>N,J2:()=>A,Yq:()=>L,_m:()=>S,iS:()=>k,wj:()=>V});var r=n(66552),i=n(73444),s=n(98623),o=n(34747);const a={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},h={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},l={timeZone:"UTC"},c={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},f={year:"numeric",month:"short",day:"numeric"},d={year:"numeric",month:"long",weekday:"long",day:"numeric"},x={hour:"numeric",minute:"numeric"},y={...x,second:"numeric"},g={hourCycle:"h23"},p={...x,...g},_={...y,...g},m={"short-date":c,"short-date-short-time":{...c,...x},"short-date-short-time-24":{...c,...p},"short-date-long-time":{...c,...y},"short-date-long-time-24":{...c,..._},"short-date-le":c,"short-date-le-short-time":{...c,...x},"short-date-le-short-time-24":{...c,...p},"short-date-le-long-time":{...c,...y},"short-date-le-long-time-24":{...c,..._},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...x},"long-month-day-year-short-time-24":{...u,...p},"long-month-day-year-long-time":{...u,...y},"long-month-day-year-long-time-24":{...u,..._},"day-short-month-year":f,"day-short-month-year-short-time":{...f,...x},"day-short-month-year-short-time-24":{...f,...p},"day-short-month-year-long-time":{...f,...y},"day-short-month-year-long-time-24":{...f,..._},"long-date":d,"long-date-short-time":{...d,...x},"long-date-short-time-24":{...d,...p},"long-date-long-time":{...d,...y},"long-date-long-time-24":{...d,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":x,"long-time":y},I=(0,r.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),w={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},b=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),P=b.find(({type:t})=>"month"===t)?.value.toLowerCase();function M(){const t=(0,i.lR)();return(t&&w[t])??(0,i.QC)()}"mart"!==P&&(w.bs="sr-Latn-CS");let T=new WeakMap;const v=m["short-date-short-time"];function A(t){return m[t]}function S(t){const{dateStyle:e,timeStyle:n,hour12:r,year:i,month:s}=t,o={};return e?o.dateStyle=e:i&&(o.year=i,o.month=s||void 0),n&&!o.year&&(o.timeStyle=n,o.hour12="auto"===r?void 0:"always"===r),o}function L(t,e=v){return function(t){let e=T.get(t);if(!e){const n=M(),r=V(t.timeZone??"system"),i={...t,timeZone:r};e=new Intl.DateTimeFormat(n,i),T.set(t,e)}return e}(e).format(t)}function k(t,e=v){return L(new Date(t),{...e,...l,...h})}function N(t,e=v){return L(new Date(`1970-01-01T${t}Z`),{...e,...l,...a})}function B(t,e=v){const n=o.c9.fromISO(t,{setZone:!0});if(!n.isValid)return t;if(e.timeZone)return L(n.toJSDate(),e);const r=0===n.offset?"UTC":e.timeZone,i={...e,timeZone:r};return n.toLocaleString(i,{locale:M()})}function V(t){switch(t){case"system":return s.N;case s.L:return"UTC";default:return t}}(0,i.Ml)(()=>{T=new WeakMap}),n.d(e,["_v",0,I])},73444(t,e,n){n.d(e,{JK:()=>h,Ml:()=>g,QC:()=>u,lR:()=>c,oQ:()=>x});var r=n(36563);let i;n(44208);const s=globalThis.esriConfig?.locale,o=globalThis.document?.documentElement;function a(){const t=o?.getAttribute("lang"),e=globalThis.navigator?.language;return s??t??e??"en"}function h(){return void 0===i&&(i=a()),i}const l=/^(?<language>[a-z]{2,3})(?:-(?<extlang>[a-z]{3}))?(?:-[A-Z][a-z]{3})?(?:-(?<region>[A-Z]{2}|\d{3}))?(?:-.*)?$/;function c(t=h()){return f(t)?.language}function u(t=h()){const e=f(t);return e?.language&&e?.extlang?t.replace(`${e.language}-`,""):t}function f(t=h()){return l.exec(t)?.groups}const d=[];function x(t){return d.push(t),(0,r.hA)(()=>{d.splice(d.indexOf(t),1)})}new Map;const y=[];function g(t){return y.push(t),(0,r.hA)(()=>y.splice(y.indexOf(t),1))}function p(){const t=a();i!==t&&([...y].forEach(e=>e(t)),i=t,[...d].forEach(e=>e(t)))}globalThis.addEventListener?.("languagechange",p),o&&new MutationObserver(()=>{p()}).observe(o,{attributeFilter:["lang"]})},92722(t,e,n){n.d(e,{A:()=>i});var r=n(69397);class i{constructor(t=[],e=[],n=!1,r=!1){this.lengths=t??[],this.coords=e??[],this.hasZ=n,this.hasM=r}static fromJSON({lengths:t,coords:e,hasZ:n,hasM:r}){return new i(t,e,n||!1,r||!1)}static fromRect([t,e,n,r]){const s=n-t,o=r-e;return new i([5],[t,e,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((t,e)=>t+e,0)}get usedMemory(){return 64+(0,r.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let t=0,e=0;for(const n of this.lengths){if(n<3)continue;const{stride:r}=this;let i=this.coords[r*e],s=this.coords[r*e+1];for(let o=1;o<n;o+=1){const n=r*(e+o),a=this.coords[n],h=this.coords[n+1];t+=-.5*(a-i)*(h+s),i=a,s=h}e+=n}return t}forEachVertex(t){let e=0;if(this.isPoint)return t(this.coords[0],this.coords[1]);const{stride:n}=this;for(const r of this.lengths){for(let i=0;i<r;i++){const r=n*(e+i);t(this.coords[r],this.coords[r+1])}e+=r}}deltaDecode(){const t=this.clone(),{coords:e,lengths:n}=t;let r=0;const{stride:i}=this;for(const t of n){for(let n=1;n<t;n++){const t=i*(r+n);e[t]+=e[t-i],e[t+1]+=e[t+1-i]}r+=t}return t}clone(t){if(this.isPoint)return new i([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const e=Array.from(this.lengths),{stride:n,size:r}=this,s=this.coords.slice(0,r*n);return t?(t.set(s),new i(e,t,this.hasZ,this.hasM)):new i(e,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:t,size:e}=this;if(2===t)return this;const n=new Array(e*t);for(let e=0,r=0;e<n.length;e+=t)n[r++]=this.coords[e],n[r++]=this.coords[e+1];return new i(this.lengths,n,!1,!1)}}},98623(t,e,n){const r=Intl.DateTimeFormat().resolvedOptions().timeZone;n.d(e,["L",0,"unknown","N",0,r])},36984(t,e,n){n.r(e),n.d(e,{default:()=>X});var r=n(17676),i=n(29953),s=n(6774),o=n(13195);function a(t){return 746===t||747===t||!(t<4352)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103&&!(t>=65097&&t<=65103)||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351&&!(t>=12296&&t<=12305||t>=12308&&t<=12319||12336===t)||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=12592&&t<=12687||t>=43360&&t<=43391||t>=55216&&t<=55295||t>=4352&&t<=4607||t>=44032&&t<=55215||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12688&&t<=12703||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543&&12540!==t||t>=65280&&t<=65519&&!(65288===t||65289===t||65293===t||t>=65306&&t<=65310||65339===t||65341===t||65343===t||t>=65371&&t<=65503||65507===t||t>=65512&&t<=65519)||t>=65104&&t<=65135&&!(t>=65112&&t<=65118||t>=65123&&t<=65126)||t>=5120&&t<=5759||t>=6320&&t<=6399||t>=65040&&t<=65055||t>=19904&&t<=19967||t>=40960&&t<=42127||t>=42128&&t<=42191)}function h(t){return!(t<11904)&&(t>=12704&&t<=12735||t>=12544&&t<=12591||t>=65072&&t<=65103||t>=63744&&t<=64255||t>=13056&&t<=13311||t>=11904&&t<=12031||t>=12736&&t<=12783||t>=12288&&t<=12351||t>=13312&&t<=19903||t>=19968&&t<=40959||t>=12800&&t<=13055||t>=65280&&t<=65519||t>=12352&&t<=12447||t>=12272&&t<=12287||t>=12032&&t<=12255||t>=12784&&t<=12799||t>=12448&&t<=12543||t>=65040&&t<=65055||t>=42128&&t<=42191||t>=40960&&t<=42127)}function l(t){switch(t){case 10:case 32:case 38:case 40:case 41:case 43:case 45:case 47:case 173:case 183:case 8203:case 8208:case 8211:case 8231:return!0}return!1}function c(t){switch(t){case 9:case 10:case 11:case 12:case 13:case 32:return!0}return!1}var u=n(18989);class f{constructor(t,e,n,r,i,s,o){this._glyphItems=t,this._maxWidth=e,this._lineHeight=n,this._letterSpacing=r,this._hAnchor=i,this._vAnchor=s,this._justify=o}getShaping(t,e,n){const r=this._letterSpacing,i=this._lineHeight,s=this._justify,o=this._maxWidth,u=[];let f=0,d=0;for(const e of t){const t=e.codePointAt(0);if(null==t)continue;const i=n&&a(t);let s;for(const e of this._glyphItems)if(s=e[t],s)break;u.push({codePoint:t,x:f,y:d,vertical:i,glyphItem:s}),s&&(f+=s.shaping.xAdvance+r)}let x=f;o>0&&(x=f/Math.max(1,Math.ceil(f/o)));const y=t.includes(""),g=[],p=u.length;for(let t=0;t<p-1;t++){const e=u[t].codePoint,n=h(e);if(l(e)||n){let r=0;if(10===e)r-=1e4;else if(n&&y)r+=150;else{40!==e&&65288!==e||(r+=50);const n=u[t+1].codePoint;41!==n&&65289!==n||(r+=50)}g.push(this._buildBreak(t+1,u[t].x,x,g,r,!1))}}const _=this._optimalBreaks(this._buildBreak(p,f,x,g,0,!0));let m=0;const I=e?-i:i;let w=0;for(let t=0;t<_.length;t++){const e=_[t];let n=w;for(;n<e&&c(u[n].codePoint);)u[n].glyphItem=null,++n;let r=e-1;for(;r>n&&c(u[r].codePoint);)u[r].glyphItem=null,--r;if(n<=r){const t=u[n].x;for(let e=n;e<=r;e++)u[e].x-=t,u[e].y=d;let e=u[r].x;u[r].glyphItem&&(e+=u[r].glyphItem.shaping.xAdvance),m=Math.max(e,m),s&&this._applyJustification(u,n,r)}w=e,d+=I}if(u.length>0){const t=_.length-1,n=(s-this._hAnchor)*m;let r=(-this._vAnchor*(t+1)+.5)*i;e&&t&&(r+=t*i);for(const t of u)t.x+=n,t.y+=r}return u.filter(t=>t.glyphItem)}static getTextBox(t,e){if(!t.length)return null;let n=1/0,r=1/0,i=0,s=0;for(const o of t){const t=o.glyphItem.shaping.xAdvance,a=o.x,h=o.y-17,l=a+t,c=h+e;n=Math.min(n,a),i=Math.max(i,l),r=Math.min(r,h),s=Math.max(s,c)}return{x:n,y:r,width:i-n,height:s-r}}static getBox(t){if(!t.length)return null;let e=1/0,n=1/0,r=0,i=0;for(const s of t){const{height:t,left:o,top:a,width:h}=s.glyphItem.rect,l=s.x,c=s.y-(t-Math.abs(a)),u=l+h+o,f=c+t;e=Math.min(e,l),r=Math.max(r,u),n=Math.min(n,c),i=Math.max(i,f)}return{x:e,y:n,width:r-e,height:i-n}}static addDecoration(t,e){const n=t.length;if(0===n)return;const r={rect:new u.A(4,0,4,8),sdf:!0,page:0};let i=t[0].x+t[0].glyphItem.rect.left,s=t[0].y;for(let o=1;o<n;o++){const n=t[o];if(n.y!==s){const a=t[o-1].x+t[o-1].glyphItem.rect.left+t[o-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:a-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}}),s=n.y,i=n.x+n.glyphItem.rect.left}}const o=t[n-1].x+t[n-1].glyphItem.rect.left+t[n-1].glyphItem.rect.width;t.push({codePoint:0,x:i,y:s+e-3,vertical:!1,glyphItem:{mosaicItem:r,rect:{width:o-i,height:8,left:0,top:0},shaping:{xOffset:0,yOffset:0,xAdvance:0,yAdvance:0},code:0}})}_breakScore(t,e,n,r){const i=(t-e)*(t-e);return r?t<e?i/2:2*i:i+Math.abs(n)*n}_buildBreak(t,e,n,r,i,s){let o=null,a=this._breakScore(e,n,i,s);for(const t of r){const r=e-t.x,h=this._breakScore(r,n,i,s)+t.score;h<=a&&(o=t,a=h)}return{index:t,x:e,score:a,previousBreak:o}}_optimalBreaks(t){return t?this._optimalBreaks(t.previousBreak).concat(t.index):[]}_applyJustification(t,e,n){const r=t[n],i=r.vertical?24:r.glyphItem?r.glyphItem.shaping.xAdvance:0,s=(r.x+i)*this._justify;for(let r=e;r<=n;r++)t[r].x-=s}}const d=.5;class x{constructor(t,e,n=0,r=-1,i=d){this.x=t,this.y=e,this.angle=n,this.segment=r,this.minzoom=i}}class y{constructor(t,e,n,r,i,s=d,a=o.MG){this.anchor=t,this.labelAngle=e,this.glyphAngle=n,this.page=r,this.alternateVerticalGlyph=i,this.minzoom=s,this.maxzoom=a}}class g{constructor(t,e,n,r,i,s,o,a,h,l,c,u){this.tl=t,this.tr=e,this.bl=n,this.br=r,this.mosaicRect=i,this.labelAngle=s,this.minAngle=o,this.maxAngle=a,this.anchor=h,this.minzoom=l,this.maxzoom=c,this.page=u}}class p{constructor(t){this.shapes=t}}class _{getIconPlacement(t,e,n){const r=new s.bR(t.x,t.y),i=0===n.rotationAlignment,a=n.keepUpright;let h=n.rotate*o.os;i&&(h+=t.angle);const l=new p([]);return l.iconColliders=[],this._addIconPlacement(l,r,e,n,h),i&&a&&this._addIconPlacement(l,r,e,n,h+o.Jo),l}_addIconPlacement(t,e,n,r,i){const a=n.rasterizationScale,h=n.width/a,l=n.height/a,c=r.offset;let u=c[0],f=c[1];switch(r.anchor){case 0:u-=h/2,f-=l/2;break;case 1:f-=l/2;break;case 2:u-=h,f-=l/2;break;case 3:u-=h/2;break;case 4:u-=h/2,f-=l;break;case 5:break;case 7:f-=l;break;case 6:u-=h;break;case 8:u-=h,f-=l}const x=n.rect,y=2/a,p=u-y,_=f-y,m=p+x.width/a,I=_+x.height/a,w=new s.bR(p,_),b=new s.bR(m,I),P=new s.bR(p,I),M=new s.bR(m,_);if(0!==i){const t=Math.cos(i),e=Math.sin(i);w.rotate(t,e),b.rotate(t,e),P.rotate(t,e),M.rotate(t,e)}const T=new g(w,M,P,b,x,i,0,256,e,d,o.MG,0);t.shapes.push(T);{const n=r.size,s=r.padding,a={xTile:e.x,yTile:e.y,dxPixels:u*n-s,dyPixels:f*n-s,hard:!r.optional,partIndex:0,width:h*n+2*s,height:l*n+2*s,angle:i,minLod:d,maxLod:o.MG};t.iconColliders.push(a)}}getTextPlacement(t,e,n,r){const i=new s.bR(t.x,t.y),{keepUpright:a,rotate:h,rotationAlignment:l,size:c}=r,u=h*o.os,x=0===l,_=a,m=r.padding;let I=d;const w=x?t.angle:0,b=t.segment>=0&&x,P=[],M=[],T=!b;let v=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,S=v,L=A;const k=(b||x)&&_,N=c/24;let B=!1;for(const t of e)if(t.vertical){B=!0;break}let V,z=0,C=0;if(!b&&B){const t=f.getTextBox(e,24*r.lineHeight);switch(r.anchor){case 1:z=t.height/2,C=-t.width/2;break;case 2:z=-t.height/2,C=t.width/2;break;case 3:z=t.height/2,C=t.width/2;break;case 4:z=-t.height/2,C=-t.width/2;break;case 5:z=t.height;break;case 7:C=-t.width;break;case 6:C=t.width;break;case 8:z=-t.height}}z+=24*r.offset[0],C+=24*r.offset[1];for(const a of e){const e=a.glyphItem?.mosaicItem,h=a.glyphItem?.rect;if(!e||e.rect.isEmpty)continue;const l=e.rect,c=e.page;if(P&&T){if(void 0!==V&&V!==a.y){let e,n,i,s;B?(e=-L+z,n=v+C,i=L-S,s=A-v):(e=v+z,n=S+C,i=A-v,s=L-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*N-m,dyPixels:n*N-m,hard:!r.optional,partIndex:1,width:i*N+2*m,height:s*N+2*m,angle:u,minLod:d,maxLod:o.MG};P.push(a),v=Number.POSITIVE_INFINITY,A=Number.NEGATIVE_INFINITY,S=v,L=A}V=a.y}const f=[];if(b){const e=.5*h.width,r=(a.x+h.left-3+e)*N*8;if(I=this._placeGlyph(t,I,r,n,t.segment,1,a.vertical,c,f),_&&(I=this._placeGlyph(t,I,r,n,t.segment,-1,a.vertical,c,f)),I>=2)break}else f.push(new y(i,w,w,c,!1)),x&&_&&f.push(new y(i,w+o.Jo,w+o.Jo,c,!1));const p=a.x+h.left,R=a.y-17-h.top,E=p+h.width,D=R+h.height;let F,U,O,G,Z,Y,W,q;if(!b&&B)if(a.vertical){const t=(p+E)/2-h.height/2,e=(R+D)/2+h.width/2;F=new s.bR(-e-3+z,t-3+C),U=new s.bR(F.x+l.width,F.y+l.height),O=new s.bR(F.x,U.y),G=new s.bR(U.x,F.y)}else F=new s.bR(3-R+z,p-3+C),U=new s.bR(F.x-l.height,F.y+l.width),O=new s.bR(U.x,F.y),G=new s.bR(F.x,U.y);else F=new s.bR(p-3+z,R-3+C),U=new s.bR(F.x+l.width,F.y+l.height),O=new s.bR(F.x,U.y),G=new s.bR(U.x,F.y);for(const e of f){let n,i,o,c;if(e.alternateVerticalGlyph){if(!Z){const t=(R+D)/2+C;Z=new s.bR((p+E)/2+z-h.height/2-3,t+h.width/2+3),Y=new s.bR(Z.x+l.height,Z.y-l.width),W=new s.bR(Y.x,Z.y),q=new s.bR(Z.x,Y.y)}n=Z,i=W,o=q,c=Y}else n=F,i=O,o=G,c=U;const f=R,d=D,x=e.glyphAngle+u;if(0!==x){const t=Math.cos(x),e=Math.sin(x);n=n.clone(),i=i?.clone(),o=o?.clone(),c=c?.clone(),n.rotate(t,e),c?.rotate(t,e),i?.rotate(t,e),o?.rotate(t,e)}let y=0,_=256;if(b&&B?a.vertical?e.alternateVerticalGlyph?(y=32,_=96):(y=224,_=32):(y=224,_=96):(y=192,_=64),M.push(new g(n,o,i,c,l,e.labelAngle,y,_,e.anchor,e.minzoom,e.maxzoom,e.page)),P&&(!k||this._legible(e.labelAngle)))if(T)p<v&&(v=p),f<S&&(S=f),E>A&&(A=E),d>L&&(L=d);else if(e.minzoom<2){const n={xTile:t.x,yTile:t.y,dxPixels:(p+z)*N-m,dyPixels:(f+z)*N-m,hard:!r.optional,partIndex:1,width:(E-p)*N+2*m,height:(d-f)*N+2*m,angle:x,minLod:e.minzoom,maxLod:e.maxzoom};P.push(n)}}}if(I>=2)return null;if(P&&T){let e,n,i,s;B?(e=-L+z,n=v+C,i=L-S,s=A-v):(e=v+z,n=S+C,i=A-v,s=L-S);const a={xTile:t.x,yTile:t.y,dxPixels:e*N-m,dyPixels:n*N-m,hard:!r.optional,partIndex:1,width:i*N+2*m,height:s*N+2*m,angle:u,minLod:d,maxLod:o.MG};P.push(a)}const R=new p(M);return P&&P.length>0&&(R.textColliders=P),R}_legible(t){const e=(0,o.z0)(t);return e<65||e>=193}_placeGlyph(t,e,n,r,i,a,h,l,c){let u=a;const f=u<0?(0,o.Wh)(t.angle+o.Jo,o.pJ):t.angle;let d=0;n<0&&(u*=-1,n*=-1,d=o.Jo),u>0&&++i;let x=new s.bR(t.x,t.y),g=r[i],p=o.MG;if(r.length<=i)return p;for(;;){const t=g.x-x.x,s=g.y-x.y,a=Math.sqrt(t*t+s*s),_=Math.max(n/a,e),m=t/a,I=s/a,w=(0,o.Wh)(Math.atan2(I,m)+d,o.pJ);if(c.push(new y(x,f,w,l,!1,_,p)),h&&c.push(new y(x,f,w,l,!0,_,p)),_<=e)return _;x=g.clone();do{if(i+=u,r.length<=i||i<0)return _;g=r[i]}while(x.isEqual(g));let b=g.x-x.x,P=g.y-x.y;const M=Math.sqrt(b*b+P*P);b*=a/M,P*=a/M,x.x-=b,x.y-=P,p=_}}}var m=n(51624),I=n(15585);class w{constructor(t,e,n=0){this.values={},this._geometry=void 0,this._pbfGeometry=null,this.featureIndex=n;const r=e.keys,i=e.values,s=t.asUnsafe();for(;s.next();)switch(s.tag()){case 1:this.id=s.getUInt64();break;case 2:{const t=s.getMessage().asUnsafe(),e=this.values;for(;!t.empty();){const n=t.getUInt32(),s=t.getUInt32();e[r[n]]=i[s]}t.release();break}case 3:this.type=s.getUInt32();break;case 4:this._pbfGeometry=s.getMessage();break;default:s.skip()}}getGeometry(t){if(void 0!==this._geometry)return this._geometry;if(!this._pbfGeometry)return null;const e=this._pbfGeometry.asUnsafe();let n,r;this._pbfGeometry=null,t?t.reset(this.type):n=[];let i,o=1,a=0,h=0,l=0;for(;!e.empty();){if(0===a){const t=e.getUInt32();o=7&t,a=t>>3}switch(a--,o){case 1:h+=e.getSInt32(),l+=e.getSInt32(),t?t.moveTo(h,l):n&&(r&&n.push(r),r=[],r.push(new s.bR(h,l)));break;case 2:h+=e.getSInt32(),l+=e.getSInt32(),t?t.lineTo(h,l):r&&r.push(new s.bR(h,l));break;case 7:t?t.close():r&&!r[0].equals(h,l)&&r.push(r[0].clone());break;default:throw e.release(),new Error("Invalid path operation")}}return t?i=t.result():n&&(r&&n.push(r),i=n),e.release(),this._geometry=i,i}}n(44208);class b{constructor(t){this._array=[],this._stride=t}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4*this._array.length}reset(){this.array.length=0}toBuffer(){return new Uint32Array(this._array).buffer}}class P extends b{constructor(){super(12)}add(t,e,n){const r=this.array;r.push(t),r.push(e),r.push(n)}}class M{constructor(t){this.extent=4096,this.keys=[],this.values=[],this._pbfLayer=t.clone();const e=t.asUnsafe();for(;e.next();)switch(e.tag()){case 1:this.name=e.getString();break;case 3:this.keys.push(e.getString());break;case 4:this.values.push(e.processMessage(M._parseValue));break;case 5:this.extent=e.getUInt32();break;default:e.skip()}}getData(){return this._pbfLayer}static _parseValue(t){for(;t.next();)switch(t.tag()){case 1:return t.getString();case 2:return t.getFloat();case 3:return t.getDouble();case 4:return t.getInt64();case 5:return t.getUInt64();case 6:return t.getSInt64();case 7:return t.getBool();default:t.skip()}return null}}var T=n(89518);class v extends b{constructor(t){super(t)}add(t,e,n,r,i,s,o,a,h,l,c,u){const f=this.array;let d=(0,T.M9)(t,e);f.push(d);const x=31;d=(0,T.Ss)(Math.round(x*n),Math.round(x*r),Math.round(x*i),Math.round(x*s)),f.push(d),d=(0,T.Ss)(Math.round(x*o),Math.round(x*a),Math.round(x*h),Math.round(x*l)),f.push(d),d=(0,T.M9)(c,0),f.push(d),u&&f.push(...u)}}class A extends b{constructor(t){super(t)}add(t,e,n){const r=this.array;r.push((0,T.M9)(t,e)),n&&r.push(...n)}}class S extends b{constructor(t){super(t)}add(t,e,n,r,i,s,o){const a=this.array,h=this.index;let l=(0,T.M9)(t,e);return a.push(l),l=(0,T.Ss)(Math.round(15*n),Math.round(15*r),i,s),a.push(l),o&&a.push(...o),h}}class L extends b{constructor(t){super(t)}add(t,e,n,r,i,s,a,h,l,c,u,f){const d=this.array;let x=(0,T.M9)(t,e);d.push(x),x=(0,T.M9)(Math.round(8*n),Math.round(8*r)),d.push(x),x=(0,T.M9)((0,T.ws)(i/4,s/4),(0,T.ws)(h,l)),d.push(x),x=(0,T.M9)((0,T.ws)(0,(0,o.z0)(a)),(0,T.ws)(10*c,Math.min(10*u,255))),d.push(x),f&&d.push(...f)}}class k extends b{constructor(t){super(t)}add(t,e,n,r,i){const s=this.array,o=(0,T.M9)(2*t+n,2*e+r);s.push(o),i&&s.push(...i)}}class N{constructor(t,e,n){this.layerExtent=4096,this._features=[],this.layer=t,this.zoom=e,this._spriteInfo=n,this._filter=t.getFeatureFilter()}pushFeature(t){this._filter&&!this._filter.filter(t,this.zoom)||this._features.push(t)}hasFeatures(){return this._features.length>0}getResources(t,e,n){}}class B extends N{constructor(t,e,n,r,i){super(t,e,n),this.type=4,this._circleVertexBuffer=r,this._circleIndexBuffer=i}get circleIndexStart(){return this._circleIndexStart}get circleIndexCount(){return this._circleIndexCount}processFeatures(t){const e=this._circleVertexBuffer,n=this._circleIndexBuffer;this._circleIndexStart=3*n.index,this._circleIndexCount=0;const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);for(const s of this._features){const o=s.getGeometry(t);if(!o)continue;const a=r.circleMaterial.encodeAttributes(s,i,r);for(const t of o)if(t)for(const r of t){const t=e.index;e.add(r.x,r.y,0,0,a),e.add(r.x,r.y,0,1,a),e.add(r.x,r.y,1,0,a),e.add(r.x,r.y,1,1,a),n.add(t,t+1,t+2),n.add(t+1,t+2,t+3),this._circleIndexCount+=6}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this._circleVertexBuffer.array.length,t+=this._circleIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._circleIndexStart,e[r++]=this._circleIndexCount,e[r++]=this._circleVertexBuffer.array.length;for(let t=0;t<this._circleVertexBuffer.array.length;t++)n[r++]=this._circleVertexBuffer.array[t];e[r++]=this._circleIndexBuffer.array.length;for(let t=0;t<this._circleIndexBuffer.array.length;t++)e[r++]=this._circleIndexBuffer.array[t];return e.buffer}}var V=n(98291),z=n(83349);class C extends N{constructor(t,e,n,r,i,s,o){super(t,e,n),this.type=1,this._patternMap=new Map,this._fillVertexBuffer=r,this._fillIndexBuffer=i,this._outlineVertexBuffer=s,this._outlineIndexBuffer=o}get fillIndexStart(){return this._fillIndexStart}get fillIndexCount(){return this._fillIndexCount}get outlineIndexStart(){return this._outlineIndexStart}get outlineIndexCount(){return this._outlineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("fill-pattern");if(s)if(s.isDataDriven)for(const t of this._features)e(s.getValue(i,t),!0);else e(s.getValue(i),!0)}processFeatures(t){this._fillIndexStart=3*this._fillIndexBuffer.index,this._fillIndexCount=0,this._outlineIndexStart=3*this._outlineIndexBuffer.index,this._outlineIndexCount=0;const e=this.layer,n=this.zoom,{fillMaterial:r,outlineMaterial:i,hasDataDrivenFill:s,hasDataDrivenOutline:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("fill-pattern"),h=a?.isDataDriven;let l=!a&&e.getPaintValue("fill-antialias",n);if(e.outlineUsesFillColor){if(l&&!e.hasDataDrivenOpacity){const t=e.getPaintValue("fill-opacity",n),r=e.getPaintValue("fill-opacity",n+1);t<1&&r<1&&(l=!1)}if(l&&!e.hasDataDrivenColor){const t=e.getPaintValue("fill-color",n),r=e.getPaintValue("fill-color",n+1);t[3]<1&&r[3]<1&&(l=!1)}}const c=this._features,u=t?.validateTessellation;if(h){const s=[];for(const h of c){const c=a.getValue(n,h),u=this._spriteInfo[c];if(!u?.rect)continue;const f=r.encodeAttributes(h,n,e,u),d=l&&o?i.encodeAttributes(h,n,e):[],x=h.getGeometry(t);s.push({ddFillAttributes:f,ddOutlineAttributes:d,page:u.page,geometry:x}),s.sort((t,e)=>t.page-e.page)}for(const{ddFillAttributes:t,ddOutlineAttributes:n,page:r,geometry:i}of s)this._processFeature(i,l,e.outlineUsesFillColor,t,n,u,r)}else for(const a of c){const h=s?r.encodeAttributes(a,n,e):null,c=l&&o?i.encodeAttributes(a,n,e):null,f=a.getGeometry(t);this._processFeature(f,l,e.outlineUsesFillColor,h,c,u)}}serialize(){let t=10;t+=this.layerUIDs.length,t+=this._fillVertexBuffer.array.length,t+=this._fillIndexBuffer.array.length,t+=this._outlineVertexBuffer.array.length,t+=this._outlineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._fillIndexStart,e[r++]=this._fillIndexCount,e[r++]=this._outlineIndexStart,e[r++]=this._outlineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this._fillVertexBuffer.array.length;for(let t=0;t<this._fillVertexBuffer.array.length;t++)n[r++]=this._fillVertexBuffer.array[t];e[r++]=this._fillIndexBuffer.array.length;for(let t=0;t<this._fillIndexBuffer.array.length;t++)e[r++]=this._fillIndexBuffer.array[t];e[r++]=this._outlineVertexBuffer.array.length;for(let t=0;t<this._outlineVertexBuffer.array.length;t++)n[r++]=this._outlineVertexBuffer.array[t];e[r++]=this._outlineIndexBuffer.array.length;for(let t=0;t<this._outlineIndexBuffer.array.length;t++)e[r++]=this._outlineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n,r,i,s,o){if(!t)return;const a=t.length,h=!i||0===i.length;if(e&&(!n||h))for(let e=0;e<a;e++)this._processOutline(t[e],i);let l;for(let e=0;e<a;e++){const n=C._area(t[e]);n>32?(void 0!==l&&this._processFill(t,l,r,s,o),l=[e]):n<-32&&void 0!==l&&l.push(e)}void 0!==l&&this._processFill(t,l,r,s,o)}_processOutline(t,e){const n=this._outlineVertexBuffer,r=this._outlineIndexBuffer,i=r.index;let o,a,h;const l=new s.bR(0,0),c=new s.bR(0,0),u=new s.bR(0,0);let f=-1,d=-1,x=-1,y=-1,g=-1,p=!1,_=t.length;if(_<2)return;const m=t[0];let I=t[_-1];for(;_&&I.isEqual(m);)--_,I=t[_-1];if(!(_-0<2)){for(let i=0;i<_;++i){0===i?(o=t[_-1],a=t[0],h=t[1],l.assignSub(a,o),l.normalize(),l.rightPerpendicular()):(o=a,a=h,h=i!==_-1?t[i+1]:t[0],l.assign(c));const s=this._isClipEdge(o,a);-1===y&&(p=s),c.assignSub(h,a),c.normalize(),c.rightPerpendicular();const m=l.x*c.y-l.y*c.x;u.assignAdd(l,c),u.normalize();const I=-u.x*-l.x+-u.y*-l.y;let w=Math.abs(0!==I?1/I:1);w>8&&(w=8),m>=0?(x=n.add(a.x,a.y,l.x,l.y,0,1,e),-1===y&&(y=x),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,w*-u.x,w*-u.y,0,-1,e),-1===g&&(g=d),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=d,d=x,x=n.add(a.x,a.y,u.x,u.y,0,1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,c.x,c.y,0,1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x)):(x=n.add(a.x,a.y,w*u.x,w*u.y,0,1,e),-1===y&&(y=x),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),d=n.add(a.x,a.y,-l.x,-l.y,0,-1,e),-1===g&&(g=d),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=d,d=x,x=n.add(a.x,a.y,-u.x,-u.y,0,-1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x),f=n.add(a.x,a.y,-c.x,-c.y,0,-1,e),f>=0&&d>=0&&x>=0&&!s&&r.add(f,d,x))}f>=0&&d>=0&&y>=0&&!p&&r.add(f,d,y),f>=0&&y>=0&&g>=0&&!p&&r.add(f,g,y),this._outlineIndexCount+=3*(r.index-i)}}_processFill(t,e,n,r,i){let s;e.length>1&&(s=[]);let o=0;for(const n of e)0!==o&&s.push(o),o+=t[n].length;const a=2*o,h=V.A.acquire();for(const n of e){const e=t[n],r=e.length;for(let t=0;t<r;++t)h.push(e[t].x,e[t].y)}const l=(0,z.e)(h,s,2);if(z.e.deviation(h,s,2,l)>0){const r=e.map(e=>t[e].length),{buffer:s,vertexCount:o}=(0,I.QT)(h,r);if(o>0){const t=this._fillVertexBuffer.index;for(let t=0;t<o;t++)this._fillVertexBuffer.add(s[2*t],s[2*t+1],n);for(let e=0;e<o;e+=3){const n=t+e;this._fillIndexBuffer.add(n,n+1,n+2)}if(void 0!==i){const t=this._patternMap,e=t.get(i);e?e[1]+=o:t.set(i,[this._fillIndexStart+this._fillIndexCount,o])}this._fillIndexCount+=o}}else{const t=l.length;if(t>0){const e=this._fillVertexBuffer.index;let r=0;for(;r<a;)this._fillVertexBuffer.add(h[r++],h[r++],n);let s=0;for(;s<t;)this._fillIndexBuffer.add(e+l[s++],e+l[s++],e+l[s++]);if(void 0!==i){const e=this._patternMap,n=e.get(i);n?n[1]+=t:e.set(i,[this._fillIndexStart+this._fillIndexCount,t])}this._fillIndexCount+=t}}V.A.release(h)}_isClipEdge(t,e){return t.x===e.x?t.x<=-64||t.x>=4160:t.y===e.y&&(t.y<=-64||t.y>=4160)}static _area(t){let e=0;const n=t.length-1;for(let r=0;r<n;r++)e+=(t[r].x-t[r+1].x)*(t[r].y+t[r+1].y);return e+=(t[n].x-t[0].x)*(t[n].y+t[0].y),.5*e}}var R=n(83773);class E extends N{constructor(t,e,n,r,i){super(t,e,n),this.type=2,this._tessellationOptions={pixelCoordRatio:8,halfWidth:0,offset:0},this._patternMap=new Map,this.tessellationProperties={_lineVertexBuffer:null,_lineIndexBuffer:null,_ddValues:null},this.tessellationProperties._lineVertexBuffer=r,this.tessellationProperties._lineIndexBuffer=i,this._lineTessellator=new R.i(D(this.tessellationProperties),F(this.tessellationProperties),t.canUseThinTessellation)}get lineIndexStart(){return this._lineIndexStart}get lineIndexCount(){return this._lineIndexCount}getResources(t,e,n){const r=this.layer,i=this.zoom,s=r.getPaintProperty("line-pattern"),o=r.getPaintProperty("line-dasharray"),a=r.getLayoutProperty("line-cap");if(!s&&!o)return;const h=a?.getValue(i)||0,l=a?.isDataDriven,c=s?.isDataDriven,u=o?.isDataDriven;if(c||u)for(const t of this._features)e(c?s.getValue(i,t):this._getDashArrayKey(t,i,r,o,l,a,h));else if(s)e(s.getValue(i));else if(o){const t=o.getValue(i);e(r.getDashKey(t,h))}}processFeatures(t){this._lineIndexStart=3*this.tessellationProperties._lineIndexBuffer.index,this._lineIndexCount=0;const e=this.layer,n=this.zoom,r=this._features,i=this._tessellationOptions,{hasDataDrivenLine:s,lineMaterial:o}=e;t&&t.setExtent(this.layerExtent);const a=e.getPaintProperty("line-pattern"),h=e.getPaintProperty("line-dasharray"),l=a?.isDataDriven,c=h?.isDataDriven;let u;u=e.getLayoutProperty("line-cap");const f=u?.isDataDriven?u:null,d=f?null:e.getLayoutValue("line-cap",n),x=d||0,y=!!f;u=e.getLayoutProperty("line-join");const g=u?.isDataDriven?u:null,p=g?null:e.getLayoutValue("line-join",n);u=e.getLayoutProperty("line-miter-limit");const _=u?.isDataDriven?u:null,m=_?null:e.getLayoutValue("line-miter-limit",n);u=e.getLayoutProperty("line-round-limit");const I=u?.isDataDriven?u:null,w=I?null:e.getLayoutValue("line-round-limit",n);u=e.getPaintProperty("line-width");const b=u?.isDataDriven?u:null,P=b?null:e.getPaintValue("line-width",n);u=e.getPaintProperty("line-offset");const M=u?.isDataDriven?u:null,T=M?null:e.getPaintValue("line-offset",n);if(l||c){const s=[];for(const i of r){const r=l?a.getValue(n,i):this._getDashArrayKey(i,n,e,h,y,f,x),c=this._spriteInfo[r];if(!c?.rect)continue;const u=o.encodeAttributes(i,n,e,c),v=i.getGeometry(t);s.push({ddAttributes:u,page:c.page,cap:f?f.getValue(n,i):d,join:g?g.getValue(n,i):p,miterLimit:_?_.getValue(n,i):m,roundLimit:I?I.getValue(n,i):w,halfWidth:.5*(b?b.getValue(n,i):P),offset:M?M.getValue(n,i):T,geometry:v})}s.sort((t,e)=>t.page-e.page),i.textured=!0;for(const{ddAttributes:t,page:e,cap:n,join:r,miterLimit:o,roundLimit:a,halfWidth:h,offset:l,geometry:c}of s)i.capType=n,i.joinType=r,i.miterLimit=o,i.roundLimit=a,i.halfWidth=h,i.offset=l,this._processFeature(c,t,e)}else{if(a){const t=a.getValue(n),e=this._spriteInfo[t];if(!e?.rect)return}i.textured=!(!a&&!h),i.capType=d,i.joinType=p,i.miterLimit=m,i.roundLimit=w,i.halfWidth=.5*P,i.offset=T;for(const a of r){const r=s?o.encodeAttributes(a,n,e):null;f&&(i.capType=f.getValue(n,a)),g&&(i.joinType=g.getValue(n,a)),_&&(i.miterLimit=_.getValue(n,a)),I&&(i.roundLimit=I.getValue(n,a)),b&&(i.halfWidth=.5*b.getValue(n,a)),M&&(i.offset=M.getValue(n,a));const h=a.getGeometry(t);this._processFeature(h,r)}}}serialize(){let t=6;t+=this.layerUIDs.length,t+=this.tessellationProperties._lineVertexBuffer.array.length,t+=this.tessellationProperties._lineIndexBuffer.array.length,t+=3*this._patternMap.size+1;const e=new Uint32Array(t),n=new Int32Array(e.buffer);let r=0;e[r++]=this.type,e[r++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[r++]=this.layerUIDs[t];e[r++]=this._lineIndexStart,e[r++]=this._lineIndexCount;const i=this._patternMap,s=i.size;if(e[r++]=s,s>0)for(const[t,[n,s]]of i)e[r++]=t,e[r++]=n,e[r++]=s;e[r++]=this.tessellationProperties._lineVertexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineVertexBuffer.array.length;t++)n[r++]=this.tessellationProperties._lineVertexBuffer.array[t];e[r++]=this.tessellationProperties._lineIndexBuffer.array.length;for(let t=0;t<this.tessellationProperties._lineIndexBuffer.array.length;t++)e[r++]=this.tessellationProperties._lineIndexBuffer.array[t];return e.buffer}_processFeature(t,e,n){if(!t)return;const r=t.length;for(let i=0;i<r;i++)this._processGeometry(t[i],e,n)}_processGeometry(t,e,n){if(t.length<2)return;let r,i,s=t[0],o=1;for(;o<t.length;)r=t[o].x-s.x,i=t[o].y-s.y,r*r+i*i<1e-6?t.splice(o,1):(s=t[o],++o);if(t.length<2)return;const a=this.tessellationProperties._lineIndexBuffer,h=3*a.index;this._tessellationOptions.initialDistance=0,this._tessellationOptions.wrapDistance=65535,this.tessellationProperties._ddValues=e,this._lineTessellator.tessellate(t,this._tessellationOptions);const l=3*a.index-h;if(void 0!==n){const t=this._patternMap,e=t.get(n);e?e[1]+=l:t.set(n,[h+this._lineIndexCount,l])}this._lineIndexCount+=l}_getDashArrayKey(t,e,n,r,i,s,o){const a=i?s.getValue(e,t):o,h=r.getValue(e,t);return n.getDashKey(h,a)}}const D=t=>(e,n,r,i,s,o,a,h,l,c,u)=>(t._lineVertexBuffer.add(e,n,a,h,r,i,s,o,l,c,u,t._ddValues),t._lineVertexBuffer.index-1),F=t=>(e,n,r)=>{t._lineIndexBuffer.add(e,n,r)};var U=n(32488),O=n(97768),G=n(799),Z=n(36745),Y=n(78957),W=n(92722);function q(t){let e=0;for(let n=0,r=t.length-1;n<t.length;r=n++)e+=(t[r].x-t[n].x)*(t[n].y+t[r].y);return.5*e}var j=n(4264);function K(t,e){return t.iconMosaicItem&&e.iconMosaicItem?t.iconMosaicItem.page===e.iconMosaicItem.page?0:t.iconMosaicItem.page-e.iconMosaicItem.page:t.iconMosaicItem&&!e.iconMosaicItem?1:!t.iconMosaicItem&&e.iconMosaicItem?-1:0}class J extends N{constructor(t,e,n,r,i,s,o,a,h){super(e,n,h.getSpriteItems()),this.type=3,this._markerMap=new Map,this._glyphMap=new Map,this._glyphBufferDataStorage=new Map,this._isIconSDF=!1,this._sourceTileKey=t,this._iconVertexBuffer=r,this._iconIndexBuffer=i,this._textVertexBuffer=s,this._textIndexBuffer=o,this._placementEngine=a,this._workerTileHandler=h}get markerPageMap(){return this._markerMap}get glyphsPageMap(){return this._glyphMap}get symbolInstances(){return this._symbolInstances}static{this._bidiEngine=new U.A}getResources(t,e,n){const r=this.layer,i=this.zoom;t&&t.setExtent(this.layerExtent);const s=r.getLayoutProperty("icon-image"),o=r.getLayoutProperty("text-field");let a=r.getLayoutProperty("text-transform"),h=r.getLayoutProperty("text-font");const l=[];let c,u,f,d;s&&!s.isDataDriven&&(c=s.getValue(i)),o&&!o.isDataDriven&&(u=o.getValue(i)),a&&a.isDataDriven||(f=r.getLayoutValue("text-transform",i),a=null),h&&h.isDataDriven||(d=r.getLayoutValue("text-font",i),h=null);for(const x of this._features){const y=x.getGeometry(t);if(!y||0===y.length)continue;let g,p;s&&(g=s.isDataDriven?s.getValue(i,x):this._replaceKeys(c,x.values),g&&e(g));let _=!1;if(o&&(p=o.isDataDriven?o.getValue(i,x):this._replaceKeys(u,x.values),p)){switch(p=p.replaceAll("\\n","\n"),a&&(f=a.getValue(i,x)),f){case 2:p=p.toLowerCase();break;case 1:p=p.toUpperCase()}if(J._bidiEngine.hasBidiChar(p)){let t;t="rtl"===J._bidiEngine.checkContextual(p)?"IDNNN":"ICNNN",p=J._bidiEngine.bidiTransform(p,t,"VLYSN"),_=!0}if(p.length>0){h&&(d=h.getValue(i,x));for(const t of d){let e=n[t];e||(e=n[t]=new Set);for(const t of p){const n=t.codePointAt(0);null!=n&&e.add(n)}}}}if(!g&&!p)continue;const m=r.getLayoutValue("symbol-sort-key",i,x),I={feature:x,sprite:g,label:p,rtl:_,geometry:y,hash:(p?(0,G.Wm)(p):0)^(g?(0,G.Wm)(g):0),priority:m,textFont:d};l.push(I)}this._symbolFeatures=l}processFeatures(t){t&&t.setExtent(this.layerExtent);const e=this.layer,n=this.zoom,r=e.getLayoutValue("symbol-placement",n),i=0!==r,s=8*e.getLayoutValue("symbol-spacing",n),a=e.getLayoutProperty("icon-image"),h=e.getLayoutProperty("text-field"),l=a?new j.aR(e,n,i):null,c=h?new j.uU(e,n,i):null,u=this._workerTileHandler;let d;a&&(d=u.getSpriteItems()),this._iconIndexStart=3*this._iconIndexBuffer.index,this._textIndexStart=3*this._textIndexBuffer.index,this._iconIndexCount=0,this._textIndexCount=0,this._markerMap.clear(),this._glyphMap.clear();const y=[];let g=1;c?.size&&(g=c.size/24);const p=c?c.maxAngle*o.os:0,_=c?8*c.size:0;for(const t of this._symbolFeatures){let o,a;l&&d&&t.sprite&&(o=d[t.sprite],o&&o.sdf&&(this._isIconSDF=!0)),o&&l.update(n,t.feature);let h=0;const m=t.label;if(m){(0,O.Lw)(c),c.update(n,t.feature);const e=i&&0===c.rotationAlignment?c.keepUpright:c.writingMode&&c.writingMode.includes(1);let r=.5;switch(c.anchor){case 5:case 1:case 7:r=0;break;case 6:case 2:case 8:r=1}let s=.5;switch(c.anchor){case 5:case 3:case 6:s=0;break;case 7:case 4:case 8:s=1}let o=.5;switch(c.justify){case 0:o=r;break;case 1:o=0;break;case 3:o=1}const l=24*c.letterSpacing,d=i?0:24*c.maxWidth,x=24*c.lineHeight,y=t.textFont.map(t=>u.getGlyphItems(t));if(a=new f(y,d,x,l,r,s,o).getShaping(m,t.rtl,e),a&&a.length>0){let t=1e30,e=-1e30;for(const n of a)t=Math.min(t,n.x),e=Math.max(e,n.x);h=(e-t+48)*g*8}}const I=J._getPlacementCandidates(e,r,t.feature,t.geometry);for(const e of I){let{vertices:n}=e;const u=[];if(1===r){if(a?.length&&c?.size){const t=8*c.size*(2+Math.min(2,4*Math.abs(c.offset[1])));n=J._smoothVertices(n,t)}J._pushAnchors(u,n,s,h)}else 2===r?J._pushCenterAnchor(u,n):3===t.feature.type?e.anchor?u.push(e.anchor):J._pushCentroid(u,n):u.push(new x(n[0].x,n[0].y));for(const e of u){if(e.x<0||e.x>4096||e.y<0||e.y>4096)continue;if(i&&h>0&&0===c?.rotationAlignment&&!J._honorsTextMaxAngle(n,e,h,p,_))continue;const r={shaping:a,line:n,iconMosaicItem:o,anchor:e,symbolFeature:t,textColliders:[],iconColliders:[],textVertexRanges:[],iconVertexRanges:[]};y.push(r),this._processFeature(r,l,c)}}}y.sort(K),this._addPlacedGlyphs(),this._symbolInstances=y}serialize(){let t=14;t+=this.layerUIDs.length,t+=3*this.markerPageMap.size,t+=3*this.glyphsPageMap.size,t+=J._symbolsSerializationLength(this._symbolInstances),t+=this._iconVertexBuffer.array.length,t+=this._iconIndexBuffer.array.length,t+=this._textVertexBuffer.array.length,t+=this._textIndexBuffer.array.length;const e=new Uint32Array(t),n=new Int32Array(e.buffer),r=new Float32Array(e.buffer),[i,s,o]=this._sourceTileKey.split("/");let a=0;e[a++]=this.type,e[a++]=this.layerUIDs.length;for(let t=0;t<this.layerUIDs.length;t++)e[a++]=this.layerUIDs[t];e[a++]=this._isIconSDF?1:0,e[a++]=parseFloat(i),e[a++]=parseFloat(s),e[a++]=parseFloat(o),e[a++]=this.markerPageMap.size;for(const[t,[n,r]]of this.markerPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this.glyphsPageMap.size;for(const[t,[n,r]]of this.glyphsPageMap)e[a++]=t,e[a++]=n,e[a++]=r;e[a++]=this._iconVertexBuffer.index/4,e[a++]=this._textVertexBuffer.index/4,a=J.serializeSymbols(e,n,r,a,this._symbolInstances),e[a++]=this._iconVertexBuffer.array.length;for(let t=0;t<this._iconVertexBuffer.array.length;t++)n[a++]=this._iconVertexBuffer.array[t];e[a++]=this._iconIndexBuffer.array.length;for(let t=0;t<this._iconIndexBuffer.array.length;t++)e[a++]=this._iconIndexBuffer.array[t];e[a++]=this._textVertexBuffer.array.length;for(let t=0;t<this._textVertexBuffer.array.length;t++)n[a++]=this._textVertexBuffer.array[t];e[a++]=this._textIndexBuffer.array.length;for(let t=0;t<this._textIndexBuffer.array.length;t++)e[a++]=this._textIndexBuffer.array[t];return e.buffer}static _symbolsSerializationLength(t){let e=0;e+=1;for(const n of t||[]){e+=5,e+=1;for(const t of n.textColliders)e+=10;for(const t of n.iconColliders)e+=10;e+=1,e+=2*n.textVertexRanges.length,e+=1,e+=2*n.iconVertexRanges.length}return e}static serializeSymbols(t,e,n,r,i){i=i||[],e[r++]=i.length;for(const t of i){e[r++]=t.anchor.x,e[r++]=t.anchor.y,e[r++]=t.symbolFeature.hash,e[r++]=t.symbolFeature.priority,e[r++]=t.symbolFeature.feature.featureIndex,e[r++]=t.textColliders.length+t.iconColliders.length;for(const i of t.textColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;for(const i of t.iconColliders)e[r++]=i.xTile,e[r++]=i.yTile,e[r++]=i.dxPixels,e[r++]=i.dyPixels,e[r++]=i.hard?1:0,e[r++]=i.partIndex,n[r++]=i.minLod,n[r++]=i.maxLod,e[r++]=i.width,e[r++]=i.height;e[r++]=t.textVertexRanges.length;for(const[n,i]of t.textVertexRanges)e[r++]=n,e[r++]=i;e[r++]=t.iconVertexRanges.length;for(const[n,i]of t.iconVertexRanges)e[r++]=n,e[r++]=i}return r}_replaceKeys(t,e){return t.replaceAll(/{([^{}]+)}/g,(t,n)=>n in e?e[n]:"")}_processFeature(t,e,n){const{line:r,iconMosaicItem:i,shaping:s,anchor:a}=t,h=this.zoom,l=this.layer,c=!!i;let u=!0;c&&(u=e?.optional||!i);const f=s&&s.length>0,d=!f||n?.optional;let x,y;if(c&&(x=this._placementEngine.getIconPlacement(a,i,e)),(x||u)&&(f&&(y=this._placementEngine.getTextPlacement(a,s,r,n)),y||d)){if(x&&y||(d||u?d||y?u||x||(y=null):x=null:(x=null,y=null)),y){const e=l.hasDataDrivenText?l.textMaterial.encodeAttributes(t.symbolFeature.feature,h,l):null;if(this._storePlacedGlyphs(t,y.shapes,h,n.rotationAlignment,e),y.textColliders){t.textColliders=y.textColliders;for(const t of y.textColliders){t.minLod=Math.max(h+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(h+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,h=t.dxPixels*n-(t.dyPixels+t.height)*r,l=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,f=Math.min(i,o,h,c),d=Math.max(i,o,h,c),x=Math.min(s,a,l,u),y=Math.max(s,a,l,u);t.dxPixels=f,t.dyPixels=x,t.width=d-f,t.height=y-x}}}}if(x){const n=l.hasDataDrivenIcon?l.iconMaterial.encodeAttributes(t.symbolFeature.feature,h,l):null;if(this._addPlacedIcons(t,x.shapes,h,i.page,1===e.rotationAlignment,n),x.iconColliders){t.iconColliders=x.iconColliders;for(const t of x.iconColliders){t.minLod=Math.max(h+(0,o.p6)(t.minLod),0),t.maxLod=Math.min(h+(0,o.p6)(t.maxLod),25);const e=t.angle;if(e){const n=Math.cos(e),r=Math.sin(e),i=t.dxPixels*n-t.dyPixels*r,s=t.dxPixels*r+t.dyPixels*n,o=(t.dxPixels+t.width)*n-t.dyPixels*r,a=(t.dxPixels+t.width)*r+t.dyPixels*n,h=t.dxPixels*n-(t.dyPixels+t.height)*r,l=t.dxPixels*r+(t.dyPixels+t.height)*n,c=(t.dxPixels+t.width)*n-(t.dyPixels+t.height)*r,u=(t.dxPixels+t.width)*r+(t.dyPixels+t.height)*n,f=Math.min(i,o,h,c),d=Math.max(i,o,h,c),x=Math.min(s,a,l,u),y=Math.max(s,a,l,u);t.dxPixels=f,t.dyPixels=x,t.width=d-f,t.height=y-x}}}}}}_addPlacedIcons(t,e,n,r,i,s){const a=Math.max(n-1,0),h=this._iconVertexBuffer,l=this._iconIndexBuffer,c=this._markerMap;for(const u of e){const e=i?0:Math.max(n+(0,o.p6)(u.minzoom),a),f=i?25:Math.min(n+(0,o.p6)(u.maxzoom),25);if(f<=e)continue;const d=u.tl,x=u.tr,y=u.bl,g=u.br,p=u.mosaicRect,_=u.labelAngle,m=u.minAngle,I=u.maxAngle,w=u.anchor,b=h.index,P=p.x,M=p.y,T=P+p.width,v=M+p.height,A=h.index;h.add(w.x,w.y,d.x,d.y,P,M,_,m,I,e,f,s),h.add(w.x,w.y,x.x,x.y,T,M,_,m,I,e,f,s),h.add(w.x,w.y,y.x,y.y,P,v,_,m,I,e,f,s),h.add(w.x,w.y,g.x,g.y,T,v,_,m,I,e,f,s),t.iconVertexRanges.length>0&&t.iconVertexRanges[0][0]+t.iconVertexRanges[0][1]===A?t.iconVertexRanges[0][1]+=4:t.iconVertexRanges.push([A,4]),l.add(b,b+1,b+2),l.add(b+1,b+2,b+3),c.has(r)?c.get(r)[1]+=6:c.set(r,[this._iconIndexStart+this._iconIndexCount,6]),this._iconIndexCount+=6}}_addPlacedGlyphs(){const t=this._textVertexBuffer,e=this._textIndexBuffer,n=this._glyphMap;for(const[r,i]of this._glyphBufferDataStorage)for(const s of i){const i=t.index,o=s.symbolInstance,a=s.ddAttributes,h=t.index;t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tl[0],s.tl[1],s.xmin,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.tr[0],s.tr[1],s.xmax,s.ymin,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.bl[0],s.bl[1],s.xmin,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),t.add(s.glyphAnchor[0],s.glyphAnchor[1],s.br[0],s.br[1],s.xmax,s.ymax,s.labelAngle,s.minAngle,s.maxAngle,s.minLod,s.maxLod,a),o.textVertexRanges.length>0&&o.textVertexRanges[0][0]+o.textVertexRanges[0][1]===h?o.textVertexRanges[0][1]+=4:o.textVertexRanges.push([h,4]),e.add(i,i+1,i+2),e.add(i+1,i+2,i+3),n.has(r)?n.get(r)[1]+=6:n.set(r,[this._textIndexStart+this._textIndexCount,6]),this._textIndexCount+=6}this._glyphBufferDataStorage.clear()}_storePlacedGlyphs(t,e,n,r,i){const s=Math.max(n-1,0),a=1===r;let h,l,c,u,f,d,x,y,g,p,_;for(const r of e)h=a?0:Math.max(n+(0,o.p6)(r.minzoom),s),l=a?25:Math.min(n+(0,o.p6)(r.maxzoom),25),l<=h||(c=r.tl,u=r.tr,f=r.bl,d=r.br,x=r.labelAngle,y=r.minAngle,g=r.maxAngle,p=r.anchor,_=r.mosaicRect,this._glyphBufferDataStorage.has(r.page)||this._glyphBufferDataStorage.set(r.page,[]),this._glyphBufferDataStorage.get(r.page).push({glyphAnchor:[p.x,p.y],tl:[c.x,c.y],tr:[u.x,u.y],bl:[f.x,f.y],br:[d.x,d.y],xmin:_.x,ymin:_.y,xmax:_.x+_.width,ymax:_.y+_.height,labelAngle:x,minAngle:y,maxAngle:g,minLod:h,maxLod:l,placementLod:s,symbolInstance:t,ddAttributes:i}))}static _pushAnchors(t,e,n,r){n+=r;let i=0;const a=e.length-1;for(let t=0;t<a;t++)i+=s.bR.distance(e[t],e[t+1]);let h=r||n;if(h*=.5,i<=h)return;const l=h/i;let c=0,u=-(n=i/Math.max(Math.round(i/n),1))/2;const f=e.length-1;for(let r=0;r<f;r++){const i=e[r],s=e[r+1],a=s.x-i.x,h=s.y-i.y,f=Math.sqrt(a*a+h*h);let d;for(;u+n<c+f;){u+=n;const e=(u-c)/f,y=(0,o.GW)(i.x,s.x,e),g=(0,o.GW)(i.y,s.y,e);void 0===d&&(d=Math.atan2(h,a)),t.push(new x(y,g,d,r,l))}c+=f}}static _pushCenterAnchor(t,e){let n=0;const r=e.length-1;for(let t=0;t<r;t++)n+=s.bR.distance(e[t],e[t+1]);const i=n/2;let a=0;const h=e.length-1;for(let n=0;n<h;n++){const r=e[n],s=e[n+1],h=s.x-r.x,l=s.y-r.y,c=Math.sqrt(h*h+l*l);if(i<a+c){const e=(i-a)/c,u=(0,o.GW)(r.x,s.x,e),f=(0,o.GW)(r.y,s.y,e),d=Math.atan2(l,h);return void t.push(new x(u,f,d,n,0))}a+=c}}static _deviation(t,e,n){const r=(e.x-t.x)*(n.x-e.x)+(e.y-t.y)*(n.y-e.y),i=(e.x-t.x)*(n.y-e.y)-(e.y-t.y)*(n.x-e.x);return Math.atan2(i,r)}static _honorsTextMaxAngle(t,e,n,r,i){let o=0;const a=n/2;let h=new s.bR(e.x,e.y),l=e.segment+1;for(;o>-a;){if(--l,l<0)return!1;o-=s.bR.distance(t[l],h),h=t[l]}o+=s.bR.distance(t[l],t[l+1]);const c=[];let u=0;const f=t.length;for(;o<a;){const e=t[l];let n,a=l;do{if(++a,a===f)return!1;n=t[a]}while(n.isEqual(e));let h,d=a;do{if(++d,d===f)return!1;h=t[d]}while(h.isEqual(n));const x=this._deviation(e,n,h);for(c.push({deviation:x,distToAnchor:o}),u+=x;o-c[0].distToAnchor>i;)u-=c.shift().deviation;if(Math.abs(u)>r)return!1;o+=s.bR.distance(n,h),l=a}return!0}static _smoothVertices(t,e){if(e<=0)return t;let n=t.length;if(n<3)return t;const r=[];let i=0,o=0;r.push(0);for(let e=1;e<n;e++){const n=s.bR.distance(t[e],t[e-1]);n>0&&(i+=n,r.push(i),o++,o!==e&&(t[o]=t[e]))}if(n=o+1,n<3)return t;e=Math.min(e,.2*i);const a=t[0].x,h=t[0].y,l=t[n-1].x,c=t[n-1].y,u=s.bR.sub(t[0],t[1]);u.normalize(),t[0].x+=e*u.x,t[0].y+=e*u.y,u.assignSub(t[n-1],t[n-2]),u.normalize(),t[n-1].x+=e*u.x,t[n-1].y+=e*u.y,r[0]-=e,r[n-1]+=e;const f=[];f.push(new s.bR(a,h));const d=1e-6,x=.5*e;for(let i=1;i<n-1;i++){let o=0,a=0,h=0;for(let n=i-1;n>=0;n--){const s=x+r[n+1]-r[i];if(s<0)break;const l=r[n+1]-r[n],c=r[i]-r[n]<x?1:s/l;if(c<d)break;const u=c*c,f=c*s-.5*u*l,y=c*l/e,g=t[n+1],p=t[n].x-g.x,_=t[n].y-g.y;o+=y/f*(g.x*c*s+.5*u*(s*p-l*g.x)-u*c*l*p/3),a+=y/f*(g.y*c*s+.5*u*(s*_-l*g.y)-u*c*l*_/3),h+=y}for(let s=i+1;s<n;s++){const n=x-r[s-1]+r[i];if(n<0)break;const l=r[s]-r[s-1],c=r[s]-r[i]<x?1:n/l;if(c<d)break;const u=c*c,f=c*n-.5*u*l,y=c*l/e,g=t[s-1],p=t[s].x-g.x,_=t[s].y-g.y;o+=y/f*(g.x*c*n+.5*u*(n*p-l*g.x)-u*c*l*p/3),a+=y/f*(g.y*c*n+.5*u*(n*_-l*g.y)-u*c*l*_/3),h+=y}f.push(new s.bR(o/h,a/h))}return f.push(new s.bR(l,c)),t[0].x=a,t[0].y=h,t[n-1].x=l,t[n-1].y=c,f}static _getPlacementCandidates(t,e,n,r){if(0!==e||3!==n.type||"geojson"!==t.sourceType)return r.map(t=>({anchor:null,vertices:t}));const i=function(t){let e=null,n=0,r=[],i=0;for(const s of t){const t=q(s);t>0?(i>n&&(n=i,e=r),r=[s],i=t):t<0&&r.length>0&&(r.push(s),i+=t)}if(i>n&&(e=r),!e)return null;const s=e.map(t=>t.length),o=[];for(const t of e)for(const e of t)o.push(e.x,e.y);const a=Z.z.fromOptimized(new W.A(s,o),"esriGeometryPolygon"),h=(0,Y.R)(a);return h?{x:h[0],y:h[1],vertices:e[0]}:null}(r);return i?[{anchor:new x(i.x,i.y),vertices:i.vertices}]:[]}static _pushCentroid(t,e){const n=4096,r=4096,i=e.length-1;let s=0,o=0,a=0,h=e[0].x,l=e[0].y;h>n&&(h=n),h<0&&(h=0),l>r&&(l=r),l<0&&(l=0);for(let t=1;t<i;t++){let i=e[t].x,c=e[t].y,u=e[t+1].x,f=e[t+1].y;i>n&&(i=n),i<0&&(i=0),c>r&&(c=r),c<0&&(c=0),u>n&&(u=n),u<0&&(u=0),f>r&&(f=r),f<0&&(f=0);const d=(i-h)*(f-l)-(u-h)*(c-l);s+=d*(h+i+u),o+=d*(l+c+f),a+=d}s/=3*a,o/=3*a,isNaN(s)||isNaN(o)||t.push(new x(s,o))}}class H{constructor(t,e,n,r,i,a,h){if(this._pbfTiles={},this._tileClippers={},this._client=n,this._tile=e,this._sourceDataMaxLOD=r,this._baseUrl=h,a){this._styleLayerUIDs=new Set;for(const t of a)this._styleLayerUIDs.add(t)}this._styleRepository=i,this._layers=this._styleRepository?.layers??[];const[l,c,u]=e.tileKey.split("/").map(parseFloat);this._level=l;const f=(0,o.IU)(this._level);for(const e of Object.keys(t)){const n=t[e];if(this._pbfTiles[e]=new m.A(new Uint8Array(n.protobuff),new DataView(n.protobuff)),n.refKey){const[t]=n.refKey.split("/").map(parseFloat),r=l-t;if(r>0){const t=(1<<r)-1,n=c&t,i=u&t;this._tileClippers[e]=new s.O3(r,n,i,8,f)}}this._tileClippers[e]||(this._tileClippers[e]=new s.Ox)}}_canParseStyleLayer(t){return!this._styleLayerUIDs||this._styleLayerUIDs.has(t)}async parse(t){const e=(0,I.If)(),n=this._initialize(t),{returnedBuckets:r}=n;this._processLayers(n),this._linkReferences(n),this._filterFeatures(n);const i=[],s=new Set,o=(t,e)=>{s.has(t)||(i.push({name:t,repeat:e}),s.add(t))},a={};for(const t of r)t.getResources(t.tileClipper,o,a);if(4===this._tile.status)return[];const h=this._fetchResources(i,a,t);return Promise.all([...h,e]).then(()=>this._processFeatures(n.returnedBuckets))}_initialize(t){const e=t?.signal;return{signal:e,sourceNameToTileData:this._parseTileData(this._pbfTiles),layers:this._layers,zoom:this._level,sourceNameToTileClipper:this._tileClippers,sourceNameToUniqueSourceLayerBuckets:{},sourceNameToUniqueSourceLayers:{},returnedBuckets:[],layerIdToBucket:{},referencerUIDToReferencedId:new Map}}_processLayers(t){const{sourceNameToTileData:e,zoom:n,layers:r,sourceNameToTileClipper:i,sourceNameToUniqueSourceLayerBuckets:s,sourceNameToUniqueSourceLayers:o,returnedBuckets:a,layerIdToBucket:h,referencerUIDToReferencedId:l}=t,c=this._sourceDataMaxLOD;for(let t=r.length-1;t>=0;t--){const u=r[t];if(n<c){if(u.minzoom&&n<Math.floor(u.minzoom)||u.maxzoom&&n>=u.maxzoom)continue}else if(u.maxzoom&&n>=u.maxzoom)continue;if(0===u.type||!this._canParseStyleLayer(u.uid)||!e[u.source]||!i[u.source])continue;const f=e[u.source],d=i[u.source],x=u.sourceLayer,y=f[x];if(y){let t=o[u.source];if(t||(t=o[u.source]=new Set),t.add(u.sourceLayer),u.refLayerId)l.set(u.uid,u.refLayerId);else{const t=this._createBucket(u);if(t){t.layerUIDs=[u.uid],t.layerExtent=y.extent,t.tileClipper=d;let e=s[u.source];e||(e=s[u.source]={});let n=e[x];n||(n=e[x]=[]),n.push(t),a.push(t),h[u.id]=t}}}}}_linkReferences(t){const{layerIdToBucket:e,referencerUIDToReferencedId:n}=t;n.forEach((t,n)=>{e[t]&&e[t].layerUIDs.push(n)})}_filterFeatures(t){const{signal:e,sourceNameToTileData:n,sourceNameToUniqueSourceLayerBuckets:i,sourceNameToUniqueSourceLayers:s}=t,o=10*this._level,a=10*(this._level+1),h=[],l=[];for(const t of Object.keys(s))s[t].forEach(e=>{h.push(e),l.push(t)});for(let t=0;t<h.length;t++){const s=l[t],c=h[t];if(!n[s]||!i[s])continue;const u=n[s][c],f=i[s][c];if(!f||0===f.length)continue;if((0,r.G4)(e))return;let d=0;const x=u.getData();for(;x.nextTag(2);){const t=x.getMessage(),e=new w(t,u,d++);t.release();const n=e.values;if(n){const t=n._minzoom;if(t&&t>=a)continue;const e=n._maxzoom;if(e&&e<=o)continue}for(const t of f)t.pushFeature(e)}}}_fetchResources(t,e,n){const r=[],i=this._tile.getWorkerTileHandler();let s,o;t.length>0&&(s=i.fetchSprites(t,this._client,n),r.push(s));for(const t in e){const s=e[t];s.size>0&&(o=i.fetchGlyphs(this._baseUrl,t,s,n),r.push(o))}return r}_processFeatures(t){const e=t.filter(t=>t.hasFeatures()||this._canParseStyleLayer(t.layer.uid));for(const t of e)t.processFeatures(t.tileClipper);return e}_parseTileData(t){const e={};for(const n of Object.keys(t)){const r=t[n],i={};for(;r.next();)switch(r.tag()){case 3:{const t=r.getMessage(),e=new M(t);t.release(),i[e.name]=e;break}default:r.skip()}e[n]=i}return e}_createBucket(t){switch(t.type){case 0:return null;case 1:return this._createFillBucket(t);case 2:return this._createLineBucket(t);case 4:return this._createCircleBucket(t);case 3:return this._createSymbolBucket(t)}}_createFillBucket(t){return new C(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new A(t.fillMaterial.getStride()),new P,new S(t.outlineMaterial.getStride()),new P)}_createLineBucket(t){return new E(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new v(t.lineMaterial.getStride()),new P)}_createCircleBucket(t){return new B(t,this._level,this._tile.getWorkerTileHandler().getSpriteItems(),new k(t.circleMaterial.getStride()),new P)}_createSymbolBucket(t){const e=this._tile;return new J(e.tileKey,t,this._level,new L(t.iconMaterial.getStride()),new P,new L(t.textMaterial.getStride()),new P,e.placementEngine,e.getWorkerTileHandler())}}class ${constructor(t,e,n,r){this.status=0,this.placementEngine=new _,this.tileKey=t,this.refKeys=e,this._workerTileHandler=n,this._styleRepository=r}release(){this.tileKey="",this.refKeys=null,this.status=0,this._workerTileHandler=null}async parse(t,e){const n=e?.signal;if(null!=n){const t=()=>{n.removeEventListener("abort",t),this.status=4};n.addEventListener("abort",t)}let i;const s={bucketsWithData:[],emptyBuckets:null};try{i=await this._parse(t,e)}catch(t){if((0,r.zf)(t))throw t;return{result:s,transferList:[]}}this.status=2;const o=s.bucketsWithData,a=[];for(const t of i)if(t.hasFeatures()){const e=t.serialize();o.push(e)}else a.push(t.layer.uid);const h=[...o];let l=null;return a.length>0&&(l=Uint32Array.from(a),h.push(l.buffer)),s.emptyBuckets=l,{result:s,transferList:h}}setObsolete(){this.status=4}getLayers(){return this._workerTileHandler.getLayers()}getWorkerTileHandler(){return this._workerTileHandler}async _parse(t,e){const n=t.sourceName2DataAndRefKey;return 0===Object.keys(n).length?[]:(this.status=3,new H(n,this,e.client,t.sourceDataMaxLOD,this._styleRepository,t.styleLayerUIDs,t.baseUrl).parse(e))}}var Q=n(45013);class X{constructor(){this._spriteInfo={},this._glyphInfo={},this._sourceDataMaxLOD=25}reset(){return this._spriteInfo={},this._glyphInfo={},Promise.resolve()}getLayers(){return this._styleRepository?.layers??[]}async createTileAndParse(t,e){const{key:n}=t,i={};for(const e of Object.keys(t.sourceName2DataAndRefKey)){const n=t.sourceName2DataAndRefKey[e];i[e]=n.refKey}const s=new $(n,i,this,this._styleRepository);this.initializeGlyphWorker(void 0,e);try{return await s.parse({...t,sourceDataMaxLOD:this._sourceDataMaxLOD},e)}catch(t){if(s.setObsolete(),s.release(),!(0,r.zf)(t))throw t;return null}}initializeGlyphWorker(t,e){return this._loaded??=(async()=>{const t=await e.client.invoke("openGlyphPorts"),n=await(0,i.N1)(t,{maxNumberOfConcurrentJobs:20});this._glyphWorker=n.createInvokeProxy()})()}updateStyle(t){if(!t||0===t.length||!this._styleRepository)return;const e=this._styleRepository;for(const n of t){const t=n.type,r=n.data;switch(t){case 0:e.setPaintProperties(r.layer,r.paint);break;case 1:e.setLayoutProperties(r.layer,r.layout);break;case 3:e.deleteStyleLayer(r.layer);break;case 2:e.setStyleLayer(r.layer,r.index);break;case 4:this._spriteInfo={}}}}setStyle(t){const{style:e,sourceDataMaxLOD:n}=t;this._styleRepository=new Q.A(e),this._sourceDataMaxLOD=n,this._spriteInfo={},this._glyphInfo={}}fetchSprites(t,e,n){const r=[],i=this._spriteInfo;for(const e of t)void 0===i[e.name]&&r.push(e);return 0===r.length?Promise.resolve():e.invoke("getSprites",r,{signal:n?.signal}).then(t=>{for(const e in t){const n=t[e];i[e]=n}})}getSpriteItems(){return this._spriteInfo}async fetchGlyphs(t,e,n,r){const i=[];let s=this._glyphInfo[e];if(s?n.forEach(t=>{s[t]||i.push(t)}):(s=this._glyphInfo[e]=[],n.forEach(t=>i.push(t))),0===i.length)return;if(await this._loaded,!this._glyphWorker)return void console.error("Failed to fetch glyphs: no worker connection");const o=String.fromCodePoint(...i),a=await this._glyphWorker.getGlyphItems(o,!1,t,e,!0,r);if(a)for(const t of a.glyphs)s[t.code]=t}getGlyphItems(t){return this._glyphInfo[t]}}},18989(t,e,n){n.d(e,{A:()=>r});class r{constructor(t=0,e=0,n=0,r=0){this.x=t,this.y=e,this.width=n,this.height=r}get isEmpty(){return this.width<=0||this.height<=0}union(t){this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.width=Math.max(this.width,t.width),this.height=Math.max(this.height,t.height)}}},83773(t,e,n){function r(t,e){return t.x===e.x&&t.y===e.y}function i(t){if(!t)return;const e=t.length;if(e<=1)return;let n=0;for(let i=1;i<e;i++)r(t[i],t[n])||++n===i||(t[n]=t[i]);t.length=n+1}function s(t,e){return t.x=e.y,t.y=-e.x,t}function o(t,e){return t.x=-e.y,t.y=e.x,t}function a(t,e){return t.x=e.x,t.y=e.y,t}function h(t,e){return t.x=-e.x,t.y=-e.y,t}function l(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function c(t,e){return t.x*e.y-t.y*e.x}function u(t,e){return t.x*e.x+t.y*e.y}function f(t,e,n,r){return t.x=e.x*n+e.y*r,t.y=e.x*r-e.y*n,t}n.d(e,{i:()=>d});class d{constructor(t,e,n){this._writeVertex=t,this._writeTriangle=e,this._canUseThinTessellation=n,this._prevNormal={x:void 0,y:void 0},this._nextNormal={x:void 0,y:void 0},this._textureNormalLeft={x:0,y:1},this._textureNormalRight={x:0,y:-1},this._textureNormal={x:void 0,y:void 0},this._joinNormal={x:void 0,y:void 0},this._inner={x:void 0,y:void 0},this._outer={x:void 0,y:void 0},this._roundStart={x:void 0,y:void 0},this._roundEnd={x:void 0,y:void 0},this._startBreak={x:void 0,y:void 0},this._endBreak={x:void 0,y:void 0},this._innerPrev={x:void 0,y:void 0},this._innerNext={x:void 0,y:void 0},this._bevelStart={x:void 0,y:void 0},this._bevelEnd={x:void 0,y:void 0},this._bevelMiddle={x:void 0,y:void 0}}tessellate(t,e,n=this._canUseThinTessellation){i(t),n&&e.halfWidth<1.05&&!e.offset?this._tessellateThin(t,e):this._tessellate(t,e)}_tessellateThin(t,e){if(t.length<2)return;const n=e.wrapDistance||65535;let r=e.initialDistance||0,i=!1,s=t[0].x,o=t[0].y;const a=t.length;for(let e=1;e<a;++e){i&&(i=!1,r=0);let a=t[e].x,h=t[e].y,l=a-s,c=h-o,u=Math.sqrt(l*l+c*c);if(l/=u,c/=u,r+u>n){i=!0;const t=(n-r)/u;u=n-r,a=(1-t)*s+t*a,h=(1-t)*o+t*h,--e}const f=this._writeVertex(s,o,0,0,l,c,c,-l,0,-1,r),d=this._writeVertex(s,o,0,0,l,c,-c,l,0,1,r);r+=u;const x=this._writeVertex(a,h,0,0,l,c,c,-l,0,-1,r),y=this._writeVertex(a,h,0,0,l,c,-c,l,0,1,r);this._writeTriangle(f,d,x),this._writeTriangle(d,x,y),s=a,o=h}}_tessellate(t,e){const n=t[0],i=t[t.length-1],d=r(n,i),x=d?3:2;if(t.length<x)return;const y=e.pixelCoordRatio,g=null!=e.capType?e.capType:0,p=null!=e.joinType?e.joinType:2,_=null!=e.miterLimit?Math.min(e.miterLimit,4):2,m=null!=e.roundLimit?Math.min(e.roundLimit,1.05):1.05,I=null!=e.halfWidth?e.halfWidth:2,w=!!e.textured;let b,P,M,T=null;const v=this._prevNormal,A=this._nextNormal;let S=-1,L=-1;const k=this._joinNormal;let N,B;const V=this._textureNormalLeft,z=this._textureNormalRight,C=this._textureNormal;let R=-1,E=-1;const D=e.wrapDistance||65535;let F=e.initialDistance||0;const U=this._writeVertex,O=this._writeTriangle,G=(t,e,n,r,i,s)=>{const o=U(P,M,N,B,n,r,t,e,i,s,F);return R>=0&&E>=0&&o>=0&&O(R,E,o),R=E,E=o,o};d&&(b=t[t.length-2],A.x=i.x-b.x,A.y=i.y-b.y,L=l(A),A.x/=L,A.y/=L);let Z=!1;for(let e=0;e<t.length;++e){if(Z&&(Z=!1,F=0),b&&(v.x=-A.x,v.y=-A.y,S=L,F+S>D&&(Z=!0)),Z){const n=(D-F)/S;S=D-F,b={x:(1-n)*b.x+n*t[e].x,y:(1-n)*b.y+n*t[e].y},--e}else b=t[e];P=b.x,M=b.y;const n=e<=0&&!Z,r=e===t.length-1;if(n||(F+=S),T=r?d?t[1]:null:t[e+1],T?(A.x=T.x-P,A.y=T.y-M,L=l(A),A.x/=L,A.y/=L):(A.x=void 0,A.y=void 0),!d){if(n){o(k,A),N=k.x,B=k.y,2===g&&(G(-A.y-A.x,A.x-A.y,A.x,A.y,0,-1),G(A.y-A.x,-A.x-A.y,A.x,A.y,0,1)),1===g&&(G(-A.y-A.x,A.x-A.y,A.x,A.y,-1,-1),G(A.y-A.x,-A.x-A.y,A.x,A.y,-1,1)),1!==g&&0!==g||(G(-A.y,A.x,A.x,A.y,0,-1),G(A.y,-A.x,A.x,A.y,0,1));continue}if(r){s(k,v),N=k.x,B=k.y,1!==g&&0!==g||(G(v.y,-v.x,-v.x,-v.y,0,-1),G(-v.y,v.x,-v.x,-v.y,0,1)),2===g&&(G(v.y-v.x,-v.x-v.y,-v.x,-v.y,0,-1),G(-v.y-v.x,v.x-v.y,-v.x,-v.y,0,1)),1===g&&(G(v.y-v.x,-v.x-v.y,-v.x,-v.y,1,-1),G(-v.y-v.x,v.x-v.y,-v.x,-v.y,1,1));continue}}let i,x,U=-c(v,A);if(Math.abs(U)<.01)u(v,A)>0?(k.x=v.x,k.y=v.y,U=1,i=Number.MAX_VALUE,x=!0):(o(k,A),U=1,i=1,x=!1);else{k.x=(v.x+A.x)/U,k.y=(v.y+A.y)/U,i=l(k);const t=(i-1)*I*y;x=i>4||t>S&&t>L}N=k.x,B=k.y;let O=p;switch(p){case 0:i<1.05&&(O=2);break;case 1:i<m&&(O=2);break;case 2:i>_&&(O=0)}switch(O){case 2:if(G(k.x,k.y,-v.x,-v.y,0,-1),G(-k.x,-k.y,-v.x,-v.y,0,1),r)break;if(w){const t=Z?0:F;R=this._writeVertex(P,M,N,B,A.x,A.y,k.x,k.y,0,-1,t),E=this._writeVertex(P,M,N,B,A.x,A.y,-k.x,-k.y,0,1,t)}break;case 0:{const t=U<0;let e,n,i,l;if(t){const t=R;R=E,E=t,e=V,n=z}else e=z,n=V;if(x)i=t?o(this._innerPrev,v):s(this._innerPrev,v),l=t?s(this._innerNext,A):o(this._innerNext,A);else{const e=t?h(this._inner,k):a(this._inner,k);i=e,l=e}const c=t?s(this._bevelStart,v):o(this._bevelStart,v);G(i.x,i.y,-v.x,-v.y,e.x,e.y);const u=G(c.x,c.y,-v.x,-v.y,n.x,n.y);if(r)break;const d=t?o(this._bevelEnd,A):s(this._bevelEnd,A);if(x){const t=this._writeVertex(P,M,N,B,-v.x,-v.y,0,0,0,0,F);R=this._writeVertex(P,M,N,B,A.x,A.y,l.x,l.y,e.x,e.y,F),E=this._writeVertex(P,M,N,B,A.x,A.y,d.x,d.y,n.x,n.y,F),this._writeTriangle(u,t,E)}else{if(w){const t=this._bevelMiddle;t.x=(c.x+d.x)/2,t.y=(c.y+d.y)/2,f(C,t,-v.x,-v.y),G(t.x,t.y,-v.x,-v.y,C.x,C.y),f(C,t,A.x,A.y),R=this._writeVertex(P,M,N,B,A.x,A.y,t.x,t.y,C.x,C.y,F),E=this._writeVertex(P,M,N,B,A.x,A.y,l.x,l.y,e.x,e.y,F)}else{const t=R;R=E,E=t}G(d.x,d.y,A.x,A.y,n.x,n.y)}if(t){const t=R;R=E,E=t}break}case 1:{const t=U<0;let e,n;if(t){const t=R;R=E,E=t,e=V,n=z}else e=z,n=V;const l=t?h(this._inner,k):a(this._inner,k);let c,d;x?(c=t?o(this._innerPrev,v):s(this._innerPrev,v),d=t?s(this._innerNext,A):o(this._innerNext,A)):(c=l,d=l);const y=t?s(this._roundStart,v):o(this._roundStart,v),g=t?o(this._roundEnd,A):s(this._roundEnd,A),p=G(c.x,c.y,-v.x,-v.y,e.x,e.y),_=G(y.x,y.y,-v.x,-v.y,n.x,n.y);if(r)break;const m=this._writeVertex(P,M,N,B,-v.x,-v.y,0,0,0,0,F);x||this._writeTriangle(R,E,m);const I=h(this._outer,l),b=this._writeVertex(P,M,N,B,A.x,A.y,g.x,g.y,n.x,n.y,F);let T,S;const L=i>2;if(L){let e;i!==Number.MAX_VALUE?(I.x/=i,I.y/=i,e=u(v,I),e=(i*(e*e-1)+1)/e):e=-1,T=t?s(this._startBreak,v):o(this._startBreak,v),T.x+=v.x*e,T.y+=v.y*e,S=t?o(this._endBreak,A):s(this._endBreak,A),S.x+=A.x*e,S.y+=A.y*e}f(C,I,-v.x,-v.y);const D=this._writeVertex(P,M,N,B,-v.x,-v.y,I.x,I.y,C.x,C.y,F);f(C,I,A.x,A.y);const O=w?this._writeVertex(P,M,N,B,A.x,A.y,I.x,I.y,C.x,C.y,F):D,Z=m,Y=w?this._writeVertex(P,M,N,B,A.x,A.y,0,0,0,0,F):m;let W=-1,q=-1;if(L&&(f(C,T,-v.x,-v.y),W=this._writeVertex(P,M,N,B,-v.x,-v.y,T.x,T.y,C.x,C.y,F),f(C,S,A.x,A.y),q=this._writeVertex(P,M,N,B,A.x,A.y,S.x,S.y,C.x,C.y,F)),w?L?(this._writeTriangle(Z,_,W),this._writeTriangle(Z,W,D),this._writeTriangle(Y,O,q),this._writeTriangle(Y,q,b)):(this._writeTriangle(Z,_,D),this._writeTriangle(Y,O,b)):L?(this._writeTriangle(m,_,W),this._writeTriangle(m,W,q),this._writeTriangle(m,q,b)):(this._writeTriangle(m,_,D),this._writeTriangle(m,O,b)),x?(R=this._writeVertex(P,M,N,B,A.x,A.y,d.x,d.y,e.x,e.y,F),E=b):(R=w?this._writeVertex(P,M,N,B,A.x,A.y,d.x,d.y,e.x,e.y,F):p,this._writeTriangle(R,Y,b),E=b),t){const t=R;R=E,E=t}break}}}}}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8732,8768],{35982(e,t,i){i.d(t,{B:()=>c});var s=i(4576),l=i(71511),r=i(36563),o=i(53966),n=i(97768),a=i(17676),h=i(83027);class c{constructor(e,t,i,s,l={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,h.h)(e,{...l,schedule:s}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{l.hasInitialize&&e.invoke("initialize",{}).catch(()=>{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new u(e,t);return this._listeners.push(i),this._connectListener(i),(0,r.hA)(()=>{(0,s.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,n.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,s){if(this._thread){const l=this._transferLists[e],r=l?l(t):[];return this._thread.invoke(e,t,{transferList:r,signal:i,jobPriority:s})}return this._promise?this._promise.then(()=>((0,a.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,a.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,a.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class u{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new l.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},54239(e,t,i){i.d(t,{A:()=>y});var s,l=i(32198),r=i(4576),o=i(66552),n=i(25482),a=i(86211),h=i(67076),c=i(91429),u=i(97348),p=i(43937),d=i(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),g=f.jsonValues.slice();(0,r.Xy)(g,"orthometric");const v=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let y=s=class extends n.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new h.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return v.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,a.LA)(e)||v.read(e)||(i?.messages&&i.messages.push(m(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new s({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,a.k1)(t);return new s({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}static fromSpatialReference(e){const{latestVcsWkid:t,vcsWkid:i}=e;if(!i)return null;const l=(null!=t?u.B.get(t):null)??u.B.get(i);return l?new s({heightModel:0===l.type?"gravity-related-height":"ellipsoidal",heightUnit:(0,a.LA)(l.unit.name),vertCRS:l.datum}):null}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new s;return t.read(e,{origin:"web-scene"}),t}};function m(e,t){return new h.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,l.Cg)([(0,c.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:g,default:"ellipsoidal",write:{isRequired:!0}}}}})],y.prototype,"heightModel",void 0),(0,l.Cg)([(0,p.K)("web-scene","heightModel")],y.prototype,"writeHeightModel",null),(0,l.Cg)([(0,d.w)(["web-scene","service"],"heightModel")],y.prototype,"readHeightModel",null),(0,l.Cg)([(0,c.MZ)({type:v.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:v.jsonValues,write:{writer:v.write,isRequired:!0}}}}})],y.prototype,"heightUnit",void 0),(0,l.Cg)([(0,d.w)("web-scene","heightUnit")],y.prototype,"readHeightUnit",null),(0,l.Cg)([(0,d.w)("service","heightUnit")],y.prototype,"readHeightUnitService",null),(0,l.Cg)([(0,c.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],y.prototype,"vertCRS",void 0),(0,l.Cg)([(0,d.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],y.prototype,"readVertCRS",null),y=s=(0,l.Cg)([(0,c.$K)("esri.geometry.HeightModelInfo")],y)},38732(e,t,i){i.r(t),i.d(t,{default:()=>S});var s=i(32198),l=i(56507),r=i(49186),o=i(97768),n=i(25728),a=i(17676),h=i(84952),c=i(91429),u=i(54239),p=i(4146),d=i(89186),f=i(18768),g=i(34287),v=i(8303),y=i(10873),m=i(87378),w=i(35982);class _ extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(C.forEach((e,t)=>{e===this&&C.delete(t)}),this.destroy())}}const C=new Map;var b=i(36005);let M=class extends((0,d.f)((0,f.b)((0,g.q)((0,v.A)((0,n.M)(p.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=C.get(e);return t||(null!=e?(t=new _(t=>e.immediate.schedule(t)),C.set(e,t)):(t=new _,C.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}get memoizedElevationQueryDependencies(){return[this.loadStatus,this.tileInfo,this.fullExtent,this.spatialReference]}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new r.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(a.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}async fetchTile(e,t,i,s){const o=s?.signal,n={responseType:"array-buffer",signal:o,useQueue:s?.useQueue,priority:s?.priority},a={noDataValue:s?.noDataValue,returnFileInfo:!0};await this.load(),await this._fetchTileAvailability(e,t,i,s);const h=await(0,l.A)(this.getTileUrl(e,t,i),n),c=await this._lercDecoder.decode(h.data,a,o);if(!c)throw new r.A("elevation-layer:tile-decode-failed","Failed to decode elevation tile data.");return new m.A({values:c.pixelData,width:c.width,height:c.height,noDataValue:c.noDataValue})}getTileUrl(e,t,i){const s=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,l=(0,h.x0)({...this.parsedUrl.query,blankTile:!s&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${l?"?"+l:""}`}async queryElevation(e,t){const{query:s}=await i.e(1359).then(()=>i(1359));return(0,a.Te)(t),s(this,e,t)}async createElevationSampler(e,t){const{createSampler:s}=await i.e(1359).then(()=>i(1359));return(0,a.Te)(t),s(this,e,t)}_fetchTileAvailability(e,t,i,s){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,s):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,l.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[A]}};(0,s.Cg)([(0,c.MZ)({readOnly:!0})],M.prototype,"capabilities",void 0),(0,s.Cg)([(0,b.w)("service","capabilities",["capabilities"])],M.prototype,"readCapabilities",null),(0,s.Cg)([(0,c.MZ)({json:{read:{source:"copyrightText"}}})],M.prototype,"copyright",void 0),(0,s.Cg)([(0,c.MZ)({readOnly:!0,type:u.A})],M.prototype,"heightModelInfo",void 0),(0,s.Cg)([(0,c.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],M.prototype,"path",void 0),(0,s.Cg)([(0,c.MZ)({type:["show","hide"]})],M.prototype,"listMode",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"minScale",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],M.prototype,"maxScale",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],M.prototype,"opacity",void 0),(0,s.Cg)([(0,c.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],M.prototype,"operationalLayerType",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"sourceJSON",void 0),(0,s.Cg)([(0,c.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],M.prototype,"type",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"memoizedElevationQueryDependencies",null),(0,s.Cg)([(0,c.MZ)(y.OZ)],M.prototype,"url",void 0),(0,s.Cg)([(0,c.MZ)()],M.prototype,"version",void 0),(0,s.Cg)([(0,b.w)("version",["currentVersion"])],M.prototype,"readVersion",null),M=(0,s.Cg)([(0,c.$K)("esri.layers.ElevationLayer")],M);const A=Symbol("default-fetch-tile");M.prototype.fetchTile[A]=!0;const S=M},89186(e,t,i){var s=i(32198),l=i(91429),r=i(16930),o=i(87045),n=i(65509),a=i(25943),h=i(36005);i.d(t,["f",0,e=>{const t=e;let i=class extends t{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 s=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:l,maxLOD:r,minScale:h,maxScale:c}=t;if(null==l&&null==r&&(0!==h||0!==c)){const e=e=>Math.round(1e4*e)/1e4;h=e(h||t.tileInfo.lods[0].scale),c=e(c||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);l=t>=h?i.level:l,r=t>=c?i.level:r}}if(s)return new a.d({layer:this,minLOD:l,maxLOD:r});if(t.tileInfo){const e=new o.A;return e.read(t.tileInfo,i),new n.A(e,l,r)}return null}};return(0,s.Cg)([(0,l.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,s.Cg)([(0,l.MZ)()],i.prototype,"minScale",void 0),(0,s.Cg)([(0,h.w)("service","minScale")],i.prototype,"readMinScale",null),(0,s.Cg)([(0,l.MZ)()],i.prototype,"maxScale",void 0),(0,s.Cg)([(0,h.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,s.Cg)([(0,l.MZ)({type:r.A})],i.prototype,"spatialReference",void 0),(0,s.Cg)([(0,l.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,s.Cg)([(0,l.MZ)({type:o.A})],i.prototype,"tileInfo",void 0),(0,s.Cg)([(0,l.MZ)()],i.prototype,"tilemapCache",void 0),(0,s.Cg)([(0,h.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,s.Cg)([(0,l.MZ)()],i.prototype,"version",void 0),i=(0,s.Cg)([(0,l.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}])},18768(e,t,i){var s=i(32198),l=i(53966),r=i(91429),o=i(60694);i.d(t,["b",0,e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,l.A.getLogger(this)))}};return(0,s.Cg)([(0,r.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,r.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISService")],i),i}])},87378(e,t,i){i.d(t,{A:()=>n});var s,l=i(34275),r=i(78888);const o=Symbol("ElevationTileDataClass");class n{static{s=o}constructor({values:e,width:t,height:i,noDataValue:r}){this[s]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,l.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=r}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,s=-1/0,l=!0;for(const r of t)r===e?this._hasNoDataValues=!0:(i=r<i?r:i,s=r>s?r:s,l=!1);l?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=s>-3e38?s:0)}static{this.from=(0,r.qf)(n)}}},91806(e,t,i){i.d(t,{A:()=>a});var s,l=i(32198),r=i(25482),o=i(91429),n=i(78888);let a=class extends r.o{static{s=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 s({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,l.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"cols",void 0),(0,l.Cg)([(0,o.MZ)({type:n.jz,json:{write:!0}})],a.prototype,"level",void 0),(0,l.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"levelValue",void 0),(0,l.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"origin",void 0),(0,l.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"resolution",void 0),(0,l.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"rows",void 0),(0,l.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"scale",void 0),a=s=(0,l.Cg)([(0,o.$K)("esri.layers.support.LOD")],a)},87045(e,t,i){i.d(t,{A:()=>w});var s,l=i(32198),r=i(66552),o=i(25482),n=i(86211),a=i(91429),h=i(78888),c=i(86738),u=i(16930),p=i(21325),d=i(28735),f=i(91806),g=i(72802),v=i(36005),y=i(43937);const m=new r.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 w=class extends o.o{static{s=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:l=256,spatialReference:r=u.A.WebMercator,numLODs:o=24}=e;if(!(0,p.fn)(r)){const e=[];if(i)for(let t=0;t<i.length;t++){const s=i[t];e.push(new f.A({level:t,scale:s,resolution:s}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new f.A({level:i,scale:t,resolution:t})),t*=2}return new s({dpi:96,lods:e,origin:new c.A(0,0,r),size:[l,l],spatialReference:r})}const a=(0,p.Vp)(r),h=e.origin?new c.A({x:e.origin.x,y:e.origin.y,spatialReference:r}):new c.A(a?{x:a.origin[0],y:a.origin[1],spatialReference:r}:{x:0,y:0,spatialReference:r}),d=1/(39.37*(0,n.GA)(r)*96),g=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],s=t*d;g.push(new f.A({level:e,scale:t,resolution:s}))}else{let e=(0,p.EA)(r)?512/l*591657527.5917094:256/l*591657527.591555;const i=Math.ceil(o/t);g.push(new f.A({level:0,scale:e,resolution:e*d}));for(let s=1;s<i;s++){const i=e/2**t,l=i*d;g.push(new f.A({level:s,scale:i,resolution:l})),e=i}}return new s({dpi:96,lods:g,origin:h,size:[l,l],spatialReference:r})}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,p.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return c.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const s=[],l=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{s.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,l[e.level]=e})),this._set("scales",s),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),s=i+1;return t[i]/(t[i]/t[s])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let s=0;for(;s<i;s++){const i=t[s],l=t[s+1];if(i<=e)return s;if(l===e)return s+1;if(i>e&&l<e)return s+Math.log(i/e)/Math.log(i/l)}return s}tileAt(e,t,i,s){const l=this.lodAt(e);if(!l)return null;let r,o;if("number"==typeof t)r=t,o=i;else if((0,p.aI)(t.spatialReference,this.spatialReference))r=t.x,o=t.y,s=i;else{const e=(0,d.Cv)(t,this.spatialReference);if(null==e)return null;r=e.x,o=e.y,s=i}const n=l.resolution*this.size[0],a=l.resolution*this.size[1];return s??=new g.U(0,0,0),s.level=e,s.row=Math.floor((this.origin.y-o)/a+.001),s.col=Math.floor((r-this.origin.x)/n+.001),this.updateTileInfo(s),s}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const s=e.level-i.level,l=i.resolution*this.size[0]/2**s,r=i.resolution*this.size[1]/2**s;return e.extent[0]=this.origin.x+e.col*l,e.extent[1]=this.origin.y-(e.row+1)*r,e.extent[2]=e.extent[0]+l,e.extent[3]=e.extent[1]+r,!0}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:s}=i,l=s*this.size[0],r=s*this.size[1];return e[0]=this.origin.x+t.col*l,e[1]=this.origin.y-(t.row+1)*r,e[2]=e[0]+l,e[3]=e[1]+r,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return s.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=[],l=this.lods.length-t;for(let e=0;e<l;e++){const s=e+t,{scale:l,resolution:r}=s>=0?this.lods[s]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new f.A({level:e,scale:l,resolution:r}))}return new s({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 s=e[i];this._upsampleLevels[s.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/s.resolution:0},t=s}}};(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,l.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,l.Cg)([(0,a.MZ)({type:String,json:{read:m.read,write:m.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,l.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,l.Cg)([(0,a.MZ)({type:c.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,l.Cg)([(0,v.w)("origin")],w.prototype,"readOrigin",null),(0,l.Cg)([(0,a.MZ)({type:[f.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,l.Cg)([(0,a.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,l.Cg)([(0,a.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,l.Cg)([(0,v.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,l.Cg)([(0,y.K)("size",{cols:{type:h.jz},rows:{type:h.jz}})],w.prototype,"writeSize",null),(0,l.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=s=(0,l.Cg)([(0,a.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>r});var s=i(49186),l=i(17676);class r{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 s=this.tileInfo?.lodAt(e);return!s||e<this.minLOD||e>this.maxLOD?"unavailable":s.cols&&s.rows?i>=s.cols[0]&&i<=s.cols[1]&&t>=s.rows[0]&&t<=s.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,r){await(0,l.NO)(r);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new s.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,s,r){await(0,l.NO)(r),s.level=e,s.row=t,s.col=i;const o=this.tileInfo;return o.updateTileInfo(s),this.fetchAvailability(e,t,i,r).catch(e=>{if((0,l.zf)(e))throw e;if(o.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e})}}},72802(e,t,i){i.d(t,{U:()=>l});var s=i(19419);class l{constructor(e,t,i,l=(0,s.vt)()){this._level=e,this._row=t,this._col=i,this.extent=l}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new l(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>b});var s,l=i(32198),r=i(56507),o=i(69622),n=i(49186),a=i(36563),h=(i(44208),i(66344)),c=i(15142),u=i(17676),p=i(36708),d=i(76030),f=i(84952),g=i(91429),v=i(72802),y=i(4718),m=i(69397);class w{constructor(e){!function(e){if(!e?.location)throw new n.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new n.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new n.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new n.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new n.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,y.o8)(t));const s=this.location.width,l=this.location.height;let r=!0,o=!0;const a=function(e,t=!1){return e<=1024?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*l/32));let h=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,a[h]|=1<<t):r=!1,31===t&&++h}o?(this._availability="unavailable",this.byteSize=40):r?(this._availability="available",this.byteSize=40):(this._availability=a,this.byteSize=40+(0,m.Qf)(a))}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),s=i%32,l=i>>5,r=this._availability;return l<0||l>r.length?"unknown":r[l]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||r.A,{row:s,col:l,width:o,height:a}=e,h={query:{f:"json"}};return t=t?{...h,...t}:h,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:s,left:l,width:o,height:a},valid:!0,data:new Array(o*a).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==s||e.location.left!==l||e.location.width!==o||e.location.height!==a))throw new n.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:l,width:o,height:a}});return w.fromJSON(e)})}static fromJSON(e){return Object.freeze(new w(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let b=class extends o.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=r.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new h.q(2097152),this.addHandles((0,p.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),p.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 s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,s).catch(e=>e).then(s=>{if(s instanceof w){const l=s.getAvailability(t,i);if("unavailable"===l)throw C(e,t,i);return l}if((0,u.zf)(s))throw s;return"unknown"})}fetchAvailabilityUpsample(e,t,i,s,l){s.level=e,s.row=t,s.col=i;const r=this.layer.tileInfo;r.updateTileInfo(s);const o=this.fetchAvailability(e,t,i,l).catch(e=>{if((0,u.zf)(e))throw e;if(r.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,l);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,l,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,l,r){if(!this._prefetchingEnabled)return;const o=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(o))return;const n=new AbortController;r.then(()=>n.abort(),()=>n.abort());let h=!1;const c=(0,a.hA)(()=>{h||(h=!0,n.abort())});if(this.addHandles(c,o),await(0,d.md)(10,n.signal).catch(()=>{}),h||(h=!0,this.removeHandles(o)),(0,u.G4)(n))return;const p=new v.U(e,t,i),f={...l,signal:n.signal},g=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&g.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,f);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new c.A({initialSize:s._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new n.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const l=this._tmpTilemapDefinition,r=this._tilemapFromCache(e,t,i,l);if(r)return Promise.resolve(r);const o=s?.signal;return s={...s,signal:null},new Promise((e,t)=>{(0,u.u7)(o,()=>t((0,u.NK)()));const i=_(l);let r=this._pendingTilemapRequests[i];if(!r){r=w.fromDefinition(l,s).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=r,r.then(e,e)}r.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,f.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,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const l=_(s);return this._tilemapCache.get(l)}get test(){}};(0,l.Cg)([(0,g.MZ)({constructOnly:!0})],b.prototype,"layer",void 0),(0,l.Cg)([(0,g.MZ)({constructOnly:!0})],b.prototype,"minLOD",void 0),(0,l.Cg)([(0,g.MZ)({constructOnly:!0})],b.prototype,"maxLOD",void 0),(0,l.Cg)([(0,g.MZ)({constructOnly:!0})],b.prototype,"request",void 0),(0,l.Cg)([(0,g.MZ)({constructOnly:!0})],b.prototype,"size",void 0),b=s=(0,l.Cg)([(0,g.$K)("esri.layers.support.TilemapCache")],b)}}]);
|