@arcgis/core 4.32.0-next.20250209 → 4.32.0-next.20250211

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 (148) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{3c23e567cfb7372c44ba.js → 0a5689348d544090006d.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{7966c245a073c85f04b1.js → 0ac1399d252f2df670b6.js} +1 -1
  4. package/assets/esri/core/workers/chunks/135fb580d8afd8d60811.js +1 -0
  5. package/assets/esri/core/workers/chunks/{cee3a38b92a48a58c4d0.js → 152becae48572299b07f.js} +1 -1
  6. package/assets/esri/core/workers/chunks/24e6476f32ad2014d39d.js +1 -0
  7. package/assets/esri/core/workers/chunks/{5fbdb5fea7d6676fcf19.js → 2c1a85a801cb4d9d737e.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{7f87cf3d6a365d987f69.js → 30bd5b3204e09f516ea2.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{c04091eea7089dc2e864.js → 35bcb0622234b38d85b4.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{1d51c064045e9c47bd2e.js → 3bad184751fcb26c003c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5be7cf1564e756c24066.js → 3d5442055e01493efcb2.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{a559db8654b4f83fd79b.js → 3f6516af411256d90a03.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{c83b26ff96e39266adc2.js → 4300c80fa10c5d9141e8.js} +1 -1
  14. package/assets/esri/core/workers/chunks/486df1e042204b90b0dd.js.LICENSE.txt +1 -1
  15. package/assets/esri/core/workers/chunks/{220b12654b94c94f8d8a.js → 50ae86c23efe709f41cc.js} +1 -1
  16. package/assets/esri/core/workers/chunks/5693d9ce4472a4c5959f.js.LICENSE.txt +1 -1
  17. package/assets/esri/core/workers/chunks/{e56647e61296643c5f84.js → 5719471414810b6a9aec.js} +1 -1
  18. package/assets/esri/core/workers/chunks/{1accbc048b74857269e4.js → 57924f4909f2cbe5d64c.js} +1 -1
  19. package/assets/esri/core/workers/chunks/5b56b271afb0fadf48b4.js.LICENSE.txt +1 -1
  20. package/assets/esri/core/workers/chunks/{b3aeda290470dcb2bdd2.js → 5cf08ee5114273163e09.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{bb1e9c062558671de957.js → 6518954889df2e781c47.js} +2 -2
  22. package/assets/esri/core/workers/chunks/{bb1e9c062558671de957.js.LICENSE.txt → 6518954889df2e781c47.js.LICENSE.txt} +1 -1
  23. package/assets/esri/core/workers/chunks/{92984981afcbb95828cd.js → 74844334b3a2100220fc.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{6d79ec15d1858839f576.js → 74f42e46bf551aab14dc.js} +1 -1
  25. package/assets/esri/core/workers/chunks/{e468bf4ec7402942ad8c.js → 8ddd4e2e50b8206564a7.js} +1 -1
  26. package/assets/esri/core/workers/chunks/9bd83b8c1764813f18dd.js +1 -0
  27. package/assets/esri/core/workers/chunks/{8bd51b5b392dfacc922f.js → 9fb45c006d790273e8c1.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{e6087eda5e3b7e5ad3e1.js → a12afed58acff17708ca.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{f200dca22f9f9bbb8670.js → a4a9b4f792d47566fbf4.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{08c4b585290efc98ca5d.js → a6be1105a5e1f9597c5e.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{95ad76e58452b60fb79f.js → a864ef9b584c83ebf6ae.js} +1 -1
  32. package/assets/esri/core/workers/chunks/b0952b81d5be214262dd.js.LICENSE.txt +1 -1
  33. package/assets/esri/core/workers/chunks/{9f257e356bc6b8f742c6.js → b83151b03bbeba466f82.js} +2 -2
  34. package/assets/esri/core/workers/chunks/{9f257e356bc6b8f742c6.js.LICENSE.txt → b83151b03bbeba466f82.js.LICENSE.txt} +1 -1
  35. package/assets/esri/core/workers/chunks/{fef135e55706d84d1947.js → c4ce3c35b52b7999e877.js} +1 -1
  36. package/assets/esri/core/workers/chunks/cf498c621dc1f865530e.js +1 -0
  37. package/assets/esri/core/workers/chunks/{117e7a12af77c761efb5.js → d0e9874eb304010305c6.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{9d61590c4d21c7421925.js → d279e4b09042988f93ae.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{6e6422eda398774acbc7.js → d60da671aba70485050e.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{15e08e8a8a72b177d74c.js → d6b04f8a72e0c67ecef0.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{16a96f6b73e8fb1ede8c.js → de87009542886fad9a2f.js} +2 -2
  42. package/assets/esri/core/workers/chunks/{16a96f6b73e8fb1ede8c.js.LICENSE.txt → de87009542886fad9a2f.js.LICENSE.txt} +1 -1
  43. package/assets/esri/core/workers/chunks/{bb73cd34fbae935ccbcc.js → dff4a9d656b84fe3e052.js} +1 -1
  44. package/assets/esri/core/workers/chunks/f52ed527b46c316eb369.js +1 -0
  45. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  46. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  47. package/chunks/Bufferer-DjC-SKTJ.js +1 -1
  48. package/chunks/Distance2DCalculator-8-JrFGHH.js +1 -1
  49. package/chunks/Envelope.js +1 -1
  50. package/chunks/GeodeticDistanceCalculator-BsWHOuqE.js +1 -1
  51. package/chunks/OperatorClip.js +1 -1
  52. package/chunks/OperatorCut.js +1 -1
  53. package/chunks/OperatorGeodesicBuffer.js +1 -1
  54. package/chunks/OperatorGeodeticArea.js +1 -1
  55. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  56. package/chunks/OperatorProximity.js +1 -1
  57. package/chunks/OperatorShapePreservingProject.js +1 -1
  58. package/chunks/ProjectionTransformation.js +1 -1
  59. package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
  60. package/chunks/disjointOperator.js +1 -1
  61. package/chunks/lyr3DWorker.js +1 -1
  62. package/editing/sharedTemplates/SharedTemplate.d.ts +4 -0
  63. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  64. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  65. package/editing/sharedTemplates/SharedTemplateProvider.js +1 -1
  66. package/editing/sharedTemplates/executor/builders/bufferLineToPolygon.js +1 -1
  67. package/editing/sharedTemplates/executor/builders/bufferPointToPolygon.js +1 -1
  68. package/editing/sharedTemplates/executor/builders/bufferPolygonToPolygon.js +1 -1
  69. package/editing/sharedTemplates/executor/builders/equallySpaced.js +1 -1
  70. package/editing/sharedTemplates/executor/builders/offsetLine.js +1 -1
  71. package/editing/sharedTemplates/executor/builders/offsetPrimaryLine.js +1 -1
  72. package/editing/sharedTemplates/executor/builders/pointAtAllVerticesOfLine.js +1 -1
  73. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfLine.js +1 -1
  74. package/editing/sharedTemplates/executor/builders/pointAtBeginningOfRadial.js +1 -1
  75. package/editing/sharedTemplates/executor/builders/pointAtEndOfLine.js +1 -1
  76. package/editing/sharedTemplates/executor/builders/pointAtInteriorVertices.js +1 -1
  77. package/editing/sharedTemplates/executor/builders/pointAtIntersectionVerticesOfLine.js +1 -1
  78. package/editing/sharedTemplates/executor/builders/pointAtNotBeginningOfLine.js +1 -1
  79. package/editing/sharedTemplates/executor/builders/pointAtNotEndOfLine.js +1 -1
  80. package/editing/sharedTemplates/executor/builders/pointAtPolygonCentroid.js +1 -1
  81. package/editing/sharedTemplates/executor/builders/pointAtPolygonNotStart.js +1 -1
  82. package/editing/sharedTemplates/executor/builders/pointAtPolygonStart.js +1 -1
  83. package/editing/sharedTemplates/executor/builders/pointIdentity.js +1 -1
  84. package/editing/sharedTemplates/executor/builders/pointPrimaryIdentity.js +1 -1
  85. package/editing/sharedTemplates/executor/builders/polygonBoundary.js +1 -1
  86. package/editing/sharedTemplates/executor/builders/polygonBoundaryTwoPoint.js +1 -1
  87. package/editing/sharedTemplates/executor/builders/polygonIdentity.js +1 -1
  88. package/editing/sharedTemplates/executor/builders/polygonPrimaryIdentity.js +1 -1
  89. package/editing/sharedTemplates/executor/builders/polygonVertices.js +1 -1
  90. package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
  91. package/editing/sharedTemplates/executor/builders/twoPointLines.js +1 -1
  92. package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
  93. package/editing/sharedTemplates/executor/support/createServiceEdit.js +1 -1
  94. package/editing/sharedTemplates/executor/support/executorUtils.js +1 -1
  95. package/editing/sharedTemplates/templateDefinitions/GroupTemplateDefinition.js +1 -1
  96. package/editing/sharedTemplates/templateDefinitions/PresetTemplateDefinition.js +1 -1
  97. package/editing/sharedTemplates/templateDefinitions/parts/builders/builderUtils.js +1 -1
  98. package/editing/templateUtils.js +1 -1
  99. package/geometry/operators/extendOperator.js +1 -1
  100. package/geometry/operators/gx/operatorAutoComplete.js +1 -1
  101. package/geometry/operators/gx/operatorBuffer.js +1 -1
  102. package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
  103. package/geometry/operators/gx/operatorIntegrate.js +1 -1
  104. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  105. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  106. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  107. package/geometry/operators/gx/operatorSimplify.js +1 -1
  108. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  109. package/geometry/operators/gx/operatorUnion.js +1 -1
  110. package/geometry/operators/json/disjointOperator.js +1 -1
  111. package/geometry/operators/reshapeOperator.js +1 -1
  112. package/geometry/operators/support/apiConverter.js +1 -1
  113. package/geometry/operators/support/initNoPeFactory.js +1 -1
  114. package/geometry/operators/support/jsonConverter.js +1 -1
  115. package/interfaces.d.ts +33 -1
  116. package/layers/VectorTileLayer.js +1 -1
  117. package/layers/mixins/operationalLayers.js +1 -1
  118. package/layers/save/featureLayerUtils.js +1 -1
  119. package/layers/save/utils.js +1 -1
  120. package/layers/support/commonProperties.js +1 -1
  121. package/layers/support/wmsUtils.js +1 -1
  122. package/package.json +2 -2
  123. package/portal/Portal.js +1 -1
  124. package/support/revision.js +1 -1
  125. package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
  126. package/views/3d/layers/graphics/Graphics3DLineCalloutSymbolLayer.js +1 -1
  127. package/views/layers/LayerView.js +1 -1
  128. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  129. package/widgets/Editor/CreateFeaturesWorkflowData.js +1 -1
  130. package/widgets/Editor/EditorViewModel.js +1 -1
  131. package/widgets/Editor/UpdateWorkflow.js +1 -1
  132. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  133. package/widgets/Editor/components/PendingFeatureList.js +1 -1
  134. package/widgets/Editor/modelUploadUtils.js +1 -1
  135. package/widgets/Editor/workflowUtils.js +1 -1
  136. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  137. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  138. package/widgets/OrientedImageryViewer/constants.js +1 -1
  139. package/widgets/OrientedImageryViewer/galleryUtils.js +5 -0
  140. package/widgets/OrientedImageryViewer/utils.js +1 -1
  141. package/widgets/OrientedImageryViewer.js +1 -1
  142. package/widgets/Sketch/support/sketchUtils.js +1 -1
  143. package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +0 -1
  144. package/assets/esri/core/workers/chunks/324a5547c64a3bae670d.js +0 -1
  145. package/assets/esri/core/workers/chunks/369a2b8484a8807bde38.js +0 -1
  146. package/assets/esri/core/workers/chunks/9c6380af3bc3130658e1.js +0 -1
  147. package/assets/esri/core/workers/chunks/b18620fc15707e4413a1.js +0 -1
  148. package/editing/sharedTemplates/support/sharedTemplateUtils.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPoint as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i},"IDP1")}const s=!1;export{o as execute,s as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t}from"./support/shapeUtils.js";import{isPolygon as e,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";import i from"../../../../geometry/Polyline.js";function r({templatePart:r,shape:p,edits:n,relationships:l,mode:a}){if(null===r||null===p||!e(p))return;const f=p.clone(),h=[];for(const s of f.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0)for(const t of h){if("digitizing"===a&&n.length>o)break;const e=new i({paths:[t],spatialReference:f.spatialReference,hasZ:f.hasZ,hasM:f.hasM});s({templatePart:r,shape:e,edits:n,relationships:l,mode:a})}}const p=!1;export{r as execute,p as isAsync};
5
+ import{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t}from"./support/shapeUtils.js";import{isPolygon as e,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";import i from"../../../../geometry/Polyline.js";function r({templatePart:r,shape:p,edits:n,relationships:a,mode:l}){if(!e(p))return;const f=p.clone(),h=[];for(const s of f.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0)for(const t of h){if("digitizing"===l&&n.length>o)break;const e=new i({paths:[t],spatialReference:f.spatialReference,hasZ:f.hasZ,hasM:f.hasM});s({templatePart:r,shape:e,edits:n,relationships:a,mode:l})}}const p=!1;export{r as execute,p as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t,convertToTwoPoint as e}from"./support/shapeUtils.js";import{isPolygon as o,maxDigitizingDisplayEdits as i}from"../support/executorUtils.js";import r from"../../../../geometry/Polyline.js";function p({templatePart:p,shape:n,edits:l,relationships:a,mode:f}){if(null===p||null===n||!o(n))return;const h=[];for(const s of n.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0){const t=new r({paths:h,spatialReference:n.spatialReference,hasZ:n.hasZ,hasM:n.hasM}),o=e(t);for(const e of o){if("digitizing"===f&&l.length>i)break;s({templatePart:p,shape:e,edits:l,relationships:a,mode:f})}}}const n=!1;export{p as execute,n as isAsync};
5
+ import{makeFeatureFromGroupPart as s}from"./support/builderUtils.js";import{sameStartEndPoint as t,convertToTwoPoint as e}from"./support/shapeUtils.js";import{isPolygon as o,maxDigitizingDisplayEdits as i}from"../support/executorUtils.js";import r from"../../../../geometry/Polyline.js";function p({templatePart:p,shape:a,edits:n,relationships:l,mode:f}){if(!o(a))return;const h=[];for(const s of a.rings){const e=s.slice();t(s)||e.push(e[0].slice()),h.push(e)}if(h.length>0){const t=new r({paths:h,spatialReference:a.spatialReference,hasZ:a.hasZ,hasM:a.hasM}),o=e(t);for(const e of o){if("digitizing"===f&&n.length>i)break;s({templatePart:p,shape:e,edits:n,relationships:l,mode:f})}}}const a=!1;export{p as execute,a as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){null!==o&&null!==s&&e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{isPolygon as e}from"../support/executorUtils.js";function o({templatePart:o,shape:s,edits:p,relationships:r,mode:i}){e(s)&&t({templatePart:o,shape:s.clone(),edits:p,relationships:r,mode:i})}const s=!1;export{o as execute,s as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as i,pointFromPolygonVertex as e}from"./support/shapeUtils.js";import{isPolygon as s,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";function r({templatePart:r,shape:l,edits:n,relationships:p,mode:a}){if(null!==r&&null!==l&&s(l))for(let s=0;s<l.rings.length;s++){const g=l.rings[s],m=g.length,h=i(g)?m-1:m;if("digitizing"===a&&n.length>o)break;for(let i=0;i<h&&!("digitizing"===a&&n.length>o);i++){const o=e(l,s,i);t({templatePart:r,shape:o,edits:n,relationships:p,mode:a})}}}const l=!1;export{r as execute,l as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{sameStartEndPoint as i,pointFromPolygonVertex as e}from"./support/shapeUtils.js";import{isPolygon as s,maxDigitizingDisplayEdits as o}from"../support/executorUtils.js";function r({templatePart:r,shape:p,edits:n,relationships:l,mode:a}){if(s(p))for(let s=0;s<p.rings.length;s++){const g=p.rings[s],m=g.length,h=i(g)?m-1:m;if("digitizing"===a&&n.length>o)break;for(let i=0;i<h&&!("digitizing"===a&&n.length>o);i++){const o=e(p,s,i);t({templatePart:r,shape:o,edits:n,relationships:l,mode:a})}}}const p=!1;export{r as execute,p as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../../core/Error.js";import{getMetersPerVerticalUnitForSR as t,getMetersPerUnitForSR as o}from"../../../../../core/unitUtils.js";import{createPresetServiceEdit as r,createFeatureServiceEdit as n}from"../../support/createServiceEdit.js";import{isLoadedSharedTemplate as s,isPresetTemplate as i,isFeatureTemplate as a}from"../../../support/sharedTemplateUtils.js";import l from"../../../../../geometry/Polygon.js";import{isPoint as u,isPolygon as p}from"../../../../../geometry/support/jsonUtils.js";function f({edits:t,mode:o,relationships:l,shape:p,templatePart:f},c=""){if(null===f)return;const{template:m}=f;if(!s(m))throw new e("shared-template:template-not-loaded","A template part's template must be loaded before use");if(i(m)){if(!u(p))throw new e("shared-template:invalid-geometry","Preset templates must have a point geometry");r({geometry:p,template:m,edits:t,relationships:l,rotation:0,mode:o,tag:c})}else a(m)&&n({geometry:p,template:m,edits:t,relationships:l,tag:c})}function c(e,t){if(!e||!p(e))return null;if(!t.hasZ&&!t.hasM)return e;let o=null,r=null;const n=t.hasZ&&t.hasM?3:2;switch(t.type){case"point":o=t.hasZ?t.z:null,r=t.hasM?t.m:null;break;case"polygon":case"polyline":{const e="polygon"===t.type?t.rings:t.paths;for(const s of e)for(const e of s)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===r||e[n]>r)&&(r=e[n])}break;case"multipoint":for(const e of t.points)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===r||e[n]>r)&&(r=e[n]);break;default:return e}const s=Z(e.rings,t.hasZ,t.hasM,o,r);return new l({rings:s,spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM})}function m(e){let r=1;if(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid){r=t(e.spatialReference)/o(e.spatialReference)}return r}function h(e){let t=!1;return void 0!==e.byNumber&&(t=!0===e.byNumber),t}function d(e){let t=0;return void 0!==e.count&&(t=e.count),t}function g(e,t){let o=0;return t?void 0!==e.proportional&&(o=e.proportional):void 0!==e.distanceValue&&(o=e.distanceValue),t&&(o/=100),o}function y(e){return!0===e.isProportional}function v(e){return!1!==e.createUnique}function b(e){let t=0;return void 0!==e.offsetDistance&&(t=e.offsetDistance),void 0!==e.side&&1===e.side&&(t*=-1),t}function M(e){return!0===e.vertexBeforeOffset}function Z(e,t,o,r,n){const s=[];for(const i of e)s.push(j(i,t,o,r,n));return s}function j(e,t,o,r,n){const s=[];for(const i of e){const e=[i[0],i[1]];t&&(e[2]=r),o&&(e[t?3:2]=n),s.push(e)}return s}export{c as correctZandMFollowingBuffer,m as getHeightUnitCorrectionFactor,f as makeFeatureFromGroupPart,h as readByNumber,d as readCount,g as readDistance,y as readIsProportional,v as readIsUnique,b as readOffsetDistance,M as readVertexBeforeOffset};
5
+ import e from"../../../../../core/Error.js";import{getMetersPerVerticalUnitForSR as t,getMetersPerUnitForSR as o}from"../../../../../core/unitUtils.js";import{isLoadedSharedTemplate as n,isSharedPresetTemplate as r,isSharedFeatureTemplate as s}from"../../../../templateUtils.js";import{createPresetServiceEdit as i,createFeatureServiceEdit as a}from"../../support/createServiceEdit.js";import l from"../../../../../geometry/Polygon.js";import{isPoint as u,isPolygon as f}from"../../../../../geometry/support/jsonUtils.js";function p({edits:t,mode:o,relationships:l,shape:f,templatePart:p},c=""){if(null===p)return;const{template:m}=p;if(!n(m))throw new e("shared-template:template-not-loaded","A template part's template must be loaded before use");if(r(m)){if(!u(f))throw new e("shared-template:invalid-geometry","Preset templates must have a point geometry");i({geometry:f,template:m,edits:t,relationships:l,rotation:0,mode:o,tag:c})}else s(m)&&a({geometry:f,template:m,edits:t,relationships:l,tag:c})}function c(e,t){if(!e||!f(e))return null;if(!t.hasZ&&!t.hasM)return e;let o=null,n=null;const r=t.hasZ&&t.hasM?3:2;switch(t.type){case"point":o=t.hasZ?t.z:null,n=t.hasM?t.m:null;break;case"polygon":case"polyline":{const e="polygon"===t.type?t.rings:t.paths;for(const s of e)for(const e of s)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===n||e[r]>n)&&(n=e[r])}break;case"multipoint":for(const e of t.points)t.hasZ&&(null===o||e[2]>o)&&(o=e[2]),t.hasM&&(null===n||e[r]>n)&&(n=e[r]);break;default:return e}const s=Z(e.rings,t.hasZ,t.hasM,o,n);return new l({rings:s,spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM})}function m(e){let n=1;if(e.spatialReference.vcsWkid||e.spatialReference.latestVcsWkid){n=t(e.spatialReference)/o(e.spatialReference)}return n}function h(e){let t=!1;return void 0!==e.byNumber&&(t=!0===e.byNumber),t}function d(e){let t=0;return void 0!==e.count&&(t=e.count),t}function g(e,t){let o=0;return t?void 0!==e.proportional&&(o=e.proportional):void 0!==e.distanceValue&&(o=e.distanceValue),t&&(o/=100),o}function y(e){return!0===e.isProportional}function v(e){return!1!==e.createUnique}function b(e){let t=0;return void 0!==e.offsetDistance&&(t=e.offsetDistance),void 0!==e.side&&1===e.side&&(t*=-1),t}function M(e){return!0===e.vertexBeforeOffset}function Z(e,t,o,n,r){const s=[];for(const i of e)s.push(j(i,t,o,n,r));return s}function j(e,t,o,n,r){const s=[];for(const i of e){const e=[i[0],i[1]];t&&(e[2]=n),o&&(e[t?3:2]=r),s.push(e)}return s}export{c as correctZandMFollowingBuffer,m as getHeightUnitCorrectionFactor,p as makeFeatureFromGroupPart,h as readByNumber,d as readCount,g as readDistance,y as readIsProportional,v as readIsUnique,b as readOffsetDistance,M as readVertexBeforeOffset};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{convertToTwoPoint as o}from"./support/shapeUtils.js";import{isPolyline as s,maxDigitizingDisplayEdits as e}from"../support/executorUtils.js";function i({templatePart:i,shape:r,edits:p,relationships:l,mode:n}){if(null===i||null===r||!s(r))return;const a=o(r);for(const o of a){if("digitizing"===n&&p.length>e)break;t({templatePart:i,shape:o,edits:p,relationships:l,mode:n})}}const r=!1;export{i as execute,r as isAsync};
5
+ import{makeFeatureFromGroupPart as t}from"./support/builderUtils.js";import{convertToTwoPoint as o}from"./support/shapeUtils.js";import{isPolyline as s,maxDigitizingDisplayEdits as e}from"../support/executorUtils.js";function i({templatePart:i,shape:r,edits:p,relationships:a,mode:m}){if(!s(r))return;const n=o(r);for(const o of n){if("digitizing"===m&&p.length>e)break;t({templatePart:i,shape:o,edits:p,relationships:a,mode:m})}}const r=!1;export{i as execute,r as isAsync};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import t from"../../../core/Error.js";import{isPromiseLike as e}from"../../../core/promiseUtils.js";import{createFeatureServiceEdit as r,createPresetServiceEdit as o}from"./support/createServiceEdit.js";import{calculateExtent as n,groupEditsByLayer as i}from"./support/executorUtils.js";import{getBuilder as s}from"./support/getBuilder.js";import{isLoadedSharedTemplate as p,isFeatureTemplate as a,isGroupTemplate as l,isPresetTemplate as m}from"../support/sharedTemplateUtils.js";import{isPoint as u}from"../../../geometry/support/jsonUtils.js";async function c(e){if(!p(e))throw new t("template-executor:template-not-loaded","The template must be loaded before it can be executed.");if(a(e))return f(e);if(l(e))return d(e);if(m(e))return y(e);throw new t("template-executor:unsupported-template-type","The template type is not supported.")}function f(t){return e=>{const o=[],s=[];r({geometry:e,template:t,edits:o,relationships:s});const p=n(o);return{edits:i(o),relationships:s,primary:o[0]??null,featureExtent:p,rotationPoint:p?.center??null}}}async function d(t){const r=await Promise.all(t.definition.allParts.map(h));return(o,s)=>{const p=[],a=[],l=()=>{const t=n(p);return{edits:i(p),relationships:a,primary:p[0]??null,featureExtent:t,rotationPoint:t?.center??null}},m=r.map((e=>e({edits:p,mode:s,parentTemplate:t,relationships:a,shape:o}))).filter(e);return 0===m.length?l():Promise.all(m).then((()=>l()))}}async function h(t){const e=await s(t.builderType);return r=>e.execute({...r,templatePart:t})}function y(e){return(r,s,p=0)=>{if(!u(r))throw new t("template-executor:invalid-input-geometry","The input goemetry for a preset template must be a point.");const a=[],l=[],m=o({geometry:r,template:e,edits:a,relationships:l,rotation:p,mode:s});return{edits:i(a),relationships:l,primary:a[0]??null,featureExtent:n(a),rotationPoint:m}}}export{c as createTemplateExecutor};
5
+ import t from"../../../core/Error.js";import e from"../../../core/Logger.js";import{isPromiseLike as r}from"../../../core/promiseUtils.js";import{isLoadedSharedTemplate as o,isSharedFeatureTemplate as n,isSharedGroupTemplate as i,isSharedPresetTemplate as s}from"../../templateUtils.js";import{createFeatureServiceEdit as p,createPresetServiceEdit as a}from"./support/createServiceEdit.js";import{calculateExtent as l,groupEditsByLayer as m}from"./support/executorUtils.js";import{getBuilder as u}from"./support/getBuilder.js";import{isPoint as c}from"../../../geometry/support/jsonUtils.js";const f=()=>e.getLogger("esri.editing.sharedTemplates.executor.createTemplateExecutor");async function d(e){if(!o(e))throw new t("template-executor:template-not-loaded","The template must be loaded before it can be executed.");if(n(e))return h(e);if(i(e))return y(e);if(s(e))return x(e);throw new t("template-executor:unsupported-template-type","The template type is not supported.")}function h(t){return e=>{const r=[],o=[];p({geometry:e,template:t,edits:r,relationships:o});const n=l(r);return{edits:m(r),relationships:o,primary:r[0]??null,featureExtent:n,rotationPoint:n?.center??null}}}async function y(t){const e=await Promise.all(t.definition.allParts.map(g));return(o,n)=>{const i=[],s=[],p=()=>{const t=l(i);return{edits:m(i),relationships:s,primary:i[0]??null,featureExtent:t,rotationPoint:t?.center??null}};if(null==o)return f().warn("No geometry provided to group template executor. Result will be empty."),p();const a=e.map((e=>e({edits:i,mode:n,parentTemplate:t,relationships:s,shape:o}))).filter(r);return 0===a.length?p():Promise.all(a).then((()=>p()))}}async function g(t){const e=await u(t.builderType);return r=>e.execute({...r,templatePart:t})}function x(e){return(r,o,n=0)=>{if(!c(r))throw new t("template-executor:invalid-input-geometry","The input goemetry for a preset template must be a point.");const i=[],s=[],p=a({geometry:r,template:e,edits:i,relationships:s,rotation:n,mode:o});return{edits:m(i),relationships:s,primary:i[0]??null,featureExtent:l(i),rotationPoint:p}}}export{d as createTemplateExecutor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Graphic.js";import t from"../../../../core/Error.js";import{generateUUID as s}from"../../../../core/uuid.js";import{isRadial as a,maxDigitizingDisplayEdits as i}from"./executorUtils.js";import{isLoadedSharedTemplate as n,isFeatureTemplate as o,isPresetTemplate as r}from"../../support/sharedTemplateUtils.js";import l from"../../../../geometry/Multipoint.js";import h from"../../../../geometry/Point.js";import p from"../../../../geometry/Polygon.js";import f from"../../../../geometry/Polyline.js";import{execute as u}from"../../../../geometry/operators/affineTransformOperator.js";import c from"../../../../geometry/operators/support/Transformation.js";function m({edits:s,geometry:i,relationships:n,tag:o="",template:r}){if(a(i)){const e=i.geometry.clone();for(const t of e.paths){m({geometry:new f({spatialReference:e.spatialReference,paths:[t],hasZ:e.hasZ,hasM:e.hasM}),template:r,edits:s,relationships:n,tag:o})}return}const{definition:l,layer:h}=r;i=d(i,h);const p=new e({geometry:i,attributes:l.defaultValues?{...l.defaultValues}:{}});if(h.globalIdField&&(p.attributes[h.globalIdField]=M()),s.push({id:h.layerId,graphic:p,tag:o,layer:h}),0!==l.relationships.length)for(const a of l.relationships||[]){if(null==a.relationshipMetadata||null==a.template?.definition)throw new t("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{definition:i,layer:o}=a.template,r=new e({attributes:i.defaultValues?{...i.defaultValues}:{}});o.globalIdField&&(r.attributes[o.globalIdField]=M()),s.push({graphic:r,id:o.layerId,tag:"",layer:o}),n.push({...a.relationshipMetadata,sourceGraphic:p,destinationGraphic:r})}}function g({edits:e,geometry:s,mode:a,relationships:l,rotation:h,tag:p="",template:f}){const{definition:d}=f,y=s.x-d.origin.x,Z=s.y-d.origin.y,M=d.origin.hasZ&&s.hasZ?s.z-d.origin.z:0,R=b(d.origin.clone(),y,Z,M),w=(new c).rotate(h,R.x,R.y);for(const c of d.parts){if(e.length>i&&"digitizing"===a)break;const h=c.template;if(!n(h))throw new t("shared-template:template-not-loaded","A template part's template must be loaded before use");if(o(h)){let t=b(c.geometry,y,Z,M);w.isIdentity||(t=u(t,w)),m({edits:e,geometry:t,relationships:l,tag:p,template:h})}else if(r(h)){const t=[];if(g({edits:w.isIdentity?t:e,geometry:s,mode:a,relationships:l,rotation:0,tag:p,template:h}),!w.isIdentity)for(const s of t){const{geometry:t}=s.graphic;t&&"mesh"!==t.type&&(s.graphic.geometry=u(t,w),e.push(s))}}}return R}function d(e,t){if(!e)return null;if(e.hasZ===t.hasZ&&e.hasM===t.hasM)return e;switch(e.type){case"point":return new h({spatialReference:e.spatialReference,x:e.x,y:e.y,...t.hasZ?e.hasZ?{z:e.z}:{z:R(t)}:{},...t.hasM?e.hasM?{m:e.m}:{m:w(t)??void 0}:{}});case"polygon":return new p({spatialReference:e.spatialReference,rings:y(e.rings,t.hasZ,t.hasM,R(t),w(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"polyline":return new f({spatialReference:e.spatialReference,paths:y(e.paths,t.hasZ,t.hasM,R(t),w(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"multipoint":return new l({spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM,points:Z(e.points,t.hasZ,t.hasM,R(t),w(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1)});default:return e}}function y(e,t,s,a,i,n,o){const r=[];for(const l of e)r.push(Z(l,t,s,a,i,n,o));return r}function Z(e,t,s,a,i,n,o){const r=[];for(const l of e){const e=[l[0],l[1]];t&&(e[2]=o>-1?l[2]:a),s&&(e[t?3:2]=n>-1?l[n]:i),r.push(e)}return r}function M(){return`{${s()}}`.toUpperCase()}function R(e){return e.capabilities.editing?.zDefault??0}function w(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function b(e,t,s,a=0){if(!e)return null;if("point"===e.type)return new h({spatialReference:e.spatialReference,x:e.x+t,y:e.y+s,...e.hasZ?{z:e.z+a}:{},...e.hasM?{m:e.m}:{}});if("multipoint"===e.type){const i=[];if(e.hasZ&&e.hasM)for(let n=0;n<e.points.length;n++){const o=e.points[n];i.push([o[0]+t,o[1]+s,o[2]+a,o[3]])}else if(e.hasZ)for(let n=0;n<e.points.length;n++){const o=e.points[n];i.push([o[0]+t,o[1]+s,o[2]+a])}else if(e.hasM)for(let a=0;a<e.points.length;a++){const n=e.points[a];i.push([n[0]+t,n[1]+s,n[2]])}else for(let a=0;a<e.points.length;a++){const n=e.points[a];i.push([n[0]+t,n[1]+s])}return new l({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM,points:i})}if("polygon"===e.type){const i=new p({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let n=0;n<e.rings.length;n++){const o=e.rings[n],r=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else if(e.hasZ)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s]);i.addRing(r)}return i}if("polyline"===e.type){const i=new f({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let n=0;n<e.paths.length;n++){const o=e.paths[n],r=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasZ)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else if(e.hasM)for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else for(let e=0;e<o.length;e++)r.push([o[e][0]+t,o[e][1]+s]);i.addPath(r)}return i}return e.clone()}export{m as createFeatureServiceEdit,g as createPresetServiceEdit,M as generateGlobalId,b as translate};
5
+ import e from"../../../../Graphic.js";import t from"../../../../core/Error.js";import{generateUUID as s}from"../../../../core/uuid.js";import{isLoadedSharedTemplate as a,isSharedFeatureTemplate as i,isSharedPresetTemplate as r}from"../../../templateUtils.js";import{isRadial as o,maxDigitizingDisplayEdits as n}from"./executorUtils.js";import l from"../../../../geometry/Multipoint.js";import h from"../../../../geometry/Point.js";import p from"../../../../geometry/Polygon.js";import f from"../../../../geometry/Polyline.js";import{execute as u}from"../../../../geometry/operators/affineTransformOperator.js";import c from"../../../../geometry/operators/support/Transformation.js";import{isSubtypeGroupLayer as m}from"../../../../layers/support/layerUtils.js";function g({edits:s,geometry:a,relationships:i,tag:r="",template:n}){if(o(a)){const e=a.geometry.clone();for(const t of e.paths){g({geometry:new f({spatialReference:e.spatialReference,paths:[t],hasZ:e.hasZ,hasM:e.hasM}),template:n,edits:s,relationships:i,tag:r})}return}const{definition:l,layer:h}=n;a=y(a,h);const p=new e({attributes:l.defaultValues?{...l.defaultValues}:{},geometry:a,sourceLayer:h});if(x(p,h),h.globalIdField&&(p.attributes[h.globalIdField]=R()),s.push({id:h.layerId,graphic:p,tag:r,layer:h}),0!==l.relationships.length)for(const o of l.relationships||[]){if(null==o.relationshipMetadata||null==o.template?.definition)throw new t("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{definition:a,layer:r}=o.template,n=new e({attributes:a.defaultValues?{...a.defaultValues}:{},sourceLayer:r});x(n,r),r.globalIdField&&(n.attributes[r.globalIdField]=R()),s.push({graphic:n,id:r.layerId,tag:"",layer:r}),i.push({...o.relationshipMetadata,sourceGraphic:p,destinationGraphic:n})}}function d({edits:e,geometry:s,mode:o,relationships:l,rotation:h,tag:p="",template:f}){const{definition:m}=f,y=s.x-m.origin.x,Z=s.y-m.origin.y,M=m.origin.hasZ&&s.hasZ?s.z-m.origin.z:0,R=j(m.origin.clone(),y,Z,M),w=(new c).rotate(h,R.x,R.y);for(const c of m.parts){if(e.length>n&&"digitizing"===o)break;const h=c.template;if(!a(h))throw new t("shared-template:template-not-loaded","A template part's template must be loaded before use");if(i(h)){let t=j(c.geometry,y,Z,M);w.isIdentity||(t=u(t,w)),g({edits:e,geometry:t,relationships:l,tag:p,template:h})}else if(r(h)){const t=[];if(d({edits:w.isIdentity?t:e,geometry:s,mode:o,relationships:l,rotation:0,tag:p,template:h}),!w.isIdentity)for(const s of t){const{geometry:t}=s.graphic;t&&"mesh"!==t.type&&(s.graphic.geometry=u(t,w),e.push(s))}}}return R}function y(e,t){if(!e)return null;if(e.hasZ===t.hasZ&&e.hasM===t.hasM)return e;switch(e.type){case"point":return new h({spatialReference:e.spatialReference,x:e.x,y:e.y,...t.hasZ?e.hasZ?{z:e.z}:{z:w(t)}:{},...t.hasM?e.hasM?{m:e.m}:{m:b(t)??void 0}:{}});case"polygon":return new p({spatialReference:e.spatialReference,rings:Z(e.rings,t.hasZ,t.hasM,w(t),b(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"polyline":return new f({spatialReference:e.spatialReference,paths:Z(e.paths,t.hasZ,t.hasM,w(t),b(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"multipoint":return new l({spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM,points:M(e.points,t.hasZ,t.hasM,w(t),b(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1)});default:return e}}function Z(e,t,s,a,i,r,o){const n=[];for(const l of e)n.push(M(l,t,s,a,i,r,o));return n}function M(e,t,s,a,i,r,o){const n=[];for(const l of e){const e=[l[0],l[1]];t&&(e[2]=o>-1?l[2]:a),s&&(e[t?3:2]=r>-1?l[r]:i),n.push(e)}return n}function R(){return`{${s()}}`.toUpperCase()}function w(e){return e.capabilities.editing?.zDefault??0}function b(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function j(e,t,s,a=0){if(!e)return null;if("point"===e.type)return new h({spatialReference:e.spatialReference,x:e.x+t,y:e.y+s,...e.hasZ?{z:e.z+a}:{},...e.hasM?{m:e.m}:{}});if("multipoint"===e.type){const i=[];if(e.hasZ&&e.hasM)for(let r=0;r<e.points.length;r++){const o=e.points[r];i.push([o[0]+t,o[1]+s,o[2]+a,o[3]])}else if(e.hasZ)for(let r=0;r<e.points.length;r++){const o=e.points[r];i.push([o[0]+t,o[1]+s,o[2]+a])}else if(e.hasM)for(let a=0;a<e.points.length;a++){const r=e.points[a];i.push([r[0]+t,r[1]+s,r[2]])}else for(let a=0;a<e.points.length;a++){const r=e.points[a];i.push([r[0]+t,r[1]+s])}return new l({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM,points:i})}if("polygon"===e.type){const i=new p({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let r=0;r<e.rings.length;r++){const o=e.rings[r],n=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else if(e.hasZ)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s]);i.addRing(n)}return i}if("polyline"===e.type){const i=new f({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let r=0;r<e.paths.length;r++){const o=e.paths[r],n=[];if(e.hasZ&&e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a,o[e][3]]);else if(e.hasZ)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]+a]);else if(e.hasM)for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s,o[e][2]]);else for(let e=0;e<o.length;e++)n.push([o[e][0]+t,o[e][1]+s]);i.addPath(n)}return i}return e.clone()}function x(e,t){m(t)&&(e.sourceLayer=t.findSublayerForFeature(e))}export{g as createFeatureServiceEdit,d as createPresetServiceEdit,R as generateGlobalId,j as translate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{getOrCreateMapValue as e}from"../../../../core/MapUtils.js";import n from"../../../../geometry/Extent.js";const t=100;function r(e){return"point"===e.type}function o(e){return"polygon"===e.type}function i(e){return"polyline"===e.type}function u(e){return!!e&&"radial"===e.type}function a(e){let t=null;for(const o of e)if(o.graphic.geometry){const e=o.graphic.geometry,i=r(e)?new n({spatialReference:e.spatialReference,xmin:e.x,xmax:e.x,ymax:e.y,ymin:e.y}):e.extent;t=null==t?i?.clone():t.union(i.extent)}return t}function c(n){const t=new Map;for(const r of n)e(t,r.id,(()=>({id:r.id,addFeatures:[]}))).addFeatures?.push(r.graphic);return[...t.values()]}export{a as calculateExtent,c as groupEditsByLayer,r as isPoint,o as isPolygon,i as isPolyline,u as isRadial,t as maxDigitizingDisplayEdits};
5
+ import{getOrCreateMapValue as e}from"../../../../core/MapUtils.js";import t from"../../../../geometry/Extent.js";const n=100;function o(e){return"point"===e.type}function r(e){return"polygon"===e.type}function i(e){return"polyline"===e.type}function l(e){return!!e&&"radial"===e.type}function a(e){let n=null;for(const r of e)if(r.graphic.geometry){const e=r.graphic.geometry,i=o(e)?new t({spatialReference:e.spatialReference,xmin:e.x,xmax:e.x,ymax:e.y,ymin:e.y}):e.extent;n=null==n?i?.clone():n.union(i.extent)}return n}function c(t){const n=new Map;for(const o of t)e(n,o.id,(()=>({addFeatures:[],id:o.id,identifierFields:{globalIdField:o.layer.globalIdField,objectIdField:o.layer.objectIdField}}))).addFeatures?.push(o.graphic);return[...n.values()]}export{a as calculateExtent,c as groupEditsByLayer,o as isPoint,r as isPolygon,i as isPolyline,l as isRadial,n as maxDigitizingDisplayEdits};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../../chunks/tslib.es6.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as o}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as e}from"./TemplateDefinitionBase.js";import{GroupTemplatePart as s}from"./parts/GroupTemplatePart.js";let p=class extends e{constructor(t){super(t),this.type="group",this.createUtilityNetworkAssociations=!1,this.parts=[]}get allParts(){return[this.basePart,...this.parts]}};t([r({readOnly:!0})],p.prototype,"type",void 0),t([r()],p.prototype,"allParts",null),t([r({readOnly:!0,type:s})],p.prototype,"basePart",void 0),t([r({readOnly:!0})],p.prototype,"createUtilityNetworkAssociations",void 0),t([r({readOnly:!0,type:[s]})],p.prototype,"parts",void 0),p=t([o("esri.editing.sharedTemplates.templateDefinitions.GroupTemplateDefinition")],p);export{p as GroupTemplateDefinition};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{property as r}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as e}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as o}from"./TemplateDefinitionBase.js";import{GroupTemplatePart as s}from"./parts/GroupTemplatePart.js";import{builderInputGeometryTypes as p}from"./parts/builders/builderUtils.js";let i=class extends o{constructor(t){super(t),this.type="group",this.createUtilityNetworkAssociations=!1,this.parts=[]}get allParts(){return[this.basePart,...this.parts]}get inputGeometryType(){return p[this.basePart.builderType]}};t([r({readOnly:!0})],i.prototype,"type",void 0),t([r()],i.prototype,"allParts",null),t([r({readOnly:!0,type:s})],i.prototype,"basePart",void 0),t([r({readOnly:!0})],i.prototype,"createUtilityNetworkAssociations",void 0),t([r()],i.prototype,"inputGeometryType",null),t([r({readOnly:!0,type:[s]})],i.prototype,"parts",void 0),i=t([e("esri.editing.sharedTemplates.templateDefinitions.GroupTemplateDefinition")],i);export{i as GroupTemplateDefinition};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as o}from"./TemplateDefinitionBase.js";import{PresetTemplatePart as s}from"./parts/PresetTemplatePart.js";import p from"../../../geometry/Point.js";import a from"../../../geometry/SpatialReference.js";let i=class extends o{constructor(e){super(e),this.type="preset",this.parts=[]}get allParts(){return this.parts}};e([t({readOnly:!0})],i.prototype,"type",void 0),e([t()],i.prototype,"allParts",null),e([t({readOnly:!0,type:p})],i.prototype,"origin",void 0),e([t({readOnly:!0,type:[s],json:{name:"features"}})],i.prototype,"parts",void 0),e([t({readOnly:!0,type:a})],i.prototype,"spatialReference",void 0),i=e([r("esri.editing.sharedTemplates.templateDefinitions.PresetTemplateDefinition")],i);export{i as PresetTemplateDefinition};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as r}from"../../../core/accessorSupport/decorators/subclass.js";import{TemplateDefinitionBase as o}from"./TemplateDefinitionBase.js";import{PresetTemplatePart as s}from"./parts/PresetTemplatePart.js";import p from"../../../geometry/Point.js";import i from"../../../geometry/SpatialReference.js";let a=class extends o{constructor(e){super(e),this.type="preset",this.parts=[]}get allParts(){return this.parts}};e([t({readOnly:!0})],a.prototype,"type",void 0),e([t()],a.prototype,"allParts",null),e([t({readOnly:!0,type:p})],a.prototype,"origin",void 0),e([t({readOnly:!0,type:[s],json:{name:"features"}})],a.prototype,"parts",void 0),e([t({type:i})],a.prototype,"spatialReference",void 0),a=e([r("esri.editing.sharedTemplates.templateDefinitions.PresetTemplateDefinition")],a);export{a as PresetTemplateDefinition};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{JSONMap as i}from"../../../../../core/jsonMap.js";const n=new i({esri_editing_transformation_bufferLineToPolygon:"buffer-line-to-polygon",esri_editing_transformation_bufferPointToPolygon:"buffer-point-to-polygon",esri_editing_transformation_bufferPolygonToPolygon:"buffer-polygon-to-polygon",esri_editing_transformation_connectionPoint:"connection-point",esri_editing_transformation_equallySpaced:"equally-spaced",esri_editing_transformation_offsetLine:"offset-line",esri_editing_transformation_offsetPrimaryLine:"offset-primary-line",esri_editing_transformation_pointAtAllVerticesOfLine:"point-at-all-vertices-of-line",esri_editing_transformation_pointAtBeginningOfLine:"point-at-beginning-of-line",esri_editing_transformation_pointAtBeginningOfRadial:"point-at-beginning-of-radial",esri_editing_transformation_pointAtEndOfLine:"point-at-end-of-line",esri_editing_transformation_pointAtInteriorVertices:"point-at-interior-vertices",esri_editing_transformation_pointAtIntersectionVerticesOfLine:"point-at-intersection-vertices-of-line",esri_editing_transformation_pointAtNotBeginningOfLine:"point-at-not-beginning-of-line",esri_editing_transformation_pointAtNotEndOfLine:"point-at-not-end-of-line",esri_editing_transformation_pointAtPolygonCentroid:"point-at-polygon-centroid",esri_editing_transformation_pointAtPolygonNotStart:"point-at-polygon-not-start",esri_editing_transformation_pointAtPolygonStart:"point-at-polygon-start",esri_editing_transformation_pointIdentity:"point-identity",esri_editing_transformation_pointPrimaryIdentity:"point-primary-identity",esri_editing_transformation_polygonBoundary:"polygon-boundary",esri_editing_transformation_polygonBoundaryTwoPoint:"polygon-boundary-two-point",esri_editing_transformation_polygonIdentity:"polygon-identity",esri_editing_transformation_polygonPrimaryIdentity:"polygon-primary-identity",esri_editing_transformation_polygonVertices:"polygon-vertices",esri_editing_transformation_radialLines:"radial-lines",esri_editing_transformation_twoPointLines:"two-point-lines"});export{n as builderTypesKebabDict};
5
+ import{JSONMap as n}from"../../../../../core/jsonMap.js";const i=new n({esri_editing_transformation_bufferLineToPolygon:"buffer-line-to-polygon",esri_editing_transformation_bufferPointToPolygon:"buffer-point-to-polygon",esri_editing_transformation_bufferPolygonToPolygon:"buffer-polygon-to-polygon",esri_editing_transformation_connectionPoint:"connection-point",esri_editing_transformation_equallySpaced:"equally-spaced",esri_editing_transformation_offsetLine:"offset-line",esri_editing_transformation_offsetPrimaryLine:"offset-primary-line",esri_editing_transformation_pointAtAllVerticesOfLine:"point-at-all-vertices-of-line",esri_editing_transformation_pointAtBeginningOfLine:"point-at-beginning-of-line",esri_editing_transformation_pointAtBeginningOfRadial:"point-at-beginning-of-radial",esri_editing_transformation_pointAtEndOfLine:"point-at-end-of-line",esri_editing_transformation_pointAtInteriorVertices:"point-at-interior-vertices",esri_editing_transformation_pointAtIntersectionVerticesOfLine:"point-at-intersection-vertices-of-line",esri_editing_transformation_pointAtNotBeginningOfLine:"point-at-not-beginning-of-line",esri_editing_transformation_pointAtNotEndOfLine:"point-at-not-end-of-line",esri_editing_transformation_pointAtPolygonCentroid:"point-at-polygon-centroid",esri_editing_transformation_pointAtPolygonNotStart:"point-at-polygon-not-start",esri_editing_transformation_pointAtPolygonStart:"point-at-polygon-start",esri_editing_transformation_pointIdentity:"point-identity",esri_editing_transformation_pointPrimaryIdentity:"point-primary-identity",esri_editing_transformation_polygonBoundary:"polygon-boundary",esri_editing_transformation_polygonBoundaryTwoPoint:"polygon-boundary-two-point",esri_editing_transformation_polygonIdentity:"polygon-identity",esri_editing_transformation_polygonPrimaryIdentity:"polygon-primary-identity",esri_editing_transformation_polygonVertices:"polygon-vertices",esri_editing_transformation_radialLines:"radial-lines",esri_editing_transformation_twoPointLines:"two-point-lines"}),o={"buffer-line-to-polygon":"polyline","buffer-point-to-polygon":"point","buffer-polygon-to-polygon":"polygon","connection-point":"polyline","equally-spaced":"polyline","offset-line":"polyline","offset-primary-line":"polyline","point-at-all-vertices-of-line":"polyline","point-at-beginning-of-line":"polyline","point-at-beginning-of-radial":"polyline","point-at-end-of-line":"polyline","point-at-interior-vertices":"polyline","point-at-intersection-vertices-of-line":"polyline","point-at-not-beginning-of-line":"polyline","point-at-not-end-of-line":"polyline","point-at-polygon-centroid":"polygon","point-at-polygon-not-start":"polygon","point-at-polygon-start":"polygon","point-identity":"point","point-primary-identity":"point","polygon-boundary":"polygon","polygon-boundary-two-point":"polygon","polygon-identity":"polygon","polygon-primary-identity":"polygon","polygon-vertices":"polygon","radial-lines":"polyline","two-point-lines":"polyline"};export{o as builderInputGeometryTypes,i as builderTypesKebabDict};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{Z as e}from"../chunks/languageUtils.js";import{getOrCreateMapValue as t}from"../core/MapUtils.js";import{throwIfAborted as r}from"../core/promiseUtils.js";import{addMaybe as n}from"../core/SetUtils.js";import{isSubtypeGroupLayer as a,isFeatureLayer as s}from"../layers/support/layerUtils.js";import{getServices as o}from"../undoredo/support/Services.js";function i(e){return"prototype"in e}function p(e){return u(e)&&!("definition"in e)}function l(e){return u(e)&&"definition"in e}function u(e){return"templateId"in e}const f=e=>{if(null==e||"object"!=typeof e)return[];return[..."templates"in e&&Array.isArray(e.templates)?e.templates:[],..."types"in e&&Array.isArray(e.types)?e.types.flatMap((e=>e.templates)):[]]};async function c(e,t,r){if(null==t)return e.map((e=>({layer:e,templates:f(e)})));const n=await d(e,t),a=new Map,s=Array.from(n).map((e=>y({serviceInfo:e,out:a,signal:r,view:t})));return await Promise.all(s),e.map((e=>({layer:e,templates:a.get(e)??f(e)})))}async function y({serviceInfo:e,out:t,signal:n}){const{featureService:s,layersAndTables:o}=e,i=await m({featureService:s,layers:o.toArray(),signal:n});r(n);for(const[r,p]of i.entries())if(0!==p.length)if(a(r)){const e=w(p),n=[],a=e.get(1/0)??n;for(const s of r.sublayers){const r=e.get(s.subtypeCode)??n;t.set(s,[...r,...a])}}else t.set(r,p)}async function m({featureService:e,layers:r,signal:n}){if(!e.capabilities?.editing.supportsSharedTemplates)return new Map;const a=new Map(r.map((e=>[e.layerId,e]))),s=await e.querySharedTemplates({query:{layers:Array.from(a.keys())},requestOptions:{signal:n}}),o=new Map;for(const i of s)for(const e of i.layerIds)a.has(e)&&t(o,a.get(e),(()=>[])).push(i);return o}async function d(e,t){const r=await o(t).load(),a=new Set;for(const s of e)n(a,g(r,s));return await Promise.all(Array.from(a).map((e=>e.featureService.load()))),a}function g(t,r){return e(r)&&r.parent?t.tablesAndLayersLookup.get(r.parent):s(r)?t.tablesAndLayersLookup.get(r):null}function w(e){const r=new Map;for(const n of e)t(r,n.subtypeCode??1/0,(()=>[])).push(n);return r}export{f as getAllStandardFeatureTemplatesForLayer,g as getServiceInfoForLayer,c as getTemplatesForLayers,l as isSharedTemplate,p as isSharedTemplateMetadata,u as isSharedTemplateOrMetadata,i as isStandardFeatureTemplate};
5
+ import{Z as e}from"../chunks/languageUtils.js";import{getOrCreateMapValue as t}from"../core/MapUtils.js";import{throwIfAborted as n}from"../core/promiseUtils.js";import{addMaybe as r}from"../core/SetUtils.js";import{isFeatureTemplateDefinition as i,isGroupTemplateDefinition as o,isPresetTemplateDefinition as s}from"./sharedTemplates/templateDefinitions/templateDefinitionUtils.js";import{isSubtypeGroupLayer as a,isFeatureLayer as l}from"../layers/support/layerUtils.js";import{getServices as u}from"../undoredo/support/Services.js";function f(e){return null!=e&&"prototype"in e}function p(e){return y(e)&&!("definition"in e)}function c(e){return y(e)&&"definition"in e}function y(e){return null!=e&&"templateId"in e}function m(e){return c(e)&&"feature"===e?.type&&(null==e.definition||i(e.definition))}function d(e){return c(e)&&"group"===e?.type&&(null==e.definition||o(e.definition))}function g(e){return c(e)&&"preset"===e?.type&&(null==e.definition||s(e.definition))}function w(e){return c(e)&&null!=e?.definition}const A=e=>{if(null==e||"object"!=typeof e)return[];return[..."templates"in e&&Array.isArray(e.templates)?e.templates:[],..."types"in e&&Array.isArray(e.types)?e.types.flatMap((e=>e.templates)):[]]};async function S(e,t,n){if(null==t)return e.map((e=>({layer:e,templates:A(e)})));const r=await j(e,t),i=new Map,o=Array.from(r).map((e=>b({serviceInfo:e,out:i,signal:n,view:t})));return await Promise.all(o),e.map((e=>({layer:e,templates:i.get(e)??A(e)})))}async function b({serviceInfo:e,out:t,signal:r}){const{featureService:i,layersAndTables:o}=e,s=await h({featureService:i,layers:o.toArray(),signal:r});n(r);for(const[n,l]of s.entries())if(0!==l.length)if(a(n)){const e=M(l),r=[],i=e.get(1/0)??r;for(const o of n.sublayers){const n=e.get(o.subtypeCode)??r;t.set(o,[...n,...i])}}else t.set(n,l)}async function h({featureService:e,layers:n,signal:r}){if(!e.capabilities?.editing.supportsSharedTemplates)return new Map;const i=new Map(n.map((e=>[e.layerId,e]))),o=await e.querySharedTemplates({query:{layers:Array.from(i.keys())},requestOptions:{signal:r}}),s=new Map;for(const a of o)for(const e of a.layerIds)i.has(e)&&t(s,i.get(e),(()=>[])).push(a);return s}async function j(e,t){const n=await u(t).load(),i=new Set;for(const o of e)r(i,v(n,o));return await Promise.all(Array.from(i).map((e=>e.featureService.load()))),i}function v(t,n){return e(n)&&n.parent?t.tablesAndLayersLookup.get(n.parent):l(n)?t.tablesAndLayersLookup.get(n):null}function M(e){const n=new Map;for(const r of e)t(n,r.subtypeCode??1/0,(()=>[])).push(r);return n}export{A as getAllStandardFeatureTemplatesForLayer,v as getServiceInfoForLayer,S as getTemplatesForLayers,w as isLoadedSharedTemplate,m as isSharedFeatureTemplate,d as isSharedGroupTemplate,g as isSharedPresetTemplate,c as isSharedTemplate,p as isSharedTemplateMetadata,y as isSharedTemplateOrMetadata,f as isStandardFeatureTemplate};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{t as e,l as t,G as n,b as r}from"../../chunks/Geometry.js";import{Envelope2D as o}from"../../chunks/Envelope2D.js";import{a as s,P as a,A as i,B as g}from"../../chunks/Envelope.js";import{S as u,j as m}from"../../chunks/QuadraticBezier.js";import{getSpatialReference as c,fromPolyline as l,fromSpatialReference as p,toPolyline as d}from"./support/apiConverter.js";function h(t,n,r,a,i){if(t.isEmpty()||n.isEmpty())return null;if(8&a&&16&a)return null;2&a&&4&a&&e("");const g=new o,u=new o;t.queryEnvelope(g),n.queryEnvelope(u),g.mergeEnvelope2D(u);return f(t,n,s(r,g,!0).total(),a)}function f(e,o,s,i){t(e),t(o);let g,c=!1;const l=e.querySegmentIterator(),p=o.querySegmentIterator();let d=0;const h=new u,f=new a({vd:e.getDescription()}),P=new a({vd:e.getDescription()}),S=[],x=[];for(y(e,S,x);l.nextPath();){let t=!0,o=0;for(;2!==o;){if(0===o){l.nextSegment().getGeometryType()!==n.enumLine&&r(""),o++}else{l.resetToLastSegment();if(l.previousSegment().getGeometryType()!==n.enumLine&&r(""),c&&t){const n=l.getPathIndex();g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1}o++}let a=!1;if(d<x.length){const e=x[S[d]],t=l.getPathIndex();if(e.m_path===t){const t=1===o?l.getStartPointIndex():l.getEndPointIndex();e.m_pointIndex===t&&(a=!0,d++)}}if(1===o){if(8&i)continue}else if(16&i)continue;if(!a){1===o?l.previousSegment():l.nextSegment();const a=1===o?l.nextSegment():l.previousSegment(),u=a,d=u.calculateLength2D();p.resetToFirstPath();let y=!1,S=Number.NaN;for(;p.nextPath();){for(;p.hasNextSegment();){const e=p.nextSegment();e.getGeometryType()!==n.enumLine&&r("");const t=e,{bIntersect:a,t1:i,t2:g}=m(u,t);if(a){const e=t.calculateLength2D();if(g*e>=-s&&(1-g)*e>=-s)if(1===o){if(i*d<=-s)(Number.isNaN(S)||i>S)&&(S=i);else if(i*d<=s){S=Number.NaN,y=!0;break}}else if((1-i)*d<=-s)(Number.isNaN(S)||i<S)&&(S=i);else if((1-i)*d<=s){S=Number.NaN,y=!0;break}}}if(y)break}if(!Number.isNaN(S)){if(!c){g=e.createInstance();for(let t=0;t<l.getPathIndex();t++)g.addPath(e,t,!0)}if(1===o){a.queryCoord(S,f);const n=l.getPathIndex();if(2&i?e.getPointByVal(e.getPathStart(n),P):4&i&&P.setEmpty(),1&i||(h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),h.get().reverse(),g.addSegment(h.get(),!0),t=!1),g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),t),1&i){const e=g.getPathStart(n);g.setPointByVal(e,f)}if(2&i||4&i){const e=g.getPathStart(n),t=f.getXY();P.setXY(t),g.setPointByVal(e,P)}c=!0,t=!1}else{const n=l.getPathIndex();if(t&&(g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1),2&i?e.getPointByVal(e.getPathEnd(n)-1,P):4&i&&P.setEmpty(),a.queryCoord(S,f),1&i){const e=g.getPathEnd(n);g.setPointByVal(e-1,f)}else h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),g.addSegment(h.get(),!1);if(2&i||4&i){const e=g.getPathEnd(n),t=f.getXY();P.setXY(t),g.setPointByVal(e-1,P)}c=!0}}}}}return c?g:null}function P(e,t){return{m_path:e,m_pointIndex:t}}function y(e,t,n){const r=[],o=[],s=e.querySegmentIterator();for(;s.nextPath();){s.resetToFirstSegment();const e=s.nextSegment().getStartXY(),t=s.getPathIndex(),n=s.getStartPointIndex();r.push(e),o.push(P(t,n)),s.resetToLastSegment();const a=s.previousSegment().getEndXY(),i=s.getPathIndex(),g=s.getEndPointIndex();r.push(a),o.push(P(i,g))}const a=new i(0);for(let i=0;i<r.length;i++)a.add(i);const u={userSort(e,t,n){n.sort(e,t,((e,t)=>r[e].compare(r[t])))},getValue:e=>r[e].y};(new g).sort(a,0,a.size(),u);for(let i=0;i<a.size()-1;i++){const e=r[a.read(i)];if(e.equals(r[a.read(i+1)])){do{const e=o[a.read(i)];n.push(e),i++}while(i<a.size()&&e.equals(r[a.read(i)]));i--}}t.length=n.length;for(let i=0;i<n.length;i++)t[i]=i;t.sort(((e,t)=>{const r=n[e],o=n[t];return r.m_path<o.m_path?-1:r.m_path>o.m_path?1:r.m_pointIndex<o.m_pointIndex?-1:1}))}class S{getOperatorType(){return 10007}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,r,o){return h(e,t,n,r)}}const x=new S;function E(e,t,n){let r=0;n&&(n.relocateEnds&&(r|=1),n.keepEndAttributes&&(r|=2),n.noEndAttributes&&(r|=4),n.noExtendAtFrom&&(r|=8),n.noExtendAtTo&&(r|=16));const o=c(e),s=x.execute(l(e),l(t),p(o),r,null);return s?d(s,o):null}const I=x.supportsCurves();export{E as execute,I as supportsCurves};
5
+ import{t as e,l as t,G as n,b as r}from"../../chunks/Geometry.js";import{Envelope2D as o}from"../../chunks/Envelope2D.js";import{c as s,P as a,A as i,B as g}from"../../chunks/Envelope.js";import{S as u,j as m}from"../../chunks/QuadraticBezier.js";import{getSpatialReference as c,fromPolyline as l,fromSpatialReference as p,toPolyline as d}from"./support/apiConverter.js";function h(t,n,r,a,i){if(t.isEmpty()||n.isEmpty())return null;if(8&a&&16&a)return null;2&a&&4&a&&e("");const g=new o,u=new o;t.queryEnvelope(g),n.queryEnvelope(u),g.mergeEnvelope2D(u);return f(t,n,s(r,g,!0).total(),a)}function f(e,o,s,i){t(e),t(o);let g,c=!1;const l=e.querySegmentIterator(),p=o.querySegmentIterator();let d=0;const h=new u,f=new a({vd:e.getDescription()}),P=new a({vd:e.getDescription()}),S=[],x=[];for(y(e,S,x);l.nextPath();){let t=!0,o=0;for(;2!==o;){if(0===o){l.nextSegment().getGeometryType()!==n.enumLine&&r(""),o++}else{l.resetToLastSegment();if(l.previousSegment().getGeometryType()!==n.enumLine&&r(""),c&&t){const n=l.getPathIndex();g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1}o++}let a=!1;if(d<x.length){const e=x[S[d]],t=l.getPathIndex();if(e.m_path===t){const t=1===o?l.getStartPointIndex():l.getEndPointIndex();e.m_pointIndex===t&&(a=!0,d++)}}if(1===o){if(8&i)continue}else if(16&i)continue;if(!a){1===o?l.previousSegment():l.nextSegment();const a=1===o?l.nextSegment():l.previousSegment(),u=a,d=u.calculateLength2D();p.resetToFirstPath();let y=!1,S=Number.NaN;for(;p.nextPath();){for(;p.hasNextSegment();){const e=p.nextSegment();e.getGeometryType()!==n.enumLine&&r("");const t=e,{bIntersect:a,t1:i,t2:g}=m(u,t);if(a){const e=t.calculateLength2D();if(g*e>=-s&&(1-g)*e>=-s)if(1===o){if(i*d<=-s)(Number.isNaN(S)||i>S)&&(S=i);else if(i*d<=s){S=Number.NaN,y=!0;break}}else if((1-i)*d<=-s)(Number.isNaN(S)||i<S)&&(S=i);else if((1-i)*d<=s){S=Number.NaN,y=!0;break}}}if(y)break}if(!Number.isNaN(S)){if(!c){g=e.createInstance();for(let t=0;t<l.getPathIndex();t++)g.addPath(e,t,!0)}if(1===o){a.queryCoord(S,f);const n=l.getPathIndex();if(2&i?e.getPointByVal(e.getPathStart(n),P):4&i&&P.setEmpty(),1&i||(h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),h.get().reverse(),g.addSegment(h.get(),!0),t=!1),g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),t),1&i){const e=g.getPathStart(n);g.setPointByVal(e,f)}if(2&i||4&i){const e=g.getPathStart(n),t=f.getXY();P.setXY(t),g.setPointByVal(e,P)}c=!0,t=!1}else{const n=l.getPathIndex();if(t&&(g.addSegmentsFromPath(e,n,0,e.getSegmentCountPath(n),!0),t=!1),2&i?e.getPointByVal(e.getPathEnd(n)-1,P):4&i&&P.setEmpty(),a.queryCoord(S,f),1&i){const e=g.getPathEnd(n);g.setPointByVal(e-1,f)}else h.create(a.getGeometryType()),a.copyTo(h.get()),h.get().setEnd(f),g.addSegment(h.get(),!1);if(2&i||4&i){const e=g.getPathEnd(n),t=f.getXY();P.setXY(t),g.setPointByVal(e-1,P)}c=!0}}}}}return c?g:null}function P(e,t){return{m_path:e,m_pointIndex:t}}function y(e,t,n){const r=[],o=[],s=e.querySegmentIterator();for(;s.nextPath();){s.resetToFirstSegment();const e=s.nextSegment().getStartXY(),t=s.getPathIndex(),n=s.getStartPointIndex();r.push(e),o.push(P(t,n)),s.resetToLastSegment();const a=s.previousSegment().getEndXY(),i=s.getPathIndex(),g=s.getEndPointIndex();r.push(a),o.push(P(i,g))}const a=new i(0);for(let i=0;i<r.length;i++)a.add(i);const u={userSort(e,t,n){n.sort(e,t,((e,t)=>r[e].compare(r[t])))},getValue:e=>r[e].y};(new g).sort(a,0,a.size(),u);for(let i=0;i<a.size()-1;i++){const e=r[a.read(i)];if(e.equals(r[a.read(i+1)])){do{const e=o[a.read(i)];n.push(e),i++}while(i<a.size()&&e.equals(r[a.read(i)]));i--}}t.length=n.length;for(let i=0;i<n.length;i++)t[i]=i;t.sort(((e,t)=>{const r=n[e],o=n[t];return r.m_path<o.m_path?-1:r.m_path>o.m_path?1:r.m_pointIndex<o.m_pointIndex?-1:1}))}class S{getOperatorType(){return 10007}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,r,o){return h(e,t,n,r)}}const x=new S;function E(e,t,n){let r=0;n&&(n.relocateEnds&&(r|=1),n.keepEndAttributes&&(r|=2),n.noEndAttributes&&(r|=4),n.noExtendAtFrom&&(r|=8),n.noExtendAtTo&&(r|=16));const o=c(e),s=x.execute(l(e),l(t),p(o),r,null);return s?d(s,o):null}const I=x.supportsCurves();export{E as execute,I as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/QuadraticBezier.js";import{G as o,p as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{a as i}from"../../../chunks/Envelope.js";import{h as u,al as l}from"../../../chunks/ProjectionTransformation.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const o=(new u).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends e{constructor(e,t,r,s){super(),this.m_resultPolygons=null,this.m_polygons=e,this.m_polylines=t,this.m_sr=r,this.m_progressTracker=s,this.m_bFirst=!0}tock(){return!0}getRank(){return 1}next(){return this.m_bFirst&&(this.performOperation(),this.m_bFirst=!1),this.m_resultPolygons?this.m_resultPolygons.next():null}getGeometryID(){return null!=this.m_resultPolygons?this.m_resultPolygons.getGeometryID():-1}performOperation(){const e=new m,t=new r;let u,p=s;for(;u=this.m_polylines.next();){if(u.getGeometryType()!==o.enumPolyline||u.isEmpty())continue;p===s?p=t.addGeometry(u):t.appendGeometry(p,u);const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;u=this.m_polygons.next();){if(!n(u.getGeometryType())||u.isEmpty())continue;const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(u)}const c=i(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const a=new p;function y(e,r,s){const o=a.execute(new t(e),new t(r),s,null);return Array.from(o)}function h(){return a.supportsCurves()}export{y as execute,h as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{E as r,n as s}from"../../../chunks/QuadraticBezier.js";import{G as o,p as n}from"../../../chunks/Geometry.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{c as i}from"../../../chunks/Envelope.js";import{j as u,al as l}from"../../../chunks/ProjectionTransformation.js";class p{getOperatorType(){return 10008}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}execute(e,t,r,s){const o=(new u).executeMany(e,r,s);return new c(o,t,r,s)}}class c extends e{constructor(e,t,r,s){super(),this.m_resultPolygons=null,this.m_polygons=e,this.m_polylines=t,this.m_sr=r,this.m_progressTracker=s,this.m_bFirst=!0}tock(){return!0}getRank(){return 1}next(){return this.m_bFirst&&(this.performOperation(),this.m_bFirst=!1),this.m_resultPolygons?this.m_resultPolygons.next():null}getGeometryID(){return null!=this.m_resultPolygons?this.m_resultPolygons.getGeometryID():-1}performOperation(){const e=new m,t=new r;let u,p=s;for(;u=this.m_polylines.next();){if(u.getGeometryType()!==o.enumPolyline||u.isEmpty())continue;p===s?p=t.addGeometry(u):t.appendGeometry(p,u);const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r)}if(0===t.getTotalPointCount())return;for(;u=this.m_polygons.next();){if(!n(u.getGeometryType())||u.isEmpty())continue;const r=new m;u.queryEnvelope(r),e.mergeEnvelope2D(r),t.addGeometry(u)}const c=i(this.m_sr,e,!0);this.m_resultPolygons=l(t,p,c,this.m_progressTracker)}}const a=new p;function y(e,r,s){const o=a.execute(new t(e),new t(r),s,null);return Array.from(o)}function h(){return a.supportsCurves()}export{y as execute,h as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{t as r,c as n,d as s}from"../../../chunks/Geometry.js";import{h as i}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as u}from"../../../chunks/Envelope2D.js";import{B as o}from"../../../chunks/Bufferer-DjC-SKTJ.js";class m{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s){return this.executeManyEx(e,t,r,Number.NaN,96,n,s)}execute(t,s,i,u){Number.isFinite(i)||r("Invalid distance for buffer operation");const o=new e([t]),m=[i],c=this.executeMany(o,s,m,!1,u).next();return c||n("null buffer output"),c}executeManyEx(e,t,n,s,u,o,m){if(void 0!==n.find((e=>!Number.isFinite(e)))&&r("Invalid distance for buffer operation"),o){const r=new c(e,t,n,s,u,!1,m);return(new i).executeMany(r,t,m,2)}return new c(e,t,n,s,u,!1,m)}}class c extends t{constructor(e,t,r,n,s,i,m){super(),this.m_currentUnionEnvelope2D=new u,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=m,this.m_bufferer=new o(m),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return s(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const a=new m;function f(e,t,r){return a.execute(e,t,r,null)}function h(t,r,n,s){const i=a.executeMany(new e(t),r,n,s,null);return Array.from(i)}function l(t,r,n,s,i,u){const o=a.executeManyEx(new e(t),r,n,s,i,u,null);return Array.from(o)}function x(){return a.supportsCurves()}export{f as execute,h as executeMany,l as executeManyEx,x as supportsCurves};
5
+ import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{t as r,c as n,d as s}from"../../../chunks/Geometry.js";import{j as i}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as u}from"../../../chunks/Envelope2D.js";import{B as o}from"../../../chunks/Bufferer-DjC-SKTJ.js";class m{getOperatorType(){return 10004}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,s){return this.executeManyEx(e,t,r,Number.NaN,96,n,s)}execute(t,s,i,u){Number.isFinite(i)||r("Invalid distance for buffer operation");const o=new e([t]),m=[i],c=this.executeMany(o,s,m,!1,u).next();return c||n("null buffer output"),c}executeManyEx(e,t,n,s,u,o,m){if(void 0!==n.find((e=>!Number.isFinite(e)))&&r("Invalid distance for buffer operation"),o){const r=new c(e,t,n,s,u,!1,m);return(new i).executeMany(r,t,m,2)}return new c(e,t,n,s,u,!1,m)}}class c extends t{constructor(e,t,r,n,s,i,m){super(),this.m_currentUnionEnvelope2D=new u,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=m,this.m_bufferer=new o(m),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=n,this.m_maxVerticesInFullCircle=s}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return s(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,0,0,4,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const a=new m;function f(e,t,r){return a.execute(e,t,r,null)}function h(t,r,n,s){const i=a.executeMany(new e(t),r,n,s,null);return Array.from(i)}function l(t,r,n,s,i,u){const o=a.executeManyEx(new e(t),r,n,s,i,u,null);return Array.from(o)}function x(){return a.supportsCurves()}export{f as execute,h as executeMany,l as executeManyEx,x as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as r}from"../../../chunks/Geometry.js";import{h as s}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{B as i}from"../../../chunks/Bufferer-DjC-SKTJ.js";class m{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,i,m,u,c,h,a,_){if(h){const h=new o(e,t,r,n,i,m,u,c,_);return(new s).executeMany(h,t,_,2)}return new o(e,t,r,n,i,m,u,c,_)}}class o extends e{constructor(e,t,r,s,m,o,u,c,h){super(),this.m_currentUnionEnvelope2D=new n,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,this.m_bufferer=new i(h),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=u,this.m_maxVerticesInFullCircle=c,this.m_joins=s,this.m_caps=m,this.m_miterLimit=o}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return r(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const u=new m;function c(e,r,s,n,i,m,o,c,h){const a=u.executeMany(new t(e),r,s,n,i,m,o,c,h,0,null);return Array.from(a)}function h(){return u.supportsCurves()}export{c as executeMany,h as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as r}from"../../../chunks/Geometry.js";import{j as s}from"../../../chunks/ProjectionTransformation.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{B as i}from"../../../chunks/Bufferer-DjC-SKTJ.js";class m{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,n,i,m,u,c,h,a,_){if(h){const h=new o(e,t,r,n,i,m,u,c,_);return(new s).executeMany(h,t,_,2)}return new o(e,t,r,n,i,m,u,c,_)}}class o extends e{constructor(e,t,r,s,m,o,u,c,h){super(),this.m_currentUnionEnvelope2D=new n,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,this.m_bufferer=new i(h),this.m_inputGeoms=e,this.m_spatialReference=t,this.m_distances=r,this.m_maxDeviation=u,this.m_maxVerticesInFullCircle=c,this.m_joins=s,this.m_caps=m,this.m_miterLimit=o}tock(){return!0}getRank(){return 1}next(){{let e;for(;e=this.m_inputGeoms.next();)return r(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.m_dindex+1<this.m_distances.length&&this.m_dindex++,this.buffer(e,this.m_distances[this.m_dindex]);return null}}getGeometryID(){return this.m_index}buffer(e,t){return this.m_bufferer.buffer(e,t,this.m_spatialReference,this.m_joins,this.m_caps,this.m_miterLimit,this.m_maxDeviation,this.m_maxVerticesInFullCircle)}}const u=new m;function c(e,r,s,n,i,m,o,c,h){const a=u.executeMany(new t(e),r,s,n,i,m,o,c,h,0,null);return Array.from(a)}function h(){return u.supportsCurves()}export{c as executeMany,h as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{m as s,G as r,d as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{a as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,k as l,s as c,l as y,ap as G,aq as g,C as d,ar as f}from"../../../chunks/ProjectionTransformation.js";class x{getOperatorType(){return 10009}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,r=0){return new T(e,t,s,r)}}class T extends e{constructor(e,t,r,i){super(),this.m_shape=new m,this.m_currentGeom=o,this.m_progressCounter=0,this.m_geomIndex=-1,this.m_geomTypeIndex=-1,this.m_index=-1,this.m_bBuilt=!1,this.m_bOutputOnlyModified=!1,this.m_bSimplifyPolygons=!1,this.m_bSnapToSr=!1,this.m_progressTracker=r,this.m_inputGeometries=e,this.m_sr=t,this.m_options=i,1===i||2===i?(this.m_bOutputOnlyModified=!0,this.m_options=0,this.m_bSimplifyPolygons=!0,this.m_bSnapToSr=null!=t&&2===i,this.m_bSnapToSr&&!_()&&s("PE is required for snapping to spatial reference operation")):0===i&&(this.m_bSimplifyPolygons=!0)}progress_(e=!1){}tock(){return!0}getRank(){return 1}moveToNextGeom(){for(;;){if(this.m_bBuilt?this.m_currentGeom=this.m_shape.getNextGeometry(this.m_currentGeom):(this.m_currentGeom=this.m_shape.getFirstGeometry(),this.m_bBuilt=!0),this.m_currentGeom!==o){let e=!1;if(this.m_bSimplifyPolygons&&this.m_shape.getGeometryType(this.m_currentGeom)===r.enumPolygon&&(e=p(this.m_shape,this.m_currentGeom,-1,!1,o,this.m_progressTracker)),this.m_bOutputOnlyModified&&!e&&!this.m_shape.getGeometryModified(this.m_currentGeom))continue}break}}next(){if(this.m_bBuilt)this.moveToNextGeom();else{this.m_geomIndex=this.m_shape.createGeometryUserIndex();const e=new n;for(let o=this.m_inputGeometries.next();null!=o;o=this.m_inputGeometries.next()){this.progress_(),i(o);let t=!1;this.m_bSnapToSr&&(o=o.clone(),t=u(this.m_sr,o));const s=this.m_shape.addGeometry(o);this.m_shape.setGeometryUserIndex(s,this.m_geomIndex,this.m_inputGeometries.getGeometryID());const m=o.getGeometryType();m===r.enumPoint&&(-1===this.m_geomTypeIndex&&(this.m_geomTypeIndex=this.m_shape.createGeometryUserIndex()),this.m_shape.setGeometryUserIndex(s,this.m_geomTypeIndex,m));const h=new n;o.queryLooseEnvelope(h),e.mergeEnvelope2D(h),t&&this.m_shape.setGeometryModified(s,!0)}const t=h(this.m_sr,e,!0),s=h(this.m_sr,e,!1);e.inflate(10*t.total()),this.m_shape.forceSetEnvelope2D(e);let m=null,a=0,_=0;if(this.m_shape.hasCurves()){m=new d;const s=l(t.total(),e);a=c(t.total()),_=f(s,a),y(this.m_shape,s,t.total(),12e3,m,null,this.m_progressTracker)}if(G(this.m_shape,s,this.m_progressTracker)){if(g(this.m_shape,t.add(_),this.m_progressTracker,0===this.m_options,this.m_bOutputOnlyModified),null!==m){if(this.m_bSimplifyPolygons){for(let e=this.m_shape.getFirstGeometry();e!==o;e=this.m_shape.getNextGeometry(e))if(this.m_shape.getGeometryType(e)===r.enumPolygon){p(this.m_shape,e,-1,!1,o,this.m_progressTracker)&&this.m_shape.setGeometryModified(e,!0)}this.m_bSimplifyPolygons=!1}m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape)}}else this.m_bSimplifyPolygons=!1,null!==m&&(m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape));this.moveToNextGeom()}if(this.m_currentGeom!==o){if(this.m_index=this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomIndex),-1!==this.m_geomTypeIndex&&this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomTypeIndex)===r.enumPoint){const e=new a({vd:this.m_shape.getVertexDescription()});return this.m_shape.queryPointGeometryOnly(this.m_currentGeom,e),this.m_bSnapToSr&&u(this.m_sr,e),e}{const e=this.m_shape.getGeometry(this.m_currentGeom);return this.m_bSnapToSr&&u(this.m_sr,e),e}}return null}getGeometryID(){return this.m_index}}const S=new x;function b(e,s,r){const i=S.executeMany(new t(e),s,null,r);return Array.from(i)}function I(){return S.supportsCurves()}export{b as executeMany,I as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{m as s,G as r,d as i}from"../../../chunks/Geometry.js";import{E as m,n as o}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as n}from"../../../chunks/Envelope2D.js";import{c as h,P as a}from"../../../chunks/Envelope.js";import{am as _,an as p,ao as u,k as l,s as c,l as y,ap as G,aq as g,C as d,ar as f}from"../../../chunks/ProjectionTransformation.js";class x{getOperatorType(){return 10009}supportsCurves(){return!0}accelerateGeometry(e,t,s){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,s,r=0){return new T(e,t,s,r)}}class T extends e{constructor(e,t,r,i){super(),this.m_shape=new m,this.m_currentGeom=o,this.m_progressCounter=0,this.m_geomIndex=-1,this.m_geomTypeIndex=-1,this.m_index=-1,this.m_bBuilt=!1,this.m_bOutputOnlyModified=!1,this.m_bSimplifyPolygons=!1,this.m_bSnapToSr=!1,this.m_progressTracker=r,this.m_inputGeometries=e,this.m_sr=t,this.m_options=i,1===i||2===i?(this.m_bOutputOnlyModified=!0,this.m_options=0,this.m_bSimplifyPolygons=!0,this.m_bSnapToSr=null!=t&&2===i,this.m_bSnapToSr&&!_()&&s("PE is required for snapping to spatial reference operation")):0===i&&(this.m_bSimplifyPolygons=!0)}progress_(e=!1){}tock(){return!0}getRank(){return 1}moveToNextGeom(){for(;;){if(this.m_bBuilt?this.m_currentGeom=this.m_shape.getNextGeometry(this.m_currentGeom):(this.m_currentGeom=this.m_shape.getFirstGeometry(),this.m_bBuilt=!0),this.m_currentGeom!==o){let e=!1;if(this.m_bSimplifyPolygons&&this.m_shape.getGeometryType(this.m_currentGeom)===r.enumPolygon&&(e=p(this.m_shape,this.m_currentGeom,-1,!1,o,this.m_progressTracker)),this.m_bOutputOnlyModified&&!e&&!this.m_shape.getGeometryModified(this.m_currentGeom))continue}break}}next(){if(this.m_bBuilt)this.moveToNextGeom();else{this.m_geomIndex=this.m_shape.createGeometryUserIndex();const e=new n;for(let o=this.m_inputGeometries.next();null!=o;o=this.m_inputGeometries.next()){this.progress_(),i(o);let t=!1;this.m_bSnapToSr&&(o=o.clone(),t=u(this.m_sr,o));const s=this.m_shape.addGeometry(o);this.m_shape.setGeometryUserIndex(s,this.m_geomIndex,this.m_inputGeometries.getGeometryID());const m=o.getGeometryType();m===r.enumPoint&&(-1===this.m_geomTypeIndex&&(this.m_geomTypeIndex=this.m_shape.createGeometryUserIndex()),this.m_shape.setGeometryUserIndex(s,this.m_geomTypeIndex,m));const h=new n;o.queryLooseEnvelope(h),e.mergeEnvelope2D(h),t&&this.m_shape.setGeometryModified(s,!0)}const t=h(this.m_sr,e,!0),s=h(this.m_sr,e,!1);e.inflate(10*t.total()),this.m_shape.forceSetEnvelope2D(e);let m=null,a=0,_=0;if(this.m_shape.hasCurves()){m=new d;const s=l(t.total(),e);a=c(t.total()),_=f(s,a),y(this.m_shape,s,t.total(),12e3,m,null,this.m_progressTracker)}if(G(this.m_shape,s,this.m_progressTracker)){if(g(this.m_shape,t.add(_),this.m_progressTracker,0===this.m_options,this.m_bOutputOnlyModified),null!==m){if(this.m_bSimplifyPolygons){for(let e=this.m_shape.getFirstGeometry();e!==o;e=this.m_shape.getNextGeometry(e))if(this.m_shape.getGeometryType(e)===r.enumPolygon){p(this.m_shape,e,-1,!1,o,this.m_progressTracker)&&this.m_shape.setGeometryModified(e,!0)}this.m_bSimplifyPolygons=!1}m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape)}}else this.m_bSimplifyPolygons=!1,null!==m&&(m.stitchCurves(this.m_shape,o,a,!0),m.clearStitcher(this.m_shape));this.moveToNextGeom()}if(this.m_currentGeom!==o){if(this.m_index=this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomIndex),-1!==this.m_geomTypeIndex&&this.m_shape.getGeometryUserIndex(this.m_currentGeom,this.m_geomTypeIndex)===r.enumPoint){const e=new a({vd:this.m_shape.getVertexDescription()});return this.m_shape.queryPointGeometryOnly(this.m_currentGeom,e),this.m_bSnapToSr&&u(this.m_sr,e),e}{const e=this.m_shape.getGeometry(this.m_currentGeom);return this.m_bSnapToSr&&u(this.m_sr,e),e}}return null}getGeometryID(){return this.m_index}}const S=new x;function b(e,s,r){const i=S.executeMany(new t(e),s,null,r);return Array.from(i)}function I(){return S.supportsCurves()}export{b as executeMany,I as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as n,t as r,G as o,g as s}from"../../../chunks/Geometry.js";import{P as a,a as i}from"../../../chunks/Envelope.js";import{a as l,L as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";import{P as m,q as N,r as g,m as h}from"../../../chunks/Point2D.js";import{ah as y,i as P}from"../../../chunks/ProjectionTransformation.js";import{a as p}from"../../../chunks/Centroid-DZi-eb9F.js";import{O as f}from"../../../chunks/OperatorProximity.js";class d{getOperatorType(){return 10203}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t){return new x(e,t)}execute(e,t){return new x(null,t).labelPoint(e)}}class x extends e{progress_(){}tock(){return!0}getRank(){return 1}constructor(e,t){super(),this.m_index=-1,this.m_progressCounter=0,this.m_progressTracker=t,this.m_inputGeoms=e}next(){const e=this.m_inputGeoms.next();return e?(n(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.labelPoint(e)):null}getGeometryID(){return this.m_index}labelPoint(e){if(null===e&&r("null pointer is not allowed"),e.getGeometryType()===o.enumPoint)return e;if(e.isEmpty())return new a({vd:e.getDescription()});switch(e.getGeometryType()){case o.enumPolygon:return this.labelPointPolygon(e);case o.enumPolyline:return this.labelPointPolyline(e);case o.enumMultiPoint:return this.labelPointMultiPoint(e);case o.enumEnvelope:return this.labelPointEnvelope(e);default:r("geometry is not supported")}}labelPointPolygon(e){const t=new c;e.queryEnvelope(t);const n=i(null,t,!0).total();let r=null,o=e;if(e.hasNonLinearSegments()){const t=new l({copy:e}),a=y(t,.25*n,n);s(a!==e),r=a,o=r}let u=0,h=0;for(let s=0,a=o.getPathCount();s<a;++s){const e=Math.abs(o.calculateRingArea2D(s));e>h&&(h=e,u=s)}const d=new m;if(Math.abs(h)<=2*n*n?d.setNAN():d.assign(p(o,u)),Number.isNaN(d.x)){const e=new c;return o.queryPathEnvelope(u,e),new a({pt:e.getCenter()})}if(o.getPointCount()<4)return new a({x:d.x,y:d.y});const x=m.getNAN(),w=[x.clone(),x.clone(),x.clone(),x.clone()],b=[Number.NaN,Number.NaN,Number.NaN,Number.NaN],C=[Number.NaN,Number.NaN,Number.NaN,Number.NaN];let _=!1,D=(new f).getNearestCoordinate(o,d,!0,!1);if(0===D.m_distance&&(_=!0,w[0]=d,D=(new f).getNearestCoordinate(o,d,!1,!1),D.m_distance>.25*t.minDimension()*1.66666666))return new a({x:d.x,y:d.y});b[0]=D.m_distance,C[0]=0;const k=new m;let A=!1,E=.25,q=-1;const v=new c;o.queryPathEnvelope(u,v);do{let e=Number.NaN;if(w[1]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[1].isNAN()||(D=(new f).getNearestCoordinate(o,w[1],!1,!1),e=D.m_distance),e>n&&1===P(o,w[1],n))A=!0,b[1]=e,C[1]=m.sqrDistance(w[1],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[1])),E-=.01,E<.1){if(!(q>=0))break;A=!0,b[1]=q,w[1]=k,C[1]=m.sqrDistance(w[1],d)}}while(!A);A=!1,E=.5,q=-1;let G=.01,M=1;do{let e=Number.NaN;if(w[2]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[2].isNAN()||(D=(new f).getNearestCoordinate(o,w[2],!1,!1),e=D.m_distance),e>n&&1===P(o,w[2],n))A=!0,b[2]=e,C[2]=m.sqrDistance(w[2],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[2])),E=.5+G*M,G+=.01,M*=-1,E<.3||E>.7){if(!(q>=0))break;A=!0,b[2]=q,w[2]=k,C[2]=m.sqrDistance(w[2],d)}}while(!A);A=!1,E=.75,q=-1;do{let e=Number.NaN;if(w[3]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[3].isNAN()||(D=(new f).getNearestCoordinate(o,w[3],!1,!1),e=D.m_distance),e>n&&1===P(o,w[3],n))A=!0,b[3]=e,C[3]=m.sqrDistance(w[3],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[3])),E+=.01,E>.9){if(!(q>=0))break;A=!0,b[3]=q,w[3]=k,C[3]=m.sqrDistance(w[3],d)}}while(!A);const S=[0,1,2,3],j=_?0:1;for(let s=j;s<4;s++)for(let e=j;e<3;e++){const t=C[e],n=C[e+1];if(g(t,n)>0){const r=S[e];S[e]=S[e+1],S[e+1]=r,C[e]=n,C[e+1]=t}}let X=j,L=0,T=0;for(let s=j;s<4;s++){switch(s){case 0:T=2*b[S[s]];break;case 1:T=1.66666666*b[S[s]];break;case 2:T=1.33333333*b[S[s]];break;case 3:T=b[S[s]]}T>L&&(L=T,X=S[s])}return s(!w[X].isNAN()),new a({x:w[X].x,y:w[X].y})}labelPointPolyline(e){const t=new m;if(e.getPointCount()>2*e.getPathCount()){let n=-1,r=-Number.MAX_VALUE;for(let t=0,i=e.getPathCount();t<i;t++)if(e.getPathSize(t)>2){const o=e.calculatePathLength2D(t);o>r&&(r=o,n=t)}const o=e.getPathStart(n),s=e.getPathEnd(n),a=Math.trunc((o+s)/2);t.assign(e.getXY(a))}else{let n=-Number.MAX_VALUE;const r=e.querySegmentIterator();for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment(),o=e.calculateLength2D();o>n&&(n=o,t.assign(e.getCoord2D(e.lengthToT(.5*o))))}}return new a({x:t.x,y:t.y})}labelPointMultiPoint(e){const t=new c;e.queryEnvelope(t);const n=t.getCenter(),r=(new f).getNearestCoordinate(e,n,!1,!1).m_coordinate;return new a({x:r.x,y:r.y})}labelPointEnvelope(e){const t=e.getCenterXY();return new a({x:t.x,y:t.y})}calculateParacentroid_(e,t,n){const r=new c;e.queryEnvelope(r);const o=new m(t,0);let a=Number.MAX_VALUE,i=Number.MAX_VALUE,l=!1,N=!1;const g=new u;g.setStartXYCoords(o.x,r.ymin-1),g.setEndXYCoords(o.x,r.ymax+1);const y=new c,P=new m,p=new m,f=h(m,2),d=e.querySegmentIterator();for(;d.nextPath();)for(;d.hasNextSegment();){const e=d.nextSegment();if(e.queryEnvelope(y),s(e.isMonotoneQuickAndDirty()),P.setCoordsPoint2D(g.getStartXY()),p.setCoordsPoint2D(g.getEndXY()),0===y.clipLine(P,p))continue;if(1!==g.intersect(e,f,null,null,n))continue;const t=f[0].y;a>i?t<a&&(a=t,l=!0):t<i&&(i=t,N=!0)}return l&&N?o.y=(a+i)/2:o.setNAN(),o}}const w=new d;function b(e){return w.execute(e,null)}function C(e){const n=w.executeMany(new t(e),null);return Array.from(n)}function _(){return w.supportsCurves()}export{b as execute,C as executeMany,_ as supportsCurves};
5
+ import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{d as n,t as r,G as o,g as s}from"../../../chunks/Geometry.js";import{P as a,c as i}from"../../../chunks/Envelope.js";import{a as l,L as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as c}from"../../../chunks/Envelope2D.js";import{P as m,q as N,r as g,m as h}from"../../../chunks/Point2D.js";import{ah as y,g as P}from"../../../chunks/ProjectionTransformation.js";import{a as p}from"../../../chunks/Centroid-DZi-eb9F.js";import{O as f}from"../../../chunks/OperatorProximity.js";class d{getOperatorType(){return 10203}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,t){return new x(e,t)}execute(e,t){return new x(null,t).labelPoint(e)}}class x extends e{progress_(){}tock(){return!0}getRank(){return 1}constructor(e,t){super(),this.m_index=-1,this.m_progressCounter=0,this.m_progressTracker=t,this.m_inputGeoms=e}next(){const e=this.m_inputGeoms.next();return e?(n(e),this.m_index=this.m_inputGeoms.getGeometryID(),this.labelPoint(e)):null}getGeometryID(){return this.m_index}labelPoint(e){if(null===e&&r("null pointer is not allowed"),e.getGeometryType()===o.enumPoint)return e;if(e.isEmpty())return new a({vd:e.getDescription()});switch(e.getGeometryType()){case o.enumPolygon:return this.labelPointPolygon(e);case o.enumPolyline:return this.labelPointPolyline(e);case o.enumMultiPoint:return this.labelPointMultiPoint(e);case o.enumEnvelope:return this.labelPointEnvelope(e);default:r("geometry is not supported")}}labelPointPolygon(e){const t=new c;e.queryEnvelope(t);const n=i(null,t,!0).total();let r=null,o=e;if(e.hasNonLinearSegments()){const t=new l({copy:e}),a=y(t,.25*n,n);s(a!==e),r=a,o=r}let u=0,h=0;for(let s=0,a=o.getPathCount();s<a;++s){const e=Math.abs(o.calculateRingArea2D(s));e>h&&(h=e,u=s)}const d=new m;if(Math.abs(h)<=2*n*n?d.setNAN():d.assign(p(o,u)),Number.isNaN(d.x)){const e=new c;return o.queryPathEnvelope(u,e),new a({pt:e.getCenter()})}if(o.getPointCount()<4)return new a({x:d.x,y:d.y});const x=m.getNAN(),w=[x.clone(),x.clone(),x.clone(),x.clone()],b=[Number.NaN,Number.NaN,Number.NaN,Number.NaN],C=[Number.NaN,Number.NaN,Number.NaN,Number.NaN];let _=!1,D=(new f).getNearestCoordinate(o,d,!0,!1);if(0===D.m_distance&&(_=!0,w[0]=d,D=(new f).getNearestCoordinate(o,d,!1,!1),D.m_distance>.25*t.minDimension()*1.66666666))return new a({x:d.x,y:d.y});b[0]=D.m_distance,C[0]=0;const k=new m;let A=!1,E=.25,q=-1;const v=new c;o.queryPathEnvelope(u,v);do{let e=Number.NaN;if(w[1]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[1].isNAN()||(D=(new f).getNearestCoordinate(o,w[1],!1,!1),e=D.m_distance),e>n&&1===P(o,w[1],n))A=!0,b[1]=e,C[1]=m.sqrDistance(w[1],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[1])),E-=.01,E<.1){if(!(q>=0))break;A=!0,b[1]=q,w[1]=k,C[1]=m.sqrDistance(w[1],d)}}while(!A);A=!1,E=.5,q=-1;let G=.01,M=1;do{let e=Number.NaN;if(w[2]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[2].isNAN()||(D=(new f).getNearestCoordinate(o,w[2],!1,!1),e=D.m_distance),e>n&&1===P(o,w[2],n))A=!0,b[2]=e,C[2]=m.sqrDistance(w[2],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[2])),E=.5+G*M,G+=.01,M*=-1,E<.3||E>.7){if(!(q>=0))break;A=!0,b[2]=q,w[2]=k,C[2]=m.sqrDistance(w[2],d)}}while(!A);A=!1,E=.75,q=-1;do{let e=Number.NaN;if(w[3]=this.calculateParacentroid_(o,N(v.xmin,v.xmax,E),n),w[3].isNAN()||(D=(new f).getNearestCoordinate(o,w[3],!1,!1),e=D.m_distance),e>n&&1===P(o,w[3],n))A=!0,b[3]=e,C[3]=m.sqrDistance(w[3],d);else if(e>q&&(q=e,k.setCoordsPoint2D(w[3])),E+=.01,E>.9){if(!(q>=0))break;A=!0,b[3]=q,w[3]=k,C[3]=m.sqrDistance(w[3],d)}}while(!A);const S=[0,1,2,3],j=_?0:1;for(let s=j;s<4;s++)for(let e=j;e<3;e++){const t=C[e],n=C[e+1];if(g(t,n)>0){const r=S[e];S[e]=S[e+1],S[e+1]=r,C[e]=n,C[e+1]=t}}let X=j,L=0,T=0;for(let s=j;s<4;s++){switch(s){case 0:T=2*b[S[s]];break;case 1:T=1.66666666*b[S[s]];break;case 2:T=1.33333333*b[S[s]];break;case 3:T=b[S[s]]}T>L&&(L=T,X=S[s])}return s(!w[X].isNAN()),new a({x:w[X].x,y:w[X].y})}labelPointPolyline(e){const t=new m;if(e.getPointCount()>2*e.getPathCount()){let n=-1,r=-Number.MAX_VALUE;for(let t=0,i=e.getPathCount();t<i;t++)if(e.getPathSize(t)>2){const o=e.calculatePathLength2D(t);o>r&&(r=o,n=t)}const o=e.getPathStart(n),s=e.getPathEnd(n),a=Math.trunc((o+s)/2);t.assign(e.getXY(a))}else{let n=-Number.MAX_VALUE;const r=e.querySegmentIterator();for(;r.nextPath();)if(r.hasNextSegment()){const e=r.nextSegment(),o=e.calculateLength2D();o>n&&(n=o,t.assign(e.getCoord2D(e.lengthToT(.5*o))))}}return new a({x:t.x,y:t.y})}labelPointMultiPoint(e){const t=new c;e.queryEnvelope(t);const n=t.getCenter(),r=(new f).getNearestCoordinate(e,n,!1,!1).m_coordinate;return new a({x:r.x,y:r.y})}labelPointEnvelope(e){const t=e.getCenterXY();return new a({x:t.x,y:t.y})}calculateParacentroid_(e,t,n){const r=new c;e.queryEnvelope(r);const o=new m(t,0);let a=Number.MAX_VALUE,i=Number.MAX_VALUE,l=!1,N=!1;const g=new u;g.setStartXYCoords(o.x,r.ymin-1),g.setEndXYCoords(o.x,r.ymax+1);const y=new c,P=new m,p=new m,f=h(m,2),d=e.querySegmentIterator();for(;d.nextPath();)for(;d.hasNextSegment();){const e=d.nextSegment();if(e.queryEnvelope(y),s(e.isMonotoneQuickAndDirty()),P.setCoordsPoint2D(g.getStartXY()),p.setCoordsPoint2D(g.getEndXY()),0===y.clipLine(P,p))continue;if(1!==g.intersect(e,f,null,null,n))continue;const t=f[0].y;a>i?t<a&&(a=t,l=!0):t<i&&(i=t,N=!0)}return l&&N?o.y=(a+i)/2:o.setNAN(),o}}const w=new d;function b(e){return w.execute(e,null)}function C(e){const n=w.executeMany(new t(e),null);return Array.from(n)}function _(){return w.supportsCurves()}export{b as execute,C as executeMany,_ as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{G as e,S as r}from"../../../chunks/SimpleGeometryCursor.js";import{E as t}from"../../../chunks/QuadraticBezier.js";import{o as s,d as n}from"../../../chunks/Geometry.js";import{a as o}from"../../../chunks/Envelope.js";import{as as m}from"../../../chunks/ProjectionTransformation.js";class i{getOperatorType(){return 10010}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,r,t){return new u(e,r,t)}}class u extends e{constructor(e,r,t){super(),this.m_result=null,this.m_geoms=e,this.m_sr=r,this.m_progressTracker=t,this.m_bfirst=!0,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){return this.m_bfirst&&(this.performOperation(),this.m_bfirst=!1),this.m_result?this.m_result.next():null}getGeometryID(){return null!==this.m_result?this.m_result.getGeometryID():-1}performOperation(){const e=new t;for(let t=this.m_geoms.next();null!==t;t=this.m_geoms.next())t.isEmpty()||t.getDimension()<1||s(t.getGeometryType())||(n(t),e.addGeometry(t));if(0===e.getGeometryCount())return;const r=e.getEnvelope2D(this.m_progressTracker),i=o(this.m_sr,r,!0);this.m_result=m(e,i,this.m_progressTracker)}}const a=new i;function c(e,t){const s=a.executeMany(new r(e),t,null);return Array.from(s)}function p(){return a.supportsCurves()}export{c as executeMany,p as supportsCurves};
5
+ import{G as e,S as r}from"../../../chunks/SimpleGeometryCursor.js";import{E as t}from"../../../chunks/QuadraticBezier.js";import{o as s,d as n}from"../../../chunks/Geometry.js";import{c as o}from"../../../chunks/Envelope.js";import{as as m}from"../../../chunks/ProjectionTransformation.js";class i{getOperatorType(){return 10010}accelerateGeometry(e,r,t){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!0}executeMany(e,r,t){return new u(e,r,t)}}class u extends e{constructor(e,r,t){super(),this.m_result=null,this.m_geoms=e,this.m_sr=r,this.m_progressTracker=t,this.m_bfirst=!0,this.m_index=-1}tock(){return!0}getRank(){return 1}next(){return this.m_bfirst&&(this.performOperation(),this.m_bfirst=!1),this.m_result?this.m_result.next():null}getGeometryID(){return null!==this.m_result?this.m_result.getGeometryID():-1}performOperation(){const e=new t;for(let t=this.m_geoms.next();null!==t;t=this.m_geoms.next())t.isEmpty()||t.getDimension()<1||s(t.getGeometryType())||(n(t),e.addGeometry(t));if(0===e.getGeometryCount())return;const r=e.getEnvelope2D(this.m_progressTracker),i=o(this.m_sr,r,!0);this.m_result=m(e,i,this.m_progressTracker)}}const a=new i;function c(e,t){const s=a.executeMany(new r(e),t,null);return Array.from(s)}function p(){return a.supportsCurves()}export{c as executeMany,p as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{O as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{t as s,d as i,G as r,g as h}from"../../../chunks/Geometry.js";import{Envelope2D as o}from"../../../chunks/Envelope2D.js";import{a as n}from"../../../chunks/Envelope.js";import{E as a,o as m,n as p}from"../../../chunks/QuadraticBezier.js";import{C as _,k as c,s as u,ar as l,l as g,ap as d,aq as G,an as C,at as y,au as I,av as f}from"../../../chunks/ProjectionTransformation.js";import{v as x}from"../../../chunks/Point2D.js";function k(t){t&&t.checkProgress()}class v{getOperatorType(){return 10012}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,i){return new S(t,e,s,i)}}class S extends t{constructor(t,e,i,r){super(),this.m_shape=null,this.m_topoGraph=null,this.m_curveStitcher=null,this.m_stitchMaxDeviation=0,this.m_chainStack=[],this.m_bitsetToChains=null,this.m_chainsLists=null,this.m_visitedChainsIndex=-1,this.m_index=-1,this.m_geometryIndex=-1,this.m_progressCounter=0,this.m_currentIds=[],this.m_currentEdgeIds=[],t||s(""),this.m_progressTracker=r,this.m_options=0!==i?i:3,(this.m_options<=0||this.m_options>63)&&s("options"),this.m_inputGeometryCursor=t,this.m_sr=e}tock(){return!0}getRank(){return 1}next(){if(-1===this.m_index){this.m_shape=new a;const t=new o;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let n=this.m_inputGeometryCursor.next();null!==n;n=this.m_inputGeometryCursor.next()){i(n);const e=this.m_shape.addGeometry(n);n.getGeometryType()!==r.enumPolygon&&s("Polygon Overlay only supports Polygons"),this.m_shape.setGeometryUserIndex(e,this.m_geometryIndex,this.m_inputGeometryCursor.getGeometryID());const h=this.m_inputGeometryCursor.getRank();h>m&&this.m_shape.assignRankToGeometryVertices(e,h);const a=new o;n.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const e=n(this.m_sr,t,!0),h=n(this.m_sr,t,!1);t.inflate(10*e.total()),this.m_shape.forceSetEnvelope2D(t),this.m_stitchMaxDeviation=0;let f=0;if(this.m_shape.hasCurves()){this.m_curveStitcher=new _;const s=c(e.total(),t);this.m_stitchMaxDeviation=u(e.total()),f=l(s,this.m_stitchMaxDeviation),g(this.m_shape,s,e.total(),12e3,this.m_curveStitcher,null,this.m_progressTracker)}if(d(this.m_shape,h,this.m_progressTracker)){G(this.m_shape,e.add(f),this.m_progressTracker,!0,!1);for(let t=this.m_shape.getFirstGeometry();t!==p;t=this.m_shape.getNextGeometry(t))this.m_shape.getGeometryType(t)===r.enumPolygon&&C(this.m_shape,t,-1,!1,p,this.m_progressTracker)}this.m_topoGraph=new y,this.m_topoGraph.buildGeometryParentageSets(),this.m_topoGraph.setEditShape(this.m_shape,this.m_progressTracker);const x=this.m_topoGraph.getFirstChain();for(let s=this.m_topoGraph.getChainFirstIsland(x);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let t=this.m_topoGraph.getChainFirstIsland(s);t!==p;t=this.m_topoGraph.getChainNextInParent(t))this.m_chainStack.push(t);if(16&this.m_options){this.m_visitedChainsIndex=this.m_topoGraph.createUserIndexForChains(),this.m_bitsetToChains=new Map,this.m_chainsLists=new I;const t=[],e=this.m_topoGraph.getFirstChain();for(t.push(e);t.length>0;){const e=t.at(-1);t.pop();for(let s=this.m_topoGraph.getChainFirstIsland(e);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let e=this.m_topoGraph.getChainFirstIsland(s);e!==p;e=this.m_topoGraph.getChainNextInParent(e)){const s=this.m_topoGraph.getChainBitSet(e);if(null!==s&&!s.isZero()){let t;this.m_bitsetToChains.has(s)?t=this.m_bitsetToChains.get(s):(t=this.m_chainsLists.createList(),this.m_bitsetToChains.set(s,t)),this.m_chainsLists.addElement(t,e)}t.push(e)}}}}return this.makeNextGeometry()}getGeometryID(){return this.m_index}getGeometryIDs(){return this.m_currentIds.slice()}getBoundaryIDs(){return this.m_currentEdgeIds.slice()}buildIdsFromBitset(t,e){if(!t)return;const s=this.m_topoGraph.getGeometriesFromBits(t);if(s.length>0){for(let t=0,i=s.length;t<i;t++)e.push(this.m_shape.getGeometryUserIndex(s[t],this.m_geometryIndex));x(e)}}makeGeometryFromChainSinglePart(t){this.m_index++;const e=new a;null!==this.m_curveStitcher&&e.setCurveStitcherPointer(this.m_curveStitcher);const s=this.m_topoGraph.extractPolygonFromChainAndIslands(e,p,t,p);return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(e,s,this.m_stitchMaxDeviation,!1),e.getGeometry(s)}makeGeometryFromChainMultiPart(t,e){this.m_index++;const s=new a;null!==this.m_curveStitcher&&s.setCurveStitcherPointer(this.m_curveStitcher);const i=this.m_bitsetToChains.has(e);h(i);const r=this.m_bitsetToChains.get(e);let o=p;for(let h=this.m_chainsLists.getFirst(r);h!==I.st_nullNode();h=this.m_chainsLists.getNext(h)){const t=this.m_chainsLists.getElement(h);o=this.m_topoGraph.extractPolygonFromChainAndIslands(s,o,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,o,this.m_stitchMaxDeviation,!1),s.getGeometry(o)}makeNextGeometry(){for(k(this.m_progressTracker);this.m_chainStack.length>0;){this.m_currentIds.length=0,this.m_currentEdgeIds.length=0;const t=this.m_chainStack.at(-1);this.m_chainStack.pop();const e=this.m_topoGraph.getChainArea(t);if(0!==e)if(e<0)for(let s=this.m_topoGraph.getChainFirstIsland(t);s!==p;s=this.m_topoGraph.getChainNextInParent(s))this.m_topoGraph.getChainArea(s)>0&&this.m_chainStack.push(s);else{for(let i=this.m_topoGraph.getChainFirstIsland(t);i!==p;i=this.m_topoGraph.getChainNextInParent(i))this.m_topoGraph.getChainArea(i)<0&&this.m_chainStack.push(i);if(-1!==this.m_visitedChainsIndex&&1===this.m_topoGraph.getChainUserIndex(t,this.m_visitedChainsIndex))continue;const e=t=>{const e=t.getUnorderedBitIterator();let s=0;for(;e.next()!==f.npos();)if(s++,s>1)return s;return s},s=e(this.m_topoGraph.getChainBitSet(t));if(s>0){if(1===s&&2&this.m_options||s>1&&1&this.m_options){const e=this.m_topoGraph.getChainBitSet(t);return this.buildIdsFromBitset(e,this.m_currentIds),16&this.m_options?this.makeGeometryFromChainMultiPart(t,e):this.makeGeometryFromChainSinglePart(t)}}else{if(!(12&~this.m_options)){if(32&this.m_options){const e=this.m_topoGraph.getChainBoundaryBitSet(t);this.buildIdsFromBitset(e,this.m_currentEdgeIds)}return this.makeGeometryFromChainSinglePart(t)}if(4&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(e(s)>1)return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}if(8&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(1===e(s))return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}}}}return null}}const F=new v;function P(t,s,i){const r=F.executeMany(new e(t),s,i,null);return Array.from(r)}function T(){return F.supportsCurves()}export{P as executeMany,T as supportsCurves};
5
+ import{O as t,S as e}from"../../../chunks/SimpleGeometryCursor.js";import{t as s,d as i,G as r,g as h}from"../../../chunks/Geometry.js";import{Envelope2D as o}from"../../../chunks/Envelope2D.js";import{c as n}from"../../../chunks/Envelope.js";import{E as a,o as m,n as p}from"../../../chunks/QuadraticBezier.js";import{C as _,k as c,s as u,ar as l,l as g,ap as d,aq as G,an as C,at as y,au as I,av as f}from"../../../chunks/ProjectionTransformation.js";import{v as x}from"../../../chunks/Point2D.js";function k(t){t&&t.checkProgress()}class v{getOperatorType(){return 10012}accelerateGeometry(t,e,s){return!1}canAccelerateGeometry(t){return!1}supportsCurves(){return!0}executeMany(t,e,s,i){return new S(t,e,s,i)}}class S extends t{constructor(t,e,i,r){super(),this.m_shape=null,this.m_topoGraph=null,this.m_curveStitcher=null,this.m_stitchMaxDeviation=0,this.m_chainStack=[],this.m_bitsetToChains=null,this.m_chainsLists=null,this.m_visitedChainsIndex=-1,this.m_index=-1,this.m_geometryIndex=-1,this.m_progressCounter=0,this.m_currentIds=[],this.m_currentEdgeIds=[],t||s(""),this.m_progressTracker=r,this.m_options=0!==i?i:3,(this.m_options<=0||this.m_options>63)&&s("options"),this.m_inputGeometryCursor=t,this.m_sr=e}tock(){return!0}getRank(){return 1}next(){if(-1===this.m_index){this.m_shape=new a;const t=new o;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let n=this.m_inputGeometryCursor.next();null!==n;n=this.m_inputGeometryCursor.next()){i(n);const e=this.m_shape.addGeometry(n);n.getGeometryType()!==r.enumPolygon&&s("Polygon Overlay only supports Polygons"),this.m_shape.setGeometryUserIndex(e,this.m_geometryIndex,this.m_inputGeometryCursor.getGeometryID());const h=this.m_inputGeometryCursor.getRank();h>m&&this.m_shape.assignRankToGeometryVertices(e,h);const a=new o;n.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const e=n(this.m_sr,t,!0),h=n(this.m_sr,t,!1);t.inflate(10*e.total()),this.m_shape.forceSetEnvelope2D(t),this.m_stitchMaxDeviation=0;let f=0;if(this.m_shape.hasCurves()){this.m_curveStitcher=new _;const s=c(e.total(),t);this.m_stitchMaxDeviation=u(e.total()),f=l(s,this.m_stitchMaxDeviation),g(this.m_shape,s,e.total(),12e3,this.m_curveStitcher,null,this.m_progressTracker)}if(d(this.m_shape,h,this.m_progressTracker)){G(this.m_shape,e.add(f),this.m_progressTracker,!0,!1);for(let t=this.m_shape.getFirstGeometry();t!==p;t=this.m_shape.getNextGeometry(t))this.m_shape.getGeometryType(t)===r.enumPolygon&&C(this.m_shape,t,-1,!1,p,this.m_progressTracker)}this.m_topoGraph=new y,this.m_topoGraph.buildGeometryParentageSets(),this.m_topoGraph.setEditShape(this.m_shape,this.m_progressTracker);const x=this.m_topoGraph.getFirstChain();for(let s=this.m_topoGraph.getChainFirstIsland(x);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let t=this.m_topoGraph.getChainFirstIsland(s);t!==p;t=this.m_topoGraph.getChainNextInParent(t))this.m_chainStack.push(t);if(16&this.m_options){this.m_visitedChainsIndex=this.m_topoGraph.createUserIndexForChains(),this.m_bitsetToChains=new Map,this.m_chainsLists=new I;const t=[],e=this.m_topoGraph.getFirstChain();for(t.push(e);t.length>0;){const e=t.at(-1);t.pop();for(let s=this.m_topoGraph.getChainFirstIsland(e);s!==p;s=this.m_topoGraph.getChainNextInParent(s))for(let e=this.m_topoGraph.getChainFirstIsland(s);e!==p;e=this.m_topoGraph.getChainNextInParent(e)){const s=this.m_topoGraph.getChainBitSet(e);if(null!==s&&!s.isZero()){let t;this.m_bitsetToChains.has(s)?t=this.m_bitsetToChains.get(s):(t=this.m_chainsLists.createList(),this.m_bitsetToChains.set(s,t)),this.m_chainsLists.addElement(t,e)}t.push(e)}}}}return this.makeNextGeometry()}getGeometryID(){return this.m_index}getGeometryIDs(){return this.m_currentIds.slice()}getBoundaryIDs(){return this.m_currentEdgeIds.slice()}buildIdsFromBitset(t,e){if(!t)return;const s=this.m_topoGraph.getGeometriesFromBits(t);if(s.length>0){for(let t=0,i=s.length;t<i;t++)e.push(this.m_shape.getGeometryUserIndex(s[t],this.m_geometryIndex));x(e)}}makeGeometryFromChainSinglePart(t){this.m_index++;const e=new a;null!==this.m_curveStitcher&&e.setCurveStitcherPointer(this.m_curveStitcher);const s=this.m_topoGraph.extractPolygonFromChainAndIslands(e,p,t,p);return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(e,s,this.m_stitchMaxDeviation,!1),e.getGeometry(s)}makeGeometryFromChainMultiPart(t,e){this.m_index++;const s=new a;null!==this.m_curveStitcher&&s.setCurveStitcherPointer(this.m_curveStitcher);const i=this.m_bitsetToChains.has(e);h(i);const r=this.m_bitsetToChains.get(e);let o=p;for(let h=this.m_chainsLists.getFirst(r);h!==I.st_nullNode();h=this.m_chainsLists.getNext(h)){const t=this.m_chainsLists.getElement(h);o=this.m_topoGraph.extractPolygonFromChainAndIslands(s,o,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,o,this.m_stitchMaxDeviation,!1),s.getGeometry(o)}makeNextGeometry(){for(k(this.m_progressTracker);this.m_chainStack.length>0;){this.m_currentIds.length=0,this.m_currentEdgeIds.length=0;const t=this.m_chainStack.at(-1);this.m_chainStack.pop();const e=this.m_topoGraph.getChainArea(t);if(0!==e)if(e<0)for(let s=this.m_topoGraph.getChainFirstIsland(t);s!==p;s=this.m_topoGraph.getChainNextInParent(s))this.m_topoGraph.getChainArea(s)>0&&this.m_chainStack.push(s);else{for(let i=this.m_topoGraph.getChainFirstIsland(t);i!==p;i=this.m_topoGraph.getChainNextInParent(i))this.m_topoGraph.getChainArea(i)<0&&this.m_chainStack.push(i);if(-1!==this.m_visitedChainsIndex&&1===this.m_topoGraph.getChainUserIndex(t,this.m_visitedChainsIndex))continue;const e=t=>{const e=t.getUnorderedBitIterator();let s=0;for(;e.next()!==f.npos();)if(s++,s>1)return s;return s},s=e(this.m_topoGraph.getChainBitSet(t));if(s>0){if(1===s&&2&this.m_options||s>1&&1&this.m_options){const e=this.m_topoGraph.getChainBitSet(t);return this.buildIdsFromBitset(e,this.m_currentIds),16&this.m_options?this.makeGeometryFromChainMultiPart(t,e):this.makeGeometryFromChainSinglePart(t)}}else{if(!(12&~this.m_options)){if(32&this.m_options){const e=this.m_topoGraph.getChainBoundaryBitSet(t);this.buildIdsFromBitset(e,this.m_currentEdgeIds)}return this.makeGeometryFromChainSinglePart(t)}if(4&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(e(s)>1)return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}if(8&this.m_options){const s=this.m_topoGraph.getChainBoundaryBitSet(t);if(1===e(s))return 32&this.m_options&&this.buildIdsFromBitset(s,this.m_currentEdgeIds),this.makeGeometryFromChainSinglePart(t);continue}}}}return null}}const F=new v;function P(t,s,i){const r=F.executeMany(new e(t),s,i,null);return Array.from(r)}function T(){return F.supportsCurves()}export{P as executeMany,T as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{S as r}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import"../../../chunks/QuadraticBezier.js";import{g as n}from"../../../chunks/ProjectionTransformation.js";import"../../../chunks/Envelope.js";const e=new n;function t(r,n,t){return e.execute(r,n,t,null)}function o(n,t,o){const u=e.executeMany(new r(n),t,o,null);return Array.from(u)}function u(r,n,t){return e.isSimpleAsFeature(r,n,t,null,null)}function s(){return e.supportsCurves()}export{t as execute,o as executeMany,u as isSimpleAsFeature,s as supportsCurves};
5
+ import{S as r}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import"../../../chunks/QuadraticBezier.js";import{h as n}from"../../../chunks/ProjectionTransformation.js";import"../../../chunks/Envelope.js";const e=new n;function t(r,n,t){return e.execute(r,n,t,null)}function o(n,t,o){const u=e.executeMany(new r(n),t,o,null);return Array.from(u)}function u(r,n,t){return e.isSimpleAsFeature(r,n,t,null,null)}function s(){return e.supportsCurves()}export{t as execute,o as executeMany,u as isSimpleAsFeature,s as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{c as n,d as r,G as s}from"../../../chunks/Geometry.js";import{P as o,j as i}from"../../../chunks/Point2D.js";import{M as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{a as c,d as a}from"../../../chunks/Envelope.js";import{ai as p}from"../../../chunks/ProjectionTransformation.js";class l{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new y(e,t,n,r)}execute(t,r,s,o){const i=new e([t]),u=new e([r]),m=this.executeMany(i,u,s,o).next();return m||n("null output"),m}}function h(e,t,n,r){const o=e.getDimension(),i=t.getDimension();if(o!==i)return o>i?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;const u=new m,a=new m,l=new m;e.queryEnvelope(u),t.queryEnvelope(a),l.setCoords({env2D:u}),l.mergeEnvelope2D(a);const h=c(n,l,!0),y=e.getGeometryType(),g=t.getGeometryType();return y===s.enumPoint&&g===s.enumPoint?f(e,t,h):y===s.enumPoint&&g===s.enumMultiPoint?d(t,e,h):y===s.enumMultiPoint&&g===s.enumPoint?d(e,t,h):p(e,t,n,r)}function f(e,t,n,r){const s=a(n),i=s*s,m=e.getXY(),c=t.getXY(),p=new u({vd:e.getDescription()});return o.sqrDistance(m,c)>i&&(p.add(e),p.add(t)),p}function d(e,t,n,r){const s=e.getImpl().getAttributeStreamRef(0),o=e.getPointCount(),u=t.getXY(),c=e.createInstance(),p=a(n),l=new m;if(e.queryEnvelope(l),l.inflateCoords(p,p),l.contains(u)){const n=p*p;let r=!1;const m=i(o,!1);for(let e=0;e<o;e++){const t=s.read(2*e),o=s.read(2*e+1),i=t-u.x,c=o-u.y;i*i+c*c<=n&&(r=!0,m[e]=!0)}if(r)for(let t=0;t<o;t++)m[t]||c.addPoints(e,t,t+1);else c.addPoints(e,0,o),c.add(t)}else c.addPoints(e,0,o),c.add(t);return c}class y extends t{constructor(e,t,n,s){super(),this.m_progressTracker=s,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=n,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,r(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;const e=this.m_inputGeoms.next();return e?(r(e),this.m_index=this.m_inputGeoms.getGeometryID(),h(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const g=new l;function G(e,t,n){return g.execute(e,t,n,null)}function _(t,n,r){const s=g.executeMany(new e(t),new e([n]),r,null);return Array.from(s)}function x(){return g.supportsCurves()}export{G as execute,_ as executeMany,x as supportsCurves};
5
+ import{S as e,G as t}from"../../../chunks/SimpleGeometryCursor.js";import{c as n,d as r,G as s}from"../../../chunks/Geometry.js";import{P as o,j as i}from"../../../chunks/Point2D.js";import{M as u}from"../../../chunks/QuadraticBezier.js";import{Envelope2D as m}from"../../../chunks/Envelope2D.js";import{c,d as a}from"../../../chunks/Envelope.js";import{ai as p}from"../../../chunks/ProjectionTransformation.js";class l{getOperatorType(){return 10003}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n,r){return new y(e,t,n,r)}execute(t,r,s,o){const i=new e([t]),u=new e([r]),m=this.executeMany(i,u,s,o).next();return m||n("null output"),m}}function h(e,t,n,r){const o=e.getDimension(),i=t.getDimension();if(o!==i)return o>i?e:t;if(e.isEmpty())return t;if(t.isEmpty())return e;const u=new m,a=new m,l=new m;e.queryEnvelope(u),t.queryEnvelope(a),l.setCoords({env2D:u}),l.mergeEnvelope2D(a);const h=c(n,l,!0),y=e.getGeometryType(),g=t.getGeometryType();return y===s.enumPoint&&g===s.enumPoint?f(e,t,h):y===s.enumPoint&&g===s.enumMultiPoint?d(t,e,h):y===s.enumMultiPoint&&g===s.enumPoint?d(e,t,h):p(e,t,n,r)}function f(e,t,n,r){const s=a(n),i=s*s,m=e.getXY(),c=t.getXY(),p=new u({vd:e.getDescription()});return o.sqrDistance(m,c)>i&&(p.add(e),p.add(t)),p}function d(e,t,n,r){const s=e.getImpl().getAttributeStreamRef(0),o=e.getPointCount(),u=t.getXY(),c=e.createInstance(),p=a(n),l=new m;if(e.queryEnvelope(l),l.inflateCoords(p,p),l.contains(u)){const n=p*p;let r=!1;const m=i(o,!1);for(let e=0;e<o;e++){const t=s.read(2*e),o=s.read(2*e+1),i=t-u.x,c=o-u.y;i*i+c*c<=n&&(r=!0,m[e]=!0)}if(r)for(let t=0;t<o;t++)m[t]||c.addPoints(e,t,t+1);else c.addPoints(e,0,o),c.add(t)}else c.addPoints(e,0,o),c.add(t);return c}class y extends t{constructor(e,t,n,s){super(),this.m_progressTracker=s,this.m_index=-1,this.m_inputGeoms=e,this.m_spatialReference=n,this.m_rightGeom=t.next(),this.m_bEmpty=!this.m_rightGeom,r(this.m_rightGeom)}tock(){return!0}getRank(){return 1}next(){if(this.m_bEmpty)return null;const e=this.m_inputGeoms.next();return e?(r(e),this.m_index=this.m_inputGeoms.getGeometryID(),h(e,this.m_rightGeom,this.m_spatialReference,this.m_progressTracker)):null}getGeometryID(){return this.m_index}}const g=new l;function G(e,t,n){return g.execute(e,t,n,null)}function _(t,n,r){const s=g.executeMany(new e(t),new e([n]),r,null);return Array.from(s)}function x(){return g.supportsCurves()}export{G as execute,_ as executeMany,x as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import"../../../chunks/Point2D.js";import"../../../chunks/QuadraticBezier.js";import"../../../chunks/Envelope2D.js";import{h as r}from"../../../chunks/ProjectionTransformation.js";import"../../../chunks/Envelope.js";const e=new r;function o(n,r,o){return e.execute(n,r,o,null)}function t(r,o){return e.executeMany(new n(r),o,null).next()}function s(){return e.supportsCurves()}export{o as execute,t as executeMany,s as supportsCurves};
5
+ import{S as n}from"../../../chunks/SimpleGeometryCursor.js";import"../../../chunks/Geometry.js";import"../../../chunks/Point2D.js";import"../../../chunks/QuadraticBezier.js";import"../../../chunks/Envelope2D.js";import{j as r}from"../../../chunks/ProjectionTransformation.js";import"../../../chunks/Envelope.js";const e=new r;function o(n,r,o){return e.execute(n,r,o,null)}function t(r,o){return e.executeMany(new n(r),o,null).next()}function s(){return e.supportsCurves()}export{o as execute,t as executeMany,s as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{a as e}from"../../../chunks/ProjectionTransformation.js";import{fromGeometry as o,fromGeometryToGXGeometry as t}from"../support/jsonConverter.js";const r=new e;function n(e,n){const s=o(e);return r.execute(s.getGeometry(),t(n),s.getSpatialReference())}export{n as execute};
5
+ import{b as e}from"../../../chunks/ProjectionTransformation.js";import{fromGeometry as o,fromGeometryToGXGeometry as t}from"../support/jsonConverter.js";const r=new e;function n(e,n){const s=o(e);return r.execute(s.getGeometry(),t(n),s.getSpatialReference())}export{n as execute};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{b as e,l as t,G as r,c as s}from"../../chunks/Geometry.js";import{P as a,S as n,a as m}from"../../chunks/QuadraticBezier.js";import{Envelope2D as i}from"../../chunks/Envelope2D.js";import{a as o,P as h}from"../../chunks/Envelope.js";import{g as l}from"../../chunks/ProjectionTransformation.js";import{getSpatialReference as c,fromGeometry as u,fromPolyline as g,fromSpatialReference as _,toGeometry as d}from"./support/apiConverter.js";function x(s,n,m,h){if(n.getPathCount()>1&&e(""),s.isEmpty()||n.isEmpty())return null;t(s),t(n);let l=null;const c=new i;s.queryEnvelope(c);const u=new i;n.queryEnvelope(u);const g=new i;g.setCoords({env2D:c}),g.mergeEnvelope2D(u);const _=o(m,g,!1).total(),d=new A(h);let x=d.setIndicesAndScalars(s,n,_);if(x){const e=d.getTrimmedPolyline(s,n);if(e.isEmpty())return null;l=d.getReshapedMultiPath(s,e,m)}else{if(Number.isNaN(d.m_scalarB0)||s.getGeometryType()===r.enumPolyline)return null;const e=new a;if(e.add(n,!0),d.clearIndicesAndScalars(),x=d.setIndicesAndScalars(s,e,_),!x)return null;const t=d.getTrimmedPolyline(s,e);if(t.isEmpty())return null;l=d.getReshapedMultiPath(s,t,m)}return l}class A{constructor(e){this.m_progressTracker=e,this.clearIndicesAndScalars()}setIndicesAndScalars(e,t,s){const a=new i,n=new i;e.queryEnvelope(a),e.queryEnvelope(n),a.inflateCoords(s,s);if(!a.intersect(n))return!1;const m=e.getImpl().querySegmentIterator(),o=t.getImpl().querySegmentIterator(),h=[0,0],l=[0,0];let c=-1,u=-1,g=-1,_=-1,d=-1,x=-1,A=Number.NaN,p=Number.NaN,S=Number.NaN,v=Number.NaN;for(o.nextPath();o.hasNextSegment();){const e=o.nextSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){if(0!==e.intersect(r,null,l,h,s)&&(Number.isNaN(S)||l[0]<S)&&(c=m.getPathIndex(),g=m.getStartPointIndex(),d=o.getStartPointIndex(),A=h[0],S=l[0],0===S))break}}if(0===S)break}if(!Number.isNaN(S)&&1!==S)break}if(Number.isNaN(S))return!1;this.m_pathA0=c,this.m_vertexA0=g,this.m_vertexB0=d,this.m_scalarA0=A,this.m_scalarB0=S;const y=e.getGeometryType();for(o.resetToLastSegment();o.hasPreviousSegment();){const e=o.previousSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),y===r.enumPolygon?m.resetToPath(c):m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){const t=e.intersect(r,null,l,h,s);if(0!==t&&(Number.isNaN(v)||l[t-1]>v)&&(o.getStartPointIndex()!==this.m_vertexB0||l[t-1]!==this.m_scalarB0)&&(u=m.getPathIndex(),_=m.getStartPointIndex(),x=o.getStartPointIndex(),p=h[t-1],v=l[t-1],1===v))break}}if(1===v)break;if(y===r.enumPolygon)break}if(!Number.isNaN(v))break}return!Number.isNaN(v)&&(this.m_pathA1=u,this.m_vertexA1=_,this.m_vertexB1=x,this.m_scalarA1=p,this.m_scalarB1=v,!0)}getTrimmedPolyline(e,t){const r=new n,s=t.createInstance();let a=!0;const m=t.getImpl().querySegmentIterator();if(m.resetToVertex(this.m_vertexB0,0),this.m_vertexB0>this.m_vertexB1)return s;if(this.m_vertexB0===this.m_vertexB1){m.nextSegment().queryCut(this.m_scalarB0,this.m_scalarB1,r,!1),s.addSegment(r.get(),!0)}else for(;;){const e=m.nextSegment(),t=m.getStartPointIndex();if(t===this.m_vertexB0)1!==this.m_scalarB0&&(e.queryCut(this.m_scalarB0,1,r,!1),s.addSegment(r.get(),a),a=!1);else{if(t===this.m_vertexB1){0!==this.m_scalarB1&&(e.queryCut(0,this.m_scalarB1,r),s.addSegment(r.get(),a),a=!1);break}s.addSegment(e,a)}}if(s.isEmpty())return s;if(e.getDescription().getAttributeCount()>1){const t=e.getImpl().querySegmentIterator(),r=new h,a=s.getPointCount();t.resetToVertex(this.m_vertexA0,this.m_pathA0);t.nextSegment().queryCoord(this.m_scalarA0,r),s.setPointByVal(0,r),t.resetToVertex(this.m_vertexA1,this.m_pathA1);t.nextSegment().queryCoord(this.m_scalarA1,r),s.setPointByVal(a-1,r),s.interpolateAttributesRange(0,0,0,a-1)}return s}getReshapedMultiPath(e,t,s){let a;return a=e.getGeometryType()===r.enumPolygon?this.getReshapedPolygon(e,t,s):this.getReshapedPolyline(e,t),a}getReshapedPolygon(e,t,r){const s=e.getImpl().querySegmentIterator();s.setCirculator(!0);const a=new n;new h;const i=new m({vd:e.getDescription()});if(i.addSegmentsFromPath(t,0,0,t.getSegmentCountPath(0),!0),s.resetToVertex(this.m_vertexA1,this.m_pathA0),this.m_vertexA1===this.m_vertexA0&&this.m_scalarA1<=this.m_scalarA0){s.nextSegment().queryCut(this.m_scalarA1,this.m_scalarA0,a),i.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA1&&(e.queryCut(this.m_scalarA1,1,a),i.addSegment(a.get(),!1))}for(;;){const e=s.nextSegment();if(s.getStartPointIndex()===this.m_vertexA0){0!==this.m_scalarA0&&(e.queryCut(0,this.m_scalarA0,a),i.addSegment(a.get(),!1));break}i.addSegment(e,!1)}}const o=new m({vd:e.getDescription()}),c=t.clone();if(c.reversePath(0),o.addSegmentsFromPath(c,0,0,c.getSegmentCountPath(0),!0),s.resetToVertex(this.m_vertexA0,this.m_pathA0),this.m_vertexA0===this.m_vertexA1&&this.m_scalarA0<this.m_scalarA1){s.nextSegment().queryCut(this.m_scalarA0,this.m_scalarA1,a),o.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA0&&(e.queryCut(this.m_scalarA0,1,a),o.addSegment(a.get(),!1))}for(;;){const e=s.nextSegment();if(s.getStartPointIndex()===this.m_vertexA1){0!==this.m_scalarA1&&(e.queryCut(0,this.m_scalarA1,a),o.addSegment(a.get(),!1));break}o.addSegment(e,!1)}}const u=Math.abs(i.calculateArea2D()),g=Math.abs(o.calculateArea2D());let _=e.createInstance();for(let n=0;n<e.getPathCount();n++)n===this.m_pathA0?u>=g?_.add(i,!1):_.add(o,!1):_.addPath(e,n,!0);return _=(new l).execute(_,r,!1,this.m_progressTracker),_}getReshapedPolyline(e,t){const r=e.getImpl().querySegmentIterator(),m=new a,i=new n;let o=!1,h=-1,l=Number.NaN;o=this.m_pathA0>this.m_pathA1||this.m_pathA0===this.m_pathA1&&(this.m_vertexA0>this.m_vertexA1||this.m_vertexA0===this.m_vertexA1&&this.m_scalarA0>this.m_scalarA1),o?(h=this.m_vertexA1,l=this.m_scalarA1,r.resetToPath(this.m_pathA1)):(h=this.m_vertexA0,l=this.m_scalarA0,r.resetToPath(this.m_pathA0));let c=!0;for(r.nextPath()||s("reshaper");;){const e=r.nextSegment();if(r.getStartPointIndex()===h){0!==l&&(e.queryCut(0,l,i),m.addSegment(i.get(),c),c=!1);break}m.addSegment(e,c),c=!1}if(o){const e=t.clone();e.reversePath(0),m.addSegmentsFromPath(e,0,0,e.getSegmentCount(),c)}else m.addSegmentsFromPath(t,0,0,t.getSegmentCount(),c);o?(l=this.m_scalarA0,r.resetToVertex(this.m_vertexA0,this.m_pathA0)):(l=this.m_scalarA1,r.resetToVertex(this.m_vertexA1,this.m_pathA1));{const e=r.nextSegment();1!==l&&(e.queryCut(l,1,i),m.addSegment(i.get(),!1))}for(;r.hasNextSegment();){const e=r.nextSegment();m.addSegment(e,!1)}const u=e.createInstance();let g=!1;for(let s=0;s<e.getPathCount();s++)s===this.m_pathA0||s===this.m_pathA1?g||(u.add(m,!1),g=!0):u.addPath(e,s,!0);return u}clearIndicesAndScalars(){this.m_pathA0=-1,this.m_pathA1=-1,this.m_vertexA0=-1,this.m_vertexA1=-1,this.m_vertexB0=-1,this.m_vertexB1=-1,this.m_scalarA0=Number.NaN,this.m_scalarA1=Number.NaN,this.m_scalarB0=Number.NaN,this.m_scalarB1=Number.NaN}}class p{getOperatorType(){return 10006}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!1}execute(e,t,r,s){return x(e,t,r,s)}}const S=new p;function v(e,t){const r=c(e),s=S.execute(u(e),g(t),_(r),null);return d(s,r)}const y=S.supportsCurves();export{v as execute,y as supportsCurves};
5
+ import{b as e,l as t,G as r,c as s}from"../../chunks/Geometry.js";import{P as a,S as n,a as m}from"../../chunks/QuadraticBezier.js";import{Envelope2D as i}from"../../chunks/Envelope2D.js";import{c as o,P as h}from"../../chunks/Envelope.js";import{h as l}from"../../chunks/ProjectionTransformation.js";import{getSpatialReference as c,fromGeometry as u,fromPolyline as g,fromSpatialReference as _,toGeometry as d}from"./support/apiConverter.js";function x(s,n,m,h){if(n.getPathCount()>1&&e(""),s.isEmpty()||n.isEmpty())return null;t(s),t(n);let l=null;const c=new i;s.queryEnvelope(c);const u=new i;n.queryEnvelope(u);const g=new i;g.setCoords({env2D:c}),g.mergeEnvelope2D(u);const _=o(m,g,!1).total(),d=new A(h);let x=d.setIndicesAndScalars(s,n,_);if(x){const e=d.getTrimmedPolyline(s,n);if(e.isEmpty())return null;l=d.getReshapedMultiPath(s,e,m)}else{if(Number.isNaN(d.m_scalarB0)||s.getGeometryType()===r.enumPolyline)return null;const e=new a;if(e.add(n,!0),d.clearIndicesAndScalars(),x=d.setIndicesAndScalars(s,e,_),!x)return null;const t=d.getTrimmedPolyline(s,e);if(t.isEmpty())return null;l=d.getReshapedMultiPath(s,t,m)}return l}class A{constructor(e){this.m_progressTracker=e,this.clearIndicesAndScalars()}setIndicesAndScalars(e,t,s){const a=new i,n=new i;e.queryEnvelope(a),e.queryEnvelope(n),a.inflateCoords(s,s);if(!a.intersect(n))return!1;const m=e.getImpl().querySegmentIterator(),o=t.getImpl().querySegmentIterator(),h=[0,0],l=[0,0];let c=-1,u=-1,g=-1,_=-1,d=-1,x=-1,A=Number.NaN,p=Number.NaN,S=Number.NaN,v=Number.NaN;for(o.nextPath();o.hasNextSegment();){const e=o.nextSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){if(0!==e.intersect(r,null,l,h,s)&&(Number.isNaN(S)||l[0]<S)&&(c=m.getPathIndex(),g=m.getStartPointIndex(),d=o.getStartPointIndex(),A=h[0],S=l[0],0===S))break}}if(0===S)break}if(!Number.isNaN(S)&&1!==S)break}if(Number.isNaN(S))return!1;this.m_pathA0=c,this.m_vertexA0=g,this.m_vertexB0=d,this.m_scalarA0=A,this.m_scalarB0=S;const y=e.getGeometryType();for(o.resetToLastSegment();o.hasPreviousSegment();){const e=o.previousSegment(),t=new i;for(e.queryEnvelope(t),t.inflateCoords(s,s),y===r.enumPolygon?m.resetToPath(c):m.resetToFirstPath();m.nextPath();){for(;m.hasNextSegment();){const r=m.nextSegment(),a=new i;if(r.queryEnvelope(a),t.isIntersecting(a)){const t=e.intersect(r,null,l,h,s);if(0!==t&&(Number.isNaN(v)||l[t-1]>v)&&(o.getStartPointIndex()!==this.m_vertexB0||l[t-1]!==this.m_scalarB0)&&(u=m.getPathIndex(),_=m.getStartPointIndex(),x=o.getStartPointIndex(),p=h[t-1],v=l[t-1],1===v))break}}if(1===v)break;if(y===r.enumPolygon)break}if(!Number.isNaN(v))break}return!Number.isNaN(v)&&(this.m_pathA1=u,this.m_vertexA1=_,this.m_vertexB1=x,this.m_scalarA1=p,this.m_scalarB1=v,!0)}getTrimmedPolyline(e,t){const r=new n,s=t.createInstance();let a=!0;const m=t.getImpl().querySegmentIterator();if(m.resetToVertex(this.m_vertexB0,0),this.m_vertexB0>this.m_vertexB1)return s;if(this.m_vertexB0===this.m_vertexB1){m.nextSegment().queryCut(this.m_scalarB0,this.m_scalarB1,r,!1),s.addSegment(r.get(),!0)}else for(;;){const e=m.nextSegment(),t=m.getStartPointIndex();if(t===this.m_vertexB0)1!==this.m_scalarB0&&(e.queryCut(this.m_scalarB0,1,r,!1),s.addSegment(r.get(),a),a=!1);else{if(t===this.m_vertexB1){0!==this.m_scalarB1&&(e.queryCut(0,this.m_scalarB1,r),s.addSegment(r.get(),a),a=!1);break}s.addSegment(e,a)}}if(s.isEmpty())return s;if(e.getDescription().getAttributeCount()>1){const t=e.getImpl().querySegmentIterator(),r=new h,a=s.getPointCount();t.resetToVertex(this.m_vertexA0,this.m_pathA0);t.nextSegment().queryCoord(this.m_scalarA0,r),s.setPointByVal(0,r),t.resetToVertex(this.m_vertexA1,this.m_pathA1);t.nextSegment().queryCoord(this.m_scalarA1,r),s.setPointByVal(a-1,r),s.interpolateAttributesRange(0,0,0,a-1)}return s}getReshapedMultiPath(e,t,s){let a;return a=e.getGeometryType()===r.enumPolygon?this.getReshapedPolygon(e,t,s):this.getReshapedPolyline(e,t),a}getReshapedPolygon(e,t,r){const s=e.getImpl().querySegmentIterator();s.setCirculator(!0);const a=new n;new h;const i=new m({vd:e.getDescription()});if(i.addSegmentsFromPath(t,0,0,t.getSegmentCountPath(0),!0),s.resetToVertex(this.m_vertexA1,this.m_pathA0),this.m_vertexA1===this.m_vertexA0&&this.m_scalarA1<=this.m_scalarA0){s.nextSegment().queryCut(this.m_scalarA1,this.m_scalarA0,a),i.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA1&&(e.queryCut(this.m_scalarA1,1,a),i.addSegment(a.get(),!1))}for(;;){const e=s.nextSegment();if(s.getStartPointIndex()===this.m_vertexA0){0!==this.m_scalarA0&&(e.queryCut(0,this.m_scalarA0,a),i.addSegment(a.get(),!1));break}i.addSegment(e,!1)}}const o=new m({vd:e.getDescription()}),c=t.clone();if(c.reversePath(0),o.addSegmentsFromPath(c,0,0,c.getSegmentCountPath(0),!0),s.resetToVertex(this.m_vertexA0,this.m_pathA0),this.m_vertexA0===this.m_vertexA1&&this.m_scalarA0<this.m_scalarA1){s.nextSegment().queryCut(this.m_scalarA0,this.m_scalarA1,a),o.addSegment(a.get(),!1)}else{{const e=s.nextSegment();1!==this.m_scalarA0&&(e.queryCut(this.m_scalarA0,1,a),o.addSegment(a.get(),!1))}for(;;){const e=s.nextSegment();if(s.getStartPointIndex()===this.m_vertexA1){0!==this.m_scalarA1&&(e.queryCut(0,this.m_scalarA1,a),o.addSegment(a.get(),!1));break}o.addSegment(e,!1)}}const u=Math.abs(i.calculateArea2D()),g=Math.abs(o.calculateArea2D());let _=e.createInstance();for(let n=0;n<e.getPathCount();n++)n===this.m_pathA0?u>=g?_.add(i,!1):_.add(o,!1):_.addPath(e,n,!0);return _=(new l).execute(_,r,!1,this.m_progressTracker),_}getReshapedPolyline(e,t){const r=e.getImpl().querySegmentIterator(),m=new a,i=new n;let o=!1,h=-1,l=Number.NaN;o=this.m_pathA0>this.m_pathA1||this.m_pathA0===this.m_pathA1&&(this.m_vertexA0>this.m_vertexA1||this.m_vertexA0===this.m_vertexA1&&this.m_scalarA0>this.m_scalarA1),o?(h=this.m_vertexA1,l=this.m_scalarA1,r.resetToPath(this.m_pathA1)):(h=this.m_vertexA0,l=this.m_scalarA0,r.resetToPath(this.m_pathA0));let c=!0;for(r.nextPath()||s("reshaper");;){const e=r.nextSegment();if(r.getStartPointIndex()===h){0!==l&&(e.queryCut(0,l,i),m.addSegment(i.get(),c),c=!1);break}m.addSegment(e,c),c=!1}if(o){const e=t.clone();e.reversePath(0),m.addSegmentsFromPath(e,0,0,e.getSegmentCount(),c)}else m.addSegmentsFromPath(t,0,0,t.getSegmentCount(),c);o?(l=this.m_scalarA0,r.resetToVertex(this.m_vertexA0,this.m_pathA0)):(l=this.m_scalarA1,r.resetToVertex(this.m_vertexA1,this.m_pathA1));{const e=r.nextSegment();1!==l&&(e.queryCut(l,1,i),m.addSegment(i.get(),!1))}for(;r.hasNextSegment();){const e=r.nextSegment();m.addSegment(e,!1)}const u=e.createInstance();let g=!1;for(let s=0;s<e.getPathCount();s++)s===this.m_pathA0||s===this.m_pathA1?g||(u.add(m,!1),g=!0):u.addPath(e,s,!0);return u}clearIndicesAndScalars(){this.m_pathA0=-1,this.m_pathA1=-1,this.m_vertexA0=-1,this.m_vertexA1=-1,this.m_vertexB0=-1,this.m_vertexB1=-1,this.m_scalarA0=Number.NaN,this.m_scalarA1=Number.NaN,this.m_scalarB0=Number.NaN,this.m_scalarB1=Number.NaN}}class p{getOperatorType(){return 10006}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}supportsCurves(){return!1}execute(e,t,r,s){return x(e,t,r,s)}}const S=new p;function v(e,t){const r=c(e),s=S.execute(u(e),g(t),_(r),null);return d(s,r)}const y=S.supportsCurves();export{v as execute,y as supportsCurves};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import{P as e}from"../../../chunks/Point2D.js";import"../../../chunks/Envelope2D.js";import{G as t}from"../../../chunks/Geometry.js";import{E as n,P as r}from"../../../chunks/Envelope.js";import{M as s}from"../../../chunks/QuadraticBezier.js";import{c as a,b as o}from"../../../chunks/ProjectionTransformation.js";import i from"../../Extent.js";import u from"../../Multipoint.js";import c from"../../Point.js";import l from"../../Polygon.js";import m from"../../Polyline.js";import"./initNoPeFactory.js";import{fromGeometryToGXGeometry as h,toGeometry as f}from"./jsonConverter.js";const p="_gxVersion",g=2,y=1;function C(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return w(e);case"multipoint":return V(e);case"polyline":return P(e);case"polygon":return v(e);case"extent":return M(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function M(e){if(!e.getCacheValue(p)){const t=new n;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s,n=new r,a=e.points,o=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,r=a.length;e<r;e++){const r=a[e];n.setXYCoords(r[0],r[1]),i&&n.setZ(r[2]??0),o&&n.setM(r[u]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const t=new r;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,a=h({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function P(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,a=h({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function j(e){if(e.wkid)return a(e.wkid);const t=e.wkt2||e.wkt;return t?o(t):null}function Z(e,n){if(e)switch(e.getGeometryType()){case t.enumPoint:return k(e,n);case t.enumEnvelope:return E(e,n);case t.enumMultiPoint:return d(e,n);case t.enumPolyline:return z(e,n);case t.enumPolygon:return R(e,n)}return null}function E(e,t){if(e.isEmpty())return null;const n=new i({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function d(e,t){if(e.isEmpty())return null;const n=e.getDescription(),s=n.hasM(),a=n.hasZ(),o=[],i=new r;for(let r=0,u=e.getPointCount();r<u;r++){e.getPointByVal(r,i);const t=[i.getX(),i.getY()];a&&t.push(i.getZ()),s&&t.push(i.getM()),o.push(t)}const c=new u({hasM:s,hasZ:a,points:o,spatialReference:t});return c.setCacheValue(p,e),c}function k(t,n){if(t instanceof e)return new c({x:t.x,y:t.y,spatialReference:n});if(t.isEmpty())return null;const r=new c({x:t.getX(),y:t.getY(),spatialReference:n}),s=t.getDescription();return s.hasM()&&(r.m=t.getM()),s.hasZ()&&(r.z=t.getZ()),r.setCacheValue(p,t),r}function R(e,t){if(e.isEmpty())return null;const n=l.fromJSON({spatialReference:t,...f(e,null)});return n.setCacheValue(p,e),n}function z(e,t){if(e.isEmpty())return null;const n=m.fromJSON({spatialReference:t,...f(e,null)});return n.setCacheValue(p,e),n}export{M as fromExtent,x as fromGeometry,V as fromMultipoint,w as fromPoint,v as fromPolygon,P as fromPolyline,j as fromSpatialReference,C as getSpatialReference,E as toExtent,Z as toGeometry,d as toMultipoint,k as toPoint,R as toPolygon,z as toPolyline};
5
+ import{P as e}from"../../../chunks/Point2D.js";import"../../../chunks/Envelope2D.js";import{G as t}from"../../../chunks/Geometry.js";import{E as n,P as r}from"../../../chunks/Envelope.js";import{M as s}from"../../../chunks/QuadraticBezier.js";import{c as a,a as o}from"../../../chunks/ProjectionTransformation.js";import i from"../../Extent.js";import u from"../../Multipoint.js";import c from"../../Point.js";import l from"../../Polygon.js";import m from"../../Polyline.js";import"./initNoPeFactory.js";import{fromGeometryToGXGeometry as h,toGeometry as f}from"./jsonConverter.js";const p="_gxVersion",g=2,y=1;function C(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function x(e){switch(e.type){case"point":return w(e);case"multipoint":return V(e);case"polyline":return P(e);case"polygon":return v(e);case"extent":return M(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function M(e){if(!e.getCacheValue(p)){const t=new n;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(g,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(y,0,e.zmin,e.zmax),e.setCacheValue(p,t)}return e.getCacheValue(p)}function V(e){if(!e.getCacheValue(p)){const t=new s,n=new r,a=e.points,o=e.hasM,i=e.hasZ,u=i?3:2;for(let e=0,r=a.length;e<r;e++){const r=a[e];n.setXYCoords(r[0],r[1]),i&&n.setZ(r[2]??0),o&&n.setM(r[u]??NaN),t.add(n)}e.setCacheValue(p,t)}return e.getCacheValue(p)}function w(e){if(!e.getCacheValue(p)){const t=new r;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(p,t)}return e.getCacheValue(p)}function v(e){if(!e.getCacheValue(p)){const{curveRings:t,hasM:n,hasZ:r,rings:s}=e,a=h({curveRings:t,hasM:n,hasZ:r,rings:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function P(e){if(!e.getCacheValue(p)){const{curvePaths:t,hasM:n,hasZ:r,paths:s}=e,a=h({curvePaths:t,hasM:n,hasZ:r,paths:s});e.setCacheValue(p,a)}return e.getCacheValue(p)}function j(e){if(e.wkid)return a(e.wkid);const t=e.wkt2||e.wkt;return t?o(t):null}function Z(e,n){if(e)switch(e.getGeometryType()){case t.enumPoint:return k(e,n);case t.enumEnvelope:return E(e,n);case t.enumMultiPoint:return d(e,n);case t.enumPolyline:return z(e,n);case t.enumPolygon:return R(e,n)}return null}function E(e,t){if(e.isEmpty())return null;const n=new i({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(g,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(y,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(p,e),n}function d(e,t){if(e.isEmpty())return null;const n=e.getDescription(),s=n.hasM(),a=n.hasZ(),o=[],i=new r;for(let r=0,u=e.getPointCount();r<u;r++){e.getPointByVal(r,i);const t=[i.getX(),i.getY()];a&&t.push(i.getZ()),s&&t.push(i.getM()),o.push(t)}const c=new u({hasM:s,hasZ:a,points:o,spatialReference:t});return c.setCacheValue(p,e),c}function k(t,n){if(t instanceof e)return new c({x:t.x,y:t.y,spatialReference:n});if(t.isEmpty())return null;const r=new c({x:t.getX(),y:t.getY(),spatialReference:n}),s=t.getDescription();return s.hasM()&&(r.m=t.getM()),s.hasZ()&&(r.z=t.getZ()),r.setCacheValue(p,t),r}function R(e,t){if(e.isEmpty())return null;const n=l.fromJSON({spatialReference:t,...f(e,null)});return n.setCacheValue(p,e),n}function z(e,t){if(e.isEmpty())return null;const n=m.fromJSON({spatialReference:t,...f(e,null)});return n.setCacheValue(p,e),n}export{M as fromExtent,x as fromGeometry,V as fromMultipoint,w as fromPoint,v as fromPolygon,P as fromPolyline,j as fromSpatialReference,C as getSpatialReference,E as toExtent,Z as toGeometry,d as toMultipoint,k as toPoint,R as toPolygon,z as toPolyline};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.32/esri/copyright.txt for details.
4
4
  */
5
- import"../../../chunks/Envelope2D.js";import"../../../chunks/Geometry.js";import"../../../chunks/QuadraticBezier.js";import"../../../chunks/Envelope.js";import"../../../chunks/Point2D.js";import{j as r}from"../../../chunks/ProjectionTransformation.js";import{gradGcsIds as t,getMetersPerUnit as s,isProjectedWKT as e}from"../../../core/unitUtils.js";import{isGeographic as o}from"../../support/spatialReferenceUtils.js";r((r=>{let i,n;"number"==typeof r?i=r:n=r;const p={wkid:i,wkt:n};let m,a;if(n){m=e(n);const r=o(p);if(!m&&!r)throw new Error(`Unsupported WKT type: ${n}`)}else m=!o(p);return a=i&&t.has(i)?Math.PI/200:m?s(p):Math.PI/180,{isPCS:m,metersOrRadiansPerUnit:a,semiMajor:0,wkidOrWkt:r}}));
5
+ import"../../../chunks/Envelope2D.js";import"../../../chunks/Geometry.js";import"../../../chunks/QuadraticBezier.js";import"../../../chunks/Envelope.js";import"../../../chunks/Point2D.js";import{i as r}from"../../../chunks/ProjectionTransformation.js";import{gradGcsIds as t,getMetersPerUnit as s,isProjectedWKT as e}from"../../../core/unitUtils.js";import{isGeographic as o}from"../../support/spatialReferenceUtils.js";r((r=>{let i,n;"number"==typeof r?i=r:n=r;const p={wkid:i,wkt:n};let m,a;if(n){m=e(n);const r=o(p);if(!m&&!r)throw new Error(`Unsupported WKT type: ${n}`)}else m=!o(p);return a=i&&t.has(i)?Math.PI/200:m?s(p):Math.PI/180,{isPCS:m,metersOrRadiansPerUnit:a,semiMajor:0,wkidOrWkt:r}}));