import { __exports as b } from "../../../../../../_virtual/track.js";
import F from "react";
import { __require as G } from "../../../../classnames@2.5.1/node_modules/classnames/index.js";
import { __require as J } from "./utils/innerSliderUtils.js";
var z;
function Z() {
  if (z) return b;
  z = 1, Object.defineProperty(b, "__esModule", {
    value: !0
  }), b.Track = void 0;
  var s = T(F), m = T(G()), O = J();
  function T(t) {
    return t && t.__esModule ? t : { default: t };
  }
  function y(t) {
    "@babel/helpers - typeof";
    return y = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
      return typeof e;
    } : function(e) {
      return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
    }, y(t);
  }
  function g() {
    return g = Object.assign ? Object.assign.bind() : function(t) {
      for (var e = 1; e < arguments.length; e++) {
        var r = arguments[e];
        for (var n in r)
          Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
      }
      return t;
    }, g.apply(this, arguments);
  }
  function L(t, e) {
    if (!(t instanceof e))
      throw new TypeError("Cannot call a class as a function");
  }
  function D(t, e) {
    for (var r = 0; r < e.length; r++) {
      var n = e[r];
      n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, R(n.key), n);
    }
  }
  function K(t, e, r) {
    return e && D(t.prototype, e), Object.defineProperty(t, "prototype", { writable: !1 }), t;
  }
  function W(t, e) {
    if (typeof e != "function" && e !== null)
      throw new TypeError("Super expression must either be null or a function");
    t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _(t, e);
  }
  function _(t, e) {
    return _ = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, l) {
      return n.__proto__ = l, n;
    }, _(t, e);
  }
  function A(t) {
    var e = I();
    return function() {
      var n = S(t), l;
      if (e) {
        var a = S(this).constructor;
        l = Reflect.construct(n, arguments, a);
      } else
        l = n.apply(this, arguments);
      return B(this, l);
    };
  }
  function B(t, e) {
    if (e && (y(e) === "object" || typeof e == "function"))
      return e;
    if (e !== void 0)
      throw new TypeError("Derived constructors may only return object or undefined");
    return k(t);
  }
  function k(t) {
    if (t === void 0)
      throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
    return t;
  }
  function I() {
    try {
      var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
      }));
    } catch {
    }
    return (I = function() {
      return !!t;
    })();
  }
  function S(t) {
    return S = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(r) {
      return r.__proto__ || Object.getPrototypeOf(r);
    }, S(t);
  }
  function M(t, e) {
    var r = Object.keys(t);
    if (Object.getOwnPropertySymbols) {
      var n = Object.getOwnPropertySymbols(t);
      e && (n = n.filter(function(l) {
        return Object.getOwnPropertyDescriptor(t, l).enumerable;
      })), r.push.apply(r, n);
    }
    return r;
  }
  function u(t) {
    for (var e = 1; e < arguments.length; e++) {
      var r = arguments[e] != null ? arguments[e] : {};
      e % 2 ? M(Object(r), !0).forEach(function(n) {
        C(t, n, r[n]);
      }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(r)) : M(Object(r)).forEach(function(n) {
        Object.defineProperty(t, n, Object.getOwnPropertyDescriptor(r, n));
      });
    }
    return t;
  }
  function C(t, e, r) {
    return e = R(e), e in t ? Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = r, t;
  }
  function R(t) {
    var e = U(t, "string");
    return y(e) == "symbol" ? e : String(e);
  }
  function U(t, e) {
    if (y(t) != "object" || !t) return t;
    var r = t[Symbol.toPrimitive];
    if (r !== void 0) {
      var n = r.call(t, e);
      if (y(n) != "object") return n;
      throw new TypeError("@@toPrimitive must return a primitive value.");
    }
    return (e === "string" ? String : Number)(t);
  }
  var P = function(e) {
    var r, n, l, a, o;
    e.rtl ? o = e.slideCount - 1 - e.index : o = e.index, l = o < 0 || o >= e.slideCount, e.centerMode ? (a = Math.floor(e.slidesToShow / 2), n = (o - e.currentSlide) % e.slideCount === 0, o > e.currentSlide - a - 1 && o <= e.currentSlide + a && (r = !0)) : r = e.currentSlide <= o && o < e.currentSlide + e.slidesToShow;
    var f;
    e.targetSlide < 0 ? f = e.targetSlide + e.slideCount : e.targetSlide >= e.slideCount ? f = e.targetSlide - e.slideCount : f = e.targetSlide;
    var v = o === f;
    return {
      "slick-slide": !0,
      "slick-active": r,
      "slick-center": n,
      "slick-cloned": l,
      "slick-current": v
      // dubious in case of RTL
    };
  }, H = function(e) {
    var r = {};
    return (e.variableWidth === void 0 || e.variableWidth === !1) && (r.width = e.slideWidth), e.fade && (r.position = "relative", e.vertical ? r.top = -e.index * parseInt(e.slideHeight) : r.left = -e.index * parseInt(e.slideWidth), r.opacity = e.currentSlide === e.index ? 1 : 0, r.zIndex = e.currentSlide === e.index ? 999 : 998, e.useCSS && (r.transition = "opacity " + e.speed + "ms " + e.cssEase + ", visibility " + e.speed + "ms " + e.cssEase)), r;
  }, w = function(e, r) {
    return e.key || r;
  }, $ = function(e) {
    var r, n = [], l = [], a = [], o = s.default.Children.count(e.children), f = (0, O.lazyStartIndex)(e), v = (0, O.lazyEndIndex)(e);
    return s.default.Children.forEach(e.children, function(p, c) {
      var i, j = {
        message: "children",
        index: c,
        slidesToScroll: e.slidesToScroll,
        currentSlide: e.currentSlide
      };
      !e.lazyLoad || e.lazyLoad && e.lazyLoadedList.indexOf(c) >= 0 ? i = p : i = /* @__PURE__ */ s.default.createElement("div", null);
      var x = H(u(u({}, e), {}, {
        index: c
      })), E = i.props.className || "", d = P(u(u({}, e), {}, {
        index: c
      }));
      if (n.push(/* @__PURE__ */ s.default.cloneElement(i, {
        key: "original" + w(i, c),
        "data-index": c,
        className: (0, m.default)(d, E),
        tabIndex: "-1",
        "aria-hidden": !d["slick-active"],
        style: u(u({
          outline: "none"
        }, i.props.style || {}), x),
        onClick: function(h) {
          i.props && i.props.onClick && i.props.onClick(h), e.focusOnSelect && e.focusOnSelect(j);
        }
      })), e.infinite && e.fade === !1) {
        var q = o - c;
        q <= (0, O.getPreClones)(e) && (r = -q, r >= f && (i = p), d = P(u(u({}, e), {}, {
          index: r
        })), l.push(/* @__PURE__ */ s.default.cloneElement(i, {
          key: "precloned" + w(i, r),
          "data-index": r,
          tabIndex: "-1",
          className: (0, m.default)(d, E),
          "aria-hidden": !d["slick-active"],
          style: u(u({}, i.props.style || {}), x),
          onClick: function(h) {
            i.props && i.props.onClick && i.props.onClick(h), e.focusOnSelect && e.focusOnSelect(j);
          }
        }))), r = o + c, r < v && (i = p), d = P(u(u({}, e), {}, {
          index: r
        })), a.push(/* @__PURE__ */ s.default.cloneElement(i, {
          key: "postcloned" + w(i, r),
          "data-index": r,
          tabIndex: "-1",
          className: (0, m.default)(d, E),
          "aria-hidden": !d["slick-active"],
          style: u(u({}, i.props.style || {}), x),
          onClick: function(h) {
            i.props && i.props.onClick && i.props.onClick(h), e.focusOnSelect && e.focusOnSelect(j);
          }
        }));
      }
    }), e.rtl ? l.concat(n, a).reverse() : l.concat(n, a);
  };
  return b.Track = /* @__PURE__ */ function(t) {
    W(r, t);
    var e = A(r);
    function r() {
      var n;
      L(this, r);
      for (var l = arguments.length, a = new Array(l), o = 0; o < l; o++)
        a[o] = arguments[o];
      return n = e.call.apply(e, [this].concat(a)), C(k(n), "node", null), C(k(n), "handleRef", function(f) {
        n.node = f;
      }), n;
    }
    return K(r, [{
      key: "render",
      value: function() {
        var l = $(this.props), a = this.props, o = a.onMouseEnter, f = a.onMouseOver, v = a.onMouseLeave, p = {
          onMouseEnter: o,
          onMouseOver: f,
          onMouseLeave: v
        };
        return /* @__PURE__ */ s.default.createElement("div", g({
          ref: this.handleRef,
          className: "slick-track",
          style: this.props.trackStyle
        }, p), l);
      }
    }]), r;
  }(s.default.PureComponent), b;
}
export {
  Z as __require
};
//# sourceMappingURL=track.js.map
