"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5666],{55666(e,t,n){n.r(t),n.d(t,{execute:()=>u,executeMany:()=>i,isConvex:()=>s});var r=n(91577),o=n(83299);function u(e){const t=(0,o.fromGeometry)(e);return(0,o.toGeometry)((0,r.g7)(t.getGeometry()),t.getSpatialReference())}function i(e,t={}){const{merge:n=!1}=t,[u,i]=(0,o.fromGeometries)(e);return(0,r.zo)(u,n).map(e=>(0,o.toGeometry)(e,i))}function s(e){return(0,r.qT)((0,o.fromGeometryToGXGeometry)(e))}},91577(e,t,n){n.d(t,{fz:()=>p,g7:()=>f,qT:()=>G,zo:()=>l});var r=n(76061),o=n(55537),u=n(95213),i=n(88885),s=n(79187);class m extends r.G{constructor(e,t,n){super(),t||(0,o.a)(""),this.m_progressTracker=n,this.m_index=-1,this.m_bMerge=e,this.m_bDone=!1,this.m_inputGeometryCursor=t}getGeometryID(){return this.m_index}tock(){return!0}getRank(){return 1}next(){if(this.m_bMerge){if(!this.m_bDone){const e=c(this.m_inputGeometryCursor);return this.m_bDone=!0,e}return null}if(!this.m_bDone){const e=this.m_inputGeometryCursor.next();if(null!==e)return(0,o.o)(e),(0,o.c)(e),this.m_index=this.m_inputGeometryCursor.getGeometryID(),g(e);this.m_bDone=!0}return null}}function c(e,t){const n=new i.C;let r;for(;r=e.next();)(0,o.o)(r),(0,o.c)(r),n.addGeometry(r);return n.getBoundingGeometry()}function g(e,t){if((0,o.c)(e),e.isEmpty())return e.createInstance();const n=e.getGeometryType();if((0,o.f)(n)){const t=e;if(t.isDegenerate(0)){const e=new u.P;return t.queryStart(e),e}if(t.getGeometryType()===o.G.enumLine){const n=new u.P,r=new i.P({vd:e.getDescription()});return t.queryStart(n),r.startPathPoint(n),t.queryEnd(n),r.lineToPoint(n),r}{const n=new i.P({vd:e.getDescription()});return n.addSegment(t,!0),g(n)}}if(n===o.G.enumEnvelope){const t=e,n=new s.Envelope2D;if(t.queryEnvelope(n),n.xmin===n.xmax&&n.ymin===n.ymax){const e=new u.P;return t.queryCornerByVal(0,e),e}if(n.xmin===n.xmax||n.ymin===n.ymax){const n=new u.P,r=new i.P({vd:e.getDescription()});return t.queryCornerByVal(0,n),r.startPathPoint(n),t.queryCornerByVal(1,n),r.lineToPoint(n),r}{const n=new i.a({vd:e.getDescription()});return n.addEnvelope(t,!1),n}}if(n===o.G.enumGeometryCollection)return c((0,i.g)(e,-1));if(a(e)){if(n===o.G.enumMultiPoint){const t=e,n=new u.P;return t.getPointByVal(0,n),n}return e}return(0,o.g)((0,o.i)(n)),(0,i.f)(e)}function a(e,t){if((0,o.c)(e),e.isEmpty())return!0;const n=e.getGeometryType();if(n===o.G.enumPoint)return!0;if(n===o.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,o.f)(n)){const t=e;if(t.isDegenerate(0))return!1;if(n===o.G.enumLine)return!0;const r=new i.P;return r.addSegment(t,!0),a(r)}if(n===o.G.enumMultiPoint)return 1===e.getPointCount();if(n===o.G.enumPolyline){const t=e;return!t.hasNonLinearSegments()&&1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(n===o.G.enumGeometryCollection){const t=e;return 1===t.getGeometryCount()&&a(t.getGeometry(0))}const r=e;return!(1!==r.getPathCount()||r.getPointCount()<3)&&(0,i.i)(r,0)}const y=new class{getOperatorType(){return 10102}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}executeMany(e,t,n){return new m(t,e,n)}execute(e,t){return g(e)}isConvex(e,t){if((0,o.c)(e),e.isEmpty())return!0;const n=e.getGeometryType();if(n===o.G.enumPoint)return!0;if(n===o.G.enumEnvelope){const t=e;return t.getXMin()!==t.getXMax()&&t.getYMin()!==t.getYMax()}if((0,o.f)(n)){const t=e;return!t.getStartXY().equals(t.getEndXY())}if(n===o.G.enumMultiPoint)return 1===e.getPointCount();if(n===o.G.enumPolyline){const t=e;return 1===t.getPathCount()&&2===t.getPointCount()&&!t.getXY(0).equals(t.getXY(1))}if(n===o.G.enumGeometryCollection){const n=e;return 1===n.getGeometryCount()&&this.isConvex(n.getGeometry(0),t)}const r=e;return!(1!==r.getPathCount()||r.getPointCount()<3)&&(0,i.i)(r,0)}constructOrientedMinimumBoundingBox(e,t,n,r,o){(0,i.e)(e,t,n,r,o)}};function f(e){return y.execute(e,null)}function l(e,t){const n=y.executeMany(new r.S(e),t,null);return Array.from(n)}function G(e){return y.isConvex(e,null)}function p(){return y.supportsCurves()}}}]);