define(["exports","./RuntimeError-5b082e8f","./when-4bbc8319","./ComponentDatatype-3d0a0aac"],(function(e,n,t,i){"use strict";const d=i.CesiumMath.EPSILON10;e.arrayRemoveDuplicates=function(e,n,i,f){if(!t.defined(e))return;i=t.defaultValue(i,!1);const r=t.defined(f),u=e.length;if(u<2)return e;let s,a,c,l=e[0],o=0,h=-1;for(s=1;s<u;++s)a=e[s],n(l,a,d)?(t.defined(c)||(c=e.slice(0,s),o=s-1,h=0),r&&f.push(s)):(t.defined(c)&&(c.push(a),o=s,r&&(h=f.length)),l=a);return i&&n(e[0],e[u-1],d)&&(r&&(t.defined(c)?f.splice(h,0,o):f.push(u-1)),t.defined(c)?c.length-=1:c=e.slice(0,-1)),t.defined(c)?c:e}}));
