(function($$1, prestashop$1) {
  "use strict";
  var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
  function getDefaultExportFromCjs(x) {
    return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
  }
  (function(module) {
    (function(factory) {
      {
        factory($$1, window, document);
      }
    })(function($2, window2, document2, undefined$1) {
      var modals = [], getCurrent = function() {
        return modals.length ? modals[modals.length - 1] : null;
      }, selectCurrent = function() {
        var i, selected = false;
        for (i = modals.length - 1; i >= 0; i--) {
          if (modals[i].$blocker) {
            modals[i].$blocker.toggleClass("current", !selected).toggleClass("behind", selected);
            selected = true;
          }
        }
      };
      $2.modal = function(el, options) {
        var remove, target;
        this.$body = $2("body");
        this.options = $2.extend({}, $2.modal.defaults, options);
        this.options.doFade = !isNaN(parseInt(this.options.fadeDuration, 10));
        this.$blocker = null;
        if (this.options.closeExisting)
          while ($2.modal.isActive())
            $2.modal.close();
        modals.push(this);
        if (el.is("a")) {
          target = el.attr("href");
          this.anchor = el;
          if (/^#/.test(target)) {
            this.$elm = $2(target);
            if (this.$elm.length !== 1)
              return null;
            this.$body.append(this.$elm);
            this.open();
          } else {
            this.$elm = $2("<div>");
            this.$body.append(this.$elm);
            remove = function(event, modal) {
              modal.elm.remove();
            };
            this.showSpinner();
            el.trigger($2.modal.AJAX_SEND);
            $2.get(target).done(function(html) {
              if (!$2.modal.isActive())
                return;
              el.trigger($2.modal.AJAX_SUCCESS);
              var current = getCurrent();
              current.$elm.empty().append(html).on($2.modal.CLOSE, remove);
              current.hideSpinner();
              current.open();
              el.trigger($2.modal.AJAX_COMPLETE);
            }).fail(function() {
              el.trigger($2.modal.AJAX_FAIL);
              var current = getCurrent();
              current.hideSpinner();
              modals.pop();
              el.trigger($2.modal.AJAX_COMPLETE);
            });
          }
        } else {
          this.$elm = el;
          this.anchor = el;
          this.$body.append(this.$elm);
          this.open();
        }
      };
      $2.modal.prototype = {
        constructor: $2.modal,
        open: function() {
          var m = this;
          this.block();
          this.anchor.blur();
          if (this.options.doFade) {
            setTimeout(function() {
              m.show();
            }, this.options.fadeDuration * this.options.fadeDelay);
          } else {
            this.show();
          }
          $2(document2).off("keydown.modal").on("keydown.modal", function(event) {
            var current = getCurrent();
            if (event.which === 27 && current.options.escapeClose)
              current.close();
          });
          if (this.options.clickClose)
            this.$blocker.click(function(e) {
              if (e.target === this)
                $2.modal.close();
            });
        },
        close: function() {
          modals.pop();
          this.unblock();
          this.hide();
          if (!$2.modal.isActive())
            $2(document2).off("keydown.modal");
        },
        block: function() {
          this.$elm.trigger($2.modal.BEFORE_BLOCK, [this._ctx()]);
          this.$body.css("overflow", "hidden");
          this.$blocker = $2('<div class="' + this.options.blockerClass + ' blocker current"></div>').appendTo(this.$body);
          selectCurrent();
          if (this.options.doFade) {
            this.$blocker.css("opacity", 0).animate({ opacity: 1 }, this.options.fadeDuration);
          }
          this.$elm.trigger($2.modal.BLOCK, [this._ctx()]);
        },
        unblock: function(now) {
          if (!now && this.options.doFade)
            this.$blocker.fadeOut(this.options.fadeDuration, this.unblock.bind(this, true));
          else {
            this.$blocker.children().appendTo(this.$body);
            this.$blocker.remove();
            this.$blocker = null;
            selectCurrent();
            if (!$2.modal.isActive())
              this.$body.css("overflow", "");
          }
        },
        show: function() {
          this.$elm.trigger($2.modal.BEFORE_OPEN, [this._ctx()]);
          if (this.options.showClose) {
            this.closeButton = $2('<a href="#close-modal" rel="modal:close" class="close-modal ' + this.options.closeClass + '">' + this.options.closeText + "</a>");
            this.$elm.append(this.closeButton);
          }
          this.$elm.addClass(this.options.modalClass).appendTo(this.$blocker);
          if (this.options.doFade) {
            this.$elm.css({ opacity: 0, display: "inline-block" }).animate({ opacity: 1 }, this.options.fadeDuration);
          } else {
            this.$elm.css("display", "inline-block");
          }
          this.$elm.trigger($2.modal.OPEN, [this._ctx()]);
        },
        hide: function() {
          this.$elm.trigger($2.modal.BEFORE_CLOSE, [this._ctx()]);
          if (this.closeButton)
            this.closeButton.remove();
          var _this = this;
          if (this.options.doFade) {
            this.$elm.fadeOut(this.options.fadeDuration, function() {
              _this.$elm.trigger($2.modal.AFTER_CLOSE, [_this._ctx()]);
            });
          } else {
            this.$elm.hide(0, function() {
              _this.$elm.trigger($2.modal.AFTER_CLOSE, [_this._ctx()]);
            });
          }
          this.$elm.trigger($2.modal.CLOSE, [this._ctx()]);
        },
        showSpinner: function() {
          if (!this.options.showSpinner)
            return;
          this.spinner = this.spinner || $2('<div class="' + this.options.modalClass + '-spinner"></div>').append(this.options.spinnerHtml);
          this.$body.append(this.spinner);
          this.spinner.show();
        },
        hideSpinner: function() {
          if (this.spinner)
            this.spinner.remove();
        },
        //Return context for custom events
        _ctx: function() {
          return { elm: this.$elm, $elm: this.$elm, $blocker: this.$blocker, options: this.options, $anchor: this.anchor };
        }
      };
      $2.modal.close = function(event) {
        if (!$2.modal.isActive())
          return;
        if (event)
          event.preventDefault();
        var current = getCurrent();
        current.close();
        return current.$elm;
      };
      $2.modal.isActive = function() {
        return modals.length > 0;
      };
      $2.modal.getCurrent = getCurrent;
      $2.modal.defaults = {
        closeExisting: true,
        escapeClose: true,
        clickClose: true,
        closeText: "Close",
        closeClass: "",
        modalClass: "modal",
        blockerClass: "jquery-modal",
        spinnerHtml: '<div class="rect1"></div><div class="rect2"></div><div class="rect3"></div><div class="rect4"></div>',
        showSpinner: true,
        showClose: true,
        fadeDuration: null,
        // Number of milliseconds the fade animation takes.
        fadeDelay: 1
        // Point during the overlay's fade-in that the modal begins to fade in (.5 = 50%, 1.5 = 150%, etc.)
      };
      $2.modal.BEFORE_BLOCK = "modal:before-block";
      $2.modal.BLOCK = "modal:block";
      $2.modal.BEFORE_OPEN = "modal:before-open";
      $2.modal.OPEN = "modal:open";
      $2.modal.BEFORE_CLOSE = "modal:before-close";
      $2.modal.CLOSE = "modal:close";
      $2.modal.AFTER_CLOSE = "modal:after-close";
      $2.modal.AJAX_SEND = "modal:ajax:send";
      $2.modal.AJAX_SUCCESS = "modal:ajax:success";
      $2.modal.AJAX_FAIL = "modal:ajax:fail";
      $2.modal.AJAX_COMPLETE = "modal:ajax:complete";
      $2.fn.modal = function(options) {
        if (this.length === 1) {
          new $2.modal(this, options);
        }
        return this;
      };
      $2(document2).on("click.modal", 'a[rel~="modal:close"]', $2.modal.close);
      $2(document2).on("click.modal", 'a[rel~="modal:open"]', function(event) {
        event.preventDefault();
        $2(this).modal();
      });
    });
  })();
  const jquery_offcanvas_min$1 = "";
  var tooltipster_bundle_min$1 = { exports: {} };
  /*! tooltipster v4.2.8 */
  (function(module, exports) {
    !function(a, b) {
      module.exports = b($$1);
    }(commonjsGlobal, function(a) {
      function b(a2) {
        this.$container, this.constraints = null, this.__$tooltip, this.__init(a2);
      }
      function c(b2, c2) {
        var d2 = true;
        return a.each(b2, function(a2, e2) {
          return void 0 === c2[a2] || b2[a2] !== c2[a2] ? (d2 = false, false) : void 0;
        }), d2;
      }
      function d(b2) {
        var c2 = b2.attr("id"), d2 = c2 ? h.window.document.getElementById(c2) : null;
        return d2 ? d2 === b2[0] : a.contains(h.window.document.body, b2[0]);
      }
      function e() {
        if (!g)
          return false;
        var a2 = g.document.body || g.document.documentElement, b2 = a2.style, c2 = "transition", d2 = ["Moz", "Webkit", "Khtml", "O", "ms"];
        if ("string" == typeof b2[c2])
          return true;
        c2 = c2.charAt(0).toUpperCase() + c2.substr(1);
        for (var e2 = 0; e2 < d2.length; e2++)
          if ("string" == typeof b2[d2[e2] + c2])
            return true;
        return false;
      }
      var f = { animation: "fade", animationDuration: 350, content: null, contentAsHTML: false, contentCloning: false, debug: true, delay: 300, delayTouch: [300, 500], functionInit: null, functionBefore: null, functionReady: null, functionAfter: null, functionFormat: null, IEmin: 6, interactive: false, multiple: false, parent: null, plugins: ["sideTip"], repositionOnScroll: false, restoration: "none", selfDestruction: true, theme: [], timer: 0, trackerInterval: 500, trackOrigin: false, trackTooltip: false, trigger: "hover", triggerClose: { click: false, mouseleave: false, originClick: false, scroll: false, tap: false, touchleave: false }, triggerOpen: { click: false, mouseenter: false, tap: false, touchstart: false }, updateAnimation: "rotate", zIndex: 9999999 }, g = "undefined" != typeof window ? window : null, h = { hasTouchCapability: !(!g || !("ontouchstart" in g || g.DocumentTouch && g.document instanceof g.DocumentTouch || g.navigator.maxTouchPoints)), hasTransitions: e(), IE: false, semVer: "4.2.8", window: g }, i = function() {
        this.__$emitterPrivate = a({}), this.__$emitterPublic = a({}), this.__instancesLatestArr = [], this.__plugins = {}, this._env = h;
      };
      i.prototype = { __bridge: function(b2, c2, d2) {
        if (!c2[d2]) {
          var e2 = function() {
          };
          e2.prototype = b2;
          var g2 = new e2();
          g2.__init && g2.__init(c2), a.each(b2, function(a2, b3) {
            0 != a2.indexOf("__") && (c2[a2] ? f.debug && console.log("The " + a2 + " method of the " + d2 + " plugin conflicts with another plugin or native methods") : (c2[a2] = function() {
              return g2[a2].apply(g2, Array.prototype.slice.apply(arguments));
            }, c2[a2].bridged = g2));
          }), c2[d2] = g2;
        }
        return this;
      }, __setWindow: function(a2) {
        return h.window = a2, this;
      }, _getRuler: function(a2) {
        return new b(a2);
      }, _off: function() {
        return this.__$emitterPrivate.off.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments)), this;
      }, _on: function() {
        return this.__$emitterPrivate.on.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments)), this;
      }, _one: function() {
        return this.__$emitterPrivate.one.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments)), this;
      }, _plugin: function(b2) {
        var c2 = this;
        if ("string" == typeof b2) {
          var d2 = b2, e2 = null;
          return d2.indexOf(".") > 0 ? e2 = c2.__plugins[d2] : a.each(c2.__plugins, function(a2, b3) {
            return b3.name.substring(b3.name.length - d2.length - 1) == "." + d2 ? (e2 = b3, false) : void 0;
          }), e2;
        }
        if (b2.name.indexOf(".") < 0)
          throw new Error("Plugins must be namespaced");
        return c2.__plugins[b2.name] = b2, b2.core && c2.__bridge(b2.core, c2, b2.name), this;
      }, _trigger: function() {
        var a2 = Array.prototype.slice.apply(arguments);
        return "string" == typeof a2[0] && (a2[0] = { type: a2[0] }), this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate, a2), this.__$emitterPublic.trigger.apply(this.__$emitterPublic, a2), this;
      }, instances: function(b2) {
        var c2 = [], d2 = b2 || ".tooltipstered";
        return a(d2).each(function() {
          var b3 = a(this), d3 = b3.data("tooltipster-ns");
          d3 && a.each(d3, function(a2, d4) {
            c2.push(b3.data(d4));
          });
        }), c2;
      }, instancesLatest: function() {
        return this.__instancesLatestArr;
      }, off: function() {
        return this.__$emitterPublic.off.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      }, on: function() {
        return this.__$emitterPublic.on.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      }, one: function() {
        return this.__$emitterPublic.one.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      }, origins: function(b2) {
        var c2 = b2 ? b2 + " " : "";
        return a(c2 + ".tooltipstered").toArray();
      }, setDefaults: function(b2) {
        return a.extend(f, b2), this;
      }, triggerHandler: function() {
        return this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      } }, a.tooltipster = new i(), a.Tooltipster = function(b2, c2) {
        this.__callbacks = { close: [], open: [] }, this.__closingTime, this.__Content, this.__contentBcr, this.__destroyed = false, this.__$emitterPrivate = a({}), this.__$emitterPublic = a({}), this.__enabled = true, this.__garbageCollector, this.__Geometry, this.__lastPosition, this.__namespace = "tooltipster-" + Math.round(1e6 * Math.random()), this.__options, this.__$originParents, this.__pointerIsOverOrigin = false, this.__previousThemes = [], this.__state = "closed", this.__timeouts = { close: [], open: null }, this.__touchEvents = [], this.__tracker = null, this._$origin, this._$tooltip, this.__init(b2, c2);
      }, a.Tooltipster.prototype = { __init: function(b2, c2) {
        var d2 = this;
        if (d2._$origin = a(b2), d2.__options = a.extend(true, {}, f, c2), d2.__optionsFormat(), !h.IE || h.IE >= d2.__options.IEmin) {
          var e2 = null;
          if (void 0 === d2._$origin.data("tooltipster-initialTitle") && (e2 = d2._$origin.attr("title"), void 0 === e2 && (e2 = null), d2._$origin.data("tooltipster-initialTitle", e2)), null !== d2.__options.content)
            d2.__contentSet(d2.__options.content);
          else {
            var g2, i2 = d2._$origin.attr("data-tooltip-content");
            i2 && (g2 = a(i2)), g2 && g2[0] ? d2.__contentSet(g2.first()) : d2.__contentSet(e2);
          }
          d2._$origin.removeAttr("title").addClass("tooltipstered"), d2.__prepareOrigin(), d2.__prepareGC(), a.each(d2.__options.plugins, function(a2, b3) {
            d2._plug(b3);
          }), h.hasTouchCapability && a(h.window.document.body).on("touchmove." + d2.__namespace + "-triggerOpen", function(a2) {
            d2._touchRecordEvent(a2);
          }), d2._on("created", function() {
            d2.__prepareTooltip();
          })._on("repositioned", function(a2) {
            d2.__lastPosition = a2.position;
          });
        } else
          d2.__options.disabled = true;
      }, __contentInsert: function() {
        var a2 = this, b2 = a2._$tooltip.find(".tooltipster-content"), c2 = a2.__Content, d2 = function(a3) {
          c2 = a3;
        };
        return a2._trigger({ type: "format", content: a2.__Content, format: d2 }), a2.__options.functionFormat && (c2 = a2.__options.functionFormat.call(a2, a2, { origin: a2._$origin[0] }, a2.__Content)), "string" != typeof c2 || a2.__options.contentAsHTML ? b2.empty().append(c2) : b2.text(c2), a2;
      }, __contentSet: function(b2) {
        return b2 instanceof a && this.__options.contentCloning && (b2 = b2.clone(true)), this.__Content = b2, this._trigger({ type: "updated", content: b2 }), this;
      }, __destroyError: function() {
        throw new Error("This tooltip has been destroyed and cannot execute your method call.");
      }, __geometry: function() {
        var b2 = this, c2 = b2._$origin, d2 = b2._$origin.is("area");
        if (d2) {
          var e2 = b2._$origin.parent().attr("name");
          c2 = a('img[usemap="#' + e2 + '"]');
        }
        var f2 = c2[0].getBoundingClientRect(), g2 = a(h.window.document), i2 = a(h.window), j2 = c2, k2 = { available: { document: null, window: null }, document: { size: { height: g2.height(), width: g2.width() } }, window: { scroll: { left: h.window.scrollX || h.window.document.documentElement.scrollLeft, top: h.window.scrollY || h.window.document.documentElement.scrollTop }, size: { height: i2.height(), width: i2.width() } }, origin: { fixedLineage: false, offset: {}, size: { height: f2.bottom - f2.top, width: f2.right - f2.left }, usemapImage: d2 ? c2[0] : null, windowOffset: { bottom: f2.bottom, left: f2.left, right: f2.right, top: f2.top } } };
        if (d2) {
          var l = b2._$origin.attr("shape"), m = b2._$origin.attr("coords");
          if (m && (m = m.split(","), a.map(m, function(a2, b3) {
            m[b3] = parseInt(a2);
          })), "default" != l)
            switch (l) {
              case "circle":
                var n = m[0], o = m[1], p = m[2], q = o - p, r = n - p;
                k2.origin.size.height = 2 * p, k2.origin.size.width = k2.origin.size.height, k2.origin.windowOffset.left += r, k2.origin.windowOffset.top += q;
                break;
              case "rect":
                var s = m[0], t = m[1], u = m[2], v = m[3];
                k2.origin.size.height = v - t, k2.origin.size.width = u - s, k2.origin.windowOffset.left += s, k2.origin.windowOffset.top += t;
                break;
              case "poly":
                for (var w = 0, x = 0, y = 0, z = 0, A = "even", B = 0; B < m.length; B++) {
                  var C = m[B];
                  "even" == A ? (C > y && (y = C, 0 === B && (w = y)), w > C && (w = C), A = "odd") : (C > z && (z = C, 1 == B && (x = z)), x > C && (x = C), A = "even");
                }
                k2.origin.size.height = z - x, k2.origin.size.width = y - w, k2.origin.windowOffset.left += w, k2.origin.windowOffset.top += x;
            }
        }
        var D = function(a2) {
          k2.origin.size.height = a2.height, k2.origin.windowOffset.left = a2.left, k2.origin.windowOffset.top = a2.top, k2.origin.size.width = a2.width;
        };
        for (b2._trigger({ type: "geometry", edit: D, geometry: { height: k2.origin.size.height, left: k2.origin.windowOffset.left, top: k2.origin.windowOffset.top, width: k2.origin.size.width } }), k2.origin.windowOffset.right = k2.origin.windowOffset.left + k2.origin.size.width, k2.origin.windowOffset.bottom = k2.origin.windowOffset.top + k2.origin.size.height, k2.origin.offset.left = k2.origin.windowOffset.left + k2.window.scroll.left, k2.origin.offset.top = k2.origin.windowOffset.top + k2.window.scroll.top, k2.origin.offset.bottom = k2.origin.offset.top + k2.origin.size.height, k2.origin.offset.right = k2.origin.offset.left + k2.origin.size.width, k2.available.document = { bottom: { height: k2.document.size.height - k2.origin.offset.bottom, width: k2.document.size.width }, left: { height: k2.document.size.height, width: k2.origin.offset.left }, right: { height: k2.document.size.height, width: k2.document.size.width - k2.origin.offset.right }, top: { height: k2.origin.offset.top, width: k2.document.size.width } }, k2.available.window = { bottom: { height: Math.max(k2.window.size.height - Math.max(k2.origin.windowOffset.bottom, 0), 0), width: k2.window.size.width }, left: { height: k2.window.size.height, width: Math.max(k2.origin.windowOffset.left, 0) }, right: { height: k2.window.size.height, width: Math.max(k2.window.size.width - Math.max(k2.origin.windowOffset.right, 0), 0) }, top: { height: Math.max(k2.origin.windowOffset.top, 0), width: k2.window.size.width } }; "html" != j2[0].tagName.toLowerCase(); ) {
          if ("fixed" == j2.css("position")) {
            k2.origin.fixedLineage = true;
            break;
          }
          j2 = j2.parent();
        }
        return k2;
      }, __optionsFormat: function() {
        return "number" == typeof this.__options.animationDuration && (this.__options.animationDuration = [this.__options.animationDuration, this.__options.animationDuration]), "number" == typeof this.__options.delay && (this.__options.delay = [this.__options.delay, this.__options.delay]), "number" == typeof this.__options.delayTouch && (this.__options.delayTouch = [this.__options.delayTouch, this.__options.delayTouch]), "string" == typeof this.__options.theme && (this.__options.theme = [this.__options.theme]), null === this.__options.parent ? this.__options.parent = a(h.window.document.body) : "string" == typeof this.__options.parent && (this.__options.parent = a(this.__options.parent)), "hover" == this.__options.trigger ? (this.__options.triggerOpen = { mouseenter: true, touchstart: true }, this.__options.triggerClose = { mouseleave: true, originClick: true, touchleave: true }) : "click" == this.__options.trigger && (this.__options.triggerOpen = { click: true, tap: true }, this.__options.triggerClose = { click: true, tap: true }), this._trigger("options"), this;
      }, __prepareGC: function() {
        var b2 = this;
        return b2.__options.selfDestruction ? b2.__garbageCollector = setInterval(function() {
          var c2 = (/* @__PURE__ */ new Date()).getTime();
          b2.__touchEvents = a.grep(b2.__touchEvents, function(a2, b3) {
            return c2 - a2.time > 6e4;
          }), d(b2._$origin) || b2.close(function() {
            b2.destroy();
          });
        }, 2e4) : clearInterval(b2.__garbageCollector), b2;
      }, __prepareOrigin: function() {
        var a2 = this;
        if (a2._$origin.off("." + a2.__namespace + "-triggerOpen"), h.hasTouchCapability && a2._$origin.on("touchstart." + a2.__namespace + "-triggerOpen touchend." + a2.__namespace + "-triggerOpen touchcancel." + a2.__namespace + "-triggerOpen", function(b3) {
          a2._touchRecordEvent(b3);
        }), a2.__options.triggerOpen.click || a2.__options.triggerOpen.tap && h.hasTouchCapability) {
          var b2 = "";
          a2.__options.triggerOpen.click && (b2 += "click." + a2.__namespace + "-triggerOpen "), a2.__options.triggerOpen.tap && h.hasTouchCapability && (b2 += "touchend." + a2.__namespace + "-triggerOpen"), a2._$origin.on(b2, function(b3) {
            a2._touchIsMeaningfulEvent(b3) && a2._open(b3);
          });
        }
        if (a2.__options.triggerOpen.mouseenter || a2.__options.triggerOpen.touchstart && h.hasTouchCapability) {
          var b2 = "";
          a2.__options.triggerOpen.mouseenter && (b2 += "mouseenter." + a2.__namespace + "-triggerOpen "), a2.__options.triggerOpen.touchstart && h.hasTouchCapability && (b2 += "touchstart." + a2.__namespace + "-triggerOpen"), a2._$origin.on(b2, function(b3) {
            !a2._touchIsTouchEvent(b3) && a2._touchIsEmulatedEvent(b3) || (a2.__pointerIsOverOrigin = true, a2._openShortly(b3));
          });
        }
        if (a2.__options.triggerClose.mouseleave || a2.__options.triggerClose.touchleave && h.hasTouchCapability) {
          var b2 = "";
          a2.__options.triggerClose.mouseleave && (b2 += "mouseleave." + a2.__namespace + "-triggerOpen "), a2.__options.triggerClose.touchleave && h.hasTouchCapability && (b2 += "touchend." + a2.__namespace + "-triggerOpen touchcancel." + a2.__namespace + "-triggerOpen"), a2._$origin.on(b2, function(b3) {
            a2._touchIsMeaningfulEvent(b3) && (a2.__pointerIsOverOrigin = false);
          });
        }
        return a2;
      }, __prepareTooltip: function() {
        var b2 = this, c2 = b2.__options.interactive ? "auto" : "";
        return b2._$tooltip.attr("id", b2.__namespace).css({ "pointer-events": c2, zIndex: b2.__options.zIndex }), a.each(b2.__previousThemes, function(a2, c3) {
          b2._$tooltip.removeClass(c3);
        }), a.each(b2.__options.theme, function(a2, c3) {
          b2._$tooltip.addClass(c3);
        }), b2.__previousThemes = a.merge([], b2.__options.theme), b2;
      }, __scrollHandler: function(b2) {
        var c2 = this;
        if (c2.__options.triggerClose.scroll)
          c2._close(b2);
        else if (d(c2._$origin) && d(c2._$tooltip)) {
          var e2 = null;
          if (b2.target === h.window.document)
            c2.__Geometry.origin.fixedLineage || c2.__options.repositionOnScroll && c2.reposition(b2);
          else {
            e2 = c2.__geometry();
            var f2 = false;
            if ("fixed" != c2._$origin.css("position") && c2.__$originParents.each(function(b3, c3) {
              var d2 = a(c3), g3 = d2.css("overflow-x"), h2 = d2.css("overflow-y");
              if ("visible" != g3 || "visible" != h2) {
                var i3 = c3.getBoundingClientRect();
                if ("visible" != g3 && (e2.origin.windowOffset.left < i3.left || e2.origin.windowOffset.right > i3.right))
                  return f2 = true, false;
                if ("visible" != h2 && (e2.origin.windowOffset.top < i3.top || e2.origin.windowOffset.bottom > i3.bottom))
                  return f2 = true, false;
              }
              return "fixed" == d2.css("position") ? false : void 0;
            }), f2)
              c2._$tooltip.css("visibility", "hidden");
            else if (c2._$tooltip.css("visibility", "visible"), c2.__options.repositionOnScroll)
              c2.reposition(b2);
            else {
              var g2 = e2.origin.offset.left - c2.__Geometry.origin.offset.left, i2 = e2.origin.offset.top - c2.__Geometry.origin.offset.top;
              c2._$tooltip.css({ left: c2.__lastPosition.coord.left + g2, top: c2.__lastPosition.coord.top + i2 });
            }
          }
          c2._trigger({ type: "scroll", event: b2, geo: e2 });
        }
        return c2;
      }, __stateSet: function(a2) {
        return this.__state = a2, this._trigger({ type: "state", state: a2 }), this;
      }, __timeoutsClear: function() {
        return clearTimeout(this.__timeouts.open), this.__timeouts.open = null, a.each(this.__timeouts.close, function(a2, b2) {
          clearTimeout(b2);
        }), this.__timeouts.close = [], this;
      }, __trackerStart: function() {
        var a2 = this, b2 = a2._$tooltip.find(".tooltipster-content");
        return a2.__options.trackTooltip && (a2.__contentBcr = b2[0].getBoundingClientRect()), a2.__tracker = setInterval(function() {
          if (d(a2._$origin) && d(a2._$tooltip)) {
            if (a2.__options.trackOrigin) {
              var e2 = a2.__geometry(), f2 = false;
              c(e2.origin.size, a2.__Geometry.origin.size) && (a2.__Geometry.origin.fixedLineage ? c(e2.origin.windowOffset, a2.__Geometry.origin.windowOffset) && (f2 = true) : c(e2.origin.offset, a2.__Geometry.origin.offset) && (f2 = true)), f2 || (a2.__options.triggerClose.mouseleave ? a2._close() : a2.reposition());
            }
            if (a2.__options.trackTooltip) {
              var g2 = b2[0].getBoundingClientRect();
              g2.height === a2.__contentBcr.height && g2.width === a2.__contentBcr.width || (a2.reposition(), a2.__contentBcr = g2);
            }
          } else
            a2._close();
        }, a2.__options.trackerInterval), a2;
      }, _close: function(b2, c2, d2) {
        var e2 = this, f2 = true;
        if (e2._trigger({ type: "close", event: b2, stop: function() {
          f2 = false;
        } }), f2 || d2) {
          c2 && e2.__callbacks.close.push(c2), e2.__callbacks.open = [], e2.__timeoutsClear();
          var g2 = function() {
            a.each(e2.__callbacks.close, function(a2, c3) {
              c3.call(e2, e2, { event: b2, origin: e2._$origin[0] });
            }), e2.__callbacks.close = [];
          };
          if ("closed" != e2.__state) {
            var i2 = true, j2 = /* @__PURE__ */ new Date(), k2 = j2.getTime(), l = k2 + e2.__options.animationDuration[1];
            if ("disappearing" == e2.__state && l > e2.__closingTime && e2.__options.animationDuration[1] > 0 && (i2 = false), i2) {
              e2.__closingTime = l, "disappearing" != e2.__state && e2.__stateSet("disappearing");
              var m = function() {
                clearInterval(e2.__tracker), e2._trigger({ type: "closing", event: b2 }), e2._$tooltip.off("." + e2.__namespace + "-triggerClose").removeClass("tooltipster-dying"), a(h.window).off("." + e2.__namespace + "-triggerClose"), e2.__$originParents.each(function(b3, c3) {
                  a(c3).off("scroll." + e2.__namespace + "-triggerClose");
                }), e2.__$originParents = null, a(h.window.document.body).off("." + e2.__namespace + "-triggerClose"), e2._$origin.off("." + e2.__namespace + "-triggerClose"), e2._off("dismissable"), e2.__stateSet("closed"), e2._trigger({ type: "after", event: b2 }), e2.__options.functionAfter && e2.__options.functionAfter.call(e2, e2, { event: b2, origin: e2._$origin[0] }), g2();
              };
              h.hasTransitions ? (e2._$tooltip.css({ "-moz-animation-duration": e2.__options.animationDuration[1] + "ms", "-ms-animation-duration": e2.__options.animationDuration[1] + "ms", "-o-animation-duration": e2.__options.animationDuration[1] + "ms", "-webkit-animation-duration": e2.__options.animationDuration[1] + "ms", "animation-duration": e2.__options.animationDuration[1] + "ms", "transition-duration": e2.__options.animationDuration[1] + "ms" }), e2._$tooltip.clearQueue().removeClass("tooltipster-show").addClass("tooltipster-dying"), e2.__options.animationDuration[1] > 0 && e2._$tooltip.delay(e2.__options.animationDuration[1]), e2._$tooltip.queue(m)) : e2._$tooltip.stop().fadeOut(e2.__options.animationDuration[1], m);
            }
          } else
            g2();
        }
        return e2;
      }, _off: function() {
        return this.__$emitterPrivate.off.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments)), this;
      }, _on: function() {
        return this.__$emitterPrivate.on.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments)), this;
      }, _one: function() {
        return this.__$emitterPrivate.one.apply(this.__$emitterPrivate, Array.prototype.slice.apply(arguments)), this;
      }, _open: function(b2, c2) {
        var e2 = this;
        if (!e2.__destroying && d(e2._$origin) && e2.__enabled) {
          var f2 = true;
          if ("closed" == e2.__state && (e2._trigger({ type: "before", event: b2, stop: function() {
            f2 = false;
          } }), f2 && e2.__options.functionBefore && (f2 = e2.__options.functionBefore.call(e2, e2, { event: b2, origin: e2._$origin[0] }))), f2 !== false && null !== e2.__Content) {
            c2 && e2.__callbacks.open.push(c2), e2.__callbacks.close = [], e2.__timeoutsClear();
            var g2, i2 = function() {
              "stable" != e2.__state && e2.__stateSet("stable"), a.each(e2.__callbacks.open, function(a2, b3) {
                b3.call(e2, e2, { origin: e2._$origin[0], tooltip: e2._$tooltip[0] });
              }), e2.__callbacks.open = [];
            };
            if ("closed" !== e2.__state)
              g2 = 0, "disappearing" === e2.__state ? (e2.__stateSet("appearing"), h.hasTransitions ? (e2._$tooltip.clearQueue().removeClass("tooltipster-dying").addClass("tooltipster-show"), e2.__options.animationDuration[0] > 0 && e2._$tooltip.delay(e2.__options.animationDuration[0]), e2._$tooltip.queue(i2)) : e2._$tooltip.stop().fadeIn(i2)) : "stable" == e2.__state && i2();
            else {
              if (e2.__stateSet("appearing"), g2 = e2.__options.animationDuration[0], e2.__contentInsert(), e2.reposition(b2, true), h.hasTransitions ? (e2._$tooltip.addClass("tooltipster-" + e2.__options.animation).addClass("tooltipster-initial").css({ "-moz-animation-duration": e2.__options.animationDuration[0] + "ms", "-ms-animation-duration": e2.__options.animationDuration[0] + "ms", "-o-animation-duration": e2.__options.animationDuration[0] + "ms", "-webkit-animation-duration": e2.__options.animationDuration[0] + "ms", "animation-duration": e2.__options.animationDuration[0] + "ms", "transition-duration": e2.__options.animationDuration[0] + "ms" }), setTimeout(function() {
                "closed" != e2.__state && (e2._$tooltip.addClass("tooltipster-show").removeClass("tooltipster-initial"), e2.__options.animationDuration[0] > 0 && e2._$tooltip.delay(e2.__options.animationDuration[0]), e2._$tooltip.queue(i2));
              }, 0)) : e2._$tooltip.css("display", "none").fadeIn(e2.__options.animationDuration[0], i2), e2.__trackerStart(), a(h.window).on("resize." + e2.__namespace + "-triggerClose", function(b3) {
                var c3 = a(document.activeElement);
                (c3.is("input") || c3.is("textarea")) && a.contains(e2._$tooltip[0], c3[0]) || e2.reposition(b3);
              }).on("scroll." + e2.__namespace + "-triggerClose", function(a2) {
                e2.__scrollHandler(a2);
              }), e2.__$originParents = e2._$origin.parents(), e2.__$originParents.each(function(b3, c3) {
                a(c3).on("scroll." + e2.__namespace + "-triggerClose", function(a2) {
                  e2.__scrollHandler(a2);
                });
              }), e2.__options.triggerClose.mouseleave || e2.__options.triggerClose.touchleave && h.hasTouchCapability) {
                e2._on("dismissable", function(a2) {
                  a2.dismissable ? a2.delay ? (m = setTimeout(function() {
                    e2._close(a2.event);
                  }, a2.delay), e2.__timeouts.close.push(m)) : e2._close(a2) : clearTimeout(m);
                });
                var j2 = e2._$origin, k2 = "", l = "", m = null;
                e2.__options.interactive && (j2 = j2.add(e2._$tooltip)), e2.__options.triggerClose.mouseleave && (k2 += "mouseenter." + e2.__namespace + "-triggerClose ", l += "mouseleave." + e2.__namespace + "-triggerClose "), e2.__options.triggerClose.touchleave && h.hasTouchCapability && (k2 += "touchstart." + e2.__namespace + "-triggerClose", l += "touchend." + e2.__namespace + "-triggerClose touchcancel." + e2.__namespace + "-triggerClose"), j2.on(l, function(a2) {
                  if (e2._touchIsTouchEvent(a2) || !e2._touchIsEmulatedEvent(a2)) {
                    var b3 = "mouseleave" == a2.type ? e2.__options.delay : e2.__options.delayTouch;
                    e2._trigger({ delay: b3[1], dismissable: true, event: a2, type: "dismissable" });
                  }
                }).on(k2, function(a2) {
                  !e2._touchIsTouchEvent(a2) && e2._touchIsEmulatedEvent(a2) || e2._trigger({ dismissable: false, event: a2, type: "dismissable" });
                });
              }
              e2.__options.triggerClose.originClick && e2._$origin.on("click." + e2.__namespace + "-triggerClose", function(a2) {
                e2._touchIsTouchEvent(a2) || e2._touchIsEmulatedEvent(a2) || e2._close(a2);
              }), (e2.__options.triggerClose.click || e2.__options.triggerClose.tap && h.hasTouchCapability) && setTimeout(function() {
                if ("closed" != e2.__state) {
                  var b3 = "", c3 = a(h.window.document.body);
                  e2.__options.triggerClose.click && (b3 += "click." + e2.__namespace + "-triggerClose "), e2.__options.triggerClose.tap && h.hasTouchCapability && (b3 += "touchend." + e2.__namespace + "-triggerClose"), c3.on(b3, function(b4) {
                    e2._touchIsMeaningfulEvent(b4) && (e2._touchRecordEvent(b4), e2.__options.interactive && a.contains(e2._$tooltip[0], b4.target) || e2._close(b4));
                  }), e2.__options.triggerClose.tap && h.hasTouchCapability && c3.on("touchstart." + e2.__namespace + "-triggerClose", function(a2) {
                    e2._touchRecordEvent(a2);
                  });
                }
              }, 0), e2._trigger("ready"), e2.__options.functionReady && e2.__options.functionReady.call(e2, e2, { origin: e2._$origin[0], tooltip: e2._$tooltip[0] });
            }
            if (e2.__options.timer > 0) {
              var m = setTimeout(function() {
                e2._close();
              }, e2.__options.timer + g2);
              e2.__timeouts.close.push(m);
            }
          }
        }
        return e2;
      }, _openShortly: function(a2) {
        var b2 = this, c2 = true;
        if ("stable" != b2.__state && "appearing" != b2.__state && !b2.__timeouts.open && (b2._trigger({ type: "start", event: a2, stop: function() {
          c2 = false;
        } }), c2)) {
          var d2 = 0 == a2.type.indexOf("touch") ? b2.__options.delayTouch : b2.__options.delay;
          d2[0] ? b2.__timeouts.open = setTimeout(function() {
            b2.__timeouts.open = null, b2.__pointerIsOverOrigin && b2._touchIsMeaningfulEvent(a2) ? (b2._trigger("startend"), b2._open(a2)) : b2._trigger("startcancel");
          }, d2[0]) : (b2._trigger("startend"), b2._open(a2));
        }
        return b2;
      }, _optionsExtract: function(b2, c2) {
        var d2 = this, e2 = a.extend(true, {}, c2), f2 = d2.__options[b2];
        return f2 || (f2 = {}, a.each(c2, function(a2, b3) {
          var c3 = d2.__options[a2];
          void 0 !== c3 && (f2[a2] = c3);
        })), a.each(e2, function(b3, c3) {
          void 0 !== f2[b3] && ("object" != typeof c3 || c3 instanceof Array || null == c3 || "object" != typeof f2[b3] || f2[b3] instanceof Array || null == f2[b3] ? e2[b3] = f2[b3] : a.extend(e2[b3], f2[b3]));
        }), e2;
      }, _plug: function(b2) {
        var c2 = a.tooltipster._plugin(b2);
        if (!c2)
          throw new Error('The "' + b2 + '" plugin is not defined');
        return c2.instance && a.tooltipster.__bridge(c2.instance, this, c2.name), this;
      }, _touchIsEmulatedEvent: function(a2) {
        for (var b2 = false, c2 = (/* @__PURE__ */ new Date()).getTime(), d2 = this.__touchEvents.length - 1; d2 >= 0; d2--) {
          var e2 = this.__touchEvents[d2];
          if (!(c2 - e2.time < 500))
            break;
          e2.target === a2.target && (b2 = true);
        }
        return b2;
      }, _touchIsMeaningfulEvent: function(a2) {
        return this._touchIsTouchEvent(a2) && !this._touchSwiped(a2.target) || !this._touchIsTouchEvent(a2) && !this._touchIsEmulatedEvent(a2);
      }, _touchIsTouchEvent: function(a2) {
        return 0 == a2.type.indexOf("touch");
      }, _touchRecordEvent: function(a2) {
        return this._touchIsTouchEvent(a2) && (a2.time = (/* @__PURE__ */ new Date()).getTime(), this.__touchEvents.push(a2)), this;
      }, _touchSwiped: function(a2) {
        for (var b2 = false, c2 = this.__touchEvents.length - 1; c2 >= 0; c2--) {
          var d2 = this.__touchEvents[c2];
          if ("touchmove" == d2.type) {
            b2 = true;
            break;
          }
          if ("touchstart" == d2.type && a2 === d2.target)
            break;
        }
        return b2;
      }, _trigger: function() {
        var b2 = Array.prototype.slice.apply(arguments);
        return "string" == typeof b2[0] && (b2[0] = { type: b2[0] }), b2[0].instance = this, b2[0].origin = this._$origin ? this._$origin[0] : null, b2[0].tooltip = this._$tooltip ? this._$tooltip[0] : null, this.__$emitterPrivate.trigger.apply(this.__$emitterPrivate, b2), a.tooltipster._trigger.apply(a.tooltipster, b2), this.__$emitterPublic.trigger.apply(this.__$emitterPublic, b2), this;
      }, _unplug: function(b2) {
        var c2 = this;
        if (c2[b2]) {
          var d2 = a.tooltipster._plugin(b2);
          d2.instance && a.each(d2.instance, function(a2, d3) {
            c2[a2] && c2[a2].bridged === c2[b2] && delete c2[a2];
          }), c2[b2].__destroy && c2[b2].__destroy(), delete c2[b2];
        }
        return c2;
      }, close: function(a2) {
        return this.__destroyed ? this.__destroyError() : this._close(null, a2), this;
      }, content: function(a2) {
        var b2 = this;
        if (void 0 === a2)
          return b2.__Content;
        if (b2.__destroyed)
          b2.__destroyError();
        else if (b2.__contentSet(a2), null !== b2.__Content) {
          if ("closed" !== b2.__state && (b2.__contentInsert(), b2.reposition(), b2.__options.updateAnimation))
            if (h.hasTransitions) {
              var c2 = b2.__options.updateAnimation;
              b2._$tooltip.addClass("tooltipster-update-" + c2), setTimeout(function() {
                "closed" != b2.__state && b2._$tooltip.removeClass("tooltipster-update-" + c2);
              }, 1e3);
            } else
              b2._$tooltip.fadeTo(200, 0.5, function() {
                "closed" != b2.__state && b2._$tooltip.fadeTo(200, 1);
              });
        } else
          b2._close();
        return b2;
      }, destroy: function() {
        var b2 = this;
        if (b2.__destroyed)
          b2.__destroyError();
        else {
          "closed" != b2.__state ? b2.option("animationDuration", 0)._close(null, null, true) : b2.__timeoutsClear(), b2._trigger("destroy"), b2.__destroyed = true, b2._$origin.removeData(b2.__namespace).off("." + b2.__namespace + "-triggerOpen"), a(h.window.document.body).off("." + b2.__namespace + "-triggerOpen");
          var c2 = b2._$origin.data("tooltipster-ns");
          if (c2)
            if (1 === c2.length) {
              var d2 = null;
              "previous" == b2.__options.restoration ? d2 = b2._$origin.data("tooltipster-initialTitle") : "current" == b2.__options.restoration && (d2 = "string" == typeof b2.__Content ? b2.__Content : a("<div></div>").append(b2.__Content).html()), d2 && b2._$origin.attr("title", d2), b2._$origin.removeClass("tooltipstered"), b2._$origin.removeData("tooltipster-ns").removeData("tooltipster-initialTitle");
            } else
              c2 = a.grep(c2, function(a2, c3) {
                return a2 !== b2.__namespace;
              }), b2._$origin.data("tooltipster-ns", c2);
          b2._trigger("destroyed"), b2._off(), b2.off(), b2.__Content = null, b2.__$emitterPrivate = null, b2.__$emitterPublic = null, b2.__options.parent = null, b2._$origin = null, b2._$tooltip = null, a.tooltipster.__instancesLatestArr = a.grep(a.tooltipster.__instancesLatestArr, function(a2, c3) {
            return b2 !== a2;
          }), clearInterval(b2.__garbageCollector);
        }
        return b2;
      }, disable: function() {
        return this.__destroyed ? (this.__destroyError(), this) : (this._close(), this.__enabled = false, this);
      }, elementOrigin: function() {
        return this.__destroyed ? void this.__destroyError() : this._$origin[0];
      }, elementTooltip: function() {
        return this._$tooltip ? this._$tooltip[0] : null;
      }, enable: function() {
        return this.__enabled = true, this;
      }, hide: function(a2) {
        return this.close(a2);
      }, instance: function() {
        return this;
      }, off: function() {
        return this.__destroyed || this.__$emitterPublic.off.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      }, on: function() {
        return this.__destroyed ? this.__destroyError() : this.__$emitterPublic.on.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      }, one: function() {
        return this.__destroyed ? this.__destroyError() : this.__$emitterPublic.one.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      }, open: function(a2) {
        return this.__destroyed ? this.__destroyError() : this._open(null, a2), this;
      }, option: function(b2, c2) {
        return void 0 === c2 ? this.__options[b2] : (this.__destroyed ? this.__destroyError() : (this.__options[b2] = c2, this.__optionsFormat(), a.inArray(b2, ["trigger", "triggerClose", "triggerOpen"]) >= 0 && this.__prepareOrigin(), "selfDestruction" === b2 && this.__prepareGC()), this);
      }, reposition: function(a2, b2) {
        var c2 = this;
        return c2.__destroyed ? c2.__destroyError() : "closed" != c2.__state && d(c2._$origin) && (b2 || d(c2._$tooltip)) && (b2 || c2._$tooltip.detach(), c2.__Geometry = c2.__geometry(), c2._trigger({ type: "reposition", event: a2, helper: { geo: c2.__Geometry } })), c2;
      }, show: function(a2) {
        return this.open(a2);
      }, status: function() {
        return { destroyed: this.__destroyed, enabled: this.__enabled, open: "closed" !== this.__state, state: this.__state };
      }, triggerHandler: function() {
        return this.__destroyed ? this.__destroyError() : this.__$emitterPublic.triggerHandler.apply(this.__$emitterPublic, Array.prototype.slice.apply(arguments)), this;
      } }, a.fn.tooltipster = function() {
        var b2 = Array.prototype.slice.apply(arguments), c2 = "You are using a single HTML element as content for several tooltips. You probably want to set the contentCloning option to TRUE.";
        if (0 === this.length)
          return this;
        if ("string" == typeof b2[0]) {
          var d2 = "#*$~&";
          return this.each(function() {
            var e3 = a(this).data("tooltipster-ns"), f2 = e3 ? a(this).data(e3[0]) : null;
            if (!f2)
              throw new Error(`You called Tooltipster's "` + b2[0] + '" method on an uninitialized element');
            if ("function" != typeof f2[b2[0]])
              throw new Error('Unknown method "' + b2[0] + '"');
            this.length > 1 && "content" == b2[0] && (b2[1] instanceof a || "object" == typeof b2[1] && null != b2[1] && b2[1].tagName) && !f2.__options.contentCloning && f2.__options.debug && console.log(c2);
            var g3 = f2[b2[0]](b2[1], b2[2]);
            return g3 !== f2 || "instance" === b2[0] ? (d2 = g3, false) : void 0;
          }), "#*$~&" !== d2 ? d2 : this;
        }
        a.tooltipster.__instancesLatestArr = [];
        var e2 = b2[0] && void 0 !== b2[0].multiple, g2 = e2 && b2[0].multiple || !e2 && f.multiple, h2 = b2[0] && void 0 !== b2[0].content, i2 = h2 && b2[0].content || !h2 && f.content, j2 = b2[0] && void 0 !== b2[0].contentCloning, k2 = j2 && b2[0].contentCloning || !j2 && f.contentCloning, l = b2[0] && void 0 !== b2[0].debug, m = l && b2[0].debug || !l && f.debug;
        return this.length > 1 && (i2 instanceof a || "object" == typeof i2 && null != i2 && i2.tagName) && !k2 && m && console.log(c2), this.each(function() {
          var c3 = false, d3 = a(this), e3 = d3.data("tooltipster-ns"), f2 = null;
          e3 ? g2 ? c3 = true : m && (console.log("Tooltipster: one or more tooltips are already attached to the element below. Ignoring."), console.log(this)) : c3 = true, c3 && (f2 = new a.Tooltipster(this, b2[0]), e3 || (e3 = []), e3.push(f2.__namespace), d3.data("tooltipster-ns", e3), d3.data(f2.__namespace, f2), f2.__options.functionInit && f2.__options.functionInit.call(f2, f2, { origin: this }), f2._trigger("init")), a.tooltipster.__instancesLatestArr.push(f2);
        }), this;
      }, b.prototype = { __init: function(b2) {
        this.__$tooltip = b2, this.__$tooltip.css({ left: 0, overflow: "hidden", position: "absolute", top: 0 }).find(".tooltipster-content").css("overflow", "auto"), this.$container = a('<div class="tooltipster-ruler"></div>').append(this.__$tooltip).appendTo(h.window.document.body);
      }, __forceRedraw: function() {
        var a2 = this.__$tooltip.parent();
        this.__$tooltip.detach(), this.__$tooltip.appendTo(a2);
      }, constrain: function(a2, b2) {
        return this.constraints = { width: a2, height: b2 }, this.__$tooltip.css({ display: "block", height: "", overflow: "auto", width: a2 }), this;
      }, destroy: function() {
        this.__$tooltip.detach().find(".tooltipster-content").css({ display: "", overflow: "" }), this.$container.remove();
      }, free: function() {
        return this.constraints = null, this.__$tooltip.css({ display: "", height: "", overflow: "visible", width: "" }), this;
      }, measure: function() {
        this.__forceRedraw();
        var a2 = this.__$tooltip[0].getBoundingClientRect(), b2 = { size: { height: a2.height || a2.bottom - a2.top, width: a2.width || a2.right - a2.left } };
        if (this.constraints) {
          var c2 = this.__$tooltip.find(".tooltipster-content"), d2 = this.__$tooltip.outerHeight(), e2 = c2[0].getBoundingClientRect(), f2 = { height: d2 <= this.constraints.height, width: a2.width <= this.constraints.width && e2.width >= c2[0].scrollWidth - 1 };
          b2.fits = f2.height && f2.width;
        }
        return h.IE && h.IE <= 11 && b2.size.width !== h.window.document.documentElement.clientWidth && (b2.size.width = Math.ceil(b2.size.width) + 1), b2;
      } };
      var j = navigator.userAgent.toLowerCase();
      -1 != j.indexOf("msie") ? h.IE = parseInt(j.split("msie")[1]) : -1 !== j.toLowerCase().indexOf("trident") && -1 !== j.indexOf(" rv:11") ? h.IE = 11 : -1 != j.toLowerCase().indexOf("edge/") && (h.IE = parseInt(j.toLowerCase().split("edge/")[1]));
      var k = "tooltipster.sideTip";
      return a.tooltipster._plugin({ name: k, instance: { __defaults: function() {
        return { arrow: true, distance: 6, functionPosition: null, maxWidth: null, minIntersection: 16, minWidth: 0, position: null, side: "top", viewportAware: true };
      }, __init: function(a2) {
        var b2 = this;
        b2.__instance = a2, b2.__namespace = "tooltipster-sideTip-" + Math.round(1e6 * Math.random()), b2.__previousState = "closed", b2.__options, b2.__optionsFormat(), b2.__instance._on("state." + b2.__namespace, function(a3) {
          "closed" == a3.state ? b2.__close() : "appearing" == a3.state && "closed" == b2.__previousState && b2.__create(), b2.__previousState = a3.state;
        }), b2.__instance._on("options." + b2.__namespace, function() {
          b2.__optionsFormat();
        }), b2.__instance._on("reposition." + b2.__namespace, function(a3) {
          b2.__reposition(a3.event, a3.helper);
        });
      }, __close: function() {
        this.__instance.content() instanceof a && this.__instance.content().detach(), this.__instance._$tooltip.remove(), this.__instance._$tooltip = null;
      }, __create: function() {
        var b2 = a('<div class="tooltipster-base tooltipster-sidetip"><div class="tooltipster-box"><div class="tooltipster-content"></div></div><div class="tooltipster-arrow"><div class="tooltipster-arrow-uncropped"><div class="tooltipster-arrow-border"></div><div class="tooltipster-arrow-background"></div></div></div></div>');
        this.__options.arrow || b2.find(".tooltipster-box").css("margin", 0).end().find(".tooltipster-arrow").hide(), this.__options.minWidth && b2.css("min-width", this.__options.minWidth + "px"), this.__options.maxWidth && b2.css("max-width", this.__options.maxWidth + "px"), this.__instance._$tooltip = b2, this.__instance._trigger("created");
      }, __destroy: function() {
        this.__instance._off("." + self.__namespace);
      }, __optionsFormat: function() {
        var b2 = this;
        if (b2.__options = b2.__instance._optionsExtract(k, b2.__defaults()), b2.__options.position && (b2.__options.side = b2.__options.position), "object" != typeof b2.__options.distance && (b2.__options.distance = [b2.__options.distance]), b2.__options.distance.length < 4 && (void 0 === b2.__options.distance[1] && (b2.__options.distance[1] = b2.__options.distance[0]), void 0 === b2.__options.distance[2] && (b2.__options.distance[2] = b2.__options.distance[0]), void 0 === b2.__options.distance[3] && (b2.__options.distance[3] = b2.__options.distance[1])), b2.__options.distance = { top: b2.__options.distance[0], right: b2.__options.distance[1], bottom: b2.__options.distance[2], left: b2.__options.distance[3] }, "string" == typeof b2.__options.side) {
          var c2 = { top: "bottom", right: "left", bottom: "top", left: "right" };
          b2.__options.side = [b2.__options.side, c2[b2.__options.side]], "left" == b2.__options.side[0] || "right" == b2.__options.side[0] ? b2.__options.side.push("top", "bottom") : b2.__options.side.push("right", "left");
        }
        6 === a.tooltipster._env.IE && b2.__options.arrow !== true && (b2.__options.arrow = false);
      }, __reposition: function(b2, c2) {
        var d2, e2 = this, f2 = e2.__targetFind(c2), g2 = [];
        e2.__instance._$tooltip.detach();
        var h2 = e2.__instance._$tooltip.clone(), i2 = a.tooltipster._getRuler(h2), j2 = false, k2 = e2.__instance.option("animation");
        switch (k2 && h2.removeClass("tooltipster-" + k2), a.each(["window", "document"], function(d3, k3) {
          var l2 = null;
          if (e2.__instance._trigger({ container: k3, helper: c2, satisfied: j2, takeTest: function(a2) {
            l2 = a2;
          }, results: g2, type: "positionTest" }), 1 == l2 || 0 != l2 && 0 == j2 && ("window" != k3 || e2.__options.viewportAware))
            for (var d3 = 0; d3 < e2.__options.side.length; d3++) {
              var m2 = { horizontal: 0, vertical: 0 }, n2 = e2.__options.side[d3];
              "top" == n2 || "bottom" == n2 ? m2.vertical = e2.__options.distance[n2] : m2.horizontal = e2.__options.distance[n2], e2.__sideChange(h2, n2), a.each(["natural", "constrained"], function(a2, d4) {
                if (l2 = null, e2.__instance._trigger({ container: k3, event: b2, helper: c2, mode: d4, results: g2, satisfied: j2, side: n2, takeTest: function(a3) {
                  l2 = a3;
                }, type: "positionTest" }), 1 == l2 || 0 != l2 && 0 == j2) {
                  var h3 = { container: k3, distance: m2, fits: null, mode: d4, outerSize: null, side: n2, size: null, target: f2[n2], whole: null }, o2 = "natural" == d4 ? i2.free() : i2.constrain(c2.geo.available[k3][n2].width - m2.horizontal, c2.geo.available[k3][n2].height - m2.vertical), p2 = o2.measure();
                  if (h3.size = p2.size, h3.outerSize = { height: p2.size.height + m2.vertical, width: p2.size.width + m2.horizontal }, "natural" == d4 ? c2.geo.available[k3][n2].width >= h3.outerSize.width && c2.geo.available[k3][n2].height >= h3.outerSize.height ? h3.fits = true : h3.fits = false : h3.fits = p2.fits, "window" == k3 && (h3.fits ? "top" == n2 || "bottom" == n2 ? h3.whole = c2.geo.origin.windowOffset.right >= e2.__options.minIntersection && c2.geo.window.size.width - c2.geo.origin.windowOffset.left >= e2.__options.minIntersection : h3.whole = c2.geo.origin.windowOffset.bottom >= e2.__options.minIntersection && c2.geo.window.size.height - c2.geo.origin.windowOffset.top >= e2.__options.minIntersection : h3.whole = false), g2.push(h3), h3.whole)
                    j2 = true;
                  else if ("natural" == h3.mode && (h3.fits || h3.size.width <= c2.geo.available[k3][n2].width))
                    return false;
                }
              });
            }
        }), e2.__instance._trigger({ edit: function(a2) {
          g2 = a2;
        }, event: b2, helper: c2, results: g2, type: "positionTested" }), g2.sort(function(a2, b3) {
          if (a2.whole && !b3.whole)
            return -1;
          if (!a2.whole && b3.whole)
            return 1;
          if (a2.whole && b3.whole) {
            var c3 = e2.__options.side.indexOf(a2.side), d3 = e2.__options.side.indexOf(b3.side);
            return d3 > c3 ? -1 : c3 > d3 ? 1 : "natural" == a2.mode ? -1 : 1;
          }
          if (a2.fits && !b3.fits)
            return -1;
          if (!a2.fits && b3.fits)
            return 1;
          if (a2.fits && b3.fits) {
            var c3 = e2.__options.side.indexOf(a2.side), d3 = e2.__options.side.indexOf(b3.side);
            return d3 > c3 ? -1 : c3 > d3 ? 1 : "natural" == a2.mode ? -1 : 1;
          }
          return "document" == a2.container && "bottom" == a2.side && "natural" == a2.mode ? -1 : 1;
        }), d2 = g2[0], d2.coord = {}, d2.side) {
          case "left":
          case "right":
            d2.coord.top = Math.floor(d2.target - d2.size.height / 2);
            break;
          case "bottom":
          case "top":
            d2.coord.left = Math.floor(d2.target - d2.size.width / 2);
        }
        switch (d2.side) {
          case "left":
            d2.coord.left = c2.geo.origin.windowOffset.left - d2.outerSize.width;
            break;
          case "right":
            d2.coord.left = c2.geo.origin.windowOffset.right + d2.distance.horizontal;
            break;
          case "top":
            d2.coord.top = c2.geo.origin.windowOffset.top - d2.outerSize.height;
            break;
          case "bottom":
            d2.coord.top = c2.geo.origin.windowOffset.bottom + d2.distance.vertical;
        }
        "window" == d2.container ? "top" == d2.side || "bottom" == d2.side ? d2.coord.left < 0 ? c2.geo.origin.windowOffset.right - this.__options.minIntersection >= 0 ? d2.coord.left = 0 : d2.coord.left = c2.geo.origin.windowOffset.right - this.__options.minIntersection - 1 : d2.coord.left > c2.geo.window.size.width - d2.size.width && (c2.geo.origin.windowOffset.left + this.__options.minIntersection <= c2.geo.window.size.width ? d2.coord.left = c2.geo.window.size.width - d2.size.width : d2.coord.left = c2.geo.origin.windowOffset.left + this.__options.minIntersection + 1 - d2.size.width) : d2.coord.top < 0 ? c2.geo.origin.windowOffset.bottom - this.__options.minIntersection >= 0 ? d2.coord.top = 0 : d2.coord.top = c2.geo.origin.windowOffset.bottom - this.__options.minIntersection - 1 : d2.coord.top > c2.geo.window.size.height - d2.size.height && (c2.geo.origin.windowOffset.top + this.__options.minIntersection <= c2.geo.window.size.height ? d2.coord.top = c2.geo.window.size.height - d2.size.height : d2.coord.top = c2.geo.origin.windowOffset.top + this.__options.minIntersection + 1 - d2.size.height) : (d2.coord.left > c2.geo.window.size.width - d2.size.width && (d2.coord.left = c2.geo.window.size.width - d2.size.width), d2.coord.left < 0 && (d2.coord.left = 0)), e2.__sideChange(h2, d2.side), c2.tooltipClone = h2[0], c2.tooltipParent = e2.__instance.option("parent").parent[0], c2.mode = d2.mode, c2.whole = d2.whole, c2.origin = e2.__instance._$origin[0], c2.tooltip = e2.__instance._$tooltip[0], delete d2.container, delete d2.fits, delete d2.mode, delete d2.outerSize, delete d2.whole, d2.distance = d2.distance.horizontal || d2.distance.vertical;
        var l = a.extend(true, {}, d2);
        if (e2.__instance._trigger({ edit: function(a2) {
          d2 = a2;
        }, event: b2, helper: c2, position: l, type: "position" }), e2.__options.functionPosition) {
          var m = e2.__options.functionPosition.call(e2, e2.__instance, c2, l);
          m && (d2 = m);
        }
        i2.destroy();
        var n, o;
        "top" == d2.side || "bottom" == d2.side ? (n = { prop: "left", val: d2.target - d2.coord.left }, o = d2.size.width - this.__options.minIntersection) : (n = { prop: "top", val: d2.target - d2.coord.top }, o = d2.size.height - this.__options.minIntersection), n.val < this.__options.minIntersection ? n.val = this.__options.minIntersection : n.val > o && (n.val = o);
        var p;
        p = c2.geo.origin.fixedLineage ? c2.geo.origin.windowOffset : { left: c2.geo.origin.windowOffset.left + c2.geo.window.scroll.left, top: c2.geo.origin.windowOffset.top + c2.geo.window.scroll.top }, d2.coord = { left: p.left + (d2.coord.left - c2.geo.origin.windowOffset.left), top: p.top + (d2.coord.top - c2.geo.origin.windowOffset.top) }, e2.__sideChange(e2.__instance._$tooltip, d2.side), c2.geo.origin.fixedLineage ? e2.__instance._$tooltip.css("position", "fixed") : e2.__instance._$tooltip.css("position", ""), e2.__instance._$tooltip.css({ left: d2.coord.left, top: d2.coord.top, height: d2.size.height, width: d2.size.width }).find(".tooltipster-arrow").css({ left: "", top: "" }).css(n.prop, n.val), e2.__instance._$tooltip.appendTo(e2.__instance.option("parent")), e2.__instance._trigger({ type: "repositioned", event: b2, position: d2 });
      }, __sideChange: function(a2, b2) {
        a2.removeClass("tooltipster-bottom").removeClass("tooltipster-left").removeClass("tooltipster-right").removeClass("tooltipster-top").addClass("tooltipster-" + b2);
      }, __targetFind: function(a2) {
        var b2 = {}, c2 = this.__instance._$origin[0].getClientRects();
        if (c2.length > 1) {
          var d2 = this.__instance._$origin.css("opacity");
          1 == d2 && (this.__instance._$origin.css("opacity", 0.99), c2 = this.__instance._$origin[0].getClientRects(), this.__instance._$origin.css("opacity", 1));
        }
        if (c2.length < 2)
          b2.top = Math.floor(a2.geo.origin.windowOffset.left + a2.geo.origin.size.width / 2), b2.bottom = b2.top, b2.left = Math.floor(a2.geo.origin.windowOffset.top + a2.geo.origin.size.height / 2), b2.right = b2.left;
        else {
          var e2 = c2[0];
          b2.top = Math.floor(e2.left + (e2.right - e2.left) / 2), e2 = c2.length > 2 ? c2[Math.ceil(c2.length / 2) - 1] : c2[0], b2.right = Math.floor(e2.top + (e2.bottom - e2.top) / 2), e2 = c2[c2.length - 1], b2.bottom = Math.floor(e2.left + (e2.right - e2.left) / 2), e2 = c2.length > 2 ? c2[Math.ceil((c2.length + 1) / 2) - 1] : c2[c2.length - 1], b2.left = Math.floor(e2.top + (e2.bottom - e2.top) / 2);
        }
        return b2;
      } } }), a;
    });
  })(tooltipster_bundle_min$1);
  const tooltipster_bundle_min = "";
  const tooltipsterSideTipShadow_min = "";
  var jquery_bootstrapTouchspin = { exports: {} };
  jquery_bootstrapTouchspin.exports;
  (function(module) {
    function _typeof(obj) {
      "@babel/helpers - typeof";
      return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(obj2) {
        return typeof obj2;
      } : function(obj2) {
        return obj2 && "function" == typeof Symbol && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
      }, _typeof(obj);
    }
    (function(factory) {
      if (_typeof(module) === "object" && module.exports) {
        module.exports = function(root, jQuery2) {
          if (jQuery2 === void 0) {
            if (typeof window !== "undefined") {
              jQuery2 = $$1;
            } else {
              jQuery2 = $$1(root);
            }
          }
          factory(jQuery2);
          return jQuery2;
        };
      } else {
        factory(jQuery);
      }
    })(function($2) {
      var _currentSpinnerId = 0;
      $2.fn.TouchSpin = function(options) {
        var defaults = {
          min: 0,
          // If null, there is no minimum enforced
          max: 100,
          // If null, there is no maximum enforced
          initval: "",
          replacementval: "",
          firstclickvalueifempty: null,
          step: 1,
          decimals: 0,
          stepinterval: 100,
          forcestepdivisibility: "round",
          // none | floor | round | ceil
          stepintervaldelay: 500,
          verticalbuttons: false,
          verticalup: "&plus;",
          verticaldown: "&minus;",
          verticalupclass: "",
          verticaldownclass: "",
          prefix: "",
          postfix: "",
          prefix_extraclass: "",
          postfix_extraclass: "",
          booster: true,
          boostat: 10,
          maxboostedstep: false,
          mousewheel: true,
          buttondown_class: "btn btn-primary",
          buttonup_class: "btn btn-primary",
          buttondown_txt: "&minus;",
          buttonup_txt: "&plus;",
          callback_before_calculation: function callback_before_calculation(value) {
            return value;
          },
          callback_after_calculation: function callback_after_calculation(value) {
            return value;
          }
        };
        var attributeMap = {
          min: "min",
          max: "max",
          initval: "init-val",
          replacementval: "replacement-val",
          firstclickvalueifempty: "first-click-value-if-empty",
          step: "step",
          decimals: "decimals",
          stepinterval: "step-interval",
          verticalbuttons: "vertical-buttons",
          verticalupclass: "vertical-up-class",
          verticaldownclass: "vertical-down-class",
          forcestepdivisibility: "force-step-divisibility",
          stepintervaldelay: "step-interval-delay",
          prefix: "prefix",
          postfix: "postfix",
          prefix_extraclass: "prefix-extra-class",
          postfix_extraclass: "postfix-extra-class",
          booster: "booster",
          boostat: "boostat",
          maxboostedstep: "max-boosted-step",
          mousewheel: "mouse-wheel",
          buttondown_class: "button-down-class",
          buttonup_class: "button-up-class",
          buttondown_txt: "button-down-txt",
          buttonup_txt: "button-up-txt"
        };
        return this.each(function() {
          var settings, originalinput = $2(this), originalinput_data = originalinput.data(), _detached_prefix, _detached_postfix, container, elements, verticalbuttons_html, value, downSpinTimer, upSpinTimer, downDelayTimeout, upDelayTimeout, spincount = 0, spinning = false;
          init();
          function init() {
            if (originalinput.data("alreadyinitialized")) {
              return;
            }
            originalinput.data("alreadyinitialized", true);
            _currentSpinnerId += 1;
            originalinput.data("spinnerid", _currentSpinnerId);
            if (!originalinput.is("input")) {
              console.log("Must be an input.");
              return;
            }
            _initSettings();
            _setInitval();
            _checkValue();
            _buildHtml();
            _initElements();
            _updateButtonDisabledState();
            _hideEmptyPrefixPostfix();
            _setupMutationObservers();
            _bindEvents();
            _bindEventsInterface();
          }
          function _setInitval() {
            if (settings.initval !== "" && originalinput.val() === "") {
              originalinput.val(settings.initval);
            }
          }
          function changeSettings(newsettings) {
            _updateSettings(newsettings);
            _checkValue();
            var value2 = elements.input.val();
            if (value2 !== "") {
              value2 = parseFloat(settings.callback_before_calculation(elements.input.val()));
              elements.input.val(settings.callback_after_calculation(parseFloat(value2).toFixed(settings.decimals)));
            }
          }
          function _initSettings() {
            settings = $2.extend({}, defaults, originalinput_data, _parseAttributes(), options);
            if (parseFloat(settings.step) !== 1) {
              var remainder;
              remainder = settings.max % settings.step;
              if (remainder !== 0) {
                settings.max = parseFloat(settings.max) - remainder;
              }
              remainder = settings.min % settings.step;
              if (remainder !== 0) {
                settings.min = parseFloat(settings.min) + (parseFloat(settings.step) - remainder);
              }
            }
          }
          function _parseAttributes() {
            var data = {};
            $2.each(attributeMap, function(key, value2) {
              var attrName = "bts-" + value2;
              if (originalinput.is("[data-" + attrName + "]")) {
                data[key] = originalinput.data(attrName);
              }
            });
            $2.each(["min", "max", "step"], function(i, key) {
              if (originalinput.is("[" + key + "]")) {
                if (data[key] !== void 0) {
                  console.warn('Both the "data-bts-' + key + '" data attribute and the "' + key + '" individual attribute were specified, the individual attribute will take precedence on: ', originalinput);
                }
                data[key] = originalinput.attr(key);
              }
            });
            return data;
          }
          function _destroy() {
            var $parent = originalinput.parent();
            stopSpin();
            originalinput.off(".touchspin");
            if ($parent.hasClass("bootstrap-touchspin-injected")) {
              originalinput.siblings().remove();
              originalinput.unwrap();
            } else {
              $2(".bootstrap-touchspin-injected", $parent).remove();
              $parent.removeClass("bootstrap-touchspin");
            }
            originalinput.data("alreadyinitialized", false);
          }
          function _updateSettings(newsettings) {
            settings = $2.extend({}, settings, newsettings);
            if (newsettings.postfix) {
              var $postfix = originalinput.parent().find(".bootstrap-touchspin-postfix");
              if ($postfix.length === 0) {
                _detached_postfix.insertAfter(originalinput);
              }
              originalinput.parent().find(".bootstrap-touchspin-postfix .input-group-text").text(newsettings.postfix);
            }
            if (newsettings.prefix) {
              var $prefix = originalinput.parent().find(".bootstrap-touchspin-prefix");
              if ($prefix.length === 0) {
                _detached_prefix.insertBefore(originalinput);
              }
              originalinput.parent().find(".bootstrap-touchspin-prefix .input-group-text").text(newsettings.prefix);
            }
            _hideEmptyPrefixPostfix();
          }
          function _buildHtml() {
            var initval = originalinput.val(), parentelement = originalinput.parent();
            if (initval !== "") {
              initval = settings.callback_before_calculation(initval);
              initval = settings.callback_after_calculation(parseFloat(initval).toFixed(settings.decimals));
            }
            originalinput.data("initvalue", initval).val(initval);
            originalinput.addClass("form-control");
            verticalbuttons_html = '\n          <span class="input-group-addon bootstrap-touchspin-vertical-button-wrapper">\n            <span class="input-group-btn-vertical">\n              <button tabindex="-1" class="'.concat(settings.buttondown_class, " bootstrap-touchspin-up ").concat(settings.verticalupclass, '" type="button">').concat(settings.verticalup, '</button>\n              <button tabindex="-1" class="').concat(settings.buttonup_class, " bootstrap-touchspin-down ").concat(settings.verticaldownclass, '" type="button">').concat(settings.verticaldown, "</button>\n            </span>\n          </span>\n       ");
            if (parentelement.hasClass("input-group")) {
              _advanceInputGroup(parentelement);
            } else {
              _buildInputGroup();
            }
          }
          function _advanceInputGroup(parentelement) {
            parentelement.addClass("bootstrap-touchspin");
            var prev = originalinput.prev(), next = originalinput.next();
            var downhtml, uphtml, prefixhtml = '\n            <span class="input-group-addon input-group-prepend bootstrap-touchspin-prefix input-group-prepend bootstrap-touchspin-injected">\n              <span class="input-group-text">'.concat(settings.prefix, "</span>\n            </span>\n          "), postfixhtml = '\n            <span class="input-group-addon input-group-append bootstrap-touchspin-postfix input-group-append bootstrap-touchspin-injected">\n              <span class="input-group-text">'.concat(settings.postfix, "</span>\n            </span>\n          ");
            if (settings.verticalbuttons) {
              $2(verticalbuttons_html).insertAfter(originalinput);
            } else {
              if (prev.hasClass("input-group-btn") || prev.hasClass("input-group-prepend")) {
                downhtml = '\n              <button tabindex="-1" class="'.concat(settings.buttondown_class, ' bootstrap-touchspin-down bootstrap-touchspin-injected" type="button">').concat(settings.buttondown_txt, "</button>\n            ");
                prev.append(downhtml);
              } else {
                downhtml = '\n              <span class="input-group-btn input-group-prepend bootstrap-touchspin-injected">\n                <button tabindex="-1" class="'.concat(settings.buttondown_class, ' bootstrap-touchspin-down" type="button">').concat(settings.buttondown_txt, "</button>\n              </span>\n            ");
                $2(downhtml).insertBefore(originalinput);
              }
              if (next.hasClass("input-group-btn") || next.hasClass("input-group-append")) {
                uphtml = '\n            <button tabindex="-1" class="'.concat(settings.buttonup_class, ' bootstrap-touchspin-up bootstrap-touchspin-injected" type="button">').concat(settings.buttonup_txt, "</button>\n          ");
                next.prepend(uphtml);
              } else {
                uphtml = '\n            <span class="input-group-btn input-group-append bootstrap-touchspin-injected">\n              <button tabindex="-1" class="'.concat(settings.buttonup_class, ' bootstrap-touchspin-up" type="button">').concat(settings.buttonup_txt, "</button>\n            </span>\n          ");
                $2(uphtml).insertAfter(originalinput);
              }
            }
            $2(prefixhtml).insertBefore(originalinput);
            $2(postfixhtml).insertAfter(originalinput);
            container = parentelement;
          }
          function _buildInputGroup() {
            var html;
            var inputGroupSize = "";
            if (originalinput.hasClass("input-sm") || originalinput.hasClass("form-control-sm")) {
              inputGroupSize = "input-group-sm";
            } else if (originalinput.hasClass("input-lg") || originalinput.hasClass("form-control-lg")) {
              inputGroupSize = "input-group-lg";
            }
            if (settings.verticalbuttons) {
              html = '\n            <div class="input-group '.concat(inputGroupSize, ' bootstrap-touchspin bootstrap-touchspin-injected">\n              <span class="input-group-addon input-group-prepend bootstrap-touchspin-prefix">\n                <span class="input-group-text">').concat(settings.prefix, '</span>\n              </span>\n              <span class="input-group-addon bootstrap-touchspin-postfix input-group-append">\n                <span class="input-group-text">').concat(settings.postfix, "</span>\n              </span>\n              ").concat(verticalbuttons_html, "\n            </div>\n          ");
            } else {
              html = '\n            <div class="input-group bootstrap-touchspin bootstrap-touchspin-injected">\n              <span class="input-group-btn input-group-prepend">\n                <button tabindex="-1" class="'.concat(settings.buttondown_class, ' bootstrap-touchspin-down" type="button">').concat(settings.buttondown_txt, '</button>\n              </span>\n              <span class="input-group-addon bootstrap-touchspin-prefix input-group-prepend">\n                <span class="input-group-text">').concat(settings.prefix, '</span>\n              </span>\n              <span class="input-group-addon bootstrap-touchspin-postfix input-group-append">\n                <span class="input-group-text">').concat(settings.postfix, '</span>\n              </span>\n              <span class="input-group-btn input-group-append">\n                <button tabindex="-1" class="').concat(settings.buttonup_class, ' bootstrap-touchspin-up" type="button">').concat(settings.buttonup_txt, "</button>\n              </span>\n            </div>");
            }
            container = $2(html).insertBefore(originalinput);
            $2(".bootstrap-touchspin-prefix", container).after(originalinput);
            if (originalinput.hasClass("input-sm") || originalinput.hasClass("form-control-sm")) {
              container.addClass("input-group-sm");
            } else if (originalinput.hasClass("input-lg") || originalinput.hasClass("form-control-lg")) {
              container.addClass("input-group-lg");
            }
          }
          function _initElements() {
            elements = {
              down: $2(".bootstrap-touchspin-down", container),
              up: $2(".bootstrap-touchspin-up", container),
              input: $2("input", container),
              prefix: $2(".bootstrap-touchspin-prefix", container).addClass(settings.prefix_extraclass),
              postfix: $2(".bootstrap-touchspin-postfix", container).addClass(settings.postfix_extraclass)
            };
          }
          function _hideEmptyPrefixPostfix() {
            if (settings.prefix === "") {
              _detached_prefix = elements.prefix.detach();
            }
            if (settings.postfix === "") {
              _detached_postfix = elements.postfix.detach();
            }
          }
          function _bindEvents() {
            originalinput.on("keydown.touchspin", function(ev) {
              var code = ev.keyCode || ev.which;
              if (code === 38) {
                if (spinning !== "up") {
                  upOnce();
                  startUpSpin();
                }
                ev.preventDefault();
              } else if (code === 40) {
                if (spinning !== "down") {
                  downOnce();
                  startDownSpin();
                }
                ev.preventDefault();
              } else if (code === 9 || code === 13) {
                _checkValue();
              }
            });
            originalinput.on("keyup.touchspin", function(ev) {
              var code = ev.keyCode || ev.which;
              if (code === 38) {
                stopSpin();
              } else if (code === 40) {
                stopSpin();
              }
            });
            $2(document).on("mousedown touchstart", function(event) {
              if ($2(event.target).is(originalinput)) {
                return;
              }
              _checkValue();
            });
            originalinput.on("blur.touchspin", function() {
              _checkValue();
            });
            elements.down.on("keydown", function(ev) {
              var code = ev.keyCode || ev.which;
              if (code === 32 || code === 13) {
                if (spinning !== "down") {
                  downOnce();
                  startDownSpin();
                }
                ev.preventDefault();
              }
            });
            elements.down.on("keyup.touchspin", function(ev) {
              var code = ev.keyCode || ev.which;
              if (code === 32 || code === 13) {
                stopSpin();
              }
            });
            elements.up.on("keydown.touchspin", function(ev) {
              var code = ev.keyCode || ev.which;
              if (code === 32 || code === 13) {
                if (spinning !== "up") {
                  upOnce();
                  startUpSpin();
                }
                ev.preventDefault();
              }
            });
            elements.up.on("keyup.touchspin", function(ev) {
              var code = ev.keyCode || ev.which;
              if (code === 32 || code === 13) {
                stopSpin();
              }
            });
            elements.down.on("mousedown.touchspin", function(ev) {
              elements.down.off("touchstart.touchspin");
              if (originalinput.is(":disabled,[readonly]")) {
                return;
              }
              downOnce();
              startDownSpin();
              ev.preventDefault();
              ev.stopPropagation();
            });
            elements.down.on("touchstart.touchspin", function(ev) {
              elements.down.off("mousedown.touchspin");
              if (originalinput.is(":disabled,[readonly]")) {
                return;
              }
              downOnce();
              startDownSpin();
              ev.preventDefault();
              ev.stopPropagation();
            });
            elements.up.on("mousedown.touchspin", function(ev) {
              elements.up.off("touchstart.touchspin");
              if (originalinput.is(":disabled,[readonly]")) {
                return;
              }
              upOnce();
              startUpSpin();
              ev.preventDefault();
              ev.stopPropagation();
            });
            elements.up.on("touchstart.touchspin", function(ev) {
              elements.up.off("mousedown.touchspin");
              if (originalinput.is(":disabled,[readonly]")) {
                return;
              }
              upOnce();
              startUpSpin();
              ev.preventDefault();
              ev.stopPropagation();
            });
            elements.up.on("mouseup.touchspin mouseout.touchspin touchleave.touchspin touchend.touchspin touchcancel.touchspin", function(ev) {
              if (!spinning) {
                return;
              }
              ev.stopPropagation();
              stopSpin();
            });
            elements.down.on("mouseup.touchspin mouseout.touchspin touchleave.touchspin touchend.touchspin touchcancel.touchspin", function(ev) {
              if (!spinning) {
                return;
              }
              ev.stopPropagation();
              stopSpin();
            });
            elements.down.on("mousemove.touchspin touchmove.touchspin", function(ev) {
              if (!spinning) {
                return;
              }
              ev.stopPropagation();
              ev.preventDefault();
            });
            elements.up.on("mousemove.touchspin touchmove.touchspin", function(ev) {
              if (!spinning) {
                return;
              }
              ev.stopPropagation();
              ev.preventDefault();
            });
            originalinput.on("mousewheel.touchspin DOMMouseScroll.touchspin", function(ev) {
              if (!settings.mousewheel || !originalinput.is(":focus")) {
                return;
              }
              var delta = ev.originalEvent.wheelDelta || -ev.originalEvent.deltaY || -ev.originalEvent.detail;
              ev.stopPropagation();
              ev.preventDefault();
              if (delta < 0) {
                downOnce();
              } else {
                upOnce();
              }
            });
          }
          function _bindEventsInterface() {
            originalinput.on("touchspin.destroy", function() {
              _destroy();
            });
            originalinput.on("touchspin.uponce", function() {
              stopSpin();
              upOnce();
            });
            originalinput.on("touchspin.downonce", function() {
              stopSpin();
              downOnce();
            });
            originalinput.on("touchspin.startupspin", function() {
              startUpSpin();
            });
            originalinput.on("touchspin.startdownspin", function() {
              startDownSpin();
            });
            originalinput.on("touchspin.stopspin", function() {
              stopSpin();
            });
            originalinput.on("touchspin.updatesettings", function(e, newsettings) {
              changeSettings(newsettings);
            });
          }
          function _setupMutationObservers() {
            if (typeof MutationObserver !== "undefined") {
              var observer = new MutationObserver(function(mutations) {
                mutations.forEach(function(mutation) {
                  if (mutation.type === "attributes" && (mutation.attributeName === "disabled" || mutation.attributeName === "readonly")) {
                    _updateButtonDisabledState();
                  }
                });
              });
              observer.observe(originalinput[0], {
                attributes: true
              });
            }
          }
          function _forcestepdivisibility(value2) {
            switch (settings.forcestepdivisibility) {
              case "round":
                return (Math.round(value2 / settings.step) * settings.step).toFixed(settings.decimals);
              case "floor":
                return (Math.floor(value2 / settings.step) * settings.step).toFixed(settings.decimals);
              case "ceil":
                return (Math.ceil(value2 / settings.step) * settings.step).toFixed(settings.decimals);
              default:
                return value2.toFixed(settings.decimals);
            }
          }
          function _checkValue() {
            var val, parsedval, returnval;
            val = settings.callback_before_calculation(originalinput.val());
            if (val === "") {
              if (settings.replacementval !== "") {
                originalinput.val(settings.replacementval);
                originalinput.trigger("change");
              }
              return;
            }
            if (settings.decimals > 0 && val === ".") {
              return;
            }
            parsedval = parseFloat(val);
            if (isNaN(parsedval)) {
              if (settings.replacementval !== "") {
                parsedval = settings.replacementval;
              } else {
                parsedval = 0;
              }
            }
            returnval = parsedval;
            if (parsedval.toString() !== val) {
              returnval = parsedval;
            }
            returnval = _forcestepdivisibility(parsedval);
            if (settings.min !== null && parsedval < settings.min) {
              returnval = settings.min;
            }
            if (settings.max !== null && parsedval > settings.max) {
              returnval = settings.max;
            }
            if (parseFloat(parsedval).toString() !== parseFloat(returnval).toString()) {
              originalinput.val(returnval);
            }
            originalinput.val(settings.callback_after_calculation(parseFloat(returnval).toFixed(settings.decimals)));
          }
          function _getBoostedStep() {
            if (!settings.booster) {
              return settings.step;
            } else {
              var boosted = Math.pow(2, Math.floor(spincount / settings.boostat)) * settings.step;
              if (settings.maxboostedstep) {
                if (boosted > settings.maxboostedstep) {
                  boosted = settings.maxboostedstep;
                  value = Math.round(value / boosted) * boosted;
                }
              }
              return Math.max(settings.step, boosted);
            }
          }
          function valueIfIsNaN() {
            if (typeof settings.firstclickvalueifempty === "number") {
              return settings.firstclickvalueifempty;
            } else {
              return (settings.min + settings.max) / 2;
            }
          }
          function _updateButtonDisabledState() {
            var isDisabled = originalinput.is(":disabled,[readonly]");
            elements.up.prop("disabled", isDisabled);
            elements.down.prop("disabled", isDisabled);
            if (isDisabled) {
              stopSpin();
            }
          }
          function upOnce() {
            if (originalinput.is(":disabled,[readonly]")) {
              return;
            }
            _checkValue();
            value = parseFloat(settings.callback_before_calculation(elements.input.val()));
            var initvalue = value;
            var boostedstep;
            if (isNaN(value)) {
              value = valueIfIsNaN();
            } else {
              boostedstep = _getBoostedStep();
              value = value + boostedstep;
            }
            if (settings.max !== null && value >= settings.max) {
              value = settings.max;
              originalinput.trigger("touchspin.on.max");
              stopSpin();
            }
            elements.input.val(settings.callback_after_calculation(parseFloat(value).toFixed(settings.decimals)));
            if (initvalue !== value) {
              originalinput.trigger("change");
            }
          }
          function downOnce() {
            if (originalinput.is(":disabled,[readonly]")) {
              return;
            }
            _checkValue();
            value = parseFloat(settings.callback_before_calculation(elements.input.val()));
            var initvalue = value;
            var boostedstep;
            if (isNaN(value)) {
              value = valueIfIsNaN();
            } else {
              boostedstep = _getBoostedStep();
              value = value - boostedstep;
            }
            if (settings.min !== null && value <= settings.min) {
              value = settings.min;
              originalinput.trigger("touchspin.on.min");
              stopSpin();
            }
            elements.input.val(settings.callback_after_calculation(parseFloat(value).toFixed(settings.decimals)));
            if (initvalue !== value) {
              originalinput.trigger("change");
            }
          }
          function startDownSpin() {
            if (originalinput.is(":disabled,[readonly]")) {
              return;
            }
            stopSpin();
            spincount = 0;
            spinning = "down";
            originalinput.trigger("touchspin.on.startspin");
            originalinput.trigger("touchspin.on.startdownspin");
            downDelayTimeout = setTimeout(function() {
              downSpinTimer = setInterval(function() {
                spincount++;
                downOnce();
              }, settings.stepinterval);
            }, settings.stepintervaldelay);
          }
          function startUpSpin() {
            if (originalinput.is(":disabled,[readonly]")) {
              return;
            }
            stopSpin();
            spincount = 0;
            spinning = "up";
            originalinput.trigger("touchspin.on.startspin");
            originalinput.trigger("touchspin.on.startupspin");
            upDelayTimeout = setTimeout(function() {
              upSpinTimer = setInterval(function() {
                spincount++;
                upOnce();
              }, settings.stepinterval);
            }, settings.stepintervaldelay);
          }
          function stopSpin() {
            clearTimeout(downDelayTimeout);
            clearTimeout(upDelayTimeout);
            clearInterval(downSpinTimer);
            clearInterval(upSpinTimer);
            switch (spinning) {
              case "up":
                originalinput.trigger("touchspin.on.stopupspin");
                originalinput.trigger("touchspin.on.stopspin");
                break;
              case "down":
                originalinput.trigger("touchspin.on.stopdownspin");
                originalinput.trigger("touchspin.on.stopspin");
                break;
            }
            spincount = 0;
            spinning = false;
          }
        });
      };
    });
  })(jquery_bootstrapTouchspin);
  var jquery_bootstrapTouchspinExports = jquery_bootstrapTouchspin.exports;
  const touchspin = /* @__PURE__ */ getDefaultExportFromCjs(jquery_bootstrapTouchspinExports);
  var jquery_touchSwipe_min = { exports: {} };
  /*!
   * @fileOverview TouchSwipe - jQuery Plugin
   * @version 1.6.18
   *
   * @author Matt Bryson http://www.github.com/mattbryson
   * @see https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
   * @see http://labs.rampinteractive.co.uk/touchSwipe/
   * @see http://plugins.jquery.com/project/touchSwipe
   * @license
   * Copyright (c) 2010-2015 Matt Bryson
   * Dual licensed under the MIT or GPL Version 2 licenses.
   *
   */
  (function(module) {
    !function(factory) {
      factory(module.exports ? $$1 : jQuery);
    }(function($2) {
      function init(options) {
        return !options || void 0 !== options.allowPageScroll || void 0 === options.swipe && void 0 === options.swipeStatus || (options.allowPageScroll = NONE), void 0 !== options.click && void 0 === options.tap && (options.tap = options.click), options || (options = {}), options = $2.extend({}, $2.fn.swipe.defaults, options), this.each(function() {
          var $this = $2(this), plugin = $this.data(PLUGIN_NS);
          plugin || (plugin = new TouchSwipe(this, options), $this.data(PLUGIN_NS, plugin));
        });
      }
      function TouchSwipe(element, options) {
        function touchStart(jqEvent) {
          if (!(getTouchInProgress() || $2(jqEvent.target).closest(options.excludedElements, $element).length > 0)) {
            var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
            if (!event.pointerType || "mouse" != event.pointerType || 0 != options.fallbackToMouseEvents) {
              var ret, touches = event.touches, evt = touches ? touches[0] : event;
              return phase = PHASE_START, touches ? fingerCount = touches.length : options.preventDefaultEvents !== false && jqEvent.preventDefault(), distance = 0, direction = null, currentDirection = null, pinchDirection = null, duration = 0, startTouchesDistance = 0, endTouchesDistance = 0, pinchZoom = 1, pinchDistance = 0, maximumsMap = createMaximumsData(), cancelMultiFingerRelease(), createFingerData(0, evt), !touches || fingerCount === options.fingers || options.fingers === ALL_FINGERS || hasPinches() ? (startTime = getTimeStamp(), 2 == fingerCount && (createFingerData(1, touches[1]), startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start)), (options.swipeStatus || options.pinchStatus) && (ret = triggerHandler(event, phase))) : ret = false, ret === false ? (phase = PHASE_CANCEL, triggerHandler(event, phase), ret) : (options.hold && (holdTimeout = setTimeout($2.proxy(function() {
                $element.trigger("hold", [event.target]), options.hold && (ret = options.hold.call($element, event, event.target));
              }, this), options.longTapThreshold)), setTouchInProgress(true), null);
            }
          }
        }
        function touchMove(jqEvent) {
          var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
          if (phase !== PHASE_END && phase !== PHASE_CANCEL && !inMultiFingerRelease()) {
            var ret, touches = event.touches, evt = touches ? touches[0] : event, currentFinger = updateFingerData(evt);
            if (endTime = getTimeStamp(), touches && (fingerCount = touches.length), options.hold && clearTimeout(holdTimeout), phase = PHASE_MOVE, 2 == fingerCount && (0 == startTouchesDistance ? (createFingerData(1, touches[1]), startTouchesDistance = endTouchesDistance = calculateTouchesDistance(fingerData[0].start, fingerData[1].start)) : (updateFingerData(touches[1]), endTouchesDistance = calculateTouchesDistance(fingerData[0].end, fingerData[1].end), pinchDirection = calculatePinchDirection(fingerData[0].end, fingerData[1].end)), pinchZoom = calculatePinchZoom(startTouchesDistance, endTouchesDistance), pinchDistance = Math.abs(startTouchesDistance - endTouchesDistance)), fingerCount === options.fingers || options.fingers === ALL_FINGERS || !touches || hasPinches()) {
              if (direction = calculateDirection(currentFinger.start, currentFinger.end), currentDirection = calculateDirection(currentFinger.last, currentFinger.end), validateDefaultEvent(jqEvent, currentDirection), distance = calculateDistance(currentFinger.start, currentFinger.end), duration = calculateDuration(), setMaxDistance(direction, distance), ret = triggerHandler(event, phase), !options.triggerOnTouchEnd || options.triggerOnTouchLeave) {
                var inBounds = true;
                if (options.triggerOnTouchLeave) {
                  var bounds = getbounds(this);
                  inBounds = isInBounds(currentFinger.end, bounds);
                }
                !options.triggerOnTouchEnd && inBounds ? phase = getNextPhase(PHASE_MOVE) : options.triggerOnTouchLeave && !inBounds && (phase = getNextPhase(PHASE_END)), phase != PHASE_CANCEL && phase != PHASE_END || triggerHandler(event, phase);
              }
            } else
              phase = PHASE_CANCEL, triggerHandler(event, phase);
            ret === false && (phase = PHASE_CANCEL, triggerHandler(event, phase));
          }
        }
        function touchEnd(jqEvent) {
          var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent, touches = event.touches;
          if (touches) {
            if (touches.length && !inMultiFingerRelease())
              return startMultiFingerRelease(event), true;
            if (touches.length && inMultiFingerRelease())
              return true;
          }
          return inMultiFingerRelease() && (fingerCount = fingerCountAtRelease), endTime = getTimeStamp(), duration = calculateDuration(), didSwipeBackToCancel() || !validateSwipeDistance() ? (phase = PHASE_CANCEL, triggerHandler(event, phase)) : options.triggerOnTouchEnd || options.triggerOnTouchEnd === false && phase === PHASE_MOVE ? (options.preventDefaultEvents !== false && jqEvent.cancelable !== false && jqEvent.preventDefault(), phase = PHASE_END, triggerHandler(event, phase)) : !options.triggerOnTouchEnd && hasTap() ? (phase = PHASE_END, triggerHandlerForGesture(event, phase, TAP)) : phase === PHASE_MOVE && (phase = PHASE_CANCEL, triggerHandler(event, phase)), setTouchInProgress(false), null;
        }
        function touchCancel() {
          fingerCount = 0, endTime = 0, startTime = 0, startTouchesDistance = 0, endTouchesDistance = 0, pinchZoom = 1, cancelMultiFingerRelease(), setTouchInProgress(false);
        }
        function touchLeave(jqEvent) {
          var event = jqEvent.originalEvent ? jqEvent.originalEvent : jqEvent;
          options.triggerOnTouchLeave && (phase = getNextPhase(PHASE_END), triggerHandler(event, phase));
        }
        function removeListeners() {
          $element.off(START_EV, touchStart), $element.off(CANCEL_EV, touchCancel), $element.off(MOVE_EV, touchMove), $element.off(END_EV, touchEnd), LEAVE_EV && $element.off(LEAVE_EV, touchLeave), setTouchInProgress(false);
        }
        function getNextPhase(currentPhase) {
          var nextPhase = currentPhase, validTime = validateSwipeTime(), validDistance = validateSwipeDistance(), didCancel = didSwipeBackToCancel();
          return !validTime || didCancel ? nextPhase = PHASE_CANCEL : !validDistance || currentPhase != PHASE_MOVE || options.triggerOnTouchEnd && !options.triggerOnTouchLeave ? !validDistance && currentPhase == PHASE_END && options.triggerOnTouchLeave && (nextPhase = PHASE_CANCEL) : nextPhase = PHASE_END, nextPhase;
        }
        function triggerHandler(event, phase2) {
          var ret, touches = event.touches;
          return (didSwipe() || hasSwipes()) && (ret = triggerHandlerForGesture(event, phase2, SWIPE)), (didPinch() || hasPinches()) && ret !== false && (ret = triggerHandlerForGesture(event, phase2, PINCH)), didDoubleTap() && ret !== false ? ret = triggerHandlerForGesture(event, phase2, DOUBLE_TAP) : didLongTap() && ret !== false ? ret = triggerHandlerForGesture(event, phase2, LONG_TAP) : didTap() && ret !== false && (ret = triggerHandlerForGesture(event, phase2, TAP)), phase2 === PHASE_CANCEL && touchCancel(), phase2 === PHASE_END && (touches ? touches.length || touchCancel() : touchCancel()), ret;
        }
        function triggerHandlerForGesture(event, phase2, gesture) {
          var ret;
          if (gesture == SWIPE) {
            if ($element.trigger("swipeStatus", [phase2, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection]), options.swipeStatus && (ret = options.swipeStatus.call($element, event, phase2, direction || null, distance || 0, duration || 0, fingerCount, fingerData, currentDirection), ret === false))
              return false;
            if (phase2 == PHASE_END && validateSwipe()) {
              if (clearTimeout(singleTapTimeout), clearTimeout(holdTimeout), $element.trigger("swipe", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipe && (ret = options.swipe.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection), ret === false))
                return false;
              switch (direction) {
                case LEFT:
                  $element.trigger("swipeLeft", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeLeft && (ret = options.swipeLeft.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection));
                  break;
                case RIGHT:
                  $element.trigger("swipeRight", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeRight && (ret = options.swipeRight.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection));
                  break;
                case UP:
                  $element.trigger("swipeUp", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeUp && (ret = options.swipeUp.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection));
                  break;
                case DOWN:
                  $element.trigger("swipeDown", [direction, distance, duration, fingerCount, fingerData, currentDirection]), options.swipeDown && (ret = options.swipeDown.call($element, event, direction, distance, duration, fingerCount, fingerData, currentDirection));
              }
            }
          }
          if (gesture == PINCH) {
            if ($element.trigger("pinchStatus", [phase2, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]), options.pinchStatus && (ret = options.pinchStatus.call($element, event, phase2, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData), ret === false))
              return false;
            if (phase2 == PHASE_END && validatePinch())
              switch (pinchDirection) {
                case IN:
                  $element.trigger("pinchIn", [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]), options.pinchIn && (ret = options.pinchIn.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData));
                  break;
                case OUT:
                  $element.trigger("pinchOut", [pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData]), options.pinchOut && (ret = options.pinchOut.call($element, event, pinchDirection || null, pinchDistance || 0, duration || 0, fingerCount, pinchZoom, fingerData));
              }
          }
          return gesture == TAP ? phase2 !== PHASE_CANCEL && phase2 !== PHASE_END || (clearTimeout(singleTapTimeout), clearTimeout(holdTimeout), hasDoubleTap() && !inDoubleTap() ? (doubleTapStartTime = getTimeStamp(), singleTapTimeout = setTimeout($2.proxy(function() {
            doubleTapStartTime = null, $element.trigger("tap", [event.target]), options.tap && (ret = options.tap.call($element, event, event.target));
          }, this), options.doubleTapThreshold)) : (doubleTapStartTime = null, $element.trigger("tap", [event.target]), options.tap && (ret = options.tap.call($element, event, event.target)))) : gesture == DOUBLE_TAP ? phase2 !== PHASE_CANCEL && phase2 !== PHASE_END || (clearTimeout(singleTapTimeout), clearTimeout(holdTimeout), doubleTapStartTime = null, $element.trigger("doubletap", [event.target]), options.doubleTap && (ret = options.doubleTap.call($element, event, event.target))) : gesture == LONG_TAP && (phase2 !== PHASE_CANCEL && phase2 !== PHASE_END || (clearTimeout(singleTapTimeout), doubleTapStartTime = null, $element.trigger("longtap", [event.target]), options.longTap && (ret = options.longTap.call($element, event, event.target)))), ret;
        }
        function validateSwipeDistance() {
          var valid = true;
          return null !== options.threshold && (valid = distance >= options.threshold), valid;
        }
        function didSwipeBackToCancel() {
          var cancelled = false;
          return null !== options.cancelThreshold && null !== direction && (cancelled = getMaxDistance(direction) - distance >= options.cancelThreshold), cancelled;
        }
        function validatePinchDistance() {
          return null !== options.pinchThreshold ? pinchDistance >= options.pinchThreshold : true;
        }
        function validateSwipeTime() {
          return options.maxTimeThreshold ? !(duration >= options.maxTimeThreshold) : true;
        }
        function validateDefaultEvent(jqEvent, direction2) {
          if (options.preventDefaultEvents !== false)
            if (options.allowPageScroll === NONE)
              jqEvent.preventDefault();
            else {
              var auto = options.allowPageScroll === AUTO;
              switch (direction2) {
                case LEFT:
                  (options.swipeLeft && auto || !auto && options.allowPageScroll != HORIZONTAL) && jqEvent.preventDefault();
                  break;
                case RIGHT:
                  (options.swipeRight && auto || !auto && options.allowPageScroll != HORIZONTAL) && jqEvent.preventDefault();
                  break;
                case UP:
                  (options.swipeUp && auto || !auto && options.allowPageScroll != VERTICAL) && jqEvent.preventDefault();
                  break;
                case DOWN:
                  (options.swipeDown && auto || !auto && options.allowPageScroll != VERTICAL) && jqEvent.preventDefault();
                  break;
              }
            }
        }
        function validatePinch() {
          var hasCorrectFingerCount = validateFingers(), hasEndPoint = validateEndPoint(), hasCorrectDistance = validatePinchDistance();
          return hasCorrectFingerCount && hasEndPoint && hasCorrectDistance;
        }
        function hasPinches() {
          return !!(options.pinchStatus || options.pinchIn || options.pinchOut);
        }
        function didPinch() {
          return !(!validatePinch() || !hasPinches());
        }
        function validateSwipe() {
          var hasValidTime = validateSwipeTime(), hasValidDistance = validateSwipeDistance(), hasCorrectFingerCount = validateFingers(), hasEndPoint = validateEndPoint(), didCancel = didSwipeBackToCancel(), valid = !didCancel && hasEndPoint && hasCorrectFingerCount && hasValidDistance && hasValidTime;
          return valid;
        }
        function hasSwipes() {
          return !!(options.swipe || options.swipeStatus || options.swipeLeft || options.swipeRight || options.swipeUp || options.swipeDown);
        }
        function didSwipe() {
          return !(!validateSwipe() || !hasSwipes());
        }
        function validateFingers() {
          return fingerCount === options.fingers || options.fingers === ALL_FINGERS || !SUPPORTS_TOUCH;
        }
        function validateEndPoint() {
          return 0 !== fingerData[0].end.x;
        }
        function hasTap() {
          return !!options.tap;
        }
        function hasDoubleTap() {
          return !!options.doubleTap;
        }
        function hasLongTap() {
          return !!options.longTap;
        }
        function validateDoubleTap() {
          if (null == doubleTapStartTime)
            return false;
          var now = getTimeStamp();
          return hasDoubleTap() && now - doubleTapStartTime <= options.doubleTapThreshold;
        }
        function inDoubleTap() {
          return validateDoubleTap();
        }
        function validateTap() {
          return (1 === fingerCount || !SUPPORTS_TOUCH) && (isNaN(distance) || distance < options.threshold);
        }
        function validateLongTap() {
          return duration > options.longTapThreshold && DOUBLE_TAP_THRESHOLD > distance;
        }
        function didTap() {
          return !(!validateTap() || !hasTap());
        }
        function didDoubleTap() {
          return !(!validateDoubleTap() || !hasDoubleTap());
        }
        function didLongTap() {
          return !(!validateLongTap() || !hasLongTap());
        }
        function startMultiFingerRelease(event) {
          previousTouchEndTime = getTimeStamp(), fingerCountAtRelease = event.touches.length + 1;
        }
        function cancelMultiFingerRelease() {
          previousTouchEndTime = 0, fingerCountAtRelease = 0;
        }
        function inMultiFingerRelease() {
          var withinThreshold = false;
          if (previousTouchEndTime) {
            var diff = getTimeStamp() - previousTouchEndTime;
            diff <= options.fingerReleaseThreshold && (withinThreshold = true);
          }
          return withinThreshold;
        }
        function getTouchInProgress() {
          return !($element.data(PLUGIN_NS + "_intouch") !== true);
        }
        function setTouchInProgress(val) {
          $element && (val === true ? ($element.on(MOVE_EV, touchMove), $element.on(END_EV, touchEnd), LEAVE_EV && $element.on(LEAVE_EV, touchLeave)) : ($element.off(MOVE_EV, touchMove, false), $element.off(END_EV, touchEnd, false), LEAVE_EV && $element.off(LEAVE_EV, touchLeave, false)), $element.data(PLUGIN_NS + "_intouch", val === true));
        }
        function createFingerData(id, evt) {
          var f = { start: { x: 0, y: 0 }, last: { x: 0, y: 0 }, end: { x: 0, y: 0 } };
          return f.start.x = f.last.x = f.end.x = evt.pageX || evt.clientX, f.start.y = f.last.y = f.end.y = evt.pageY || evt.clientY, fingerData[id] = f, f;
        }
        function updateFingerData(evt) {
          var id = void 0 !== evt.identifier ? evt.identifier : 0, f = getFingerData(id);
          return null === f && (f = createFingerData(id, evt)), f.last.x = f.end.x, f.last.y = f.end.y, f.end.x = evt.pageX || evt.clientX, f.end.y = evt.pageY || evt.clientY, f;
        }
        function getFingerData(id) {
          return fingerData[id] || null;
        }
        function setMaxDistance(direction2, distance2) {
          direction2 != NONE && (distance2 = Math.max(distance2, getMaxDistance(direction2)), maximumsMap[direction2].distance = distance2);
        }
        function getMaxDistance(direction2) {
          return maximumsMap[direction2] ? maximumsMap[direction2].distance : void 0;
        }
        function createMaximumsData() {
          var maxData = {};
          return maxData[LEFT] = createMaximumVO(LEFT), maxData[RIGHT] = createMaximumVO(RIGHT), maxData[UP] = createMaximumVO(UP), maxData[DOWN] = createMaximumVO(DOWN), maxData;
        }
        function createMaximumVO(dir) {
          return { direction: dir, distance: 0 };
        }
        function calculateDuration() {
          return endTime - startTime;
        }
        function calculateTouchesDistance(startPoint, endPoint) {
          var diffX = Math.abs(startPoint.x - endPoint.x), diffY = Math.abs(startPoint.y - endPoint.y);
          return Math.round(Math.sqrt(diffX * diffX + diffY * diffY));
        }
        function calculatePinchZoom(startDistance, endDistance) {
          var percent = endDistance / startDistance * 1;
          return percent.toFixed(2);
        }
        function calculatePinchDirection() {
          return 1 > pinchZoom ? OUT : IN;
        }
        function calculateDistance(startPoint, endPoint) {
          return Math.round(Math.sqrt(Math.pow(endPoint.x - startPoint.x, 2) + Math.pow(endPoint.y - startPoint.y, 2)));
        }
        function calculateAngle(startPoint, endPoint) {
          var x = startPoint.x - endPoint.x, y = endPoint.y - startPoint.y, r = Math.atan2(y, x), angle = Math.round(180 * r / Math.PI);
          return 0 > angle && (angle = 360 - Math.abs(angle)), angle;
        }
        function calculateDirection(startPoint, endPoint) {
          if (comparePoints(startPoint, endPoint))
            return NONE;
          var angle = calculateAngle(startPoint, endPoint);
          return 45 >= angle && angle >= 0 ? LEFT : 360 >= angle && angle >= 315 ? LEFT : angle >= 135 && 225 >= angle ? RIGHT : angle > 45 && 135 > angle ? DOWN : UP;
        }
        function getTimeStamp() {
          var now = /* @__PURE__ */ new Date();
          return now.getTime();
        }
        function getbounds(el) {
          el = $2(el);
          var offset = el.offset(), bounds = { left: offset.left, right: offset.left + el.outerWidth(), top: offset.top, bottom: offset.top + el.outerHeight() };
          return bounds;
        }
        function isInBounds(point, bounds) {
          return point.x > bounds.left && point.x < bounds.right && point.y > bounds.top && point.y < bounds.bottom;
        }
        function comparePoints(pointA, pointB) {
          return pointA.x == pointB.x && pointA.y == pointB.y;
        }
        var options = $2.extend({}, options), useTouchEvents = SUPPORTS_TOUCH || SUPPORTS_POINTER || !options.fallbackToMouseEvents, START_EV = useTouchEvents ? SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerDown" : "pointerdown" : "touchstart" : "mousedown", MOVE_EV = useTouchEvents ? SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerMove" : "pointermove" : "touchmove" : "mousemove", END_EV = useTouchEvents ? SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerUp" : "pointerup" : "touchend" : "mouseup", LEAVE_EV = useTouchEvents ? SUPPORTS_POINTER ? "mouseleave" : null : "mouseleave", CANCEL_EV = SUPPORTS_POINTER ? SUPPORTS_POINTER_IE10 ? "MSPointerCancel" : "pointercancel" : "touchcancel", distance = 0, direction = null, currentDirection = null, duration = 0, startTouchesDistance = 0, endTouchesDistance = 0, pinchZoom = 1, pinchDistance = 0, pinchDirection = 0, maximumsMap = null, $element = $2(element), phase = "start", fingerCount = 0, fingerData = {}, startTime = 0, endTime = 0, previousTouchEndTime = 0, fingerCountAtRelease = 0, doubleTapStartTime = 0, singleTapTimeout = null, holdTimeout = null;
        try {
          $element.on(START_EV, touchStart), $element.on(CANCEL_EV, touchCancel);
        } catch (e) {
          $2.error("events not supported " + START_EV + "," + CANCEL_EV + " on jQuery.swipe");
        }
        this.enable = function() {
          return this.disable(), $element.on(START_EV, touchStart), $element.on(CANCEL_EV, touchCancel), $element;
        }, this.disable = function() {
          return removeListeners(), $element;
        }, this.destroy = function() {
          removeListeners(), $element.data(PLUGIN_NS, null), $element = null;
        }, this.option = function(property, value) {
          if ("object" == typeof property)
            options = $2.extend(options, property);
          else if (void 0 !== options[property]) {
            if (void 0 === value)
              return options[property];
            options[property] = value;
          } else {
            if (!property)
              return options;
            $2.error("Option " + property + " does not exist on jQuery.swipe.options");
          }
          return null;
        };
      }
      var VERSION = "1.6.18", LEFT = "left", RIGHT = "right", UP = "up", DOWN = "down", IN = "in", OUT = "out", NONE = "none", AUTO = "auto", SWIPE = "swipe", PINCH = "pinch", TAP = "tap", DOUBLE_TAP = "doubletap", LONG_TAP = "longtap", HORIZONTAL = "horizontal", VERTICAL = "vertical", ALL_FINGERS = "all", DOUBLE_TAP_THRESHOLD = 10, PHASE_START = "start", PHASE_MOVE = "move", PHASE_END = "end", PHASE_CANCEL = "cancel", SUPPORTS_TOUCH = "ontouchstart" in window, SUPPORTS_POINTER_IE10 = window.navigator.msPointerEnabled && !window.PointerEvent && !SUPPORTS_TOUCH, SUPPORTS_POINTER = (window.PointerEvent || window.navigator.msPointerEnabled) && !SUPPORTS_TOUCH, PLUGIN_NS = "TouchSwipe", defaults = { fingers: 1, threshold: 75, cancelThreshold: null, pinchThreshold: 20, maxTimeThreshold: null, fingerReleaseThreshold: 250, longTapThreshold: 500, doubleTapThreshold: 200, swipe: null, swipeLeft: null, swipeRight: null, swipeUp: null, swipeDown: null, swipeStatus: null, pinchIn: null, pinchOut: null, pinchStatus: null, click: null, tap: null, doubleTap: null, longTap: null, hold: null, triggerOnTouchEnd: true, triggerOnTouchLeave: false, allowPageScroll: "auto", fallbackToMouseEvents: true, excludedElements: ".noSwipe", preventDefaultEvents: true };
      $2.fn.swipe = function(method) {
        var $this = $2(this), plugin = $this.data(PLUGIN_NS);
        if (plugin && "string" == typeof method) {
          if (plugin[method])
            return plugin[method].apply(plugin, Array.prototype.slice.call(arguments, 1));
          $2.error("Method " + method + " does not exist on jQuery.swipe");
        } else if (plugin && "object" == typeof method)
          plugin.option.apply(plugin, arguments);
        else if (!(plugin || "object" != typeof method && method))
          return init.apply(this, arguments);
        return $this;
      }, $2.fn.swipe.version = VERSION, $2.fn.swipe.defaults = defaults, $2.fn.swipe.phases = { PHASE_START, PHASE_MOVE, PHASE_END, PHASE_CANCEL }, $2.fn.swipe.directions = { LEFT, RIGHT, UP, DOWN, IN, OUT }, $2.fn.swipe.pageScroll = { NONE, HORIZONTAL, VERTICAL, AUTO }, $2.fn.swipe.fingers = { ONE: 1, TWO: 2, THREE: 3, FOUR: 4, FIVE: 5, ALL: ALL_FINGERS };
    });
  })(jquery_touchSwipe_min);
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  const passwordPolicy = {
    template: "#password-feedback",
    hint: ".js-hint-password",
    container: ".password-strength-feedback",
    strengthText: ".password-strength-text",
    requirementScore: ".password-requirements-score",
    requirementLength: ".password-requirements-length",
    requirementScoreIcon: ".password-requirements-score i",
    requirementLengthIcon: ".password-requirements-length i",
    progressBar: ".progress-bar",
    inputColumn: ".js-input-column"
  };
  prestashop$1.themeSelectors = {
    product: {
      tabs: ".tabs .nav-link",
      activeNavClass: "js-product-nav-active",
      activeTabClass: "js-product-tab-active",
      activeTabs: ".tabs .nav-link.active, .js-product-nav-active",
      imagesModal: ".js-product-images-modal",
      thumb: ".js-thumb",
      thumbContainer: ".thumb-container, .js-thumb-container",
      arrows: ".js-arrows",
      selected: ".selected, .js-thumb-selected",
      modalProductCover: ".js-modal-product-cover",
      cover: ".js-qv-product-cover",
      customizationModal: ".js-customization-modal"
    },
    listing: {
      searchFilterToggler: "#search_filter_toggler, .js-search-toggler",
      searchFiltersWrapper: "#search_filters_wrapper",
      searchFilterControls: "#search_filter_controls",
      searchFilters: "#search_filters",
      activeSearchFilters: "#js-active-search-filters",
      listTop: "#js-product-list-top",
      product: ".js-product",
      list: "#js-product-list",
      listBottom: "#js-product-list-bottom",
      listHeader: "#js-product-list-header",
      searchFiltersClearAll: ".js-search-filters-clear-all",
      searchLink: ".js-search-link"
    },
    order: {
      returnForm: "#order-return-form, .js-order-return-form"
    },
    arrowDown: ".arrow-down, .js-arrow-down",
    arrowUp: ".arrow-up, .js-arrow-up",
    clear: ".clear",
    fileInput: ".js-file-input",
    contentWrapper: "#content-wrapper, .js-content-wrapper",
    footer: "#footer, .js-footer",
    modalContent: ".js-modal-content",
    modal: "#modal, .js-checkout-modal",
    touchspin: ".js-touchspin",
    checkout: {
      termsLink: ".js-terms a",
      giftCheckbox: ".js-gift-checkbox",
      imagesLink: ".card-block .cart-summary-products p a, .js-show-details",
      carrierExtraContent: ".carrier-extra-content, .js-carrier-extra-content",
      btn: ".checkout a"
    },
    cart: {
      productLineQty: ".js-cart-line-product-quantity",
      quickview: ".quickview",
      touchspin: ".bootstrap-touchspin",
      promoCode: "#promo-code",
      displayPromo: ".display-promo",
      promoCodeButton: ".promo-code-button",
      discountCode: ".js-discount .code",
      discountName: "[name=discount_name]",
      actions: '[data-link-action="delete-from-cart"], [data-link-action="remove-voucher"]'
    },
    notifications: {
      dangerAlert: "#notifications article.alert-danger",
      container: "#notifications .notifications-container"
    },
    passwordPolicy
  };
  $$1(document).ready(() => {
    prestashop$1.emit("themeSelectorsInit");
  });
  var simpletabspluginname = "simpletabs";
  function SimpleTabsPlugin(element, options) {
    this.$el = $$1(element);
    this.$tabs = [];
    this.init();
  }
  $$1.extend(SimpleTabsPlugin.prototype, {
    init() {
      var self2 = this;
      this.$tabs = [];
      this.$el.find("ul > li > a").each(function() {
        var $a = $$1(this);
        var id = $a.attr("href");
        if (id.startsWith("#")) {
          id = id.replace("#", "");
          var exists = self2.$tabs.find(function(element) {
            return element === id;
          });
          var contentselector = "#" + id + ".tabs-content";
          var content = self2.$el.find(contentselector);
          if (exists) {
            exists.tab = $a;
            exists.content = content;
          } else {
            self2.$tabs.push({
              id,
              tab: $a,
              content
            });
          }
        }
      });
      self2.$tabs.forEach(function(element) {
        if (!element.tab.hasClass("active")) {
          self2.hide(element.id);
        } else {
          self2.show(element.id);
        }
        element.tab.click(function(event) {
          event.preventDefault();
          self2.show(element.id);
        });
      });
    },
    show(id) {
      var self2 = this;
      this.$tabs.forEach(function(element) {
        self2.hide(element.id);
        if (element.id === id) {
          element.tab.addClass("active").addClass("font-bold");
          element.content.removeClass("hidden");
        }
      });
    },
    hide(id) {
      this.$tabs.forEach(function(element) {
        if (element.id === id) {
          element.tab.removeClass("active").removeClass("font-bold");
          element.content.addClass("hidden");
        }
      });
    }
  });
  $$1.fn.simpletabs = function(options) {
    this.each(function() {
      if (!$$1.data(this, "plugin_" + simpletabspluginname)) {
        $$1.data(this, "plugin_" + simpletabspluginname, new SimpleTabsPlugin(this));
      }
    });
  };
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  prestashop$1.responsive = prestashop$1.responsive || {};
  prestashop$1.responsive.current_width = window.innerWidth;
  prestashop$1.responsive.min_width = 768;
  prestashop$1.responsive.mobile = prestashop$1.responsive.current_width < prestashop$1.responsive.min_width;
  function swapChildren(obj1, obj2) {
    const temp = obj2.children().detach();
    obj2.empty().append(obj1.children().detach());
    obj1.append(temp);
  }
  function toggleMobileStyles() {
    if (prestashop$1.responsive.mobile) {
      $$1("*[id^='_desktop_']").each((idx, el) => {
        const target = $$1(`#${el.id.replace("_desktop_", "_mobile_")}`);
        if (target.length) {
          swapChildren($$1(el), target);
        }
      });
    } else {
      $$1("*[id^='_mobile_']").each((idx, el) => {
        const target = $$1(`#${el.id.replace("_mobile_", "_desktop_")}`);
        if (target.length) {
          swapChildren($$1(el), target);
        }
      });
    }
    prestashop$1.emit("responsive update", {
      mobile: prestashop$1.responsive.mobile
    });
  }
  $$1(window).on("resize", () => {
    const cw = prestashop$1.responsive.current_width;
    const mw = prestashop$1.responsive.min_width;
    const w = window.innerWidth;
    const toggle = cw >= mw && w < mw || cw < mw && w >= mw;
    prestashop$1.responsive.current_width = w;
    prestashop$1.responsive.mobile = prestashop$1.responsive.current_width < prestashop$1.responsive.min_width;
    if (toggle) {
      toggleMobileStyles();
    }
  });
  $$1(document).ready(() => {
    if (prestashop$1.responsive.mobile) {
      toggleMobileStyles();
    }
  });
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  function setUpCheckout() {
    $$1(prestashop$1.themeSelectors.checkout.termsLink).on("click", (event) => {
      event.preventDefault();
      let url = $$1(event.target).attr("href");
      if (url) {
        url += "?content_only=1";
        $$1.get(url, (content) => {
          $$1(prestashop$1.themeSelectors.modal).find(prestashop$1.themeSelectors.modalContent).html($$1(content).find(".page-cms").contents());
        }).fail((resp) => {
          prestashop$1.emit("handleError", { eventType: "clickTerms", resp });
        });
      }
      $$1(prestashop$1.themeSelectors.modal).modal("show");
    });
    $$1(prestashop$1.themeSelectors.checkout.giftCheckbox).on("click", () => {
      $$1("#gift").slideToggle();
    });
  }
  function toggleImage() {
    $$1(prestashop$1.themeSelectors.checkout.imagesLink).on("click", function() {
      const icon = $$1(this).find("i.material-icons");
      if (icon.text() === "expand_more") {
        icon.text("expand_less");
      } else {
        icon.text("expand_more");
      }
    });
  }
  $$1(function() {
    if ($$1("body#checkout").length === 1) {
      setUpCheckout();
      toggleImage();
    }
    $$1(".tabs").simpletabs();
    prestashop$1.on("updatedDeliveryForm", (params) => {
      if (typeof params.deliveryOption === "undefined" || params.deliveryOption.length === 0) {
        return;
      }
      $$1(prestashop$1.themeSelectors.checkout.carrierExtraContent).hide();
      params.deliveryOption.next(prestashop$1.themeSelectors.checkout.carrierExtraContent).slideDown();
    });
  });
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  function initRmaItemSelector() {
    $$1(`${prestashop$1.themeSelectors.order.returnForm} table thead input[type=checkbox]`).on("click", function() {
      const checked = $$1(this).prop("checked");
      $$1(`${prestashop$1.themeSelectors.order.returnForm} table tbody input[type=checkbox]`).each((_, checkbox) => {
        $$1(checkbox).prop("checked", checked);
      });
    });
  }
  function setupCustomerScripts() {
    if ($$1("body#order-detail")) {
      initRmaItemSelector();
    }
  }
  $$1(document).ready(setupCustomerScripts);
  var velocity = { exports: {} };
  /*! VelocityJS.org (1.5.2). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
  (function(module) {
    /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */
    (function(window2) {
      if (window2.jQuery) {
        return;
      }
      var $2 = function(selector, context) {
        return new $2.fn.init(selector, context);
      };
      $2.isWindow = function(obj) {
        return obj && obj === obj.window;
      };
      $2.type = function(obj) {
        if (!obj) {
          return obj + "";
        }
        return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
      };
      $2.isArray = Array.isArray || function(obj) {
        return $2.type(obj) === "array";
      };
      function isArraylike(obj) {
        var length = obj.length, type = $2.type(obj);
        if (type === "function" || $2.isWindow(obj)) {
          return false;
        }
        if (obj.nodeType === 1 && length) {
          return true;
        }
        return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
      }
      $2.isPlainObject = function(obj) {
        var key;
        if (!obj || $2.type(obj) !== "object" || obj.nodeType || $2.isWindow(obj)) {
          return false;
        }
        try {
          if (obj.constructor && !hasOwn.call(obj, "constructor") && !hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) {
            return false;
          }
        } catch (e) {
          return false;
        }
        for (key in obj) {
        }
        return key === void 0 || hasOwn.call(obj, key);
      };
      $2.each = function(obj, callback, args) {
        var value, i2 = 0, length = obj.length, isArray = isArraylike(obj);
        if (args) {
          if (isArray) {
            for (; i2 < length; i2++) {
              value = callback.apply(obj[i2], args);
              if (value === false) {
                break;
              }
            }
          } else {
            for (i2 in obj) {
              if (!obj.hasOwnProperty(i2)) {
                continue;
              }
              value = callback.apply(obj[i2], args);
              if (value === false) {
                break;
              }
            }
          }
        } else {
          if (isArray) {
            for (; i2 < length; i2++) {
              value = callback.call(obj[i2], i2, obj[i2]);
              if (value === false) {
                break;
              }
            }
          } else {
            for (i2 in obj) {
              if (!obj.hasOwnProperty(i2)) {
                continue;
              }
              value = callback.call(obj[i2], i2, obj[i2]);
              if (value === false) {
                break;
              }
            }
          }
        }
        return obj;
      };
      $2.data = function(node, key, value) {
        if (value === void 0) {
          var getId = node[$2.expando], store = getId && cache[getId];
          if (key === void 0) {
            return store;
          } else if (store) {
            if (key in store) {
              return store[key];
            }
          }
        } else if (key !== void 0) {
          var setId = node[$2.expando] || (node[$2.expando] = ++$2.uuid);
          cache[setId] = cache[setId] || {};
          cache[setId][key] = value;
          return value;
        }
      };
      $2.removeData = function(node, keys) {
        var id = node[$2.expando], store = id && cache[id];
        if (store) {
          if (!keys) {
            delete cache[id];
          } else {
            $2.each(keys, function(_, key) {
              delete store[key];
            });
          }
        }
      };
      $2.extend = function() {
        var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {}, i2 = 1, length = arguments.length, deep = false;
        if (typeof target === "boolean") {
          deep = target;
          target = arguments[i2] || {};
          i2++;
        }
        if (typeof target !== "object" && $2.type(target) !== "function") {
          target = {};
        }
        if (i2 === length) {
          target = this;
          i2--;
        }
        for (; i2 < length; i2++) {
          if (options = arguments[i2]) {
            for (name in options) {
              if (!options.hasOwnProperty(name)) {
                continue;
              }
              src = target[name];
              copy = options[name];
              if (target === copy) {
                continue;
              }
              if (deep && copy && ($2.isPlainObject(copy) || (copyIsArray = $2.isArray(copy)))) {
                if (copyIsArray) {
                  copyIsArray = false;
                  clone = src && $2.isArray(src) ? src : [];
                } else {
                  clone = src && $2.isPlainObject(src) ? src : {};
                }
                target[name] = $2.extend(deep, clone, copy);
              } else if (copy !== void 0) {
                target[name] = copy;
              }
            }
          }
        }
        return target;
      };
      $2.queue = function(elem, type, data) {
        function $makeArray(arr, results) {
          var ret = results || [];
          if (arr) {
            if (isArraylike(Object(arr))) {
              (function(first, second) {
                var len = +second.length, j = 0, i2 = first.length;
                while (j < len) {
                  first[i2++] = second[j++];
                }
                if (len !== len) {
                  while (second[j] !== void 0) {
                    first[i2++] = second[j++];
                  }
                }
                first.length = i2;
                return first;
              })(ret, typeof arr === "string" ? [arr] : arr);
            } else {
              [].push.call(ret, arr);
            }
          }
          return ret;
        }
        if (!elem) {
          return;
        }
        type = (type || "fx") + "queue";
        var q = $2.data(elem, type);
        if (!data) {
          return q || [];
        }
        if (!q || $2.isArray(data)) {
          q = $2.data(elem, type, $makeArray(data));
        } else {
          q.push(data);
        }
        return q;
      };
      $2.dequeue = function(elems, type) {
        $2.each(elems.nodeType ? [elems] : elems, function(i2, elem) {
          type = type || "fx";
          var queue = $2.queue(elem, type), fn = queue.shift();
          if (fn === "inprogress") {
            fn = queue.shift();
          }
          if (fn) {
            if (type === "fx") {
              queue.unshift("inprogress");
            }
            fn.call(elem, function() {
              $2.dequeue(elem, type);
            });
          }
        });
      };
      $2.fn = $2.prototype = {
        init: function(selector) {
          if (selector.nodeType) {
            this[0] = selector;
            return this;
          } else {
            throw new Error("Not a DOM node.");
          }
        },
        offset: function() {
          var box = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 };
          return {
            top: box.top + (window2.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0),
            left: box.left + (window2.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0)
          };
        },
        position: function() {
          function offsetParentFn(elem2) {
            var offsetParent2 = elem2.offsetParent;
            while (offsetParent2 && (offsetParent2.nodeName.toLowerCase() !== "html" && offsetParent2.style && offsetParent2.style.position.toLowerCase() === "static")) {
              offsetParent2 = offsetParent2.offsetParent;
            }
            return offsetParent2 || document;
          }
          var elem = this[0], offsetParent = offsetParentFn(elem), offset = this.offset(), parentOffset = /^(?:body|html)$/i.test(offsetParent.nodeName) ? { top: 0, left: 0 } : $2(offsetParent).offset();
          offset.top -= parseFloat(elem.style.marginTop) || 0;
          offset.left -= parseFloat(elem.style.marginLeft) || 0;
          if (offsetParent.style) {
            parentOffset.top += parseFloat(offsetParent.style.borderTopWidth) || 0;
            parentOffset.left += parseFloat(offsetParent.style.borderLeftWidth) || 0;
          }
          return {
            top: offset.top - parentOffset.top,
            left: offset.left - parentOffset.left
          };
        }
      };
      var cache = {};
      $2.expando = "velocity" + (/* @__PURE__ */ new Date()).getTime();
      $2.uuid = 0;
      var class2type = {}, hasOwn = class2type.hasOwnProperty, toString = class2type.toString;
      var types = "Boolean Number String Function Array Date RegExp Object Error".split(" ");
      for (var i = 0; i < types.length; i++) {
        class2type["[object " + types[i] + "]"] = types[i].toLowerCase();
      }
      $2.fn.init.prototype = $2.fn;
      window2.Velocity = { Utilities: $2 };
    })(window);
    (function(factory) {
      {
        module.exports = factory();
      }
    })(function() {
      return function(global2, window2, document2, undefined$1) {
        var IE = function() {
          if (document2.documentMode) {
            return document2.documentMode;
          } else {
            for (var i = 7; i > 4; i--) {
              var div = document2.createElement("div");
              div.innerHTML = "<!--[if IE " + i + "]><span></span><![endif]-->";
              if (div.getElementsByTagName("span").length) {
                div = null;
                return i;
              }
            }
          }
          return undefined$1;
        }();
        var rAFShim = function() {
          var timeLast = 0;
          return window2.webkitRequestAnimationFrame || window2.mozRequestAnimationFrame || function(callback) {
            var timeCurrent = (/* @__PURE__ */ new Date()).getTime(), timeDelta;
            timeDelta = Math.max(0, 16 - (timeCurrent - timeLast));
            timeLast = timeCurrent + timeDelta;
            return setTimeout(function() {
              callback(timeCurrent + timeDelta);
            }, timeDelta);
          };
        }();
        var performance = function() {
          var perf = window2.performance || {};
          if (typeof perf.now !== "function") {
            var nowOffset = perf.timing && perf.timing.navigationStart ? perf.timing.navigationStart : (/* @__PURE__ */ new Date()).getTime();
            perf.now = function() {
              return (/* @__PURE__ */ new Date()).getTime() - nowOffset;
            };
          }
          return perf;
        }();
        function compactSparseArray(array) {
          var index = -1, length = array ? array.length : 0, result = [];
          while (++index < length) {
            var value = array[index];
            if (value) {
              result.push(value);
            }
          }
          return result;
        }
        var _slice = function() {
          var slice = Array.prototype.slice;
          try {
            slice.call(document2.documentElement);
            return slice;
          } catch (e) {
            return function(begin, end) {
              var len = this.length;
              if (typeof begin !== "number") {
                begin = 0;
              }
              if (typeof end !== "number") {
                end = len;
              }
              if (this.slice) {
                return slice.call(this, begin, end);
              }
              var i, cloned = [], start = begin >= 0 ? begin : Math.max(0, len + begin), upTo = end < 0 ? len + end : Math.min(end, len), size = upTo - start;
              if (size > 0) {
                cloned = new Array(size);
                if (this.charAt) {
                  for (i = 0; i < size; i++) {
                    cloned[i] = this.charAt(start + i);
                  }
                } else {
                  for (i = 0; i < size; i++) {
                    cloned[i] = this[start + i];
                  }
                }
              }
              return cloned;
            };
          }
        }();
        var _inArray = function() {
          if (Array.prototype.includes) {
            return function(arr, val) {
              return arr.includes(val);
            };
          }
          if (Array.prototype.indexOf) {
            return function(arr, val) {
              return arr.indexOf(val) >= 0;
            };
          }
          return function(arr, val) {
            for (var i = 0; i < arr.length; i++) {
              if (arr[i] === val) {
                return true;
              }
            }
            return false;
          };
        };
        function sanitizeElements(elements) {
          if (Type.isWrapped(elements)) {
            elements = _slice.call(elements);
          } else if (Type.isNode(elements)) {
            elements = [elements];
          }
          return elements;
        }
        var Type = {
          isNumber: function(variable) {
            return typeof variable === "number";
          },
          isString: function(variable) {
            return typeof variable === "string";
          },
          isArray: Array.isArray || function(variable) {
            return Object.prototype.toString.call(variable) === "[object Array]";
          },
          isFunction: function(variable) {
            return Object.prototype.toString.call(variable) === "[object Function]";
          },
          isNode: function(variable) {
            return variable && variable.nodeType;
          },
          /* Determine if variable is an array-like wrapped jQuery, Zepto or similar element, or even a NodeList etc. */
          /* NOTE: HTMLFormElements also have a length. */
          isWrapped: function(variable) {
            return variable && variable !== window2 && Type.isNumber(variable.length) && !Type.isString(variable) && !Type.isFunction(variable) && !Type.isNode(variable) && (variable.length === 0 || Type.isNode(variable[0]));
          },
          isSVG: function(variable) {
            return window2.SVGElement && variable instanceof window2.SVGElement;
          },
          isEmptyObject: function(variable) {
            for (var name in variable) {
              if (variable.hasOwnProperty(name)) {
                return false;
              }
            }
            return true;
          }
        };
        var $2, isJQuery = false;
        if (global2.fn && global2.fn.jquery) {
          $2 = global2;
          isJQuery = true;
        } else {
          $2 = window2.Velocity.Utilities;
        }
        if (IE <= 8 && !isJQuery) {
          throw new Error("Velocity: IE8 and below require jQuery to be loaded before Velocity.");
        } else if (IE <= 7) {
          jQuery.fn.velocity = jQuery.fn.animate;
          return;
        }
        var DURATION_DEFAULT = 400, EASING_DEFAULT = "swing";
        var Velocity = {
          /* Container for page-wide Velocity state data. */
          State: {
            /* Detect mobile devices to determine if mobileHA should be turned on. */
            isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window2.navigator.userAgent),
            /* The mobileHA option's behavior changes on older Android devices (Gingerbread, versions 2.3.3-2.3.7). */
            isAndroid: /Android/i.test(window2.navigator.userAgent),
            isGingerbread: /Android 2\.3\.[3-7]/i.test(window2.navigator.userAgent),
            isChrome: window2.chrome,
            isFirefox: /Firefox/i.test(window2.navigator.userAgent),
            /* Create a cached element for re-use when checking for CSS property prefixes. */
            prefixElement: document2.createElement("div"),
            /* Cache every prefix match to avoid repeating lookups. */
            prefixMatches: {},
            /* Cache the anchor used for animating window scrolling. */
            scrollAnchor: null,
            /* Cache the browser-specific property names associated with the scroll anchor. */
            scrollPropertyLeft: null,
            scrollPropertyTop: null,
            /* Keep track of whether our RAF tick is running. */
            isTicking: false,
            /* Container for every in-progress call to Velocity. */
            calls: [],
            delayedElements: {
              count: 0
            }
          },
          /* Velocity's custom CSS stack. Made global for unit testing. */
          CSS: {
            /* Defined below. */
          },
          /* A shim of the jQuery utility functions used by Velocity -- provided by Velocity's optional jQuery shim. */
          Utilities: $2,
          /* Container for the user's custom animation redirects that are referenced by name in place of the properties map argument. */
          Redirects: {
            /* Manually registered by the user. */
          },
          Easings: {
            /* Defined below. */
          },
          /* Attempt to use ES6 Promises by default. Users can override this with a third-party promises library. */
          Promise: window2.Promise,
          /* Velocity option defaults, which can be overriden by the user. */
          defaults: {
            queue: "",
            duration: DURATION_DEFAULT,
            easing: EASING_DEFAULT,
            begin: undefined$1,
            complete: undefined$1,
            progress: undefined$1,
            display: undefined$1,
            visibility: undefined$1,
            loop: false,
            delay: false,
            mobileHA: true,
            /* Advanced: Set to false to prevent property values from being cached between consecutive Velocity-initiated chain calls. */
            _cacheValues: true,
            /* Advanced: Set to false if the promise should always resolve on empty element lists. */
            promiseRejectEmpty: true
          },
          /* A design goal of Velocity is to cache data wherever possible in order to avoid DOM requerying. Accordingly, each element has a data cache. */
          init: function(element) {
            $2.data(element, "velocity", {
              /* Store whether this is an SVG element, since its properties are retrieved and updated differently than standard HTML elements. */
              isSVG: Type.isSVG(element),
              /* Keep track of whether the element is currently being animated by Velocity.
               This is used to ensure that property values are not transferred between non-consecutive (stale) calls. */
              isAnimating: false,
              /* A reference to the element's live computedStyle object. Learn more here: https://developer.mozilla.org/en/docs/Web/API/window.getComputedStyle */
              computedStyle: null,
              /* Tween data is cached for each animation on the element so that data can be passed across calls --
               in particular, end values are used as subsequent start values in consecutive Velocity calls. */
              tweensContainer: null,
              /* The full root property values of each CSS hook being animated on this element are cached so that:
               1) Concurrently-animating hooks sharing the same root can have their root values' merged into one while tweening.
               2) Post-hook-injection root values can be transferred over to consecutively chained Velocity calls as starting root values. */
              rootPropertyValueCache: {},
              /* A cache for transform updates, which must be manually flushed via CSS.flushTransformCache(). */
              transformCache: {}
            });
          },
          /* A parallel to jQuery's $.css(), used for getting/setting Velocity's hooked CSS properties. */
          hook: null,
          /* Defined below. */
          /* Velocity-wide animation time remapping for testing purposes. */
          mock: false,
          version: { major: 1, minor: 5, patch: 2 },
          /* Set to 1 or 2 (most verbose) to output debug info to console. */
          debug: false,
          /* Use rAF high resolution timestamp when available */
          timestamp: true,
          /* Pause all animations */
          pauseAll: function(queueName) {
            var currentTime = (/* @__PURE__ */ new Date()).getTime();
            $2.each(Velocity.State.calls, function(i, activeCall) {
              if (activeCall) {
                if (queueName !== undefined$1 && (activeCall[2].queue !== queueName || activeCall[2].queue === false)) {
                  return true;
                }
                activeCall[5] = {
                  resume: false
                };
              }
            });
            $2.each(Velocity.State.delayedElements, function(k, element) {
              if (!element) {
                return;
              }
              pauseDelayOnElement(element, currentTime);
            });
          },
          /* Resume all animations */
          resumeAll: function(queueName) {
            (/* @__PURE__ */ new Date()).getTime();
            $2.each(Velocity.State.calls, function(i, activeCall) {
              if (activeCall) {
                if (queueName !== undefined$1 && (activeCall[2].queue !== queueName || activeCall[2].queue === false)) {
                  return true;
                }
                if (activeCall[5]) {
                  activeCall[5].resume = true;
                }
              }
            });
            $2.each(Velocity.State.delayedElements, function(k, element) {
              if (!element) {
                return;
              }
              resumeDelayOnElement(element);
            });
          }
        };
        if (window2.pageYOffset !== undefined$1) {
          Velocity.State.scrollAnchor = window2;
          Velocity.State.scrollPropertyLeft = "pageXOffset";
          Velocity.State.scrollPropertyTop = "pageYOffset";
        } else {
          Velocity.State.scrollAnchor = document2.documentElement || document2.body.parentNode || document2.body;
          Velocity.State.scrollPropertyLeft = "scrollLeft";
          Velocity.State.scrollPropertyTop = "scrollTop";
        }
        function Data(element) {
          var response = $2.data(element, "velocity");
          return response === null ? undefined$1 : response;
        }
        function pauseDelayOnElement(element, currentTime) {
          var data = Data(element);
          if (data && data.delayTimer && !data.delayPaused) {
            data.delayRemaining = data.delay - currentTime + data.delayBegin;
            data.delayPaused = true;
            clearTimeout(data.delayTimer.setTimeout);
          }
        }
        function resumeDelayOnElement(element, currentTime) {
          var data = Data(element);
          if (data && data.delayTimer && data.delayPaused) {
            data.delayPaused = false;
            data.delayTimer.setTimeout = setTimeout(data.delayTimer.next, data.delayRemaining);
          }
        }
        function generateStep(steps) {
          return function(p) {
            return Math.round(p * steps) * (1 / steps);
          };
        }
        function generateBezier(mX1, mY1, mX2, mY2) {
          var NEWTON_ITERATIONS = 4, NEWTON_MIN_SLOPE = 1e-3, SUBDIVISION_PRECISION = 1e-7, SUBDIVISION_MAX_ITERATIONS = 10, kSplineTableSize = 11, kSampleStepSize = 1 / (kSplineTableSize - 1), float32ArraySupported = "Float32Array" in window2;
          if (arguments.length !== 4) {
            return false;
          }
          for (var i = 0; i < 4; ++i) {
            if (typeof arguments[i] !== "number" || isNaN(arguments[i]) || !isFinite(arguments[i])) {
              return false;
            }
          }
          mX1 = Math.min(mX1, 1);
          mX2 = Math.min(mX2, 1);
          mX1 = Math.max(mX1, 0);
          mX2 = Math.max(mX2, 0);
          var mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);
          function A(aA1, aA2) {
            return 1 - 3 * aA2 + 3 * aA1;
          }
          function B(aA1, aA2) {
            return 3 * aA2 - 6 * aA1;
          }
          function C(aA1) {
            return 3 * aA1;
          }
          function calcBezier(aT, aA1, aA2) {
            return ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;
          }
          function getSlope(aT, aA1, aA2) {
            return 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT + C(aA1);
          }
          function newtonRaphsonIterate(aX, aGuessT) {
            for (var i2 = 0; i2 < NEWTON_ITERATIONS; ++i2) {
              var currentSlope = getSlope(aGuessT, mX1, mX2);
              if (currentSlope === 0) {
                return aGuessT;
              }
              var currentX = calcBezier(aGuessT, mX1, mX2) - aX;
              aGuessT -= currentX / currentSlope;
            }
            return aGuessT;
          }
          function calcSampleValues() {
            for (var i2 = 0; i2 < kSplineTableSize; ++i2) {
              mSampleValues[i2] = calcBezier(i2 * kSampleStepSize, mX1, mX2);
            }
          }
          function binarySubdivide(aX, aA, aB) {
            var currentX, currentT, i2 = 0;
            do {
              currentT = aA + (aB - aA) / 2;
              currentX = calcBezier(currentT, mX1, mX2) - aX;
              if (currentX > 0) {
                aB = currentT;
              } else {
                aA = currentT;
              }
            } while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i2 < SUBDIVISION_MAX_ITERATIONS);
            return currentT;
          }
          function getTForX(aX) {
            var intervalStart = 0, currentSample = 1, lastSample = kSplineTableSize - 1;
            for (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {
              intervalStart += kSampleStepSize;
            }
            --currentSample;
            var dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]), guessForT = intervalStart + dist * kSampleStepSize, initialSlope = getSlope(guessForT, mX1, mX2);
            if (initialSlope >= NEWTON_MIN_SLOPE) {
              return newtonRaphsonIterate(aX, guessForT);
            } else if (initialSlope === 0) {
              return guessForT;
            } else {
              return binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);
            }
          }
          var _precomputed = false;
          function precompute() {
            _precomputed = true;
            if (mX1 !== mY1 || mX2 !== mY2) {
              calcSampleValues();
            }
          }
          var f = function(aX) {
            if (!_precomputed) {
              precompute();
            }
            if (mX1 === mY1 && mX2 === mY2) {
              return aX;
            }
            if (aX === 0) {
              return 0;
            }
            if (aX === 1) {
              return 1;
            }
            return calcBezier(getTForX(aX), mY1, mY2);
          };
          f.getControlPoints = function() {
            return [{ x: mX1, y: mY1 }, { x: mX2, y: mY2 }];
          };
          var str = "generateBezier(" + [mX1, mY1, mX2, mY2] + ")";
          f.toString = function() {
            return str;
          };
          return f;
        }
        var generateSpringRK4 = function() {
          function springAccelerationForState(state) {
            return -state.tension * state.x - state.friction * state.v;
          }
          function springEvaluateStateWithDerivative(initialState, dt, derivative) {
            var state = {
              x: initialState.x + derivative.dx * dt,
              v: initialState.v + derivative.dv * dt,
              tension: initialState.tension,
              friction: initialState.friction
            };
            return { dx: state.v, dv: springAccelerationForState(state) };
          }
          function springIntegrateState(state, dt) {
            var a = {
              dx: state.v,
              dv: springAccelerationForState(state)
            }, b = springEvaluateStateWithDerivative(state, dt * 0.5, a), c = springEvaluateStateWithDerivative(state, dt * 0.5, b), d = springEvaluateStateWithDerivative(state, dt, c), dxdt = 1 / 6 * (a.dx + 2 * (b.dx + c.dx) + d.dx), dvdt = 1 / 6 * (a.dv + 2 * (b.dv + c.dv) + d.dv);
            state.x = state.x + dxdt * dt;
            state.v = state.v + dvdt * dt;
            return state;
          }
          return function springRK4Factory(tension, friction, duration) {
            var initState = {
              x: -1,
              v: 0,
              tension: null,
              friction: null
            }, path = [0], time_lapsed = 0, tolerance = 1 / 1e4, DT = 16 / 1e3, have_duration, dt, last_state;
            tension = parseFloat(tension) || 500;
            friction = parseFloat(friction) || 20;
            duration = duration || null;
            initState.tension = tension;
            initState.friction = friction;
            have_duration = duration !== null;
            if (have_duration) {
              time_lapsed = springRK4Factory(tension, friction);
              dt = time_lapsed / duration * DT;
            } else {
              dt = DT;
            }
            while (true) {
              last_state = springIntegrateState(last_state || initState, dt);
              path.push(1 + last_state.x);
              time_lapsed += 16;
              if (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {
                break;
              }
            }
            return !have_duration ? time_lapsed : function(percentComplete) {
              return path[percentComplete * (path.length - 1) | 0];
            };
          };
        }();
        Velocity.Easings = {
          linear: function(p) {
            return p;
          },
          swing: function(p) {
            return 0.5 - Math.cos(p * Math.PI) / 2;
          },
          /* Bonus "spring" easing, which is a less exaggerated version of easeInOutElastic. */
          spring: function(p) {
            return 1 - Math.cos(p * 4.5 * Math.PI) * Math.exp(-p * 6);
          }
        };
        $2.each(
          [
            ["ease", [0.25, 0.1, 0.25, 1]],
            ["ease-in", [0.42, 0, 1, 1]],
            ["ease-out", [0, 0, 0.58, 1]],
            ["ease-in-out", [0.42, 0, 0.58, 1]],
            ["easeInSine", [0.47, 0, 0.745, 0.715]],
            ["easeOutSine", [0.39, 0.575, 0.565, 1]],
            ["easeInOutSine", [0.445, 0.05, 0.55, 0.95]],
            ["easeInQuad", [0.55, 0.085, 0.68, 0.53]],
            ["easeOutQuad", [0.25, 0.46, 0.45, 0.94]],
            ["easeInOutQuad", [0.455, 0.03, 0.515, 0.955]],
            ["easeInCubic", [0.55, 0.055, 0.675, 0.19]],
            ["easeOutCubic", [0.215, 0.61, 0.355, 1]],
            ["easeInOutCubic", [0.645, 0.045, 0.355, 1]],
            ["easeInQuart", [0.895, 0.03, 0.685, 0.22]],
            ["easeOutQuart", [0.165, 0.84, 0.44, 1]],
            ["easeInOutQuart", [0.77, 0, 0.175, 1]],
            ["easeInQuint", [0.755, 0.05, 0.855, 0.06]],
            ["easeOutQuint", [0.23, 1, 0.32, 1]],
            ["easeInOutQuint", [0.86, 0, 0.07, 1]],
            ["easeInExpo", [0.95, 0.05, 0.795, 0.035]],
            ["easeOutExpo", [0.19, 1, 0.22, 1]],
            ["easeInOutExpo", [1, 0, 0, 1]],
            ["easeInCirc", [0.6, 0.04, 0.98, 0.335]],
            ["easeOutCirc", [0.075, 0.82, 0.165, 1]],
            ["easeInOutCirc", [0.785, 0.135, 0.15, 0.86]]
          ],
          function(i, easingArray) {
            Velocity.Easings[easingArray[0]] = generateBezier.apply(null, easingArray[1]);
          }
        );
        function getEasing(value, duration) {
          var easing = value;
          if (Type.isString(value)) {
            if (!Velocity.Easings[value]) {
              easing = false;
            }
          } else if (Type.isArray(value) && value.length === 1) {
            easing = generateStep.apply(null, value);
          } else if (Type.isArray(value) && value.length === 2) {
            easing = generateSpringRK4.apply(null, value.concat([duration]));
          } else if (Type.isArray(value) && value.length === 4) {
            easing = generateBezier.apply(null, value);
          } else {
            easing = false;
          }
          if (easing === false) {
            if (Velocity.Easings[Velocity.defaults.easing]) {
              easing = Velocity.defaults.easing;
            } else {
              easing = EASING_DEFAULT;
            }
          }
          return easing;
        }
        var CSS = Velocity.CSS = {
          /*************
           RegEx
           *************/
          RegEx: {
            isHex: /^#([A-f\d]{3}){1,2}$/i,
            /* Unwrap a property value's surrounding text, e.g. "rgba(4, 3, 2, 1)" ==> "4, 3, 2, 1" and "rect(4px 3px 2px 1px)" ==> "4px 3px 2px 1px". */
            valueUnwrap: /^[A-z]+\((.*)\)$/i,
            wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,
            /* Split a multi-value property into an array of subvalues, e.g. "rgba(4, 3, 2, 1) 4px 3px 2px 1px" ==> [ "rgba(4, 3, 2, 1)", "4px", "3px", "2px", "1px" ]. */
            valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/ig
          },
          /************
           Lists
           ************/
          Lists: {
            colors: ["fill", "stroke", "stopColor", "color", "backgroundColor", "borderColor", "borderTopColor", "borderRightColor", "borderBottomColor", "borderLeftColor", "outlineColor"],
            transformsBase: ["translateX", "translateY", "scale", "scaleX", "scaleY", "skewX", "skewY", "rotateZ"],
            transforms3D: ["transformPerspective", "translateZ", "scaleZ", "rotateX", "rotateY"],
            units: [
              "%",
              // relative
              "em",
              "ex",
              "ch",
              "rem",
              // font relative
              "vw",
              "vh",
              "vmin",
              "vmax",
              // viewport relative
              "cm",
              "mm",
              "Q",
              "in",
              "pc",
              "pt",
              "px",
              // absolute lengths
              "deg",
              "grad",
              "rad",
              "turn",
              // angles
              "s",
              "ms"
              // time
            ],
            colorNames: {
              "aliceblue": "240,248,255",
              "antiquewhite": "250,235,215",
              "aquamarine": "127,255,212",
              "aqua": "0,255,255",
              "azure": "240,255,255",
              "beige": "245,245,220",
              "bisque": "255,228,196",
              "black": "0,0,0",
              "blanchedalmond": "255,235,205",
              "blueviolet": "138,43,226",
              "blue": "0,0,255",
              "brown": "165,42,42",
              "burlywood": "222,184,135",
              "cadetblue": "95,158,160",
              "chartreuse": "127,255,0",
              "chocolate": "210,105,30",
              "coral": "255,127,80",
              "cornflowerblue": "100,149,237",
              "cornsilk": "255,248,220",
              "crimson": "220,20,60",
              "cyan": "0,255,255",
              "darkblue": "0,0,139",
              "darkcyan": "0,139,139",
              "darkgoldenrod": "184,134,11",
              "darkgray": "169,169,169",
              "darkgrey": "169,169,169",
              "darkgreen": "0,100,0",
              "darkkhaki": "189,183,107",
              "darkmagenta": "139,0,139",
              "darkolivegreen": "85,107,47",
              "darkorange": "255,140,0",
              "darkorchid": "153,50,204",
              "darkred": "139,0,0",
              "darksalmon": "233,150,122",
              "darkseagreen": "143,188,143",
              "darkslateblue": "72,61,139",
              "darkslategray": "47,79,79",
              "darkturquoise": "0,206,209",
              "darkviolet": "148,0,211",
              "deeppink": "255,20,147",
              "deepskyblue": "0,191,255",
              "dimgray": "105,105,105",
              "dimgrey": "105,105,105",
              "dodgerblue": "30,144,255",
              "firebrick": "178,34,34",
              "floralwhite": "255,250,240",
              "forestgreen": "34,139,34",
              "fuchsia": "255,0,255",
              "gainsboro": "220,220,220",
              "ghostwhite": "248,248,255",
              "gold": "255,215,0",
              "goldenrod": "218,165,32",
              "gray": "128,128,128",
              "grey": "128,128,128",
              "greenyellow": "173,255,47",
              "green": "0,128,0",
              "honeydew": "240,255,240",
              "hotpink": "255,105,180",
              "indianred": "205,92,92",
              "indigo": "75,0,130",
              "ivory": "255,255,240",
              "khaki": "240,230,140",
              "lavenderblush": "255,240,245",
              "lavender": "230,230,250",
              "lawngreen": "124,252,0",
              "lemonchiffon": "255,250,205",
              "lightblue": "173,216,230",
              "lightcoral": "240,128,128",
              "lightcyan": "224,255,255",
              "lightgoldenrodyellow": "250,250,210",
              "lightgray": "211,211,211",
              "lightgrey": "211,211,211",
              "lightgreen": "144,238,144",
              "lightpink": "255,182,193",
              "lightsalmon": "255,160,122",
              "lightseagreen": "32,178,170",
              "lightskyblue": "135,206,250",
              "lightslategray": "119,136,153",
              "lightsteelblue": "176,196,222",
              "lightyellow": "255,255,224",
              "limegreen": "50,205,50",
              "lime": "0,255,0",
              "linen": "250,240,230",
              "magenta": "255,0,255",
              "maroon": "128,0,0",
              "mediumaquamarine": "102,205,170",
              "mediumblue": "0,0,205",
              "mediumorchid": "186,85,211",
              "mediumpurple": "147,112,219",
              "mediumseagreen": "60,179,113",
              "mediumslateblue": "123,104,238",
              "mediumspringgreen": "0,250,154",
              "mediumturquoise": "72,209,204",
              "mediumvioletred": "199,21,133",
              "midnightblue": "25,25,112",
              "mintcream": "245,255,250",
              "mistyrose": "255,228,225",
              "moccasin": "255,228,181",
              "navajowhite": "255,222,173",
              "navy": "0,0,128",
              "oldlace": "253,245,230",
              "olivedrab": "107,142,35",
              "olive": "128,128,0",
              "orangered": "255,69,0",
              "orange": "255,165,0",
              "orchid": "218,112,214",
              "palegoldenrod": "238,232,170",
              "palegreen": "152,251,152",
              "paleturquoise": "175,238,238",
              "palevioletred": "219,112,147",
              "papayawhip": "255,239,213",
              "peachpuff": "255,218,185",
              "peru": "205,133,63",
              "pink": "255,192,203",
              "plum": "221,160,221",
              "powderblue": "176,224,230",
              "purple": "128,0,128",
              "red": "255,0,0",
              "rosybrown": "188,143,143",
              "royalblue": "65,105,225",
              "saddlebrown": "139,69,19",
              "salmon": "250,128,114",
              "sandybrown": "244,164,96",
              "seagreen": "46,139,87",
              "seashell": "255,245,238",
              "sienna": "160,82,45",
              "silver": "192,192,192",
              "skyblue": "135,206,235",
              "slateblue": "106,90,205",
              "slategray": "112,128,144",
              "snow": "255,250,250",
              "springgreen": "0,255,127",
              "steelblue": "70,130,180",
              "tan": "210,180,140",
              "teal": "0,128,128",
              "thistle": "216,191,216",
              "tomato": "255,99,71",
              "turquoise": "64,224,208",
              "violet": "238,130,238",
              "wheat": "245,222,179",
              "whitesmoke": "245,245,245",
              "white": "255,255,255",
              "yellowgreen": "154,205,50",
              "yellow": "255,255,0"
            }
          },
          /************
           Hooks
           ************/
          /* Hooks allow a subproperty (e.g. "boxShadowBlur") of a compound-value CSS property
           (e.g. "boxShadow: X Y Blur Spread Color") to be animated as if it were a discrete property. */
          /* Note: Beyond enabling fine-grained property animation, hooking is necessary since Velocity only
           tweens properties with single numeric values; unlike CSS transitions, Velocity does not interpolate compound-values. */
          Hooks: {
            /********************
             Registration
             ********************/
            /* Templates are a concise way of indicating which subproperties must be individually registered for each compound-value CSS property. */
            /* Each template consists of the compound-value's base name, its constituent subproperty names, and those subproperties' default values. */
            templates: {
              "textShadow": ["Color X Y Blur", "black 0px 0px 0px"],
              "boxShadow": ["Color X Y Blur Spread", "black 0px 0px 0px 0px"],
              "clip": ["Top Right Bottom Left", "0px 0px 0px 0px"],
              "backgroundPosition": ["X Y", "0% 0%"],
              "transformOrigin": ["X Y Z", "50% 50% 0px"],
              "perspectiveOrigin": ["X Y", "50% 50%"]
            },
            /* A "registered" hook is one that has been converted from its template form into a live,
             tweenable property. It contains data to associate it with its root property. */
            registered: {
              /* Note: A registered hook looks like this ==> textShadowBlur: [ "textShadow", 3 ],
               which consists of the subproperty's name, the associated root property's name,
               and the subproperty's position in the root's value. */
            },
            /* Convert the templates into individual hooks then append them to the registered object above. */
            register: function() {
              for (var i = 0; i < CSS.Lists.colors.length; i++) {
                var rgbComponents = CSS.Lists.colors[i] === "color" ? "0 0 0 1" : "255 255 255 1";
                CSS.Hooks.templates[CSS.Lists.colors[i]] = ["Red Green Blue Alpha", rgbComponents];
              }
              var rootProperty, hookTemplate, hookNames;
              if (IE) {
                for (rootProperty in CSS.Hooks.templates) {
                  if (!CSS.Hooks.templates.hasOwnProperty(rootProperty)) {
                    continue;
                  }
                  hookTemplate = CSS.Hooks.templates[rootProperty];
                  hookNames = hookTemplate[0].split(" ");
                  var defaultValues = hookTemplate[1].match(CSS.RegEx.valueSplit);
                  if (hookNames[0] === "Color") {
                    hookNames.push(hookNames.shift());
                    defaultValues.push(defaultValues.shift());
                    CSS.Hooks.templates[rootProperty] = [hookNames.join(" "), defaultValues.join(" ")];
                  }
                }
              }
              for (rootProperty in CSS.Hooks.templates) {
                if (!CSS.Hooks.templates.hasOwnProperty(rootProperty)) {
                  continue;
                }
                hookTemplate = CSS.Hooks.templates[rootProperty];
                hookNames = hookTemplate[0].split(" ");
                for (var j in hookNames) {
                  if (!hookNames.hasOwnProperty(j)) {
                    continue;
                  }
                  var fullHookName = rootProperty + hookNames[j], hookPosition = j;
                  CSS.Hooks.registered[fullHookName] = [rootProperty, hookPosition];
                }
              }
            },
            /*****************************
             Injection and Extraction
             *****************************/
            /* Look up the root property associated with the hook (e.g. return "textShadow" for "textShadowBlur"). */
            /* Since a hook cannot be set directly (the browser won't recognize it), style updating for hooks is routed through the hook's root property. */
            getRoot: function(property) {
              var hookData = CSS.Hooks.registered[property];
              if (hookData) {
                return hookData[0];
              } else {
                return property;
              }
            },
            getUnit: function(str, start) {
              var unit = (str.substr(start || 0, 5).match(/^[a-z%]+/) || [])[0] || "";
              if (unit && _inArray(CSS.Lists.units)) {
                return unit;
              }
              return "";
            },
            fixColors: function(str) {
              return str.replace(/(rgba?\(\s*)?(\b[a-z]+\b)/g, function($0, $1, $22) {
                if (CSS.Lists.colorNames.hasOwnProperty($22)) {
                  return ($1 ? $1 : "rgba(") + CSS.Lists.colorNames[$22] + ($1 ? "" : ",1)");
                }
                return $1 + $22;
              });
            },
            /* Convert any rootPropertyValue, null or otherwise, into a space-delimited list of hook values so that
             the targeted hook can be injected or extracted at its standard position. */
            cleanRootPropertyValue: function(rootProperty, rootPropertyValue) {
              if (CSS.RegEx.valueUnwrap.test(rootPropertyValue)) {
                rootPropertyValue = rootPropertyValue.match(CSS.RegEx.valueUnwrap)[1];
              }
              if (CSS.Values.isCSSNullValue(rootPropertyValue)) {
                rootPropertyValue = CSS.Hooks.templates[rootProperty][1];
              }
              return rootPropertyValue;
            },
            /* Extracted the hook's value from its root property's value. This is used to get the starting value of an animating hook. */
            extractValue: function(fullHookName, rootPropertyValue) {
              var hookData = CSS.Hooks.registered[fullHookName];
              if (hookData) {
                var hookRoot = hookData[0], hookPosition = hookData[1];
                rootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue);
                return rootPropertyValue.toString().match(CSS.RegEx.valueSplit)[hookPosition];
              } else {
                return rootPropertyValue;
              }
            },
            /* Inject the hook's value into its root property's value. This is used to piece back together the root property
             once Velocity has updated one of its individually hooked values through tweening. */
            injectValue: function(fullHookName, hookValue, rootPropertyValue) {
              var hookData = CSS.Hooks.registered[fullHookName];
              if (hookData) {
                var hookRoot = hookData[0], hookPosition = hookData[1], rootPropertyValueParts, rootPropertyValueUpdated;
                rootPropertyValue = CSS.Hooks.cleanRootPropertyValue(hookRoot, rootPropertyValue);
                rootPropertyValueParts = rootPropertyValue.toString().match(CSS.RegEx.valueSplit);
                rootPropertyValueParts[hookPosition] = hookValue;
                rootPropertyValueUpdated = rootPropertyValueParts.join(" ");
                return rootPropertyValueUpdated;
              } else {
                return rootPropertyValue;
              }
            }
          },
          /*******************
           Normalizations
           *******************/
          /* Normalizations standardize CSS property manipulation by pollyfilling browser-specific implementations (e.g. opacity)
           and reformatting special properties (e.g. clip, rgba) to look like standard ones. */
          Normalizations: {
            /* Normalizations are passed a normalization target (either the property's name, its extracted value, or its injected value),
             the targeted element (which may need to be queried), and the targeted property value. */
            registered: {
              clip: function(type, element, propertyValue) {
                switch (type) {
                  case "name":
                    return "clip";
                  case "extract":
                    var extracted;
                    if (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) {
                      extracted = propertyValue;
                    } else {
                      extracted = propertyValue.toString().match(CSS.RegEx.valueUnwrap);
                      extracted = extracted ? extracted[1].replace(/,(\s+)?/g, " ") : propertyValue;
                    }
                    return extracted;
                  case "inject":
                    return "rect(" + propertyValue + ")";
                }
              },
              blur: function(type, element, propertyValue) {
                switch (type) {
                  case "name":
                    return Velocity.State.isFirefox ? "filter" : "-webkit-filter";
                  case "extract":
                    var extracted = parseFloat(propertyValue);
                    if (!(extracted || extracted === 0)) {
                      var blurComponent = propertyValue.toString().match(/blur\(([0-9]+[A-z]+)\)/i);
                      if (blurComponent) {
                        extracted = blurComponent[1];
                      } else {
                        extracted = 0;
                      }
                    }
                    return extracted;
                  case "inject":
                    if (!parseFloat(propertyValue)) {
                      return "none";
                    } else {
                      return "blur(" + propertyValue + ")";
                    }
                }
              },
              /* <=IE8 do not support the standard opacity property. They use filter:alpha(opacity=INT) instead. */
              opacity: function(type, element, propertyValue) {
                if (IE <= 8) {
                  switch (type) {
                    case "name":
                      return "filter";
                    case "extract":
                      var extracted = propertyValue.toString().match(/alpha\(opacity=(.*)\)/i);
                      if (extracted) {
                        propertyValue = extracted[1] / 100;
                      } else {
                        propertyValue = 1;
                      }
                      return propertyValue;
                    case "inject":
                      element.style.zoom = 1;
                      if (parseFloat(propertyValue) >= 1) {
                        return "";
                      } else {
                        return "alpha(opacity=" + parseInt(parseFloat(propertyValue) * 100, 10) + ")";
                      }
                  }
                } else {
                  switch (type) {
                    case "name":
                      return "opacity";
                    case "extract":
                      return propertyValue;
                    case "inject":
                      return propertyValue;
                  }
                }
              }
            },
            /*****************************
             Batched Registrations
             *****************************/
            /* Note: Batched normalizations extend the CSS.Normalizations.registered object. */
            register: function() {
              if ((!IE || IE > 9) && !Velocity.State.isGingerbread) {
                CSS.Lists.transformsBase = CSS.Lists.transformsBase.concat(CSS.Lists.transforms3D);
              }
              for (var i = 0; i < CSS.Lists.transformsBase.length; i++) {
                (function() {
                  var transformName = CSS.Lists.transformsBase[i];
                  CSS.Normalizations.registered[transformName] = function(type, element, propertyValue) {
                    switch (type) {
                      case "name":
                        return "transform";
                      case "extract":
                        if (Data(element) === undefined$1 || Data(element).transformCache[transformName] === undefined$1) {
                          return /^scale/i.test(transformName) ? 1 : 0;
                        }
                        return Data(element).transformCache[transformName].replace(/[()]/g, "");
                      case "inject":
                        var invalid = false;
                        switch (transformName.substr(0, transformName.length - 1)) {
                          case "translate":
                            invalid = !/(%|px|em|rem|vw|vh|\d)$/i.test(propertyValue);
                            break;
                          case "scal":
                          case "scale":
                            if (Velocity.State.isAndroid && Data(element).transformCache[transformName] === undefined$1 && propertyValue < 1) {
                              propertyValue = 1;
                            }
                            invalid = !/(\d)$/i.test(propertyValue);
                            break;
                          case "skew":
                            invalid = !/(deg|\d)$/i.test(propertyValue);
                            break;
                          case "rotate":
                            invalid = !/(deg|\d)$/i.test(propertyValue);
                            break;
                        }
                        if (!invalid) {
                          Data(element).transformCache[transformName] = "(" + propertyValue + ")";
                        }
                        return Data(element).transformCache[transformName];
                    }
                  };
                })();
              }
              for (var j = 0; j < CSS.Lists.colors.length; j++) {
                (function() {
                  var colorName = CSS.Lists.colors[j];
                  CSS.Normalizations.registered[colorName] = function(type, element, propertyValue) {
                    switch (type) {
                      case "name":
                        return colorName;
                      case "extract":
                        var extracted;
                        if (CSS.RegEx.wrappedValueAlreadyExtracted.test(propertyValue)) {
                          extracted = propertyValue;
                        } else {
                          var converted, colorNames = {
                            black: "rgb(0, 0, 0)",
                            blue: "rgb(0, 0, 255)",
                            gray: "rgb(128, 128, 128)",
                            green: "rgb(0, 128, 0)",
                            red: "rgb(255, 0, 0)",
                            white: "rgb(255, 255, 255)"
                          };
                          if (/^[A-z]+$/i.test(propertyValue)) {
                            if (colorNames[propertyValue] !== undefined$1) {
                              converted = colorNames[propertyValue];
                            } else {
                              converted = colorNames.black;
                            }
                          } else if (CSS.RegEx.isHex.test(propertyValue)) {
                            converted = "rgb(" + CSS.Values.hexToRgb(propertyValue).join(" ") + ")";
                          } else if (!/^rgba?\(/i.test(propertyValue)) {
                            converted = colorNames.black;
                          }
                          extracted = (converted || propertyValue).toString().match(CSS.RegEx.valueUnwrap)[1].replace(/,(\s+)?/g, " ");
                        }
                        if ((!IE || IE > 8) && extracted.split(" ").length === 3) {
                          extracted += " 1";
                        }
                        return extracted;
                      case "inject":
                        if (/^rgb/.test(propertyValue)) {
                          return propertyValue;
                        }
                        if (IE <= 8) {
                          if (propertyValue.split(" ").length === 4) {
                            propertyValue = propertyValue.split(/\s+/).slice(0, 3).join(" ");
                          }
                        } else if (propertyValue.split(" ").length === 3) {
                          propertyValue += " 1";
                        }
                        return (IE <= 8 ? "rgb" : "rgba") + "(" + propertyValue.replace(/\s+/g, ",").replace(/\.(\d)+(?=,)/g, "") + ")";
                    }
                  };
                })();
              }
              function augmentDimension(name, element, wantInner) {
                var isBorderBox = CSS.getPropertyValue(element, "boxSizing").toString().toLowerCase() === "border-box";
                if (isBorderBox === (wantInner || false)) {
                  var i2, value, augment = 0, sides = name === "width" ? ["Left", "Right"] : ["Top", "Bottom"], fields = ["padding" + sides[0], "padding" + sides[1], "border" + sides[0] + "Width", "border" + sides[1] + "Width"];
                  for (i2 = 0; i2 < fields.length; i2++) {
                    value = parseFloat(CSS.getPropertyValue(element, fields[i2]));
                    if (!isNaN(value)) {
                      augment += value;
                    }
                  }
                  return wantInner ? -augment : augment;
                }
                return 0;
              }
              function getDimension(name, wantInner) {
                return function(type, element, propertyValue) {
                  switch (type) {
                    case "name":
                      return name;
                    case "extract":
                      return parseFloat(propertyValue) + augmentDimension(name, element, wantInner);
                    case "inject":
                      return parseFloat(propertyValue) - augmentDimension(name, element, wantInner) + "px";
                  }
                };
              }
              CSS.Normalizations.registered.innerWidth = getDimension("width", true);
              CSS.Normalizations.registered.innerHeight = getDimension("height", true);
              CSS.Normalizations.registered.outerWidth = getDimension("width");
              CSS.Normalizations.registered.outerHeight = getDimension("height");
            }
          },
          /************************
           CSS Property Names
           ************************/
          Names: {
            /* Camelcase a property name into its JavaScript notation (e.g. "background-color" ==> "backgroundColor").
             Camelcasing is used to normalize property names between and across calls. */
            camelCase: function(property) {
              return property.replace(/-(\w)/g, function(match, subMatch) {
                return subMatch.toUpperCase();
              });
            },
            /* For SVG elements, some properties (namely, dimensional ones) are GET/SET via the element's HTML attributes (instead of via CSS styles). */
            SVGAttribute: function(property) {
              var SVGAttributes = "width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2";
              if (IE || Velocity.State.isAndroid && !Velocity.State.isChrome) {
                SVGAttributes += "|transform";
              }
              return new RegExp("^(" + SVGAttributes + ")$", "i").test(property);
            },
            /* Determine whether a property should be set with a vendor prefix. */
            /* If a prefixed version of the property exists, return it. Otherwise, return the original property name.
             If the property is not at all supported by the browser, return a false flag. */
            prefixCheck: function(property) {
              if (Velocity.State.prefixMatches[property]) {
                return [Velocity.State.prefixMatches[property], true];
              } else {
                var vendors = ["", "Webkit", "Moz", "ms", "O"];
                for (var i = 0, vendorsLength = vendors.length; i < vendorsLength; i++) {
                  var propertyPrefixed;
                  if (i === 0) {
                    propertyPrefixed = property;
                  } else {
                    propertyPrefixed = vendors[i] + property.replace(/^\w/, function(match) {
                      return match.toUpperCase();
                    });
                  }
                  if (Type.isString(Velocity.State.prefixElement.style[propertyPrefixed])) {
                    Velocity.State.prefixMatches[property] = propertyPrefixed;
                    return [propertyPrefixed, true];
                  }
                }
                return [property, false];
              }
            }
          },
          /************************
           CSS Property Values
           ************************/
          Values: {
            /* Hex to RGB conversion. Copyright Tim Down: http://stackoverflow.com/questions/5623838/rgb-to-hex-and-hex-to-rgb */
            hexToRgb: function(hex) {
              var shortformRegex = /^#?([a-f\d])([a-f\d])([a-f\d])$/i, longformRegex = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i, rgbParts;
              hex = hex.replace(shortformRegex, function(m, r, g, b) {
                return r + r + g + g + b + b;
              });
              rgbParts = longformRegex.exec(hex);
              return rgbParts ? [parseInt(rgbParts[1], 16), parseInt(rgbParts[2], 16), parseInt(rgbParts[3], 16)] : [0, 0, 0];
            },
            isCSSNullValue: function(value) {
              return !value || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(value);
            },
            /* Retrieve a property's default unit type. Used for assigning a unit type when one is not supplied by the user. */
            getUnitType: function(property) {
              if (/^(rotate|skew)/i.test(property)) {
                return "deg";
              } else if (/(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(property)) {
                return "";
              } else {
                return "px";
              }
            },
            /* HTML elements default to an associated display type when they're not set to display:none. */
            /* Note: This function is used for correctly setting the non-"none" display value in certain Velocity redirects, such as fadeIn/Out. */
            getDisplayType: function(element) {
              var tagName = element && element.tagName.toString().toLowerCase();
              if (/^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|var|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i.test(tagName)) {
                return "inline";
              } else if (/^(li)$/i.test(tagName)) {
                return "list-item";
              } else if (/^(tr)$/i.test(tagName)) {
                return "table-row";
              } else if (/^(table)$/i.test(tagName)) {
                return "table";
              } else if (/^(tbody)$/i.test(tagName)) {
                return "table-row-group";
              } else {
                return "block";
              }
            },
            /* The class add/remove functions are used to temporarily apply a "velocity-animating" class to elements while they're animating. */
            addClass: function(element, className) {
              if (element) {
                if (element.classList) {
                  element.classList.add(className);
                } else if (Type.isString(element.className)) {
                  element.className += (element.className.length ? " " : "") + className;
                } else {
                  var currentClass = element.getAttribute(IE <= 7 ? "className" : "class") || "";
                  element.setAttribute("class", currentClass + (currentClass ? " " : "") + className);
                }
              }
            },
            removeClass: function(element, className) {
              if (element) {
                if (element.classList) {
                  element.classList.remove(className);
                } else if (Type.isString(element.className)) {
                  element.className = element.className.toString().replace(new RegExp("(^|\\s)" + className.split(" ").join("|") + "(\\s|$)", "gi"), " ");
                } else {
                  var currentClass = element.getAttribute(IE <= 7 ? "className" : "class") || "";
                  element.setAttribute("class", currentClass.replace(new RegExp("(^|s)" + className.split(" ").join("|") + "(s|$)", "gi"), " "));
                }
              }
            }
          },
          /****************************
           Style Getting & Setting
           ****************************/
          /* The singular getPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */
          getPropertyValue: function(element, property, rootPropertyValue, forceStyleLookup) {
            function computePropertyValue(element2, property2) {
              var computedValue = 0;
              if (IE <= 8) {
                computedValue = $2.css(element2, property2);
              } else {
                var toggleDisplay = false;
                if (/^(width|height)$/.test(property2) && CSS.getPropertyValue(element2, "display") === 0) {
                  toggleDisplay = true;
                  CSS.setPropertyValue(element2, "display", CSS.Values.getDisplayType(element2));
                }
                var revertDisplay = function() {
                  if (toggleDisplay) {
                    CSS.setPropertyValue(element2, "display", "none");
                  }
                };
                if (!forceStyleLookup) {
                  if (property2 === "height" && CSS.getPropertyValue(element2, "boxSizing").toString().toLowerCase() !== "border-box") {
                    var contentBoxHeight = element2.offsetHeight - (parseFloat(CSS.getPropertyValue(element2, "borderTopWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element2, "borderBottomWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element2, "paddingTop")) || 0) - (parseFloat(CSS.getPropertyValue(element2, "paddingBottom")) || 0);
                    revertDisplay();
                    return contentBoxHeight;
                  } else if (property2 === "width" && CSS.getPropertyValue(element2, "boxSizing").toString().toLowerCase() !== "border-box") {
                    var contentBoxWidth = element2.offsetWidth - (parseFloat(CSS.getPropertyValue(element2, "borderLeftWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element2, "borderRightWidth")) || 0) - (parseFloat(CSS.getPropertyValue(element2, "paddingLeft")) || 0) - (parseFloat(CSS.getPropertyValue(element2, "paddingRight")) || 0);
                    revertDisplay();
                    return contentBoxWidth;
                  }
                }
                var computedStyle;
                if (Data(element2) === undefined$1) {
                  computedStyle = window2.getComputedStyle(element2, null);
                } else if (!Data(element2).computedStyle) {
                  computedStyle = Data(element2).computedStyle = window2.getComputedStyle(element2, null);
                } else {
                  computedStyle = Data(element2).computedStyle;
                }
                if (property2 === "borderColor") {
                  property2 = "borderTopColor";
                }
                if (IE === 9 && property2 === "filter") {
                  computedValue = computedStyle.getPropertyValue(property2);
                } else {
                  computedValue = computedStyle[property2];
                }
                if (computedValue === "" || computedValue === null) {
                  computedValue = element2.style[property2];
                }
                revertDisplay();
              }
              if (computedValue === "auto" && /^(top|right|bottom|left)$/i.test(property2)) {
                var position = computePropertyValue(element2, "position");
                if (position === "fixed" || position === "absolute" && /top|left/i.test(property2)) {
                  computedValue = $2(element2).position()[property2] + "px";
                }
              }
              return computedValue;
            }
            var propertyValue;
            if (CSS.Hooks.registered[property]) {
              var hook = property, hookRoot = CSS.Hooks.getRoot(hook);
              if (rootPropertyValue === undefined$1) {
                rootPropertyValue = CSS.getPropertyValue(element, CSS.Names.prefixCheck(hookRoot)[0]);
              }
              if (CSS.Normalizations.registered[hookRoot]) {
                rootPropertyValue = CSS.Normalizations.registered[hookRoot]("extract", element, rootPropertyValue);
              }
              propertyValue = CSS.Hooks.extractValue(hook, rootPropertyValue);
            } else if (CSS.Normalizations.registered[property]) {
              var normalizedPropertyName, normalizedPropertyValue;
              normalizedPropertyName = CSS.Normalizations.registered[property]("name", element);
              if (normalizedPropertyName !== "transform") {
                normalizedPropertyValue = computePropertyValue(element, CSS.Names.prefixCheck(normalizedPropertyName)[0]);
                if (CSS.Values.isCSSNullValue(normalizedPropertyValue) && CSS.Hooks.templates[property]) {
                  normalizedPropertyValue = CSS.Hooks.templates[property][1];
                }
              }
              propertyValue = CSS.Normalizations.registered[property]("extract", element, normalizedPropertyValue);
            }
            if (!/^[\d-]/.test(propertyValue)) {
              var data = Data(element);
              if (data && data.isSVG && CSS.Names.SVGAttribute(property)) {
                if (/^(height|width)$/i.test(property)) {
                  try {
                    propertyValue = element.getBBox()[property];
                  } catch (error) {
                    propertyValue = 0;
                  }
                } else {
                  propertyValue = element.getAttribute(property);
                }
              } else {
                propertyValue = computePropertyValue(element, CSS.Names.prefixCheck(property)[0]);
              }
            }
            if (CSS.Values.isCSSNullValue(propertyValue)) {
              propertyValue = 0;
            }
            if (Velocity.debug >= 2) {
              console.log("Get " + property + ": " + propertyValue);
            }
            return propertyValue;
          },
          /* The singular setPropertyValue, which routes the logic for all normalizations, hooks, and standard CSS properties. */
          setPropertyValue: function(element, property, propertyValue, rootPropertyValue, scrollData) {
            var propertyName = property;
            if (property === "scroll") {
              if (scrollData.container) {
                scrollData.container["scroll" + scrollData.direction] = propertyValue;
              } else {
                if (scrollData.direction === "Left") {
                  window2.scrollTo(propertyValue, scrollData.alternateValue);
                } else {
                  window2.scrollTo(scrollData.alternateValue, propertyValue);
                }
              }
            } else {
              if (CSS.Normalizations.registered[property] && CSS.Normalizations.registered[property]("name", element) === "transform") {
                CSS.Normalizations.registered[property]("inject", element, propertyValue);
                propertyName = "transform";
                propertyValue = Data(element).transformCache[property];
              } else {
                if (CSS.Hooks.registered[property]) {
                  var hookName = property, hookRoot = CSS.Hooks.getRoot(property);
                  rootPropertyValue = rootPropertyValue || CSS.getPropertyValue(element, hookRoot);
                  propertyValue = CSS.Hooks.injectValue(hookName, propertyValue, rootPropertyValue);
                  property = hookRoot;
                }
                if (CSS.Normalizations.registered[property]) {
                  propertyValue = CSS.Normalizations.registered[property]("inject", element, propertyValue);
                  property = CSS.Normalizations.registered[property]("name", element);
                }
                propertyName = CSS.Names.prefixCheck(property)[0];
                if (IE <= 8) {
                  try {
                    element.style[propertyName] = propertyValue;
                  } catch (error) {
                    if (Velocity.debug) {
                      console.log("Browser does not support [" + propertyValue + "] for [" + propertyName + "]");
                    }
                  }
                } else {
                  var data = Data(element);
                  if (data && data.isSVG && CSS.Names.SVGAttribute(property)) {
                    element.setAttribute(property, propertyValue);
                  } else {
                    element.style[propertyName] = propertyValue;
                  }
                }
                if (Velocity.debug >= 2) {
                  console.log("Set " + property + " (" + propertyName + "): " + propertyValue);
                }
              }
            }
            return [propertyName, propertyValue];
          },
          /* To increase performance by batching transform updates into a single SET, transforms are not directly applied to an element until flushTransformCache() is called. */
          /* Note: Velocity applies transform properties in the same order that they are chronogically introduced to the element's CSS styles. */
          flushTransformCache: function(element) {
            var transformString = "", data = Data(element);
            if ((IE || Velocity.State.isAndroid && !Velocity.State.isChrome) && data && data.isSVG) {
              var getTransformFloat = function(transformProperty) {
                return parseFloat(CSS.getPropertyValue(element, transformProperty));
              };
              var SVGTransforms = {
                translate: [getTransformFloat("translateX"), getTransformFloat("translateY")],
                skewX: [getTransformFloat("skewX")],
                skewY: [getTransformFloat("skewY")],
                /* If the scale property is set (non-1), use that value for the scaleX and scaleY values
                 (this behavior mimics the result of animating all these properties at once on HTML elements). */
                scale: getTransformFloat("scale") !== 1 ? [getTransformFloat("scale"), getTransformFloat("scale")] : [getTransformFloat("scaleX"), getTransformFloat("scaleY")],
                /* Note: SVG's rotate transform takes three values: rotation degrees followed by the X and Y values
                 defining the rotation's origin point. We ignore the origin values (default them to 0). */
                rotate: [getTransformFloat("rotateZ"), 0, 0]
              };
              $2.each(Data(element).transformCache, function(transformName) {
                if (/^translate/i.test(transformName)) {
                  transformName = "translate";
                } else if (/^scale/i.test(transformName)) {
                  transformName = "scale";
                } else if (/^rotate/i.test(transformName)) {
                  transformName = "rotate";
                }
                if (SVGTransforms[transformName]) {
                  transformString += transformName + "(" + SVGTransforms[transformName].join(" ") + ") ";
                  delete SVGTransforms[transformName];
                }
              });
            } else {
              var transformValue, perspective;
              $2.each(Data(element).transformCache, function(transformName) {
                transformValue = Data(element).transformCache[transformName];
                if (transformName === "transformPerspective") {
                  perspective = transformValue;
                  return true;
                }
                if (IE === 9 && transformName === "rotateZ") {
                  transformName = "rotate";
                }
                transformString += transformName + transformValue + " ";
              });
              if (perspective) {
                transformString = "perspective" + perspective + " " + transformString;
              }
            }
            CSS.setPropertyValue(element, "transform", transformString);
          }
        };
        CSS.Hooks.register();
        CSS.Normalizations.register();
        Velocity.hook = function(elements, arg2, arg3) {
          var value;
          elements = sanitizeElements(elements);
          $2.each(elements, function(i, element) {
            if (Data(element) === undefined$1) {
              Velocity.init(element);
            }
            if (arg3 === undefined$1) {
              if (value === undefined$1) {
                value = CSS.getPropertyValue(element, arg2);
              }
            } else {
              var adjustedSet = CSS.setPropertyValue(element, arg2, arg3);
              if (adjustedSet[0] === "transform") {
                Velocity.CSS.flushTransformCache(element);
              }
              value = adjustedSet;
            }
          });
          return value;
        };
        var animate = function() {
          var opts;
          function getChain() {
            if (isUtility) {
              return promiseData.promise || null;
            } else {
              return elementsWrapped;
            }
          }
          var syntacticSugar = arguments[0] && (arguments[0].p || ($2.isPlainObject(arguments[0].properties) && !arguments[0].properties.names || Type.isString(arguments[0].properties))), isUtility, elementsWrapped, argumentIndex;
          var elements, propertiesMap, options;
          if (Type.isWrapped(this)) {
            isUtility = false;
            argumentIndex = 0;
            elements = this;
            elementsWrapped = this;
          } else {
            isUtility = true;
            argumentIndex = 1;
            elements = syntacticSugar ? arguments[0].elements || arguments[0].e : arguments[0];
          }
          var promiseData = {
            promise: null,
            resolver: null,
            rejecter: null
          };
          if (isUtility && Velocity.Promise) {
            promiseData.promise = new Velocity.Promise(function(resolve, reject) {
              promiseData.resolver = resolve;
              promiseData.rejecter = reject;
            });
          }
          if (syntacticSugar) {
            propertiesMap = arguments[0].properties || arguments[0].p;
            options = arguments[0].options || arguments[0].o;
          } else {
            propertiesMap = arguments[argumentIndex];
            options = arguments[argumentIndex + 1];
          }
          elements = sanitizeElements(elements);
          if (!elements) {
            if (promiseData.promise) {
              if (!propertiesMap || !options || options.promiseRejectEmpty !== false) {
                promiseData.rejecter();
              } else {
                promiseData.resolver();
              }
            }
            return;
          }
          var elementsLength = elements.length, elementsIndex = 0;
          if (!/^(stop|finish|finishAll|pause|resume)$/i.test(propertiesMap) && !$2.isPlainObject(options)) {
            var startingArgumentPosition = argumentIndex + 1;
            options = {};
            for (var i = startingArgumentPosition; i < arguments.length; i++) {
              if (!Type.isArray(arguments[i]) && (/^(fast|normal|slow)$/i.test(arguments[i]) || /^\d/.test(arguments[i]))) {
                options.duration = arguments[i];
              } else if (Type.isString(arguments[i]) || Type.isArray(arguments[i])) {
                options.easing = arguments[i];
              } else if (Type.isFunction(arguments[i])) {
                options.complete = arguments[i];
              }
            }
          }
          var action;
          switch (propertiesMap) {
            case "scroll":
              action = "scroll";
              break;
            case "reverse":
              action = "reverse";
              break;
            case "pause":
              var currentTime = (/* @__PURE__ */ new Date()).getTime();
              $2.each(elements, function(i2, element) {
                pauseDelayOnElement(element, currentTime);
              });
              $2.each(Velocity.State.calls, function(i2, activeCall) {
                var found = false;
                if (activeCall) {
                  $2.each(activeCall[1], function(k, activeElement) {
                    var queueName = options === undefined$1 ? "" : options;
                    if (queueName !== true && activeCall[2].queue !== queueName && !(options === undefined$1 && activeCall[2].queue === false)) {
                      return true;
                    }
                    $2.each(elements, function(l, element) {
                      if (element === activeElement) {
                        activeCall[5] = {
                          resume: false
                        };
                        found = true;
                        return false;
                      }
                    });
                    if (found) {
                      return false;
                    }
                  });
                }
              });
              return getChain();
            case "resume":
              $2.each(elements, function(i2, element) {
                resumeDelayOnElement(element);
              });
              $2.each(Velocity.State.calls, function(i2, activeCall) {
                var found = false;
                if (activeCall) {
                  $2.each(activeCall[1], function(k, activeElement) {
                    var queueName = options === undefined$1 ? "" : options;
                    if (queueName !== true && activeCall[2].queue !== queueName && !(options === undefined$1 && activeCall[2].queue === false)) {
                      return true;
                    }
                    if (!activeCall[5]) {
                      return true;
                    }
                    $2.each(elements, function(l, element) {
                      if (element === activeElement) {
                        activeCall[5].resume = true;
                        found = true;
                        return false;
                      }
                    });
                    if (found) {
                      return false;
                    }
                  });
                }
              });
              return getChain();
            case "finish":
            case "finishAll":
            case "stop":
              $2.each(elements, function(i2, element) {
                if (Data(element) && Data(element).delayTimer) {
                  clearTimeout(Data(element).delayTimer.setTimeout);
                  if (Data(element).delayTimer.next) {
                    Data(element).delayTimer.next();
                  }
                  delete Data(element).delayTimer;
                }
                if (propertiesMap === "finishAll" && (options === true || Type.isString(options))) {
                  $2.each($2.queue(element, Type.isString(options) ? options : ""), function(_, item) {
                    if (Type.isFunction(item)) {
                      item();
                    }
                  });
                  $2.queue(element, Type.isString(options) ? options : "", []);
                }
              });
              var callsToStop = [];
              $2.each(Velocity.State.calls, function(i2, activeCall) {
                if (activeCall) {
                  $2.each(activeCall[1], function(k, activeElement) {
                    var queueName = options === undefined$1 ? "" : options;
                    if (queueName !== true && activeCall[2].queue !== queueName && !(options === undefined$1 && activeCall[2].queue === false)) {
                      return true;
                    }
                    $2.each(elements, function(l, element) {
                      if (element === activeElement) {
                        if (options === true || Type.isString(options)) {
                          $2.each($2.queue(element, Type.isString(options) ? options : ""), function(_, item) {
                            if (Type.isFunction(item)) {
                              item(null, true);
                            }
                          });
                          $2.queue(element, Type.isString(options) ? options : "", []);
                        }
                        if (propertiesMap === "stop") {
                          var data = Data(element);
                          if (data && data.tweensContainer && (queueName === true || queueName === "")) {
                            $2.each(data.tweensContainer, function(m, activeTween) {
                              activeTween.endValue = activeTween.currentValue;
                            });
                          }
                          callsToStop.push(i2);
                        } else if (propertiesMap === "finish" || propertiesMap === "finishAll") {
                          activeCall[2].duration = 1;
                        }
                      }
                    });
                  });
                }
              });
              if (propertiesMap === "stop") {
                $2.each(callsToStop, function(i2, j) {
                  completeCall(j, true);
                });
                if (promiseData.promise) {
                  promiseData.resolver(elements);
                }
              }
              return getChain();
            default:
              if ($2.isPlainObject(propertiesMap) && !Type.isEmptyObject(propertiesMap)) {
                action = "start";
              } else if (Type.isString(propertiesMap) && Velocity.Redirects[propertiesMap]) {
                opts = $2.extend({}, options);
                var durationOriginal = opts.duration, delayOriginal = opts.delay || 0;
                if (opts.backwards === true) {
                  elements = $2.extend(true, [], elements).reverse();
                }
                $2.each(elements, function(elementIndex, element) {
                  if (parseFloat(opts.stagger)) {
                    opts.delay = delayOriginal + parseFloat(opts.stagger) * elementIndex;
                  } else if (Type.isFunction(opts.stagger)) {
                    opts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elementsLength);
                  }
                  if (opts.drag) {
                    opts.duration = parseFloat(durationOriginal) || (/^(callout|transition)/.test(propertiesMap) ? 1e3 : DURATION_DEFAULT);
                    opts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex / elementsLength : (elementIndex + 1) / elementsLength), opts.duration * 0.75, 200);
                  }
                  Velocity.Redirects[propertiesMap].call(element, element, opts || {}, elementIndex, elementsLength, elements, promiseData.promise ? promiseData : undefined$1);
                });
                return getChain();
              } else {
                var abortError = "Velocity: First argument (" + propertiesMap + ") was not a property map, a known action, or a registered redirect. Aborting.";
                if (promiseData.promise) {
                  promiseData.rejecter(new Error(abortError));
                } else if (window2.console) {
                  console.log(abortError);
                }
                return getChain();
              }
          }
          var callUnitConversionData = {
            lastParent: null,
            lastPosition: null,
            lastFontSize: null,
            lastPercentToPxWidth: null,
            lastPercentToPxHeight: null,
            lastEmToPx: null,
            remToPx: null,
            vwToPx: null,
            vhToPx: null
          };
          var call = [];
          function processElement(element, elementArrayIndex) {
            var opts2 = $2.extend({}, Velocity.defaults, options), tweensContainer = {}, elementUnitConversionData;
            if (Data(element) === undefined$1) {
              Velocity.init(element);
            }
            if (parseFloat(opts2.delay) && opts2.queue !== false) {
              $2.queue(element, opts2.queue, function(next, clearQueue) {
                if (clearQueue === true) {
                  return true;
                }
                Velocity.velocityQueueEntryFlag = true;
                var callIndex2 = Velocity.State.delayedElements.count++;
                Velocity.State.delayedElements[callIndex2] = element;
                var delayComplete2 = function(index) {
                  return function() {
                    Velocity.State.delayedElements[index] = false;
                    next();
                  };
                }(callIndex2);
                Data(element).delayBegin = (/* @__PURE__ */ new Date()).getTime();
                Data(element).delay = parseFloat(opts2.delay);
                Data(element).delayTimer = {
                  setTimeout: setTimeout(next, parseFloat(opts2.delay)),
                  next: delayComplete2
                };
              });
            }
            switch (opts2.duration.toString().toLowerCase()) {
              case "fast":
                opts2.duration = 200;
                break;
              case "normal":
                opts2.duration = DURATION_DEFAULT;
                break;
              case "slow":
                opts2.duration = 600;
                break;
              default:
                opts2.duration = parseFloat(opts2.duration) || 1;
            }
            if (Velocity.mock !== false) {
              if (Velocity.mock === true) {
                opts2.duration = opts2.delay = 1;
              } else {
                opts2.duration *= parseFloat(Velocity.mock) || 1;
                opts2.delay *= parseFloat(Velocity.mock) || 1;
              }
            }
            opts2.easing = getEasing(opts2.easing, opts2.duration);
            if (opts2.begin && !Type.isFunction(opts2.begin)) {
              opts2.begin = null;
            }
            if (opts2.progress && !Type.isFunction(opts2.progress)) {
              opts2.progress = null;
            }
            if (opts2.complete && !Type.isFunction(opts2.complete)) {
              opts2.complete = null;
            }
            if (opts2.display !== undefined$1 && opts2.display !== null) {
              opts2.display = opts2.display.toString().toLowerCase();
              if (opts2.display === "auto") {
                opts2.display = Velocity.CSS.Values.getDisplayType(element);
              }
            }
            if (opts2.visibility !== undefined$1 && opts2.visibility !== null) {
              opts2.visibility = opts2.visibility.toString().toLowerCase();
            }
            opts2.mobileHA = opts2.mobileHA && Velocity.State.isMobile && !Velocity.State.isGingerbread;
            function buildQueue(next) {
              var data, lastTweensContainer;
              if (opts2.begin && elementsIndex === 0) {
                try {
                  opts2.begin.call(elements, elements);
                } catch (error) {
                  setTimeout(function() {
                    throw error;
                  }, 1);
                }
              }
              if (action === "scroll") {
                var scrollDirection = /^x$/i.test(opts2.axis) ? "Left" : "Top", scrollOffset = parseFloat(opts2.offset) || 0, scrollPositionCurrent, scrollPositionCurrentAlternate, scrollPositionEnd;
                if (opts2.container) {
                  if (Type.isWrapped(opts2.container) || Type.isNode(opts2.container)) {
                    opts2.container = opts2.container[0] || opts2.container;
                    scrollPositionCurrent = opts2.container["scroll" + scrollDirection];
                    scrollPositionEnd = scrollPositionCurrent + $2(element).position()[scrollDirection.toLowerCase()] + scrollOffset;
                  } else {
                    opts2.container = null;
                  }
                } else {
                  scrollPositionCurrent = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + scrollDirection]];
                  scrollPositionCurrentAlternate = Velocity.State.scrollAnchor[Velocity.State["scrollProperty" + (scrollDirection === "Left" ? "Top" : "Left")]];
                  scrollPositionEnd = $2(element).offset()[scrollDirection.toLowerCase()] + scrollOffset;
                }
                tweensContainer = {
                  scroll: {
                    rootPropertyValue: false,
                    startValue: scrollPositionCurrent,
                    currentValue: scrollPositionCurrent,
                    endValue: scrollPositionEnd,
                    unitType: "",
                    easing: opts2.easing,
                    scrollData: {
                      container: opts2.container,
                      direction: scrollDirection,
                      alternateValue: scrollPositionCurrentAlternate
                    }
                  },
                  element
                };
                if (Velocity.debug) {
                  console.log("tweensContainer (scroll): ", tweensContainer.scroll, element);
                }
              } else if (action === "reverse") {
                data = Data(element);
                if (!data) {
                  return;
                }
                if (!data.tweensContainer) {
                  $2.dequeue(element, opts2.queue);
                  return;
                } else {
                  if (data.opts.display === "none") {
                    data.opts.display = "auto";
                  }
                  if (data.opts.visibility === "hidden") {
                    data.opts.visibility = "visible";
                  }
                  data.opts.loop = false;
                  data.opts.begin = null;
                  data.opts.complete = null;
                  if (!options.easing) {
                    delete opts2.easing;
                  }
                  if (!options.duration) {
                    delete opts2.duration;
                  }
                  opts2 = $2.extend({}, data.opts, opts2);
                  lastTweensContainer = $2.extend(true, {}, data ? data.tweensContainer : null);
                  for (var lastTween in lastTweensContainer) {
                    if (lastTweensContainer.hasOwnProperty(lastTween) && lastTween !== "element") {
                      var lastStartValue = lastTweensContainer[lastTween].startValue;
                      lastTweensContainer[lastTween].startValue = lastTweensContainer[lastTween].currentValue = lastTweensContainer[lastTween].endValue;
                      lastTweensContainer[lastTween].endValue = lastStartValue;
                      if (!Type.isEmptyObject(options)) {
                        lastTweensContainer[lastTween].easing = opts2.easing;
                      }
                      if (Velocity.debug) {
                        console.log("reverse tweensContainer (" + lastTween + "): " + JSON.stringify(lastTweensContainer[lastTween]), element);
                      }
                    }
                  }
                  tweensContainer = lastTweensContainer;
                }
              } else if (action === "start") {
                data = Data(element);
                if (data && data.tweensContainer && data.isAnimating === true) {
                  lastTweensContainer = data.tweensContainer;
                }
                var parsePropertyValue = function(valueData2, skipResolvingEasing) {
                  var endValue2, easing2, startValue2;
                  if (Type.isFunction(valueData2)) {
                    valueData2 = valueData2.call(element, elementArrayIndex, elementsLength);
                  }
                  if (Type.isArray(valueData2)) {
                    endValue2 = valueData2[0];
                    if (!Type.isArray(valueData2[1]) && /^[\d-]/.test(valueData2[1]) || Type.isFunction(valueData2[1]) || CSS.RegEx.isHex.test(valueData2[1])) {
                      startValue2 = valueData2[1];
                    } else if (Type.isString(valueData2[1]) && !CSS.RegEx.isHex.test(valueData2[1]) && Velocity.Easings[valueData2[1]] || Type.isArray(valueData2[1])) {
                      easing2 = skipResolvingEasing ? valueData2[1] : getEasing(valueData2[1], opts2.duration);
                      startValue2 = valueData2[2];
                    } else {
                      startValue2 = valueData2[1] || valueData2[2];
                    }
                  } else {
                    endValue2 = valueData2;
                  }
                  if (!skipResolvingEasing) {
                    easing2 = easing2 || opts2.easing;
                  }
                  if (Type.isFunction(endValue2)) {
                    endValue2 = endValue2.call(element, elementArrayIndex, elementsLength);
                  }
                  if (Type.isFunction(startValue2)) {
                    startValue2 = startValue2.call(element, elementArrayIndex, elementsLength);
                  }
                  return [endValue2 || 0, easing2, startValue2];
                };
                var fixPropertyValue = function(property2, valueData2) {
                  var rootProperty = CSS.Hooks.getRoot(property2), rootPropertyValue = false, endValue2 = valueData2[0], easing2 = valueData2[1], startValue2 = valueData2[2], pattern;
                  if ((!data || !data.isSVG) && rootProperty !== "tween" && CSS.Names.prefixCheck(rootProperty)[1] === false && CSS.Normalizations.registered[rootProperty] === undefined$1) {
                    if (Velocity.debug) {
                      console.log("Skipping [" + rootProperty + "] due to a lack of browser support.");
                    }
                    return;
                  }
                  if ((opts2.display !== undefined$1 && opts2.display !== null && opts2.display !== "none" || opts2.visibility !== undefined$1 && opts2.visibility !== "hidden") && /opacity|filter/.test(property2) && !startValue2 && endValue2 !== 0) {
                    startValue2 = 0;
                  }
                  if (opts2._cacheValues && lastTweensContainer && lastTweensContainer[property2]) {
                    if (startValue2 === undefined$1) {
                      startValue2 = lastTweensContainer[property2].endValue + lastTweensContainer[property2].unitType;
                    }
                    rootPropertyValue = data.rootPropertyValueCache[rootProperty];
                  } else {
                    if (CSS.Hooks.registered[property2]) {
                      if (startValue2 === undefined$1) {
                        rootPropertyValue = CSS.getPropertyValue(element, rootProperty);
                        startValue2 = CSS.getPropertyValue(element, property2, rootPropertyValue);
                      } else {
                        rootPropertyValue = CSS.Hooks.templates[rootProperty][1];
                      }
                    } else if (startValue2 === undefined$1) {
                      startValue2 = CSS.getPropertyValue(element, property2);
                    }
                  }
                  var separatedValue, endValueUnitType, startValueUnitType, operator = false;
                  var separateValue = function(property3, value) {
                    var unitType, numericValue;
                    numericValue = (value || "0").toString().toLowerCase().replace(/[%A-z]+$/, function(match) {
                      unitType = match;
                      return "";
                    });
                    if (!unitType) {
                      unitType = CSS.Values.getUnitType(property3);
                    }
                    return [numericValue, unitType];
                  };
                  if (startValue2 !== endValue2 && Type.isString(startValue2) && Type.isString(endValue2)) {
                    pattern = "";
                    var iStart = 0, iEnd = 0, aStart = [], aEnd = [], inCalc = 0, inRGB = 0, inRGBA = 0;
                    startValue2 = CSS.Hooks.fixColors(startValue2);
                    endValue2 = CSS.Hooks.fixColors(endValue2);
                    while (iStart < startValue2.length && iEnd < endValue2.length) {
                      var cStart = startValue2[iStart], cEnd = endValue2[iEnd];
                      if (/[\d\.-]/.test(cStart) && /[\d\.-]/.test(cEnd)) {
                        var tStart = cStart, tEnd = cEnd, dotStart = ".", dotEnd = ".";
                        while (++iStart < startValue2.length) {
                          cStart = startValue2[iStart];
                          if (cStart === dotStart) {
                            dotStart = "..";
                          } else if (!/\d/.test(cStart)) {
                            break;
                          }
                          tStart += cStart;
                        }
                        while (++iEnd < endValue2.length) {
                          cEnd = endValue2[iEnd];
                          if (cEnd === dotEnd) {
                            dotEnd = "..";
                          } else if (!/\d/.test(cEnd)) {
                            break;
                          }
                          tEnd += cEnd;
                        }
                        var uStart = CSS.Hooks.getUnit(startValue2, iStart), uEnd = CSS.Hooks.getUnit(endValue2, iEnd);
                        iStart += uStart.length;
                        iEnd += uEnd.length;
                        if (uStart === uEnd) {
                          if (tStart === tEnd) {
                            pattern += tStart + uStart;
                          } else {
                            pattern += "{" + aStart.length + (inRGB ? "!" : "") + "}" + uStart;
                            aStart.push(parseFloat(tStart));
                            aEnd.push(parseFloat(tEnd));
                          }
                        } else {
                          var nStart = parseFloat(tStart), nEnd = parseFloat(tEnd);
                          pattern += (inCalc < 5 ? "calc" : "") + "(" + (nStart ? "{" + aStart.length + (inRGB ? "!" : "") + "}" : "0") + uStart + " + " + (nEnd ? "{" + (aStart.length + (nStart ? 1 : 0)) + (inRGB ? "!" : "") + "}" : "0") + uEnd + ")";
                          if (nStart) {
                            aStart.push(nStart);
                            aEnd.push(0);
                          }
                          if (nEnd) {
                            aStart.push(0);
                            aEnd.push(nEnd);
                          }
                        }
                      } else if (cStart === cEnd) {
                        pattern += cStart;
                        iStart++;
                        iEnd++;
                        if (inCalc === 0 && cStart === "c" || inCalc === 1 && cStart === "a" || inCalc === 2 && cStart === "l" || inCalc === 3 && cStart === "c" || inCalc >= 4 && cStart === "(") {
                          inCalc++;
                        } else if (inCalc && inCalc < 5 || inCalc >= 4 && cStart === ")" && --inCalc < 5) {
                          inCalc = 0;
                        }
                        if (inRGB === 0 && cStart === "r" || inRGB === 1 && cStart === "g" || inRGB === 2 && cStart === "b" || inRGB === 3 && cStart === "a" || inRGB >= 3 && cStart === "(") {
                          if (inRGB === 3 && cStart === "a") {
                            inRGBA = 1;
                          }
                          inRGB++;
                        } else if (inRGBA && cStart === ",") {
                          if (++inRGBA > 3) {
                            inRGB = inRGBA = 0;
                          }
                        } else if (inRGBA && inRGB < (inRGBA ? 5 : 4) || inRGB >= (inRGBA ? 4 : 3) && cStart === ")" && --inRGB < (inRGBA ? 5 : 4)) {
                          inRGB = inRGBA = 0;
                        }
                      } else {
                        inCalc = 0;
                        break;
                      }
                    }
                    if (iStart !== startValue2.length || iEnd !== endValue2.length) {
                      if (Velocity.debug) {
                        console.error('Trying to pattern match mis-matched strings ["' + endValue2 + '", "' + startValue2 + '"]');
                      }
                      pattern = undefined$1;
                    }
                    if (pattern) {
                      if (aStart.length) {
                        if (Velocity.debug) {
                          console.log('Pattern found "' + pattern + '" -> ', aStart, aEnd, "[" + startValue2 + "," + endValue2 + "]");
                        }
                        startValue2 = aStart;
                        endValue2 = aEnd;
                        endValueUnitType = startValueUnitType = "";
                      } else {
                        pattern = undefined$1;
                      }
                    }
                  }
                  if (!pattern) {
                    separatedValue = separateValue(property2, startValue2);
                    startValue2 = separatedValue[0];
                    startValueUnitType = separatedValue[1];
                    separatedValue = separateValue(property2, endValue2);
                    endValue2 = separatedValue[0].replace(/^([+-\/*])=/, function(match, subMatch) {
                      operator = subMatch;
                      return "";
                    });
                    endValueUnitType = separatedValue[1];
                    startValue2 = parseFloat(startValue2) || 0;
                    endValue2 = parseFloat(endValue2) || 0;
                    if (endValueUnitType === "%") {
                      if (/^(fontSize|lineHeight)$/.test(property2)) {
                        endValue2 = endValue2 / 100;
                        endValueUnitType = "em";
                      } else if (/^scale/.test(property2)) {
                        endValue2 = endValue2 / 100;
                        endValueUnitType = "";
                      } else if (/(Red|Green|Blue)$/i.test(property2)) {
                        endValue2 = endValue2 / 100 * 255;
                        endValueUnitType = "";
                      }
                    }
                  }
                  var calculateUnitRatios = function() {
                    var sameRatioIndicators = {
                      myParent: element.parentNode || document2.body,
                      /* GET */
                      position: CSS.getPropertyValue(element, "position"),
                      /* GET */
                      fontSize: CSS.getPropertyValue(element, "fontSize")
                      /* GET */
                    }, samePercentRatio = sameRatioIndicators.position === callUnitConversionData.lastPosition && sameRatioIndicators.myParent === callUnitConversionData.lastParent, sameEmRatio = sameRatioIndicators.fontSize === callUnitConversionData.lastFontSize;
                    callUnitConversionData.lastParent = sameRatioIndicators.myParent;
                    callUnitConversionData.lastPosition = sameRatioIndicators.position;
                    callUnitConversionData.lastFontSize = sameRatioIndicators.fontSize;
                    var measurement = 100, unitRatios = {};
                    if (!sameEmRatio || !samePercentRatio) {
                      var dummy = data && data.isSVG ? document2.createElementNS("http://www.w3.org/2000/svg", "rect") : document2.createElement("div");
                      Velocity.init(dummy);
                      sameRatioIndicators.myParent.appendChild(dummy);
                      $2.each(["overflow", "overflowX", "overflowY"], function(i3, property3) {
                        Velocity.CSS.setPropertyValue(dummy, property3, "hidden");
                      });
                      Velocity.CSS.setPropertyValue(dummy, "position", sameRatioIndicators.position);
                      Velocity.CSS.setPropertyValue(dummy, "fontSize", sameRatioIndicators.fontSize);
                      Velocity.CSS.setPropertyValue(dummy, "boxSizing", "content-box");
                      $2.each(["minWidth", "maxWidth", "width", "minHeight", "maxHeight", "height"], function(i3, property3) {
                        Velocity.CSS.setPropertyValue(dummy, property3, measurement + "%");
                      });
                      Velocity.CSS.setPropertyValue(dummy, "paddingLeft", measurement + "em");
                      unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth = (parseFloat(CSS.getPropertyValue(dummy, "width", null, true)) || 1) / measurement;
                      unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight = (parseFloat(CSS.getPropertyValue(dummy, "height", null, true)) || 1) / measurement;
                      unitRatios.emToPx = callUnitConversionData.lastEmToPx = (parseFloat(CSS.getPropertyValue(dummy, "paddingLeft")) || 1) / measurement;
                      sameRatioIndicators.myParent.removeChild(dummy);
                    } else {
                      unitRatios.emToPx = callUnitConversionData.lastEmToPx;
                      unitRatios.percentToPxWidth = callUnitConversionData.lastPercentToPxWidth;
                      unitRatios.percentToPxHeight = callUnitConversionData.lastPercentToPxHeight;
                    }
                    if (callUnitConversionData.remToPx === null) {
                      callUnitConversionData.remToPx = parseFloat(CSS.getPropertyValue(document2.body, "fontSize")) || 16;
                    }
                    if (callUnitConversionData.vwToPx === null) {
                      callUnitConversionData.vwToPx = parseFloat(window2.innerWidth) / 100;
                      callUnitConversionData.vhToPx = parseFloat(window2.innerHeight) / 100;
                    }
                    unitRatios.remToPx = callUnitConversionData.remToPx;
                    unitRatios.vwToPx = callUnitConversionData.vwToPx;
                    unitRatios.vhToPx = callUnitConversionData.vhToPx;
                    if (Velocity.debug >= 1) {
                      console.log("Unit ratios: " + JSON.stringify(unitRatios), element);
                    }
                    return unitRatios;
                  };
                  if (/[\/*]/.test(operator)) {
                    endValueUnitType = startValueUnitType;
                  } else if (startValueUnitType !== endValueUnitType && startValue2 !== 0) {
                    if (endValue2 === 0) {
                      endValueUnitType = startValueUnitType;
                    } else {
                      elementUnitConversionData = elementUnitConversionData || calculateUnitRatios();
                      var axis = /margin|padding|left|right|width|text|word|letter/i.test(property2) || /X$/.test(property2) || property2 === "x" ? "x" : "y";
                      switch (startValueUnitType) {
                        case "%":
                          startValue2 *= axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight;
                          break;
                        case "px":
                          break;
                        default:
                          startValue2 *= elementUnitConversionData[startValueUnitType + "ToPx"];
                      }
                      switch (endValueUnitType) {
                        case "%":
                          startValue2 *= 1 / (axis === "x" ? elementUnitConversionData.percentToPxWidth : elementUnitConversionData.percentToPxHeight);
                          break;
                        case "px":
                          break;
                        default:
                          startValue2 *= 1 / elementUnitConversionData[endValueUnitType + "ToPx"];
                      }
                    }
                  }
                  switch (operator) {
                    case "+":
                      endValue2 = startValue2 + endValue2;
                      break;
                    case "-":
                      endValue2 = startValue2 - endValue2;
                      break;
                    case "*":
                      endValue2 = startValue2 * endValue2;
                      break;
                    case "/":
                      endValue2 = startValue2 / endValue2;
                      break;
                  }
                  tweensContainer[property2] = {
                    rootPropertyValue,
                    startValue: startValue2,
                    currentValue: startValue2,
                    endValue: endValue2,
                    unitType: endValueUnitType,
                    easing: easing2
                  };
                  if (pattern) {
                    tweensContainer[property2].pattern = pattern;
                  }
                  if (Velocity.debug) {
                    console.log("tweensContainer (" + property2 + "): " + JSON.stringify(tweensContainer[property2]), element);
                  }
                };
                for (var property in propertiesMap) {
                  if (!propertiesMap.hasOwnProperty(property)) {
                    continue;
                  }
                  var propertyName = CSS.Names.camelCase(property), valueData = parsePropertyValue(propertiesMap[property]);
                  if (_inArray(CSS.Lists.colors)) {
                    var endValue = valueData[0], easing = valueData[1], startValue = valueData[2];
                    if (CSS.RegEx.isHex.test(endValue)) {
                      var colorComponents = ["Red", "Green", "Blue"], endValueRGB = CSS.Values.hexToRgb(endValue), startValueRGB = startValue ? CSS.Values.hexToRgb(startValue) : undefined$1;
                      for (var i2 = 0; i2 < colorComponents.length; i2++) {
                        var dataArray = [endValueRGB[i2]];
                        if (easing) {
                          dataArray.push(easing);
                        }
                        if (startValueRGB !== undefined$1) {
                          dataArray.push(startValueRGB[i2]);
                        }
                        fixPropertyValue(propertyName + colorComponents[i2], dataArray);
                      }
                      continue;
                    }
                  }
                  fixPropertyValue(propertyName, valueData);
                }
                tweensContainer.element = element;
              }
              if (tweensContainer.element) {
                CSS.Values.addClass(element, "velocity-animating");
                call.push(tweensContainer);
                data = Data(element);
                if (data) {
                  if (opts2.queue === "") {
                    data.tweensContainer = tweensContainer;
                    data.opts = opts2;
                  }
                  data.isAnimating = true;
                }
                if (elementsIndex === elementsLength - 1) {
                  Velocity.State.calls.push([call, elements, opts2, null, promiseData.resolver, null, 0]);
                  if (Velocity.State.isTicking === false) {
                    Velocity.State.isTicking = true;
                    tick();
                  }
                } else {
                  elementsIndex++;
                }
              }
            }
            if (opts2.queue === false) {
              if (opts2.delay) {
                var callIndex = Velocity.State.delayedElements.count++;
                Velocity.State.delayedElements[callIndex] = element;
                var delayComplete = function(index) {
                  return function() {
                    Velocity.State.delayedElements[index] = false;
                    buildQueue();
                  };
                }(callIndex);
                Data(element).delayBegin = (/* @__PURE__ */ new Date()).getTime();
                Data(element).delay = parseFloat(opts2.delay);
                Data(element).delayTimer = {
                  setTimeout: setTimeout(buildQueue, parseFloat(opts2.delay)),
                  next: delayComplete
                };
              } else {
                buildQueue();
              }
            } else {
              $2.queue(element, opts2.queue, function(next, clearQueue) {
                if (clearQueue === true) {
                  if (promiseData.promise) {
                    promiseData.resolver(elements);
                  }
                  return true;
                }
                Velocity.velocityQueueEntryFlag = true;
                buildQueue();
              });
            }
            if ((opts2.queue === "" || opts2.queue === "fx") && $2.queue(element)[0] !== "inprogress") {
              $2.dequeue(element);
            }
          }
          $2.each(elements, function(i2, element) {
            if (Type.isNode(element)) {
              processElement(element, i2);
            }
          });
          opts = $2.extend({}, Velocity.defaults, options);
          opts.loop = parseInt(opts.loop, 10);
          var reverseCallsCount = opts.loop * 2 - 1;
          if (opts.loop) {
            for (var x = 0; x < reverseCallsCount; x++) {
              var reverseOptions = {
                delay: opts.delay,
                progress: opts.progress
              };
              if (x === reverseCallsCount - 1) {
                reverseOptions.display = opts.display;
                reverseOptions.visibility = opts.visibility;
                reverseOptions.complete = opts.complete;
              }
              animate(elements, "reverse", reverseOptions);
            }
          }
          return getChain();
        };
        Velocity = $2.extend(animate, Velocity);
        Velocity.animate = animate;
        var ticker = window2.requestAnimationFrame || rAFShim;
        if (!Velocity.State.isMobile && document2.hidden !== undefined$1) {
          var updateTicker = function() {
            if (document2.hidden) {
              ticker = function(callback) {
                return setTimeout(function() {
                  callback(true);
                }, 16);
              };
              tick();
            } else {
              ticker = window2.requestAnimationFrame || rAFShim;
            }
          };
          updateTicker();
          document2.addEventListener("visibilitychange", updateTicker);
        }
        function tick(timestamp) {
          if (timestamp) {
            var timeCurrent = Velocity.timestamp && timestamp !== true ? timestamp : performance.now();
            var callsLength = Velocity.State.calls.length;
            if (callsLength > 1e4) {
              Velocity.State.calls = compactSparseArray(Velocity.State.calls);
              callsLength = Velocity.State.calls.length;
            }
            for (var i = 0; i < callsLength; i++) {
              if (!Velocity.State.calls[i]) {
                continue;
              }
              var callContainer = Velocity.State.calls[i], call = callContainer[0], opts = callContainer[2], timeStart = callContainer[3], firstTick = !timeStart, tweenDummyValue = null, pauseObject = callContainer[5], millisecondsEllapsed = callContainer[6];
              if (!timeStart) {
                timeStart = Velocity.State.calls[i][3] = timeCurrent - 16;
              }
              if (pauseObject) {
                if (pauseObject.resume === true) {
                  timeStart = callContainer[3] = Math.round(timeCurrent - millisecondsEllapsed - 16);
                  callContainer[5] = null;
                } else {
                  continue;
                }
              }
              millisecondsEllapsed = callContainer[6] = timeCurrent - timeStart;
              var percentComplete = Math.min(millisecondsEllapsed / opts.duration, 1);
              for (var j = 0, callLength = call.length; j < callLength; j++) {
                var tweensContainer = call[j], element = tweensContainer.element;
                if (!Data(element)) {
                  continue;
                }
                var transformPropertyExists = false;
                if (opts.display !== undefined$1 && opts.display !== null && opts.display !== "none") {
                  if (opts.display === "flex") {
                    var flexValues = ["-webkit-box", "-moz-box", "-ms-flexbox", "-webkit-flex"];
                    $2.each(flexValues, function(i2, flexValue) {
                      CSS.setPropertyValue(element, "display", flexValue);
                    });
                  }
                  CSS.setPropertyValue(element, "display", opts.display);
                }
                if (opts.visibility !== undefined$1 && opts.visibility !== "hidden") {
                  CSS.setPropertyValue(element, "visibility", opts.visibility);
                }
                for (var property in tweensContainer) {
                  if (tweensContainer.hasOwnProperty(property) && property !== "element") {
                    var tween = tweensContainer[property], currentValue, easing = Type.isString(tween.easing) ? Velocity.Easings[tween.easing] : tween.easing;
                    if (Type.isString(tween.pattern)) {
                      var patternReplace = percentComplete === 1 ? function($0, index, round) {
                        var result = tween.endValue[index];
                        return round ? Math.round(result) : result;
                      } : function($0, index, round) {
                        var startValue = tween.startValue[index], tweenDelta2 = tween.endValue[index] - startValue, result = startValue + tweenDelta2 * easing(percentComplete, opts, tweenDelta2);
                        return round ? Math.round(result) : result;
                      };
                      currentValue = tween.pattern.replace(/{(\d+)(!)?}/g, patternReplace);
                    } else if (percentComplete === 1) {
                      currentValue = tween.endValue;
                    } else {
                      var tweenDelta = tween.endValue - tween.startValue;
                      currentValue = tween.startValue + tweenDelta * easing(percentComplete, opts, tweenDelta);
                    }
                    if (!firstTick && currentValue === tween.currentValue) {
                      continue;
                    }
                    tween.currentValue = currentValue;
                    if (property === "tween") {
                      tweenDummyValue = currentValue;
                    } else {
                      var hookRoot;
                      if (CSS.Hooks.registered[property]) {
                        hookRoot = CSS.Hooks.getRoot(property);
                        var rootPropertyValueCache = Data(element).rootPropertyValueCache[hookRoot];
                        if (rootPropertyValueCache) {
                          tween.rootPropertyValue = rootPropertyValueCache;
                        }
                      }
                      var adjustedSetData = CSS.setPropertyValue(
                        element,
                        /* SET */
                        property,
                        tween.currentValue + (IE < 9 && parseFloat(currentValue) === 0 ? "" : tween.unitType),
                        tween.rootPropertyValue,
                        tween.scrollData
                      );
                      if (CSS.Hooks.registered[property]) {
                        if (CSS.Normalizations.registered[hookRoot]) {
                          Data(element).rootPropertyValueCache[hookRoot] = CSS.Normalizations.registered[hookRoot]("extract", null, adjustedSetData[1]);
                        } else {
                          Data(element).rootPropertyValueCache[hookRoot] = adjustedSetData[1];
                        }
                      }
                      if (adjustedSetData[0] === "transform") {
                        transformPropertyExists = true;
                      }
                    }
                  }
                }
                if (opts.mobileHA) {
                  if (Data(element).transformCache.translate3d === undefined$1) {
                    Data(element).transformCache.translate3d = "(0px, 0px, 0px)";
                    transformPropertyExists = true;
                  }
                }
                if (transformPropertyExists) {
                  CSS.flushTransformCache(element);
                }
              }
              if (opts.display !== undefined$1 && opts.display !== "none") {
                Velocity.State.calls[i][2].display = false;
              }
              if (opts.visibility !== undefined$1 && opts.visibility !== "hidden") {
                Velocity.State.calls[i][2].visibility = false;
              }
              if (opts.progress) {
                opts.progress.call(
                  callContainer[1],
                  callContainer[1],
                  percentComplete,
                  Math.max(0, timeStart + opts.duration - timeCurrent),
                  timeStart,
                  tweenDummyValue
                );
              }
              if (percentComplete === 1) {
                completeCall(i);
              }
            }
          }
          if (Velocity.State.isTicking) {
            ticker(tick);
          }
        }
        function completeCall(callIndex, isStopped) {
          if (!Velocity.State.calls[callIndex]) {
            return false;
          }
          var call = Velocity.State.calls[callIndex][0], elements = Velocity.State.calls[callIndex][1], opts = Velocity.State.calls[callIndex][2], resolver = Velocity.State.calls[callIndex][4];
          var remainingCallsExist = false;
          for (var i = 0, callLength = call.length; i < callLength; i++) {
            var element = call[i].element;
            if (!isStopped && !opts.loop) {
              if (opts.display === "none") {
                CSS.setPropertyValue(element, "display", opts.display);
              }
              if (opts.visibility === "hidden") {
                CSS.setPropertyValue(element, "visibility", opts.visibility);
              }
            }
            var data = Data(element);
            if (opts.loop !== true && ($2.queue(element)[1] === undefined$1 || !/\.velocityQueueEntryFlag/i.test($2.queue(element)[1]))) {
              if (data) {
                data.isAnimating = false;
                data.rootPropertyValueCache = {};
                var transformHAPropertyExists = false;
                $2.each(CSS.Lists.transforms3D, function(i2, transformName) {
                  var defaultValue = /^scale/.test(transformName) ? 1 : 0, currentValue = data.transformCache[transformName];
                  if (data.transformCache[transformName] !== undefined$1 && new RegExp("^\\(" + defaultValue + "[^.]").test(currentValue)) {
                    transformHAPropertyExists = true;
                    delete data.transformCache[transformName];
                  }
                });
                if (opts.mobileHA) {
                  transformHAPropertyExists = true;
                  delete data.transformCache.translate3d;
                }
                if (transformHAPropertyExists) {
                  CSS.flushTransformCache(element);
                }
                CSS.Values.removeClass(element, "velocity-animating");
              }
            }
            if (!isStopped && opts.complete && !opts.loop && i === callLength - 1) {
              try {
                opts.complete.call(elements, elements);
              } catch (error) {
                setTimeout(function() {
                  throw error;
                }, 1);
              }
            }
            if (resolver && opts.loop !== true) {
              resolver(elements);
            }
            if (data && opts.loop === true && !isStopped) {
              $2.each(data.tweensContainer, function(propertyName, tweenContainer) {
                if (/^rotate/.test(propertyName) && (parseFloat(tweenContainer.startValue) - parseFloat(tweenContainer.endValue)) % 360 === 0) {
                  var oldStartValue = tweenContainer.startValue;
                  tweenContainer.startValue = tweenContainer.endValue;
                  tweenContainer.endValue = oldStartValue;
                }
                if (/^backgroundPosition/.test(propertyName) && parseFloat(tweenContainer.endValue) === 100 && tweenContainer.unitType === "%") {
                  tweenContainer.endValue = 0;
                  tweenContainer.startValue = 100;
                }
              });
              Velocity(element, "reverse", { loop: true, delay: opts.delay });
            }
            if (opts.queue !== false) {
              $2.dequeue(element, opts.queue);
            }
          }
          Velocity.State.calls[callIndex] = false;
          for (var j = 0, callsLength = Velocity.State.calls.length; j < callsLength; j++) {
            if (Velocity.State.calls[j] !== false) {
              remainingCallsExist = true;
              break;
            }
          }
          if (remainingCallsExist === false) {
            Velocity.State.isTicking = false;
            delete Velocity.State.calls;
            Velocity.State.calls = [];
          }
        }
        global2.Velocity = Velocity;
        if (global2 !== window2) {
          global2.fn.velocity = animate;
          global2.fn.velocity.defaults = Velocity.defaults;
        }
        $2.each(["Down", "Up"], function(i, direction) {
          Velocity.Redirects["slide" + direction] = function(element, options, elementsIndex, elementsSize, elements, promiseData) {
            var opts = $2.extend({}, options), begin = opts.begin, complete = opts.complete, inlineValues = {}, computedValues = { height: "", marginTop: "", marginBottom: "", paddingTop: "", paddingBottom: "" };
            if (opts.display === undefined$1) {
              opts.display = direction === "Down" ? Velocity.CSS.Values.getDisplayType(element) === "inline" ? "inline-block" : "block" : "none";
            }
            opts.begin = function() {
              if (elementsIndex === 0 && begin) {
                begin.call(elements, elements);
              }
              for (var property in computedValues) {
                if (!computedValues.hasOwnProperty(property)) {
                  continue;
                }
                inlineValues[property] = element.style[property];
                var propertyValue = CSS.getPropertyValue(element, property);
                computedValues[property] = direction === "Down" ? [propertyValue, 0] : [0, propertyValue];
              }
              inlineValues.overflow = element.style.overflow;
              element.style.overflow = "hidden";
            };
            opts.complete = function() {
              for (var property in inlineValues) {
                if (inlineValues.hasOwnProperty(property)) {
                  element.style[property] = inlineValues[property];
                }
              }
              if (elementsIndex === elementsSize - 1) {
                if (complete) {
                  complete.call(elements, elements);
                }
                if (promiseData) {
                  promiseData.resolver(elements);
                }
              }
            };
            Velocity(element, computedValues, opts);
          };
        });
        $2.each(["In", "Out"], function(i, direction) {
          Velocity.Redirects["fade" + direction] = function(element, options, elementsIndex, elementsSize, elements, promiseData) {
            var opts = $2.extend({}, options), complete = opts.complete, propertiesMap = { opacity: direction === "In" ? 1 : 0 };
            if (elementsIndex !== 0) {
              opts.begin = null;
            }
            if (elementsIndex !== elementsSize - 1) {
              opts.complete = null;
            } else {
              opts.complete = function() {
                if (complete) {
                  complete.call(elements, elements);
                }
                if (promiseData) {
                  promiseData.resolver(elements);
                }
              };
            }
            if (opts.display === undefined$1) {
              opts.display = direction === "In" ? "auto" : "none";
            }
            Velocity(this, propertiesMap, opts);
          };
        });
        return Velocity;
      }(window.jQuery || window.Zepto || window, window, window ? window.document : void 0);
    });
  })(velocity);
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  function updateSources(img, sources) {
    if (sources === void 0) {
      return;
    }
    const imgSiblingWebp = $$1(img).siblings('source[type="image/webp"]');
    const imgSiblingAvif = $$1(img).siblings('source[type="image/avif"]');
    if (sources.webp !== void 0 && imgSiblingWebp.length) {
      imgSiblingWebp.attr("srcset", sources.webp);
    }
    if (sources.avif !== void 0 && imgSiblingAvif.length) {
      imgSiblingAvif.attr("srcset", sources.avif);
    }
  }
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  class ProductMinitature {
    init() {
      $$1(".js-product-miniature").each((index, element) => {
        if ($$1(element).find(".color").length > 5) {
          let count = 0;
          $$1(element).find(".color").each((colorIndex, colorElement) => {
            if (colorIndex > 4) {
              $$1(colorElement).hide();
              count += 1;
            }
          });
          $$1(element).find(".js-count").append(`+${count}`);
        }
      });
    }
  }
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  $$1(document).ready(() => {
    const move = (direction) => {
      const THUMB_MARGIN = 20;
      const $thumbnails = $$1(".js-qv-product-images");
      const thumbHeight = $$1(".js-qv-product-images li img").height() + THUMB_MARGIN;
      const currentPosition = $thumbnails.position().top;
      $thumbnails.velocity(
        {
          translateY: direction === "up" ? currentPosition + thumbHeight : currentPosition - thumbHeight
        },
        () => {
          if ($thumbnails.position().top >= 0) {
            $$1(".arrow-up").css("opacity", ".2");
          } else if ($thumbnails.position().top + $thumbnails.height() <= $$1(".js-qv-mask").height()) {
            $$1(".arrow-down").css("opacity", ".2");
          }
        }
      );
    };
    const productConfig = (qv) => {
      const MAX_THUMBS = 4;
      const $arrows = $$1(prestashop$1.themeSelectors.product.arrows);
      const $thumbnails = qv.find(".js-qv-product-images");
      $$1(prestashop$1.themeSelectors.product.thumb).on("click", (event) => {
        if ($$1(prestashop$1.themeSelectors.product.thumb).hasClass("selected")) {
          $$1(prestashop$1.themeSelectors.product.thumb).removeClass("selected");
        }
        $$1(event.currentTarget).addClass("selected");
        $$1(prestashop$1.themeSelectors.product.cover).attr(
          "src",
          $$1(event.target).data("image-large-src")
        );
        $$1(prestashop$1.themeSelectors.product.cover).attr(
          "alt",
          $$1(event.target).attr("alt")
        );
        $$1(prestashop$1.themeSelectors.product.cover).attr(
          "title",
          $$1(event.target).attr("title")
        );
        updateSources(
          $$1(prestashop$1.themeSelectors.product.cover),
          $$1(event.target).data("image-large-sources")
        );
      });
      if ($thumbnails.find("li").length <= MAX_THUMBS) {
        $arrows.hide();
      } else {
        $arrows.on("click", (event) => {
          if ($$1(event.target).hasClass("arrow-up") && $$1(".js-qv-product-images").position().top < 0) {
            move("up");
            $$1(prestashop$1.themeSelectors.arrowDown).css("opacity", "1");
          } else if ($$1(event.target).hasClass("arrow-down") && $thumbnails.position().top + $thumbnails.height() > $$1(".js-qv-mask").height()) {
            move("down");
            $$1(prestashop$1.themeSelectors.arrowUp).css("opacity", "1");
          }
        });
      }
      qv.find(prestashop$1.selectors.quantityWanted).TouchSpin({
        verticalbuttons: true,
        min: 1,
        max: 1e6
      });
      $$1(prestashop$1.themeSelectors.touchspin).off("touchstart.touchspin");
    };
    prestashop$1.on("clickQuickView", (elm) => {
      const data = {
        action: "quickview",
        id_product: elm.dataset.idProduct,
        id_product_attribute: elm.dataset.idProductAttribute
      };
      $$1.post(prestashop$1.urls.pages.product, data, null, "json").then((resp) => {
        $$1("body").append(resp.quickview_html);
        const productModal = $$1(
          `#quickview-modal-${resp.product.id}-${resp.product.id_product_attribute}`
        );
        productModal.modal("show");
        productConfig(productModal);
        productModal.on("hidden.bs.modal", () => {
          productModal.remove();
        });
      }).fail((resp) => {
        prestashop$1.emit("handleError", {
          eventType: "clickQuickView",
          resp
        });
      });
    });
    $$1("body").on(
      "click",
      prestashop$1.themeSelectors.listing.searchFilterToggler,
      () => {
        $$1(prestashop$1.themeSelectors.listing.searchFiltersWrapper).removeClass(
          "hidden-sm-down"
        );
        $$1(prestashop$1.themeSelectors.contentWrapper).addClass("hidden-sm-down");
        $$1(prestashop$1.themeSelectors.footer).addClass("hidden-sm-down");
      }
    );
    $$1(
      `${prestashop$1.themeSelectors.listing.searchFilterControls} ${prestashop$1.themeSelectors.clear}`
    ).on("click", () => {
      $$1(prestashop$1.themeSelectors.listing.searchFiltersWrapper).addClass(
        "hidden-sm-down"
      );
      $$1(prestashop$1.themeSelectors.contentWrapper).removeClass("hidden-sm-down");
      $$1(prestashop$1.themeSelectors.footer).removeClass("hidden-sm-down");
    });
    $$1(`${prestashop$1.themeSelectors.listing.searchFilterControls} .ok`).on(
      "click",
      () => {
        $$1(prestashop$1.themeSelectors.listing.searchFiltersWrapper).addClass(
          "hidden-sm-down"
        );
        $$1(prestashop$1.themeSelectors.contentWrapper).removeClass("hidden-sm-down");
        $$1(prestashop$1.themeSelectors.footer).removeClass("hidden-sm-down");
      }
    );
    const parseSearchUrl = function(event) {
      if (event.target.dataset.searchUrl !== void 0) {
        return event.target.dataset.searchUrl;
      }
      if ($$1(event.target).parent()[0].dataset.searchUrl === void 0) {
        throw new Error("Can not parse search URL");
      }
      return $$1(event.target).parent()[0].dataset.searchUrl;
    };
    function updateProductListDOM(data) {
      $$1(prestashop$1.themeSelectors.listing.searchFilters).replaceWith(
        data.rendered_facets
      );
      $$1(prestashop$1.themeSelectors.listing.activeSearchFilters).replaceWith(
        data.rendered_active_filters
      );
      $$1(prestashop$1.themeSelectors.listing.listTop).replaceWith(
        data.rendered_products_top
      );
      const renderedProducts = $$1(data.rendered_products);
      const productSelectors = $$1(prestashop$1.themeSelectors.listing.product);
      if (productSelectors.length > 0) {
        productSelectors.removeClass().addClass(productSelectors.first().attr("class"));
      } else {
        productSelectors.removeClass().addClass(renderedProducts.first().attr("class"));
      }
      $$1(prestashop$1.themeSelectors.listing.list).replaceWith(renderedProducts);
      $$1(prestashop$1.themeSelectors.listing.listBottom).replaceWith(
        data.rendered_products_bottom
      );
      if (data.rendered_products_header) {
        $$1(prestashop$1.themeSelectors.listing.listHeader).replaceWith(
          data.rendered_products_header
        );
      }
      const productMinitature = new ProductMinitature();
      productMinitature.init();
    }
    $$1("body").on(
      "change",
      `${prestashop$1.themeSelectors.listing.searchFilters} input[data-search-url]`,
      (event) => {
        prestashop$1.emit("updateFacets", parseSearchUrl(event));
      }
    );
    $$1("body").on(
      "click",
      prestashop$1.themeSelectors.listing.searchFiltersClearAll,
      (event) => {
        prestashop$1.emit("updateFacets", parseSearchUrl(event));
      }
    );
    $$1("body").on(
      "click",
      prestashop$1.themeSelectors.listing.searchLink,
      (event) => {
        event.preventDefault();
        prestashop$1.emit("updateFacets", $$1(event.target).closest("a").get(0).href);
      }
    );
    window.addEventListener("popstate", (e) => {
      if (e.state && e.state.current_url) {
        window.location.href = e.state.current_url;
      }
    });
    $$1("body").on(
      "change",
      `${prestashop$1.themeSelectors.listing.searchFilters} select`,
      (event) => {
        const form = $$1(event.target).closest("form");
        prestashop$1.emit("updateFacets", `?${form.serialize()}`);
      }
    );
    prestashop$1.on("updateProductList", (data) => {
      updateProductListDOM(data);
      window.scrollTo(0, 0);
    });
  });
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  class ProductSelect {
    init() {
      const MAX_THUMBS = 5;
      const $arrows = $$1(".js-modal-arrows");
      const $thumbnails = $$1(".js-modal-product-images");
      $$1("body").on("click", ".js-modal-thumb", (event) => {
        if ($$1(".js-modal-thumb").hasClass("selected")) {
          $$1(".js-modal-thumb").removeClass("selected");
        }
        $$1(event.currentTarget).addClass("selected");
        $$1(prestashop.themeSelectors.product.modalProductCover).attr("src", $$1(event.target).data("image-large-src"));
        $$1(prestashop.themeSelectors.product.modalProductCover).attr("title", $$1(event.target).attr("title"));
        $$1(prestashop.themeSelectors.product.modalProductCover).attr("alt", $$1(event.target).attr("alt"));
      }).on("click", "aside#thumbnails", (event) => {
        if (event.target.id === "thumbnails") {
          $$1("#product-modal").modal("hide");
        }
      });
      if ($$1(".js-modal-product-images li").length <= MAX_THUMBS) {
        $arrows.css("opacity", ".2");
      } else {
        $arrows.on("click", (event) => {
          if ($$1(event.target).hasClass("arrow-up") && $thumbnails.position().top < 0) {
            this.move("up");
            $$1(".js-modal-arrow-down").css("opacity", "1");
          } else if ($$1(event.target).hasClass("arrow-down") && $thumbnails.position().top + $thumbnails.height() > $$1(".js-modal-mask").height()) {
            this.move("down");
            $$1(".js-modal-arrow-up").css("opacity", "1");
          }
        });
      }
    }
    move(direction) {
      const THUMB_MARGIN = 10;
      const $thumbnails = $$1(".js-modal-product-images");
      const thumbHeight = $$1(".js-modal-product-images li img").height() + THUMB_MARGIN;
      const currentPosition = $thumbnails.position().top;
      $thumbnails.velocity(
        {
          translateY: direction === "up" ? currentPosition + thumbHeight : currentPosition - thumbHeight
        },
        () => {
          if ($thumbnails.position().top >= 0) {
            $$1(".js-modal-arrow-up").css("opacity", ".2");
          } else if ($thumbnails.position().top + $thumbnails.height() <= $$1(".js-modal-mask").height()) {
            $$1(".js-modal-arrow-down").css("opacity", ".2");
          }
        }
      );
    }
  }
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  $$1(document).ready(() => {
    function coverImage() {
      const productCover = $$1(prestashop$1.themeSelectors.product.cover);
      const modalProductCover = $$1(prestashop$1.themeSelectors.product.modalProductCover);
      let thumbSelected = $$1(prestashop$1.themeSelectors.product.selected);
      const swipe = (selectedThumb, thumbParent) => {
        const newSelectedThumb = thumbParent.find(prestashop$1.themeSelectors.product.thumb);
        selectedThumb.removeClass("selected");
        newSelectedThumb.addClass("selected");
        modalProductCover.prop("src", newSelectedThumb.data("image-large-src"));
        productCover.prop("src", newSelectedThumb.data("image-medium-src"));
        productCover.attr("title", newSelectedThumb.attr("title"));
        modalProductCover.attr("title", newSelectedThumb.attr("title"));
        productCover.attr("alt", newSelectedThumb.attr("alt"));
        modalProductCover.attr("alt", newSelectedThumb.attr("alt"));
        updateSources(productCover, newSelectedThumb.data("image-medium-sources"));
        updateSources(modalProductCover, newSelectedThumb.data("image-large-sources"));
      };
      $$1(prestashop$1.themeSelectors.product.thumb).on("click", (event) => {
        thumbSelected = $$1(prestashop$1.themeSelectors.product.selected);
        swipe(thumbSelected, $$1(event.target).closest(prestashop$1.themeSelectors.product.thumbContainer));
      });
      productCover.swipe({
        swipe: (event, direction) => {
          thumbSelected = $$1(prestashop$1.themeSelectors.product.selected);
          const parentThumb = thumbSelected.closest(prestashop$1.themeSelectors.product.thumbContainer);
          if (direction === "right") {
            if (parentThumb.prev().length > 0) {
              swipe(thumbSelected, parentThumb.prev());
            } else if (parentThumb.next().length > 0) {
              swipe(thumbSelected, parentThumb.next());
            }
          } else if (direction === "left") {
            if (parentThumb.next().length > 0) {
              swipe(thumbSelected, parentThumb.next());
            } else if (parentThumb.prev().length > 0) {
              swipe(thumbSelected, parentThumb.prev());
            }
          }
        },
        allowPageScroll: "vertical"
      });
    }
    function imageScrollBox() {
      if ($$1("#main .js-qv-product-images li").length > 2) {
        $$1("#main .js-qv-mask").addClass("scroll");
        $$1(".scroll-box-arrows").addClass("scroll");
        $$1("#main .js-qv-mask").scrollbox({
          direction: "h",
          distance: 113,
          autoPlay: false
        });
        $$1(".scroll-box-arrows .left").click(() => {
          $$1("#main .js-qv-mask").trigger("backward");
        });
        $$1(".scroll-box-arrows .right").click(() => {
          $$1("#main .js-qv-mask").trigger("forward");
        });
      } else {
        $$1("#main .js-qv-mask").removeClass("scroll");
        $$1(".scroll-box-arrows").removeClass("scroll");
      }
    }
    function createInputFile() {
      $$1(prestashop$1.themeSelectors.fileInput).on("change", (event) => {
        const target = $$1(event.currentTarget)[0];
        const file = target ? target.files[0] : null;
        if (target && file) {
          $$1(target).prev().text(file.name);
        }
      });
    }
    function createProductSpin() {
      const $quantityInput = $$1(prestashop$1.selectors.quantityWanted);
      $quantityInput.TouchSpin({
        verticalbuttons: true,
        verticalupclass: "material-icons touchspin-up",
        verticaldownclass: "material-icons touchspin-down",
        buttondown_class: "btn btn-touchspin js-touchspin",
        buttonup_class: "btn btn-touchspin js-touchspin",
        min: parseInt($quantityInput.attr("min"), 10),
        max: 1e6
      });
      $$1(prestashop$1.themeSelectors.touchspin).off("touchstart.touchspin");
      $quantityInput.on("focusout", () => {
        if ($quantityInput.val() === "" || $quantityInput.val() < $quantityInput.attr("min")) {
          $quantityInput.val($quantityInput.attr("min"));
          $quantityInput.trigger("change");
        }
      });
      $$1("body").on("change keyup", prestashop$1.selectors.quantityWanted, (e) => {
        if ($quantityInput.val() !== "") {
          $$1(e.currentTarget).trigger("touchspin.stopspin");
          prestashop$1.emit("updateProduct", {
            eventType: "updatedProductQuantity",
            event: e
          });
        }
      });
    }
    function addJsProductTabActiveSelector() {
      const nav = $$1(prestashop$1.themeSelectors.product.tabs);
      nav.on("show.bs.tab", (e) => {
        const target = $$1(e.target);
        target.addClass(prestashop$1.themeSelectors.product.activeNavClass);
        $$1(target.attr("href")).addClass(prestashop$1.themeSelectors.product.activeTabClass);
      });
      nav.on("hide.bs.tab", (e) => {
        const target = $$1(e.target);
        target.removeClass(prestashop$1.themeSelectors.product.activeNavClass);
        $$1(target.attr("href")).removeClass(prestashop$1.themeSelectors.product.activeTabClass);
      });
    }
    createProductSpin();
    createInputFile();
    coverImage();
    imageScrollBox();
    addJsProductTabActiveSelector();
    prestashop$1.on("updatedProduct", (event) => {
      createInputFile();
      coverImage();
      if (event && event.product_minimal_quantity) {
        const minimalProductQuantity = parseInt(event.product_minimal_quantity, 10);
        const quantityInputSelector = prestashop$1.selectors.quantityWanted;
        const quantityInput = $$1(quantityInputSelector);
        quantityInput.trigger("touchspin.updatesettings", {
          min: minimalProductQuantity
        });
      }
      imageScrollBox();
      $$1($$1(prestashop$1.themeSelectors.product.activeTabs).attr("href")).addClass("active").removeClass("fade");
      $$1(prestashop$1.themeSelectors.product.imagesModal).replaceWith(event.product_images_modal);
      const productSelect = new ProductSelect();
      productSelect.init();
    });
  });
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  function debounce(func, timeout = 300) {
    let timer;
    return (...args) => {
      clearTimeout(timer);
      timer = setTimeout(() => {
        func.apply(this, args);
      }, timeout);
    };
  }
  prestashop$1.cart = prestashop$1.cart || {};
  prestashop$1.cart.active_inputs = null;
  const spinnerSelector = 'input[name="product-quantity-spin"]';
  let hasError = false;
  let isUpdateOperation = false;
  let errorMsg = "";
  const CheckUpdateQuantityOperations = {
    switchErrorStat: () => {
      const $checkoutBtn = $$1(prestashop$1.themeSelectors.checkout.btn);
      if ($$1(prestashop$1.themeSelectors.notifications.dangerAlert).length || errorMsg !== "" && !hasError) {
        $checkoutBtn.addClass("disabled");
      }
      if (errorMsg !== "") {
        const strError = `
        <article class="alert alert-danger" role="alert" data-alert="danger">
          <ul>
            <li>${errorMsg}</li>
          </ul>
        </article>
      `;
        $$1(prestashop$1.themeSelectors.notifications.container).html(strError);
        errorMsg = "";
        isUpdateOperation = false;
        if (hasError) {
          $checkoutBtn.removeClass("disabled");
        }
      } else if (!hasError && isUpdateOperation) {
        hasError = false;
        isUpdateOperation = false;
        $$1(prestashop$1.themeSelectors.notifications.container).html("");
        $checkoutBtn.removeClass("disabled");
      }
    },
    checkUpdateOperation: (resp) => {
      const { hasError: hasErrorOccurred, errors: errorData } = resp;
      hasError = hasErrorOccurred ?? false;
      const errors = errorData ?? "";
      if (errors instanceof Array) {
        errorMsg = errors.join(" ");
      } else {
        errorMsg = errors;
      }
      isUpdateOperation = true;
    }
  };
  function createSpin() {
    $$1.each($$1(spinnerSelector), (index, spinner) => {
      $$1(spinner).TouchSpin({
        min: parseInt($$1(spinner).attr("min"), 10),
        max: 1e6
      });
    });
    $$1(prestashop$1.themeSelectors.touchspin).off("touchstart.touchspin");
    CheckUpdateQuantityOperations.switchErrorStat();
  }
  const preventCustomModalOpen = (event) => {
    if (window.shouldPreventModal) {
      event.preventDefault();
      return false;
    }
    return true;
  };
  $$1(function() {
    const productLineInCartSelector = prestashop$1.themeSelectors.cart.productLineQty;
    const promises = [];
    prestashop$1.on("updatedCart", () => {
      window.shouldPreventModal = false;
      $$1(prestashop$1.themeSelectors.product.customizationModal).on(
        "show.bs.modal",
        (modalEvent) => {
          preventCustomModalOpen(modalEvent);
        }
      );
      createSpin();
    });
    createSpin();
    const $body = $$1("body");
    function isTouchSpin(namespace) {
      return namespace === "on.startupspin" || namespace === "on.startdownspin";
    }
    function shouldIncreaseProductQuantity(namespace) {
      return namespace === "on.startupspin";
    }
    function findCartLineProductQuantityInput($target) {
      const $input = $target.parents(prestashop$1.themeSelectors.cart.touchspin).find(productLineInCartSelector);
      if ($input.is(":focus")) {
        return null;
      }
      return $input;
    }
    function camelize(subject) {
      const actionTypeParts = subject.split("-");
      let i;
      let part;
      let camelizedSubject = "";
      for (i = 0; i < actionTypeParts.length; i += 1) {
        part = actionTypeParts[i];
        if (i !== 0) {
          part = part.substring(0, 1).toUpperCase() + part.substring(1);
        }
        camelizedSubject += part;
      }
      return camelizedSubject;
    }
    function parseCartAction($target, namespace) {
      if (!isTouchSpin(namespace)) {
        return {
          url: $target.attr("href"),
          type: camelize($target.data("link-action"))
        };
      }
      const $input = findCartLineProductQuantityInput($target);
      if (!$input) {
        return false;
      }
      let cartAction = {};
      if (shouldIncreaseProductQuantity(namespace)) {
        cartAction = {
          url: $input.data("up-url"),
          type: "increaseProductQuantity"
        };
      } else {
        cartAction = {
          url: $input.data("down-url"),
          type: "decreaseProductQuantity"
        };
      }
      return cartAction;
    }
    const abortPreviousRequests = () => {
      let promise;
      while (promises.length > 0) {
        promise = promises.pop();
        promise.abort();
      }
    };
    const getTouchSpinInput = ($button) => $$1($button.parents(prestashop$1.themeSelectors.cart.touchspin).find("input"));
    $$1(prestashop$1.themeSelectors.product.customizationModal).on(
      "show.bs.modal",
      (modalEvent) => {
        preventCustomModalOpen(modalEvent);
      }
    );
    const handleCartAction = (event) => {
      abortPreviousRequests();
      window.shouldPreventModal = true;
      event.preventDefault();
      const $target = $$1(event.currentTarget);
      const { dataset } = event.currentTarget;
      const cartAction = parseCartAction($target, event.namespace);
      const requestData = {
        ajax: "1",
        action: "update"
      };
      if (!cartAction) {
        return;
      }
      $$1.ajax({
        url: cartAction.url,
        method: "POST",
        data: requestData,
        dataType: "json",
        beforeSend(jqXHR) {
          promises.push(jqXHR);
        }
      }).then((resp) => {
        const $quantityInput = getTouchSpinInput($target);
        CheckUpdateQuantityOperations.checkUpdateOperation(resp);
        $quantityInput.val(resp.quantity);
        prestashop$1.emit("updateCart", {
          reason: dataset,
          resp
        });
      }).fail((resp) => {
        prestashop$1.emit("handleError", {
          eventType: "updateProductInCart",
          resp,
          cartAction: cartAction.type
        });
      });
    };
    $body.on("click", prestashop$1.themeSelectors.cart.actions, handleCartAction);
    function sendUpdateQuantityInCartRequest(updateQuantityInCartUrl, requestData, $target) {
      abortPreviousRequests();
      window.shouldPreventModal = true;
      return $$1.ajax({
        url: updateQuantityInCartUrl,
        method: "POST",
        data: requestData,
        dataType: "json",
        beforeSend(jqXHR) {
          promises.push(jqXHR);
        }
      }).then((resp) => {
        CheckUpdateQuantityOperations.checkUpdateOperation(resp);
        $target.val(resp.quantity);
        const dataset = $target && $target.dataset ? $target.dataset : resp;
        prestashop$1.emit("updateCart", {
          reason: dataset,
          resp
        });
      }).fail((resp) => {
        prestashop$1.emit("handleError", {
          eventType: "updateProductQuantityInCart",
          resp
        });
      });
    }
    function getQuantityChangeType($quantity) {
      return $quantity > 0 ? "up" : "down";
    }
    function getRequestData(quantity) {
      return {
        ajax: "1",
        qty: Math.abs(quantity),
        action: "update",
        op: getQuantityChangeType(quantity)
      };
    }
    function updateProductQuantityInCart(event) {
      const $target = $$1(event.currentTarget);
      const updateQuantityInCartUrl = $target.data("update-url");
      const baseValue = $target.attr("value");
      const targetValue = $target.val();
      if (targetValue != parseInt(targetValue, 10) || targetValue < 0 || isNaN(targetValue)) {
        window.shouldPreventModal = false;
        $target.val(baseValue);
        return;
      }
      const qty = targetValue - baseValue;
      if (qty === 0) {
        return;
      }
      if (targetValue === "0") {
        $target.closest(".product-line-actions").find('[data-link-action="delete-from-cart"]').click();
      } else {
        $target.attr("value", targetValue);
        sendUpdateQuantityInCartRequest(
          updateQuantityInCartUrl,
          getRequestData(qty),
          $target
        );
      }
    }
    $body.on(
      "touchspin.on.stopspin",
      spinnerSelector,
      debounce(updateProductQuantityInCart)
    );
    $body.on("focusout keyup", productLineInCartSelector, (event) => {
      if (event.type === "keyup") {
        if (event.keyCode === 13) {
          isUpdateOperation = true;
          updateProductQuantityInCart(event);
        }
        return false;
      }
      if (!isUpdateOperation) {
        updateProductQuantityInCart(event);
      }
      return false;
    });
    const $timeoutEffect = 400;
    $body.on(
      "hidden.bs.collapse",
      prestashop$1.themeSelectors.cart.promoCode,
      () => {
        $$1(prestashop$1.themeSelectors.cart.displayPromo).show($timeoutEffect);
      }
    );
    $body.on("click", prestashop$1.themeSelectors.cart.promoCodeButton, (event) => {
      event.preventDefault();
      $$1(prestashop$1.themeSelectors.cart.promoCode).collapse("toggle");
    });
    $body.on("click", prestashop$1.themeSelectors.cart.displayPromo, (event) => {
      $$1(event.currentTarget).hide($timeoutEffect);
    });
    $body.on("click", prestashop$1.themeSelectors.cart.discountCode, (event) => {
      event.stopPropagation();
      const $code = $$1(event.currentTarget);
      const $discountInput = $$1(prestashop$1.themeSelectors.cart.discountName);
      $discountInput.val($code.text());
      $$1(prestashop$1.themeSelectors.cart.promoCode).collapse("show");
      $$1(prestashop$1.themeSelectors.cart.displayPromo).hide($timeoutEffect);
      return false;
    });
  });
  var events = { exports: {} };
  var R = typeof Reflect === "object" ? Reflect : null;
  var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
    return Function.prototype.apply.call(target, receiver, args);
  };
  var ReflectOwnKeys;
  if (R && typeof R.ownKeys === "function") {
    ReflectOwnKeys = R.ownKeys;
  } else if (Object.getOwnPropertySymbols) {
    ReflectOwnKeys = function ReflectOwnKeys2(target) {
      return Object.getOwnPropertyNames(target).concat(Object.getOwnPropertySymbols(target));
    };
  } else {
    ReflectOwnKeys = function ReflectOwnKeys2(target) {
      return Object.getOwnPropertyNames(target);
    };
  }
  function ProcessEmitWarning(warning) {
    if (console && console.warn)
      console.warn(warning);
  }
  var NumberIsNaN = Number.isNaN || function NumberIsNaN2(value) {
    return value !== value;
  };
  function EventEmitter() {
    EventEmitter.init.call(this);
  }
  events.exports = EventEmitter;
  events.exports.once = once;
  EventEmitter.EventEmitter = EventEmitter;
  EventEmitter.prototype._events = void 0;
  EventEmitter.prototype._eventsCount = 0;
  EventEmitter.prototype._maxListeners = void 0;
  var defaultMaxListeners = 10;
  function checkListener(listener) {
    if (typeof listener !== "function") {
      throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
    }
  }
  Object.defineProperty(EventEmitter, "defaultMaxListeners", {
    enumerable: true,
    get: function() {
      return defaultMaxListeners;
    },
    set: function(arg) {
      if (typeof arg !== "number" || arg < 0 || NumberIsNaN(arg)) {
        throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + ".");
      }
      defaultMaxListeners = arg;
    }
  });
  EventEmitter.init = function() {
    if (this._events === void 0 || this._events === Object.getPrototypeOf(this)._events) {
      this._events = /* @__PURE__ */ Object.create(null);
      this._eventsCount = 0;
    }
    this._maxListeners = this._maxListeners || void 0;
  };
  EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
    if (typeof n !== "number" || n < 0 || NumberIsNaN(n)) {
      throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + ".");
    }
    this._maxListeners = n;
    return this;
  };
  function _getMaxListeners(that) {
    if (that._maxListeners === void 0)
      return EventEmitter.defaultMaxListeners;
    return that._maxListeners;
  }
  EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
    return _getMaxListeners(this);
  };
  EventEmitter.prototype.emit = function emit(type) {
    var args = [];
    for (var i = 1; i < arguments.length; i++)
      args.push(arguments[i]);
    var doError = type === "error";
    var events2 = this._events;
    if (events2 !== void 0)
      doError = doError && events2.error === void 0;
    else if (!doError)
      return false;
    if (doError) {
      var er;
      if (args.length > 0)
        er = args[0];
      if (er instanceof Error) {
        throw er;
      }
      var err = new Error("Unhandled error." + (er ? " (" + er.message + ")" : ""));
      err.context = er;
      throw err;
    }
    var handler = events2[type];
    if (handler === void 0)
      return false;
    if (typeof handler === "function") {
      ReflectApply(handler, this, args);
    } else {
      var len = handler.length;
      var listeners = arrayClone(handler, len);
      for (var i = 0; i < len; ++i)
        ReflectApply(listeners[i], this, args);
    }
    return true;
  };
  function _addListener(target, type, listener, prepend) {
    var m;
    var events2;
    var existing;
    checkListener(listener);
    events2 = target._events;
    if (events2 === void 0) {
      events2 = target._events = /* @__PURE__ */ Object.create(null);
      target._eventsCount = 0;
    } else {
      if (events2.newListener !== void 0) {
        target.emit(
          "newListener",
          type,
          listener.listener ? listener.listener : listener
        );
        events2 = target._events;
      }
      existing = events2[type];
    }
    if (existing === void 0) {
      existing = events2[type] = listener;
      ++target._eventsCount;
    } else {
      if (typeof existing === "function") {
        existing = events2[type] = prepend ? [listener, existing] : [existing, listener];
      } else if (prepend) {
        existing.unshift(listener);
      } else {
        existing.push(listener);
      }
      m = _getMaxListeners(target);
      if (m > 0 && existing.length > m && !existing.warned) {
        existing.warned = true;
        var w = new Error("Possible EventEmitter memory leak detected. " + existing.length + " " + String(type) + " listeners added. Use emitter.setMaxListeners() to increase limit");
        w.name = "MaxListenersExceededWarning";
        w.emitter = target;
        w.type = type;
        w.count = existing.length;
        ProcessEmitWarning(w);
      }
    }
    return target;
  }
  EventEmitter.prototype.addListener = function addListener(type, listener) {
    return _addListener(this, type, listener, false);
  };
  EventEmitter.prototype.on = EventEmitter.prototype.addListener;
  EventEmitter.prototype.prependListener = function prependListener(type, listener) {
    return _addListener(this, type, listener, true);
  };
  function onceWrapper() {
    if (!this.fired) {
      this.target.removeListener(this.type, this.wrapFn);
      this.fired = true;
      if (arguments.length === 0)
        return this.listener.call(this.target);
      return this.listener.apply(this.target, arguments);
    }
  }
  function _onceWrap(target, type, listener) {
    var state = { fired: false, wrapFn: void 0, target, type, listener };
    var wrapped = onceWrapper.bind(state);
    wrapped.listener = listener;
    state.wrapFn = wrapped;
    return wrapped;
  }
  EventEmitter.prototype.once = function once2(type, listener) {
    checkListener(listener);
    this.on(type, _onceWrap(this, type, listener));
    return this;
  };
  EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) {
    checkListener(listener);
    this.prependListener(type, _onceWrap(this, type, listener));
    return this;
  };
  EventEmitter.prototype.removeListener = function removeListener(type, listener) {
    var list, events2, position, i, originalListener;
    checkListener(listener);
    events2 = this._events;
    if (events2 === void 0)
      return this;
    list = events2[type];
    if (list === void 0)
      return this;
    if (list === listener || list.listener === listener) {
      if (--this._eventsCount === 0)
        this._events = /* @__PURE__ */ Object.create(null);
      else {
        delete events2[type];
        if (events2.removeListener)
          this.emit("removeListener", type, list.listener || listener);
      }
    } else if (typeof list !== "function") {
      position = -1;
      for (i = list.length - 1; i >= 0; i--) {
        if (list[i] === listener || list[i].listener === listener) {
          originalListener = list[i].listener;
          position = i;
          break;
        }
      }
      if (position < 0)
        return this;
      if (position === 0)
        list.shift();
      else {
        spliceOne(list, position);
      }
      if (list.length === 1)
        events2[type] = list[0];
      if (events2.removeListener !== void 0)
        this.emit("removeListener", type, originalListener || listener);
    }
    return this;
  };
  EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
  EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) {
    var listeners, events2, i;
    events2 = this._events;
    if (events2 === void 0)
      return this;
    if (events2.removeListener === void 0) {
      if (arguments.length === 0) {
        this._events = /* @__PURE__ */ Object.create(null);
        this._eventsCount = 0;
      } else if (events2[type] !== void 0) {
        if (--this._eventsCount === 0)
          this._events = /* @__PURE__ */ Object.create(null);
        else
          delete events2[type];
      }
      return this;
    }
    if (arguments.length === 0) {
      var keys = Object.keys(events2);
      var key;
      for (i = 0; i < keys.length; ++i) {
        key = keys[i];
        if (key === "removeListener")
          continue;
        this.removeAllListeners(key);
      }
      this.removeAllListeners("removeListener");
      this._events = /* @__PURE__ */ Object.create(null);
      this._eventsCount = 0;
      return this;
    }
    listeners = events2[type];
    if (typeof listeners === "function") {
      this.removeListener(type, listeners);
    } else if (listeners !== void 0) {
      for (i = listeners.length - 1; i >= 0; i--) {
        this.removeListener(type, listeners[i]);
      }
    }
    return this;
  };
  function _listeners(target, type, unwrap) {
    var events2 = target._events;
    if (events2 === void 0)
      return [];
    var evlistener = events2[type];
    if (evlistener === void 0)
      return [];
    if (typeof evlistener === "function")
      return unwrap ? [evlistener.listener || evlistener] : [evlistener];
    return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
  }
  EventEmitter.prototype.listeners = function listeners(type) {
    return _listeners(this, type, true);
  };
  EventEmitter.prototype.rawListeners = function rawListeners(type) {
    return _listeners(this, type, false);
  };
  EventEmitter.listenerCount = function(emitter, type) {
    if (typeof emitter.listenerCount === "function") {
      return emitter.listenerCount(type);
    } else {
      return listenerCount.call(emitter, type);
    }
  };
  EventEmitter.prototype.listenerCount = listenerCount;
  function listenerCount(type) {
    var events2 = this._events;
    if (events2 !== void 0) {
      var evlistener = events2[type];
      if (typeof evlistener === "function") {
        return 1;
      } else if (evlistener !== void 0) {
        return evlistener.length;
      }
    }
    return 0;
  }
  EventEmitter.prototype.eventNames = function eventNames() {
    return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
  };
  function arrayClone(arr, n) {
    var copy = new Array(n);
    for (var i = 0; i < n; ++i)
      copy[i] = arr[i];
    return copy;
  }
  function spliceOne(list, index) {
    for (; index + 1 < list.length; index++)
      list[index] = list[index + 1];
    list.pop();
  }
  function unwrapListeners(arr) {
    var ret = new Array(arr.length);
    for (var i = 0; i < ret.length; ++i) {
      ret[i] = arr[i].listener || arr[i];
    }
    return ret;
  }
  function once(emitter, name) {
    return new Promise(function(resolve, reject) {
      function errorListener(err) {
        emitter.removeListener(name, resolver);
        reject(err);
      }
      function resolver() {
        if (typeof emitter.removeListener === "function") {
          emitter.removeListener("error", errorListener);
        }
        resolve([].slice.call(arguments));
      }
      eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
      if (name !== "error") {
        addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
      }
    });
  }
  function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
    if (typeof emitter.on === "function") {
      eventTargetAgnosticAddListener(emitter, "error", handler, flags);
    }
  }
  function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
    if (typeof emitter.on === "function") {
      if (flags.once) {
        emitter.once(name, listener);
      } else {
        emitter.on(name, listener);
      }
    } else if (typeof emitter.addEventListener === "function") {
      emitter.addEventListener(name, function wrapListener(arg) {
        if (flags.once) {
          emitter.removeEventListener(name, wrapListener);
        }
        listener(arg);
      });
    } else {
      throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
    }
  }
  var eventsExports = events.exports;
  const EventEmitter$1 = /* @__PURE__ */ getDefaultExportFromCjs(eventsExports);
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  class DropDown {
    constructor(el) {
      this.el = el;
    }
    init() {
      this.el.on("show.bs.dropdown", (e, el) => {
        if (el) {
          $$1(`#${el}`).find(".dropdown-menu").first().stop(true, true).slideDown();
        } else {
          $$1(e.target).find(".dropdown-menu").first().stop(true, true).slideDown();
        }
      });
      this.el.on("hide.bs.dropdown", (e, el) => {
        if (el) {
          $$1(`#${el}`).find(".dropdown-menu").first().stop(true, true).slideUp();
        } else {
          $$1(e.target).find(".dropdown-menu").first().stop(true, true).slideUp();
        }
      });
      this.el.find("select.link").each((idx, el) => {
        $$1(el).on("change", function() {
          window.location = $$1(this).val();
        });
      });
    }
  }
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  class Form {
    init() {
      this.parentFocus();
      this.togglePasswordVisibility();
    }
    parentFocus() {
      $$1(".js-child-focus").on("focus", function() {
        $$1(this).closest(".js-parent-focus").addClass("focus");
      });
      $$1(".js-child-focus").on("focusout", function() {
        $$1(this).closest(".js-parent-focus").removeClass("focus");
      });
    }
    togglePasswordVisibility() {
      $$1('button[data-action="show-password"]').on("click", function() {
        const elm = $$1(this).closest(".input-group").children("input.js-visible-password");
        if (elm.attr("type") === "password") {
          elm.attr("type", "text");
          $$1(this).text($$1(this).data("textHide"));
        } else {
          elm.attr("type", "password");
          $$1(this).text($$1(this).data("textShow"));
        }
      });
    }
  }
  var sprintf = {};
  (function(exports) {
    !function() {
      var re = {
        not_string: /[^s]/,
        not_bool: /[^t]/,
        not_type: /[^T]/,
        not_primitive: /[^v]/,
        number: /[diefg]/,
        numeric_arg: /[bcdiefguxX]/,
        json: /[j]/,
        not_json: /[^j]/,
        text: /^[^\x25]+/,
        modulo: /^\x25{2}/,
        placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
        key: /^([a-z_][a-z_\d]*)/i,
        key_access: /^\.([a-z_][a-z_\d]*)/i,
        index_access: /^\[(\d+)\]/,
        sign: /^[+-]/
      };
      function sprintf2(key) {
        return sprintf_format(sprintf_parse(key), arguments);
      }
      function vsprintf(fmt, argv) {
        return sprintf2.apply(null, [fmt].concat(argv || []));
      }
      function sprintf_format(parse_tree, argv) {
        var cursor = 1, tree_length = parse_tree.length, arg, output = "", i, k, ph, pad, pad_character, pad_length, is_positive, sign;
        for (i = 0; i < tree_length; i++) {
          if (typeof parse_tree[i] === "string") {
            output += parse_tree[i];
          } else if (typeof parse_tree[i] === "object") {
            ph = parse_tree[i];
            if (ph.keys) {
              arg = argv[cursor];
              for (k = 0; k < ph.keys.length; k++) {
                if (arg == void 0) {
                  throw new Error(sprintf2('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k - 1]));
                }
                arg = arg[ph.keys[k]];
              }
            } else if (ph.param_no) {
              arg = argv[ph.param_no];
            } else {
              arg = argv[cursor++];
            }
            if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
              arg = arg();
            }
            if (re.numeric_arg.test(ph.type) && (typeof arg !== "number" && isNaN(arg))) {
              throw new TypeError(sprintf2("[sprintf] expecting number but found %T", arg));
            }
            if (re.number.test(ph.type)) {
              is_positive = arg >= 0;
            }
            switch (ph.type) {
              case "b":
                arg = parseInt(arg, 10).toString(2);
                break;
              case "c":
                arg = String.fromCharCode(parseInt(arg, 10));
                break;
              case "d":
              case "i":
                arg = parseInt(arg, 10);
                break;
              case "j":
                arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0);
                break;
              case "e":
                arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential();
                break;
              case "f":
                arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg);
                break;
              case "g":
                arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg);
                break;
              case "o":
                arg = (parseInt(arg, 10) >>> 0).toString(8);
                break;
              case "s":
                arg = String(arg);
                arg = ph.precision ? arg.substring(0, ph.precision) : arg;
                break;
              case "t":
                arg = String(!!arg);
                arg = ph.precision ? arg.substring(0, ph.precision) : arg;
                break;
              case "T":
                arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase();
                arg = ph.precision ? arg.substring(0, ph.precision) : arg;
                break;
              case "u":
                arg = parseInt(arg, 10) >>> 0;
                break;
              case "v":
                arg = arg.valueOf();
                arg = ph.precision ? arg.substring(0, ph.precision) : arg;
                break;
              case "x":
                arg = (parseInt(arg, 10) >>> 0).toString(16);
                break;
              case "X":
                arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase();
                break;
            }
            if (re.json.test(ph.type)) {
              output += arg;
            } else {
              if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
                sign = is_positive ? "+" : "-";
                arg = arg.toString().replace(re.sign, "");
              } else {
                sign = "";
              }
              pad_character = ph.pad_char ? ph.pad_char === "0" ? "0" : ph.pad_char.charAt(1) : " ";
              pad_length = ph.width - (sign + arg).length;
              pad = ph.width ? pad_length > 0 ? pad_character.repeat(pad_length) : "" : "";
              output += ph.align ? sign + arg + pad : pad_character === "0" ? sign + pad + arg : pad + sign + arg;
            }
          }
        }
        return output;
      }
      var sprintf_cache = /* @__PURE__ */ Object.create(null);
      function sprintf_parse(fmt) {
        if (sprintf_cache[fmt]) {
          return sprintf_cache[fmt];
        }
        var _fmt = fmt, match, parse_tree = [], arg_names = 0;
        while (_fmt) {
          if ((match = re.text.exec(_fmt)) !== null) {
            parse_tree.push(match[0]);
          } else if ((match = re.modulo.exec(_fmt)) !== null) {
            parse_tree.push("%");
          } else if ((match = re.placeholder.exec(_fmt)) !== null) {
            if (match[2]) {
              arg_names |= 1;
              var field_list = [], replacement_field = match[2], field_match = [];
              if ((field_match = re.key.exec(replacement_field)) !== null) {
                field_list.push(field_match[1]);
                while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") {
                  if ((field_match = re.key_access.exec(replacement_field)) !== null) {
                    field_list.push(field_match[1]);
                  } else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
                    field_list.push(field_match[1]);
                  } else {
                    throw new SyntaxError("[sprintf] failed to parse named argument key");
                  }
                }
              } else {
                throw new SyntaxError("[sprintf] failed to parse named argument key");
              }
              match[2] = field_list;
            } else {
              arg_names |= 2;
            }
            if (arg_names === 3) {
              throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");
            }
            parse_tree.push(
              {
                placeholder: match[0],
                param_no: match[1],
                keys: match[2],
                sign: match[3],
                pad_char: match[4],
                align: match[5],
                width: match[6],
                precision: match[7],
                type: match[8]
              }
            );
          } else {
            throw new SyntaxError("[sprintf] unexpected placeholder");
          }
          _fmt = _fmt.substring(match[0].length);
        }
        return sprintf_cache[fmt] = parse_tree;
      }
      {
        exports["sprintf"] = sprintf2;
        exports["vsprintf"] = vsprintf;
      }
      if (typeof window !== "undefined") {
        window["sprintf"] = sprintf2;
        window["vsprintf"] = vsprintf;
      }
    }();
  })(sprintf);
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  const { passwordPolicy: PasswordPolicyMap } = prestashop.themeSelectors;
  const PASSWORD_POLICY_ERROR = "The password policy elements are undefined.";
  const getPasswordStrengthFeedback = (strength) => {
    switch (strength) {
      case 0:
        return {
          color: "bg-danger"
        };
      case 1:
        return {
          color: "bg-danger"
        };
      case 2:
        return {
          color: "bg-warning"
        };
      case 3:
        return {
          color: "bg-success"
        };
      case 4:
        return {
          color: "bg-success"
        };
      default:
        throw new Error("Invalid password strength indicator.");
    }
  };
  const watchPassword = async (elementInput, feedbackContainer, hints) => {
    const { prestashop: prestashop2 } = window;
    const passwordValue = elementInput.value;
    const elementIcon = feedbackContainer.querySelector(PasswordPolicyMap.requirementScoreIcon);
    const result = await prestashop2.checkPasswordScore(passwordValue);
    const feedback = getPasswordStrengthFeedback(result.score);
    const passwordLength = passwordValue.length;
    const popoverContent = [];
    $(elementInput).popover("dispose");
    feedbackContainer.style.display = passwordValue === "" ? "none" : "block";
    if (result.feedback.warning !== "") {
      if (result.feedback.warning in hints) {
        popoverContent.push(hints[result.feedback.warning]);
      }
    }
    result.feedback.suggestions.forEach((suggestion) => {
      if (suggestion in hints) {
        popoverContent.push(hints[suggestion]);
      }
    });
    $(elementInput).popover({
      html: true,
      placement: "top",
      content: popoverContent.join("<br/>")
    }).popover("show");
    const passwordLengthValid = passwordLength >= parseInt(elementInput.dataset.minlength, 10) && passwordLength <= parseInt(elementInput.dataset.maxlength, 10);
    const passwordScoreValid = parseInt(elementInput.dataset.minscore, 10) <= result.score;
    feedbackContainer.querySelector(PasswordPolicyMap.requirementLengthIcon).classList.toggle(
      "text-success",
      passwordLengthValid
    );
    elementIcon.classList.toggle(
      "text-success",
      passwordScoreValid
    );
    elementInput.classList.remove("border-success", "border-danger");
    elementInput.classList.add(passwordScoreValid && passwordLengthValid ? "border-success" : "border-danger");
    elementInput.classList.add("form-control", "border");
    const percentage = result.score * 20 + 20;
    const progressBar = feedbackContainer.querySelector(PasswordPolicyMap.progressBar);
    if (progressBar) {
      progressBar.style.width = `${percentage}%`;
      progressBar.classList.remove("bg-success", "bg-danger", "bg-warning");
      progressBar.classList.add(feedback.color);
    }
  };
  const usePasswordPolicy = (selector) => {
    const elements = document.querySelectorAll(selector);
    elements.forEach((element) => {
      const inputColumn = element == null ? void 0 : element.querySelector(PasswordPolicyMap.inputColumn);
      const elementInput = element == null ? void 0 : element.querySelector("input");
      const templateElement = document.createElement("div");
      const feedbackTemplate = document.querySelector(PasswordPolicyMap.template);
      let feedbackContainer;
      if (feedbackTemplate && element && inputColumn && elementInput) {
        templateElement.innerHTML = feedbackTemplate.innerHTML;
        inputColumn.append(templateElement);
        feedbackContainer = element.querySelector(PasswordPolicyMap.container);
        if (feedbackContainer) {
          const hintElement = document.querySelector(PasswordPolicyMap.hint);
          if (hintElement) {
            const hints = JSON.parse(hintElement.innerHTML);
            const passwordRequirementsLength = feedbackContainer.querySelector(PasswordPolicyMap.requirementLength);
            const passwordRequirementsScore = feedbackContainer.querySelector(PasswordPolicyMap.requirementScore);
            const passwordLengthText = passwordRequirementsLength == null ? void 0 : passwordRequirementsLength.querySelector("span");
            const passwordRequirementsText = passwordRequirementsScore == null ? void 0 : passwordRequirementsScore.querySelector("span");
            if (passwordLengthText && passwordRequirementsLength && passwordRequirementsLength.dataset.translation) {
              passwordLengthText.innerText = sprintf.sprintf(
                passwordRequirementsLength.dataset.translation,
                elementInput.dataset.minlength,
                elementInput.dataset.maxlength
              );
            }
            if (passwordRequirementsText && passwordRequirementsScore && passwordRequirementsScore.dataset.translation) {
              passwordRequirementsText.innerText = sprintf.sprintf(
                passwordRequirementsScore.dataset.translation,
                hints[elementInput.dataset.minscore]
              );
            }
            elementInput.addEventListener("keyup", () => watchPassword(elementInput, feedbackContainer, hints));
            elementInput.addEventListener("blur", () => {
              $(elementInput).popover("dispose");
            });
          }
        }
      }
      if (element) {
        return {
          element
        };
      }
      return {
        error: new Error(PASSWORD_POLICY_ERROR)
      };
    });
  };
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  class TopMenu extends DropDown {
    init() {
      let elmtClass;
      const self2 = this;
      this.el.find("li").on("mouseenter mouseleave", (e) => {
        if (this.el.parent().hasClass("mobile")) {
          return;
        }
        const currentTargetClass = $$1(e.currentTarget).attr("class");
        if (elmtClass !== currentTargetClass) {
          const classesSelected = Array.prototype.slice.call(e.currentTarget.classList).map((elem) => typeof elem === "string" ? `.${elem}` : false);
          elmtClass = classesSelected.join("");
          if (elmtClass && $$1(e.target).data("depth") === 0) {
            $$1(`${elmtClass} .js-sub-menu`).css({
              top: $$1(`${elmtClass}`).height() + $$1(`${elmtClass}`).position().top
            });
          }
        }
      });
      $$1("#menu-icon").on("click", () => {
        $$1("#mobile_top_menu_wrapper").toggle();
        self2.toggleMobileMenu();
      });
      this.el.on("click", (e) => {
        if (this.el.parent().hasClass("mobile")) {
          return;
        }
        e.stopPropagation();
      });
      prestashop$1.on("responsive update", () => {
        $$1(".js-sub-menu").removeAttr("style");
        self2.toggleMobileMenu();
      });
      super.init();
    }
    toggleMobileMenu() {
      $$1("#header").toggleClass("is-open");
      if ($$1("#mobile_top_menu_wrapper").is(":visible")) {
        $$1("#notifications, #wrapper, #footer").hide();
      } else {
        $$1("#notifications, #wrapper, #footer").show();
      }
    }
  }
  "function" != typeof Object.create && (Object.create = function(t) {
    function o() {
    }
    return o.prototype = t, new o();
  }), function(t, o, i, s) {
    var n = { _positionClasses: ["bottom-left", "bottom-right", "top-right", "top-left", "bottom-center", "top-center", "mid-center"], _defaultIcons: ["success", "error", "info", "warning"], init: function(o2, i2) {
      this.prepareOptions(o2, t.toast.options), this.process();
    }, prepareOptions: function(o2, i2) {
      var s2 = {};
      "string" == typeof o2 || o2 instanceof Array ? s2.text = o2 : s2 = o2, this.options = t.extend({}, i2, s2);
    }, process: function() {
      this.setup(), this.addToDom(), this.position(), this.bindToast(), this.animate();
    }, setup: function() {
      var o2 = "";
      if (this._toastEl = this._toastEl || t("<div></div>", { "class": "jq-toast-single" }), o2 += '<span class="jq-toast-loader"></span>', this.options.allowToastClose && (o2 += '<span class="close-jq-toast-single">&times;</span>'), this.options.text instanceof Array) {
        this.options.heading && (o2 += '<h2 class="jq-toast-heading">' + this.options.heading + "</h2>"), o2 += '<ul class="jq-toast-ul">';
        for (var i2 = 0; i2 < this.options.text.length; i2++)
          o2 += '<li class="jq-toast-li" id="jq-toast-item-' + i2 + '">' + this.options.text[i2] + "</li>";
        o2 += "</ul>";
      } else
        this.options.heading && (o2 += '<h2 class="jq-toast-heading">' + this.options.heading + "</h2>"), o2 += this.options.text;
      this._toastEl.html(o2), this.options.bgColor !== false && this._toastEl.css("background-color", this.options.bgColor), this.options.textColor !== false && this._toastEl.css("color", this.options.textColor), this.options.textAlign && this._toastEl.css("text-align", this.options.textAlign), this.options.icon !== false && (this._toastEl.addClass("jq-has-icon"), -1 !== t.inArray(this.options.icon, this._defaultIcons) && this._toastEl.addClass("jq-icon-" + this.options.icon)), this.options["class"] !== false && this._toastEl.addClass(this.options["class"]);
    }, position: function() {
      "string" == typeof this.options.position && -1 !== t.inArray(this.options.position, this._positionClasses) ? "bottom-center" === this.options.position ? this._container.css({ left: t(o).outerWidth() / 2 - this._container.outerWidth() / 2, bottom: 20 }) : "top-center" === this.options.position ? this._container.css({ left: t(o).outerWidth() / 2 - this._container.outerWidth() / 2, top: 20 }) : "mid-center" === this.options.position ? this._container.css({ left: t(o).outerWidth() / 2 - this._container.outerWidth() / 2, top: t(o).outerHeight() / 2 - this._container.outerHeight() / 2 }) : this._container.addClass(this.options.position) : "object" == typeof this.options.position ? this._container.css({ top: this.options.position.top ? this.options.position.top : "auto", bottom: this.options.position.bottom ? this.options.position.bottom : "auto", left: this.options.position.left ? this.options.position.left : "auto", right: this.options.position.right ? this.options.position.right : "auto" }) : this._container.addClass("bottom-left");
    }, bindToast: function() {
      var t2 = this;
      this._toastEl.on("afterShown", function() {
        t2.processLoader();
      }), this._toastEl.find(".close-jq-toast-single").on("click", function(o2) {
        o2.preventDefault(), "fade" === t2.options.showHideTransition ? (t2._toastEl.trigger("beforeHide"), t2._toastEl.fadeOut(function() {
          t2._toastEl.trigger("afterHidden");
        })) : "slide" === t2.options.showHideTransition ? (t2._toastEl.trigger("beforeHide"), t2._toastEl.slideUp(function() {
          t2._toastEl.trigger("afterHidden");
        })) : (t2._toastEl.trigger("beforeHide"), t2._toastEl.hide(function() {
          t2._toastEl.trigger("afterHidden");
        }));
      }), "function" == typeof this.options.beforeShow && this._toastEl.on("beforeShow", function() {
        t2.options.beforeShow();
      }), "function" == typeof this.options.afterShown && this._toastEl.on("afterShown", function() {
        t2.options.afterShown();
      }), "function" == typeof this.options.beforeHide && this._toastEl.on("beforeHide", function() {
        t2.options.beforeHide();
      }), "function" == typeof this.options.afterHidden && this._toastEl.on("afterHidden", function() {
        t2.options.afterHidden();
      });
    }, addToDom: function() {
      var o2 = t(".jq-toast-wrap");
      if (0 === o2.length ? (o2 = t("<div></div>", { "class": "jq-toast-wrap" }), t("body").append(o2)) : (!this.options.stack || isNaN(parseInt(this.options.stack, 10))) && o2.empty(), o2.find(".jq-toast-single:hidden").remove(), o2.append(this._toastEl), this.options.stack && !isNaN(parseInt(this.options.stack), 10)) {
        var i2 = o2.find(".jq-toast-single").length, s2 = i2 - this.options.stack;
        s2 > 0 && t(".jq-toast-wrap").find(".jq-toast-single").slice(0, s2).remove();
      }
      this._container = o2;
    }, canAutoHide: function() {
      return this.options.hideAfter !== false && !isNaN(parseInt(this.options.hideAfter, 10));
    }, processLoader: function() {
      if (!this.canAutoHide() || this.options.loader === false)
        return false;
      var t2 = this._toastEl.find(".jq-toast-loader"), o2 = (this.options.hideAfter - 400) / 1e3 + "s", i2 = this.options.loaderBg, s2 = t2.attr("style") || "";
      s2 = s2.substring(0, s2.indexOf("-webkit-transition")), s2 += "-webkit-transition: width " + o2 + " ease-in;                       -o-transition: width " + o2 + " ease-in;                       transition: width " + o2 + " ease-in;                       background-color: " + i2 + ";", t2.attr("style", s2).addClass("jq-toast-loaded");
    }, animate: function() {
      var t2 = this;
      if (this._toastEl.hide(), this._toastEl.trigger("beforeShow"), "fade" === this.options.showHideTransition.toLowerCase() ? this._toastEl.fadeIn(function() {
        t2._toastEl.trigger("afterShown");
      }) : "slide" === this.options.showHideTransition.toLowerCase() ? this._toastEl.slideDown(function() {
        t2._toastEl.trigger("afterShown");
      }) : this._toastEl.show(function() {
        t2._toastEl.trigger("afterShown");
      }), this.canAutoHide()) {
        var t2 = this;
        o.setTimeout(function() {
          "fade" === t2.options.showHideTransition.toLowerCase() ? (t2._toastEl.trigger("beforeHide"), t2._toastEl.fadeOut(function() {
            t2._toastEl.trigger("afterHidden");
          })) : "slide" === t2.options.showHideTransition.toLowerCase() ? (t2._toastEl.trigger("beforeHide"), t2._toastEl.slideUp(function() {
            t2._toastEl.trigger("afterHidden");
          })) : (t2._toastEl.trigger("beforeHide"), t2._toastEl.hide(function() {
            t2._toastEl.trigger("afterHidden");
          }));
        }, this.options.hideAfter);
      }
    }, reset: function(o2) {
      "all" === o2 ? t(".jq-toast-wrap").remove() : this._toastEl.remove();
    }, update: function(t2) {
      this.prepareOptions(t2, this.options), this.setup(), this.bindToast();
    } };
    t.toast = function(t2) {
      var o2 = Object.create(n);
      return o2.init(t2, this), { reset: function(t3) {
        o2.reset(t3);
      }, update: function(t3) {
        o2.update(t3);
      } };
    }, t.toast.options = { text: "", heading: "", showHideTransition: "fade", allowToastClose: true, hideAfter: 3e3, loader: true, loaderBg: "#9EC600", stack: 5, position: "bottom-left", bgColor: false, textColor: false, textAlign: "left", icon: false, beforeShow: function() {
    }, afterShown: function() {
    }, beforeHide: function() {
    }, afterHidden: function() {
    } };
  }(jQuery, window);
  const jquery_toast_min = "";
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  $$1(() => {
    prestashop$1.blockcart = prestashop$1.blockcart || {};
    prestashop$1.blockcart.showModal || function(modal) {
      const $body = $$1("body");
      $body.append(modal);
      $$1("#blockcart-modal").modal();
      console.log("called");
      $body.one("click", "#blockcart-modal", (event) => {
        if (event.target.id === "blockcart-modal") {
          $$1.modal.close();
        }
      });
    };
    prestashop$1.on("updateCart", (event) => {
      const refreshURL = $$1(".blockcart").data("refresh-url");
      let requestData = {};
      if (event && event.reason && typeof event.resp !== "undefined" && !event.resp.hasError) {
        requestData = {
          id_customization: event.reason.idCustomization,
          id_product_attribute: event.reason.idProductAttribute,
          id_product: event.reason.idProduct,
          action: event.reason.linkAction
        };
      }
      if (event && event.resp && event.resp.hasError) {
        prestashop$1.emit("showErrorNextToAddtoCartButton", {
          errorMessage: event.resp.errors.join("<br/>")
        });
      }
      $$1.post(refreshURL, requestData).then((resp) => {
        $$1(".blockcart").replaceWith($$1(resp.preview).find(".blockcart"));
        if (resp.modal) {
          $$1.toast({
            heading: "Added to Cart",
            text: "You can checkout or continue shopping.",
            position: {
              top: "100px",
              right: "20px"
            },
            bgColor: "#ffffff",
            textColor: "#111827",
            loaderBg: "#172554",
            class: "rounded-none border border-gray-200"
          });
        }
      }).fail((resp) => {
        prestashop$1.emit("handleError", {
          eventType: "updateShoppingCart",
          resp
        });
      });
    });
  });
  var jquery_offcanvas_min = { exports: {} };
  (function(module) {
    !function(t, e) {
      module.exports = function(t2, s) {
        return void 0 === s && (s = "undefined" != typeof window ? $$1 : $$1(t2)), e(s), s;
      };
    }(commonjsGlobal, function(t) {
      function e(t2, e2, s2) {
        var i2;
        return function() {
          var n = this, o = arguments, h = function() {
            i2 = null, s2 || t2.apply(n, o);
          }, a = s2 && !i2;
          clearTimeout(i2), i2 = setTimeout(h, e2), a && t2.apply(n, o);
        };
      }
      function s(e2, s2) {
        var n, o, h = t(e2).data();
        this.$el = t(e2);
        for (n in h)
          h.hasOwnProperty(n) && /^offcanvas[A-Z]+/.test(n) && (o = n[i.length].toLowerCase() + n.substr(i.length + 1), h[o] = h[n]);
        this.settings = t.extend(true, {}, t.fn[i].defaults, s2, h), this.name = i, this.$el.data(this.name + ".opts", this.settings), this.init();
      }
      var i = "offcanvas";
      t.extend(s.prototype, { setHeights: function() {
        var t2 = this.$outerWrapper.height();
        this.$el.data(this.name + ".opts") && (this.$element.css("height", t2), this.settings.overlay && this.$overlay.css("height", t2));
      }, show: function() {
        var e2 = {};
        this.visible || (this.$cont.addClass(this.settings.classes.open), this.visible = true, this.$el.trigger("show." + this.name), this.$el.trigger("toggle." + this.name, this.visible), this.setHeights(), e2[this.settings.origin] = this.effects[this.settings.effect].to, this.effects[this.settings.effect].$el.velocity(e2, t.extend({ complete: (function() {
          this.$el.trigger("shown." + this.name), this.settings.overlay && this.$overlay.one("click." + this.name, (function() {
            this.hide();
          }).bind(this));
        }).bind(this) }, this.animationOptions)), this.settings.overlay && this.$overlay.velocity({ opacity: 1 }, t.extend({ display: "block" }, this.animationOptions)));
      }, hide: function() {
        this.visible && (this.$cont.removeClass(this.settings.classes.open), this.visible = false, this.$el.trigger("hide." + this.name), this.$el.trigger("toggle." + this.name, this.visible), this.effects[this.settings.effect].$el.velocity("stop").velocity("reverse", t.extend({ complete: (function() {
          this.$el.trigger("hidden." + this.name);
        }).bind(this) }, this.animationOptions)), this.settings.overlay && this.$overlay.velocity("stop").velocity("reverse", t.extend({ display: "none" }, this.animationOptions)));
      }, toggle: function() {
        return (this.visible ? this.hide : this.show).call(this);
      }, destroy: function() {
        this.$el.data(this.name + ".opts") && (this.$innerWrapper.unwrap(), this.$innerWrapper.children().unwrap(), this.$cont.removeClass(this.settings.classes.container).removeClass(this.settings.classes.open), this.settings.overlay && this.$overlay.off("click." + this.name).remove(), this.$el.unwrap().removeData(this.name + ".opts").removeAttr("style"), this.$win.off("resize." + this.name));
      }, init: function() {
        var s2 = {};
        this.$win = t(window), this.$body = t("body"), this.visible = false, this.$cont = t(this.settings.container), this.$cont.addClass(this.settings.classes.container).children(":not(script)").wrapAll(t("<div/>").addClass(this.settings.classes.outer)), this.$outerWrapper = t("." + this.settings.classes.outer).wrapInner(t("<div/>").addClass(this.settings.classes.inner)), this.$innerWrapper = t("." + this.settings.classes.inner), this.settings.overlay && (this.$innerWrapper.append(t("<div/>").addClass(this.settings.classes.overlay).css("background-color", this.settings.overlayColor)), this.$overlay = t("." + this.settings.classes.overlay)), this.$el.wrap(t("<div/>").addClass(this.settings.classes.element)), this.$element = this.$el.parent(), s2[this.settings.origin] = "-" + this.settings.coverage, s2.width = this.settings.coverage, this.$element.css(s2), this.effects = { push: { $el: this.$innerWrapper, from: 0, to: this.settings.coverage }, "slide-in-over": { $el: this.$element, from: "-" + this.settings.coverage, to: 0 } }, this.animationOptions = { easing: this.settings.easing, duration: this.settings.duration }, this.$win.on("resize." + this.name, e(this.setHeights, 300).bind(this)), this.setHeights(), this.$el.trigger("init." + this.name);
      } }), t.fn[i] = function(e2) {
        var n, o = arguments;
        return void 0 === e2 || "object" == typeof e2 ? this.each(function() {
          t.data(this, "plugin_" + i) || t.data(this, "plugin_" + i, new s(this, e2));
        }) : "string" == typeof e2 && "_" !== e2[0] && "init" !== e2 && (this.each(function() {
          var h = t.data(this, "plugin_" + i);
          h instanceof s && "function" == typeof h[e2] && (n = h[e2].apply(h, Array.prototype.slice.call(o, 1))), "destroy" === e2 && t.data(this, "plugin_" + i, null);
        }), void 0 !== n ? n : this);
      }, t.fn[i].defaults = { classes: { container: i, element: i + "-element", inner: i + "-inner", open: i + "-open", outer: i + "-outer", overlay: i + "-overlay" }, container: "body", coverage: "220px", origin: "left", duration: 300, easing: "ease-in-out", effect: "push", overlay: false, overlayColor: "rgba(0, 0, 0, 0.7)" };
    });
  })(jquery_offcanvas_min);
  var jquery_offcanvas_minExports = jquery_offcanvas_min.exports;
  const jo = /* @__PURE__ */ getDefaultExportFromCjs(jquery_offcanvas_minExports);
  /**
   * Copyright since 2007 PrestaShop SA and Contributors
   * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
   *
   * NOTICE OF LICENSE
   *
   * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
   * that is bundled with this package in the file LICENSE.md.
   * It is also available through the world-wide-web at this URL:
   * https://opensource.org/licenses/AFL-3.0
   * If you did not receive a copy of the license and are unable to
   * obtain it through the world-wide-web, please send an email
   * to license@prestashop.com so we can send you a copy immediately.
   *
   * DISCLAIMER
   *
   * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
   * versions in the future. If you wish to customize PrestaShop for your
   * needs please refer to https://devdocs.prestashop.com/ for more information.
   *
   * @author    PrestaShop SA and Contributors <contact@prestashop.com>
   * @copyright Since 2007 PrestaShop SA and Contributors
   * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
   */
  jo(window, $$1);
  touchspin(window, $$1);
  for (const i in EventEmitter$1.prototype) {
    prestashop$1[i] = EventEmitter$1.prototype[i];
  }
  $$1(() => {
    const dropDownEl = $$1(".js-dropdown");
    const form = new Form();
    const topMenuEl = $$1('.js-top-menu ul[data-depth="0"]');
    const dropDown = new DropDown(dropDownEl);
    const topMenu = new TopMenu(topMenuEl);
    const productMinitature = new ProductMinitature();
    const productSelect = new ProductSelect();
    dropDown.init();
    form.init();
    topMenu.init();
    productMinitature.init();
    productSelect.init();
    usePasswordPolicy(".field-password-policy");
    $$1('.carousel[data-touch="true"]').swipe({
      swipe(event, direction) {
        if (direction === "left") {
          $$1(this).carousel("next");
        }
        if (direction === "right") {
          $$1(this).carousel("prev");
        }
      },
      allowPageScroll: "vertical"
    });
    $$1("#product-list-top-filters").offcanvas({
      duration: 100,
      effect: "slide-in-over",
      overlay: true,
      classes: {
        element: "absolute top-0 z-50"
      }
    });
    $$1("#show-filters").on("click.offcanvas", () => {
      $$1("#product-list-top-filters").offcanvas("show");
    });
    $$1("#hide-filters").on("click.offcanvas", () => {
      $$1("#product-list-top-filters").offcanvas("hide");
    });
    $$1("#product-list-top-filters").on("shown.offcanvas", () => {
      $$1("#product-list-top-filters").show();
    });
    $$1("#product-list-top-filters").on("hide.offcanvas", () => {
      $$1("#product-list-top-filters").hide();
    });
    function ThAccordion() {
    }
    $$1.extend(ThAccordion.prototype, {
      init() {
      }
    });
    $$1.fn.thaccordion = function() {
      const selectors = {
        root: ".th-accordion",
        item: ".th-accordion-item",
        trigger: ".th-accordion-item-trigger",
        svg: ".th-accordion-item-trigger-svg",
        content: ".th-accordion-item-content"
      };
      let selection = null;
      const items = this.find(selectors.item);
      const rotateClass = "rotate-90 duration-500";
      function collapseAll() {
        items.each(function() {
          $$1(this).find(selectors.content).hide(500);
          $$1(this).find(selectors.svg).removeClass(rotateClass);
        });
      }
      function close() {
        $$1(selection).find(selectors.content).hide(500);
        $$1(selection).find(selectors.svg).removeClass("rotate-90");
      }
      function open() {
        collapseAll();
        $$1(selection).find(selectors.content).show(500);
        $$1(selection).find(selectors.svg).addClass(rotateClass);
      }
      function isOpen(item) {
        return $$1(item).find(selectors.content).is(":visible");
      }
      collapseAll();
      items.each(function() {
        const self2 = this;
        $$1(this).find(selectors.trigger).on("click", () => {
          if (selection === self2) {
            if (isOpen(selection)) {
              close();
            } else {
              open();
            }
          } else {
            selection = self2;
            if (!isOpen(selection)) {
              open();
            }
          }
        });
      });
    };
    $$1(".th-accordion").thaccordion();
    $$1(".tooltip").tooltipster({
      theme: "tooltipster-shadow",
      triggerOpen: {
        click: true,
        mouseenter: true,
        touchstart: true
      },
      delayTouch: [0, 2e3]
    });
    $$1(".toggle-main-menu").on("click", () => {
      $$1(".mobile-main-menu").toggle();
    });
  });
})(jQuery, prestashop);
//# sourceMappingURL=data:application/json;charset=utf-8;base64,[encoded data, 867192 characters]
