/*
THIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE  AGREEMENT ("AGREEMENT") LOCATED HERE:
https://www.infragistics.com/legal/license/igultimate-la
https://www.infragistics.com/legal/license/igultimate-eula
GOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE:  you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.
*/
import { IList$1_$type, Base, Point_$type, markType, getEnumerator } from "igniteui-react-core/ES2015/type";
import { List$1 } from "igniteui-react-core/ES2015/List$1";
import { ReadOnlyCollection$1 } from "igniteui-react-core/ES2015/ReadOnlyCollection$1";
import { isNaN_, isInfinity } from "igniteui-react-core/ES2015/number";
export class NaNSegmenter extends Base {
    static c(a, b) {
        let c = new List$1(IList$1_$type.specialize(Point_$type), 0);
        let d = getEnumerator(a);
        let e = new List$1(Point_$type, 0);
        let f = true;
        while (d.moveNext()) {
            if (NaNSegmenter.a(d.current)) {
                if (!f && b == 1) {
                    f = true;
                    let g = e;
                    e = new List$1(Point_$type, 0);
                    c.add(new ReadOnlyCollection$1(Point_$type, 1, g));
                }
            }
            else {
                f = false;
                e.add(d.current);
            }
        }
        c.add(new ReadOnlyCollection$1(Point_$type, 1, e));
        return c;
    }
    static a(a) {
        return (isNaN_(a.x) || isNaN_(a.y) || isInfinity(a.x) || isInfinity(a.y));
    }
    static b(a) {
        return !NaNSegmenter.a(a);
    }
}
NaNSegmenter.$t = markType(NaNSegmenter, 'NaNSegmenter');
