/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../../chunks/_rollupPluginBabelHelpers"],(function(t){"use strict";return function(){function e(t=[],e=[],n=!1){this.lengths=null!=t?t:[],this.coords=null!=e?e:[],this.hasIndeterminateRingOrder=n}e.fromRect=function(t){const[n,s,i,r]=t,h=i-n,o=r-s;return new e([5],[n,s,h,0,0,o,-h,0,0,-o])};var n=e.prototype;return n.forEachVertex=function(t){let e=0;this.lengths.length||t(this.coords[0],this.coords[1]);for(let n=0;n<this.lengths.length;n++){const s=this.lengths[n];for(let n=0;n<s;n++){t(this.coords[2*(n+e)],this.coords[2*(n+e)+1])}e+=s}},n.clone=function(t){return t?(t.set(this.coords),new e(this.lengths.slice(),t,this.hasIndeterminateRingOrder)):new e(this.lengths.slice(),this.coords.slice(),this.hasIndeterminateRingOrder)},t._createClass(e,[{key:"isPoint",get:function(){return 0===this.lengths.length}},{key:"maxLength",get:function(){return Math.max(...this.lengths)}},{key:"size",get:function(){return this.lengths.reduce(((t,e)=>t+e))}}]),e}()}));
