@arcgis/core 4.33.0-next.20250302 → 4.33.0-next.20250304
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/04341d50082f864025aa.js +1 -0
- package/assets/esri/core/workers/chunks/{b49af2e3a1a38a063ab9.js → 1bd4fe77ba6fb25322e7.js} +1 -1
- package/assets/esri/core/workers/chunks/{3ebdd0701e77bb28c75d.js → 2079f9d28e4199714f22.js} +1 -1
- package/assets/esri/core/workers/chunks/{0fd6a78b38b0e2dae8a5.js → 237a965bd41ba8903e03.js} +1 -1
- package/assets/esri/core/workers/chunks/{4dbd4523281691401272.js → 4539a802cba77a7a7cc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{99f90d085aa9eb13e4fb.js → 46fb6ba8900286d18b6f.js} +1 -1
- package/assets/esri/core/workers/chunks/{2a44a6e75b2799246257.js → 4fb4884d2de42792abe3.js} +1 -1
- package/assets/esri/core/workers/chunks/5295e685ae839087c568.js +1 -0
- package/assets/esri/core/workers/chunks/{d60da671aba70485050e.js → 6e6422eda398774acbc7.js} +1 -1
- package/assets/esri/core/workers/chunks/{c9cb8a6ff01275bec713.js → 77845cd5d824c1004bfa.js} +1 -1
- package/assets/esri/core/workers/chunks/{a73a262ddc959a59819f.js → 7d3b2bdc75525d47389c.js} +1 -1
- package/assets/esri/core/workers/chunks/{cc1aedb2b3aa3854b0de.js → 901c957c049f53318e87.js} +1 -1
- package/assets/esri/core/workers/chunks/{654fe135d41af81daa13.js → 909be86782af3deb448e.js} +1 -1
- package/assets/esri/core/workers/chunks/{7d93ff4f18fd21c7b9f2.js → 94f41ef15f6c61562e5e.js} +1 -1
- package/assets/esri/core/workers/chunks/{8540fb31bd0b29ff1906.js → 968956284f44187f0622.js} +1 -1
- package/assets/esri/core/workers/chunks/{92b48e3365d1cc933113.js → 96d2a0777f5c418055fb.js} +1 -1
- package/assets/esri/core/workers/chunks/988efc508c33ca341e49.js +1 -0
- package/assets/esri/core/workers/chunks/{56db71ea7eb8a5652d98.js → abfc5f9ac16c3e885c5f.js} +1 -1
- package/assets/esri/core/workers/chunks/{856b03020b2dd047291d.js → ad9b3b83aa96db7b79ea.js} +1 -1
- package/assets/esri/core/workers/chunks/{c3b2b05996e2008adbe3.js → afddb94ff4e1a70022c7.js} +1 -1
- package/assets/esri/core/workers/chunks/{c409bb2acd846d3b1395.js → b2f9f0767dadf185120c.js} +1 -1
- package/assets/esri/core/workers/chunks/{563594357f3648652a5c.js → ba917175ca2a6681501e.js} +1 -1
- package/assets/esri/core/workers/chunks/c03e6e35082beaec02a6.js +1 -0
- package/assets/esri/core/workers/chunks/{759781cad91d31ab7bc4.js → db4c110ab4c26c4b768c.js} +1 -1
- package/assets/esri/core/workers/chunks/dcb043986fb065de0366.js +1 -0
- package/assets/esri/core/workers/chunks/{05c80002c37002ac99e8.js → de16b771d2c8d816c738.js} +1 -1
- package/assets/esri/core/workers/chunks/{3010a22d00f45fce5939.js → e0ac90b4ad8c36fb7d70.js} +1 -1
- package/assets/esri/core/workers/chunks/{5719471414810b6a9aec.js → e56647e61296643c5f84.js} +1 -1
- package/assets/esri/core/workers/chunks/{1bc22af4cc4effcbcf2b.js → e6a5911ea21bef32834b.js} +1 -1
- package/assets/esri/core/workers/chunks/{2f818b9a6b1f2b61410d.js → e99d7ecb80a9df9ead6d.js} +24 -24
- package/assets/esri/core/workers/chunks/{12d798775a96a45aada2.js → f46c4a69ef2f763e905b.js} +1 -1
- package/assets/esri/core/workers/chunks/{5e80e10b7c7e66dd861e.js → febae745a29a17ca130a.js} +1 -1
- package/chunks/Bufferer-CicaNej1.js +1 -1
- package/chunks/DefaultMaterial.glsl.js +22 -22
- package/chunks/Distance2DCalculator-C1KHhZwD.js +1 -1
- package/chunks/Envelope.js +1 -1
- package/chunks/GeodeticDistanceCalculator-CcF1gMZX.js +1 -1
- package/chunks/OperatorClip.js +1 -1
- package/chunks/OperatorCut.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/OperatorMultiPartToSinglePart.js +1 -1
- package/chunks/OperatorProximity.js +1 -1
- package/chunks/OperatorShapePreservingProject.js +1 -1
- package/chunks/ProjectionTransformation.js +1 -1
- package/chunks/SideCalculator2D-BNwb5gvz.js +1 -1
- package/chunks/disjointOperator.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/editing/sharedTemplates/executor/builders/support/builderUtils.js +1 -1
- package/editing/sharedTemplates/executor/createTemplateExecutor.js +1 -1
- package/editing/sharedTemplates/executor/support/createFeatureServiceEdit.js +5 -0
- package/editing/sharedTemplates/executor/support/createPresetServiceEdit.js +5 -0
- package/geometry/operators/extendOperator.js +1 -1
- package/geometry/operators/gx/operatorAutoComplete.js +1 -1
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +1 -1
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
- package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
- package/geometry/operators/gx/operatorSimplify.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/gx/operatorUnion.js +1 -1
- package/geometry/operators/json/disjointOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/operators/support/initNoPeFactory.js +1 -1
- package/geometry/operators/support/jsonConverter.js +1 -1
- package/interfaces.d.ts +12 -14
- package/layers/WMTSLayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/dehydratedFeatures.js +1 -1
- package/layers/support/SubtypeSublayer.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/wmtsUtils.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/3d/layers/BuildingComponentSublayerView3D.js +1 -1
- package/views/3d/layers/GraphicsLayerView3D.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/support/FeatureTile.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
- package/views/3d/layers/support/projectExtentUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/View.js +1 -1
- package/views/support/LayerLayerViewInfo.js +5 -0
- package/views/support/LayerViewManager.js +5 -0
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
- package/widgets/Feature/FeatureRelationship.js +1 -1
- package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
- package/widgets/Feature/support/featureUtils.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/Features/FeaturesDrillIn.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
- package/widgets/VideoPlayer/VideoPlayerViewModel.js +1 -1
- package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
- package/assets/esri/core/workers/chunks/0e6d338b0937724763c7.js +0 -1
- package/assets/esri/core/workers/chunks/7d120f8b01fe719eb257.js +0 -1
- package/assets/esri/core/workers/chunks/95047f145ebda65c3d8e.js +0 -1
- package/assets/esri/core/workers/chunks/960b12a6fd5b6933212f.js +0 -1
- package/assets/esri/core/workers/chunks/af005704f23088db3ded.js +0 -1
- package/editing/sharedTemplates/executor/support/createServiceEdit.js +0 -5
- package/views/LayerViewManager.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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{P as e}from"./Point2D.js";import{f as t,G as n,t as r}from"./Geometry.js";import{Envelope2D as o}from"./Envelope2D.js";import{
|
|
5
|
+
import{P as e}from"./Point2D.js";import{f as t,G as n,t as r}from"./Geometry.js";import{Envelope2D as o}from"./Envelope2D.js";import{i}from"./ProjectionTransformation.js";function s(){return g(new e,-1,Number.NaN)}function g(e,t,n){return{m_coordinate:e.clone(),m_vertexIndex:t,m_geometryIndex:0,m_distance:n,m_bRightSide:!1,isEmpty:u}}function u(){return Number.isNaN(this.m_distance)}function c(e,r,i=-1,s=-1){if(e.isEmpty())return 3;const g=e.getGeometryType();if(t(g))return a(e,r,i,s);if(g===n.enumPolygon)return f(e,r,i,s);if(g===n.enumPolyline)return m(e,r,i,s);if(g===n.enumEnvelope){const t=new o;return e.queryEnvelope(t),t.contains(r)?t.containsExclusive(r)?1:2:0}return 3}function a(t,n,o,i){if(o>=0||i>=0)return r("");if(t.isDegenerate(0))return t.getStartXY().equals(n)?2:3;if(!t.isCurve()){const r=e.orientationRobust(n,t.getStartXY(),t.getEndXY());return r<0?1:r>0?0:2}const s=t.getClosestCoordinate(n,!1),g=t.getTangent(s),u=t.getCoord2D(s),c=e.orientationRobust(n,u,u.add(g));return c<0?1:c>0?0:2}function f(e,t,n,s){(n>=0||s>=0)&&r("");const g=new o;e.queryEnvelope(g);const u=i(e,t,0);return 0===u?0:1===u?1:2}function m(t,n,o,i){(o<0&&i>=0||o>=0&&i<0)&&r("");const s=t.querySegmentIterator();if(o<0){let t=Number.MAX_VALUE,r=0;for(;s.nextPath();)for(;s.hasNextSegment();){const g=s.nextSegment(),u=g.getClosestCoordinate(n,!1),c=g.getCoord2D(u),a=e.sqrDistance(c,n);a<t?(r=1,o=s.getStartPointIndex(),i=s.getPathIndex(),t=a):a===t&&r++}if(0===r)return 3;if(1===r){s.resetToVertex(o,i);return c(s.nextSegment(),n)}}const g=h(n,s,o,i);if(-1!==g.i1&&-1===g.i2)return g.bRight1?1:0;if(-1!==g.i1&&-1!==g.i2){if(g.bRight1===g.bRight2)return g.bRight1?1:0;{s.resetToVertex(g.i1,-1);const e=s.nextSegment().getTangent(1);s.resetToVertex(g.i2,-1);const t=s.nextSegment().getTangent(0);return e.crossProduct(t)>=0?1:0}}s.resetToVertex(o,i);return c(s.nextSegment(),n)}function x(e,t,n){for(e.resetToVertex(t,n);e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}for(e.resetToVertex(t,n);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function S(e,t){for(e.resetToVertex(t,-1),e.nextSegment();e.hasNextSegment();){if(!e.nextSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function d(e,t){for(e.resetToVertex(t,-1);e.hasPreviousSegment();){if(!e.previousSegment().isDegenerate(0))return e.getStartPointIndex()}return-1}function h(t,n,r,o){const i={i1:-1,i2:-1,bRight1:!1,bRight2:!1};if(i.i1=x(n,r,o),-1!==i.i1){n.resetToVertex(i.i1,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o),g=e.sqrDistance(s,t);{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight1=e.crossProduct(n)<0}if(i.i2=S(n,i.i1),-1!==i.i2){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0}}if(-1===i.i2&&(i.i2=d(n,i.i1),-1!==i.i2)){n.resetToVertex(i.i2,-1);const r=n.nextSegment(),o=r.getClosestCoordinate(t,!1),s=r.getCoord2D(o);if(e.sqrDistance(s,t)>g)i.i2=-1;else{const e=s.clone();e.subThis(r.getStartXY());const n=t.clone();n.subThis(r.getStartXY()),i.bRight2=e.crossProduct(n)<0;const o=i.i1;i.i1=i.i2,i.i2=o;const g=i.bRight1;i.bRight1=i.bRight2,i.bRight2=g}}}return i}export{g as a,c,s as m};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
5
|
+
import{a as e}from"./ProjectionTransformation.js";import{getSpatialReference as r,fromGeometry as t,fromSpatialReference as o}from"../geometry/operators/support/apiConverter.js";const s=new e;function a(e){const a=r(e);return s.accelerateGeometry(t(e),o(a),1)}function n(e,r){return s.execute(t(e),t(r),o(e.spatialReference))}const c=s.supportsCurves(),p=Object.freeze(Object.defineProperty({__proto__:null,accelerateGeometry:a,execute:n,supportsCurves:c},Symbol.toStringTag,{value:"Module"}));export{a,p as d,n as e,c as s};
|
package/core/arrayUtils.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,l=.5;function o(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let l=1;l<n.length;++l){const o=n[l],u=Number(t(o));u>r&&(r=u,e=o)}return e}function i(n,t=u){return f(n,(n=>-t(n)))}function c(n,t){return t?n.filter(((n,e,r)=>r.findIndex(t.bind(null,n))===e)):Array.from(new Set(n))}function s(n,t,e){if(null==n&&null==t)return!0;if(null==n||null==t||n.length!==t.length)return!1;if(e){for(let r=0;r<n.length;r++)if(!e(n[r],t[r]))return!1}else for(let r=0;r<n.length;r++)if(n[r]!==t[r])return!1;return!0}function h(n,t){let e=n.length!==t.length;e&&(n.length=t.length);for(let r=0;r<t.length;++r)n[r]!==t[r]&&(n[r]=t[r],e=!0);return e}function a(n,t,e){let r,l;return e?(r=t.filter((t=>!n.some((n=>e(n,t))))),l=n.filter((n=>!t.some((t=>e(t,n)))))):(r=t.filter((t=>!n.includes(t))),l=n.filter((n=>!t.includes(n)))),{added:r,removed:l}}function g(n,t,e){return n&&t?e?n.filter((n=>t.findIndex((t=>e(n,t)))>-1)):n.filter((n=>t.includes(n))):[]}function d(n){return n&&"number"==typeof n.length}function m(n,t){const e=n.length;if(0===e)return[];const r=[];for(let l=0;l<e;l+=t)r.push(n.slice(l,l+t));return r}function p(n,t){void 0===t&&(t=n,n=0);const e=new Array(t-n);for(let r=n;r<t;r++)e[r-n]=r;return e}function M(n,t,e){const r=n.length;let l=0,o=r-1;for(;l<o;){const e=l+Math.floor((o-l)/2);t>n[e]?l=e+1:o=e}const u=n[l];return e?t>=n[r-1]?-1:u===t?l:l-1:u===t?l:-1}class w{constructor(){this.last=0}}const x=new w;function b(n,t,e,r){r=r||x;const l=Math.max(0,r.last-10);for(let u=l;u<e;++u)if(n[u]===t)return r.last=u,u;const o=Math.min(l,e);for(let u=0;u<o;++u)if(n[u]===t)return r.last=u,u;return-1}function y(t,e,r,l){const o=r??t.length,u=b(t,n(e),o,l);if(-1!==u)return t[u]=t[o-1],null==r&&t.pop(),e}const S=new Set;function j(n,t,e=n.length,r=t.length,l,o){if(0===r||0===e)return e;S.clear();for(let f=0;f<r;++f)S.add(t[f]);l=l||x;const u=Math.max(0,l.last-10);for(let f=u;f<e;++f)if(S.has(n[f])&&(o?.push(n[f]),S.delete(n[f]),n[f]=n[e-1],--e,--f,0===S.size||0===e))return S.clear(),e;for(let f=0;f<u;++f)if(S.has(n[f])&&(o?.push(n[f]),S.delete(n[f]),n[f]=n[e-1],--e,--f,0===S.size||0===e))return S.clear(),e;return S.clear(),e}function v(n,t){let e=0;for(let r=0;r<n.length;++r){const l=n[r];t(l,r)&&(n[e]=l,e++)}n.length=e}function z(n,t,e){const r=n.length;if(t>=r)return n.slice();const l=A(e),o=new Set,u=[];for(;u.length<t;){const t=Math.floor(l()*r);o.has(t)||(o.add(t),u.push(n[t]))}return u}function A(n){return n?(I.seed=n,()=>I.getFloat()):Math.random}const I=new t;function C(n,t){const e=A(t);for(let r=n.length-1;r>0;r--){const t=Math.floor(e()*(r+1)),l=n[r];n[r]=n[t],n[t]=l}return n}function F(n,t){const e=n.indexOf(t);return-1!==e?(n.splice(e,1),t):null}function G(n,t){return null!=n}function L(n,...t){for(const e of t)null!=e&&n.push(e);return n.length}const N=[];export{w as PositionHint,o as addMany,M as binaryIndexOf,a as difference,N as emptyArray,s as equals,v as filterInPlace,A as getRandomNumberGenerator,b as indexOf,g as intersect,d as isArrayLike,G as isSome,f as max,i as min,z as pickRandom,L as pushIfSome,p as range,e as reallocGrowthFactor,r as reallocShrinkFactor,l as reallocShrinkThreshold,F as remove,y as removeUnordered,j as removeUnorderedMany,C as shuffle,m as splitIntoChunks,c as unique,h as update};
|
|
5
|
+
import{toConst as n}from"./compilerUtils.js";import t from"./RandomLCG.js";const e=1.5,r=1/e,l=.5;function o(n,t){if(!t)return n;for(const e of t)n.push(e);return n}function u(n){return n}function f(n,t=u){if(!n||0===n.length)return;let e=n[0],r=t(e);for(let l=1;l<n.length;++l){const o=n[l],u=Number(t(o));u>r&&(r=u,e=o)}return e}function i(n,t=u){return f(n,(n=>-t(n)))}function c(n,t){return t?n.filter(((n,e,r)=>r.findIndex(t.bind(null,n))===e)):Array.from(new Set(n))}function s(n,t,e){if(null==n&&null==t)return!0;if(null==n||null==t||n.length!==t.length)return!1;if(e){for(let r=0;r<n.length;r++)if(!e(n[r],t[r]))return!1}else for(let r=0;r<n.length;r++)if(n[r]!==t[r])return!1;return!0}function h(n,t){let e=n.length!==t.length;e&&(n.length=t.length);for(let r=0;r<t.length;++r)n[r]!==t[r]&&(n[r]=t[r],e=!0);return e}function a(n,t,e){let r,l;return e?(r=t.filter((t=>!n.some((n=>e(n,t))))),l=n.filter((n=>!t.some((t=>e(t,n)))))):(r=t.filter((t=>!n.includes(t))),l=n.filter((n=>!t.includes(n)))),{added:r,removed:l}}function g(n,t,e){return n&&t?e?n.filter((n=>t.findIndex((t=>e(n,t)))>-1)):n.filter((n=>t.includes(n))):[]}function d(n){return n&&"number"==typeof n.length}function m(n,t){const e=n.length;if(0===e)return[];const r=[];for(let l=0;l<e;l+=t)r.push(n.slice(l,l+t));return r}function p(n,t){void 0===t&&(t=n,n=0);const e=new Array(t-n);for(let r=n;r<t;r++)e[r-n]=r;return e}function M(n,t,e){const r=n.length;let l=0,o=r-1;for(;l<o;){const e=l+Math.floor((o-l)/2);t>n[e]?l=e+1:o=e}const u=n[l];return e?t>=n[r-1]?-1:u===t?l:l-1:u===t?l:-1}class w{constructor(){this.last=0}}const x=new w;function b(n,t,e,r){r=r||x;const l=Math.max(0,r.last-10);for(let u=l;u<e;++u)if(n[u]===t)return r.last=u,u;const o=Math.min(l,e);for(let u=0;u<o;++u)if(n[u]===t)return r.last=u,u;return-1}function y(t,e,r,l){const o=r??t.length,u=b(t,n(e),o,l);if(-1!==u)return t[u]=t[o-1],null==r&&t.pop(),e}const S=new Set;function j(n,t,e=n.length,r=t.length,l,o){if(0===r||0===e)return e;S.clear();for(let f=0;f<r;++f)S.add(t[f]);l=l||x;const u=Math.max(0,l.last-10);for(let f=u;f<e;++f)if(S.has(n[f])&&(o?.push(n[f]),S.delete(n[f]),n[f]=n[e-1],--e,--f,0===S.size||0===e))return S.clear(),e;for(let f=0;f<u;++f)if(S.has(n[f])&&(o?.push(n[f]),S.delete(n[f]),n[f]=n[e-1],--e,--f,0===S.size||0===e))return S.clear(),e;return S.clear(),e}function v(n,t){let e=0;for(let r=0;r<n.length;++r){const l=n[r];t(l,r)&&(n[e]=l,e++)}n.length=e}function z(n,t,e){const r=n.length;if(t>=r)return n.slice();const l=A(e),o=new Set,u=[];for(;u.length<t;){const t=Math.floor(l()*r);o.has(t)||(o.add(t),u.push(n[t]))}return u}function A(n){return n?(I.seed=n,()=>I.getFloat()):Math.random}const I=new t;function C(n,t){if(!n)return n;const e=A(t);for(let r=n.length-1;r>0;r--){const t=Math.floor(e()*(r+1)),l=n[r];n[r]=n[t],n[t]=l}return n}function F(n,t){const e=n.indexOf(t);return-1!==e?(n.splice(e,1),t):null}function G(n,t){return null!=n}function L(n,...t){for(const e of t)null!=e&&n.push(e);return n.length}const N=[];export{w as PositionHint,o as addMany,M as binaryIndexOf,a as difference,N as emptyArray,s as equals,v as filterInPlace,A as getRandomNumberGenerator,b as indexOf,g as intersect,d as isArrayLike,G as isSome,f as max,i as min,z as pickRandom,L as pushIfSome,p as range,e as reallocGrowthFactor,r as reallocShrinkFactor,l as reallocShrinkThreshold,F as remove,y as removeUnordered,j as removeUnorderedMany,C as shuffle,m as splitIntoChunks,c as unique,h as update};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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{isLoadedSharedTemplate as
|
|
5
|
+
import e from"../../../../../core/Error.js";import{getMetersPerVerticalUnitForSR as t,getMetersPerUnitForSR as o}from"../../../../../core/unitUtils.js";import{isLoadedSharedTemplate as r,isSharedPresetTemplate as n,isSharedFeatureTemplate as s}from"../../../../templateUtils.js";import{createFeatureServiceEdit as i}from"../../support/createFeatureServiceEdit.js";import{createPresetServiceEdit as a}from"../../support/createPresetServiceEdit.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(!r(m))throw new e("shared-template:template-not-loaded","A template part's template must be loaded before use");if(n(m)){if(!u(p))throw new e("shared-template:invalid-geometry","Preset templates must have a point geometry");a({geometry:p,template:m,edits:t,relationships:l,rotation:0,mode:o,tag:c})}else s(m)&&i({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=M(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 j(e){return!0===e.vertexBeforeOffset}function M(e,t,o,r,n){const s=[];for(const i of e)s.push(Z(i,t,o,r,n));return s}function Z(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,j 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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import e from"../../../Graphic.js";import t from"../../../core/Error.js";import o from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isPromiseLike as i}from"../../../core/promiseUtils.js";import{isLoadedSharedTemplate as
|
|
5
|
+
import e from"../../../Graphic.js";import t from"../../../core/Error.js";import o from"../../../core/Logger.js";import{getOrCreateMapValue as r}from"../../../core/MapUtils.js";import{isPromiseLike as i}from"../../../core/promiseUtils.js";import{generateBracedUUID as s}from"../../../core/uuid.js";import{isLoadedSharedTemplate as a,isSharedFeatureTemplate as l,isSharedGroupTemplate as n,isSharedPresetTemplate as u}from"../../templateUtils.js";import{createFeatureServiceEdit as p}from"./support/createFeatureServiceEdit.js";import{calculateExtent as c,groupEditsByLayer as m}from"./support/executorUtils.js";import{getBuilder as d}from"./support/getBuilder.js";import{isPoint as f}from"../../../geometry/support/jsonUtils.js";import{getAssociationsTableFields as y}from"../../../networks/support/networkFieldUtils.js";import{RuleType as T}from"../../../networks/support/typeUtils.js";const g=()=>o.getLogger("esri.editing.sharedTemplates.executor.createTemplateExecutor"),h="globalid";async function w(e){if(!a(e))throw new t("template-executor:template-not-loaded","The template must be loaded before it can be executed.");if(l(e))return I(e);if(n(e))return b(e);if(u(e))return G(e);throw new t("template-executor:unsupported-template-type","The template type is not supported.")}function I(e){return t=>{const o=[],r=[];p({geometry:t,template:e,edits:o,relationships:r});const i=c(o);return{edits:m(o),relationships:r,primary:o[0]??null,featureExtent:i,rotationPoint:i?.center??null}}}async function b(e){const{definition:t}=e,o=await Promise.all(t.allParts.map(k));return(r,s)=>{const a=[],l=[],n=new Set,u=()=>{if(t.createUtilityNetworkAssociations&&"completion"===s){const{utilityNetwork:e,utilityNetworkAssociationsTable:o}=t;e&&o?S({associationGraphics:n,associationsTable:o,edits:a,relationships:l,utilityNetworkHelper:e}):g().warn("Unable to create utility network associations between group template features. The utility network or its associations table is unavailable.")}const e=c(a);return{associationGraphics:n,edits:m(a),relationships:l,primary:a[0]??null,featureExtent:e,rotationPoint:e?.center??null}};if(null==r)return g().warn("No geometry provided to group template executor. Result will be empty."),u();const p=o.map((t=>t({edits:a,mode:s,parentTemplate:e,relationships:l,shape:r}))).filter(i);return 0===p.length?u():Promise.all(p).then((()=>u()))}}async function k(e){const t=await d(e.builderType);return o=>t.execute({...o,templatePart:e})}async function G(e){const{createPresetServiceEdit:o}=await import("./support/createPresetServiceEdit.js");return(r,i,s=0)=>{if(!f(r))throw new t("template-executor:invalid-input-geometry","The input goemetry for a preset template must be a point.");const a=[],l=[],n=o({geometry:r,template:e,edits:a,relationships:l,rotation:s,mode:i});return{edits:m(a),relationships:l,primary:a[0]??null,featureExtent:c(a),rotationPoint:n}}}function S(e){const{edits:t,utilityNetworkHelper:o}=e,i=new Map;for(const s of t)""!==s.tag&&o.layerIdToSourceIdLookup.has(s.id)&&r(i,s.tag,(()=>[])).push(s);for(const r of i.values())if(!(r.length<2))for(let t=0;t<r.length;t++){const o=r[t];for(let i=t+1;i<r.length;i++){A(o,r[i],e)}}}function A(t,o,r){const{associationGraphics:i,associationsTable:a,edits:l,utilityNetworkHelper:n,relationships:u}=r,p=n.findAgat(t.graphic,t.layer),c=n.findAgat(o.graphic,o.layer);if(!p||!c)return;const m=n.findRules(p).map((e=>e.fromNetworkSource?.sourceId!==p.networkSourceId||e.fromAssetGroup?.assetGroupCode!==p.assetGroup||null!==e.fromAssetType?.assetTypeCode&&e.fromAssetType?.assetTypeCode!==p.assetType||e.toNetworkSource.sourceId!==c.networkSourceId||e.toAssetGroup?.assetGroupCode!==c.assetGroup||null!==e.toAssetType&&e.toAssetType?.assetTypeCode!==c.assetType?e.toNetworkSource.sourceId!==p.networkSourceId||e.toAssetGroup?.assetGroupCode!==p.assetGroup||null!==e.toAssetType&&e.toAssetType?.assetTypeCode!==p.assetType||e.fromNetworkSource.sourceId!==c.networkSourceId||e.fromAssetGroup?.assetGroupCode!==c.assetGroup||null!==e.fromAssetType?.assetTypeCode&&e.fromAssetType?.assetTypeCode!==c.assetType?null:{rule:e,from:{agat:c,item:o},to:{agat:p,item:t}}:{rule:e,from:{agat:p,item:t},to:{agat:c,item:o}})).filter((e=>e?.rule.ruleType===T.RTJunctionEdgeConnectivity||e?.rule.ruleType===T.RTEdgeJunctionEdgeConnectivity||e?.rule.ruleType===T.RTContainment?null:e)).filter((e=>null!==e));if(0===m.length)return;const d=y(a),f=new Set;for(const y of m){const t={};t[d.fromNetworkSourceId]=y.rule.fromNetworkSource.sourceId,t[d.fromGlobalId]=y.from.item.graphic.attributes[y.from.item.layer.globalIdField??h],t[d.fromTerminalId]=null,y.rule.fromTerminal&&(t[d.fromTerminalId]=y.rule.fromTerminal.terminalId),t[d.toNetworkSourceId]=y.rule.toNetworkSource.sourceId,t[d.toGlobalId]=y.to.item.graphic.attributes[y.to.item.layer.globalIdField??h],t[d.toTerminalId]=null,y.rule.toTerminal&&(t[d.toTerminalId]=y.rule.toTerminal.terminalId),t[d.associationType]=y.rule.ruleType,t[d.percentAlong]=null,y.rule.ruleType===T.RTContainment&&(t[d.isContentVisible]=1),t[d.status]=0,t[d.globalId]=s();const o=`${t[d.fromNetworkSourceId]}-${t[d.fromGlobalId]}-${t[d.toNetworkSourceId]}-${t[d.toGlobalId]}-${t[d.associationType]}`;if(f.has(o))continue;f.add(o);const r=new e({attributes:t});i.add(r),l.push({id:a.layerId,graphic:r,tag:"",layer:a}),u.push({sourceGraphic:y.to.item.graphic,sourceLayerId:y.to.item.layer.layerId,destinationGraphic:r,destinationLayerId:a.layerId,sourceField:y.to.item.layer.globalIdField??h,destinationField:d.toGlobalId??h}),u.push({sourceGraphic:y.from.item.graphic,sourceLayerId:y.from.item.layer.layerId,destinationGraphic:r,destinationLayerId:a.layerId,sourceField:y.from.item.layer.globalIdField??h,destinationField:d.fromGlobalId??h})}}export{w as createTemplateExecutor};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../../../../Graphic.js";import t from"../../../../core/Error.js";import{generateBracedUUID as a}from"../../../../core/uuid.js";import{isLoadedSharedTemplate as s}from"../../../templateUtils.js";import{isRadial as r}from"./executorUtils.js";import i from"../../../../geometry/Multipoint.js";import o from"../../../../geometry/Point.js";import n from"../../../../geometry/Polygon.js";import l from"../../../../geometry/Polyline.js";import{isSubtypeGroupLayer as h}from"../../../../layers/support/layerUtils.js";function p({edits:i,geometry:o,relationships:n,tag:h="",template:f}){if(r(o)){const e=o.geometry.clone();for(const t of e.paths){p({geometry:new l({spatialReference:e.spatialReference,paths:[t],hasZ:e.hasZ,hasM:e.hasM}),template:f,edits:i,relationships:n,tag:h})}return}const{definition:c,layer:m}=f;o=u(o,m);const d=new e({attributes:c.defaultValues?{...c.defaultValues}:{},geometry:o,sourceLayer:m});if(y(d,m),m.globalIdField&&(d.attributes[m.globalIdField]=a()),i.push({id:m.layerId,graphic:d,tag:h,layer:m}),0!==c.relationships.length)for(const r of c.relationships||[]){const o=r.template;if(null==r.relationshipMetadata||!s(o))throw new t("shared-template:missing-relationship-metadata-or-definition","Relationship part must have metadata and a fully loaded template with definition");const{layer:l}=o,h=new e({attributes:{...c.defaultValues},sourceLayer:l});y(h,l),l.globalIdField&&(h.attributes[l.globalIdField]=a()),i.push({graphic:h,id:l.layerId,tag:"",layer:l}),n.push({...r.relationshipMetadata,sourceGraphic:d,destinationGraphic:h})}}function u(e,t){if(!e)return null;if(e.hasZ===t.hasZ&&e.hasM===t.hasM)return e;switch(e.type){case"point":return new o({spatialReference:e.spatialReference,x:e.x,y:e.y,...t.hasZ?e.hasZ?{z:e.z}:{z:m(t)}:{},...t.hasM?e.hasM?{m:e.m}:{m:d(t)??void 0}:{}});case"polygon":return new n({spatialReference:e.spatialReference,rings:f(e.rings,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"polyline":return new l({spatialReference:e.spatialReference,paths:f(e.paths,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1),hasZ:t.hasZ,hasM:t.hasM});case"multipoint":return new i({spatialReference:e.spatialReference,hasZ:t.hasZ,hasM:t.hasM,points:c(e.points,t.hasZ,t.hasM,m(t),d(t),e.hasM?e.hasZ?3:2:-1,e.hasZ?2:-1)});default:return e}}function f(e,t,a,s,r,i,o){const n=[];for(const l of e)n.push(c(l,t,a,s,r,i,o));return n}function c(e,t,a,s,r,i,o){const n=[];for(const l of e){const e=[l[0],l[1]];t&&(e[2]=o>-1?l[2]:s),a&&(e[t?3:2]=i>-1?l[i]:r),n.push(e)}return n}function m(e){return e.capabilities.editing?.zDefault??0}function d(e){return e.capabilities.editing.supportsUpdateWithoutM?void 0:0}function y(e,t){h(t)&&(e.sourceLayer=t.findSublayerForFeature(e))}export{p as createFeatureServiceEdit};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*
|
|
2
|
+
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
+
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
|
+
*/
|
|
5
|
+
import e from"../../../../core/Error.js";import{isLoadedSharedTemplate as t,isSharedFeatureTemplate as o,isSharedPresetTemplate as s}from"../../../templateUtils.js";import{createFeatureServiceEdit as r}from"./createFeatureServiceEdit.js";import{maxDigitizingDisplayEdits as i}from"./executorUtils.js";import n from"../../../../geometry/Multipoint.js";import a from"../../../../geometry/Point.js";import l from"../../../../geometry/Polygon.js";import p from"../../../../geometry/Polyline.js";import{execute as h}from"../../../../geometry/operators/affineTransformOperator.js";import f from"../../../../geometry/operators/support/Transformation.js";function m({edits:n,geometry:a,mode:l,relationships:p,rotation:c,tag:u="",template:y}){const{definition:d}=y,Z=a.x-d.origin.x,M=a.y-d.origin.y,j=d.origin.hasZ&&a.hasZ?a.z-d.origin.z:0,R=g(d.origin.clone(),Z,M,j),w=(new f).rotate(c,R.x,R.y);for(const f of d.parts){if(n.length>i&&"digitizing"===l)break;const c=f.template;if(!t(c))throw new e("shared-template:template-not-loaded","A template part's template must be loaded before use");if(o(c)){let e=g(f.geometry,Z,M,j);w.isIdentity||(e=h(e,w)),r({edits:n,geometry:e,relationships:p,tag:u,template:c})}else if(s(c)){const e=[];if(m({edits:w.isIdentity?e:n,geometry:a,mode:l,relationships:p,rotation:0,tag:u,template:c}),!w.isIdentity)for(const t of e){const{geometry:e}=t.graphic;e&&"mesh"!==e.type&&(t.graphic.geometry=h(e,w),n.push(t))}}}return R}function g(e,t,o,s=0){if(!e)return null;if("point"===e.type)return new a({spatialReference:e.spatialReference,x:e.x+t,y:e.y+o,...e.hasZ?{z:e.z+s}:{},...e.hasM?{m:e.m}:{}});if("multipoint"===e.type){const r=[];if(e.hasZ&&e.hasM)for(let i=0;i<e.points.length;i++){const n=e.points[i];r.push([n[0]+t,n[1]+o,n[2]+s,n[3]])}else if(e.hasZ)for(let i=0;i<e.points.length;i++){const n=e.points[i];r.push([n[0]+t,n[1]+o,n[2]+s])}else if(e.hasM)for(let s=0;s<e.points.length;s++){const i=e.points[s];r.push([i[0]+t,i[1]+o,i[2]])}else for(let s=0;s<e.points.length;s++){const i=e.points[s];r.push([i[0]+t,i[1]+o])}return new n({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM,points:r})}if("polygon"===e.type){const r=new l({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let i=0;i<e.rings.length;i++){const n=e.rings[i],a=[];if(e.hasZ&&e.hasM)for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o,n[e][2]+s,n[e][3]]);else if(e.hasM)for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o,n[e][2]]);else if(e.hasZ)for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o,n[e][2]+s]);else for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o]);r.addRing(a)}return r}if("polyline"===e.type){const r=new p({spatialReference:e.spatialReference,hasZ:e.hasZ,hasM:e.hasM});for(let i=0;i<e.paths.length;i++){const n=e.paths[i],a=[];if(e.hasZ&&e.hasM)for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o,n[e][2]+s,n[e][3]]);else if(e.hasZ)for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o,n[e][2]+s]);else if(e.hasM)for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o,n[e][2]]);else for(let e=0;e<n.length;e++)a.push([n[e][0]+t,n[e][1]+o]);r.addPath(a)}return r}return e.clone()}export{m as createPresetServiceEdit,g 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.33/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{
|
|
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 m,f as u}from"../../chunks/QuadraticBezier.js";import{w as c}from"../../chunks/Point2D.js";import{getSpatialReference as l,fromPolyline as p,fromSpatialReference as d,toPolyline as h}from"./support/apiConverter.js";function f(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,m=new o;t.queryEnvelope(g),n.queryEnvelope(m),g.mergeEnvelope2D(m);return P(t,n,s(r,g,!0).total(),a)}function P(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 m,f=new a({vd:e.getDescription()}),P=new a({vd:e.getDescription()}),y=[],x=[];for(S(e,y,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[y[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(),m=a,d=m.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}=u(m,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 y(e,t){return{m_path:e,m_pointIndex:t}}function S(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(y(t,n)),s.resetToLastSegment();const a=s.previousSegment().getEndXY(),i=s.getPathIndex(),g=s.getEndPointIndex();r.push(a),o.push(y(i,g))}const a=new i(0);for(let i=0;i<r.length;i++)a.add(i);const m={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(),m);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--}}c(t,n.length,0);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 x{getOperatorType(){return 10007}supportsCurves(){return!1}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n,r,o){return f(e,t,n,r)}}const E=new x;function I(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=l(e),s=E.execute(p(e),p(t),d(o),r,null);return s?h(s,o):null}const N=E.supportsCurves();export{I as execute,N 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.33/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{
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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{
|
|
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-CicaNej1.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.33/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{
|
|
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 i}from"../../../chunks/Envelope2D.js";import{B as n}from"../../../chunks/Bufferer-CicaNej1.js";class m{getOperatorType(){return 10111}supportsCurves(){return!0}accelerateGeometry(e,t,r){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,r,i,n,m,u,c,h,a,_){if(h){const h=new o(e,t,r,i,n,m,u,c,_);return(new s).executeMany(h,t,_,2)}return new o(e,t,r,i,n,m,u,c,_)}}class o extends e{constructor(e,t,r,s,m,o,u,c,h){super(),this.m_currentUnionEnvelope2D=new i,this.m_index=-1,this.m_dindex=-1,this.m_progressTracker=h,this.m_bufferer=new n(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,i,n,m,o,c,h){const a=u.executeMany(new t(e),r,s,i,n,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.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r 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{
|
|
5
|
+
import{G as e,S as t}from"../../../chunks/SimpleGeometryCursor.js";import{r 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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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,
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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{
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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 n}from"../../../chunks/Envelope2D.js";import{
|
|
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 n}from"../../../chunks/Envelope2D.js";import{a as o}from"../../../chunks/Envelope.js";import{E as a,k 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 n;t.setEmpty(),this.m_geometryIndex=this.m_shape.createGeometryUserIndex();for(let o=this.m_inputGeometryCursor.next();null!==o;o=this.m_inputGeometryCursor.next()){i(o);const e=this.m_shape.addGeometry(o);o.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 n;o.queryLooseEnvelope(a),t.mergeEnvelope2D(a),k(this.m_progressTracker)}this.m_inputGeometryCursor=null;const e=o(this.m_sr,t,!0),h=o(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 n=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);n=this.m_topoGraph.extractPolygonFromChainAndIslands(s,n,t,p),this.m_topoGraph.setChainUserIndex(t,this.m_visitedChainsIndex,1)}return null!==this.m_curveStitcher&&this.m_curveStitcher.stitchCurves(s,n,this.m_stitchMaxDeviation,!1),s.getGeometry(n)}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.33/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{
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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,d 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?d(e,t,h):y===s.enumPoint&&g===s.enumMultiPoint?f(t,e,h):y===s.enumMultiPoint&&g===s.enumPoint?f(e,t,h):p(e,t,n,r)}function d(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 f(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,d 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?d(e,t,h):y===s.enumPoint&&g===s.enumMultiPoint?f(t,e,h):y===s.enumMultiPoint&&g===s.enumPoint?f(e,t,h):p(e,t,n,r)}function d(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 f(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.33/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{
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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{
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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,
|
|
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};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.33/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{
|
|
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}}));
|