/*
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 * as tslib_1 from "tslib";
import { VerticalLinearScaler } from "./VerticalLinearScaler";
import { markType } from "igniteui-react-core/ES5/type";
import { ArrayAccessHelper } from "igniteui-react-core/ES5/ArrayAccessHelper";
/**
 * @hidden
 */
var FastVerticalLinearScaler = /** @class */ (function (_super) {
    tslib_1.__extends(FastVerticalLinearScaler, _super);
    function FastVerticalLinearScaler() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    FastVerticalLinearScaler.prototype.u = function (a, b, c, d, e) {
        var f;
        var g = e.e;
        var h = e.d;
        var i = e.c;
        var j = e.a;
        var k = !i.isEmpty;
        var l = this.m;
        var m = this.o;
        var n = i.top;
        var o = i.height;
        var p = g.top;
        var q = g.height;
        var r = h.top;
        var s = h.height;
        var t = 0;
        var u = 1;
        var v = ArrayAccessHelper.a(a);
        var w = false;
        if (v != null) {
            w = true;
        }
        var x;
        for (var y = 0; y < b.count; y++) {
            x = b.item(y);
            for (var z = c; z < d; z++) {
                if (w) {
                    f = v[z];
                }
                else {
                    f = a.item(z);
                }
                if (k) {
                    var aa = (f[x] - m) / (l);
                    if (!j) {
                        aa = 1 - aa;
                    }
                    aa = n + o * (aa - t) / u;
                    var ab = (aa - (p * s)) / q;
                    f[x] = ab;
                }
                else {
                    var ac = (f[x] - m) / (l);
                    if (!j) {
                        ac = 1 - ac;
                    }
                    ac = r + s * (ac - p) / q;
                    f[x] = ac;
                }
            }
        }
    };
    FastVerticalLinearScaler.$t = markType(FastVerticalLinearScaler, 'FastVerticalLinearScaler', VerticalLinearScaler.$);
    return FastVerticalLinearScaler;
}(VerticalLinearScaler));
export { FastVerticalLinearScaler };
