@arcgis/core 5.2.0-next.160 → 5.2.0-next.162

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/arcgisGlobal.d.ts +1 -0
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{0a5a9885ee6f5b5f99f0.js → 167b057ad50e6aef54de.js} +1 -1
  4. package/assets/esri/core/workers/chunks/17c6d66b47aa690df0d4.js +1 -0
  5. package/assets/esri/core/workers/chunks/{15bcf7cfe603f2ee1a24.js → 28104681ba161967039f.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{842893e75696428d536f.js → 3b0808ee3c4facfaca3d.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{eebbde81e56d69dc602f.js → 44f90e75c1dc3d726a95.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{77ebacfdf8e57f2e03f1.js → 46c5371c7a627537098c.js} +11 -11
  9. package/assets/esri/core/workers/chunks/5daa9429808ca31279f2.js +1 -0
  10. package/assets/esri/core/workers/chunks/{60737732ce495bbdd0fc.js → 5f4feca26102088ea565.js} +1 -1
  11. package/assets/esri/core/workers/chunks/6da7229433105a69eb3f.js +1 -0
  12. package/assets/esri/core/workers/chunks/83f29a159b8b5197e76a.js +1 -0
  13. package/assets/esri/core/workers/chunks/849879c8aed16315194c.js +1 -0
  14. package/assets/esri/core/workers/chunks/{1d77c8c59b0118c7e77b.js → 85bba551057366cd00ae.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{9401cc22373566e1171e.js → 8a7b02037151767542f1.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{4eae066673484986d4c1.js → 8e4a7027d171fb60e51e.js} +1 -1
  17. package/assets/esri/core/workers/chunks/{32b351b047ce1eb58146.js → 9ce8b9b80da146a5bbf5.js} +1 -1
  18. package/assets/esri/core/workers/chunks/a2fcbc494333376192aa.js +1 -0
  19. package/assets/esri/core/workers/chunks/a6f969851d4278865cc5.js +1 -0
  20. package/assets/esri/core/workers/chunks/{f1df76f098a3cc924832.js → b5df193c93e9c19f9700.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{28b74bc77f7c13080074.js → be97a629e2ae4d13ceb3.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{d33360c4f85203edafff.js → bf4d913e523eae2fda28.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{172cfeb5f415e4662432.js → d7429b58c90e015263ad.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{612104dff305ff062dfa.js → dfc81e66196c402f39b4.js} +2 -2
  25. package/assets/esri/core/workers/chunks/{02f8654852d389583891.js → e04fb83ab2634bc15cc7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/f74ae0eff3f08978e607.js +1 -0
  27. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +2 -5
  28. package/assets/esri/themes/dark/main.css +1 -1
  29. package/assets/esri/themes/light/main.css +1 -1
  30. package/assets/esri/themes/light/view.css +1 -1
  31. package/chunks/DefaultMaterial.glsl.js +1 -1
  32. package/chunks/RealisticTree.glsl.js +1 -1
  33. package/chunks/RibbonLine.glsl.js +125 -133
  34. package/config.d.ts +62 -34
  35. package/config.js +1 -1
  36. package/core/has.js +1 -1
  37. package/core/mapCollectionUtils.js +1 -1
  38. package/core/workers/Connection.d.ts +58 -89
  39. package/core/workers.d.ts +45 -54
  40. package/geometry/support/Indices.js +1 -1
  41. package/geometry/support/aaBoundingRect.js +1 -1
  42. package/geometry/support/ray.js +1 -1
  43. package/kernel.js +1 -1
  44. package/layers/FeatureLayer.d.ts +7 -5
  45. package/layers/FeatureLayer.js +1 -1
  46. package/layers/GeospatialPDFLayer.js +1 -1
  47. package/layers/MapImageLayer.d.ts +9 -3
  48. package/layers/MapNotesLayer.d.ts +2 -2
  49. package/layers/SubtypeGroupLayer.d.ts +1 -1
  50. package/layers/SubtypeGroupLayer.js +1 -1
  51. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
  52. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  53. package/layers/graphics/sources/support/QueryTask.js +1 -1
  54. package/layers/knowledgeGraph/KnowledgeGraphSublayer.d.ts +16 -16
  55. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  56. package/layers/mixins/ArcGISMapService.js +1 -1
  57. package/layers/ogc/ogcFeatureUtils.js +1 -1
  58. package/layers/support/Sublayer.d.ts +29 -15
  59. package/layers/support/Sublayer.js +1 -1
  60. package/layers/support/commonProperties.js +1 -1
  61. package/package.json +2 -2
  62. package/rest/layerSources/DynamicDataLayer.d.ts +4 -2
  63. package/rest/layerSources/DynamicDataLayer.js +1 -1
  64. package/rest/layerSources/DynamicMapLayer.d.ts +1 -1
  65. package/rest/layerSources/DynamicWorkspaceLayer.d.ts +45 -0
  66. package/rest/layerSources/DynamicWorkspaceLayer.js +2 -0
  67. package/rest/layerSources/typeUtils.js +2 -0
  68. package/rest/print.js +1 -1
  69. package/rest/query/operations/queryRelatedRecords.js +1 -1
  70. package/rest/query/operations/queryUtils.js +1 -1
  71. package/rest/support/Query.js +1 -1
  72. package/rest/support/RelationshipQuery.js +1 -1
  73. package/symbols/LineSymbol3D.d.ts +5 -3
  74. package/views/2d/analysis/ElevationProfileAnalysisView2D.d.ts +6 -0
  75. package/views/2d/analysis/ElevationProfileAnalysisView2D.js +1 -1
  76. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  77. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  78. package/views/3d/analysis/Dimension/DimensionVisualization.js +1 -1
  79. package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
  80. package/views/3d/analysis/Dimension/lengthDimensionManipulatorUtils.js +1 -1
  81. package/views/3d/analysis/ElevationProfileAnalysisView3D.d.ts +6 -0
  82. package/views/3d/analysis/ElevationProfileAnalysisView3D.js +1 -1
  83. package/views/3d/analysis/LineOfSight/LineOfSightIntersectionResult.js +1 -1
  84. package/views/3d/analysis/LineOfSight/LineOfSightObserverPlugin.js +1 -1
  85. package/views/3d/analysis/LineOfSight/LineOfSightTargetPlugin.js +1 -1
  86. package/views/3d/analysis/Viewshed/ViewshedFieldOfViewManipulation.js +1 -1
  87. package/views/3d/analysis/Viewshed/ViewshedPlacementPointPlugin.js +1 -1
  88. package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
  89. package/views/3d/input/SceneInputManager.js +1 -1
  90. package/views/3d/input/handlers/DragZoom.js +1 -1
  91. package/views/3d/input/handlers/MouseWheelFov.js +1 -1
  92. package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
  93. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  94. package/views/3d/interactive/manipulators/ResizeManipulator.js +1 -1
  95. package/views/3d/interactive/manipulators/RotateManipulator.js +1 -1
  96. package/views/3d/interactive/manipulators/ShiftManipulator.js +1 -1
  97. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  98. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  99. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  100. package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
  101. package/views/3d/interactive/visualElements/RightAngleQuadVisualElement.js +1 -1
  102. package/views/3d/layers/FlowSubView3D.js +1 -1
  103. package/views/3d/layers/I3SMeshView3D.js +1 -1
  104. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  105. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  106. package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
  107. package/views/3d/layers/graphics/extrudePolygon.js +1 -1
  108. package/views/3d/layers/graphics/tessellationUtils.js +1 -1
  109. package/views/3d/state/controllers/FovController.js +1 -1
  110. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  111. package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
  112. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  113. package/views/3d/support/elevationUpdateUtils.js +1 -1
  114. package/views/3d/terrain/PatchRenderData.js +1 -1
  115. package/views/3d/terrain/TerrainData.js +1 -1
  116. package/views/3d/terrain/TextureReference.js +1 -1
  117. package/views/3d/terrain/terrainUtils.js +1 -1
  118. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +2 -2
  119. package/views/3d/webgl-engine/core/shaderLibrary/attributes/SymbolColor.glsl.js +3 -3
  120. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialExternalColor.glsl.js +2 -2
  121. package/views/3d/webgl-engine/core/shaderLibrary/output/getEmissions.glsl.js +2 -2
  122. package/views/3d/webgl-engine/lib/GridLocalOriginFactory.js +1 -1
  123. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  124. package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
  125. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  126. package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
  127. package/views/BreakpointsOwner.d.ts +6 -0
  128. package/views/SceneView.js +1 -1
  129. package/views/analysis/ElevationProfile/ElevationProfileTool.js +1 -1
  130. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  131. package/views/interactive/editGeometry/operations/RotateVertex.js +1 -1
  132. package/views/interactive/editGeometry/operations/ScaleVertex.js +1 -1
  133. package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
  134. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  135. package/views/types.d.ts +3 -0
  136. package/views/webgl/ShaderBuilder.js +1 -1
  137. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  138. package/widgets/Search/LocatorSearchSource.d.ts +22 -1
  139. package/widgets/support/SelectionList/GroupLayerItem.d.ts +2 -0
  140. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  141. package/widgets/support/SelectionList/ItemBase.d.ts +2 -0
  142. package/widgets/support/SelectionList/ItemBase.js +1 -1
  143. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  144. package/widgets/support/SelectionList.js +1 -1
  145. package/assets/esri/core/workers/chunks/3e3e076fa5e8d5d5f33f.js +0 -1
  146. package/assets/esri/core/workers/chunks/510502a4c9a2ba8d3f7b.js +0 -1
  147. package/assets/esri/core/workers/chunks/7d212c415f2709037408.js +0 -1
  148. package/assets/esri/core/workers/chunks/abb9e820d2871fa7acae.js +0 -1
  149. package/assets/esri/core/workers/chunks/ade5fdcd08dcbac74740.js +0 -1
  150. package/assets/esri/core/workers/chunks/b390b9cde2884755e8be.js +0 -1
  151. package/assets/esri/core/workers/chunks/e8bf653376a607f00897.js +0 -1
  152. package/assets/esri/core/workers/chunks/f4a7aa3cdbc0c429c359.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[118],{83349(e,t,n){n.d(t,{e:()=>o});const r=new Set;let i=!1;function o(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length;r.size&&r.clear();let l=s(e,0,o,n,!0),u=[];if(!l||l.next===l.prev)return u;let c=0,h=0,f=0;if(i&&(l=g(e,t,l,n)),e.length>80*n){c=e[0],h=e[1];let t=c,r=h;for(let i=n;i<o;i+=n){let n=e[i],o=e[i+1];n<c&&(c=n),o<h&&(h=o),n>t&&(t=n),o>r&&(r=o)}f=Math.max(t-c,r-h),f=0===f?0:32767/f}return a(l,u,c,h,f),u}function s(e,t,n,r,i){let o=null;if(i===k(e,t,n,r)>0)for(let i=t;i<n;i+=r)o=D(i/r|0,e[i],e[i+1],o);else for(let i=n-r;i>=t;i-=r)o=D(i/r|0,e[i],e[i+1],o);return o&&P(o,o.next)&&($(o),o=o.next),o}function l(e,t=e){let n,o=t===e,s=e;do{n=!1,s===s.next||0!==r.size&&r.has(s)||!P(s,s.next)&&0!==O(s.prev,s,s.next)?(o||s!==t)&&(s=s.next,n=!o):((o||s===t)&&(t=s.prev),i=!0,$(s),s=s.prev,n=!0)}while(n||s!==t);return t}function a(e,t,n,r,o){o&&function(e,t,n,r){let i=e,o=0;do{i.z=I(i.x,i.y,t,n,r),T[o++]=i,i=i.next}while(i!==e);!function(e){if(e<=32)for(let t=1;t<e;t++){let e=T[t],n=e.z,r=t-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=e}else{S.length<e&&(S=new Uint32Array(e),E=new Uint32Array(e),R=Array(e));for(let t=0;t<e;t++)S[t]=T[t].z;U(e,T,S,R,E,0),U(e,R,E,T,S,8),U(e,T,S,R,E,16),U(e,R,E,T,S,24)}}(o);let s=null;for(let e=0;e<o;e++){let t=T[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null,T.fill(null,0,o),R.fill(null,0,o)}(e,n,r,o);let s=e,a=!1;for(;e.prev!==e.next;){let p=e.prev,g=e.next;if(O(p,e,g)<0&&(o?c(e,n,r,o):u(e)))t.push(p.i,e.i,g.i),$(e),e=g,s=g;else if((e=g)===s){if(i=!1,e=l(e),i){s=e;continue}if(!a){s=e=h(e,t),a=!0;continue}f(e,t,n,r,o);break}}}function u(e){let t=e.prev,n=e,r=e.next,i=t.x,o=n.x,s=r.x,l=t.y,a=n.y,u=r.y,c=Math.min(i,o,s),h=Math.min(l,a,u),f=Math.max(i,o,s),p=Math.max(l,a,u),g=r.next;for(;g!==t;){if(g.x>=c&&g.x<=f&&g.y>=h&&g.y<=p&&(i!==g.x||l!==g.y)&&_(i,l,o,a,s,u,g.x,g.y)&&O(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function c(e,t,n,r){let i=e.prev,o=e,s=e.next,l=i.x,a=o.x,u=s.x,c=i.y,h=o.y,f=s.y,p=Math.min(l,a,u),g=Math.min(c,h,f),d=Math.max(l,a,u),y=Math.max(c,h,f),m=I(p,g,t,n,r),x=I(d,y,t,n,r),v=e.prevZ;for(;v&&v.z>=m;){if(v.x>=p&&v.x<=d&&v.y>=g&&v.y<=y&&v!==s&&(l!==v.x||c!==v.y)&&_(l,c,a,h,u,f,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let w=e.nextZ;for(;w&&w.z<=x;){if(w.x>=p&&w.x<=d&&w.y>=g&&w.y<=y&&w!==s&&(l!==w.x||c!==w.y)&&_(l,c,a,h,u,f,w.x,w.y)&&O(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function h(e,t){let n=e,r=!1;do{let i=n.prev,o=n.next.next;j(i,n,n.next,o,!1)&&B(i,o)&&B(o,i)&&(t.push(i.i,n.i,o.i),$(n),$(n.next),n=e=o,r=!0),n=n.next}while(n!==e);return r?l(n):n}function f(e,t,n,r,i){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&N(o,e)){let s=z(o,e);return o=l(o,o.next),s=l(s,s.next),a(o,t,n,r,i),void a(s,t,n,r,i)}e=e.next}o=o.next}while(o!==e)}let p=!1;function g(e,t,n,i){let o=[];for(let n=0,l=t.length;n<l;n++){let a=s(e,t[n]*i,n<l-1?t[n+1]*i:e.length,i,!1);a===a.next&&r.add(a),o.push(Z(a))}o.sort(d),function(e,t){let n=Math.ceil((e+2*t)/16)+t+2;m.length<4*n&&(m=new Float64Array(4*n)),x=0}(e.length/i,t.length),A(n,n),p=!0;for(let e=0;e<o.length;e++)n=y(o[e],n);return p=!1,l(n)}function d(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function y(e,t){let n=function(e,t){let n,r=t,i=e.x,o=e.y,s=-1/0;if(P(e,r))return r;for(let t=0,l=0;t<x;t++,l+=4){if(o<m[l+1]||o>m[l+3]||m[l]>i||m[l+2]<=s)continue;let a=b(t);r=M(t);do{if(r.prev.next===r){if(P(e,r.next))return r.next;if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){let e=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x<r.next.x?r:r.next,e===i))return n}}r=r.next}while(r!==a)}if(!n)return null;let l=n.x,a=n.y,u=Math.min(o,a),c=Math.max(o,a),h=1/0;for(let t=0,f=0;t<x;t++,f+=4){if(m[f+2]<l||m[f]>i||m[f+3]<u||m[f+1]>c)continue;let p=b(t);r=M(t);do{if(r.prev.next===r&&i>=r.x&&r.x>=l&&i!==r.x&&_(o<a?i:s,o,l,a,o<a?s:i,o,r.x,r.y)){let t=Math.abs(o-r.y)/(i-r.x);(B(r,e)||r.y===o&&r.next.y===o&&r.next.x>i)&&(t<h||t===h&&(r.x>n.x||r.x===n.x&&C(n,r)))&&(n=r,h=t)}r=r.next}while(r!==p)}return n}(e,t);if(!n)return t;let r=z(n,e);return A(n,r.next.next),l(r,r.next),l(n,n.next)}let m=new Float64Array,x=0;const v=[],w=[];function A(e,t){let n=e;do{let e=x++;v[e]=n;let r=1/0,i=1/0,o=-1/0,s=-1/0,l=0;do{let t=n.next;n.z=e,n.x<r&&(r=n.x),n.x>o&&(o=n.x),n.y<i&&(i=n.y),n.y>s&&(s=n.y),t.x<r&&(r=t.x),t.x>o&&(o=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),n=t}while(++l<16&&n!==t);w[e]=n;let a=4*e;m[a]=r,m[a+1]=i,m[a+2]=o,m[a+3]=s}while(n!==t)}function b(e){let t=w[e];for(;t.prev.next!==t;)t=t.next;return w[e]=t,t}function M(e){let t=v[e];for(;t.prev.next!==t;)t=t.next;return v[e]=t,t}function C(e,t){return O(e.prev,e,t.prev)<0&&O(t.next,e,e.next)<0}const T=[];let R=[],S=new Uint32Array,E=new Uint32Array;const L=new Uint32Array(256);function U(e,t,n,r,i,o){L.fill(0);for(let t=0;t<e;t++)L[n[t]>>>o&255]++;let s=0;for(let e=0;e<256;e++){let t=L[e];L[e]=s,s+=t}for(let s=0;s<e;s++){let e=n[s],l=L[e>>>o&255]++;r[l]=t[s],i[l]=e}}function I(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Z(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function _(e,t,n,r,i,o,s,l){return(i-s)*(t-l)>=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function N(e,t){let n=P(e,t)&&O(e.prev,e,e.next)>0&&O(t.prev,t,t.next)>0;return e.next.i!==t.i&&(n||B(e,t)&&B(t,e)&&(0!==O(e.prev,e,t.prev)||0!==O(e,t.prev,t)))&&!function(e,t){let n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=e;do{let l=s.next;if(s.x>r&&l.x>r||s.x<n&&l.x<n||s.y>o&&l.y>o||s.y<i&&l.y<i)s=l;else{if(s.i!==e.i&&l.i!==e.i&&s.i!==t.i&&l.i!==t.i&&j(s,l,e,t))return!0;s=l}}while(s!==e);return!1}(e,t)&&(n||function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{let e=n.next;n.y>o!=e.y>o&&i<(e.x-n.x)*(o-n.y)/(e.y-n.y)+n.x&&(r=!r),n=e}while(n!==e);return r}(e,t))}function O(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function P(e,t){return e.x===t.x&&e.y===t.y}function j(e,t,n,r,i=!0){let o=O(e,t,n),s=O(e,t,r),l=O(n,r,e),a=O(n,r,t);return(o>0&&s<0||o<0&&s>0)&&(l>0&&a<0||l<0&&a>0)||!!i&&!!(0===o&&F(e,n,t)||0===s&&F(e,r,t)||0===l&&F(n,e,r)||0===a&&F(n,t,r))}function F(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function B(e,t){return O(e.prev,e,e.next)<0?O(e,t,e.next)>=0&&O(e,e.prev,t)>=0:O(e,t,e.prev)<0||O(e,e.next,t)<0}function z(e,t){let n=H(e.i,e.x,e.y),r=H(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function D(e,t,n,r){let i=H(e,t,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 $(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),p&&function(e,t){let n=4*e.z;t.x<m[n]&&(m[n]=t.x),t.y<m[n+1]&&(m[n+1]=t.y),t.x>m[n+2]&&(m[n+2]=t.x),t.y>m[n+3]&&(m[n+3]=t.y)}(e.prev,e.next)}function H(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function k(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}let G,V,Y,K,W,q=0,J=0;function Q(e,t,n,r,i,o){return(n-e)*(o-t)-(r-t)*(i-e)}function X(e,t,n,r,i,o,s,l){let a=e-s,u=t-l,c=n-s,h=r-l,f=i-s,p=o-l,g=a*a+u*u,d=c*c+h*h,y=f*f+p*p,m=g+d+y;return a*(h*y-d*p)-u*(c*y-d*f)+g*(c*p-h*f)<=1e-13*m*m}function ee(e){return e-e%3+(e+1)%3}o.deviation=function(e,t,n,r){let i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(k(e,0,o,n));if(i)for(let r=0,i=t.length;r<i;r++){let o=t[r]*n,l=r<i-1?t[r+1]*n:e.length;s-=Math.abs(k(e,o,l,n))}let l=0;for(let t=0;t<r.length;t+=3){let i=r[t]*n,o=r[t+1]*n,s=r[t+2]*n;l+=Math.abs((e[i]-e[s])*(e[o+1]-e[i+1])-(e[i]-e[o])*(e[s+1]-e[i+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},o.flatten=function(e){let t=[],n=[],r=e[0][0].length,i=0,o=0;for(let s of e){for(let e of s)for(let n=0;n<r;n++)t.push(e[n]);o&&(i+=o,n.push(i)),o=s.length}return{vertices:t,holes:n,dimensions:r}},o.refine=function(e,t,n=2){let r=e,i=r.length;if(i<6)return;(function(e){(!G||G.length<e)&&(G=new Int32Array(e)),(!V||V.length<e)&&(V=new Int32Array(e)),(!W||W.length<e)&&(W=new Uint8Array(e));let t=1;for(;t<4*e;)t<<=1;(!Y||Y.length<t)&&(Y=new Int32Array(t),K=new Uint32Array(t)),q=t-1})(i),J++,V.fill(-1,0,i);let o=0;for(let e=0;e<i;e++){let t=r[e],n=r[ee(e)],i=t<n?t:n,s=t<n?n:t,l=(Math.imul(i,2654435761)^Math.imul(s,2246822507))&q;for(;K[l]===J;){let t=Y[l];if(-1!==t){let n=r[t],a=r[ee(t)];if(n===i&&a===s||n===s&&a===i){V[e]=t,V[t]=e,Y[l]=-1,W[t]=1,G[o++]=t;break}}l=l+1&q}K[l]!==J&&(Y[l]=e,K[l]=J)}for(;o>0;){let e=G[--o];W[e]=0;let i=V[e];if(-1===i)continue;let s=e-e%3,l=i-i%3,a=s+(e+2)%3,u=s+(e+1)%3,c=l+(i+2)%3,h=l+(i+1)%3,f=r[a],p=r[e],g=r[u],d=r[c],y=t[f*n],m=t[f*n+1],x=t[p*n],v=t[p*n+1],w=t[g*n],A=t[g*n+1],b=t[d*n],M=t[d*n+1];if(!X(y,m,x,v,w,A,b,M)&&Q(y,m,x,v,b,M)>0&&Q(y,m,b,M,w,A)>0){r[e]=d,r[i]=f;let t=V[c],n=V[a];V[e]=t,-1!==t&&(V[t]=e),V[i]=n,-1!==n&&(V[n]=i),V[a]=c,V[c]=a,-1!==t&&0===W[e]&&(W[e]=1,G[o++]=e),-1!==n&&0===W[i]&&(W[i]=1,G[o++]=i),-1!==V[u]&&0===W[u]&&(W[u]=1,G[o++]=u),-1!==V[h]&&0===W[h]&&(W[h]=1,G[o++]=h)}}}},21287(e,t,n){n.d(t,{M5:()=>h,eV:()=>c});var r=n(56507),i=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function c(e,t,n,r){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let i=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(()=>n(10820));if(e(a))return r(a,t)}if(c){let{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(()=>n(22390));if(e(a))return r(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},83300(e,t,n){n.r(t),n.d(t,{default:()=>Ee});var r=n(32198),i=n(69540),o=n(92474),s=n(53966),l=n(61893),a=n(17676),u=n(36708),c=n(91429),h=n(51850),f=n(91075),p=n(86738),g=n(39829),d=n(70328),y=n(24770),m=n(16939),x=n(49186);const v="Expected location to be a Point instance";class w extends x.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),R=n(35522),S=n(65806);function E(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}var L=n(22141),U=n(72258);const I=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const Z=(0,h.vt)(),_=(0,h.vt)(),N=(0,h.vt)();var O=n(9093),P=n(5443),j=n(99917),F=n(98764),B=n(48353),z=n(9762),D=n(4197),$=n(73354);const H=(0,O.vt)(),k=(0,D.jh)(24);var G=n(84952);function V(e){let t=(0,G.nM)(e.url);return n=>{let r=(0,G.V1)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function Y(e){return ee.fromBlob(e,te(e.name,e.type))}const K=/^model\/gltf\+json$/,W=/^model\/gltf-binary$/,q=/\.gltf$/i,J=/\.glb$/i;function Q({mimeType:e,source:t,name:n}){return K.test(e)||q.test(n)?{url:t.url,type:"gltf"}:W.test(e)||J.test(n)?{url:t.url,type:"glb"}:null}function X(e){let t=new Map,n=null,r=null;for(let i of e){let{source:e,name:o}=i;n??=Q(i),"ESRI3DO_NORM.glb"===o&&(r=Q(i)),t.set(o,e.url),e.files.forEach((e,n)=>t.set(n,e))}let i=r??n;if(null==i)throw new x.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ee(i.url,()=>e.forEach(({source:e})=>e.dispose()),t,i.type)}class ee{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){let n=URL.createObjectURL(e);return new ee(n,()=>URL.revokeObjectURL(n),void 0,t)}}function te(e,t){return K.test(t)||q.test(e)?"gltf":W.test(t)||q.test(e)?"glb":void 0}var ne=n(66895),re=n(29461),ie=n(15070),oe=n(77690),se=n(29242),le=n(58083),ae=n(67026),ue=n(82534);const ce=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function he(e,t,n,r=h.uY){if(null!=e){(0,le.$0)(de,(0,y.$I)(t),(0,y.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)fe[n]=e[t+n]-r[n];(0,R.Z0)(fe,fe,de);for(let n=0;n<3;n++)e[t+n]=fe[n]+r[n]}}}const fe=(0,h.vt)(),pe=(0,O.vt)(),ge=(0,y.vt)(),de=(0,O.vt)(),ye=(0,se.vt)(),me=(0,h.vt)(),xe=(0,ue.vt)(),ve=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function we(e,t,n=h.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Ae[t]=e[r+t]-n[t];(0,R.hs)(Ae,Ae,t);for(let t=0;t<3;t++)e[r+t]=Ae[t]+n[t]}}const Ae=(0,h.vt)(),be=(0,h.vt)(),Me=(0,O.vt)(),Ce=(0,h.vt)();var Te,Re=n(41618);const Se={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let Ee=Te=class extends((0,i.OU)((0,o.WV)((0,l.g)(f.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new re.O,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.default,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,u.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){let{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,i=(0,d.gE)(r,k);if((0,T.Hq)(n)&&e.transform&&(0,$.t)(i,i,e.transform.localMatrix),"georeferenced"===n.type){let e=n.origin;return e&&(0,$.a)(i,i,e),(0,d.w1)((0,d.vY)(i),t)}let o=(0,F.lO)(t),s=n.origin;if(!(0,j.canProjectWithoutEngine)(o,t)){let[e,n,r]=s;return new P.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,B.l)(t,s,H,o),(0,$.t)(i,i,H),(0,z.projectBuffer)(i,o,0,i,t,0),(0,d.w1)((0,d.vY)(i),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,d.vt)(d.v_):(0,d.vY)(e)}get origin(){let e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;let{center:t,zmin:n}=this._transformedExtent;return new p.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||=[],this.components.push(m.default.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){let t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,y.AU)(e,t,n,Le),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;let{spatialReference:r,vertexSpace:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=fe;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ce(),n.spatialReference,o,L.JP);(0,ae.x8)(xe,(0,y.yo)(t),(0,y.$I)(t));let f=(0,le.O7)(pe,xe,h.uY,h.Un,c),{localMatrix:g}=i,d=(0,le.lw)(pe,f,g);i.scale=(0,le.X_)((0,h.vt)(),d),(0,le.hs)(d,d,(0,R.DI)(fe,i.scale));let m=i.rotationAxis;i.rotation=(0,y.ui)(d),0===i.rotationAngle&&(i.rotationAxis=m),i.translation=(0,le.sC)((0,h.vt)(),d)}(e,t,o):E(i,r)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=me;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ce(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ce(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),h=null==a?null:new Float32Array(a.length);(0,B.l)(i,o,de,i),(0,oe.z0)(ye,de);let f=ge;(0,R.ei)((0,y.yo)(ge),(0,y.yo)(t),ye),f[3]=t[3],!(0,L.gr)(s,r,u,i)||null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=h&&!(0,L.xA)(a,s,r,u,i,h)?(0,L.CN)(ce(),r,i):(he(u,f,3,o),!(0,L.$5)(u,i,s,r)||null!=l&&null!=c&&(he(c,f,3),!(0,L.si)(c,s,r,u,i,l))||null!=a&&null!=h&&(he(h,f,4),!(0,L.Mv)(h,s,r,u,i,a))?(0,L.CN)(ce(),i,r):e.vertexAttributesChanged())}(e,t,o):function(e,t,n){let r=me;if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(ce(),n.spatialReference,e.spatialReference,L.JP)}he(e.vertexAttributes.position,t,3,r),he(e.vertexAttributes.normal,t,3),he(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}(this,Le,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;let{vertexSpace:r,vertexAttributes:i}=this,o=i?.position;if(!o)return this;if((0,T.Hq)(r)){let[i,o,s]=r.origin;r.origin=(0,h.fA)(i+e,o+t,s+n)}else{for(let r=0;r<o.length;r+=3)o[r]+=e,o[r+1]+=t,o[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r,spatialReference:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=Ae;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ve(),n.spatialReference,o,L.JP);let f=(0,R.hZ)(be,t,t,t),g=(0,le.O7)(Me,ue.zK,h.uY,f,c),{localMatrix:d}=i,m=(0,le.lw)(Me,g,d);i.scale=(0,le.X_)((0,h.vt)(),m),(0,le.hs)(m,m,(0,R.DI)(Ae,i.scale));let x=i.rotationAxis;i.rotation=(0,y.ui)(m),0===i.rotationAngle&&(i.rotationAxis=x),i.translation=(0,le.sC)((0,h.vt)(),m)}(e,t,o):E(r,i)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=Ce;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ve(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ve(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),h=null==a?null:new Float32Array(a.length);!(0,L.gr)(s,r,u,i)||null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=h&&!(0,L.xA)(a,s,r,u,i,h)?(0,L.CN)(ve(),r,i):(we(u,t,o),!(0,L.$5)(u,i,s,r)||null!=l&&null!=c&&!(0,L.si)(c,s,r,u,i,l)||null!=a&&null!=h&&!(0,L.Mv)(h,s,r,u,i,a)?(0,L.CN)(ve(),i,r):e.vertexAttributesChanged())}(e,t,o):function(e,t,n){let r=Ce;if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(ve(),n.spatialReference,e.spatialReference,L.JP)}we(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,o)}(this,e,t),this}centerAt(e,t){return this._checkIfLoaded("centerAt()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r}=e,i=n?.origin??e.origin;(0,T.Hq)(r)?function(e,t,n){let{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;let i=_,o=Z;if(!(0,S.g)(t,o,e.spatialReference))return void(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP);if(!(0,S.g)(n,i,e.spatialReference))return void(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP);let s=(0,R.Re)(N,o,i);r.origin=(0,R.WQ)((0,h.vt)(),r.origin,s)}(e,t,i):E(r,i.spatialReference)?function(e,t,n){let r=(0,h.fA)(n.x,n.y,n.z??0),i=(0,U.UR)(e,new b.A({origin:r}));if(!i)return;let o=(0,h.fA)(t.x,t.y,t.z??0),s=(0,U.UR)({vertexAttributes:i,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:o})},A.A.absolute);if(!s)return;let{position:l,normal:a,tangent:u}=s;e.vertexAttributes.position=l,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,i):function(e,t,n){let r=_,i=Z;if((0,S.g)(t,i,e.spatialReference)){if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,i,r),e.vertexAttributesChanged()}else(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP)}(e,t,i)}(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){let{source:i}=t,{loadGLTFMesh:o}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r),s=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");return X(e.map(e=>({name:e.name,mimeType:e.type,source:Y(e)})))}(e.files):Y(e.files);case"service":return async function(e,t){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");let n=await(0,a.nA)(e.map(async e=>{let n=await async function(e,t){let{parts:n,assetMimeType:r,assetName:i}=e;if(1===n.length)return new ee(n[0].partUrl);let o=await e.toBlob(t);return(0,a.Te)(t),ee.fromBlob(o,te(i,r))}(e);return(0,a.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,a.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,a.NK)();return X(n)}(e.assets,t);default:throw new x.A("mesh-load-external:invalid-source","Invalid source type")}}(i,r);(0,a.Te)(r);let{mesh:{vertexAttributes:l,components:u},meta:{isDracoDecompressed:c}}=await o(new p.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:V(s),signal:r?.signal,expectedType:s.type,unitConversionDisabled:t.unitConversionDisabled}).finally(()=>s.dispose());if(c)throw new x.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=l,e.components=u}(e,t,r);case"loadable":return t.source.load(e,r);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,ne.WO)((0,ne.QN)(e)))}cloneShallow(){return new Te({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(()=>n(84038)),this.load(e)]);return(0,a.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createBox()",v),null;let n=new Te((0,ie.UG)((0,ie.H8)(),e,t));return t?.imageFace&&"all"!==t.imageFace?(0,ie.bQ)(n,t.imageFace):n}static createSphere(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.Dk)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.ai)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createPlane()",v),null;let n=t?.facing??"up",r=(0,ie.uF)(n,t?.size);return new Te((0,ie.UG)((0,ie.Uh)(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof g.A))return s.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;let n=(0,Re.uM)(e,{method:"earcut"}),r=(0,a.$X)(n)?null:n,i=r?.positions??[],o=r?.polygonIndices??[];return new Te({vertexAttributes:new C.default({position:i}),components:[new m.default({faces:o,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof p.A)){let e=new w;throw s.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}let{loadGLTFMesh:i}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r);return new Te((await i(e,t,r)).mesh)}};(0,r.Cg)([(0,c.MZ)({type:[m.default],json:{write:!0}})],Ee.prototype,"components",void 0),(0,r.Cg)([(0,c.MZ)({nonNullable:!0,types:Se,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexSpace??e.clone(t)})],Ee.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,c.MZ)({type:M.A,clonable:(e,t)=>{let n=(0,ne.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],Ee.prototype,"transform",void 0),(0,r.Cg)([(0,c.MZ)({constructOnly:!0,type:re.O,clonable:(e,t)=>(0,ne.o2)(t)?.metadata??e.clone()})],Ee.prototype,"metadata",void 0),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"hasExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_transformedExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"origin",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"extent",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ee.prototype,"hasZ",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ee.prototype,"hasM",void 0),(0,r.Cg)([(0,c.MZ)({type:C.default,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexAttributes??e.clone(t)})],Ee.prototype,"vertexAttributes",void 0),Ee=Te=(0,r.Cg)([(0,c.$K)("esri.geometry.Mesh")],Ee);const Le=(0,y.vt)()},15585(e,t,n){n.d(t,{If:()=>p,O5:()=>m,O9:()=>d,QT:()=>y,l3:()=>g});var r=n(32198),i=n(2741),o=n(49186),s=n(44208),l=n(34727);let a=null,u=null,c=null,h=null;const f=(new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,{vertices:new Float64Array,indices:new Uint32Array,outlineIndices:new Uint32Array,outlineRingLengths:new Uint32Array,vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function p(){return a??=async function(){c=await(await n.e(2997).then(()=>n(42997))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),a}async function g(){return u??=async function(){h=await(await n.e(9134).then(()=>n(99134))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),u}function d(){return null!==h}function y(e,t,n=2){let i={stack:[],error:void 0,hasError:!1};try{let l=c;if(!l)throw new o.A("libtess:not-loaded","libtessF32 not loaded");let a=(0,r.mS)(i,A.from(l,e),!1),u=(0,r.mS)(i,M.from(l,t),!1),h=e.length/n*4,f=(0,r.mS)(i,new A(l,h*n),!1),p=l.triangulate(a.ptr,u.ptr,u.size,n,f.ptr,h);if((0,s.A)("esri-tessellation-debug")){let e=l.getError();0!==e&&console.warn("libtess:triangulation",C(e))}return{buffer:f.slice(0,p*n),vertexCount:p}}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}function m(e,t,n=2,i=!0){let a={stack:[],error:void 0,hasError:!1};try{let u=h;if(!u)throw new o.A("libtess:not-loaded","libtessF64 not loaded");let c=(0,r.mS)(a,b.from(u,e),!1),p=(0,r.mS)(a,M.from(u,t),!1),g=(0,r.mS)(a,new M(u,1),!1),d=(0,r.mS)(a,new M(u,1),!1),y=(0,r.mS)(a,new M(u,1),!1),m=(0,r.mS)(a,new M(u,1),!1),{maxVertexCount:x,maxIndexCount:v,maxOutlineIndexCount:A,maxOutlineRingCount:T}=function(e,t){let n=e.reduce((e,t)=>e+t,0),r=e.length,i=Math.max(0,e.length-1),o=Math.max(0,n+2*i-2),s=Math.max(0,Math.ceil(2*n)),a=Math.max(0,Math.ceil(3*o*2)),u=(0,l.mP)(a,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,h=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:s,maxIndexCount:u,maxOutlineIndexCount:t?Math.max(0,n+r+c):0,maxOutlineRingCount:t?Math.max(0,r+h):0}}(t,i),R=0,S=0,E=0,L=0,U=0;{let e={stack:[],error:void 0,hasError:!1};try{let t=(0,r.mS)(e,new b(u,x*n),!1),o=(0,r.mS)(e,new M(u,v),!1),s=(0,r.mS)(e,i?new M(u,A):null,!1),l=(0,r.mS)(e,i?new M(u,T):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,t.ptr,x,n,o.ptr,v,g.ptr,d.ptr,s?.ptr??0,A,l?.ptr??0,T,y.ptr,m.ptr),U=u.getError(),R=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],S=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],E=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],L=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT],0===U)return{vertices:t.slice(0,R*n),indices:o.slice(0,S),outlineIndices:i&&s?s.slice(0,E):f.outlineIndices,outlineRingLengths:i&&l?l.slice(0,L):f.outlineRingLengths,vertexCount:R,indexCount:S,outlineIndexCount:i?E:0,outlineRingCount:i?L:0}}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}if(100903!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),f;let I=(0,r.mS)(a,new b(u,R*n),!1),Z=(0,r.mS)(a,new M(u,S),!1),_=(0,r.mS)(a,i?new M(u,E):null,!1),N=(0,r.mS)(a,i?new M(u,L):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,I.ptr,R,n,Z.ptr,S,g.ptr,d.ptr,_?.ptr??0,i?E:0,N?.ptr??0,i?L:0,y.ptr,m.ptr),U=u.getError(),0!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),f;let O=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],P=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],j=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],F=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT];return{vertices:I.slice(0,O*n),indices:Z.slice(0,P),outlineIndices:i&&_?_.slice(0,j):f.outlineIndices,outlineRingLengths:i&&N?N.slice(0,F):f.outlineRingLengths,vertexCount:O,indexCount:P,outlineIndexCount:i?j:0,outlineRingCount:i?F:0}}catch(e){a.error=e,a.hasError=!0}finally{(0,r.hk)(a)}}function x(e){return e.HEAPF64}function v(e){return e.HEAPF32}function w(e){return e.HEAP32}class A{static from(e,t){let n=new A(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){v(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return v(this._libtess).slice(n+e,n+t)}}class b{static from(e,t){let n=new b(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(e){x(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return x(this._libtess).slice(n+e,n+t)}}class M{static from(e,t){let n=new M(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){w(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return function(e){let t=w(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(n+e,n+t)}}function C(e){switch(e){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: ${e}`}}},97146(e,t,n){n.d(t,{Dg:()=>o,lC:()=>l,my:()=>s,tM:()=>h,uW:()=>i});var r=n(34275);function i(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let n=!0,i=!0;return e.some((e,t)=>(n&&=0===e,i&&=e===t,!n&&!i)),n?function(e){if(1===e)return u;if(e<1024)return Array(e).fill(0);if(e>p.length){let t=Math.max(2*p.length,e);p=new Uint8Array(t)}return new Uint8Array(p.buffer,0,e)}(e.length):i?h(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function l(e,t,n){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let r=s(e.length+t.length,n);for(let t=0;t<e.length;++t)r[t]=e[t];for(let n=0;n<t.length;++n)r[e.length+n]=t[n];return r}let a=f(131072);const u=[0],c=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){return 1===e?u:e<1024?Array.from(new Uint16Array(c.buffer,0,e)):e<c.length?new Uint16Array(c.buffer,0,e):(e>a.length&&(a=f(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function f(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let p=new Uint8Array(65536)},16939(e,t,n){n.r(t),n.d(t,{default:()=>p});var r,i=n(32198),o=n(69540),s=n(25482),l=n(53966),a=n(91429),u=n(78888),c=n(19211),h=n(80882),f=n(31199);let p=r=class extends((0,o.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}get faces(){return this._get("faces")??null}set faces(e){this._set("faces",(0,f.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},l.A.getLogger(this)))}castMaterial(e){return e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?(0,u.PZ)(h.A,e):(0,u.PZ)(c.default,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i.Cg)([(0,a.MZ)({json:{write:f.B}})],p.prototype,"faces",null),(0,i.Cg)([(0,a.MZ)({type:c.default,json:{write:!0}})],p.prototype,"material",void 0),(0,i.Cg)([(0,a.wg)("material")],p.prototype,"castMaterial",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"shading",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"trustSourceNormals",void 0),p=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshComponent")],p)},95696(e,t,n){n.d(t,{A:()=>u});var r,i=n(32198),o=n(69540),s=n(25482),l=n(91429),a=n(93223);let u=class extends((0,o.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,a.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,l.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(69540),o=n(25482),s=n(91429),l=n(51850),a=n(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="local",this.origin=(0,l.vt)()}};(0,r.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211(e,t,n){n.r(t),n.d(t,{default:()=>h});var r=n(32198),i=n(68197),o=n(69540),s=n(25482),l=n(91429),a=n(35063),u=n(51147),c=n(66895);let h=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:a.default.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:a.default.from(e))}clone(e){let t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;let r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null==this.color?0:16,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null==this.colorTextureTransform?0:20,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null==this.normalTextureTransform?0:20,e}};(0,r.Cg)([(0,l.MZ)({type:i.A,json:{write:!0}})],h.prototype,"color",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],h.prototype,"colorTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],h.prototype,"normalTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshMaterial")],h)},80882(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(68197),o=n(91429),s=n(19211),l=n(35063),a=n(51147);let u=class extends s.default{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0,this.unlit=!1}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:l.default.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:l.default.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:l.default.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null==this.emissiveColor?0:16,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null==this.emissiveTextureTransform?0:20,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null==this.occlusionTextureTransform?0:20,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null==this.metallicRoughnessTextureTransform?0:20,e}};(0,r.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,nonNullable:!0,json:{write:!0}})],u.prototype,"unlit",void 0),u=(0,r.Cg)([(0,o.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},35063(e,t,n){n.r(t),n.d(t,{default:()=>y});var r,i=n(32198),o=n(69540),s=n(21287),l=n(25482),a=n(91429),u=n(78888),c=n(66895),h=n(97159),f=n(43937),p=n(36005);const g=new WeakMap;let d=0,y=class extends((0,o.OU)(l.o)){static{r=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){e instanceof HTMLImageElement?t[n]={type:"image-element",src:(0,h.t)(e.src,r),crossOrigin:e.crossOrigin}:e instanceof HTMLCanvasElement?t[n]={type:"canvas-element",imageData:m(e.getContext("2d").getImageData(0,0,e.width,e.height))}:e instanceof HTMLVideoElement?t[n]={type:"video-element",src:(0,h.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload}:e instanceof ImageData&&(t[n]={type:"image-data",imageData:m(e)})}readData(e){switch(e.type){case"image-element":{let t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{let t=x(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return x(e.imageData);case"video-element":{let t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){let{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!!(t&&n(t)||e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){let e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null==this.url?null==this.data?t():this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++d),t(g.get(this.data))):t(this.url)}get memoryUsage(){let e=0;if(e+=null==this.url?0:this.url.length,null!=this.data){let t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){let t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;let r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function m(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){let t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,i.Cg)([(0,a.MZ)({type:String,json:{write:h.w}})],y.prototype,"url",null),(0,i.Cg)([(0,a.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],y.prototype,"data",null),(0,i.Cg)([(0,f.K)("data")],y.prototype,"writeData",null),(0,i.Cg)([(0,p.w)("data")],y.prototype,"readData",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"contentHash",null),y=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTexture")],y)},51147(e,t,n){n.d(t,{A:()=>l});var r=n(32198),i=n(69540),o=n(25482),s=n(91429);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],l)},1193(e,t,n){n.r(t),n.d(t,{default:()=>h});var r,i=n(32198),o=n(69540),s=n(25482),l=n(4718),a=n(53966),u=n(91429),c=n(31199);let h=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array,this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clonePositional(){let e={position:(0,l.o8)(this.position),normal:(0,l.o8)(this.normal),tangent:(0,l.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"color",void 0),(0,i.Cg)([(0,u.wg)("color")],h.prototype,"castColor",null),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],h.prototype,"position",void 0),(0,i.Cg)([(0,u.wg)("position")],h.prototype,"castPosition",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"uv",void 0),(0,i.Cg)([(0,u.wg)("uv")],h.prototype,"castUv",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"normal",void 0),(0,i.Cg)([(0,u.wg)("normal")],h.prototype,"castNormal",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"tangent",void 0),(0,i.Cg)([(0,u.wg)("tangent")],h.prototype,"castTangent",null),h=r=(0,i.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],h)},31199(e,t,n){function r(e,t,n,r){let{loggerTag:i,stride:o}=t;return e.length%o===0?e:(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([]))}function i(e,t,n,i,o){if(!e)return e;if(e instanceof t)return r(e,i,t,o);for(let s of n)if(e instanceof s)return r(new t(e),i,t,o);if(Array.isArray(e))return r(new t(e),i,t,o);{let r=n.map(e=>`'${e.name}'`);return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function o(e,t,n){t[n]=function(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>o,b:()=>i})},40118(e,t,n){n.d(t,{H5:()=>h,wh:()=>u,createWithExternalSource:()=>c});var r=n(49186),i=(n(17676),n(83300)),o=(n(16939),n(95696),n(73836)),s=(n(1193),n(27615));n(53966),n(35522),n(51850),n(66895),n(72258);var l=n(29461),a=n(15070);function u(e,t){return new i.default((0,a.UG)((0,a.Dk)(t?.densificationFactor||0),e,t))}function c(e,t,n){let r=n?.extent??null,{spatialReference:a}=e,u=n?.transform?.clone()??new o.A,c=(0,s.TE)(e,n),h={source:t,extent:r,unitConversionDisabled:n?.unitConversionDisabled},f=new l.O;return f.externalSources.push(h),new i.default({metadata:f,transform:u,vertexSpace:c,spatialReference:a})}function h(e,t){let{spatialReference:n}=e,l=t?.transform?.clone()??new o.A,a=(0,s.TE)(e,t),u=new i.default({transform:l,vertexSpace:a,spatialReference:n});return u.addResolvingPromise(Promise.reject(new r.A("mesh-incomplete","Mesh resources are not complete"))),u}n(41618)},63579(e,t,n){n.d(t,{Bq:()=>a,Qp:()=>l,WN:()=>y,dK:()=>m,eN:()=>p,fH:()=>d,in:()=>g,yr:()=>u});var r=n(56507),i=n(4576),o=n(17676),s=n(20557);class l{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,o.Te)(e),new Blob(n)}}class a{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,o.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(f):f(e.files);case"service":return e.assets.some(f);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){let{type:t,name:n}=e;return c.test(t)||h.test(n)}return c.test(e.assetMimeType)||h.test(e.assetName)}function p(e,t){if(!e)return!1;let{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;let{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...n.assets].sort(e),i=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function d(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function y(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function m(e){return!!e.original}},29461(e,t,n){n.d(t,{O:()=>u});var r=n(32198),i=n(69540),o=n(7762),s=n(36708),l=n(91429),a=n(63579);let u=class extends i.Pw{constructor(e){super(e),this.externalSources=new o.A,this._explicitDisplaySource=null,this.addHandles((0,s.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,a.yr)(e))throw Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,a.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,a.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(a.yr)}};(0,r.Cg)([(0,l.MZ)()],u.prototype,"externalSources",void 0),(0,r.Cg)([(0,l.MZ)()],u.prototype,"displaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_explicitDisplaySource",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.meshUtils.Metadata")],u)},66895(e,t,n){n.d(t,{$N:()=>c,Lz:()=>o,QN:()=>h,WO:()=>a,hz:()=>l,o2:()=>i});const r=Symbol("meshContext");function i(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function o(e,t){let n=i(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function l(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function a(e){if(l(e)?.materialMap)return e;let t={materialMap:new Map};return{...e,[s]:t}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function h(e){if(c(e)?.textureMap)return e;let t={textureMap:new Map};return{...e,[u]:t}}},15070(e,t,n){n.d(t,{Dk:()=>f,H8:()=>c,UG:()=>m,Uh:()=>d,ai:()=>p,bQ:()=>h,uF:()=>g});var r=n(29242),i=n(35522),o=n(51850),s=n(16939),l=n(1193),a=n(27615),u=n(72258);function c(){let{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=x,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array(2*e.length*3),a=0,u=0,c=0,h=0;for(let r=0;r<e.length;r++){let f=e[r],p=a/3;for(let e of t)l[h++]=p+e;let g=f.corners;for(let e=0;e<4;e++){let t=g[e],r=0;s[c++]=.25*n[e][0]+f.uvOrigin[0],s[c++]=f.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0===f.axis[e]?(i[a++]=.5*t[r++],o[u++]=0):(i[a++]=.5*f.axis[e],o[u++]=f.axis[e])}}return{position:i,normal:o,uv:s,faces:l}}function h(e,t){let n=e.components[0],r=n.faces,i=v[t],o=6*i,l=[,,,,,,],a=Array(r.length-6),u=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?l[u++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){let t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s.default({faces:l,material:n.material}),new s.default({faces:a})],e}function f(e=0){let t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array((t-1)*n*2*3),a=0,u=0,c=0,h=0;for(let e=0;e<=t;e++){let r=e/t*Math.PI+.5*Math.PI,f=Math.cos(r);w[2]=Math.sin(r);let p=0===e||e===t,g=p?n-1:n;for(let r=0;r<=g;r++){let d=r/g*2*Math.PI;w[0]=-Math.sin(d)*f,w[1]=Math.cos(d)*f;for(let e=0;e<3;e++)i[a]=.5*w[e],o[a]=w[e],++a;s[u++]=(r+(p?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(l[c++]=h,l[c++]=h+1,l[c++]=h-n),1!==e&&(l[c++]=h,l[c++]=h-n,l[c++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:l}}function p(e=0){let t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3),l=0,a=0,u=0,c=0,h=0;for(let e=0;e<=5;e++){let n=0===e||5===e,f=e<=1||e>=4,p=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){let y=d/g*2*Math.PI,m=n?0:.5;w[0]=m*Math.sin(y),w[1]=m*-Math.cos(y),w[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[l++]=w[t],i[a++]=f?2===t?e<=1?1:-1:0:2===t?0:w[t]/m;o[u++]=(d+(n?.5:0))/t,o[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,!p&&0!==e&&d!==t&&(5!==e&&(s[c++]=h,s[c++]=h+1,s[c++]=h-t),1!==e&&(s[c++]=h,s[c++]=h-t,s[c++]=h-t-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}function g(e,t){let n="number"==typeof t?t:null==t?1:t.width,r="number"==typeof t?t:null==t?1:t.height;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function d(e){let t=y.facingAxisOrderSwap[e],n=y.position,r=y.normal,i=new Float64Array(n.length),o=new Float32Array(r.length),s=0;for(let e=0;e<4;e++){let e=s;for(let l=0;l<3;l++){let a=t[l],u=Math.abs(a)-1,c=a>=0?1:-1;i[s]=n[e+u]*c,o[s]=r[e+u]*c,s++}}return{position:i,normal:o,uv:new Float32Array(y.uv),faces:new Uint32Array(y.faces),isPlane:!0}}const y={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function m(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){A[0]=t[0],A[4]=t[1],A[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)w[n]=e.position[t+n];(0,i.ei)(w,w,A);for(let n=0;n<3;n++)e.position[t+n]=w[n]}if(t[0]!==t[1]||t[1]!==t[2]){A[0]=1/t[0],A[4]=1/t[1],A[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)w[n]=e.normal[t+n];(0,i.ei)(w,w,A),(0,i.S8)(w,w);for(let n=0;n<3;n++)e.normal[t+n]=w[n]}}}}(e,function(e,t,n){let r=(0,u.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){let t=e*r;return[t,t,t]}return[null==e.width?r:e.width*r,null==e.depth?r:e.depth*r,null==e.height?r:e.height*r]}(n?.size,n?.unit,t.spatialReference));let r=(0,a.TE)(t,n),o=t.spatialReference.isGeographic?(0,a.TE)(t):r,c=(0,u.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new l.default({...c,uv:e.uv}),vertexSpace:r,components:[new s.default({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const x={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},v={south:0,east:1,north:2,west:3,up:4,down:5},w=(0,o.vt)(),A=(0,r.vt)()},27615(e,t,n){n.d(t,{CK:()=>a,Hq:()=>l,MW:()=>u,TE:()=>c,yJ:()=>h});var r=n(35522),i=n(86738),o=n(95696),s=n(18251);function l(e){return null!=e.origin}function a(e){return l(e.vertexSpace)}function u(e,t){if(!l(e))return null;let[n,r,o]=e.origin;return new i.A({x:n,y:r,z:o,spatialReference:t})}function c(e,t){let{x:n,y:r,z:i,spatialReference:l}=e,a=[n,r,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(l))?new s.A({origin:a}):new o.A({origin:a})}function h(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.t2)(e.origin,t.origin))}},41618(e,t,n){n.d(t,{uM:()=>P});var r=n(17676),i=(n(9762),n(4197)),o=(n(58083),n(9093)),s=n(51850);n(48353),(0,o.vt)(),new class{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}},(0,s.vt)(),n(44208),n(53966);var l=n(62788),a=n(95488),u=n(83349),c=n(15585),h=n(95108),f=n(97146),p=n(34727),g=n(86211),d=n(35522),y=n(27921);function m(e,t,n){let r=function(e,t,n,r){let i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=(0,g.GA)(r)/(0,g.G9)(r);return(0,y.lU)(e,(e,t)=>(0,d.hZ)(e,i(t,0)*o,i(t,1)*o,i(t,2)),n)}(x,e,t,n)?(0,y.Qj)(x):[0,0,1];return Math.abs(r[2])>Math.cos((0,p.kU)(80))?2:+(Math.abs(r[1])>Math.abs(r[0]))}const x=(0,y.vt)(),v="auto",w=void 0,A=void 0,b=void 0;function M(e,t,n){if(!t)return 2;let r=null;for(let i of e){let e=Z(i,t),o=e<3?2:m(i,e,n);if(r??=o,o!==r)return 2}return r??2}function C(e,t,n){if(!t)return!(0,h.$3)(e);if(e.length<3)return!1;switch(n){case 0:return!(0,h.$3)(e,1,2);case 1:return!(0,h.$3)(e,0,2);case 2:return!(0,h.$3)(e,0,1)}}const T=new a.I;let R=new WeakSet;function S(e,t){if(!(0,c.O9)())return _("libtess-not-loaded");let n=null!=t.outlines,{positions:r,mergedPathLengths:o}=function(e){let t=function(e){let t=e.reduce((e,t)=>e+t.pathLengths.length,0),n=Array(t),r=0;for(let t=0;t<e.length;t++){let i=e[t].pathLengths;for(let e=0;e<i.length;e++)n[r++]=i[e]}return n}(e.polygons),n=3*e.polygonVertexCount;return n===e.positions.length?{positions:e.positions,mergedPathLengths:t}:{positions:(0,i.l5)(e.positions,0,n),mergedPathLengths:t}}(e),s=performance.now(),{vertices:l,indices:a,outlineIndices:u,outlineRingLengths:h}=(0,c.O5)(r,o,3,n),p=performance.now()-s;if(null!=t.owner&&p>250&&R.add(t.owner),l.length%3!=0)return _("positions-not-multiple-of-3");let{positions:g,outlineIndexBuffer:d,mergedOutlineRingLengths:y}=n?function(e,t,n,r,o){let s=e.polygonVertexCount,l=n.length/3,a=(t??[]).values().filter(e=>e.index>=s).map(e=>({index:l+e.index-s,count:e.count})).toArray();if(0===a.length)return{positions:n,outlineIndexBuffer:r,mergedOutlineRingLengths:o};let u=3*s,c=(0,i.l5)(e.positions,u,e.positions.length-u),h=(0,i.yH)(n,c),{outlineIndexBuffer:p,outlineRingLengths:g}=L(a,h);return{positions:h,outlineIndexBuffer:(0,f.lC)(r,p,h.length/3),mergedOutlineRingLengths:(0,f.lC)(o,g,o.length+g.length)}}(e,t.outlines,l,u,h):{positions:l,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:g,indices:a,outlineIndexBuffer:d,outlineRingLengths:y,vertexCount:g.length/3,method:"libtess"}}function E(e,t,n){for(let r=0;r<e.length;r+=3){let i=e[r+t];e[r+t]=e[r+n],e[r+n]=i}}function L(e,t){let n=(0,f.my)(e.length),r=0;for(let i=0;i<e.length;i++){let o=e[i],s=o.count;if(s<=0){n[i]=0;continue}let l=3*o.index,a=3*(o.index+s-1),u=s>1&&t[l]===t[a]&&t[l+1]===t[a+1]&&t[l+2]===t[a+2]?s-1:s,c=u>0?u+1:0;n[i]=c,r+=c}let i=(0,f.my)(r,t.length/3),o=0;for(let t=0;t<e.length;t++){let r=n[t];if(0===r)continue;let s=e[t].index,l=r-1;for(let e=0;e<l;e++)i[o++]=s+e;i[o++]=s}return{outlineIndexBuffer:i,outlineRingLengths:n}}function U(e,{index:t,count:n}){let r=3*t,o=3*n;return(0,i.l5)(e,r,o)}function I(e,t,n,r,i,o){let s=o?e.length-1:0,l=o?-1:1;n*=3;for(let o=0;o<r;++o){let r=e[s];t[n++]=r[0],t[n++]=r[1],t[n++]=i&&null!=r[2]?r[2]:0,s+=l}return n/3}function Z(e,t){return function(e,t){let n=e.length;if(n<2)return!1;let r=e[0],i=e[n-1];return r[0]===i[0]&&r[1]===i[1]&&(!t||r[2]===i[2])}(e,t)?e.length-1:e.length}function _(e){return{succeeded:!1,message:e}}class N{constructor(e,t,n,r){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=r,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}get outlineSegmentCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}}class O extends N{}function P(e,t){let{projectIfNearlyVertical:n=!1,outlineOutput:o="none",method:s,owner:a}=t??{},h="tessellated-indices"===o,p=M(e.rings,!!e.hasZ,e.spatialReference),g=function(e,t){let{hasZ:n,ccwRingsAsHoles:r,spatialReference:o}=t,s=t.axis??M(e,n,o),l=e.length,a=[],u=[],c=[],h=[],f=e.reduce((e,t)=>e+t.length,0),p=0,g=(0,i.jh)(3*f),d=0,y=r&&e[0]&&C(e[0],n,s);for(let t=l-1;t>=0;t--){let i=e[t],o=Z(i,n);if(o<3){o>1&&h.push(i);continue}let l=!!r&&C(i,n,s);if(y?!l:l)a[p++]=i;else{let e=i.length;for(let t=0;t<p;++t)e+=a[t].length;let t={index:d,pathLengths:Array(p+1),count:e,holeIndices:Array(p)};t.pathLengths[0]=i.length,i.length>0&&c.push({index:d,count:i.length}),d=I(i,g,d,i.length,n,y);for(let e=0;e<p;++e){let r=a[e];t.holeIndices[e]=d,t.pathLengths[e+1]=r.length,r.length>0&&c.push({index:d,count:r.length}),d=I(r,g,d,r.length,n,y)}p=0,t.count>0&&u.push(t)}}let m=d;for(let e of h)c.push({index:d,count:e.length}),d=I(e,g,d,e.length,n,y);return{positions:3*d===g.length?g:(0,i.l5)(g,0,3*d),polygonVertexCount:m,polygons:u,outlines:c}}(e.rings,{hasZ:!!e.hasZ,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:p}),d=function(e,t){let n=function(e,t){let n={method:t?.method??v,projectionAxis:t?.projectionAxis??w,outlines:t?.outlines??A,owner:t?.owner??b},{projectionAxis:r}=n,i=null!=r&&2!==r;i&&E(e.positions,r,2);let o=function(e,t){if("libtess"===t.method)return S(e,t);let n=function(e,t){let n=null!=t.owner&&R.has(t.owner);return"auto"===t.method&&!(n&&e.polygonVertexCount>=1e4)}(e,t),r=[],i=0;for(let o of e.polygons){let s=U(e.positions,o),l=(o.holeIndices??[]).map(e=>e-o.index),a=l.length>0?l:null,c=(0,u.e)(s,a,3),h=u.e.deviation(s,l,3,c);if(n&&h>1e-5)return S(e,t);for(let e=0;e<c.length;e++)r.push(c[e]+o.index);i=Math.max(i,h)}let{outlineIndexBuffer:o,outlineRingLengths:s}=null==t.outlines?{outlineIndexBuffer:void 0,outlineRingLengths:void 0}:L(t.outlines,e.positions);return{succeeded:!0,positions:e.positions,indices:(0,f.uW)(r),outlineIndexBuffer:o,outlineRingLengths:s,vertexCount:e.positions.length/3,method:"earcut",deviation:i}}(e,n);if(i){let t=o.succeeded?o.positions:null;null!=t&&t!==e.positions&&E(t,2,r),E(e.positions,2,r)}return o}(e,t);return n.succeeded||"libtess-not-loaded"!==n.message?n:((0,l.gc)(T),async function(){try{await(0,c.l3)(),T.notify()}catch(e){throw e}}())}(g,{projectionAxis:n?p:void 0,outlines:h?g.outlines:void 0,method:s,owner:a});if((0,r.$X)(d))return d;if(!d.succeeded)return null;let y={output:"none"};if("vertex-data"===o){let e=d.positions===g.positions?g.positions.slice():g.positions;y={output:"vertex-data",outlines:j(g.outlines,e)}}else"tessellated-indices"===o&&(y=function(e){let{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};let r=Array(n.length),i=0;for(let e=0;e<n.length;e++){let o=n[e],s=t.slice(i,i+o);r[e]=s,i+=o}return{output:"tessellated-indices",outlineIndices:r}}(d));return new O(d.positions,d.indices,y,!0)}function j(e,t,n=null){return e.values().filter(({count:e})=>e>1).map(({index:e,count:r})=>{let o=3*e,s=3*r;return null==n?new B(e,r,(0,i.l5)(t,o,s)):new z(e,r,(0,i.l5)(t,o,s),(0,i.l5)(n,o,s))}).toArray()}function F(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class B{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class z extends B{constructor(e,t,n,r){super(e,t,n),this.mapPositions=r}}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[118],{83349(e,t,n){n.d(t,{e:()=>o});const r=new Set;let i=!1;function o(e,t,n=2){let i=t&&t.length,o=i?t[0]*n:e.length;r.size&&r.clear();let l=s(e,0,o,n,!0),u=[];if(!l||l.next===l.prev)return u;let c=0,h=0,f=0;if(i&&(l=g(e,t,l,n)),e.length>80*n){c=e[0],h=e[1];let t=c,r=h;for(let i=n;i<o;i+=n){let n=e[i],o=e[i+1];n<c&&(c=n),o<h&&(h=o),n>t&&(t=n),o>r&&(r=o)}f=Math.max(t-c,r-h),f=0===f?0:32767/f}return a(l,u,c,h,f),u}function s(e,t,n,r,i){let o=null;if(i===k(e,t,n,r)>0)for(let i=t;i<n;i+=r)o=D(i/r|0,e[i],e[i+1],o);else for(let i=n-r;i>=t;i-=r)o=D(i/r|0,e[i],e[i+1],o);return o&&P(o,o.next)&&($(o),o=o.next),o}function l(e,t=e){let n,o=t===e,s=e;do{n=!1,s===s.next||0!==r.size&&r.has(s)||!P(s,s.next)&&0!==O(s.prev,s,s.next)?(o||s!==t)&&(s=s.next,n=!o):((o||s===t)&&(t=s.prev),i=!0,$(s),s=s.prev,n=!0)}while(n||s!==t);return t}function a(e,t,n,r,o){o&&function(e,t,n,r){let i=e,o=0;do{i.z=I(i.x,i.y,t,n,r),T[o++]=i,i=i.next}while(i!==e);!function(e){if(e<=32)for(let t=1;t<e;t++){let e=T[t],n=e.z,r=t-1;for(;r>=0&&T[r].z>n;)T[r+1]=T[r],r--;T[r+1]=e}else{S.length<e&&(S=new Uint32Array(e),E=new Uint32Array(e),R=Array(e));for(let t=0;t<e;t++)S[t]=T[t].z;U(e,T,S,R,E,0),U(e,R,E,T,S,8),U(e,T,S,R,E,16),U(e,R,E,T,S,24)}}(o);let s=null;for(let e=0;e<o;e++){let t=T[e];t.prevZ=s,s&&(s.nextZ=t),s=t}s.nextZ=null,T.fill(null,0,o),R.fill(null,0,o)}(e,n,r,o);let s=e,a=!1;for(;e.prev!==e.next;){let p=e.prev,g=e.next;if(O(p,e,g)<0&&(o?c(e,n,r,o):u(e)))t.push(p.i,e.i,g.i),$(e),e=g,s=g;else if((e=g)===s){if(i=!1,e=l(e),i){s=e;continue}if(!a){s=e=h(e,t),a=!0;continue}f(e,t,n,r,o);break}}}function u(e){let t=e.prev,n=e,r=e.next,i=t.x,o=n.x,s=r.x,l=t.y,a=n.y,u=r.y,c=Math.min(i,o,s),h=Math.min(l,a,u),f=Math.max(i,o,s),p=Math.max(l,a,u),g=r.next;for(;g!==t;){if(g.x>=c&&g.x<=f&&g.y>=h&&g.y<=p&&(i!==g.x||l!==g.y)&&_(i,l,o,a,s,u,g.x,g.y)&&O(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function c(e,t,n,r){let i=e.prev,o=e,s=e.next,l=i.x,a=o.x,u=s.x,c=i.y,h=o.y,f=s.y,p=Math.min(l,a,u),g=Math.min(c,h,f),d=Math.max(l,a,u),y=Math.max(c,h,f),m=I(p,g,t,n,r),x=I(d,y,t,n,r),v=e.prevZ;for(;v&&v.z>=m;){if(v.x>=p&&v.x<=d&&v.y>=g&&v.y<=y&&v!==s&&(l!==v.x||c!==v.y)&&_(l,c,a,h,u,f,v.x,v.y)&&O(v.prev,v,v.next)>=0)return!1;v=v.prevZ}let w=e.nextZ;for(;w&&w.z<=x;){if(w.x>=p&&w.x<=d&&w.y>=g&&w.y<=y&&w!==s&&(l!==w.x||c!==w.y)&&_(l,c,a,h,u,f,w.x,w.y)&&O(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function h(e,t){let n=e,r=!1;do{let i=n.prev,o=n.next.next;j(i,n,n.next,o,!1)&&B(i,o)&&B(o,i)&&(t.push(i.i,n.i,o.i),$(n),$(n.next),n=e=o,r=!0),n=n.next}while(n!==e);return r?l(n):n}function f(e,t,n,r,i){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&N(o,e)){let s=z(o,e);return o=l(o,o.next),s=l(s,s.next),a(o,t,n,r,i),void a(s,t,n,r,i)}e=e.next}o=o.next}while(o!==e)}let p=!1;function g(e,t,n,i){let o=[];for(let n=0,l=t.length;n<l;n++){let a=s(e,t[n]*i,n<l-1?t[n+1]*i:e.length,i,!1);a===a.next&&r.add(a),o.push(Z(a))}o.sort(d),function(e,t){let n=Math.ceil((e+2*t)/16)+t+2;m.length<4*n&&(m=new Float64Array(4*n)),x=0}(e.length/i,t.length),A(n,n),p=!0;for(let e=0;e<o.length;e++)n=y(o[e],n);return p=!1,l(n)}function d(e,t){return e.x-t.x||e.y-t.y||(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)}function y(e,t){let n=function(e,t){let n,r=t,i=e.x,o=e.y,s=-1/0;if(P(e,r))return r;for(let t=0,l=0;t<x;t++,l+=4){if(o<m[l+1]||o>m[l+3]||m[l]>i||m[l+2]<=s)continue;let a=b(t);r=M(t);do{if(r.prev.next===r){if(P(e,r.next))return r.next;if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){let e=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>s&&(s=e,n=r.x<r.next.x?r:r.next,e===i))return n}}r=r.next}while(r!==a)}if(!n)return null;let l=n.x,a=n.y,u=Math.min(o,a),c=Math.max(o,a),h=1/0;for(let t=0,f=0;t<x;t++,f+=4){if(m[f+2]<l||m[f]>i||m[f+3]<u||m[f+1]>c)continue;let p=b(t);r=M(t);do{if(r.prev.next===r&&i>=r.x&&r.x>=l&&i!==r.x&&_(o<a?i:s,o,l,a,o<a?s:i,o,r.x,r.y)){let t=Math.abs(o-r.y)/(i-r.x);(B(r,e)||r.y===o&&r.next.y===o&&r.next.x>i)&&(t<h||t===h&&(r.x>n.x||r.x===n.x&&C(n,r)))&&(n=r,h=t)}r=r.next}while(r!==p)}return n}(e,t);if(!n)return t;let r=z(n,e);return A(n,r.next.next),l(r,r.next),l(n,n.next)}let m=new Float64Array,x=0;const v=[],w=[];function A(e,t){let n=e;do{let e=x++;v[e]=n;let r=1/0,i=1/0,o=-1/0,s=-1/0,l=0;do{let t=n.next;n.z=e,n.x<r&&(r=n.x),n.x>o&&(o=n.x),n.y<i&&(i=n.y),n.y>s&&(s=n.y),t.x<r&&(r=t.x),t.x>o&&(o=t.x),t.y<i&&(i=t.y),t.y>s&&(s=t.y),n=t}while(++l<16&&n!==t);w[e]=n;let a=4*e;m[a]=r,m[a+1]=i,m[a+2]=o,m[a+3]=s}while(n!==t)}function b(e){let t=w[e];for(;t.prev.next!==t;)t=t.next;return w[e]=t,t}function M(e){let t=v[e];for(;t.prev.next!==t;)t=t.next;return v[e]=t,t}function C(e,t){return O(e.prev,e,t.prev)<0&&O(t.next,e,e.next)<0}const T=[];let R=[],S=new Uint32Array,E=new Uint32Array;const L=new Uint32Array(256);function U(e,t,n,r,i,o){L.fill(0);for(let t=0;t<e;t++)L[n[t]>>>o&255]++;let s=0;for(let e=0;e<256;e++){let t=L[e];L[e]=s,s+=t}for(let s=0;s<e;s++){let e=n[s],l=L[e>>>o&255]++;r[l]=t[s],i[l]=e}}function I(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function Z(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function _(e,t,n,r,i,o,s,l){return(i-s)*(t-l)>=(e-s)*(o-l)&&(e-s)*(r-l)>=(n-s)*(t-l)&&(n-s)*(o-l)>=(i-s)*(r-l)}function N(e,t){let n=P(e,t)&&O(e.prev,e,e.next)>0&&O(t.prev,t,t.next)>0;return e.next.i!==t.i&&(n||B(e,t)&&B(t,e)&&(0!==O(e.prev,e,t.prev)||0!==O(e,t.prev,t)))&&!function(e,t){let n=Math.min(e.x,t.x),r=Math.max(e.x,t.x),i=Math.min(e.y,t.y),o=Math.max(e.y,t.y),s=e;do{let l=s.next;if(s.x>r&&l.x>r||s.x<n&&l.x<n||s.y>o&&l.y>o||s.y<i&&l.y<i)s=l;else{if(s.i!==e.i&&l.i!==e.i&&s.i!==t.i&&l.i!==t.i&&j(s,l,e,t))return!0;s=l}}while(s!==e);return!1}(e,t)&&(n||function(e,t){let n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{let e=n.next;n.y>o!=e.y>o&&i<(e.x-n.x)*(o-n.y)/(e.y-n.y)+n.x&&(r=!r),n=e}while(n!==e);return r}(e,t))}function O(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function P(e,t){return e.x===t.x&&e.y===t.y}function j(e,t,n,r,i=!0){let o=O(e,t,n),s=O(e,t,r),l=O(n,r,e),a=O(n,r,t);return(o>0&&s<0||o<0&&s>0)&&(l>0&&a<0||l<0&&a>0)||!!i&&!!(0===o&&F(e,n,t)||0===s&&F(e,r,t)||0===l&&F(n,e,r)||0===a&&F(n,t,r))}function F(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function B(e,t){return O(e.prev,e,e.next)<0?O(e,t,e.next)>=0&&O(e,e.prev,t)>=0:O(e,t,e.prev)<0||O(e,e.next,t)<0}function z(e,t){let n=H(e.i,e.x,e.y),r=H(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function D(e,t,n,r){let i=H(e,t,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 $(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ),p&&function(e,t){let n=4*e.z;t.x<m[n]&&(m[n]=t.x),t.y<m[n+1]&&(m[n+1]=t.y),t.x>m[n+2]&&(m[n+2]=t.x),t.y>m[n+3]&&(m[n+3]=t.y)}(e.prev,e.next)}function H(e,t,n){return{i:e,x:t,y:n,prev:null,next:null,z:0,prevZ:null,nextZ:null}}function k(e,t,n,r){let i=0;for(let o=t,s=n-r;o<n;o+=r)i+=(e[s]-e[o])*(e[o+1]+e[s+1]),s=o;return i}let G,V,Y,K,W,q=0,J=0;function Q(e,t,n,r,i,o){return(n-e)*(o-t)-(r-t)*(i-e)}function X(e,t,n,r,i,o,s,l){let a=e-s,u=t-l,c=n-s,h=r-l,f=i-s,p=o-l,g=a*a+u*u,d=c*c+h*h,y=f*f+p*p,m=g+d+y;return a*(h*y-d*p)-u*(c*y-d*f)+g*(c*p-h*f)<=1e-13*m*m}function ee(e){return e-e%3+(e+1)%3}o.deviation=function(e,t,n,r){let i=t&&t.length,o=i?t[0]*n:e.length,s=Math.abs(k(e,0,o,n));if(i)for(let r=0,i=t.length;r<i;r++){let o=t[r]*n,l=r<i-1?t[r+1]*n:e.length;s-=Math.abs(k(e,o,l,n))}let l=0;for(let t=0;t<r.length;t+=3){let i=r[t]*n,o=r[t+1]*n,s=r[t+2]*n;l+=Math.abs((e[i]-e[s])*(e[o+1]-e[i+1])-(e[i]-e[o])*(e[s+1]-e[i+1]))}return 0===s&&0===l?0:Math.abs((l-s)/s)},o.flatten=function(e){let t=[],n=[],r=e[0][0].length,i=0,o=0;for(let s of e){for(let e of s)for(let n=0;n<r;n++)t.push(e[n]);o&&(i+=o,n.push(i)),o=s.length}return{vertices:t,holes:n,dimensions:r}},o.refine=function(e,t,n=2){let r=e,i=r.length;if(i<6)return;(function(e){(!G||G.length<e)&&(G=new Int32Array(e)),(!V||V.length<e)&&(V=new Int32Array(e)),(!W||W.length<e)&&(W=new Uint8Array(e));let t=1;for(;t<4*e;)t<<=1;(!Y||Y.length<t)&&(Y=new Int32Array(t),K=new Uint32Array(t)),q=t-1})(i),J++,V.fill(-1,0,i);let o=0;for(let e=0;e<i;e++){let t=r[e],n=r[ee(e)],i=t<n?t:n,s=t<n?n:t,l=(Math.imul(i,2654435761)^Math.imul(s,2246822507))&q;for(;K[l]===J;){let t=Y[l];if(-1!==t){let n=r[t],a=r[ee(t)];if(n===i&&a===s||n===s&&a===i){V[e]=t,V[t]=e,Y[l]=-1,W[t]=1,G[o++]=t;break}}l=l+1&q}K[l]!==J&&(Y[l]=e,K[l]=J)}for(;o>0;){let e=G[--o];W[e]=0;let i=V[e];if(-1===i)continue;let s=e-e%3,l=i-i%3,a=s+(e+2)%3,u=s+(e+1)%3,c=l+(i+2)%3,h=l+(i+1)%3,f=r[a],p=r[e],g=r[u],d=r[c],y=t[f*n],m=t[f*n+1],x=t[p*n],v=t[p*n+1],w=t[g*n],A=t[g*n+1],b=t[d*n],M=t[d*n+1];if(!X(y,m,x,v,w,A,b,M)&&Q(y,m,x,v,b,M)>0&&Q(y,m,b,M,w,A)>0){r[e]=d,r[i]=f;let t=V[c],n=V[a];V[e]=t,-1!==t&&(V[t]=e),V[i]=n,-1!==n&&(V[n]=i),V[a]=c,V[c]=a,-1!==t&&0===W[e]&&(W[e]=1,G[o++]=e),-1!==n&&0===W[i]&&(W[i]=1,G[o++]=i),-1!==V[u]&&0===W[u]&&(W[u]=1,G[o++]=u),-1!==V[h]&&0===W[h]&&(W[h]=1,G[o++]=h)}}}},21287(e,t,n){n.d(t,{M5:()=>h,eV:()=>c});var r=n(56507),i=n(49186),o=n(17676),s=n(84952),l=n(26306);let a=null,u=!0;function c(e,t,n,r){if(!t||!n)throw Error("Cannot construct image data without dimensions");if(u)try{return new ImageData(e,t,n)}catch{u=!1}let i=function(e,t,n){return n||=(a||(a=document.createElement("canvas"),a.width=1,a.height=1),a),n.getContext("2d").createImageData(e,t)}(t,n,r);return i.data.set(e,0),i}async function h(e,t){let{arrayBuffer:a,mediaType:u}=await async function(e,t){let n=(0,s.r$)(e);if(n?.isBase64)return{arrayBuffer:(0,l.M)(n.data),mediaType:n.mediaType};let i=await(0,r.A)(e,{responseType:"array-buffer",...t});return{arrayBuffer:i.data,mediaType:i.getHeader?.("Content-Type")??""}}(e,t),c="image/png"===u;if("image/gif"===u){let{isAnimatedGIF:e,parseGif:r}=await n.e(820).then(()=>n(10820));if(e(a))return r(a,t)}if(c){let{isAnimatedPNG:e,parseApng:r}=await n.e(2390).then(()=>n(22390));if(e(a))return r(a,t)}return async function(e,t){let n=window.URL.createObjectURL(e);try{let{data:e}=await(0,r.A)(n,{...t,responseType:"image"});return e}catch(e){throw(0,o.zf)(e)?e:new i.A("invalid-image",`Could not fetch requested image at ${n}`)}finally{window.URL.revokeObjectURL(n)}}(new Blob([a],{type:u}),t)}},83300(e,t,n){n.r(t),n.d(t,{default:()=>Ee});var r=n(32198),i=n(69540),o=n(92474),s=n(53966),l=n(61893),a=n(17676),u=n(36708),c=n(91429),h=n(51850),f=n(91075),p=n(86738),g=n(39829),d=n(70328),y=n(24770),m=n(16939),x=n(49186);const v="Expected location to be a Point instance";class w extends x.A{constructor(){super("invalid-input:location",v)}}var A=n(95696),b=n(18251),M=n(73836),C=n(1193),T=n(27615),R=n(35522),S=n(65806);function E(e,t){switch(e.type){case"georeferenced":return t.isGeographic;case"local":return t.isGeographic||t.isWebMercator}}var L=n(22141),U=n(72258);const I=()=>s.A.getLogger("esri.geometry.support.meshUtils.centerAt");const Z=(0,h.vt)(),_=(0,h.vt)(),N=(0,h.vt)();var O=n(9093),P=n(5443),j=n(99917),F=n(98764),B=n(48353),z=n(9762),D=n(4197),$=n(73354);const H=(0,O.vt)(),k=(0,D.jh)(24);var G=n(84952);function V(e){let t=(0,G.nM)(e.url);return n=>{let r=(0,G.V1)(n,t,t),i=r?r.replace(/^ *\.\//,""):null;return(i?e.files.get(i):null)??n}}function Y(e){return ee.fromBlob(e,te(e.name,e.type))}const K=/^model\/gltf\+json$/,W=/^model\/gltf-binary$/,q=/\.gltf$/i,J=/\.glb$/i;function Q({mimeType:e,source:t,name:n}){return K.test(e)||q.test(n)?{url:t.url,type:"gltf"}:W.test(e)||J.test(n)?{url:t.url,type:"glb"}:null}function X(e){let t=new Map,n=null,r=null;for(let i of e){let{source:e,name:o}=i;n??=Q(i),"ESRI3DO_NORM.glb"===o&&(r=Q(i)),t.set(o,e.url),e.files.forEach((e,n)=>t.set(n,e))}let i=r??n;if(null==i)throw new x.A("mesh-load-external:missing-files","Missing files to load external mesh source");return new ee(i.url,()=>e.forEach(({source:e})=>e.dispose()),t,i.type)}class ee{constructor(e,t=()=>{},n=new Map,r){this.url=e,this.dispose=t,this.files=n,this.type=r}static fromBlob(e,t){let n=URL.createObjectURL(e);return new ee(n,()=>URL.revokeObjectURL(n),void 0,t)}}function te(e,t){return K.test(t)||q.test(e)?"gltf":W.test(t)||q.test(e)?"glb":void 0}var ne=n(66895),re=n(29461),ie=n(15070),oe=n(77690),se=n(29242),le=n(58083),ae=n(67026),ue=n(82534);const ce=()=>s.A.getLogger("esri.geometry.support.meshUtils.rotate");function he(e,t,n,r=h.uY){if(null!=e){(0,le.$0)(de,(0,y.$I)(t),(0,y.yo)(t));for(let t=0;t<e.length;t+=n){for(let n=0;n<3;n++)fe[n]=e[t+n]-r[n];(0,R.Z0)(fe,fe,de);for(let n=0;n<3;n++)e[t+n]=fe[n]+r[n]}}}const fe=(0,h.vt)(),pe=(0,O.vt)(),ge=(0,y.vt)(),de=(0,O.vt)(),ye=(0,se.vt)(),me=(0,h.vt)(),xe=(0,ue.vt)(),ve=()=>s.A.getLogger("esri.geometry.support.meshUtils.scale");function we(e,t,n=h.uY){if(e)for(let r=0;r<e.length;r+=3){for(let t=0;t<3;t++)Ae[t]=e[r+t]-n[t];(0,R.hs)(Ae,Ae,t);for(let t=0;t<3;t++)e[r+t]=Ae[t]+n[t]}}const Ae=(0,h.vt)(),be=(0,h.vt)(),Me=(0,O.vt)(),Ce=(0,h.vt)();var Te,Re=n(41618);const Se={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.A,local:b.A}};let Ee=Te=class extends((0,i.OU)((0,o.WV)((0,l.g)(f.A)))){constructor(e){super(e),this.components=null,this.vertexSpace=new A.A,this.transform=null,this.metadata=new re.O,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new C.default,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when(()=>{this.addHandles((0,u.wB)(()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map(e=>e.clone())}),()=>this._clearSources(),{once:!0,sync:!0}))}).catch(()=>{})}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){let{spatialReference:e,vertexSpace:t}=this,n=this;return function(e){let{spatialReference:t,vertexSpace:n,untransformedBounds:r}=e,i=(0,d.gE)(r,k);if((0,T.Hq)(n)&&e.transform&&(0,$.t)(i,i,e.transform.localMatrix),"georeferenced"===n.type){let e=n.origin;return e&&(0,$.a)(i,i,e),(0,d.w1)((0,d.vY)(i),t)}let o=(0,F.lO)(t),s=n.origin;if(!(0,j.canProjectWithoutEngine)(o,t)){let[e,n,r]=s;return new P.A({xmin:e,ymin:n,zmin:r,xmax:e,ymax:n,zmax:r,spatialReference:t})}return(0,B.l)(t,s,H,o),(0,$.t)(i,i,H),(0,z.projectBuffer)(i,o,0,i,t,0),(0,d.w1)((0,d.vY)(i),t)}({get transform(){return n.transform},vertexSpace:t,spatialReference:e,untransformedBounds:this._untransformedBounds})}get _untransformedBounds(){let{vertexAttributes:{position:e},components:t}=this;return 0===e.length||0===t?.length?(0,d.vt)(d.v_):(0,d.vY)(e)}get origin(){let e=(0,T.MW)(this.vertexSpace,this.spatialReference);if(null!=e)return e;let{center:t,zmin:n}=this._transformedExtent;return new p.A({x:t.x,y:t.y,z:n,spatialReference:this.spatialReference})}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(e){this._checkIfLoaded("addComponent()")&&(this.components||=[],this.components.push(m.default.from(e)),this.notifyChange("components"))}removeComponent(e){if(this._checkIfLoaded("removeComponent()")){if(this.components){let t=this.components.indexOf(e);if(-1!==t)return this.components.splice(t,1),void this.notifyChange("components")}s.A.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}}rotate(e,t,n,r){return(0,y.AU)(e,t,n,Le),function(e,t,n){if(!e.vertexAttributes?.position||0===t[3])return;let{spatialReference:r,vertexSpace:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=fe;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ce(),n.spatialReference,o,L.JP);(0,ae.x8)(xe,(0,y.yo)(t),(0,y.$I)(t));let f=(0,le.O7)(pe,xe,h.uY,h.Un,c),{localMatrix:g}=i,d=(0,le.lw)(pe,f,g);i.scale=(0,le.X_)((0,h.vt)(),d),(0,le.hs)(d,d,(0,R.DI)(fe,i.scale));let m=i.rotationAxis;i.rotation=(0,y.ui)(d),0===i.rotationAngle&&(i.rotationAxis=m),i.translation=(0,le.sC)((0,h.vt)(),d)}(e,t,o):E(i,r)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=me;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ce(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ce(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),h=null==a?null:new Float32Array(a.length);(0,B.l)(i,o,de,i),(0,oe.z0)(ye,de);let f=ge;(0,R.ei)((0,y.yo)(ge),(0,y.yo)(t),ye),f[3]=t[3],!(0,L.gr)(s,r,u,i)||null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=h&&!(0,L.xA)(a,s,r,u,i,h)?(0,L.CN)(ce(),r,i):(he(u,f,3,o),!(0,L.$5)(u,i,s,r)||null!=l&&null!=c&&(he(c,f,3),!(0,L.si)(c,s,r,u,i,l))||null!=a&&null!=h&&(he(h,f,4),!(0,L.Mv)(h,s,r,u,i,a))?(0,L.CN)(ce(),i,r):e.vertexAttributesChanged())}(e,t,o):function(e,t,n){let r=me;if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(ce(),n.spatialReference,e.spatialReference,L.JP)}he(e.vertexAttributes.position,t,3,r),he(e.vertexAttributes.normal,t,3),he(e.vertexAttributes.tangent,t,4),e.vertexAttributesChanged()}(e,t,o)}(this,Le,r),this}offset(e,t,n){if(!this._checkIfLoaded("offset()"))return this;let{vertexSpace:r,vertexAttributes:i}=this,o=i?.position;if(!o)return this;if((0,T.Hq)(r)){let[i,o,s]=r.origin;r.origin=(0,h.fA)(i+e,o+t,s+n)}else{for(let r=0;r<o.length;r+=3)o[r]+=e,o[r+1]+=t,o[r+2]+=n;this.vertexAttributesChanged()}return this}scale(e,t){return this._checkIfLoaded("scale()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r,spatialReference:i}=e,o=n?.origin??e.origin;(0,T.CK)(e)?function(e,t,n){e.transform??=new M.A;let{vertexSpace:r,transform:i,spatialReference:o}=e,[s,l,a]=r.origin,u=new p.A({x:s,y:l,z:a,spatialReference:o}),c=Ae;if(u.equals(n))(0,R.hZ)(c,0,0,0);else if(!(0,U.p5)(c,n,e))return void(0,L.CN)(ve(),n.spatialReference,o,L.JP);let f=(0,R.hZ)(be,t,t,t),g=(0,le.O7)(Me,ue.zK,h.uY,f,c),{localMatrix:d}=i,m=(0,le.lw)(Me,g,d);i.scale=(0,le.X_)((0,h.vt)(),m),(0,le.hs)(m,m,(0,R.DI)(Ae,i.scale));let x=i.rotationAxis;i.rotation=(0,y.ui)(m),0===i.rotationAngle&&(i.rotationAxis=x),i.translation=(0,le.sC)((0,h.vt)(),m)}(e,t,o):E(r,i)?function(e,t,n){let r=e.spatialReference,i=(0,F.lO)(r),o=Ce;if(!(0,S.g)(n,o,i)&&((0,L.CN)(ve(),n.spatialReference,i,"Falling back to mesh origin"),!(0,S.g)(e.origin,o,i)))return void(0,L.CN)(ve(),e.origin.spatialReference,i);let s=e.vertexAttributes.position,l=e.vertexAttributes.normal,a=e.vertexAttributes.tangent,u=new Float64Array(s.length),c=null==l?null:new Float32Array(l.length),h=null==a?null:new Float32Array(a.length);!(0,L.gr)(s,r,u,i)||null!=l&&null!=c&&!(0,L.X4)(l,s,r,u,i,c)||null!=a&&null!=h&&!(0,L.xA)(a,s,r,u,i,h)?(0,L.CN)(ve(),r,i):(we(u,t,o),!(0,L.$5)(u,i,s,r)||null!=l&&null!=c&&!(0,L.si)(c,s,r,u,i,l)||null!=a&&null!=h&&!(0,L.Mv)(h,s,r,u,i,a)?(0,L.CN)(ve(),i,r):e.vertexAttributesChanged())}(e,t,o):function(e,t,n){let r=Ce;if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(ve(),n.spatialReference,e.spatialReference,L.JP)}we(e.vertexAttributes.position,t,r),e.vertexAttributesChanged()}(e,t,o)}(this,e,t),this}centerAt(e,t){return this._checkIfLoaded("centerAt()")&&function(e,t,n){if(!e.vertexAttributes?.position)return;let{vertexSpace:r}=e,i=n?.origin??e.origin;(0,T.Hq)(r)?function(e,t,n){let{vertexSpace:r}=e;if(!(0,T.Hq)(r))return;let i=_,o=Z;if(!(0,S.g)(t,o,e.spatialReference))return void(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP);if(!(0,S.g)(n,i,e.spatialReference))return void(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP);let s=(0,R.Re)(N,o,i);r.origin=(0,R.WQ)((0,h.vt)(),r.origin,s)}(e,t,i):E(r,i.spatialReference)?function(e,t,n){let r=(0,h.fA)(n.x,n.y,n.z??0),i=(0,U.UR)(e,new b.A({origin:r}));if(!i)return;let o=(0,h.fA)(t.x,t.y,t.z??0),s=(0,U.UR)({vertexAttributes:i,spatialReference:e.spatialReference,vertexSpace:new b.A({origin:o})},A.A.absolute);if(!s)return;let{position:l,normal:a,tangent:u}=s;e.vertexAttributes.position=l,e.vertexAttributes.normal=a,e.vertexAttributes.tangent=u,e.vertexAttributesChanged()}(e,t,i):function(e,t,n){let r=_,i=Z;if((0,S.g)(t,i,e.spatialReference)){if(!(0,S.g)(n,r,e.spatialReference)){let t=e.origin;return r[0]=t.x,r[1]=t.y,r[2]=t.z,void(0,L.CN)(I(),n.spatialReference,e.spatialReference,L.JP)}(function(e,t,n){if(e)for(let r=0;r<e.length;r+=3)for(let i=0;i<3;i++)e[r+i]+=t[i]-n[i]})(e.vertexAttributes.position,i,r),e.vertexAttributesChanged()}else(0,L.CN)(I(),t.spatialReference,e.spatialReference,L.JP)}(e,t,i)}(this,e,t),this}load(e){let{metadata:{displaySource:t}}=this;return t&&this.addResolvingPromise(async function(e,t,r){switch(t.source.type){case"client":case"service":return async function(e,t,r){let{source:i}=t,{loadGLTFMesh:o}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r),s=await async function(e,t){switch(e.type){case"client":return Array.isArray(e.files)?function(e){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");return X(e.map(e=>({name:e.name,mimeType:e.type,source:Y(e)})))}(e.files):Y(e.files);case"service":return async function(e,t){if(!e.length)throw new x.A("mesh-load-external:missing-assets","There must be at least one file to load");let n=await(0,a.nA)(e.map(async e=>{let n=await async function(e,t){let{parts:n,assetMimeType:r,assetName:i}=e;if(1===n.length)return new ee(n[0].partUrl);let o=await e.toBlob(t);return(0,a.Te)(t),ee.fromBlob(o,te(i,r))}(e);return(0,a.Te)(t),{name:e.assetName,mimeType:e.assetMimeType,source:n}}));if((0,a.G4)(t))throw n.forEach(e=>e.source.dispose()),(0,a.NK)();return X(n)}(e.assets,t);default:throw new x.A("mesh-load-external:invalid-source","Invalid source type")}}(i,r);(0,a.Te)(r);let{mesh:{vertexAttributes:l,components:u},meta:{isDracoDecompressed:c}}=await o(new p.A({x:0,y:0,z:0,spatialReference:e.spatialReference}),s.url,{resolveFile:V(s),signal:r?.signal,expectedType:s.type,unitConversionDisabled:t.unitConversionDisabled}).finally(()=>s.dispose());if(c)throw new x.A("mesh-load-external:draco-not-supported","The provided mesh uses Draco compression which is not supported.");e.vertexAttributes=l,e.components=u}(e,t,r);case"loadable":return t.source.load(e,r);default:t.source}}(this,t,e)),Promise.resolve(this)}addExternalSources(e){this.metadata.externalSources.addMany(e)}updateDisplaySource(e){this.metadata.displaySource=e}clone(e){return super.clone((0,ne.WO)((0,ne.QN)(e)))}cloneShallow(){return new Te({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(e){let[{toBinaryGLTF:t}]=await Promise.all([n.e(4038).then(()=>n(84038)),this.load(e)]);return(0,a.Te)(e),await t(this,e)}get usedMemory(){return this.components?this.components.reduce((e,t)=>e+t.memoryUsage,this.vertexAttributes.usedMemory):this.vertexAttributes.usedMemory}_clearSources(){this.metadata.clearSources()}_checkIfLoaded(e){return!!this.loaded||(s.A.getLogger(this).error(e,"Mesh must be loaded before applying operations"),!1)}static createBox(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createBox()",v),null;let n=new Te((0,ie.UG)((0,ie.H8)(),e,t));return t?.imageFace&&"all"!==t.imageFace?(0,ie.bQ)(n,t.imageFace):n}static createSphere(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.Dk)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createSphere()",v),null)}static createCylinder(e,t){return e instanceof p.A?new Te((0,ie.UG)((0,ie.ai)(t?.densificationFactor||0),e,t)):(s.A.getLogger(this.prototype).error(".createCylinder()",v),null)}static createPlane(e,t){if(!(e instanceof p.A))return s.A.getLogger(this.prototype).error(".createPlane()",v),null;let n=t?.facing??"up",r=(0,ie.uF)(n,t?.size);return new Te((0,ie.UG)((0,ie.Uh)(n),e,{...t,size:r}))}static createFromPolygon(e,t){if(!(e instanceof g.A))return s.A.getLogger(this.prototype).error(".createFromPolygon()","Expected polygon to be a Polygon instance"),null;let n=(0,Re.uM)(e,{method:"earcut"}),r=(0,a.$X)(n)?null:n,i=r?.positions??[],o=r?.polygonIndices??[];return new Te({vertexAttributes:new C.default({position:i}),components:[new m.default({faces:o,shading:"flat",material:t?.material??null})],spatialReference:e.spatialReference,vertexSpace:new A.A})}static async createFromGLTF(e,t,r){if(!(e instanceof p.A)){let e=new w;throw s.A.getLogger(this.prototype).error(".createfromGLTF()",e.message),e}let{loadGLTFMesh:i}=await(0,a.qr)(n.e(5841).then(()=>n(35841)),r);return new Te((await i(e,t,r)).mesh)}};(0,r.Cg)([(0,c.MZ)({type:[m.default],json:{write:!0}})],Ee.prototype,"components",void 0),(0,r.Cg)([(0,c.MZ)({nonNullable:!0,types:Se,constructOnly:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexSpace??e.clone(t)})],Ee.prototype,"vertexSpace",void 0),(0,r.Cg)([(0,c.MZ)({type:M.A,clonable:(e,t)=>{let n=(0,ne.o2)(t);return n&&"transform"in n?n.transform:e?.clone()??e},json:{write:!0}})],Ee.prototype,"transform",void 0),(0,r.Cg)([(0,c.MZ)({constructOnly:!0,type:re.O,clonable:(e,t)=>(0,ne.o2)(t)?.metadata??e.clone()})],Ee.prototype,"metadata",void 0),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"hasExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_transformedExtent",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"_untransformedBounds",null),(0,r.Cg)([(0,c.MZ)()],Ee.prototype,"origin",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1}})],Ee.prototype,"extent",null),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],Ee.prototype,"hasZ",void 0),(0,r.Cg)([(0,c.MZ)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],Ee.prototype,"hasM",void 0),(0,r.Cg)([(0,c.MZ)({type:C.default,nonNullable:!0,json:{write:!0},clonable:(e,t)=>(0,ne.o2)(t)?.vertexAttributes??e.clone(t)})],Ee.prototype,"vertexAttributes",void 0),Ee=Te=(0,r.Cg)([(0,c.$K)("esri.geometry.Mesh")],Ee);const Le=(0,y.vt)()},15585(e,t,n){n.d(t,{If:()=>p,O5:()=>m,O9:()=>d,QT:()=>y,l3:()=>g});var r=n(32198),i=n(2741),o=n(49186),s=n(44208),l=n(34727);let a=null,u=null,c=null,h=null;const f=(new Float32Array,new Uint32Array,new Uint32Array,new Uint32Array,{vertices:new Float64Array,indices:new Uint32Array,outlineIndices:new Uint32Array,outlineRingLengths:new Uint32Array,vertexCount:0,indexCount:0,outlineIndexCount:0,outlineRingCount:0});async function p(){return a??=async function(){c=await(await n.e(2997).then(()=>n(42997))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),a}async function g(){return u??=async function(){h=await(await n.e(9134).then(()=>n(99134))).default({locateFile:e=>(0,i.s)(`esri/core/libs/libtess/${e}`)})}(),u}function d(){return null!==h}function y(e,t,n=2){let i={stack:[],error:void 0,hasError:!1};try{let l=c;if(!l)throw new o.A("libtess:not-loaded","libtessF32 not loaded");let a=(0,r.mS)(i,A.from(l,e),!1),u=(0,r.mS)(i,M.from(l,t),!1),h=e.length/n*4,f=(0,r.mS)(i,new A(l,h*n),!1),p=l.triangulate(a.ptr,u.ptr,u.size,n,f.ptr,h);if((0,s.A)("esri-tessellation-debug")){let e=l.getError();0!==e&&console.warn("libtess:triangulation",C(e))}return{buffer:f.slice(0,p*n),vertexCount:p}}catch(e){i.error=e,i.hasError=!0}finally{(0,r.hk)(i)}}function m(e,t,n=2,i=!0){let a={stack:[],error:void 0,hasError:!1};try{let u=h;if(!u)throw new o.A("libtess:not-loaded","libtessF64 not loaded");let c=(0,r.mS)(a,b.from(u,e),!1),p=(0,r.mS)(a,M.from(u,t),!1),g=(0,r.mS)(a,new M(u,1),!1),d=(0,r.mS)(a,new M(u,1),!1),y=(0,r.mS)(a,new M(u,1),!1),m=(0,r.mS)(a,new M(u,1),!1),{maxVertexCount:x,maxIndexCount:v,maxOutlineIndexCount:A,maxOutlineRingCount:T}=function(e,t){let n=e.reduce((e,t)=>e+t,0),r=e.length,i=Math.max(0,e.length-1),o=Math.max(0,n+2*i-2),s=Math.max(0,Math.ceil(2*n)),a=Math.max(0,Math.ceil(3*o*2)),u=(0,l.mP)(a,3),c=n>0?Math.max(2,Math.ceil(.25*n)):0,h=n>0?Math.max(1,Math.ceil(c/3)):0;return{maxVertexCount:s,maxIndexCount:u,maxOutlineIndexCount:t?Math.max(0,n+r+c):0,maxOutlineRingCount:t?Math.max(0,r+h):0}}(t,i),R=0,S=0,E=0,L=0,U=0;{let e={stack:[],error:void 0,hasError:!1};try{let t=(0,r.mS)(e,new b(u,x*n),!1),o=(0,r.mS)(e,new M(u,v),!1),s=(0,r.mS)(e,i?new M(u,A):null,!1),l=(0,r.mS)(e,i?new M(u,T):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,t.ptr,x,n,o.ptr,v,g.ptr,d.ptr,s?.ptr??0,A,l?.ptr??0,T,y.ptr,m.ptr),U=u.getError(),R=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],S=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],E=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],L=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT],0===U)return{vertices:t.slice(0,R*n),indices:o.slice(0,S),outlineIndices:i&&s?s.slice(0,E):f.outlineIndices,outlineRingLengths:i&&l?l.slice(0,L):f.outlineRingLengths,vertexCount:R,indexCount:S,outlineIndexCount:i?E:0,outlineRingCount:i?L:0}}catch(t){e.error=t,e.hasError=!0}finally{(0,r.hk)(e)}}if(100903!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),f;let I=(0,r.mS)(a,new b(u,R*n),!1),Z=(0,r.mS)(a,new M(u,S),!1),_=(0,r.mS)(a,i?new M(u,E):null,!1),N=(0,r.mS)(a,i?new M(u,L):null,!1);if(u.triangulateIndexed(c.ptr,p.ptr,p.size,n,I.ptr,R,n,Z.ptr,S,g.ptr,d.ptr,_?.ptr??0,i?E:0,N?.ptr??0,i?L:0,y.ptr,m.ptr),U=u.getError(),0!==U)return(0,s.A)("esri-tessellation-debug")&&console.warn("libtess:triangulation",C(U)),f;let O=w(u)[g.ptr/Int32Array.BYTES_PER_ELEMENT],P=w(u)[d.ptr/Int32Array.BYTES_PER_ELEMENT],j=w(u)[y.ptr/Int32Array.BYTES_PER_ELEMENT],F=w(u)[m.ptr/Int32Array.BYTES_PER_ELEMENT];return{vertices:I.slice(0,O*n),indices:Z.slice(0,P),outlineIndices:i&&_?_.slice(0,j):f.outlineIndices,outlineRingLengths:i&&N?N.slice(0,F):f.outlineRingLengths,vertexCount:O,indexCount:P,outlineIndexCount:i?j:0,outlineRingCount:i?F:0}}catch(e){a.error=e,a.hasError=!0}finally{(0,r.hk)(a)}}function x(e){return e.HEAPF64}function v(e){return e.HEAPF32}function w(e){return e.HEAP32}class A{static from(e,t){let n=new A(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float32Array.BYTES_PER_ELEMENT}set(e){v(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return v(this._libtess).slice(n+e,n+t)}}class b{static from(e,t){let n=new b(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateCoordinateArray(t)}destroy(){this._libtess.destroyCoordinateArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Float64Array.BYTES_PER_ELEMENT}set(e){x(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return x(this._libtess).slice(n+e,n+t)}}class M{static from(e,t){let n=new M(e,t.length);return n.set(t),n}constructor(e,t){this._libtess=e,this.size=t,this.ptr=e.allocateLengthsArray(t)}destroy(){this._libtess.destroyLengthsArray(this.ptr)}[Symbol.dispose](){this.destroy()}get bytesPerCoordinate(){return Int32Array.BYTES_PER_ELEMENT}set(e){w(this._libtess).set(e,this.ptr/this.bytesPerCoordinate)}slice(e,t){let n=this.ptr/this.bytesPerCoordinate;return function(e){let t=w(e);return new Uint32Array(t.buffer,t.byteOffset,t.length)}(this._libtess).slice(n+e,n+t)}}function C(e){switch(e){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: ${e}`}}},97146(e,t,n){n.d(t,{Dg:()=>o,lC:()=>l,my:()=>s,tM:()=>h,uW:()=>i});var r=n(34275);function i(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<1024)return e}else if(e.length<1024)return Array.from(e);let n=!0,i=!0;return e.some((e,t)=>(n&&=0===e,i&&=e===t,!n&&!i)),n?function(e){if(1===e)return u;if(e<1024)return Array(e).fill(0);if(e>p.length){let t=Math.max(2*p.length,e);p=new Uint8Array(t)}return new Uint8Array(p.buffer,0,e)}(e.length):i?h(e.length):(0,r.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(let n of e){if(n>=65536)return(0,r.iu)(e)?e:new Uint32Array(e);n>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e,t=e){return e<=1024?Array(e):t<=65536?new Uint16Array(e):new Uint32Array(e)}function l(e,t,n){if(0===t.length)return e.slice();if(0===e.length)return t.slice();let r=s(e.length+t.length,n);for(let t=0;t<e.length;++t)r[t]=e[t];for(let n=0;n<t.length;++n)r[e.length+n]=t[n];return r}let a=f(131072);const u=[0],c=(()=>{let e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function h(e){return 1===e?u:e<1024?function(e){let t=Array(e).fill(0);for(let n=0;n<e;n++)t[n]=n;return t}(e):e<c.length?new Uint16Array(c.buffer,0,e):(e>a.length&&(a=f(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function f(e){let t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let p=new Uint8Array(65536)},16939(e,t,n){n.r(t),n.d(t,{default:()=>p});var r,i=n(32198),o=n(69540),s=n(25482),l=n(53966),a=n(91429),u=n(78888),c=n(19211),h=n(80882),f=n(31199);let p=r=class extends((0,o.OU)(s.o)){static from(e){return(0,u.PZ)(r,e)}constructor(e){super(e),this.material=null,this.name=void 0,this.shading="source",this.trustSourceNormals=!1}get faces(){return this._get("faces")??null}set faces(e){this._set("faces",(0,f.b)(e,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},l.A.getLogger(this)))}castMaterial(e){return e&&"object"==typeof e&&("metallic"in e||"roughness"in e||"metallicRoughnessTexture"in e)?(0,u.PZ)(h.A,e):(0,u.PZ)(c.default,e)}get memoryUsage(){let e=0;return null!=this.faces&&(e+=this.faces.byteLength),null!=this.material&&(e+=this.material.memoryUsage),e}};(0,i.Cg)([(0,a.MZ)({json:{write:f.B}})],p.prototype,"faces",null),(0,i.Cg)([(0,a.MZ)({type:c.default,json:{write:!0}})],p.prototype,"material",void 0),(0,i.Cg)([(0,a.wg)("material")],p.prototype,"castMaterial",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"name",void 0),(0,i.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],p.prototype,"shading",void 0),(0,i.Cg)([(0,a.MZ)({type:Boolean})],p.prototype,"trustSourceNormals",void 0),p=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshComponent")],p)},95696(e,t,n){n.d(t,{A:()=>u});var r,i=n(32198),o=n(69540),s=n(25482),l=n(91429),a=n(93223);let u=class extends((0,o.OU)(s.o)){static{r=this}constructor(e){super(e),this.type="georeferenced",this.origin=null}static{this.absolute=new r}};(0,i.Cg)([(0,a.e)({georeferenced:"georeferenced"},{readOnly:!0})],u.prototype,"type",void 0),(0,i.Cg)([(0,l.MZ)({type:[Number],nonNullable:!1,json:{write:!0}})],u.prototype,"origin",void 0),u=r=(0,i.Cg)([(0,l.$K)("esri.geometry.support.MeshGeoreferencedVertexSpace")],u)},18251(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(69540),o=n(25482),s=n(91429),l=n(51850),a=n(93223);let u=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.type="local",this.origin=(0,l.vt)()}};(0,r.Cg)([(0,a.e)({local:"local"},{readOnly:!0})],u.prototype,"type",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],u.prototype,"origin",void 0),u=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshLocalVertexSpace")],u)},19211(e,t,n){n.r(t),n.d(t,{default:()=>h});var r=n(32198),i=n(68197),o=n(69540),s=n(25482),l=n(91429),a=n(35063),u=n(51147),c=n(66895);let h=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.colorTextureTransform=null,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}get colorTexture(){return this._get("colorTexture")}set colorTexture(e){this._set("colorTexture",null==e?null:a.default.from(e))}get normalTexture(){return this._get("normalTexture")}set normalTexture(e){this._set("normalTexture",null==e?null:a.default.from(e))}clone(e){let t=(0,c.hz)(e),n=t?.materialMap?.get(this);if(n)return n;let r=super.clone((0,c.QN)(e));return t?.materialMap?.set(this,r),r}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let e=0;return e+=null==this.color?0:16,null!=this.colorTexture&&(e+=this.colorTexture.memoryUsage),e+=null==this.colorTextureTransform?0:20,null!=this.normalTexture&&(e+=this.normalTexture.memoryUsage),e+=null==this.normalTextureTransform?0:20,e}};(0,r.Cg)([(0,l.MZ)({type:i.A,json:{write:!0}})],h.prototype,"color",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],h.prototype,"colorTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({type:a.default,json:{write:!0},value:null})],h.prototype,"normalTexture",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,r.Cg)([(0,l.MZ)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=(0,r.Cg)([(0,l.$K)("esri.geometry.support.MeshMaterial")],h)},80882(e,t,n){n.d(t,{A:()=>u});var r=n(32198),i=n(68197),o=n(91429),s=n(19211),l=n(35063),a=n(51147);let u=class extends s.default{constructor(e){super(e),this.emissiveColor=null,this.emissiveStrength=null,this.emissiveTextureTransform=void 0,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTextureTransform=void 0,this.unlit=!1}get emissiveTexture(){return this._get("emissiveTexture")}set emissiveTexture(e){this._set("emissiveTexture",null==e?null:l.default.from(e))}get occlusionTexture(){return this._get("occlusionTexture")}set occlusionTexture(e){this._set("occlusionTexture",null==e?null:l.default.from(e))}get metallicRoughnessTexture(){return this._get("metallicRoughnessTexture")}set metallicRoughnessTexture(e){this._set("metallicRoughnessTexture",null==e?null:l.default.from(e))}getMemoryUsage(){let e=super.getMemoryUsage();return e+=null==this.emissiveColor?0:16,null!=this.emissiveTexture&&(e+=this.emissiveTexture.memoryUsage),e+=null==this.emissiveTextureTransform?0:20,null!=this.occlusionTexture&&(e+=this.occlusionTexture.memoryUsage),e+=null==this.occlusionTextureTransform?0:20,null!=this.metallicRoughnessTexture&&(e+=this.metallicRoughnessTexture.memoryUsage),e+=null==this.metallicRoughnessTextureTransform?0:20,e}};(0,r.Cg)([(0,o.MZ)({type:i.A,json:{write:!0}})],u.prototype,"emissiveColor",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],u.prototype,"emissiveStrength",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"emissiveTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"emissiveTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"occlusionTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"occlusionTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"metallic",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],u.prototype,"roughness",void 0),(0,r.Cg)([(0,o.MZ)({type:l.default,json:{write:!0},value:null})],u.prototype,"metallicRoughnessTexture",null),(0,r.Cg)([(0,o.MZ)({type:a.A,json:{write:!0}})],u.prototype,"metallicRoughnessTextureTransform",void 0),(0,r.Cg)([(0,o.MZ)({type:Boolean,nonNullable:!0,json:{write:!0}})],u.prototype,"unlit",void 0),u=(0,r.Cg)([(0,o.$K)("esri.geometry.support.MeshMaterialMetallicRoughness")],u)},35063(e,t,n){n.r(t),n.d(t,{default:()=>y});var r,i=n(32198),o=n(69540),s=n(21287),l=n(25482),a=n(91429),u=n(78888),c=n(66895),h=n(97159),f=n(43937),p=n(36005);const g=new WeakMap;let d=0,y=class extends((0,o.OU)(l.o)){static{r=this}constructor(e){super(e),this.wrap="repeat"}get url(){return this._get("url")||null}set url(e){this._set("url",e),e&&this._set("data",null)}get data(){return this._get("data")||null}set data(e){this._set("data",e),e&&this._set("url",null)}writeData(e,t,n,r){e instanceof HTMLImageElement?t[n]={type:"image-element",src:(0,h.t)(e.src,r),crossOrigin:e.crossOrigin}:e instanceof HTMLCanvasElement?t[n]={type:"canvas-element",imageData:m(e.getContext("2d").getImageData(0,0,e.width,e.height))}:e instanceof HTMLVideoElement?t[n]={type:"video-element",src:(0,h.t)(e.src,r),autoplay:e.autoplay,loop:e.loop,muted:e.muted,crossOrigin:e.crossOrigin,preload:e.preload}:e instanceof ImageData&&(t[n]={type:"image-data",imageData:m(e)})}readData(e){switch(e.type){case"image-element":{let t=new Image;return t.src=e.src,t.crossOrigin=e.crossOrigin,t}case"canvas-element":{let t=x(e.imageData),n=document.createElement("canvas");return n.width=t.width,n.height=t.height,n.getContext("2d").putImageData(t,0,0),n}case"image-data":return x(e.imageData);case"video-element":{let t=document.createElement("video");return t.src=e.src,t.crossOrigin=e.crossOrigin,t.autoplay=e.autoplay,t.loop=e.loop,t.muted=e.muted,t.preload=e.preload,t}default:return}}get transparent(){let{data:e,url:t}=this,n=e=>e?.toLowerCase().endsWith(".png")||e?.toLocaleLowerCase().startsWith("data:image/png;");return e instanceof HTMLCanvasElement?v(e.getContext("2d").getImageData(0,0,e.width,e.height)):e instanceof ImageData?v(e):!!(t&&n(t)||e instanceof HTMLImageElement&&n(e.src))}set transparent(e){this._overrideIfSome("transparent",e)}get contentHash(){let e="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",t=(t="")=>`d:${t},t:${this.transparent},w:${e}`;return null==this.url?null==this.data?t():this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?t(this.data.src):(g.has(this.data)||g.set(this.data,++d),t(g.get(this.data))):t(this.url)}get memoryUsage(){let e=0;if(e+=null==this.url?0:this.url.length,null!=this.data){let t=this.data;"data"in t?e+=t.data.byteLength:t instanceof HTMLImageElement?e+=t.naturalWidth*t.naturalHeight*3:t instanceof HTMLCanvasElement&&(e+=t.width*t.height*3)}return e}clone(e){let t=(0,c.$N)(e),n=t?.textureMap?.get(this);if(n)return n;let r=super.clone(e);return t?.textureMap?.set(this,r),r}static from(e){return"string"==typeof e?new r({url:e}):e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof ImageData||e instanceof HTMLVideoElement?new r({data:e}):(0,u.PZ)(r,e)}};function m(e){let t="";for(let n=0;n<e.data.length;n++)t+=String.fromCharCode(e.data[n]);return{data:btoa(t),width:e.width,height:e.height}}function x(e){let t=atob(e.data),n=new Uint8ClampedArray(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return(0,s.eV)(n,e.width,e.height)}function v(e){for(let t=3;t<e.data.length;t+=4)if(255!==e.data[t])return!0;return!1}(0,i.Cg)([(0,a.MZ)({type:String,json:{write:h.w}})],y.prototype,"url",null),(0,i.Cg)([(0,a.MZ)({clonable:"reference",json:{write:{overridePolicy(){return{enabled:!this.url}}}}})],y.prototype,"data",null),(0,i.Cg)([(0,f.K)("data")],y.prototype,"writeData",null),(0,i.Cg)([(0,p.w)("data")],y.prototype,"readData",null),(0,i.Cg)([(0,a.MZ)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],y.prototype,"transparent",null),(0,i.Cg)([(0,a.MZ)({json:{write:!0}})],y.prototype,"wrap",void 0),(0,i.Cg)([(0,a.MZ)({readOnly:!0})],y.prototype,"contentHash",null),y=r=(0,i.Cg)([(0,a.$K)("esri.geometry.support.MeshTexture")],y)},51147(e,t,n){n.d(t,{A:()=>l});var r=n(32198),i=n(69540),o=n(25482),s=n(91429);let l=class extends((0,i.OU)(o.o)){constructor(e){super(e),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r.Cg)([(0,s.MZ)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r.Cg)([(0,s.$K)("esri.geometry.support.MeshTextureTransform")],l)},1193(e,t,n){n.r(t),n.d(t,{default:()=>h});var r,i=n(32198),o=n(69540),s=n(25482),l=n(4718),a=n(53966),u=n(91429),c=n(31199);let h=r=class extends((0,o.OU)(s.o)){constructor(e){super(e),this.color=null,this.position=new Float64Array,this.uv=null,this.normal=null,this.tangent=null}castColor(e){return(0,c.b)(e,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},a.A.getLogger(this))}castPosition(e){return e&&e instanceof Float32Array&&a.A.getLogger(this).warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),(0,c.b)(e,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},a.A.getLogger(this))}castUv(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},a.A.getLogger(this))}castNormal(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},a.A.getLogger(this))}castTangent(e){return(0,c.b)(e,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},a.A.getLogger(this))}clonePositional(){let e={position:(0,l.o8)(this.position),normal:(0,l.o8)(this.normal),tangent:(0,l.o8)(this.tangent),uv:this.uv,color:this.color};return new r(e)}get usedMemory(){return this.position.byteLength+(this.uv?.byteLength??0)+(this.normal?.byteLength??0)+(this.tangent?.byteLength??0)+(this.color?.byteLength??0)}};(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"color",void 0),(0,i.Cg)([(0,u.wg)("color")],h.prototype,"castColor",null),(0,i.Cg)([(0,u.MZ)({nonNullable:!0,json:{write:c.B}})],h.prototype,"position",void 0),(0,i.Cg)([(0,u.wg)("position")],h.prototype,"castPosition",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"uv",void 0),(0,i.Cg)([(0,u.wg)("uv")],h.prototype,"castUv",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"normal",void 0),(0,i.Cg)([(0,u.wg)("normal")],h.prototype,"castNormal",null),(0,i.Cg)([(0,u.MZ)({json:{write:c.B}})],h.prototype,"tangent",void 0),(0,i.Cg)([(0,u.wg)("tangent")],h.prototype,"castTangent",null),h=r=(0,i.Cg)([(0,u.$K)("esri.geometry.support.MeshVertexAttributes")],h)},31199(e,t,n){function r(e,t,n,r){let{loggerTag:i,stride:o}=t;return e.length%o===0?e:(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([]))}function i(e,t,n,i,o){if(!e)return e;if(e instanceof t)return r(e,i,t,o);for(let s of n)if(e instanceof s)return r(new t(e),i,t,o);if(Array.isArray(e))return r(new t(e),i,t,o);{let r=n.map(e=>`'${e.name}'`);return o.error(`Failed to set property, expected one of ${r}, but got ${e.constructor.name}`),new t([])}}function o(e,t,n){t[n]=function(e){let t=Array(e.length);for(let n=0;n<e.length;n++)t[n]=e[n];return t}(e)}n.d(t,{B:()=>o,b:()=>i})},40118(e,t,n){n.d(t,{H5:()=>h,wh:()=>u,createWithExternalSource:()=>c});var r=n(49186),i=(n(17676),n(83300)),o=(n(16939),n(95696),n(73836)),s=(n(1193),n(27615));n(53966),n(35522),n(51850),n(66895),n(72258);var l=n(29461),a=n(15070);function u(e,t){return new i.default((0,a.UG)((0,a.Dk)(t?.densificationFactor||0),e,t))}function c(e,t,n){let r=n?.extent??null,{spatialReference:a}=e,u=n?.transform?.clone()??new o.A,c=(0,s.TE)(e,n),h={source:t,extent:r,unitConversionDisabled:n?.unitConversionDisabled},f=new l.O;return f.externalSources.push(h),new i.default({metadata:f,transform:u,vertexSpace:c,spatialReference:a})}function h(e,t){let{spatialReference:n}=e,l=t?.transform?.clone()??new o.A,a=(0,s.TE)(e,t),u=new i.default({transform:l,vertexSpace:a,spatialReference:n});return u.addResolvingPromise(Promise.reject(new r.A("mesh-incomplete","Mesh resources are not complete"))),u}n(41618)},63579(e,t,n){n.d(t,{Bq:()=>a,Qp:()=>l,WN:()=>y,dK:()=>m,eN:()=>p,fH:()=>d,in:()=>g,yr:()=>u});var r=n(56507),i=n(4576),o=n(17676),s=n(20557);class l{constructor(e,t,n){this.assetName=e,this.assetMimeType=t,this.parts=n}equals(e){return this===e||this.assetName===e.assetName&&this.assetMimeType===e.assetMimeType&&(0,i.aI)(this.parts,e.parts,(e,t)=>e.equals(t))}isOnService(e){return this.parts.every(t=>t.isOnService(e))}makeHash(){let e="";for(let t of this.parts)e+=t.partHash;return e}async toBlob(e){let{parts:t}=this;if(1===t.length)return t[0].toBlob(e);let n=await Promise.all(t.map(t=>t.toBlob(e)));return(0,o.Te)(e),new Blob(n)}}class a{constructor(e,t){this.partUrl=e,this.partHash=t}equals(e){return this===e||this.partUrl===e.partUrl&&this.partHash===e.partHash}isOnService(e){return this.partUrl.startsWith(`${e.path}/assets/`)}async toBlob(e){let{data:t}=await(0,r.A)(this.partUrl,{responseType:"blob"});return(0,o.Te)(e),t}}function u(e){return function(e){switch(e?.type){case"client":return Array.isArray(e.files)?e.files.some(f):f(e.files);case"service":return e.assets.some(f);case"loadable":return!0;default:return!1}}(e?.source)}const c=/^(model\/gltf\+json)|(model\/gltf-binary)$/,h=/\.(gltf|glb)/i;function f(e){if(e instanceof File){let{type:t,name:n}=e;return c.test(t)||h.test(n)}return c.test(e.assetMimeType)||h.test(e.assetName)}function p(e,t){if(!e)return!1;let{source:n}=e;return function(e,t){return"service"===e.type&&e.assets.every(e=>e.isOnService(t))}(n,t)}function g(e,t){if(e===t)return!0;let{source:n}=e,{source:r}=t;if(n===r)return!0;if("service"===n.type&&"service"===r.type){if(n.assets.length!==r.assets.length)return!1;let e=(e,t)=>e.assetName<t.assetName?-1:+(e.assetName>t.assetName),t=[...n.assets].sort(e),i=[...r.assets].sort(e);for(let e=0;e<t.length;++e)if(!t[e].equals(i[e]))return!1;return!0}return!1}function d(e,t){return e instanceof File?(0,s.rq)(e,t):(0,s.z$)(e.assetMimeType,e.assetName,t)}function y(e){switch(e.type){case"client":return Array.isArray(e.files)?e.files:[e.files];case"service":return e.assets;case"loadable":return}}function m(e){return!!e.original}},29461(e,t,n){n.d(t,{O:()=>u});var r=n(32198),i=n(69540),o=n(7762),s=n(36708),l=n(91429),a=n(63579);let u=class extends i.Pw{constructor(e){super(e),this.externalSources=new o.A,this._explicitDisplaySource=null,this.addHandles((0,s.on)(()=>this.externalSources,"after-remove",({item:e})=>{e===this._explicitDisplaySource&&(this._explicitDisplaySource=null)},{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(e){if(null!=e&&!(0,a.yr)(e))throw Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=e,e&&this.externalSources.every(t=>!(0,a.in)(t,e))&&this.externalSources.add(e)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(e){return this.externalSources.items.filter(t=>(0,a.eN)(t,e))}get _implicitDisplaySource(){return this.externalSources.find(a.yr)}};(0,r.Cg)([(0,l.MZ)()],u.prototype,"externalSources",void 0),(0,r.Cg)([(0,l.MZ)()],u.prototype,"displaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_implicitDisplaySource",null),(0,r.Cg)([(0,l.MZ)()],u.prototype,"_explicitDisplaySource",void 0),u=(0,r.Cg)([(0,l.$K)("esri.geometry.support.meshUtils.Metadata")],u)},66895(e,t,n){n.d(t,{$N:()=>c,Lz:()=>o,QN:()=>h,WO:()=>a,hz:()=>l,o2:()=>i});const r=Symbol("meshContext");function i(e){return e&&"object"==typeof e&&r in e?e[r]:void 0}function o(e,t){let n=i(e);return{...e,[r]:{...n,...t}}}const s=Symbol("meshMaterialContext");function l(e){return e&&"object"==typeof e&&s in e?e[s]:void 0}function a(e){if(l(e)?.materialMap)return e;let t={materialMap:new Map};return{...e,[s]:t}}const u=Symbol("meshTextureContext");function c(e){return e&&"object"==typeof e&&u in e?e[u]:void 0}function h(e){if(c(e)?.textureMap)return e;let t={textureMap:new Map};return{...e,[u]:t}}},15070(e,t,n){n.d(t,{Dk:()=>f,H8:()=>c,UG:()=>m,Uh:()=>d,ai:()=>p,bQ:()=>h,uF:()=>g});var r=n(29242),i=n(35522),o=n(51850),s=n(16939),l=n(1193),a=n(27615),u=n(72258);function c(){let{faceDescriptions:e,faceVertexOffsets:t,uvScales:n}=x,r=4*e.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array(2*e.length*3),a=0,u=0,c=0,h=0;for(let r=0;r<e.length;r++){let f=e[r],p=a/3;for(let e of t)l[h++]=p+e;let g=f.corners;for(let e=0;e<4;e++){let t=g[e],r=0;s[c++]=.25*n[e][0]+f.uvOrigin[0],s[c++]=f.uvOrigin[1]-.25*n[e][1];for(let e=0;e<3;e++)0===f.axis[e]?(i[a++]=.5*t[r++],o[u++]=0):(i[a++]=.5*f.axis[e],o[u++]=f.axis[e])}}return{position:i,normal:o,uv:s,faces:l}}function h(e,t){let n=e.components[0],r=n.faces,i=v[t],o=6*i,l=[,,,,,,],a=Array(r.length-6),u=0,c=0;for(let e=0;e<r.length;e++)e>=o&&e<o+6?l[u++]=r[e]:a[c++]=r[e];if(null!=e.vertexAttributes.uv){let t=new Float32Array(e.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let e=0;e<r.length;e++)t[n+e]=r[e];e.vertexAttributes.uv=t}return e.components=[new s.default({faces:l,material:n.material}),new s.default({faces:a})],e}function f(e=0){let t=Math.round(8*2**e),n=2*t,r=(t-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),l=new Uint32Array((t-1)*n*2*3),a=0,u=0,c=0,h=0;for(let e=0;e<=t;e++){let r=e/t*Math.PI+.5*Math.PI,f=Math.cos(r);w[2]=Math.sin(r);let p=0===e||e===t,g=p?n-1:n;for(let r=0;r<=g;r++){let d=r/g*2*Math.PI;w[0]=-Math.sin(d)*f,w[1]=Math.cos(d)*f;for(let e=0;e<3;e++)i[a]=.5*w[e],o[a]=w[e],++a;s[u++]=(r+(p?.5:0))/n,s[u++]=e/t,0!==e&&r!==n&&(e!==t&&(l[c++]=h,l[c++]=h+1,l[c++]=h-n),1!==e&&(l[c++]=h,l[c++]=h-n,l[c++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:l}}function p(e=0){let t=Math.round(16*2**e),n=4*(t+1)+2*t,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*t*3),l=0,a=0,u=0,c=0,h=0;for(let e=0;e<=5;e++){let n=0===e||5===e,f=e<=1||e>=4,p=2===e||4===e,g=n?t-1:t;for(let d=0;d<=g;d++){let y=d/g*2*Math.PI,m=n?0:.5;w[0]=m*Math.sin(y),w[1]=m*-Math.cos(y),w[2]=e<=2?.5:-.5;for(let t=0;t<3;t++)r[l++]=w[t],i[a++]=f?2===t?e<=1?1:-1:0:2===t?0:w[t]/m;o[u++]=(d+(n?.5:0))/t,o[u++]=e<=1?1*e/3:e<=3?1*(e-2)/3+1/3:1*(e-4)/3+2/3,!p&&0!==e&&d!==t&&(5!==e&&(s[c++]=h,s[c++]=h+1,s[c++]=h-t),1!==e&&(s[c++]=h,s[c++]=h-t,s[c++]=h-t-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}function g(e,t){let n="number"==typeof t?t:null==t?1:t.width,r="number"==typeof t?t:null==t?1:t.height;switch(e){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}function d(e){let t=y.facingAxisOrderSwap[e],n=y.position,r=y.normal,i=new Float64Array(n.length),o=new Float32Array(r.length),s=0;for(let e=0;e<4;e++){let e=s;for(let l=0;l<3;l++){let a=t[l],u=Math.abs(a)-1,c=a>=0?1:-1;i[s]=n[e+u]*c,o[s]=r[e+u]*c,s++}}return{position:i,normal:o,uv:new Float32Array(y.uv),faces:new Uint32Array(y.faces),isPlane:!0}}const y={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function m(e,t,n){e.isPlane||function(e){for(let t=0;t<e.position.length;t+=3)e.position[t+2]+=.5}(e),function(e,t){if(null!=t){A[0]=t[0],A[4]=t[1],A[8]=t[2];for(let t=0;t<e.position.length;t+=3){for(let n=0;n<3;n++)w[n]=e.position[t+n];(0,i.ei)(w,w,A);for(let n=0;n<3;n++)e.position[t+n]=w[n]}if(t[0]!==t[1]||t[1]!==t[2]){A[0]=1/t[0],A[4]=1/t[1],A[8]=1/t[2];for(let t=0;t<e.normal.length;t+=3){for(let n=0;n<3;n++)w[n]=e.normal[t+n];(0,i.ei)(w,w,A),(0,i.S8)(w,w);for(let n=0;n<3;n++)e.normal[t+n]=w[n]}}}}(e,function(e,t,n){let r=(0,u.xK)(t,n);if(null==e&&1===r)return null;if(null==e)return[r,r,r];if("number"==typeof e){let t=e*r;return[t,t,t]}return[null==e.width?r:e.width*r,null==e.depth?r:e.depth*r,null==e.height?r:e.height*r]}(n?.size,n?.unit,t.spatialReference));let r=(0,a.TE)(t,n),o=t.spatialReference.isGeographic?(0,a.TE)(t):r,c=(0,u.UR)({vertexAttributes:e,vertexSpace:o,spatialReference:t.spatialReference},r,{allowBufferReuse:!0});return{vertexAttributes:new l.default({...c,uv:e.uv}),vertexSpace:r,components:[new s.default({faces:e.faces,material:n?.material||null})],spatialReference:t.spatialReference}}const x={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},v={south:0,east:1,north:2,west:3,up:4,down:5},w=(0,o.vt)(),A=(0,r.vt)()},27615(e,t,n){n.d(t,{CK:()=>a,Hq:()=>l,MW:()=>u,TE:()=>c,yJ:()=>h});var r=n(35522),i=n(86738),o=n(95696),s=n(18251);function l(e){return null!=e.origin}function a(e){return l(e.vertexSpace)}function u(e,t){if(!l(e))return null;let[n,r,o]=e.origin;return new i.A({x:n,y:r,z:o,spatialReference:t})}function c(e,t){let{x:n,y:r,z:i,spatialReference:l}=e,a=[n,r,i??0];return"local"===(t?.vertexSpace??function(e){return e.isGeographic||e.isWebMercator?"local":"georeferenced"}(l))?new s.A({origin:a}):new o.A({origin:a})}function h(e,t){return e.type===t.type&&(e.origin===t.origin||null!=e.origin&&null!=t.origin&&(0,r.t2)(e.origin,t.origin))}},41618(e,t,n){n.d(t,{uM:()=>P});var r=n(17676),i=(n(9762),n(4197)),o=(n(58083),n(9093)),s=n(51850);n(48353),(0,o.vt)(),new class{constructor(){this.verticalDistanceToGround=0,this.sampledElevation=0,this.z=0}},(0,s.vt)(),n(44208),n(53966);var l=n(62788),a=n(95488),u=n(83349),c=n(15585),h=n(95108),f=n(97146),p=n(34727),g=n(86211),d=n(35522),y=n(27921);function m(e,t,n){let r=function(e,t,n,r){let i=(e=>!Array.isArray(e[0]))(t)?(e,n)=>t[3*e+n]:(e,n)=>t[e][n],o=(0,g.GA)(r)/(0,g.G9)(r);return(0,y.lU)(e,(e,t)=>(0,d.hZ)(e,i(t,0)*o,i(t,1)*o,i(t,2)),n)}(x,e,t,n)?(0,y.Qj)(x):[0,0,1];return Math.abs(r[2])>Math.cos((0,p.kU)(80))?2:+(Math.abs(r[1])>Math.abs(r[0]))}const x=(0,y.vt)(),v="auto",w=void 0,A=void 0,b=void 0;function M(e,t,n){if(!t)return 2;let r=null;for(let i of e){let e=Z(i,t),o=e<3?2:m(i,e,n);if(r??=o,o!==r)return 2}return r??2}function C(e,t,n){if(!t)return!(0,h.$3)(e);if(e.length<3)return!1;switch(n){case 0:return!(0,h.$3)(e,1,2);case 1:return!(0,h.$3)(e,0,2);case 2:return!(0,h.$3)(e,0,1)}}const T=new a.I;let R=new WeakSet;function S(e,t){if(!(0,c.O9)())return _("libtess-not-loaded");let n=null!=t.outlines,{positions:r,mergedPathLengths:o}=function(e){let t=function(e){let t=e.reduce((e,t)=>e+t.pathLengths.length,0),n=Array(t),r=0;for(let t=0;t<e.length;t++){let i=e[t].pathLengths;for(let e=0;e<i.length;e++)n[r++]=i[e]}return n}(e.polygons),n=3*e.polygonVertexCount;return n===e.positions.length?{positions:e.positions,mergedPathLengths:t}:{positions:(0,i.l5)(e.positions,0,n),mergedPathLengths:t}}(e),s=performance.now(),{vertices:l,indices:a,outlineIndices:u,outlineRingLengths:h}=(0,c.O5)(r,o,3,n),p=performance.now()-s;if(null!=t.owner&&p>250&&R.add(t.owner),l.length%3!=0)return _("positions-not-multiple-of-3");let{positions:g,outlineIndexBuffer:d,mergedOutlineRingLengths:y}=n?function(e,t,n,r,o){let s=e.polygonVertexCount,l=n.length/3,a=(t??[]).values().filter(e=>e.index>=s).map(e=>({index:l+e.index-s,count:e.count})).toArray();if(0===a.length)return{positions:n,outlineIndexBuffer:r,mergedOutlineRingLengths:o};let u=3*s,c=(0,i.l5)(e.positions,u,e.positions.length-u),h=(0,i.yH)(n,c),{outlineIndexBuffer:p,outlineRingLengths:g}=L(a,h);return{positions:h,outlineIndexBuffer:(0,f.lC)(r,p,h.length/3),mergedOutlineRingLengths:(0,f.lC)(o,g,o.length+g.length)}}(e,t.outlines,l,u,h):{positions:l,outlineIndexBuffer:void 0,mergedOutlineRingLengths:void 0};return{succeeded:!0,positions:g,indices:a,outlineIndexBuffer:d,outlineRingLengths:y,vertexCount:g.length/3,method:"libtess"}}function E(e,t,n){for(let r=0;r<e.length;r+=3){let i=e[r+t];e[r+t]=e[r+n],e[r+n]=i}}function L(e,t){let n=(0,f.my)(e.length),r=0;for(let i=0;i<e.length;i++){let o=e[i],s=o.count;if(s<=0){n[i]=0;continue}let l=3*o.index,a=3*(o.index+s-1),u=s>1&&t[l]===t[a]&&t[l+1]===t[a+1]&&t[l+2]===t[a+2]?s-1:s,c=u>0?u+1:0;n[i]=c,r+=c}let i=(0,f.my)(r,t.length/3),o=0;for(let t=0;t<e.length;t++){let r=n[t];if(0===r)continue;let s=e[t].index,l=r-1;for(let e=0;e<l;e++)i[o++]=s+e;i[o++]=s}return{outlineIndexBuffer:i,outlineRingLengths:n}}function U(e,{index:t,count:n}){let r=3*t,o=3*n;return(0,i.l5)(e,r,o)}function I(e,t,n,r,i,o){let s=o?e.length-1:0,l=o?-1:1;n*=3;for(let o=0;o<r;++o){let r=e[s];t[n++]=r[0],t[n++]=r[1],t[n++]=i&&null!=r[2]?r[2]:0,s+=l}return n/3}function Z(e,t){return function(e,t){let n=e.length;if(n<2)return!1;let r=e[0],i=e[n-1];return r[0]===i[0]&&r[1]===i[1]&&(!t||r[2]===i[2])}(e,t)?e.length-1:e.length}function _(e){return{succeeded:!1,message:e}}class N{constructor(e,t,n,r){this.positions=e,this.polygonIndices=t,this.outline=n,this.projectionSuccess=r,this.count=e.length/3}get vertexCount(){return this.positions.length/3}get polygonIndexCount(){return this.polygonIndices.length}get outlineIndexCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}get outlineSegmentCount(){let{outline:e}=this;if("tessellated-indices"!==e.output)return 0;let t=0;for(let n=0;n<e.outlineIndices.length;n++)t+=F(e.outlineIndices[n]);return t}}class O extends N{}function P(e,t){let{projectIfNearlyVertical:n=!1,outlineOutput:o="none",method:s,owner:a}=t??{},h="tessellated-indices"===o,p=M(e.rings,!!e.hasZ,e.spatialReference),g=function(e,t){let{hasZ:n,ccwRingsAsHoles:r,spatialReference:o}=t,s=t.axis??M(e,n,o),l=e.length,a=[],u=[],c=[],h=[],f=e.reduce((e,t)=>e+t.length,0),p=0,g=(0,i.jh)(3*f),d=0,y=r&&e[0]&&C(e[0],n,s);for(let t=l-1;t>=0;t--){let i=e[t],o=Z(i,n);if(o<3){o>1&&h.push(i);continue}let l=!!r&&C(i,n,s);if(y?!l:l)a[p++]=i;else{let e=i.length;for(let t=0;t<p;++t)e+=a[t].length;let t={index:d,pathLengths:Array(p+1),count:e,holeIndices:Array(p)};t.pathLengths[0]=i.length,i.length>0&&c.push({index:d,count:i.length}),d=I(i,g,d,i.length,n,y);for(let e=0;e<p;++e){let r=a[e];t.holeIndices[e]=d,t.pathLengths[e+1]=r.length,r.length>0&&c.push({index:d,count:r.length}),d=I(r,g,d,r.length,n,y)}p=0,t.count>0&&u.push(t)}}let m=d;for(let e of h)c.push({index:d,count:e.length}),d=I(e,g,d,e.length,n,y);return{positions:3*d===g.length?g:(0,i.l5)(g,0,3*d),polygonVertexCount:m,polygons:u,outlines:c}}(e.rings,{hasZ:!!e.hasZ,ccwRingsAsHoles:!0,spatialReference:e.spatialReference,axis:p}),d=function(e,t){let n=function(e,t){let n={method:t?.method??v,projectionAxis:t?.projectionAxis??w,outlines:t?.outlines??A,owner:t?.owner??b},{projectionAxis:r}=n,i=null!=r&&2!==r;i&&E(e.positions,r,2);let o=function(e,t){if("libtess"===t.method)return S(e,t);let n=function(e,t){let n=null!=t.owner&&R.has(t.owner);return"auto"===t.method&&!(n&&e.polygonVertexCount>=1e4)}(e,t),r=[],i=0,o=0;for(let s of e.polygons){let l=U(e.positions,s),a=(s.holeIndices??[]).map(e=>e-s.index),c=a.length>0?a:null,h=(0,u.e)(l,c,3),f=u.e.deviation(l,a,3,h);if(n&&f>1e-5)return S(e,t);r.push({indices:h,index:s.index}),i+=h.length,o=Math.max(o,f)}let s=(0,f.my)(i,e.positions.length/3),l=0;for(let e of r)for(let t=0;t<e.indices.length;t++)s[l++]=e.indices[t]+e.index;let{outlineIndexBuffer:a,outlineRingLengths:c}=null==t.outlines?{outlineIndexBuffer:void 0,outlineRingLengths:void 0}:L(t.outlines,e.positions);return{succeeded:!0,positions:e.positions,indices:(0,f.uW)(s),outlineIndexBuffer:a,outlineRingLengths:c,vertexCount:e.positions.length/3,method:"earcut",deviation:o}}(e,n);if(i){let t=o.succeeded?o.positions:null;null!=t&&t!==e.positions&&E(t,2,r),E(e.positions,2,r)}return o}(e,t);return n.succeeded||"libtess-not-loaded"!==n.message?n:((0,l.gc)(T),async function(){try{await(0,c.l3)(),T.notify()}catch(e){throw e}}())}(g,{projectionAxis:n?p:void 0,outlines:h?g.outlines:void 0,method:s,owner:a});if((0,r.$X)(d))return d;if(!d.succeeded)return null;let y={output:"none"};if("vertex-data"===o){let e=d.positions===g.positions?g.positions.slice():g.positions;y={output:"vertex-data",outlines:j(g.outlines,e)}}else"tessellated-indices"===o&&(y=function(e){let{outlineIndexBuffer:t,outlineRingLengths:n}=e;if(null==t||null==n)return{output:"none"};let r=Array(n.length),i=0;for(let e=0;e<n.length;e++){let o=n[e],s=t.slice(i,i+o);r[e]=s,i+=o}return{output:"tessellated-indices",outlineIndices:r}}(d));return new O(d.positions,d.indices,y,!0)}function j(e,t,n=null){return e.values().filter(({count:e})=>e>1).map(({index:e,count:r})=>{let o=3*e,s=3*r;return null==n?new B(e,r,(0,i.l5)(t,o,s)):new z(e,r,(0,i.l5)(t,o,s),(0,i.l5)(n,o,s))}).toArray()}function F(e,t=0,n=e.length){return n>1&&e[t]===e[t+n-1]?n-1:n}class B{constructor(e,t,n){this.index=e,this.count=t,this.position=n}}class z extends B{constructor(e,t,n,r){super(e,t,n),this.mapPositions=r}}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9567],{29242(t,n,r){function e(){return[1,0,0,0,1,0,0,0,1]}function a(t,n,r,e,a,u,i,o,c){return[t,n,r,e,a,u,i,o,c]}r.d(n,{fA:()=>a,vt:()=>e});const u=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:u,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:a},Symbol.toStringTag,{value:"Module"})),r.d(n,["zK",0,u])},34304(t,n,r){r.d(n,{DF:()=>c,FD:()=>a,ct:()=>f});let e=1e-6;function a(){return e}const u=Math.random,i=Math.PI/180,o=180/Math.PI;function c(t){return t*i}function f(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:u,equals:function(t,n){return Math.abs(t-n)<=e*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:a,setEpsilon:function(t){e=t},toDegree:f,toRadian:c},Symbol.toStringTag,{value:"Module"})),r.d(n,["Ov",0,u])},77690(t,n,r){r.d(n,{B8:()=>o,Ge:()=>M,I0:()=>s,KC:()=>c,a4:()=>f,hZ:()=>u,hs:()=>l,lw:()=>h,mg:()=>i,z0:()=>a});var e=r(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function u(t,n,r,e,a,u,i,o,c,f){return t[0]=n,t[1]=r,t[2]=e,t[3]=a,t[4]=u,t[5]=i,t[6]=o,t[7]=c,t[8]=f,t}function i(t,n){if(t===n){let r=n[1],e=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;return m?(m=1/m,t[0]=l*m,t[1]=(-h*e+a*f)*m,t[2]=(o*e-a*i)*m,t[3]=s*m,t[4]=(h*r-a*c)*m,t[5]=(-o*r+a*u)*m,t[6]=M*m,t[7]=(-f*r+e*c)*m,t[8]=(i*r-e*u)*m,t):null}function c(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8];return t[0]=i*h-o*f,t[1]=a*f-e*h,t[2]=e*o-a*i,t[3]=o*c-u*h,t[4]=r*h-a*c,t[5]=a*u-r*o,t[6]=u*f-i*c,t[7]=e*c-r*f,t[8]=r*i-e*u,t}function f(t){let n=t[0],r=t[1],e=t[2],a=t[3],u=t[4],i=t[5],o=t[6],c=t[7],f=t[8];return n*(f*u-i*c)+r*(-f*a+i*o)+e*(c*a-u*o)}function h(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1],m=r[2],b=r[3],d=r[4],x=r[5],p=r[6],y=r[7],v=r[8];return t[0]=s*e+M*i+m*f,t[1]=s*a+M*o+m*h,t[2]=s*u+M*c+m*l,t[3]=b*e+d*i+x*f,t[4]=b*a+d*o+x*h,t[5]=b*u+d*c+x*l,t[6]=p*e+y*i+v*f,t[7]=p*a+y*o+v*h,t[8]=p*u+y*c+v*l,t}function l(t,n,r){let e=r[0],a=r[1],u=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=u*n[6],t[7]=u*n[7],t[8]=u*n[8],t}function s(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=r+r,o=e+e,c=a+a,f=r*i,h=e*i,l=e*o,s=a*i,M=a*o,m=a*c,b=u*i,d=u*o,x=u*c;return t[0]=1-l-m,t[3]=h-x,t[6]=s+d,t[1]=h+x,t[4]=1-f-m,t[7]=M-b,t[2]=s-d,t[5]=M+b,t[8]=1-f-l,t}function M(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=n[9],s=n[10],M=n[11],m=n[12],b=n[13],d=n[14],x=n[15],p=r*o-e*i,y=r*c-a*i,v=r*f-u*i,g=e*c-a*o,q=e*f-u*o,P=a*f-u*c,I=h*b-l*m,S=h*d-s*m,R=h*x-M*m,E=l*d-s*b,k=l*x-M*b,N=s*x-M*d,F=p*N-y*k+v*E+g*R-q*S+P*I;return F?(F=1/F,t[0]=(o*N-c*k+f*E)*F,t[1]=(c*R-i*N-f*S)*F,t[2]=(i*k-o*R+f*I)*F,t[3]=(a*k-e*N-u*E)*F,t[4]=(r*N-a*R+u*S)*F,t[5]=(e*R-r*k-u*I)*F,t[6]=(b*P-d*q+x*g)*F,t[7]=(d*v-m*P-x*y)*F,t[8]=(m*q-b*v+x*p)*F,t):null}function m(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const b=h,d=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:f,equals:function(t,n){let r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8],s=n[0],M=n[1],m=n[2],b=n[3],d=n[4],x=n[5],p=n[6],y=n[7],v=n[8],g=(0,e.FD)();return Math.abs(r-s)<=g*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-M)<=g*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(u-m)<=g*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(i-b)<=g*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-d)<=g*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(c-x)<=g*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(f-p)<=g*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(h-y)<=g*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(l-v)<=g*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:a,fromQuat:s,fromRotation:function(t,n){let r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:o,isOrthoNormal:function(t){let n=(0,e.FD)(),r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8];return Math.abs(1-(r*r+i*i+f*f))<=n&&Math.abs(1-(a*a+o*o+h*h))<=n&&Math.abs(1-(u*u+c*c+l*l))<=n},mul:b,multiply:h,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){let r=n[0],e=n[1],a=n[2],u=n[4],i=n[5],o=n[6],c=n[8],f=n[9],h=n[10],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;if(!m)return null;let b=1/m;return t[0]=l*b,t[1]=(-h*e+a*f)*b,t[2]=(o*e-a*i)*b,t[3]=s*b,t[4]=(h*r-a*c)*b,t[5]=(-o*r+a*u)*b,t[6]=M*b,t[7]=(-f*r+e*c)*b,t[8]=(i*r-e*u)*b,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=Math.sin(r),M=Math.cos(r);return t[0]=M*e+s*i,t[1]=M*a+s*o,t[2]=M*u+s*c,t[3]=M*i-s*e,t[4]=M*o-s*a,t[5]=M*c-s*u,t[6]=f,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,r){let e=r[0],a=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t},set:u,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:m,translate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1];return t[0]=e,t[1]=a,t[2]=u,t[3]=i,t[4]=o,t[5]=c,t[6]=s*e+M*i+f,t[7]=s*a+M*o+h,t[8]=s*u+M*c+l,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},37585(t,n,r){r.d(n,{C:()=>u,Cc:()=>q,Io:()=>d,LI:()=>M,Ln:()=>b,Om:()=>g,Re:()=>c,S8:()=>v,T9:()=>l,WQ:()=>o,aI:()=>R,e$:()=>I,hG:()=>x,hZ:()=>i,hs:()=>m,l0:()=>P,qE:()=>s,t2:()=>S});var e=r(34727),a=r(34304);function u(t,n){return t[0]=n[0],t[1]=n[1],t}function i(t,n,r){return t[0]=n,t[1]=r,t}function o(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function l(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t}function s(t,n,r,a){return t[0]=(0,e.qE)(n[0],r[0],a[0]),t[1]=(0,e.qE)(n[1],r[1],a[1]),t}function M(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function m(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function b(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t}function d(t,n){let r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function x(t,n){let r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function p(t){let n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function y(t){let n=t[0],r=t[1];return n*n+r*r}function v(t,n){let r=n[0],e=n[1],a=r*r+e*e;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a),t}function g(t,n){return t[0]*n[0]+t[1]*n[1]}function q(t,n,r,e){let a=n[0],u=n[1];return t[0]=a+e*(r[0]-a),t[1]=u+e*(r[1]-u),t}function P(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a+r[4],t[1]=r[1]*e+r[3]*a+r[5],t}function I(t,n,r,e){let a=n[0]-r[0],u=n[1]-r[1],i=Math.sin(e),o=Math.cos(e);return t[0]=a*o-u*i+r[0],t[1]=a*i+u*o+r[1],t}function S(t,n){return t[0]===n[0]&&t[1]===n[1]}function R(t,n){let r=t[0],e=t[1],u=n[0],i=n[1],o=(0,a.FD)();return Math.abs(r-u)<=o*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-i)<=o*Math.max(1,Math.abs(e),Math.abs(i))}const E=p,k=c,N=f,F=h,_=d,K=x,D=y;Object.freeze(Object.defineProperty({__proto__:null,add:o,angle:function(t,n){let r=t[0],e=t[1],a=n[0],u=n[1],i=r*r+e*e;i>0&&(i=1/Math.sqrt(i));let o=a*a+u*u;o>0&&(o=1/Math.sqrt(o));let c=(r*a+e*u)*i*o;return c>1?0:c<-1?Math.PI:Math.acos(c)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},clamp:s,copy:u,cross:function(t,n,r){let e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t},dist:_,distance:d,div:F,divide:h,dot:g,equals:R,exactEquals:S,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:E,length:p,lerp:q,max:l,min:function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},mul:N,multiply:f,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:v,projectAndScale:function(t,n,r,e,a){let u=n[0]-r[0],i=n[1]-r[1],o=(e[0]*u+e[1]*i)*(a-1);return u=e[0]*o,i=e[1]*o,t[0]=n[0]+u,t[1]=n[1]+i,t},random:function(t,n=1){let r=2*(0,a.Ov)()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},rotate:I,round:M,scale:m,scaleAndAdd:b,set:i,sqrDist:K,sqrLen:D,squaredDistance:x,squaredLength:y,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:k,subtract:c,transformMat2:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a,t[1]=r[1]*e+r[3]*a,t},transformMat2d:P,transformMat3:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[3]*a+r[6],t[1]=r[1]*e+r[4]*a+r[7],t},transformMat4:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[4]*a+r[12],t[1]=r[1]*e+r[5]*a+r[13],t}},Symbol.toStringTag,{value:"Module"})),r.d(n,["Il",0,E,"jb",0,k,"xg",0,_])},34727(t,n,r){r.d(n,{$8:()=>I,Cc:()=>o,Hx:()=>d,Io:()=>q,KJ:()=>h,OS:()=>E,Sp:()=>M,XM:()=>l,YN:()=>s,ZH:()=>b,b6:()=>P,cU:()=>a,gg:()=>m,hs:()=>c,kU:()=>f,mP:()=>i,or:()=>R,pF:()=>N,qE:()=>u});const e=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function u(t,n,r){return Math.min(Math.max(t,n),r)}function i(t,n){return 0===n?0:Math.ceil(t/n)*n}function o(t,n,r){return t+(n-t)*r}function c(t,n,r,e,a){return o(e,a,(t-n)/(r-n))}function f(t){return t*Math.PI/180}function h(t){return 180*t/Math.PI}function l(t){return Math.acos(u(t,-1,1))}function s(t){return Math.asin(u(t,-1,1))}function M(t,n,r=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=r}function m(t,n,r=1e-6){return!M(t,n,r)&&t>n}function b(t,n,r=1e-6){return!M(t,n,r)&&t<n}function d(t,n,r=1e-6){return M(t,n,r)||t>n}const x=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function p(t){return x.setFloat64(0,t),x.getBigInt64(0)}const y=1000000n,v=g(1);function g(t){let n=p(t=Math.abs(t)),r=function(t){return x.setBigInt64(0,t),x.getFloat64(0)}(n<=y?y:n-y);return Math.abs(t-r)}function q(t,n,r=v){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r&&g(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r;let e=p(t),a=p(n);return!(e<0!=a<0||(e<a?a-e:e-a)>y)}function P(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;let e=Math.abs(t-n),a=Math.abs(t),u=Math.abs(n);if(0===t||0===n||a<1e-12&&u<1e-12){if(e>.01*r)return!1}else if(e/(a+u)>r)return!1;return!0}function I(t){return S(Math.max(-k,Math.min(t,k)))}function S(t){return e[0]=t,e[0]}function R(t){let n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],e=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(M(n,1)&&M(r,1)&&M(e,1))}function E(t,n){return(t%n+n)%n}const k=S(34028234663852886e22);function N(t,n,r){if(void 0===r||0==+r)return Math[t](n);if(n=+n,r=+r,isNaN(n)||"number"!=typeof r||r%1!=0)return NaN;let e=n.toString().split("e");return e=(n=Math[t](+(e[0]+"e"+(e[1]?+e[1]-r:-r)))).toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+r:r))}r.d(n,["pq",0,k])},19419(t,n,r){r.d(n,{$9:()=>P,C:()=>u,DC:()=>m,HY:()=>q,IO:()=>l,Ie:()=>S,Rj:()=>g,Uc:()=>v,VL:()=>b,VY:()=>o,Wc:()=>x,aI:()=>E,bx:()=>s,fA:()=>i,fT:()=>M,gR:()=>I,gX:()=>p,ib:()=>y,nw:()=>h,pJ:()=>k,tK:()=>f,uJ:()=>d,vt:()=>a,w1:()=>c}),r(34727);var e=r(5443);function a(t=F){return[t[0],t[1],t[2],t[3]]}function u(t,n){return t!==n&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]),t}function i(t,n,r,e,u=a()){return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u}function o(t,n=a()){return n[0]=t.xmin,n[1]=t.ymin,n[2]=t.xmax,n[3]=t.ymax,n}function c(t,n,r=new e.A){return r.xmin=t[0],r.ymin=t[1],r.xmax=t[2],r.ymax=t[3],r.spatialReference=n,r}function f(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function h(t,n){n<t[0]&&(t[0]=n),n>t[2]&&(t[2]=n)}function l(t,n){n<t[1]&&(t[1]=n),n>t[3]&&(t[3]=n)}function s(t,{xmin:n,ymin:r,xmax:e,ymax:a}){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],a)}function M(t,n,r){if(null!=n)if("length"in n)R(n)?(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[2]),r[3]=Math.max(t[3],n[3])):(2===n.length||3===n.length)&&(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[0]),r[3]=Math.max(t[3],n[1]));else switch(n.type){case"extent":r[0]=Math.min(t[0],n.xmin),r[1]=Math.min(t[1],n.ymin),r[2]=Math.max(t[2],n.xmax),r[3]=Math.max(t[3],n.ymax);break;case"point":r[0]=Math.min(t[0],n.x),r[1]=Math.min(t[1],n.y),r[2]=Math.max(t[2],n.x),r[3]=Math.max(t[3],n.y)}else u(r,t)}function m(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])}function b(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function d(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function x(t){return b(t)*d(t)}function p(t,n=[0,0]){return n[0]=(t[0]+t[2])/2,n[1]=(t[1]+t[3])/2,n}function y(t){let n=b(t),r=d(t);return Math.sqrt(n*n+r*r)}function v(t,n){return g(t,n[0],n[1])}function g(t,n,r){return n>=t[0]&&r>=t[1]&&n<=t[2]&&r<=t[3]}function q(t,n){return Math.max(n[0],t[0])<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])<=Math.min(n[3],t[3])}function P(t,n,r){return Math.max(n[0],t[0])-r<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])-r<=Math.min(n[3],t[3])}function I(t,n){return n[0]>=t[0]&&n[2]<=t[2]&&n[1]>=t[1]&&n[3]<=t[3]}function S(t){return t?u(t,N):a(N)}function R(t){return null!=t&&4===t.length}function E(t,n){return R(t)&&R(n)?t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]:t===n}function k(t,n){if(4!==n.length||t[0]===t[2]||t[1]===t[3])return!1;for(let r=0;r<n.length;r++){let e=n[r],a=n[(r+1)%n.length];if(e[0]!==t[0]&&e[0]!==t[2]||e[1]!==t[1]&&e[1]!==t[3])return!1;let u=e[1]===a[1]&&e[0]!==a[0],i=e[0]===a[0]&&e[1]!==a[1];if(!u&&!i)return!1}return!0}const N=[1/0,1/0,-1/0,-1/0],F=[0,0,0,0];r.d(n,["qv",0,N])},4305(t,n,r){r.d(n,{B4:()=>c,jK:()=>h,lM:()=>s,m_:()=>l,ty:()=>m});var e=r(34727),a=(r(37585),r(19419)),u=r(15507);const i=[0,0];function o(t){let n=1-t,r=n*n,e=t*t;return[r*n,3*t*r,3*e*n,e*t]}function c(t,n,r,e,a){let[u,i,c,f]=o(a);return[t[0]*u+n[0]*i+r[0]*c+e[0]*f,t[1]*u+n[1]*i+r[1]*c+e[1]*f]}function f(t,n,r,e,a){let[u,i,c,f]=o(a);return t*u+n*i+r*c+e*f}function h(t,n,r){let e=t,[a,o,c]=n.b,f=(0,u.RS)([0,0],e,o,r),h=(0,u.RS)(i,o,c,r),l=(0,u.RS)([0,0],c,a,r),s=(0,u.RS)([0,0],f,h,r),M=(0,u.RS)([0,0],h,l,r);return[{b:[(0,u.RS)([],s,M,r),f,s]},{b:[[...a],M,l]}]}function l(t,n,r){let a=t,[i,o,f]=n.b,h=(0,u.R)(r,[.1,.5,.9],t=>{let n=1-t,[r,e]=c(a,o,f,i,t);return[r,e,3*n*n*(o[0]-a[0])+6*n*t*(f[0]-o[0])+3*t*t*(i[0]-f[0]),3*n*n*(o[1]-a[1])+6*n*t*(f[1]-o[1])+3*t*t*(i[1]-f[1]),6*n*(f[0]-2*o[0]+a[0])+6*t*(i[0]-2*f[0]+o[0]),6*n*(f[1]-2*o[1]+a[1])+6*t*(i[1]-2*f[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0,s=h.map(t=>{let n=c(a,o,f,i,t),[e,u]=n,h=r[0]-e,s=r[1]-u,M=Math.sqrt(h*h+s*s);return l=Math.min(M,l),{t,curvePoint:n,distance:M}}),M=[];for(let t of s){let{t:n,distance:r}=t;(0,e.b6)(r,l)&&!M.some(({t})=>(0,e.Sp)(t,n))&&M.push(t)}return M}function s(t,n,r){let e=n,[u,i,o]=r.b;if((0,a.tK)(t,e),(0,a.tK)(t,u),(0,a.Rj)(t,i[0],i[1])&&(0,a.Rj)(t,o[0],o[1]))return t;for(let n of M(e[0],i[0],o[0],u[0]))n>0&&n<1&&(0,a.nw)(t,f(e[0],i[0],o[0],u[0],n));for(let n of M(e[1],i[1],o[1],u[1]))n>0&&n<1&&(0,a.IO)(t,f(e[1],i[1],o[1],u[1],n));return t}function M(t,n,r,e){let a=3*(3*(n-r)-t+e),u=6*(t-2*n+r),i=3*(n-t);if(0===a)return 0===u?[]:[-i/u];let o=Math.sqrt(u*u-4*a*i);return[(-u+o)/(2*a),(-u-o)/(2*a)]}function m(t,n,r){let e=0,a=[n];for(let n=0;n<16;n++){let n=t,i=[];for(let t of a)i.push(...h(n,t,.5)),n=t.b[0];a=i,n=t,e=0;let o=0;for(let t of a){let[r,a,i]=t.b,c=Math.sqrt((0,u.kb)(n,r));e+=(c+(Math.sqrt((0,u.kb)(n,a))+Math.sqrt((0,u.kb)(a,i))+Math.sqrt((0,u.kb)(i,r))))/2,o+=c,n=r}if(e-o<r)return e}return e}},513(t,n,r){r.d(n,{KP:()=>i,X0:()=>h,fM:()=>f,mq:()=>c,zW:()=>l});var e=r(19419),a=r(59803),u=r(15507);class i{constructor(t,n,r,e,a,u){this.cx=t,this.cy=n,this.radius=r,this.thetaStart=e,this.thetaEnd=a,this.isInvalid=u}get startPoint(){let{cx:t,cy:n,radius:r,thetaStart:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}get endPoint(){let{cx:t,cy:n,radius:r,thetaEnd:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}}function o(t,n){let{cx:r,cy:e,radius:a}=t;return[r+a*Math.cos(n),e+a*Math.sin(n)]}function c(t,n){if(t.isInvalid)return(0,u.RS)([0,0],t.startPoint,t.endPoint,n);let{thetaStart:r,thetaEnd:e}=t;return o(t,r*(1-n)+e*n)}function f(t,n){if(t.isInvalid)return(0,a.T)(t.startPoint,t.endPoint,n);let{cx:r,cy:e,thetaStart:i,thetaEnd:c}=t,[f,h]=n,l=(0,u.Pf)((0,u.yN)(i,c),Math.atan2(h-e,f-r)),s=o(t,l);return{t:(l-i)/(c-i),curvePoint:s,distance:Math.sqrt((0,u.kb)(n,s))}}function h(t,n){if(n.isInvalid)return(0,e.tK)(t,n.startPoint),(0,e.tK)(t,n.endPoint),t;let{cx:r,cy:a,radius:i,thetaStart:c,thetaEnd:f}=n;(0,e.tK)(t,o(n,c)),(0,e.tK)(t,o(n,f));let h=(0,u.yN)(c,f),l=Math.PI/2,s=0;for(let n of[[r+i,a],[r,a+i],[r-i,a],[r,a-i]])s=(0,u.Cp)(h,s),s>h.min&&s<h.max&&(0,e.tK)(t,n),s+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;let{radius:n,thetaStart:r,thetaEnd:e}=t;return n*Math.abs(e-r)}},50954(t,n,r){r.d(n,{GX:()=>h,pM:()=>f});var e=r(77690),a=r(29242),u=(r(37585),r(513)),i=r(15507);const o=(0,a.vt)();function c(t,n,r){let[a,u]=t,[c,f]=n,[h,l]=r;(0,e.hZ)(o,a,c,h,u,f,l,1,1,1);let s=(0,e.a4)(o),M=4*s/((0,i.kb)(t,n)+(0,i.kb)(n,r)+(0,i.kb)(r,t));if(!isFinite(M)||Math.abs(M)<1e-8)return null;let m=a**2+u**2,b=c**2+f**2,d=h**2+l**2;(0,e.hZ)(o,m,b,d,u,f,l,1,1,1);let x=(0,e.a4)(o);return(0,e.hZ)(o,m,b,d,a,c,h,1,1,1),[x/s*.5,(0,e.a4)(o)/s*-.5]}function f(t,n){let[r,e]=n.c,a=c(t,e,r),o=null==a,f=a??(0,i.RS)([],t,r,.5),[h,l]=t,[s,M]=e,[m,b]=r,[d,x]=f,p=h-d,y=l-x,v=Math.sqrt(p*p+y*y),g=(0,i.t7)(l-x,h-d),q=(0,i.t7)(M-x,s-d),P=(0,i.t7)(b-x,m-d);return(q-g)*(P-q)<0&&(P+=2*Math.sign(g-P)*Math.PI),new u.KP(d,x,v,g,P,o)}function h(t,n,r){let e=(0,u.mq)(t,r/2),a=(0,u.mq)(t,r),i=(0,u.mq)(t,(r+1)/2);return[{c:[a,e]},{c:[[...n.c[0]],i]}]}},79567(t,n,r){r.d(n,{e:()=>h});var e=r(19419),a=r(4305),u=r(513),i=r(50954),o=r(52006),c=r(49663),f=r(46068);function h(t,n,r){if((0,o.Xq)(r))return(0,e.tK)(t,n),(0,e.tK)(t,r),t;if((0,o.n1)(r))return(0,a.lM)(t,n,r);if((0,o.aO)(r)){let e=(0,i.pM)(n,r);return(0,u.X0)(t,e)}if((0,o.DA)(r)){let e=(0,c.io)(n,r);return(0,u.X0)(t,e)}return(0,f.DL)(t,n,r)}},52006(t,n,r){function e(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function a(t){return"curveRings"in t?t.curveRings:t.curvePaths}function u(t){return"b"in t}function i(t){return"c"in t}function o(t){return Array.isArray(t)}function c(t){return"a"in t}function f(t){return"a"in t&&4===t.a.length}function h(t){return"a"in t&&7===t.a.length}function l(t,n){return a(t).flat().some(t=>function(t,n){return!(o(t)||(u(t)?n.has("cubic-bezier"):i(t)?n.has("circular-arc"):!f(t)&&!h(t)||n.has("elliptic-arc")))}(t,n))}function s(t){return o(t)?t:u(t)?t.b[0]:i(t)?t.c[0]:t.a[0]}function M(t){if(u(t)){let[n,r,e]=t.b;return{b:[[...n],[...r],[...e]]}}if(i(t)){let[n,r]=t.c;return{c:[[...n],[...r]]}}if(o(t))return[...t];if(f(t)){let[n,r,e,a]=t.a;return{a:[[...n],[...r],e,a]}}if(h(t)){let[n,r,e,a,u,i,o]=t.a;return{a:[[...n],[...r],e,a,u,i,o]}}return t}r.d(n,{DA:()=>f,Ed:()=>e,FD:()=>a,FG:()=>c,V8:()=>l,Xq:()=>o,aO:()=>i,n1:()=>u,tk:()=>M,wY:()=>h,yP:()=>s}),r(4576)},49663(t,n,r){r.d(n,{io:()=>i,xG:()=>o});var e=r(34727),a=(r(37585),r(513)),u=r(15507);function i(t,n){let[r,i,o,c]=n.a,[f,h]=t,[l,s]=r,[M,m]=i,b=f-M,d=h-m,x=Math.sqrt(b*b+d*d),p=l-M,y=s-m,v=Math.sqrt(p*p+y*y),g=0===x||0===v||!(0,e.b6)(x,v),q=x,[P,I]=(0,u.Gz)((0,u.t7)(h-m,f-M),Math.atan2(s-m,l-M),o,c);return new a.KP(M,m,q,P,I,g)}function o(t,n,r){let{cx:e,cy:u,thetaStart:i,thetaEnd:o}=t,[c,f,h,l]=n.a,s=i*(1-r)+o*r;return[{a:[(0,a.mq)(t,r),[e,u],+(Math.abs(s-i)<Math.PI),l]},{a:[[...c],[e,u],+(Math.abs(o-s)<Math.PI),l]}]}},46068(t,n,r){r.d(n,{DL:()=>M,ED:()=>l,SW:()=>c,Uk:()=>h,pb:()=>s,xm:()=>m}),r(77690);var e=r(29242),a=(r(37585),r(19419)),u=r(52006),i=r(15507);class o{constructor(t,n,r,e,a,u,i,o,c){this.cx=t,this.cy=n,this.a=r,this.b=e,this.cosR=a,this.sinR=u,this.u1=i,this.u2=o,this.isInvalid=c}}function c(t,n){let[r,e,a,u,c,f,h]=n.a,[l,s]=t,[M,m]=r,[b,d]=e,x=f*h,p=Math.cos(c),y=Math.sin(c),[v,g]=(0,i.Gz)((0,i.t7)(1/x*(s-d)*p-1/x*(l-b)*y,1/f*(s-d)*y+1/f*(l-b)*p),Math.atan2(1/x*(m-d)*p-1/x*(M-b)*y,1/f*(m-d)*y+1/f*(M-b)*p),a,u);return new o(b,d,f,x,p,y,v,g,0===f||0===x)}function f(t,n){let{a:r,b:e,cosR:a,sinR:u,cx:i,cy:o}=t,c=Math.cos(n),f=Math.sin(n);return[r*c*a-e*f*u+i,r*c*u+e*f*a+o]}function h(t,n){let{u1:r,u2:e}=t;return f(t,r*(1-n)+e*n)}function l(t,n,r){if(r<0||r>1)return[];if(0===r||1===r)return[(0,u.tk)(n)];let[e,[a,i],o,c,f,l,s]=n.a,{u1:M,u2:m}=t,b=M*(1-r)+m*r;return[{a:[[...h(t,r)],[a,i],+(Math.abs(b-M)<Math.PI),c,f,l,s]},{a:[[...e],[a,i],+(Math.abs(m-b)<Math.PI),c,f,l,s]}]}function s(t,n){let{a:r,b:e,cosR:a,sinR:u,u1:o,u2:c}=t,h=Math.PI/6,l=[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],s=(0,i.R)(n,l,n=>{let i=Math.cos(n),o=Math.sin(n),[c,h]=f(t,n);return[c,h,-r*a*o-e*u*i,-r*u*o+e*a*i,-r*a*i+e*u*o,-r*u*i-e*a*o]}),M=(0,i.yN)(o,c),m=new Set(s.map(t=>(0,i.Cp)(M,t)).filter(t=>t>M.min&&t<M.max));m.add(o),m.add(c);let b,d,x=1/0;for(let r of m){let e=f(t,r),[a,u]=e,i=n[0]-a,h=n[1]-u,l=i*i+h*h;l<x&&(b=(r-o)/(c-o),d=e,x=l)}return{t:b,curvePoint:d,distance:Math.sqrt(x)}}function M(t,n,r){let e=c(n,r),{a:u,b:o,u1:h,u2:l,cosR:s,sinR:M,isInvalid:m}=e,b=r.a[0];if((0,a.tK)(t,n),(0,a.tK)(t,b),m)return t;let d=Math.atan2(-o*M,u*s),x=d+Math.PI,p=Math.atan2(o*s,u*M),y=p+Math.PI,v=(0,i.yN)(h,l);for(let n of[d,x,p,y].map(t=>(0,i.Cp)(v,t)))n>v.min&&n<v.max&&(0,a.tK)(t,f(e,n));return t}function m(t,n,r){let[e,a,u,o,l,s,M]=n.a,m=c(t,n),{u1:b,u2:d,isInvalid:x}=m,p=d-b;if(x)return Math.sqrt((0,i.kb)(t,e));let y=[0,0],v=0,g=[h(m,0),h(m,.25),h(m,.5),h(m,.75),h(m,1)];for(let t=0;t<14;t++){let t=g.length-1,n=p/(2*t),e=[];for(let r=0;r<t;r++)e.push(g[r]),e.push(f(m,b+(2*r+1)*n));e.push(g[g.length-1]),g=e,v=0;let u=0;for(let t=1;t<g.length;t++){let n=g[t-1],r=g[t];if(v+=Math.sqrt((0,i.kb)(n,r)),t>1){let e=g[t-2],o=(0,i.M_)(y,e,n,a,r);u+=o?Math.sqrt((0,i.kb)(n,o)):Math.abs(r[0]-n[0])+Math.abs(r[1]-n[1])}else u+=v}if(u-v<r)return v}return v}(0,e.vt)(),(0,e.vt)(),(0,e.vt)(),(0,e.vt)()},59803(t,n,r){r.d(n,{T:()=>u});var e=r(34727),a=r(15507);function u(t,n,r){let[u,i]=t,[o,c]=n,[f,h]=r,[l,s]=[o-u,c-i],M=l*(f-u)+s*(h-i);M/=l**2+s**2,M=isNaN(M)?0:(0,e.qE)(M,0,1);let m=(0,a.RS)([0,0],t,n,M);return{t:M,curvePoint:m,distance:Math.sqrt((0,a.kb)(m,r))}}},15507(t,n,r){r.d(n,{Cp:()=>b,Gz:()=>m,M_:()=>c,Pf:()=>d,R:()=>x,RS:()=>u,kb:()=>i,t7:()=>h,yE:()=>o,yN:()=>M});var e=r(34727),a=r(37585);function u(t,n,r,e){return t[0]=n[0]*(1-e)+r[0]*e,t[1]=n[1]*(1-e)+r[1]*e,t}function i(t,n){return(0,a.hG)(t,n)}function o(t,n,r){let e=i(n,r);if(0===e)return i(n,t);let a=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return a*a/e}function c(t,n,r,e,a){let[u,i]=n,[o,c]=r,[f,h]=e,[l,s]=a,M=(u-o)*(h-s)-(i-c)*(f-l);if(0===M)return null;let m=(u*c-i*o)*(f-l)-(u-o)*(f*s-h*l),b=(u*c-i*o)*(h-s)-(i-c)*(f*s-h*l);return t[0]=m/M,t[1]=b/M,t}const f=2*Math.PI;function h(t,n){let r=Math.atan2(t,n);return r<0?r+f:r}function l(t){return Math.abs(t)%f}function s(t){let n=l(t);return n<Math.PI?n:f-n}function M(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,r,a){if((0,e.Sp)(l(t-n),0))return r?[t,t]:[t,a?t-f:t+f];let[u,i]=a?[t-f,t]:[t,t+f];return[t,b({min:u,max:i},n)]}function b({min:t,max:n},r){let e;return e=n-r,e>=f?(e-=e%f,r+e):(e=r-t,e>=f?(e-=e%f,r-e):r)}function d(t,n){let r=b(t,n);return r>t.min&&r<t.max?r:s(r-t.min)<s(r-t.max)?t.min:t.max}function x(t,n,r,e=10){return n.map(n=>{let a=n;for(let n=0;n<e;n++){let[n,e,u,i,o,c]=r(a),f=t[0]-n,h=t[1]-e,l=-u,s=-i;a+=-(2*f*l+2*h*s)/(2*l*l+2*f*-o+2*s*s+2*h*-c||1e-6)}return a})}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9567],{29242(t,n,r){function e(){return[1,0,0,0,1,0,0,0,1]}function a(t,n,r,e,a,u,i,o,c){return[t,n,r,e,a,u,i,o,c]}r.d(n,{fA:()=>a,vt:()=>e});const u=[1,0,0,0,1,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:u,clone:function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},create:e,fromValues:a},Symbol.toStringTag,{value:"Module"})),r.d(n,["zK",0,u])},34304(t,n,r){r.d(n,{DF:()=>c,FD:()=>a,ct:()=>f});let e=1e-6;function a(){return e}const u=Math.random,i=Math.PI/180,o=180/Math.PI;function c(t){return t*i}function f(t){return t*o}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:u,equals:function(t,n){return Math.abs(t-n)<=e*Math.max(1,Math.abs(t),Math.abs(n))},getEpsilon:a,setEpsilon:function(t){e=t},toDegree:f,toRadian:c},Symbol.toStringTag,{value:"Module"})),r.d(n,["Ov",0,u])},77690(t,n,r){r.d(n,{B8:()=>o,Ge:()=>M,I0:()=>s,KC:()=>c,a4:()=>f,hZ:()=>u,hs:()=>l,lw:()=>h,mg:()=>i,z0:()=>a});var e=r(34304);function a(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[4],t[4]=n[5],t[5]=n[6],t[6]=n[8],t[7]=n[9],t[8]=n[10],t}function u(t,n,r,e,a,u,i,o,c,f){return t[0]=n,t[1]=r,t[2]=e,t[3]=a,t[4]=u,t[5]=i,t[6]=o,t[7]=c,t[8]=f,t}function i(t,n){if(t===n){let r=n[1],e=n[2],a=n[5];t[1]=n[3],t[2]=n[6],t[3]=r,t[5]=n[7],t[6]=e,t[7]=a}else t[0]=n[0],t[1]=n[3],t[2]=n[6],t[3]=n[1],t[4]=n[4],t[5]=n[7],t[6]=n[2],t[7]=n[5],t[8]=n[8];return t}function o(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;return m?(m=1/m,t[0]=l*m,t[1]=(-h*e+a*f)*m,t[2]=(o*e-a*i)*m,t[3]=s*m,t[4]=(h*r-a*c)*m,t[5]=(-o*r+a*u)*m,t[6]=M*m,t[7]=(-f*r+e*c)*m,t[8]=(i*r-e*u)*m,t):null}function c(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8];return t[0]=i*h-o*f,t[1]=a*f-e*h,t[2]=e*o-a*i,t[3]=o*c-u*h,t[4]=r*h-a*c,t[5]=a*u-r*o,t[6]=u*f-i*c,t[7]=e*c-r*f,t[8]=r*i-e*u,t}function f(t){let n=t[0],r=t[1],e=t[2],a=t[3],u=t[4],i=t[5],o=t[6],c=t[7],f=t[8];return n*(f*u-i*c)+r*(-f*a+i*o)+e*(c*a-u*o)}function h(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1],m=r[2],b=r[3],d=r[4],x=r[5],p=r[6],y=r[7],v=r[8];return t[0]=s*e+M*i+m*f,t[1]=s*a+M*o+m*h,t[2]=s*u+M*c+m*l,t[3]=b*e+d*i+x*f,t[4]=b*a+d*o+x*h,t[5]=b*u+d*c+x*l,t[6]=p*e+y*i+v*f,t[7]=p*a+y*o+v*h,t[8]=p*u+y*c+v*l,t}function l(t,n,r){let e=r[0],a=r[1],u=r[2];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t[6]=u*n[6],t[7]=u*n[7],t[8]=u*n[8],t}function s(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=r+r,o=e+e,c=a+a,f=r*i,h=e*i,l=e*o,s=a*i,M=a*o,m=a*c,b=u*i,d=u*o,x=u*c;return t[0]=1-l-m,t[3]=h-x,t[6]=s+d,t[1]=h+x,t[4]=1-f-m,t[7]=M-b,t[2]=s-d,t[5]=M+b,t[8]=1-f-l,t}function M(t,n){let r=n[0],e=n[1],a=n[2],u=n[3],i=n[4],o=n[5],c=n[6],f=n[7],h=n[8],l=n[9],s=n[10],M=n[11],m=n[12],b=n[13],d=n[14],x=n[15],p=r*o-e*i,y=r*c-a*i,v=r*f-u*i,g=e*c-a*o,q=e*f-u*o,P=a*f-u*c,I=h*b-l*m,S=h*d-s*m,R=h*x-M*m,E=l*d-s*b,k=l*x-M*b,N=s*x-M*d,F=p*N-y*k+v*E+g*R-q*S+P*I;return F?(F=1/F,t[0]=(o*N-c*k+f*E)*F,t[1]=(c*R-i*N-f*S)*F,t[2]=(i*k-o*R+f*I)*F,t[3]=(a*k-e*N-u*E)*F,t[4]=(r*N-a*R+u*S)*F,t[5]=(e*R-r*k-u*I)*F,t[6]=(b*P-d*q+x*g)*F,t[7]=(d*v-m*P-x*y)*F,t[8]=(m*q-b*v+x*p)*F,t):null}function m(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t[4]=n[4]-r[4],t[5]=n[5]-r[5],t[6]=n[6]-r[6],t[7]=n[7]-r[7],t[8]=n[8]-r[8],t}const b=h,d=m;Object.freeze(Object.defineProperty({__proto__:null,add:function(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t[4]=n[4]+r[4],t[5]=n[5]+r[5],t[6]=n[6]+r[6],t[7]=n[7]+r[7],t[8]=n[8]+r[8],t},adjoint:c,copy:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t},determinant:f,equals:function(t,n){let r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8],s=n[0],M=n[1],m=n[2],b=n[3],d=n[4],x=n[5],p=n[6],y=n[7],v=n[8],g=(0,e.FD)();return Math.abs(r-s)<=g*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(a-M)<=g*Math.max(1,Math.abs(a),Math.abs(M))&&Math.abs(u-m)<=g*Math.max(1,Math.abs(u),Math.abs(m))&&Math.abs(i-b)<=g*Math.max(1,Math.abs(i),Math.abs(b))&&Math.abs(o-d)<=g*Math.max(1,Math.abs(o),Math.abs(d))&&Math.abs(c-x)<=g*Math.max(1,Math.abs(c),Math.abs(x))&&Math.abs(f-p)<=g*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(h-y)<=g*Math.max(1,Math.abs(h),Math.abs(y))&&Math.abs(l-v)<=g*Math.max(1,Math.abs(l),Math.abs(v))},exactEquals:function(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]&&t[4]===n[4]&&t[5]===n[5]&&t[6]===n[6]&&t[7]===n[7]&&t[8]===n[8]},frob:function(t){return Math.sqrt(t[0]**2+t[1]**2+t[2]**2+t[3]**2+t[4]**2+t[5]**2+t[6]**2+t[7]**2+t[8]**2)},fromMat2d:function(t,n){return t[0]=n[0],t[1]=n[1],t[2]=0,t[3]=n[2],t[4]=n[3],t[5]=0,t[6]=n[4],t[7]=n[5],t[8]=1,t},fromMat4:a,fromQuat:s,fromRotation:function(t,n){let r=Math.sin(n),e=Math.cos(n);return t[0]=e,t[1]=r,t[2]=0,t[3]=-r,t[4]=e,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromScaling:function(t,n){return t[0]=n[0],t[1]=0,t[2]=0,t[3]=0,t[4]=n[1],t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},fromTranslation:function(t,n){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=n[0],t[7]=n[1],t[8]=1,t},identity:function(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,t},invert:o,isOrthoNormal:function(t){let n=(0,e.FD)(),r=t[0],a=t[1],u=t[2],i=t[3],o=t[4],c=t[5],f=t[6],h=t[7],l=t[8];return Math.abs(1-(r*r+i*i+f*f))<=n&&Math.abs(1-(a*a+o*o+h*h))<=n&&Math.abs(1-(u*u+c*c+l*l))<=n},mul:b,multiply:h,multiplyScalar:function(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t[4]=n[4]*r,t[5]=n[5]*r,t[6]=n[6]*r,t[7]=n[7]*r,t[8]=n[8]*r,t},multiplyScalarAndAdd:function(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t[2]=n[2]+r[2]*e,t[3]=n[3]+r[3]*e,t[4]=n[4]+r[4]*e,t[5]=n[5]+r[5]*e,t[6]=n[6]+r[6]*e,t[7]=n[7]+r[7]*e,t[8]=n[8]+r[8]*e,t},normalFromMat4:M,normalFromMat4Legacy:function(t,n){let r=n[0],e=n[1],a=n[2],u=n[4],i=n[5],o=n[6],c=n[8],f=n[9],h=n[10],l=h*i-o*f,s=-h*u+o*c,M=f*u-i*c,m=r*l+e*s+a*M;if(!m)return null;let b=1/m;return t[0]=l*b,t[1]=(-h*e+a*f)*b,t[2]=(o*e-a*i)*b,t[3]=s*b,t[4]=(h*r-a*c)*b,t[5]=(-o*r+a*u)*b,t[6]=M*b,t[7]=(-f*r+e*c)*b,t[8]=(i*r-e*u)*b,t},projection:function(t,n,r){return t[0]=2/n,t[1]=0,t[2]=0,t[3]=0,t[4]=-2/r,t[5]=0,t[6]=-1,t[7]=1,t[8]=1,t},rotate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=Math.sin(r),M=Math.cos(r);return t[0]=M*e+s*i,t[1]=M*a+s*o,t[2]=M*u+s*c,t[3]=M*i-s*e,t[4]=M*o-s*a,t[5]=M*c-s*u,t[6]=f,t[7]=h,t[8]=l,t},scale:l,scaleByVec2:function(t,n,r){let e=r[0],a=r[1];return t[0]=e*n[0],t[1]=e*n[1],t[2]=e*n[2],t[3]=a*n[3],t[4]=a*n[4],t[5]=a*n[5],t},set:u,str:function(t){return"mat3("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+")"},sub:d,subtract:m,translate:function(t,n,r){let e=n[0],a=n[1],u=n[2],i=n[3],o=n[4],c=n[5],f=n[6],h=n[7],l=n[8],s=r[0],M=r[1];return t[0]=e,t[1]=a,t[2]=u,t[3]=i,t[4]=o,t[5]=c,t[6]=s*e+M*i+f,t[7]=s*a+M*o+h,t[8]=s*u+M*c+l,t},transpose:i},Symbol.toStringTag,{value:"Module"}))},37585(t,n,r){r.d(n,{C:()=>u,Cc:()=>q,Io:()=>d,LI:()=>M,Ln:()=>b,Om:()=>g,Re:()=>c,S8:()=>v,T9:()=>l,WQ:()=>o,aI:()=>R,e$:()=>I,hG:()=>x,hZ:()=>i,hs:()=>m,l0:()=>P,qE:()=>s,t2:()=>S});var e=r(34727),a=r(34304);function u(t,n){return t[0]=n[0],t[1]=n[1],t}function i(t,n,r){return t[0]=n,t[1]=r,t}function o(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t}function c(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t}function f(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t}function h(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t}function l(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t}function s(t,n,r,a){return t[0]=(0,e.qE)(n[0],r[0],a[0]),t[1]=(0,e.qE)(n[1],r[1],a[1]),t}function M(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t}function m(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t}function b(t,n,r,e){return t[0]=n[0]+r[0]*e,t[1]=n[1]+r[1]*e,t}function d(t,n){let r=n[0]-t[0],e=n[1]-t[1];return Math.sqrt(r*r+e*e)}function x(t,n){let r=n[0]-t[0],e=n[1]-t[1];return r*r+e*e}function p(t){let n=t[0],r=t[1];return Math.sqrt(n*n+r*r)}function y(t){let n=t[0],r=t[1];return n*n+r*r}function v(t,n){let r=n[0],e=n[1],a=r*r+e*e;return a>0&&(a=1/Math.sqrt(a),t[0]=n[0]*a,t[1]=n[1]*a),t}function g(t,n){return t[0]*n[0]+t[1]*n[1]}function q(t,n,r,e){let a=n[0],u=n[1];return t[0]=a+e*(r[0]-a),t[1]=u+e*(r[1]-u),t}function P(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a+r[4],t[1]=r[1]*e+r[3]*a+r[5],t}function I(t,n,r,e){let a=n[0]-r[0],u=n[1]-r[1],i=Math.sin(e),o=Math.cos(e);return t[0]=a*o-u*i+r[0],t[1]=a*i+u*o+r[1],t}function S(t,n){return t[0]===n[0]&&t[1]===n[1]}function R(t,n){let r=t[0],e=t[1],u=n[0],i=n[1],o=(0,a.FD)();return Math.abs(r-u)<=o*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(e-i)<=o*Math.max(1,Math.abs(e),Math.abs(i))}const E=p,k=c,N=f,F=h,_=d,K=x,D=y;Object.freeze(Object.defineProperty({__proto__:null,add:o,angle:function(t,n){let r=t[0],e=t[1],a=n[0],u=n[1],i=r*r+e*e;i>0&&(i=1/Math.sqrt(i));let o=a*a+u*u;o>0&&(o=1/Math.sqrt(o));let c=(r*a+e*u)*i*o;return c>1?0:c<-1?Math.PI:Math.acos(c)},ceil:function(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t},clamp:s,copy:u,cross:function(t,n,r){let e=n[0]*r[1]-n[1]*r[0];return t[0]=t[1]=0,t[2]=e,t},dist:_,distance:d,div:F,divide:h,dot:g,equals:R,exactEquals:S,floor:function(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t},inverse:function(t,n){return t[0]=1/n[0],t[1]=1/n[1],t},len:E,length:p,lerp:q,max:l,min:function(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t},mul:N,multiply:f,negate:function(t,n){return t[0]=-n[0],t[1]=-n[1],t},normalize:v,projectAndScale:function(t,n,r,e,a){let u=n[0]-r[0],i=n[1]-r[1],o=(e[0]*u+e[1]*i)*(a-1);return u=e[0]*o,i=e[1]*o,t[0]=n[0]+u,t[1]=n[1]+i,t},random:function(t,n=1){let r=2*(0,a.Ov)()*Math.PI;return t[0]=Math.cos(r)*n,t[1]=Math.sin(r)*n,t},rotate:I,round:M,scale:m,scaleAndAdd:b,set:i,sqrDist:K,sqrLen:D,squaredDistance:x,squaredLength:y,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:k,subtract:c,transformMat2:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[2]*a,t[1]=r[1]*e+r[3]*a,t},transformMat2d:P,transformMat3:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[3]*a+r[6],t[1]=r[1]*e+r[4]*a+r[7],t},transformMat4:function(t,n,r){let e=n[0],a=n[1];return t[0]=r[0]*e+r[4]*a+r[12],t[1]=r[1]*e+r[5]*a+r[13],t}},Symbol.toStringTag,{value:"Module"})),r.d(n,["Il",0,E,"jb",0,k,"xg",0,_])},34727(t,n,r){r.d(n,{$8:()=>I,Cc:()=>o,Hx:()=>d,Io:()=>q,KJ:()=>h,OS:()=>E,Sp:()=>M,XM:()=>l,YN:()=>s,ZH:()=>b,b6:()=>P,cU:()=>a,gg:()=>m,hs:()=>c,kU:()=>f,mP:()=>i,or:()=>R,pF:()=>N,qE:()=>u});const e=new Float32Array(1);function a(t){--t;for(let n=1;n<32;n<<=1)t|=t>>n;return t+1}function u(t,n,r){return Math.min(Math.max(t,n),r)}function i(t,n){return 0===n?0:Math.ceil(t/n)*n}function o(t,n,r){return t+(n-t)*r}function c(t,n,r,e,a){return o(e,a,(t-n)/(r-n))}function f(t){return t*Math.PI/180}function h(t){return 180*t/Math.PI}function l(t){return Math.acos(u(t,-1,1))}function s(t){return Math.asin(u(t,-1,1))}function M(t,n,r=1e-6){return t===n||!(!Number.isFinite(t)||!Number.isFinite(n))&&(t>n?t-n:n-t)<=r}function m(t,n,r=1e-6){return!M(t,n,r)&&t>n}function b(t,n,r=1e-6){return!M(t,n,r)&&t<n}function d(t,n,r=1e-6){return M(t,n,r)||t>n}const x=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function p(t){return x.setFloat64(0,t),x.getBigInt64(0)}const y=1000000n,v=g(1);function g(t){let n=p(t=Math.abs(t)),r=function(t){return x.setBigInt64(0,t),x.getFloat64(0)}(n<=y?y:n-y);return Math.abs(t-r)}function q(t,n,r=v){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;if(null!=r&&g(Math.min(Math.abs(t),Math.abs(n)))<r)return Math.abs(t-n)<=r;let e=p(t),a=p(n);return!(e<0!=a<0||(e<a?a-e:e-a)>y)}function P(t,n,r=1e-6){if(t===n)return!0;if(!Number.isFinite(t)||!Number.isFinite(n))return!1;let e=Math.abs(t-n),a=Math.abs(t),u=Math.abs(n);if(0===t||0===n||a<1e-12&&u<1e-12){if(e>.01*r)return!1}else if(e/(a+u)>r)return!1;return!0}function I(t){return S(Math.max(-k,Math.min(t,k)))}function S(t){return e[0]=t,e[0]}function R(t){let n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],e=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(M(n,1)&&M(r,1)&&M(e,1))}function E(t,n){return(t%n+n)%n}const k=S(34028234663852886e22);function N(t,n,r){if(void 0===r||0==+r)return Math[t](n);if(n=+n,r=+r,isNaN(n)||"number"!=typeof r||r%1!=0)return NaN;let e=n.toString().split("e");return e=(n=Math[t](+(e[0]+"e"+(e[1]?+e[1]-r:-r)))).toString().split("e"),+(e[0]+"e"+(e[1]?+e[1]+r:r))}r.d(n,["pq",0,k])},19419(t,n,r){r.d(n,{$9:()=>P,C:()=>u,DC:()=>m,HY:()=>q,IO:()=>l,Ie:()=>S,Rj:()=>g,Uc:()=>v,VL:()=>b,VY:()=>o,Wc:()=>x,aI:()=>E,bx:()=>s,fA:()=>i,fT:()=>M,gR:()=>I,gX:()=>p,ib:()=>y,nw:()=>h,pJ:()=>k,tK:()=>f,uJ:()=>d,vt:()=>a,w1:()=>c}),r(34727);var e=r(5443);function a(t=F){return[t[0],t[1],t[2],t[3]]}function u(t,n){return t!==n&&(t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3]),t}function i(t,n,r,e,u=a()){return u[0]=t,u[1]=n,u[2]=r,u[3]=e,u}function o(t,n=a()){return n[0]=t.xmin,n[1]=t.ymin,n[2]=t.xmax,n[3]=t.ymax,n}function c(t,n,r=new e.A){return r.xmin=t[0],r.ymin=t[1],r.xmax=t[2],r.ymax=t[3],r.spatialReference=n,r}function f(t,n){n[0]<t[0]&&(t[0]=n[0]),n[0]>t[2]&&(t[2]=n[0]),n[1]<t[1]&&(t[1]=n[1]),n[1]>t[3]&&(t[3]=n[1])}function h(t,n){n<t[0]&&(t[0]=n),n>t[2]&&(t[2]=n)}function l(t,n){n<t[1]&&(t[1]=n),n>t[3]&&(t[3]=n)}function s(t,{xmin:n,ymin:r,xmax:e,ymax:a}){t[0]=Math.min(t[0],n),t[1]=Math.min(t[1],r),t[2]=Math.max(t[2],e),t[3]=Math.max(t[3],a)}function M(t,n,r){if(null!=n)if("length"in n)R(n)?(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[2]),r[3]=Math.max(t[3],n[3])):(2===n.length||3===n.length)&&(r[0]=Math.min(t[0],n[0]),r[1]=Math.min(t[1],n[1]),r[2]=Math.max(t[2],n[0]),r[3]=Math.max(t[3],n[1]));else switch(n.type){case"extent":r[0]=Math.min(t[0],n.xmin),r[1]=Math.min(t[1],n.ymin),r[2]=Math.max(t[2],n.xmax),r[3]=Math.max(t[3],n.ymax);break;case"point":r[0]=Math.min(t[0],n.x),r[1]=Math.min(t[1],n.y),r[2]=Math.max(t[2],n.x),r[3]=Math.max(t[3],n.y)}else u(r,t)}function m(t,n){t[0]=Math.min(t[0],n[0]),t[1]=Math.min(t[1],n[1]),t[2]=Math.max(t[2],n[2]),t[3]=Math.max(t[3],n[3])}function b(t){return null==t||t[0]>=t[2]?0:t[2]-t[0]}function d(t){return null==t||t[1]>=t[3]?0:t[3]-t[1]}function x(t){return b(t)*d(t)}function p(t,n=[0,0]){return n[0]=(t[0]+t[2])/2,n[1]=(t[1]+t[3])/2,n}function y(t){let n=b(t),r=d(t);return Math.sqrt(n*n+r*r)}function v(t,n){return g(t,n[0],n[1])}function g(t,n,r){return n>=t[0]&&r>=t[1]&&n<=t[2]&&r<=t[3]}function q(t,n){return Math.max(n[0],t[0])<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])<=Math.min(n[3],t[3])}function P(t,n,r){return Math.max(n[0],t[0])-r<=Math.min(n[2],t[2])&&Math.max(n[1],t[1])-r<=Math.min(n[3],t[3])}function I(t,n){return n[0]>=t[0]&&n[2]<=t[2]&&n[1]>=t[1]&&n[3]<=t[3]}function S(t){return t?u(t,N):a(N)}function R(t){return null!=t&&4===t.length}function E(t,n){return R(t)&&R(n)?t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]&&t[3]===n[3]:null==t&&null==n||t===n}function k(t,n){if(4!==n.length||t[0]===t[2]||t[1]===t[3])return!1;for(let r=0;r<n.length;r++){let e=n[r],a=n[(r+1)%n.length];if(e[0]!==t[0]&&e[0]!==t[2]||e[1]!==t[1]&&e[1]!==t[3])return!1;let u=e[1]===a[1]&&e[0]!==a[0],i=e[0]===a[0]&&e[1]!==a[1];if(!u&&!i)return!1}return!0}const N=[1/0,1/0,-1/0,-1/0],F=[0,0,0,0];r.d(n,["qv",0,N])},4305(t,n,r){r.d(n,{B4:()=>c,jK:()=>h,lM:()=>s,m_:()=>l,ty:()=>m});var e=r(34727),a=(r(37585),r(19419)),u=r(15507);const i=[0,0];function o(t){let n=1-t,r=n*n,e=t*t;return[r*n,3*t*r,3*e*n,e*t]}function c(t,n,r,e,a){let[u,i,c,f]=o(a);return[t[0]*u+n[0]*i+r[0]*c+e[0]*f,t[1]*u+n[1]*i+r[1]*c+e[1]*f]}function f(t,n,r,e,a){let[u,i,c,f]=o(a);return t*u+n*i+r*c+e*f}function h(t,n,r){let e=t,[a,o,c]=n.b,f=(0,u.RS)([0,0],e,o,r),h=(0,u.RS)(i,o,c,r),l=(0,u.RS)([0,0],c,a,r),s=(0,u.RS)([0,0],f,h,r),M=(0,u.RS)([0,0],h,l,r);return[{b:[(0,u.RS)([],s,M,r),f,s]},{b:[[...a],M,l]}]}function l(t,n,r){let a=t,[i,o,f]=n.b,h=(0,u.R)(r,[.1,.5,.9],t=>{let n=1-t,[r,e]=c(a,o,f,i,t);return[r,e,3*n*n*(o[0]-a[0])+6*n*t*(f[0]-o[0])+3*t*t*(i[0]-f[0]),3*n*n*(o[1]-a[1])+6*n*t*(f[1]-o[1])+3*t*t*(i[1]-f[1]),6*n*(f[0]-2*o[0]+a[0])+6*t*(i[0]-2*f[0]+o[0]),6*n*(f[1]-2*o[1]+a[1])+6*t*(i[1]-2*f[1]+o[1])]}).map(t=>Math.min(1,Math.max(0,t)));h.push(0,1);let l=1/0,s=h.map(t=>{let n=c(a,o,f,i,t),[e,u]=n,h=r[0]-e,s=r[1]-u,M=Math.sqrt(h*h+s*s);return l=Math.min(M,l),{t,curvePoint:n,distance:M}}),M=[];for(let t of s){let{t:n,distance:r}=t;(0,e.b6)(r,l)&&!M.some(({t})=>(0,e.Sp)(t,n))&&M.push(t)}return M}function s(t,n,r){let e=n,[u,i,o]=r.b;if((0,a.tK)(t,e),(0,a.tK)(t,u),(0,a.Rj)(t,i[0],i[1])&&(0,a.Rj)(t,o[0],o[1]))return t;for(let n of M(e[0],i[0],o[0],u[0]))n>0&&n<1&&(0,a.nw)(t,f(e[0],i[0],o[0],u[0],n));for(let n of M(e[1],i[1],o[1],u[1]))n>0&&n<1&&(0,a.IO)(t,f(e[1],i[1],o[1],u[1],n));return t}function M(t,n,r,e){let a=3*(3*(n-r)-t+e),u=6*(t-2*n+r),i=3*(n-t);if(0===a)return 0===u?[]:[-i/u];let o=Math.sqrt(u*u-4*a*i);return[(-u+o)/(2*a),(-u-o)/(2*a)]}function m(t,n,r){let e=0,a=[n];for(let n=0;n<16;n++){let n=t,i=[];for(let t of a)i.push(...h(n,t,.5)),n=t.b[0];a=i,n=t,e=0;let o=0;for(let t of a){let[r,a,i]=t.b,c=Math.sqrt((0,u.kb)(n,r));e+=(c+(Math.sqrt((0,u.kb)(n,a))+Math.sqrt((0,u.kb)(a,i))+Math.sqrt((0,u.kb)(i,r))))/2,o+=c,n=r}if(e-o<r)return e}return e}},513(t,n,r){r.d(n,{KP:()=>i,X0:()=>h,fM:()=>f,mq:()=>c,zW:()=>l});var e=r(19419),a=r(59803),u=r(15507);class i{constructor(t,n,r,e,a,u){this.cx=t,this.cy=n,this.radius=r,this.thetaStart=e,this.thetaEnd=a,this.isInvalid=u}get startPoint(){let{cx:t,cy:n,radius:r,thetaStart:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}get endPoint(){let{cx:t,cy:n,radius:r,thetaEnd:e}=this;return[t+r*Math.cos(e),n+r*Math.sin(e)]}}function o(t,n){let{cx:r,cy:e,radius:a}=t;return[r+a*Math.cos(n),e+a*Math.sin(n)]}function c(t,n){if(t.isInvalid)return(0,u.RS)([0,0],t.startPoint,t.endPoint,n);let{thetaStart:r,thetaEnd:e}=t;return o(t,r*(1-n)+e*n)}function f(t,n){if(t.isInvalid)return(0,a.T)(t.startPoint,t.endPoint,n);let{cx:r,cy:e,thetaStart:i,thetaEnd:c}=t,[f,h]=n,l=(0,u.Pf)((0,u.yN)(i,c),Math.atan2(h-e,f-r)),s=o(t,l);return{t:(l-i)/(c-i),curvePoint:s,distance:Math.sqrt((0,u.kb)(n,s))}}function h(t,n){if(n.isInvalid)return(0,e.tK)(t,n.startPoint),(0,e.tK)(t,n.endPoint),t;let{cx:r,cy:a,radius:i,thetaStart:c,thetaEnd:f}=n;(0,e.tK)(t,o(n,c)),(0,e.tK)(t,o(n,f));let h=(0,u.yN)(c,f),l=Math.PI/2,s=0;for(let n of[[r+i,a],[r,a+i],[r-i,a],[r,a-i]])s=(0,u.Cp)(h,s),s>h.min&&s<h.max&&(0,e.tK)(t,n),s+=l;return t}function l(t){if(t.isInvalid)return 2*t.radius;let{radius:n,thetaStart:r,thetaEnd:e}=t;return n*Math.abs(e-r)}},50954(t,n,r){r.d(n,{GX:()=>h,pM:()=>f});var e=r(77690),a=r(29242),u=(r(37585),r(513)),i=r(15507);const o=(0,a.vt)();function c(t,n,r){let[a,u]=t,[c,f]=n,[h,l]=r;(0,e.hZ)(o,a,c,h,u,f,l,1,1,1);let s=(0,e.a4)(o),M=4*s/((0,i.kb)(t,n)+(0,i.kb)(n,r)+(0,i.kb)(r,t));if(!isFinite(M)||Math.abs(M)<1e-8)return null;let m=a**2+u**2,b=c**2+f**2,d=h**2+l**2;(0,e.hZ)(o,m,b,d,u,f,l,1,1,1);let x=(0,e.a4)(o);return(0,e.hZ)(o,m,b,d,a,c,h,1,1,1),[x/s*.5,(0,e.a4)(o)/s*-.5]}function f(t,n){let[r,e]=n.c,a=c(t,e,r),o=null==a,f=a??(0,i.RS)([],t,r,.5),[h,l]=t,[s,M]=e,[m,b]=r,[d,x]=f,p=h-d,y=l-x,v=Math.sqrt(p*p+y*y),g=(0,i.t7)(l-x,h-d),q=(0,i.t7)(M-x,s-d),P=(0,i.t7)(b-x,m-d);return(q-g)*(P-q)<0&&(P+=2*Math.sign(g-P)*Math.PI),new u.KP(d,x,v,g,P,o)}function h(t,n,r){let e=(0,u.mq)(t,r/2),a=(0,u.mq)(t,r),i=(0,u.mq)(t,(r+1)/2);return[{c:[a,e]},{c:[[...n.c[0]],i]}]}},79567(t,n,r){r.d(n,{e:()=>h});var e=r(19419),a=r(4305),u=r(513),i=r(50954),o=r(52006),c=r(49663),f=r(46068);function h(t,n,r){if((0,o.Xq)(r))return(0,e.tK)(t,n),(0,e.tK)(t,r),t;if((0,o.n1)(r))return(0,a.lM)(t,n,r);if((0,o.aO)(r)){let e=(0,i.pM)(n,r);return(0,u.X0)(t,e)}if((0,o.DA)(r)){let e=(0,c.io)(n,r);return(0,u.X0)(t,e)}return(0,f.DL)(t,n,r)}},52006(t,n,r){function e(t){return"curveRings"in t&&!!t.curveRings?.length||"curvePaths"in t&&!!t.curvePaths?.length}function a(t){return"curveRings"in t?t.curveRings:t.curvePaths}function u(t){return"b"in t}function i(t){return"c"in t}function o(t){return Array.isArray(t)}function c(t){return"a"in t}function f(t){return"a"in t&&4===t.a.length}function h(t){return"a"in t&&7===t.a.length}function l(t,n){return a(t).flat().some(t=>function(t,n){return!(o(t)||(u(t)?n.has("cubic-bezier"):i(t)?n.has("circular-arc"):!f(t)&&!h(t)||n.has("elliptic-arc")))}(t,n))}function s(t){return o(t)?t:u(t)?t.b[0]:i(t)?t.c[0]:t.a[0]}function M(t){if(u(t)){let[n,r,e]=t.b;return{b:[[...n],[...r],[...e]]}}if(i(t)){let[n,r]=t.c;return{c:[[...n],[...r]]}}if(o(t))return[...t];if(f(t)){let[n,r,e,a]=t.a;return{a:[[...n],[...r],e,a]}}if(h(t)){let[n,r,e,a,u,i,o]=t.a;return{a:[[...n],[...r],e,a,u,i,o]}}return t}r.d(n,{DA:()=>f,Ed:()=>e,FD:()=>a,FG:()=>c,V8:()=>l,Xq:()=>o,aO:()=>i,n1:()=>u,tk:()=>M,wY:()=>h,yP:()=>s}),r(4576)},49663(t,n,r){r.d(n,{io:()=>i,xG:()=>o});var e=r(34727),a=(r(37585),r(513)),u=r(15507);function i(t,n){let[r,i,o,c]=n.a,[f,h]=t,[l,s]=r,[M,m]=i,b=f-M,d=h-m,x=Math.sqrt(b*b+d*d),p=l-M,y=s-m,v=Math.sqrt(p*p+y*y),g=0===x||0===v||!(0,e.b6)(x,v),q=x,[P,I]=(0,u.Gz)((0,u.t7)(h-m,f-M),Math.atan2(s-m,l-M),o,c);return new a.KP(M,m,q,P,I,g)}function o(t,n,r){let{cx:e,cy:u,thetaStart:i,thetaEnd:o}=t,[c,f,h,l]=n.a,s=i*(1-r)+o*r;return[{a:[(0,a.mq)(t,r),[e,u],+(Math.abs(s-i)<Math.PI),l]},{a:[[...c],[e,u],+(Math.abs(o-s)<Math.PI),l]}]}},46068(t,n,r){r.d(n,{DL:()=>M,ED:()=>l,SW:()=>c,Uk:()=>h,pb:()=>s,xm:()=>m}),r(77690);var e=r(29242),a=(r(37585),r(19419)),u=r(52006),i=r(15507);class o{constructor(t,n,r,e,a,u,i,o,c){this.cx=t,this.cy=n,this.a=r,this.b=e,this.cosR=a,this.sinR=u,this.u1=i,this.u2=o,this.isInvalid=c}}function c(t,n){let[r,e,a,u,c,f,h]=n.a,[l,s]=t,[M,m]=r,[b,d]=e,x=f*h,p=Math.cos(c),y=Math.sin(c),[v,g]=(0,i.Gz)((0,i.t7)(1/x*(s-d)*p-1/x*(l-b)*y,1/f*(s-d)*y+1/f*(l-b)*p),Math.atan2(1/x*(m-d)*p-1/x*(M-b)*y,1/f*(m-d)*y+1/f*(M-b)*p),a,u);return new o(b,d,f,x,p,y,v,g,0===f||0===x)}function f(t,n){let{a:r,b:e,cosR:a,sinR:u,cx:i,cy:o}=t,c=Math.cos(n),f=Math.sin(n);return[r*c*a-e*f*u+i,r*c*u+e*f*a+o]}function h(t,n){let{u1:r,u2:e}=t;return f(t,r*(1-n)+e*n)}function l(t,n,r){if(r<0||r>1)return[];if(0===r||1===r)return[(0,u.tk)(n)];let[e,[a,i],o,c,f,l,s]=n.a,{u1:M,u2:m}=t,b=M*(1-r)+m*r;return[{a:[[...h(t,r)],[a,i],+(Math.abs(b-M)<Math.PI),c,f,l,s]},{a:[[...e],[a,i],+(Math.abs(m-b)<Math.PI),c,f,l,s]}]}function s(t,n){let{a:r,b:e,cosR:a,sinR:u,u1:o,u2:c}=t,h=Math.PI/6,l=[1*h,2*h,4*h,5*h,7*h,8*h,10*h,11*h],s=(0,i.R)(n,l,n=>{let i=Math.cos(n),o=Math.sin(n),[c,h]=f(t,n);return[c,h,-r*a*o-e*u*i,-r*u*o+e*a*i,-r*a*i+e*u*o,-r*u*i-e*a*o]}),M=(0,i.yN)(o,c),m=new Set(s.map(t=>(0,i.Cp)(M,t)).filter(t=>t>M.min&&t<M.max));m.add(o),m.add(c);let b,d,x=1/0;for(let r of m){let e=f(t,r),[a,u]=e,i=n[0]-a,h=n[1]-u,l=i*i+h*h;l<x&&(b=(r-o)/(c-o),d=e,x=l)}return{t:b,curvePoint:d,distance:Math.sqrt(x)}}function M(t,n,r){let e=c(n,r),{a:u,b:o,u1:h,u2:l,cosR:s,sinR:M,isInvalid:m}=e,b=r.a[0];if((0,a.tK)(t,n),(0,a.tK)(t,b),m)return t;let d=Math.atan2(-o*M,u*s),x=d+Math.PI,p=Math.atan2(o*s,u*M),y=p+Math.PI,v=(0,i.yN)(h,l);for(let n of[d,x,p,y].map(t=>(0,i.Cp)(v,t)))n>v.min&&n<v.max&&(0,a.tK)(t,f(e,n));return t}function m(t,n,r){let[e,a,u,o,l,s,M]=n.a,m=c(t,n),{u1:b,u2:d,isInvalid:x}=m,p=d-b;if(x)return Math.sqrt((0,i.kb)(t,e));let y=[0,0],v=0,g=[h(m,0),h(m,.25),h(m,.5),h(m,.75),h(m,1)];for(let t=0;t<14;t++){let t=g.length-1,n=p/(2*t),e=[];for(let r=0;r<t;r++)e.push(g[r]),e.push(f(m,b+(2*r+1)*n));e.push(g[g.length-1]),g=e,v=0;let u=0;for(let t=1;t<g.length;t++){let n=g[t-1],r=g[t];if(v+=Math.sqrt((0,i.kb)(n,r)),t>1){let e=g[t-2],o=(0,i.M_)(y,e,n,a,r);u+=o?Math.sqrt((0,i.kb)(n,o)):Math.abs(r[0]-n[0])+Math.abs(r[1]-n[1])}else u+=v}if(u-v<r)return v}return v}(0,e.vt)(),(0,e.vt)(),(0,e.vt)(),(0,e.vt)()},59803(t,n,r){r.d(n,{T:()=>u});var e=r(34727),a=r(15507);function u(t,n,r){let[u,i]=t,[o,c]=n,[f,h]=r,[l,s]=[o-u,c-i],M=l*(f-u)+s*(h-i);M/=l**2+s**2,M=isNaN(M)?0:(0,e.qE)(M,0,1);let m=(0,a.RS)([0,0],t,n,M);return{t:M,curvePoint:m,distance:Math.sqrt((0,a.kb)(m,r))}}},15507(t,n,r){r.d(n,{Cp:()=>b,Gz:()=>m,M_:()=>c,Pf:()=>d,R:()=>x,RS:()=>u,kb:()=>i,t7:()=>h,yE:()=>o,yN:()=>M});var e=r(34727),a=r(37585);function u(t,n,r,e){return t[0]=n[0]*(1-e)+r[0]*e,t[1]=n[1]*(1-e)+r[1]*e,t}function i(t,n){return(0,a.hG)(t,n)}function o(t,n,r){let e=i(n,r);if(0===e)return i(n,t);let a=(n[0]-t[0])*(r[1]-t[1])-(n[1]-t[1])*(r[0]-t[0]);return a*a/e}function c(t,n,r,e,a){let[u,i]=n,[o,c]=r,[f,h]=e,[l,s]=a,M=(u-o)*(h-s)-(i-c)*(f-l);if(0===M)return null;let m=(u*c-i*o)*(f-l)-(u-o)*(f*s-h*l),b=(u*c-i*o)*(h-s)-(i-c)*(f*s-h*l);return t[0]=m/M,t[1]=b/M,t}const f=2*Math.PI;function h(t,n){let r=Math.atan2(t,n);return r<0?r+f:r}function l(t){return Math.abs(t)%f}function s(t){let n=l(t);return n<Math.PI?n:f-n}function M(t,n){return{min:Math.min(t,n),max:Math.max(t,n)}}function m(t,n,r,a){if((0,e.Sp)(l(t-n),0))return r?[t,t]:[t,a?t-f:t+f];let[u,i]=a?[t-f,t]:[t,t+f];return[t,b({min:u,max:i},n)]}function b({min:t,max:n},r){let e;return e=n-r,e>=f?(e-=e%f,r+e):(e=r-t,e>=f?(e-=e%f,r-e):r)}function d(t,n){let r=b(t,n);return r>t.min&&r<t.max?r:s(r-t.min)<s(r-t.max)?t.min:t.max}function x(t,n,r,e=10){return n.map(n=>{let a=n;for(let n=0;n<e;n++){let[n,e,u,i,o,c]=r(a),f=t[0]-n,h=t[1]-e,l=-u,s=-i;a+=-(2*f*l+2*h*s)/(2*l*l+2*f*-o+2*s*s+2*h*-c||1e-6)}return a})}}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[161],{51850(t,e,n){function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function a(t,e,n){return[t,e,n]}function u(t,e=[0,0,0]){let n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function s(){return o(1,1,1)}function l(){return o(1,0,0)}function f(){return o(0,1,0)}function c(){return o(0,0,1)}n.d(e,{CN:()=>a,ci:()=>u,fA:()=>o,o8:()=>i,vt:()=>r});const h=[0,0,0],m=s(),d=l(),M=f(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:d,UNIT_Y:M,UNIT_Z:g,ZEROS:h,clone:i,create:r,freeze:a,fromArray:u,fromValues:o,ones:s,unitX:l,unitY:f,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,g,"Cw",0,d,"JP",0,M,"Un",0,m,"uY",0,h])},34304(t,e,n){n.d(e,{DF:()=>s,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const o=Math.random,a=Math.PI/180,u=180/Math.PI;function s(t){return t*a}function l(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,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:s},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,o])},37585(t,e,n){n.d(e,{C:()=>o,Cc:()=>A,Io:()=>g,LI:()=>m,Ln:()=>M,Om:()=>v,Re:()=>s,S8:()=>w,T9:()=>c,WQ:()=>u,aI:()=>_,e$:()=>S,hG:()=>y,hZ:()=>a,hs:()=>d,l0:()=>x,qE:()=>h,t2:()=>I});var r=n(34727),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t}function a(t,e,n){return t[0]=e,t[1]=n,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function h(t,e,n,i){return t[0]=(0,r.qE)(e[0],n[0],i[0]),t[1]=(0,r.qE)(e[1],n[1],i[1]),t}function m(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function M(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function g(t,e){let n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function y(t,e){let n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function p(t){let e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function b(t){let e=t[0],n=t[1];return e*e+n*n}function w(t,e){let n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]}function A(t,e,n,r){let i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function x(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function S(t,e,n,r){let i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function I(t,e){return t[0]===e[0]&&t[1]===e[1]}function _(t,e){let n=t[0],r=t[1],o=e[0],a=e[1],u=(0,i.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))}const U=p,E=s,N=l,C=f,T=g,q=y,O=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){let n=t[0],r=t[1],i=e[0],o=e[1],a=n*n+r*r;a>0&&(a=1/Math.sqrt(a));let u=i*i+o*o;u>0&&(u=1/Math.sqrt(u));let s=(n*i+r*o)*a*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},clamp:h,copy:o,cross:function(t,e,n){let r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},dist:T,distance:g,div:C,divide:f,dot:v,equals:_,exactEquals:I,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:U,length:p,lerp:A,max:c,min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:N,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:w,projectAndScale:function(t,e,n,r,i){let o=e[0]-n[0],a=e[1]-n[1],u=(r[0]*o+r[1]*a)*(i-1);return o=r[0]*u,a=r[1]*u,t[0]=e[0]+o,t[1]=e[1]+a,t},random:function(t,e=1){let n=2*(0,i.Ov)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:S,round:m,scale:d,scaleAndAdd:M,set:a,sqrDist:q,sqrLen:O,squaredDistance:y,squaredLength:b,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:E,subtract:s,transformMat2:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:x,transformMat3:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,U,"jb",0,E,"xg",0,T])},35522(t,e,n){n.d(e,{$A:()=>I,Bw:()=>o,C:()=>a,Cc:()=>_,DI:()=>A,Io:()=>p,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>x,T9:()=>M,WQ:()=>s,Z0:()=>U,_S:()=>m,aI:()=>B,ei:()=>E,fw:()=>C,gL:()=>N,hG:()=>b,hZ:()=>u,hs:()=>g,jk:()=>d,lw:()=>f,m3:()=>w,oW:()=>F,t2:()=>O,tn:()=>h,ze:()=>v});var r=n(51850),i=n(34304);function o(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function l(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function m(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function M(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function p(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function b(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function w(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function A(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function x(t,e=t){let n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2];return t[0]=i*s-o*u,t[1]=o*a-r*s,t[2]=r*u-i*a,t}function _(t,e,n,r){let i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function U(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12],t[1]=n[1]*r+n[5]*i+n[9]*o+n[13],t[2]=n[2]*r+n[6]*i+n[10]*o+n[14],t}function E(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function N(t,e,n){return C(t,e,n[0],n[1],n[2],n[3])}function C(t,e,n,r,i,o){let a=e[0],u=e[1],s=e[2],l=r*s-i*u,f=i*a-n*s,c=n*u-r*a,h=r*c-i*f,m=i*l-n*c,d=n*f-r*l,M=2*o;return t[0]=a+l*M+2*h,t[1]=u+f*M+2*m,t[2]=s+c*M+2*d,t}const T=(0,r.vt)(),q=(0,r.vt)();function O(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function B(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=e[0],u=e[1],s=e[2],l=(0,i.FD)();return Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-s)<=l*Math.max(1,Math.abs(o),Math.abs(s))}function F(t,e,n){let r=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2],a=r*r+i*i+o*o;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=i*a,t[2]=o*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const z=l,P=f,L=c,R=p,V=b,D=o,W=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(t,e){x(T,t),x(q,e);let n=S(T,q);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,o){let a=1-o,u=a*a,s=o*o,l=u*a,f=3*o*u,c=3*s*a,h=s*o;return t[0]=e[0]*l+n[0]*f+r[0]*c+i[0]*h,t[1]=e[1]*l+n[1]*f+r[1]*c+i[1]*h,t[2]=e[2]*l+n[2]*f+r[2]*c+i[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:a,cross:I,crossAndNormalize:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2],l=i*s-o*u,f=o*a-r*s,c=r*u-i*a,h=Math.sqrt(l*l+f*f+c*c);return t[0]=l/h,t[1]=f/h,t[2]=c/h,t},direction:F,dist:R,distance:p,div:L,divide:c,dot:S,equals:B,exactEquals:O,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,o){let a=o*o,u=a*(2*o-3)+1,s=a*(o-2)+o,l=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*u+n[0]*s+r[0]*l+i[0]*f,t[1]=e[1]*u+n[1]*s+r[1]*l+i[1]*f,t[2]=e[2]*u+n[2]*s+r[2]*l+i[2]*f,t},inverse:A,len:D,length:o,lerp:_,max:M,min:d,mul:P,multiply:f,negate:v,normalize:x,random:function(t,e=1){let n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,a=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=o*e,t},rotateX:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,scaleTo:function(t,e){return g(t,t,e/D(t))},set:u,sign:m,sqrDist:V,sqrLen:W,squaredDistance:b,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:z,subtract:l,transformMat3:E,transformMat4:U,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:N,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,D,"jb",0,z,"lo",0,V,"uE",0,W])},34727(t,e,n){n.d(e,{$8:()=>S,Cc:()=>u,Hx:()=>g,Io:()=>A,KJ:()=>f,OS:()=>U,Sp:()=>m,XM:()=>c,YN:()=>h,ZH:()=>M,b6:()=>x,cU:()=>i,gg:()=>d,hs:()=>s,kU:()=>l,mP:()=>a,or:()=>_,pF:()=>N,qE:()=>o});const r=new Float32Array(1);function i(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function o(t,e,n){return Math.min(Math.max(t,e),n)}function a(t,e){return 0===e?0:Math.ceil(t/e)*e}function u(t,e,n){return t+(e-t)*n}function s(t,e,n,r,i){return u(r,i,(t-e)/(n-e))}function l(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function c(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function m(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function d(t,e,n=1e-6){return!m(t,e,n)&&t>e}function M(t,e,n=1e-6){return!m(t,e,n)&&t<e}function g(t,e,n=1e-6){return m(t,e,n)||t>e}const y=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function p(t){return y.setFloat64(0,t),y.getBigInt64(0)}const b=1000000n,w=v(1);function v(t){let e=p(t=Math.abs(t)),n=function(t){return y.setBigInt64(0,t),y.getFloat64(0)}(e<=b?b:e-b);return Math.abs(t-n)}function A(t,e,n=w){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&v(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;let r=p(t),i=p(e);return!(r<0!=i<0||(r<i?i-r:r-i)>b)}function x(t,e,n=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;let r=Math.abs(t-e),i=Math.abs(t),o=Math.abs(e);if(0===t||0===e||i<1e-12&&o<1e-12){if(r>.01*n)return!1}else if(r/(i+o)>n)return!1;return!0}function S(t){return I(Math.max(-E,Math.min(t,E)))}function I(t){return r[0]=t,r[0]}function _(t){let e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(e,1)&&m(n,1)&&m(r,1))}function U(t,e){return(t%e+e)%e}const E=I(34028234663852886e22);function N(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}n.d(e,["pq",0,E])},97146(t,e,n){n.d(e,{Dg:()=>o,lC:()=>u,my:()=>a,tM:()=>c,uW:()=>i});var r=n(34275);function i(t){return o(t,!0)}function o(t,e){if(Array.isArray(t)){if(t.length<1024)return t}else if(t.length<1024)return Array.from(t);let n=!0,i=!0;return t.some((t,e)=>(n&&=0===t,i&&=t===e,!n&&!i)),n?function(t){if(1===t)return l;if(t<1024)return Array(t).fill(0);if(t>m.length){let e=Math.max(2*m.length,t);m=new Uint8Array(e)}return new Uint8Array(m.buffer,0,t)}(t.length):i?c(t.length):(0,r.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(let n of t){if(n>=65536)return(0,r.iu)(t)?t:new Uint32Array(t);n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function a(t,e=t){return t<=1024?Array(t):e<=65536?new Uint16Array(t):new Uint32Array(t)}function u(t,e,n){if(0===e.length)return t.slice();if(0===t.length)return e.slice();let r=a(t.length+e.length,n);for(let e=0;e<t.length;++e)r[e]=t[e];for(let n=0;n<e.length;++n)r[t.length+n]=e[n];return r}let s=h(131072);const l=[0],f=(()=>{let t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function c(t){return 1===t?l:t<1024?Array.from(new Uint16Array(f.buffer,0,t)):t<f.length?new Uint16Array(f.buffer,0,t):(t>s.length&&(s=h(Math.max(2*s.length,t))),new Uint32Array(s.buffer,0,t))}function h(t){let e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let m=new Uint8Array(65536)},10614(t,e,n){n.d(e,{Tz:()=>a,aT:()=>o});var r=n(34727),i=n(35522);function o(t,e,n,r,i,o=2,a=0){let s=1/(Math.abs(n)+Math.abs(r)+Math.abs(i)),l=n*s,f=r*s,c=i<=0?(l>=0?1:-1)*(1-Math.abs(f)):l,h=i<=0?(f>=0?1:-1)*(1-Math.abs(l)):f,m=e*o+a;t[m]=u(c),t[m+1]=u(h)}function a(t,e,n,r=2,o=0){let a=n*r+o,u=s(e[a]),l=s(e[a+1]),f=1-Math.abs(u)-Math.abs(l);return t[2]=f,f<0?(t[0]=(u>=0?1:-1)*(1-Math.abs(l)),t[1]=(l>=0?1:-1)*(1-Math.abs(u))):(t[0]=u,t[1]=l),(0,i.S8)(t,t)}function u(t){return(0,r.qE)(Math.round(32767*t),-32767,32767)}function s(t){return(0,r.qE)(t/32767,-1,1)}n(51850)},99058(t,e,n){n.d(e,{I$:()=>y,gr:()=>w,In:()=>v});var r=n(4431),i=n(1843),o=n(63907);class a{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=o.ld.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=s[t],this.channels=u[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const u={36244:1,33320:2,36249:4},s={[o.H0.R32UI]:36244,[o.H0.RG32UI]:33320,[o.H0.RGBA32UI]:36249},l=[new a(o.H0.RGBA32UI),new a(o.H0.RG32UI),new a(o.H0.R32UI)];function f(t){let e=1/0,n=null;for(let r of l){let i=r.byteStride,o=(i-t%i)%i;o<e&&(e=o,n=r)}return n??l[2]}var c=n(13030),h=n(90239);class m{constructor(t,e,n){this.elementCount=t,this.elementType=e,this.bufferViewConstructor=n,this.byteSize=function(t){return(0,h.GJ)(t.ElementType)*t.ElementCount}(n)}}const d={u8:new m(1,"uint",c.SL),u32:new m(1,"uint",c.P),vec4u32:new m(4,"uint",c.ml),vec4u8:new m(4,"uint",c.XP),unorm8:new m(1,"float",c.dy),vec4unorm8:new m(4,"float",c.td),snorm16:new m(1,"float",c.Qy),vec2snorm16:new m(2,"float",c.ES),f16:new m(1,"float",c.XW),vec4f16:new m(4,"float",c.jz),f32:new m(1,"float",c.Y$),vec2f32:new m(2,"float",c.gH),vec3f32:new m(3,"float",c.xs),vec4f32:new m(4,"float",c.Eq),mat3f32:new m(9,"float",c.jZ)};class M{constructor(t,e,n,r){this._declaration=t,this._byteOffset=e,this._creationInfo=r,this._startTexel=Math.floor(e/n);let i=r.byteSize;this._numTexels=Math.ceil((e+i)/n)-this._startTexel,this._texelByteStride=n}get name(){return this._declaration.name}get fieldType(){return this._declaration.type}get byteOffset(){return this._byteOffset}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get texelByteStride(){return this._texelByteStride}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get byteSize(){return this._creationInfo.byteSize}get bufferViewConstructor(){return this._creationInfo.bufferViewConstructor}}class g{constructor(t,e,n,r=0){this.layout=t,this.byteOffset=r,this._bufferViews=new Map,this.buffer="number"==typeof e?new ArrayBuffer(e*t.byteStride):e,this.texelElementBuffer=new n(this.buffer,r);let i=this._bufferViews;for(let[t,e]of this.layout.fields)i.set(t,new e.bufferViewConstructor(this.buffer,r+e.byteOffset,this.layout.byteStride))}get stride(){return this.layout.byteStride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(t,e){let n=this._bufferViews.get(t);return null!=n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}copyItem(t,e){let{buffer:n,layout:r,byteOffset:i}=this,o=new Uint8Array(n),a=r.byteStride,u=i+t*a,s=i+e*a;o.copyWithin(s,u,u+a)}get usedMemory(){return this.byteLength}}const y=(0,i.BP)().vec3f("position").u16("componentIndex",{integer:!0}).freeze(),p=(0,i.BP)().vec2u8("sideness").freeze(),b=(0,r.U)(p),w=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),v=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),A=(0,r.U)(w,1),x=(0,r.U)(v,1);b.concat(A),b.concat(x),new class{constructor(t){this._fields=new Map;let e=0,n=[];for(let r=0;r<t.length;++r){let i=t[r],{type:o}=i,a=d[o];n.push({declaration:i,byteOffset:e,creationInfo:a}),e+=a.byteSize}this.texelFormatInfo=f(e);let{texelByteStride:r}=this;e=Math.ceil(e/r)*r;let i=e,o=this._fields;for(let{declaration:t,byteOffset:e,creationInfo:i}of n)o.set(t.name,new M(t,e,r,i));this.byteStride=i,this.texelStride=Math.ceil(i/r)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(t){return new g(this,t,this.texelElementArrayConstructor)}createView(t,e){return new g(this,t,this.texelElementArrayConstructor,e)}}([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},93406(t,e,n){n.d(e,{K:()=>u});var r=n(34727),i=n(15142),o=n(35522),a=n(51850);function u(t,e,n){let r=t.vertices.position,i=t.vertices.componentIndex,a=d.position0,u=d.position1,f=d.faceNormal0,h=d.faceNormal1,{edges:m,normals:M}=l(t),g=m.length/4,y=e.allocate(g),p=0,b=g,A=n?.allocate(b),S=0,I=0,_=0;c.length=0;for(let t=0;t<g;++t){let e=4*t;r.getVec(m.data[e],a),r.getVec(m.data[e+1],u);let n=c.pushNew();n.index=4*t,n.length=(0,o.Io)(a,u)}c.sort((t,e)=>e.length-t.length);let U=[],E=[];c.forAll(({length:t,index:l})=>{let c=m.data[l],g=m.data[l+1],b=m.data[l+2],N=m.data[l+3],C=-1===N;if(r.getVec(c,a),r.getVec(g,u),C){let t=3*b;(0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),(0,o.C)(h,f),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h)}else{let t=3*b;if((0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),t=3*N,(0,o.hZ)(h,M.data[t],M.data[t+1],M.data[t+2]),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h),function(t,e){return t.cosAngle>e}(d,v))return;d.cosAngle<-.9999&&(0,o.C)(h,f)}I+=t,_++,C||function(t,e){return t.cosAngle<e}(d,x)?(e.write(y,p++,d),U.push(t)):s(d,w)&&(A&&n&&n.write(A,S++,d),E.push(t))});let N=new Float32Array(U.reverse()),C=new Float32Array(E.reverse()),T=A&&n?{instancesData:A.slice(0,S),lodInfo:{lengths:C}}:void 0;return{regular:{instancesData:y.slice(0,p),lodInfo:{lengths:N}},silhouette:T,averageEdgeLength:I/_}}function s(t,e){let n=(0,r.XM)(t.cosAngle);return(0,o.oW)(g,t.position1,t.position0),n*((0,o.Om)((0,o.$A)(M,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>e}function l(t){let e=t.faces.length/3,n=t.faces,r=t.neighbors,i=t.vertices.position;h.length=m.length=0;for(let t=0;t<e;t++){let e=3*t,a=r[e],u=r[e+1],s=r[e+2],l=n[e],f=n[e+1],c=n[e+2];i.getVec(l,y),i.getVec(f,p),i.getVec(c,b),(0,o.Re)(p,p,y),(0,o.Re)(b,b,y),(0,o.$A)(y,p,b),(0,o.S8)(y,y),m.pushArray(y),(-1===a||l<f)&&(h.push(l),h.push(f),h.push(t),h.push(a)),(-1===u||f<c)&&(h.push(f),h.push(c),h.push(t),h.push(u)),(-1===s||c<l)&&(h.push(c),h.push(l),h.push(t),h.push(s))}return{edges:h,normals:m}}class f{constructor(){this.index=0,this.length=0}}const c=new i.A({allocator:t=>t||new f,deallocator:null}),h=new i.A({deallocator:null}),m=new i.A({deallocator:null}),d=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},M=(0,a.vt)(),g=(0,a.vt)(),y=(0,a.vt)(),p=(0,a.vt)(),b=(0,a.vt)(),w=(0,r.kU)(4),v=Math.cos(w),A=(0,r.kU)(35),x=Math.cos(A)},44801(t,e,n){n.d(e,{o6:()=>U,HY:()=>O,hx:()=>E,Jb:()=>q});var r=n(34727),i=n(97146);function o(t,e,n){let o=Array.isArray(t),f=o?t.length/e:t.byteLength/(4*e),c=o?t:new Uint32Array(t,0,f*e),h=n?.minReduction??0,m=n?.originalIndices||null,d=m?m.length:0,M=n?.componentOffsets||null,g=0;if(M)for(let t=0;t<M.length-1;t++){let e=M[t+1]-M[t];e>g&&(g=e)}else g=f;let y=Math.floor(1.1*g)+1;(null==l||l.length<2*y)&&(l=new Uint32Array((0,r.cU)(2*y)));for(let t=0;t<2*y;t++)l[t]=0;let p=0,b=!!M&&!!m,w=b?d:f,v=(0,i.my)(f),A=new Uint32Array(d),x=1.96,S=0===h?w:Math.ceil(4*x*x/(h*h)*h*(1-h)),I=1,_=M?M[1]:w;for(let t=0;t<w;t++){if(t===S){let e=1-p/t;if(e+x*Math.sqrt(e*(1-e)/t)<h)return null;S*=2}if(t===_){for(let t=0;t<2*y;t++)l[t]=0;if(m)for(let t=M[I-1];t<M[I];t++)A[t]=v[m[t]];_=M[++I]}let n=b?m[t]:t,r=n*e,i=s(c,r,e),o=i%y,u=p;for(;0!==l[2*o+1];){if(l[2*o]===i){let t=l[2*o+1]-1;if(a(c,r,t*e,e)){u=v[t];break}}o++,o>=y&&(o-=y)}u===p&&(l[2*o]=i,l[2*o+1]=n+1,p++),v[n]=u}if(0!==h&&1-p/f<h)return null;if(b){for(let t=M[I-1];t<A.length;t++)A[t]=v[m[t]];v=(0,i.uW)(A)}let U=o?Array(p):new Uint32Array(p*e);p=0;for(let t=0;t<w;t++)v[t]===p&&(u(c,(b?m[t]:t)*e,U,p*e,e),p++);if(m&&!b){let t=new Uint32Array(d);for(let e=0;e<t.length;e++)t[e]=v[m[e]];v=(0,i.uW)(t)}return{buffer:Array.isArray(U)?U:U.buffer,indices:v,uniqueCount:p}}function a(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function u(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function s(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null;function f(t,e,n){let r=e/3,i=new Uint32Array(n+1),o=new Uint32Array(n+1),a=(t,e)=>{t<e?i[t+1]++:o[e+1]++};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];a(n,r),a(r,i),a(i,n)}let u=0,s=0;for(let t=0;t<n;t++){let e=i[t+1],n=o[t+1];i[t+1]=u,o[t+1]=s,u+=e,s+=n}let l=new Uint32Array(6*r),f=i[n],c=(t,e,n)=>{if(t<e){let r=i[t+1]++;l[2*r]=e,l[2*r+1]=n}else{let r=o[e+1]++;l[2*f+2*r]=t,l[2*f+2*r+1]=n}};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];c(n,r,e),c(r,i,e),c(i,n,e)}let h=(t,e)=>{let n=2*t,r=e-t;for(let t=1;t<r;t++){let e=l[n+2*t],r=l[n+2*t+1],i=t-1;for(;i>=0&&l[n+2*i]>e;i--)l[n+2*i+2]=l[n+2*i],l[n+2*i+3]=l[n+2*i+1];l[n+2*i+2]=e,l[n+2*i+3]=r}};for(let t=0;t<n;t++)h(i[t],i[t+1]),h(f+o[t],f+o[t+1]);let m=new Int32Array(3*r),d=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,M=(t,e)=>{let n=d(t,e);m[3*e+n]=-1},g=(t,e,n,r)=>{let i=d(t,e);m[3*e+i]=r;let o=d(n,r);m[3*r+o]=e};for(let t=0;t<n;t++){let e=i[t],n=i[t+1],r=o[t],a=o[t+1];for(;e<n&&r<a;){let n=l[2*e],i=l[2*f+2*r];n===i?(g(t,l[2*e+1],i,l[2*f+2*r+1]),e++,r++):n<i?(M(t,l[2*e+1]),e++):(M(i,l[2*f+2*r+1]),r++)}for(;e<n;)M(t,l[2*e+1]),e++;for(;r<a;)M(l[2*f+2*r],l[2*f+2*r+1]),r++}return m}var c=n(1843),h=n(99058),m=n(87811),d=n(35522),M=n(51850),g=n(10614);class y{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:v}write(t,e,n){I.seed=this._edgeHashFunction(n);let r=I.getIntRange(0,255),i=I.getIntRange(0,this.settings.variants-1),o=I.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(o/.7,1))+Math.max(0,o-.7)/.30000000000000004)+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,r),t.variantStroke.set(e,i),t.variantExtension.set(e,a)}}const p=new Float32Array(6),b=new Uint32Array(p.buffer),w=new Uint32Array(1);function v(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],w[0]=31*(31*(31*(31*(31*(166811+b[0])+b[1])+b[2])+b[3])+b[4])+b[5],w[0]}function A(t){let e=p;e[0]=x(t.position0[0]),e[1]=x(t.position0[1]),e[2]=x(t.position0[2]),e[3]=x(t.position1[0]),e[4]=x(t.position1[1]),e[5]=x(t.position1[2]),w[0]=5381;for(let t=0;t<b.length;t++)w[0]=31*w[0]+b[t];return w[0]}function x(t){return Math.round(1e4*t)/1e4}const S=(0,M.vt)(),I=new m.A;var _=n(93406);function U(t){let e=E(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return C.updateSettings(t.writerSettings),T.updateSettings(t.writerSettings),(0,_.K)(e,C,T)}function E(t,e,n,r){if(e){let e=f(n,r,t.count);return new N(n,r,e,t)}let i=o(t.buffer,t.stride/4,{originalIndices:n}),a=f(i.indices,r,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:a,vertices:h.I$.createView(i.buffer)}}class N{constructor(t,e,n,r){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=r}}const C=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,d.WQ)(S,n.faceNormal0,n.faceNormal1),(0,d.S8)(S,S);let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,S[0],S[1],S[2],i)}},T=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],i)}{let{typedBuffer:r,typedBufferStride:i}=t.normal2Compressed;(0,g.aT)(r,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],i)}}},q=(0,c.BP)().vec3f("position0").vec3f("position1"),O=(0,c.BP)().vec3f("position0").vec3f("position1").u16("componentIndex",{integer:!0})}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[161],{51850(t,e,n){function r(){return[0,0,0]}function i(t){return[t[0],t[1],t[2]]}function o(t,e,n){return[t,e,n]}function a(t,e,n){return[t,e,n]}function u(t,e=[0,0,0]){let n=Math.min(3,t.length);for(let r=0;r<n;++r)e[r]=t[r];return e}function s(){return o(1,1,1)}function l(){return o(1,0,0)}function f(){return o(0,1,0)}function c(){return o(0,0,1)}n.d(e,{CN:()=>a,ci:()=>u,fA:()=>o,o8:()=>i,vt:()=>r});const h=[0,0,0],m=s(),d=l(),M=f(),g=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_X:d,UNIT_Y:M,UNIT_Z:g,ZEROS:h,clone:i,create:r,freeze:a,fromArray:u,fromValues:o,ones:s,unitX:l,unitY:f,unitZ:c,zeros:function(){return[0,0,0]}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Cb",0,g,"Cw",0,d,"JP",0,M,"Un",0,m,"uY",0,h])},34304(t,e,n){n.d(e,{DF:()=>s,FD:()=>i,ct:()=>l});let r=1e-6;function i(){return r}const o=Math.random,a=Math.PI/180,u=180/Math.PI;function s(t){return t*a}function l(t){return t*u}Object.freeze(Object.defineProperty({__proto__:null,RANDOM:o,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:s},Symbol.toStringTag,{value:"Module"})),n.d(e,["Ov",0,o])},37585(t,e,n){n.d(e,{C:()=>o,Cc:()=>A,Io:()=>g,LI:()=>m,Ln:()=>M,Om:()=>v,Re:()=>s,S8:()=>w,T9:()=>c,WQ:()=>u,aI:()=>_,e$:()=>S,hG:()=>y,hZ:()=>a,hs:()=>d,l0:()=>x,qE:()=>h,t2:()=>I});var r=n(34727),i=n(34304);function o(t,e){return t[0]=e[0],t[1]=e[1],t}function a(t,e,n){return t[0]=e,t[1]=n,t}function u(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t}function s(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t}function l(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t}function f(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t}function c(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t}function h(t,e,n,i){return t[0]=(0,r.qE)(e[0],n[0],i[0]),t[1]=(0,r.qE)(e[1],n[1],i[1]),t}function m(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t}function d(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t}function M(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t}function g(t,e){let n=e[0]-t[0],r=e[1]-t[1];return Math.sqrt(n*n+r*r)}function y(t,e){let n=e[0]-t[0],r=e[1]-t[1];return n*n+r*r}function p(t){let e=t[0],n=t[1];return Math.sqrt(e*e+n*n)}function b(t){let e=t[0],n=t[1];return e*e+n*n}function w(t,e){let n=e[0],r=e[1],i=n*n+r*r;return i>0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t}function v(t,e){return t[0]*e[0]+t[1]*e[1]}function A(t,e,n,r){let i=e[0],o=e[1];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t}function x(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t}function S(t,e,n,r){let i=e[0]-n[0],o=e[1]-n[1],a=Math.sin(r),u=Math.cos(r);return t[0]=i*u-o*a+n[0],t[1]=i*a+o*u+n[1],t}function I(t,e){return t[0]===e[0]&&t[1]===e[1]}function _(t,e){let n=t[0],r=t[1],o=e[0],a=e[1],u=(0,i.FD)();return Math.abs(n-o)<=u*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(r-a)<=u*Math.max(1,Math.abs(r),Math.abs(a))}const U=p,E=s,N=l,C=f,T=g,q=y,O=b;Object.freeze(Object.defineProperty({__proto__:null,add:u,angle:function(t,e){let n=t[0],r=t[1],i=e[0],o=e[1],a=n*n+r*r;a>0&&(a=1/Math.sqrt(a));let u=i*i+o*o;u>0&&(u=1/Math.sqrt(u));let s=(n*i+r*o)*a*u;return s>1?0:s<-1?Math.PI:Math.acos(s)},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t},clamp:h,copy:o,cross:function(t,e,n){let r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},dist:T,distance:g,div:C,divide:f,dot:v,equals:_,exactEquals:I,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t},inverse:function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t},len:U,length:p,lerp:A,max:c,min:function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t},mul:N,multiply:l,negate:function(t,e){return t[0]=-e[0],t[1]=-e[1],t},normalize:w,projectAndScale:function(t,e,n,r,i){let o=e[0]-n[0],a=e[1]-n[1],u=(r[0]*o+r[1]*a)*(i-1);return o=r[0]*u,a=r[1]*u,t[0]=e[0]+o,t[1]=e[1]+a,t},random:function(t,e=1){let n=2*(0,i.Ov)()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},rotate:S,round:m,scale:d,scaleAndAdd:M,set:a,sqrDist:q,sqrLen:O,squaredDistance:y,squaredLength:b,str:function(t){return"vec2("+t[0]+", "+t[1]+")"},sub:E,subtract:s,transformMat2:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},transformMat2d:x,transformMat3:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},transformMat4:function(t,e,n){let r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t}},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,U,"jb",0,E,"xg",0,T])},35522(t,e,n){n.d(e,{$A:()=>I,Bw:()=>o,C:()=>a,Cc:()=>_,DI:()=>A,Io:()=>p,Ln:()=>y,Om:()=>S,Qr:()=>c,Re:()=>l,S8:()=>x,T9:()=>M,WQ:()=>s,Z0:()=>U,_S:()=>m,aI:()=>B,ei:()=>E,fw:()=>C,gL:()=>N,hG:()=>b,hZ:()=>u,hs:()=>g,jk:()=>d,lw:()=>f,m3:()=>w,oW:()=>F,t2:()=>O,tn:()=>h,ze:()=>v});var r=n(51850),i=n(34304);function o(t){let e=t[0],n=t[1],r=t[2];return Math.sqrt(e*e+n*n+r*r)}function a(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function u(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t}function s(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t}function l(t,e,n){return t[0]=e[0]-n[0],t[1]=e[1]-n[1],t[2]=e[2]-n[2],t}function f(t,e,n){return t[0]=e[0]*n[0],t[1]=e[1]*n[1],t[2]=e[2]*n[2],t}function c(t,e,n){return t[0]=e[0]/n[0],t[1]=e[1]/n[1],t[2]=e[2]/n[2],t}function h(t,e){return t[0]=Math.abs(e[0]),t[1]=Math.abs(e[1]),t[2]=Math.abs(e[2]),t}function m(t,e){return t[0]=Math.sign(e[0]),t[1]=Math.sign(e[1]),t[2]=Math.sign(e[2]),t}function d(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t}function M(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t}function g(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t}function y(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t}function p(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return Math.sqrt(n*n+r*r+i*i)}function b(t,e){let n=e[0]-t[0],r=e[1]-t[1],i=e[2]-t[2];return n*n+r*r+i*i}function w(t){let e=t[0],n=t[1],r=t[2];return e*e+n*n+r*r}function v(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t}function A(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t}function x(t,e=t){let n=e[0],r=e[1],i=e[2],o=n*n+r*r+i*i;return o>0&&(o=1/Math.sqrt(o),t[0]=e[0]*o,t[1]=e[1]*o,t[2]=e[2]*o),t}function S(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function I(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2];return t[0]=i*s-o*u,t[1]=o*a-r*s,t[2]=r*u-i*a,t}function _(t,e,n,r){let i=e[0],o=e[1],a=e[2];return t[0]=i+r*(n[0]-i),t[1]=o+r*(n[1]-o),t[2]=a+r*(n[2]-a),t}function U(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=n[0]*r+n[4]*i+n[8]*o+n[12],t[1]=n[1]*r+n[5]*i+n[9]*o+n[13],t[2]=n[2]*r+n[6]*i+n[10]*o+n[14],t}function E(t,e,n){let r=e[0],i=e[1],o=e[2];return t[0]=r*n[0]+i*n[3]+o*n[6],t[1]=r*n[1]+i*n[4]+o*n[7],t[2]=r*n[2]+i*n[5]+o*n[8],t}function N(t,e,n){return C(t,e,n[0],n[1],n[2],n[3])}function C(t,e,n,r,i,o){let a=e[0],u=e[1],s=e[2],l=r*s-i*u,f=i*a-n*s,c=n*u-r*a,h=r*c-i*f,m=i*l-n*c,d=n*f-r*l,M=2*o;return t[0]=a+l*M+2*h,t[1]=u+f*M+2*m,t[2]=s+c*M+2*d,t}const T=(0,r.vt)(),q=(0,r.vt)();function O(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]}function B(t,e){if(t===e)return!0;let n=t[0],r=t[1],o=t[2],a=e[0],u=e[1],s=e[2],l=(0,i.FD)();return Math.abs(n-a)<=l*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-u)<=l*Math.max(1,Math.abs(r),Math.abs(u))&&Math.abs(o-s)<=l*Math.max(1,Math.abs(o),Math.abs(s))}function F(t,e,n){let r=n[0]-e[0],i=n[1]-e[1],o=n[2]-e[2],a=r*r+i*i+o*o;return a>0?(a=1/Math.sqrt(a),t[0]=r*a,t[1]=i*a,t[2]=o*a,t):(t[0]=0,t[1]=0,t[2]=0,t)}const z=l,P=f,L=c,R=p,V=b,D=o,W=w;Object.freeze(Object.defineProperty({__proto__:null,abs:h,add:s,angle:function(t,e){x(T,t),x(q,e);let n=S(T,q);return n>1?0:n<-1?Math.PI:Math.acos(n)},bezier:function(t,e,n,r,i,o){let a=1-o,u=a*a,s=o*o,l=u*a,f=3*o*u,c=3*s*a,h=s*o;return t[0]=e[0]*l+n[0]*f+r[0]*c+i[0]*h,t[1]=e[1]*l+n[1]*f+r[1]*c+i[1]*h,t[2]=e[2]*l+n[2]*f+r[2]*c+i[2]*h,t},ceil:function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},clamp:function(t,e=0,n=1){return t[0]=Math.min(Math.max(t[0],e),n),t[1]=Math.min(Math.max(t[1],e),n),t[2]=Math.min(Math.max(t[2],e),n),t},copy:a,cross:I,crossAndNormalize:function(t,e,n){let r=e[0],i=e[1],o=e[2],a=n[0],u=n[1],s=n[2],l=i*s-o*u,f=o*a-r*s,c=r*u-i*a,h=Math.sqrt(l*l+f*f+c*c);return t[0]=l/h,t[1]=f/h,t[2]=c/h,t},direction:F,dist:R,distance:p,div:L,divide:c,dot:S,equals:B,exactEquals:O,floor:function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},hermite:function(t,e,n,r,i,o){let a=o*o,u=a*(2*o-3)+1,s=a*(o-2)+o,l=a*(o-1),f=a*(3-2*o);return t[0]=e[0]*u+n[0]*s+r[0]*l+i[0]*f,t[1]=e[1]*u+n[1]*s+r[1]*l+i[1]*f,t[2]=e[2]*u+n[2]*s+r[2]*l+i[2]*f,t},inverse:A,len:D,length:o,lerp:_,max:M,min:d,mul:P,multiply:f,negate:v,normalize:x,random:function(t,e=1){let n=i.Ov,r=2*n()*Math.PI,o=2*n()-1,a=Math.sqrt(1-o*o)*e;return t[0]=Math.cos(r)*a,t[1]=Math.sin(r)*a,t[2]=o*e,t},rotateX:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0],o[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),o[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateY:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),o[1]=i[1],o[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},rotateZ:function(t,e,n,r){let i=[],o=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],o[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),o[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),o[2]=i[2],t[0]=o[0]+n[0],t[1]=o[1]+n[1],t[2]=o[2]+n[2],t},round:function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},scale:g,scaleAndAdd:y,scaleTo:function(t,e){return g(t,t,e/D(t))},set:u,sign:m,sqrDist:V,sqrLen:W,squaredDistance:b,squaredLength:w,str:function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},sub:z,subtract:l,transformMat3:E,transformMat4:U,transformMat4Z:function(t,e){return e[2]*t[0]+e[6]*t[1]+e[10]*t[2]+e[14]},transformQuat:N,transformQuatValues:C},Symbol.toStringTag,{value:"Module"})),n.d(e,["Il",0,D,"jb",0,z,"lo",0,V,"uE",0,W])},34727(t,e,n){n.d(e,{$8:()=>S,Cc:()=>u,Hx:()=>g,Io:()=>A,KJ:()=>f,OS:()=>U,Sp:()=>m,XM:()=>c,YN:()=>h,ZH:()=>M,b6:()=>x,cU:()=>i,gg:()=>d,hs:()=>s,kU:()=>l,mP:()=>a,or:()=>_,pF:()=>N,qE:()=>o});const r=new Float32Array(1);function i(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function o(t,e,n){return Math.min(Math.max(t,e),n)}function a(t,e){return 0===e?0:Math.ceil(t/e)*e}function u(t,e,n){return t+(e-t)*n}function s(t,e,n,r,i){return u(r,i,(t-e)/(n-e))}function l(t){return t*Math.PI/180}function f(t){return 180*t/Math.PI}function c(t){return Math.acos(o(t,-1,1))}function h(t){return Math.asin(o(t,-1,1))}function m(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}function d(t,e,n=1e-6){return!m(t,e,n)&&t>e}function M(t,e,n=1e-6){return!m(t,e,n)&&t<e}function g(t,e,n=1e-6){return m(t,e,n)||t>e}const y=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function p(t){return y.setFloat64(0,t),y.getBigInt64(0)}const b=1000000n,w=v(1);function v(t){let e=p(t=Math.abs(t)),n=function(t){return y.setBigInt64(0,t),y.getFloat64(0)}(e<=b?b:e-b);return Math.abs(t-n)}function A(t,e,n=w){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&v(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;let r=p(t),i=p(e);return!(r<0!=i<0||(r<i?i-r:r-i)>b)}function x(t,e,n=1e-6){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;let r=Math.abs(t-e),i=Math.abs(t),o=Math.abs(e);if(0===t||0===e||i<1e-12&&o<1e-12){if(r>.01*n)return!1}else if(r/(i+o)>n)return!1;return!0}function S(t){return I(Math.max(-E,Math.min(t,E)))}function I(t){return r[0]=t,r[0]}function _(t){let e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],r=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(m(e,1)&&m(n,1)&&m(r,1))}function U(t,e){return(t%e+e)%e}const E=I(34028234663852886e22);function N(t,e,n){if(void 0===n||0==+n)return Math[t](e);if(e=+e,n=+n,isNaN(e)||"number"!=typeof n||n%1!=0)return NaN;let r=e.toString().split("e");return r=(e=Math[t](+(r[0]+"e"+(r[1]?+r[1]-n:-n)))).toString().split("e"),+(r[0]+"e"+(r[1]?+r[1]+n:n))}n.d(e,["pq",0,E])},97146(t,e,n){n.d(e,{Dg:()=>o,lC:()=>u,my:()=>a,tM:()=>c,uW:()=>i});var r=n(34275);function i(t){return o(t,!0)}function o(t,e){if(Array.isArray(t)){if(t.length<1024)return t}else if(t.length<1024)return Array.from(t);let n=!0,i=!0;return t.some((t,e)=>(n&&=0===t,i&&=t===e,!n&&!i)),n?function(t){if(1===t)return l;if(t<1024)return Array(t).fill(0);if(t>m.length){let e=Math.max(2*m.length,t);m=new Uint8Array(e)}return new Uint8Array(m.buffer,0,t)}(t.length):i?c(t.length):(0,r.iu)(t)&&t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:function(t,e){for(let n of t){if(n>=65536)return(0,r.iu)(t)?t:new Uint32Array(t);n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}(t,!e)}function a(t,e=t){return t<=1024?Array(t):e<=65536?new Uint16Array(t):new Uint32Array(t)}function u(t,e,n){if(0===e.length)return t.slice();if(0===t.length)return e.slice();let r=a(t.length+e.length,n);for(let e=0;e<t.length;++e)r[e]=t[e];for(let n=0;n<e.length;++n)r[t.length+n]=e[n];return r}let s=h(131072);const l=[0],f=(()=>{let t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function c(t){return 1===t?l:t<1024?function(t){let e=Array(t).fill(0);for(let n=0;n<t;n++)e[n]=n;return e}(t):t<f.length?new Uint16Array(f.buffer,0,t):(t>s.length&&(s=h(Math.max(2*s.length,t))),new Uint32Array(s.buffer,0,t))}function h(t){let e=new Uint32Array(t);for(let t=0;t<e.length;t++)e[t]=t;return e}let m=new Uint8Array(65536)},10614(t,e,n){n.d(e,{Tz:()=>a,aT:()=>o});var r=n(34727),i=n(35522);function o(t,e,n,r,i,o=2,a=0){let s=1/(Math.abs(n)+Math.abs(r)+Math.abs(i)),l=n*s,f=r*s,c=i<=0?(l>=0?1:-1)*(1-Math.abs(f)):l,h=i<=0?(f>=0?1:-1)*(1-Math.abs(l)):f,m=e*o+a;t[m]=u(c),t[m+1]=u(h)}function a(t,e,n,r=2,o=0){let a=n*r+o,u=s(e[a]),l=s(e[a+1]),f=1-Math.abs(u)-Math.abs(l);return t[2]=f,f<0?(t[0]=(u>=0?1:-1)*(1-Math.abs(l)),t[1]=(l>=0?1:-1)*(1-Math.abs(u))):(t[0]=u,t[1]=l),(0,i.S8)(t,t)}function u(t){return(0,r.qE)(Math.round(32767*t),-32767,32767)}function s(t){return(0,r.qE)(t/32767,-1,1)}n(51850)},99058(t,e,n){n.d(e,{I$:()=>y,gr:()=>w,In:()=>v});var r=n(4431),i=n(1843),o=n(63907);class a{constructor(t){this.internalFormat=t,this.channelByteStride=4,this.dataType=o.ld.UNSIGNED_INT,this.elementArrayConstructor=Uint32Array,this.pixelFormat=s[t],this.channels=u[this.pixelFormat],this.byteStride=this.channelByteStride*this.channels}}const u={36244:1,33320:2,36249:4},s={[o.H0.R32UI]:36244,[o.H0.RG32UI]:33320,[o.H0.RGBA32UI]:36249},l=[new a(o.H0.RGBA32UI),new a(o.H0.RG32UI),new a(o.H0.R32UI)];function f(t){let e=1/0,n=null;for(let r of l){let i=r.byteStride,o=(i-t%i)%i;o<e&&(e=o,n=r)}return n??l[2]}var c=n(13030),h=n(90239);class m{constructor(t,e,n){this.elementCount=t,this.elementType=e,this.bufferViewConstructor=n,this.byteSize=function(t){return(0,h.GJ)(t.ElementType)*t.ElementCount}(n)}}const d={u8:new m(1,"uint",c.SL),u32:new m(1,"uint",c.P),vec4u32:new m(4,"uint",c.ml),vec4u8:new m(4,"uint",c.XP),unorm8:new m(1,"float",c.dy),vec4unorm8:new m(4,"float",c.td),snorm16:new m(1,"float",c.Qy),vec2snorm16:new m(2,"float",c.ES),f16:new m(1,"float",c.XW),vec4f16:new m(4,"float",c.jz),f32:new m(1,"float",c.Y$),vec2f32:new m(2,"float",c.gH),vec3f32:new m(3,"float",c.xs),vec4f32:new m(4,"float",c.Eq),mat3f32:new m(9,"float",c.jZ)};class M{constructor(t,e,n,r){this._declaration=t,this._byteOffset=e,this._creationInfo=r,this._startTexel=Math.floor(e/n);let i=r.byteSize;this._numTexels=Math.ceil((e+i)/n)-this._startTexel,this._texelByteStride=n}get name(){return this._declaration.name}get fieldType(){return this._declaration.type}get byteOffset(){return this._byteOffset}get startTexel(){return this._startTexel}get numTexels(){return this._numTexels}get texelByteStride(){return this._texelByteStride}get elementType(){return this._creationInfo.elementType}get elementCount(){return this._creationInfo.elementCount}get byteSize(){return this._creationInfo.byteSize}get bufferViewConstructor(){return this._creationInfo.bufferViewConstructor}}class g{constructor(t,e,n,r=0){this.layout=t,this.byteOffset=r,this._bufferViews=new Map,this.buffer="number"==typeof e?new ArrayBuffer(e*t.byteStride):e,this.texelElementBuffer=new n(this.buffer,r);let i=this._bufferViews;for(let[t,e]of this.layout.fields)i.set(t,new e.bufferViewConstructor(this.buffer,r+e.byteOffset,this.layout.byteStride))}get stride(){return this.layout.byteStride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(t,e){let n=this._bufferViews.get(t);return null!=n&&n.elementCount===e.ElementCount&&n.elementType===e.ElementType?n:null}copyItem(t,e){let{buffer:n,layout:r,byteOffset:i}=this,o=new Uint8Array(n),a=r.byteStride,u=i+t*a,s=i+e*a;o.copyWithin(s,u,u+a)}get usedMemory(){return this.byteLength}}const y=(0,i.BP)().vec3f("position").u16("componentIndex",{integer:!0}).freeze(),p=(0,i.BP)().vec2u8("sideness").freeze(),b=(0,r.U)(p),w=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),v=(0,i.BP)().vec3f("position0").vec3f("position1").vec2i16("normalCompressed").vec2i16("normal2Compressed").u16("componentIndex",{integer:!0}).u8("variantOffset",{glNormalized:!0}).u8("variantStroke").u8("variantExtension",{glNormalized:!0}).freeze(),A=(0,r.U)(w,1),x=(0,r.U)(v,1);b.concat(A),b.concat(x),new class{constructor(t){this._fields=new Map;let e=0,n=[];for(let r=0;r<t.length;++r){let i=t[r],{type:o}=i,a=d[o];n.push({declaration:i,byteOffset:e,creationInfo:a}),e+=a.byteSize}this.texelFormatInfo=f(e);let{texelByteStride:r}=this;e=Math.ceil(e/r)*r;let i=e,o=this._fields;for(let{declaration:t,byteOffset:e,creationInfo:i}of n)o.set(t.name,new M(t,e,r,i));this.byteStride=i,this.texelStride=Math.ceil(i/r)}get texelByteStride(){return this.texelFormatInfo.byteStride}get texelElementArrayConstructor(){return this.texelFormatInfo.elementArrayConstructor}get stride(){return this.byteStride}get fields(){return this._fields}createBuffer(t){return new g(this,t,this.texelElementArrayConstructor)}createView(t,e){return new g(this,t,this.texelElementArrayConstructor,e)}}([{name:"color",type:"vec4unorm8"},{name:"lineWidth",type:"u8"},{name:"extensionLength",type:"u8"},{name:"materialType",type:"u8"},{name:"opacity",type:"unorm8"},{name:"elevationOffset",type:"f32"}])},93406(t,e,n){n.d(e,{K:()=>u});var r=n(34727),i=n(15142),o=n(35522),a=n(51850);function u(t,e,n){let r=t.vertices.position,i=t.vertices.componentIndex,a=d.position0,u=d.position1,f=d.faceNormal0,h=d.faceNormal1,{edges:m,normals:M}=l(t),g=m.length/4,y=e.allocate(g),p=0,b=g,A=n?.allocate(b),S=0,I=0,_=0;c.length=0;for(let t=0;t<g;++t){let e=4*t;r.getVec(m.data[e],a),r.getVec(m.data[e+1],u);let n=c.pushNew();n.index=4*t,n.length=(0,o.Io)(a,u)}c.sort((t,e)=>e.length-t.length);let U=[],E=[];c.forAll(({length:t,index:l})=>{let c=m.data[l],g=m.data[l+1],b=m.data[l+2],N=m.data[l+3],C=-1===N;if(r.getVec(c,a),r.getVec(g,u),C){let t=3*b;(0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),(0,o.C)(h,f),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h)}else{let t=3*b;if((0,o.hZ)(f,M.data[t],M.data[t+1],M.data[t+2]),t=3*N,(0,o.hZ)(h,M.data[t],M.data[t+1],M.data[t+2]),d.componentIndex=i.get(c),d.cosAngle=(0,o.Om)(f,h),function(t,e){return t.cosAngle>e}(d,v))return;d.cosAngle<-.9999&&(0,o.C)(h,f)}I+=t,_++,C||function(t,e){return t.cosAngle<e}(d,x)?(e.write(y,p++,d),U.push(t)):s(d,w)&&(A&&n&&n.write(A,S++,d),E.push(t))});let N=new Float32Array(U.reverse()),C=new Float32Array(E.reverse()),T=A&&n?{instancesData:A.slice(0,S),lodInfo:{lengths:C}}:void 0;return{regular:{instancesData:y.slice(0,p),lodInfo:{lengths:N}},silhouette:T,averageEdgeLength:I/_}}function s(t,e){let n=(0,r.XM)(t.cosAngle);return(0,o.oW)(g,t.position1,t.position0),n*((0,o.Om)((0,o.$A)(M,t.faceNormal0,t.faceNormal1),g)>0?-1:1)>e}function l(t){let e=t.faces.length/3,n=t.faces,r=t.neighbors,i=t.vertices.position;h.length=m.length=0;for(let t=0;t<e;t++){let e=3*t,a=r[e],u=r[e+1],s=r[e+2],l=n[e],f=n[e+1],c=n[e+2];i.getVec(l,y),i.getVec(f,p),i.getVec(c,b),(0,o.Re)(p,p,y),(0,o.Re)(b,b,y),(0,o.$A)(y,p,b),(0,o.S8)(y,y),m.pushArray(y),(-1===a||l<f)&&(h.push(l),h.push(f),h.push(t),h.push(a)),(-1===u||f<c)&&(h.push(f),h.push(c),h.push(t),h.push(u)),(-1===s||c<l)&&(h.push(c),h.push(l),h.push(t),h.push(s))}return{edges:h,normals:m}}class f{constructor(){this.index=0,this.length=0}}const c=new i.A({allocator:t=>t||new f,deallocator:null}),h=new i.A({deallocator:null}),m=new i.A({deallocator:null}),d=new class{constructor(){this.position0=(0,a.vt)(),this.position1=(0,a.vt)(),this.faceNormal0=(0,a.vt)(),this.faceNormal1=(0,a.vt)(),this.componentIndex=0,this.cosAngle=0}},M=(0,a.vt)(),g=(0,a.vt)(),y=(0,a.vt)(),p=(0,a.vt)(),b=(0,a.vt)(),w=(0,r.kU)(4),v=Math.cos(w),A=(0,r.kU)(35),x=Math.cos(A)},44801(t,e,n){n.d(e,{o6:()=>U,HY:()=>O,hx:()=>E,Jb:()=>q});var r=n(34727),i=n(97146);function o(t,e,n){let o=Array.isArray(t),f=o?t.length/e:t.byteLength/(4*e),c=o?t:new Uint32Array(t,0,f*e),h=n?.minReduction??0,m=n?.originalIndices||null,d=m?m.length:0,M=n?.componentOffsets||null,g=0;if(M)for(let t=0;t<M.length-1;t++){let e=M[t+1]-M[t];e>g&&(g=e)}else g=f;let y=Math.floor(1.1*g)+1;(null==l||l.length<2*y)&&(l=new Uint32Array((0,r.cU)(2*y)));for(let t=0;t<2*y;t++)l[t]=0;let p=0,b=!!M&&!!m,w=b?d:f,v=(0,i.my)(f),A=new Uint32Array(d),x=1.96,S=0===h?w:Math.ceil(4*x*x/(h*h)*h*(1-h)),I=1,_=M?M[1]:w;for(let t=0;t<w;t++){if(t===S){let e=1-p/t;if(e+x*Math.sqrt(e*(1-e)/t)<h)return null;S*=2}if(t===_){for(let t=0;t<2*y;t++)l[t]=0;if(m)for(let t=M[I-1];t<M[I];t++)A[t]=v[m[t]];_=M[++I]}let n=b?m[t]:t,r=n*e,i=s(c,r,e),o=i%y,u=p;for(;0!==l[2*o+1];){if(l[2*o]===i){let t=l[2*o+1]-1;if(a(c,r,t*e,e)){u=v[t];break}}o++,o>=y&&(o-=y)}u===p&&(l[2*o]=i,l[2*o+1]=n+1,p++),v[n]=u}if(0!==h&&1-p/f<h)return null;if(b){for(let t=M[I-1];t<A.length;t++)A[t]=v[m[t]];v=(0,i.uW)(A)}let U=o?Array(p):new Uint32Array(p*e);p=0;for(let t=0;t<w;t++)v[t]===p&&(u(c,(b?m[t]:t)*e,U,p*e,e),p++);if(m&&!b){let t=new Uint32Array(d);for(let e=0;e<t.length;e++)t[e]=v[m[e]];v=(0,i.uW)(t)}return{buffer:Array.isArray(U)?U:U.buffer,indices:v,uniqueCount:p}}function a(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function u(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function s(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let l=null;function f(t,e,n){let r=e/3,i=new Uint32Array(n+1),o=new Uint32Array(n+1),a=(t,e)=>{t<e?i[t+1]++:o[e+1]++};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];a(n,r),a(r,i),a(i,n)}let u=0,s=0;for(let t=0;t<n;t++){let e=i[t+1],n=o[t+1];i[t+1]=u,o[t+1]=s,u+=e,s+=n}let l=new Uint32Array(6*r),f=i[n],c=(t,e,n)=>{if(t<e){let r=i[t+1]++;l[2*r]=e,l[2*r+1]=n}else{let r=o[e+1]++;l[2*f+2*r]=t,l[2*f+2*r+1]=n}};for(let e=0;e<r;e++){let n=t[3*e],r=t[3*e+1],i=t[3*e+2];c(n,r,e),c(r,i,e),c(i,n,e)}let h=(t,e)=>{let n=2*t,r=e-t;for(let t=1;t<r;t++){let e=l[n+2*t],r=l[n+2*t+1],i=t-1;for(;i>=0&&l[n+2*i]>e;i--)l[n+2*i+2]=l[n+2*i],l[n+2*i+3]=l[n+2*i+1];l[n+2*i+2]=e,l[n+2*i+3]=r}};for(let t=0;t<n;t++)h(i[t],i[t+1]),h(f+o[t],f+o[t+1]);let m=new Int32Array(3*r),d=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,M=(t,e)=>{let n=d(t,e);m[3*e+n]=-1},g=(t,e,n,r)=>{let i=d(t,e);m[3*e+i]=r;let o=d(n,r);m[3*r+o]=e};for(let t=0;t<n;t++){let e=i[t],n=i[t+1],r=o[t],a=o[t+1];for(;e<n&&r<a;){let n=l[2*e],i=l[2*f+2*r];n===i?(g(t,l[2*e+1],i,l[2*f+2*r+1]),e++,r++):n<i?(M(t,l[2*e+1]),e++):(M(i,l[2*f+2*r+1]),r++)}for(;e<n;)M(t,l[2*e+1]),e++;for(;r<a;)M(l[2*f+2*r],l[2*f+2*r+1]),r++}return m}var c=n(1843),h=n(99058),m=n(87811),d=n(35522),M=n(51850),g=n(10614);class y{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?A:v}write(t,e,n){I.seed=this._edgeHashFunction(n);let r=I.getIntRange(0,255),i=I.getIntRange(0,this.settings.variants-1),o=I.getFloat(),a=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(o/.7,1))+Math.max(0,o-.7)/.30000000000000004)+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,r),t.variantStroke.set(e,i),t.variantExtension.set(e,a)}}const p=new Float32Array(6),b=new Uint32Array(p.buffer),w=new Uint32Array(1);function v(t){return p[0]=t.position0[0],p[1]=t.position0[1],p[2]=t.position0[2],p[3]=t.position1[0],p[4]=t.position1[1],p[5]=t.position1[2],w[0]=31*(31*(31*(31*(31*(166811+b[0])+b[1])+b[2])+b[3])+b[4])+b[5],w[0]}function A(t){let e=p;e[0]=x(t.position0[0]),e[1]=x(t.position0[1]),e[2]=x(t.position0[2]),e[3]=x(t.position1[0]),e[4]=x(t.position1[1]),e[5]=x(t.position1[2]),w[0]=5381;for(let t=0;t<b.length;t++)w[0]=31*w[0]+b[t];return w[0]}function x(t){return Math.round(1e4*t)/1e4}const S=(0,M.vt)(),I=new m.A;var _=n(93406);function U(t){let e=E(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return C.updateSettings(t.writerSettings),T.updateSettings(t.writerSettings),(0,_.K)(e,C,T)}function E(t,e,n,r){if(e){let e=f(n,r,t.count);return new N(n,r,e,t)}let i=o(t.buffer,t.stride/4,{originalIndices:n}),a=f(i.indices,r,i.uniqueCount);return{faces:i.indices,facesLength:i.indices.length,neighbors:a,vertices:h.I$.createView(i.buffer)}}class N{constructor(t,e,n,r){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=r}}const C=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,d.WQ)(S,n.faceNormal0,n.faceNormal1),(0,d.S8)(S,S);let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,S[0],S[1],S[2],i)}},T=new class{constructor(){this._commonWriter=new y}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return h.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{let{typedBuffer:r,typedBufferStride:i}=t.normalCompressed;(0,g.aT)(r,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],i)}{let{typedBuffer:r,typedBufferStride:i}=t.normal2Compressed;(0,g.aT)(r,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],i)}}},q=(0,c.BP)().vec3f("position0").vec3f("position1"),O=(0,c.BP)().vec3f("position0").vec3f("position1").u16("componentIndex",{integer:!0})}}]);