UNPKG

@stlite/browser

Version:
1,417 lines 583 kB
import { $ as e, $r as t, An as n, Bi as r, Bn as i, Ci as a, Cn as o, Cr as s, D as c, Dr as l, En as u, Er as d, Et as f, F as p, Fr as m, G as h, Gr as g, H as _, Ha as v, Hi as y, Ii as b, In as x, Jr as S, Jt as C, Ka as w, Ki as T, Kn as E, Kr as D, Kt as O, Mt as k, Ni as A, Nt as ee, On as j, Or as te, Pi as M, Qn as ne, Qr as re, Ri as ie, Rr as ae, Rt as N, S as P, Sr as oe, T as se, Ti as ce, Tr as le, Ua as ue, Ui as de, Ur as F, Ut as fe, V as pe, Vi as me, Vt as I, Wr as he, Wt as L, X as ge, Xi as R, Xr as _e, Xt as ve, Yr as ye, Zi as z, _r as be, ai as xe, ar as Se, br as B, ca as Ce, cr as V, da as we, dn as Te, dt as Ee, ei as De, fa as Oe, g as ke, ga as Ae, gi as je, gr as H, h as Me, ha as Ne, hi as Pe, hn as Fe, hr as Ie, in as Le, ki as Re, kr as ze, la as Be, li as Ve, ln as He, m as Ue, ma as We, mi as Ge, mr as Ke, nr as qe, oa as Je, oi as Ye, or as Xe, pi as Ze, q as Qe, qr as $e, rr as et, sr as tt, t as nt, ti as U, tt as rt, ui as it, va as at, vi as W, vr as ot, wa as st, wn as ct, wr as lt, wt as ut, x as dt, xn as ft, xr as pt, ya as mt, z as ht, zi as gt, zn as _t, zr as vt } from "./index-Dl4ETd_L-D2oMd1k2.js"; import { n as yt, t as bt } from "./withFullScreenWrapper-tGGSjEWy-DoekoEMQ.js"; import { n as xt } from "./moment-C29_LcvN-Dw52XTOQ.js"; import { t as St } from "./numbro-CDdPhOTG-MkRfyTGH.js"; import { a as Ct, i as wt, n as Tt, o as Et, t as Dt } from "./pandasStylerUtils-lPQUevWP-DEF4qf3G.js"; import { A as Ot, I as kt, N as At, O as jt, P as Mt, S as Nt, a as Pt, b as Ft, c as It, d as Lt, h as Rt, i as zt, j as G, l as Bt, n as Vt, o as Ht, s as Ut, x as Wt } from "./_baseAssignValue-CvLdsscI-DZvAeBHf.js"; import { t as Gt } from "./index-CVld_lKx-BpaiPOLH.js"; import { t as Kt } from "./reactJsonViewCompat-BZlB_0r4-BAr45JB0.js"; import { i as qt, n as Jt, r as Yt } from "./possibleConstructorReturn-BHiKHPYz-Bnf-j7Fb.js"; import { n as Xt, r as Zt, t as K } from "./toConsumableArray-8hd4ivs--BcltBJ_c.js"; import { t as Qt } from "./createSuper-DfsXhqeB-ygQJQAOQ.js"; import { t as $t } from "./formatNumber-B9NmJPl4-CfTaoV6j.js"; import { t as en } from "./formatMoment-DEtsTHwA-C3SDegV0.js"; import { t as tn } from "./createDownloadLinkElement-CnWgptKS-D3FE3dhN.js"; import { n as nn, r as rn, t as q } from "./checkbox-BlFkpHIT-CZhSzhvC.js"; import { n as an, t as on } from "./FileDownload.esm-DA6EBJWo-Bi9VuX1R.js"; //#region ../react/build/DataFrame-ZHi5iyDV.js var J = /* @__PURE__ */ w(ue(), 1), sn = /* @__PURE__ */ w(v(), 1), cn = "[object Map]", ln = "[object Set]", un = Object.prototype.hasOwnProperty; function dn(e) { if (e == null) return !0; if (ot(e) && (be(e) || typeof e == "string" || typeof e.splice == "function" || pt(e) || t(e) || H(e))) return !e.length; var n = Se(e); if (n == cn || n == ln) return !e.size; if (S(e)) return !Le(e).length; for (var r in e) if (un.call(e, r)) return !1; return !0; } var fn = /* @__PURE__ */ J.forwardRef(function(e, t) { return /* @__PURE__ */ J.createElement(P, L({ iconAttrs: { fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, iconVerticalAlign: "middle", iconViewBox: "0 0 24 24" }, e, { ref: t }), /* @__PURE__ */ J.createElement("path", { fill: "none", d: "M0 0h24v24H0V0z" }), /* @__PURE__ */ J.createElement("path", { d: "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" })); }); fn.displayName = "Add"; var pn = /* @__PURE__ */ J.forwardRef(function(e, t) { return /* @__PURE__ */ J.createElement(P, L({ iconAttrs: { fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, iconVerticalAlign: "middle", iconViewBox: "0 0 24 24" }, e, { ref: t }), /* @__PURE__ */ J.createElement("path", { fill: "none", d: "M0 0h24v24H0V0z" }), /* @__PURE__ */ J.createElement("path", { d: "M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" })); }); pn.displayName = "Search"; var mn = /* @__PURE__ */ J.forwardRef(function(e, t) { return /* @__PURE__ */ J.createElement(P, L({ iconAttrs: { fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, iconVerticalAlign: "middle", iconViewBox: "0 0 24 24" }, e, { ref: t }), /* @__PURE__ */ J.createElement("path", { fill: "none", d: "M0 0h24v24H0V0z" }), /* @__PURE__ */ J.createElement("path", { d: "M12 6a9.77 9.77 0 018.82 5.5C19.17 14.87 15.79 17 12 17s-7.17-2.13-8.82-5.5A9.77 9.77 0 0112 6m0-2C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4zm0 5a2.5 2.5 0 010 5 2.5 2.5 0 010-5m0-2c-2.48 0-4.5 2.02-4.5 4.5S9.52 16 12 16s4.5-2.02 4.5-4.5S14.48 7 12 7z" })); }); mn.displayName = "Visibility"; var hn, gn; function _n() { if (gn) return hn; gn = 1; var e = Object.prototype.hasOwnProperty; function t(t, n) { return t != null && e.call(t, n); } return hn = t, hn; } var vn, yn; function bn() { if (yn) return vn; yn = 1; var e = _n(), t = Wt(); function n(n, r) { return n != null && t(n, r, e); } return vn = n, vn; } var xn = /* @__PURE__ */ E(bn()); function Sn(e = "This should not happen") { throw Error(e); } function Cn(e, t = "Assertion failed") { if (!e) return Sn(t); } function wn(e, t) { return Sn(t ?? "Hell froze over"); } function Tn(e, t) { try { return e(); } catch { return t; } } var En = Object.prototype.hasOwnProperty; function Dn(e, t) { let n, r; if (e === t) return !0; if (e && t && (n = e.constructor) === t.constructor) { if (n === Date) return e.getTime() === t.getTime(); if (n === RegExp) return e.toString() === t.toString(); if (n === Array) { if ((r = e.length) === t.length) for (; r-- && Dn(e[r], t[r]);); return r === -1; } if (!n || typeof e == "object") { for (n in r = 0, e) if (En.call(e, n) && ++r && !En.call(t, n) || !(n in t) || !Dn(e[n], t[n])) return !1; return Object.keys(t).length === r; } } return e !== e && t !== t; } var On = null, kn = void 0, Y; (function(e) { e.Uri = "uri", e.Text = "text", e.Image = "image", e.RowID = "row-id", e.Number = "number", e.Bubble = "bubble", e.Boolean = "boolean", e.Loading = "loading", e.Markdown = "markdown", e.Drilldown = "drilldown", e.Protected = "protected", e.Custom = "custom"; })(Y ||= {}); var An; (function(e) { e.HeaderRowID = "headerRowID", e.HeaderCode = "headerCode", e.HeaderNumber = "headerNumber", e.HeaderString = "headerString", e.HeaderBoolean = "headerBoolean", e.HeaderAudioUri = "headerAudioUri", e.HeaderVideoUri = "headerVideoUri", e.HeaderEmoji = "headerEmoji", e.HeaderImage = "headerImage", e.HeaderUri = "headerUri", e.HeaderPhone = "headerPhone", e.HeaderMarkdown = "headerMarkdown", e.HeaderDate = "headerDate", e.HeaderTime = "headerTime", e.HeaderEmail = "headerEmail", e.HeaderReference = "headerReference", e.HeaderIfThenElse = "headerIfThenElse", e.HeaderSingleValue = "headerSingleValue", e.HeaderLookup = "headerLookup", e.HeaderTextTemplate = "headerTextTemplate", e.HeaderMath = "headerMath", e.HeaderRollup = "headerRollup", e.HeaderJoinStrings = "headerJoinStrings", e.HeaderSplitString = "headerSplitString", e.HeaderGeoDistance = "headerGeoDistance", e.HeaderArray = "headerArray", e.RowOwnerOverlay = "rowOwnerOverlay", e.ProtectedColumnOverlay = "protectedColumnOverlay"; })(An ||= {}); var jn; (function(e) { e.Triangle = "triangle", e.Dots = "dots"; })(jn ||= {}); function Mn(e) { return "width" in e && typeof e.width == "number"; } async function Nn(e) { return typeof e == "object" ? e : await e(); } function Pn(e) { return !(e.kind === Y.Loading || e.kind === Y.Bubble || e.kind === Y.RowID || e.kind === Y.Protected || e.kind === Y.Drilldown); } function Fn(e) { return e.kind === zn.Marker || e.kind === zn.NewRow; } function In(e) { if (!Pn(e) || e.kind === Y.Image) return !1; switch (e.kind) { case Y.Text: case Y.Number: case Y.Markdown: case Y.Uri: case Y.Custom: case Y.Boolean: return e.readonly !== !0; default: wn(e, "A cell was passed with an invalid kind"); } } function Ln(e) { return xn(e, "editor"); } function Rn(e) { return !(e.readonly ?? !1); } var zn; (function(e) { e.NewRow = "new-row", e.Marker = "marker"; })(zn ||= {}); var Bn = { shape: "square", size: 4, offsetX: -2, offsetY: -2, outline: 0 }; function Vn(e) { if (e.length === 0) return []; let t = [...e], n = []; t.sort(function(e, t) { return e[0] - t[0]; }), n.push([...t[0]]); for (let e of t.slice(1)) { let t = n[n.length - 1]; t[1] < e[0] ? n.push([...e]) : t[1] < e[1] && (t[1] = e[1]); } return n; } var Hn, Un = class e { items; constructor(e) { this.items = e; } static create = (t) => new e(Vn(t)); static empty = () => Hn ??= new e([]); static fromSingleSelection = (t) => e.empty().add(t); static fromArray = (t) => t.length === 0 ? e.empty() : new e(Vn(t.map((e) => [e, e + 1]))); offset(t) { return t === 0 ? this : new e(this.items.map((e) => [e[0] + t, e[1] + t])); } add(t) { let n = typeof t == "number" ? [t, t + 1] : t; return new e(Vn([...this.items, n])); } remove(t) { let n = [...this.items], r = typeof t == "number" ? t : t[0], i = typeof t == "number" ? t + 1 : t[1]; for (let [e, t] of n.entries()) { let [a, o] = t; if (a <= i && r <= o) { let t = []; a < r && t.push([a, r]), i < o && t.push([i, o]), n.splice(e, 1, ...t); } } return new e(n); } first() { if (this.items.length !== 0) return this.items[0][0]; } last() { if (this.items.length !== 0) return this.items.slice(-1)[0][1] - 1; } hasIndex(e) { for (let t = 0; t < this.items.length; t++) { let [n, r] = this.items[t]; if (e >= n && e < r) return !0; } return !1; } hasAll(e) { for (let t = e[0]; t < e[1]; t++) if (!this.hasIndex(t)) return !1; return !0; } some(e) { for (let t of this) if (e(t)) return !0; return !1; } equals(e) { if (e === this) return !0; if (e.items.length !== this.items.length) return !1; for (let t = 0; t < this.items.length; t++) { let n = e.items[t], r = this.items[t]; if (n[0] !== r[0] || n[1] !== r[1]) return !1; } return !0; } toArray() { let e = []; for (let [t, n] of this.items) for (let r = t; r < n; r++) e.push(r); return e; } get length() { let e = 0; for (let [t, n] of this.items) e += n - t; return e; } *[Symbol.iterator]() { for (let [e, t] of this.items) for (let n = e; n < t; n++) yield n; } }, Wn = function() { let e = Array.prototype.slice.call(arguments).filter(Boolean), t = {}, n = []; e.forEach((e) => { (e ? e.split(" ") : []).forEach((e) => { if (e.startsWith("atm_")) { let [, n] = e.split("_"); t[n] = e; } else n.push(e); }); }); let r = []; for (let e in t) Object.prototype.hasOwnProperty.call(t, e) && r.push(t[e]); return r.push(...n), r.join(" "); }, Gn = (e) => e.toUpperCase() === e, Kn = (e) => (t) => e.indexOf(t) === -1, qn = (e, t) => { let n = {}; return Object.keys(e).filter(Kn(t)).forEach((t) => { n[t] = e[t]; }), n; }; function Jn(e, t, n) { let r = qn(t, n); if (!e) { let e = typeof $e == "function" ? { default: $e } : $e; Object.keys(r).forEach((t) => { e.default(t) || delete r[t]; }); } return r; } function Yn(e) { return (t) => { let n = (n, r) => { let { as: i = e, class: a = "" } = n, o = Jn(t.propsAsIs === void 0 ? !(typeof i == "string" && i.indexOf("-") === -1 && !Gn(i[0])) : t.propsAsIs, n, ["as", "class"]); o.ref = r, o.className = t.atomic ? Wn(t.class, o.className || a) : Wn(o.className || a, t.class); let { vars: s } = t; if (s) { let e = {}; for (let r in s) { let i = s[r], a = i[0], o = i[1] || "", c = typeof a == "function" ? a(n) : a; t.name, e[`--${r}`] = `${c}${o}`; } let r = o.style || {}, i = Object.keys(r); i.length > 0 && i.forEach((t) => { e[t] = r[t]; }), o.style = e; } return e.__wyw_meta && e !== i ? (o.as = i, (0, J.createElement)(e, o)) : (0, J.createElement)(i, o); }, r = J.forwardRef ? (0, J.forwardRef)(n) : (e) => n(qn(e, ["innerRef"]), e.innerRef); return r.displayName = t.name, r.__wyw_meta = { className: t.class || "", extends: e }, r; }; } var Xn = Yn, Zn = /* @__PURE__ */ Xn("div")({ name: "ImageOverlayEditorStyle", class: "gdg-i2iowwq", propsAsIs: !1 }), Qn = {}, $n = {}, er = {}, tr = {}, nr; function rr() { return nr || (nr = 1, function(e) { (function(t, n) { n(e, J.default, /* @__PURE__ */ ie()); })(tr, function(e, t, n) { Object.defineProperty(e, "__esModule", { value: !0 }), e.setHasSupportToCaptureOption = p; var r = a(t), i = a(n); function a(e) { return e && e.__esModule ? e : { default: e }; } var o = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; }; function s(e, t) { var n = {}; for (var r in e) t.indexOf(r) >= 0 || Object.prototype.hasOwnProperty.call(e, r) && (n[r] = e[r]); return n; } function c(e, t) { if (!(e instanceof t)) throw TypeError("Cannot call a class as a function"); } var l = /* @__PURE__ */ function() { function e(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } return function(t, n, r) { return n && e(t.prototype, n), r && e(t, r), t; }; }(); function u(e, t) { if (!e) throw ReferenceError("this hasn't been initialised - super() hasn't been called"); return t && (typeof t == "object" || typeof t == "function") ? t : e; } function d(e, t) { if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function, not " + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t); } var f = !1; function p(e) { f = e; } try { addEventListener("test", null, Object.defineProperty({}, "capture", { get: function() { p(!0); } })); } catch {} function m() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : { capture: !0 }; return f ? e : e.capture; } function h(e) { if ("touches" in e) { var t = e.touches[0]; return { x: t.pageX, y: t.pageY }; } return { x: e.screenX, y: e.screenY }; } var g = function(e) { d(t, e); function t() { var e; c(this, t); var n = [...arguments], r = u(this, (e = t.__proto__ || Object.getPrototypeOf(t)).call.apply(e, [this].concat(n))); return r._handleSwipeStart = r._handleSwipeStart.bind(r), r._handleSwipeMove = r._handleSwipeMove.bind(r), r._handleSwipeEnd = r._handleSwipeEnd.bind(r), r._onMouseDown = r._onMouseDown.bind(r), r._onMouseMove = r._onMouseMove.bind(r), r._onMouseUp = r._onMouseUp.bind(r), r._setSwiperRef = r._setSwiperRef.bind(r), r; } return l(t, [ { key: "componentDidMount", value: function() { this.swiper && this.swiper.addEventListener("touchmove", this._handleSwipeMove, m({ capture: !0, passive: !1 })); } }, { key: "componentWillUnmount", value: function() { this.swiper && this.swiper.removeEventListener("touchmove", this._handleSwipeMove, m({ capture: !0, passive: !1 })); } }, { key: "_onMouseDown", value: function(e) { this.props.allowMouseEvents && (this.mouseDown = !0, document.addEventListener("mouseup", this._onMouseUp), document.addEventListener("mousemove", this._onMouseMove), this._handleSwipeStart(e)); } }, { key: "_onMouseMove", value: function(e) { this.mouseDown && this._handleSwipeMove(e); } }, { key: "_onMouseUp", value: function(e) { this.mouseDown = !1, document.removeEventListener("mouseup", this._onMouseUp), document.removeEventListener("mousemove", this._onMouseMove), this._handleSwipeEnd(e); } }, { key: "_handleSwipeStart", value: function(e) { var t = h(e), n = t.x, r = t.y; this.moveStart = { x: n, y: r }, this.props.onSwipeStart(e); } }, { key: "_handleSwipeMove", value: function(e) { if (this.moveStart) { var t = h(e), n = t.x, r = t.y, i = n - this.moveStart.x, a = r - this.moveStart.y; this.moving = !0, this.props.onSwipeMove({ x: i, y: a }, e) && e.cancelable && e.preventDefault(), this.movePosition = { deltaX: i, deltaY: a }; } } }, { key: "_handleSwipeEnd", value: function(e) { this.props.onSwipeEnd(e); var t = this.props.tolerance; this.moving && this.movePosition && (this.movePosition.deltaX < -t ? this.props.onSwipeLeft(1, e) : this.movePosition.deltaX > t && this.props.onSwipeRight(1, e), this.movePosition.deltaY < -t ? this.props.onSwipeUp(1, e) : this.movePosition.deltaY > t && this.props.onSwipeDown(1, e)), this.moveStart = null, this.moving = !1, this.movePosition = null; } }, { key: "_setSwiperRef", value: function(e) { this.swiper = e, this.props.innerRef(e); } }, { key: "render", value: function() { var e = this.props; e.tagName; var t = e.className, n = e.style, i = e.children; e.allowMouseEvents, e.onSwipeUp, e.onSwipeDown, e.onSwipeLeft, e.onSwipeRight, e.onSwipeStart, e.onSwipeMove, e.onSwipeEnd, e.innerRef, e.tolerance; var a = s(e, [ "tagName", "className", "style", "children", "allowMouseEvents", "onSwipeUp", "onSwipeDown", "onSwipeLeft", "onSwipeRight", "onSwipeStart", "onSwipeMove", "onSwipeEnd", "innerRef", "tolerance" ]); return r.default.createElement(this.props.tagName, o({ ref: this._setSwiperRef, onMouseDown: this._onMouseDown, onTouchStart: this._handleSwipeStart, onTouchEnd: this._handleSwipeEnd, className: t, style: n }, a), i); } } ]), t; }(t.Component); g.displayName = "ReactSwipe", g.propTypes = { tagName: i.default.string, className: i.default.string, style: i.default.object, children: i.default.node, allowMouseEvents: i.default.bool, onSwipeUp: i.default.func, onSwipeDown: i.default.func, onSwipeLeft: i.default.func, onSwipeRight: i.default.func, onSwipeStart: i.default.func, onSwipeMove: i.default.func, onSwipeEnd: i.default.func, innerRef: i.default.func, tolerance: i.default.number.isRequired }, g.defaultProps = { tagName: "div", allowMouseEvents: !1, onSwipeUp: function() {}, onSwipeDown: function() {}, onSwipeLeft: function() {}, onSwipeRight: function() {}, onSwipeStart: function() {}, onSwipeMove: function() {}, onSwipeEnd: function() {}, innerRef: function() {}, tolerance: 0 }, e.default = g; }); }(tr)), tr; } var ir; function ar() { return ir || (ir = 1, function(e) { (function(t, n) { n(e, rr()); })(er, function(e, t) { Object.defineProperty(e, "__esModule", { value: !0 }); var n = r(t); function r(e) { return e && e.__esModule ? e : { default: e }; } e.default = n.default; }); }(er)), er; } var or = {}, sr; function cr() { if (sr) return or; sr = 1, Object.defineProperty(or, "__esModule", { value: !0 }), or.default = void 0; var e = t(b()); function t(e) { return e && e.__esModule ? e : { default: e }; } function n(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } return or.default = { ROOT: function(t) { return (0, e.default)(n({ "carousel-root": !0 }, t || "", !!t)); }, CAROUSEL: function(t) { return (0, e.default)({ carousel: !0, "carousel-slider": t }); }, WRAPPER: function(t, n) { return (0, e.default)({ "thumbs-wrapper": !t, "slider-wrapper": t, "axis-horizontal": n === "horizontal", "axis-vertical": n !== "horizontal" }); }, SLIDER: function(t, n) { return (0, e.default)({ thumbs: !t, slider: t, animated: !n }); }, ITEM: function(t, n, r) { return (0, e.default)({ thumb: !t, slide: t, selected: n, previous: r }); }, ARROW_PREV: function(t) { return (0, e.default)({ "control-arrow control-prev": !0, "control-disabled": t }); }, ARROW_NEXT: function(t) { return (0, e.default)({ "control-arrow control-next": !0, "control-disabled": t }); }, DOT: function(t) { return (0, e.default)({ dot: !0, selected: t }); } }, or; } var lr = {}, ur = {}, dr; function fr() { return dr ? ur : (dr = 1, Object.defineProperty(ur, "__esModule", { value: !0 }), ur.outerWidth = void 0, ur.outerWidth = function(e) { var t = e.offsetWidth, n = getComputedStyle(e); return t += parseInt(n.marginLeft) + parseInt(n.marginRight), t; }, ur); } var pr = {}, mr; function hr() { return mr ? pr : (mr = 1, Object.defineProperty(pr, "__esModule", { value: !0 }), pr.default = void 0, pr.default = function(e, t, n) { var r = e === 0 ? e : e + t; return "translate3d" + ("(" + (n === "horizontal" ? [ r, 0, 0 ] : [ 0, r, 0 ]).join(",") + ")"); }, pr); } var gr = {}, _r; function vr() { return _r ? gr : (_r = 1, Object.defineProperty(gr, "__esModule", { value: !0 }), gr.default = void 0, gr.default = function() { return window; }, gr); } var yr; function br() { if (yr) return lr; yr = 1, Object.defineProperty(lr, "__esModule", { value: !0 }), lr.default = void 0; var e = c(J.default), t = o(cr()), n = fr(), r = o(hr()), i = o(ar()), a = o(vr()); function o(e) { return e && e.__esModule ? e : { default: e }; } function s() { if (typeof WeakMap != "function") return null; var e = /* @__PURE__ */ new WeakMap(); return s = function() { return e; }, e; } function c(e) { if (e && e.__esModule) return e; if (e === null || l(e) !== "object" && typeof e != "function") return { default: e }; var t = s(); if (t && t.has(e)) return t.get(e); var n = {}, r = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var i in e) if (Object.prototype.hasOwnProperty.call(e, i)) { var a = r ? Object.getOwnPropertyDescriptor(e, i) : null; a && (a.get || a.set) ? Object.defineProperty(n, i, a) : n[i] = e[i]; } return n.default = e, t && t.set(e, n), n; } function l(e) { "@babel/helpers - typeof"; return l = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, l(e); } function u() { return u = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; }, u.apply(this, arguments); } function d(e, t) { if (!(e instanceof t)) throw TypeError("Cannot call a class as a function"); } function f(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } function p(e, t, n) { return t && f(e.prototype, t), e; } function m(e, t) { if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && h(e, t); } function h(e, t) { return h = Object.setPrototypeOf || function(e, t) { return e.__proto__ = t, e; }, h(e, t); } function g(e) { var t = y(); return function() { var n = b(e), r; if (t) { var i = b(this).constructor; r = Reflect.construct(n, arguments, i); } else r = n.apply(this, arguments); return _(this, r); }; } function _(e, t) { return t && (l(t) === "object" || typeof t == "function") ? t : v(e); } function v(e) { if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function y() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0; } catch { return !1; } } function b(e) { return b = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, b(e); } function x(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } var S = function(e) { return e.hasOwnProperty("key"); }, C = /* @__PURE__ */ function(o) { m(c, o); var s = g(c); function c(t) { var i; return d(this, c), i = s.call(this, t), x(v(i), "itemsWrapperRef", void 0), x(v(i), "itemsListRef", void 0), x(v(i), "thumbsRef", void 0), x(v(i), "setItemsWrapperRef", function(e) { i.itemsWrapperRef = e; }), x(v(i), "setItemsListRef", function(e) { i.itemsListRef = e; }), x(v(i), "setThumbsRef", function(e, t) { i.thumbsRef ||= [], i.thumbsRef[t] = e; }), x(v(i), "updateSizes", function() { if (!(!i.props.children || !i.itemsWrapperRef || !i.thumbsRef)) { var t = e.Children.count(i.props.children), r = i.itemsWrapperRef.clientWidth, a = i.props.thumbWidth ? i.props.thumbWidth : (0, n.outerWidth)(i.thumbsRef[0]), o = Math.floor(r / a), s = o < t, c = s ? t - o : 0; i.setState(function(e, t) { return { itemSize: a, visibleItems: o, firstItem: s ? i.getFirstItem(t.selectedItem) : 0, lastPosition: c, showArrows: s }; }); } }), x(v(i), "handleClickItem", function(e, t, n) { if (!S(n) || n.key === "Enter") { var r = i.props.onSelectItem; typeof r == "function" && r(e, t); } }), x(v(i), "onSwipeStart", function() { i.setState({ swiping: !0 }); }), x(v(i), "onSwipeEnd", function() { i.setState({ swiping: !1 }); }), x(v(i), "onSwipeMove", function(t) { var n = t.x; if (!i.state.itemSize || !i.itemsWrapperRef || !i.state.visibleItems) return !1; var a = 0, o = e.Children.count(i.props.children), s = -(i.state.firstItem * 100) / i.state.visibleItems, c = -Math.max(o - i.state.visibleItems, 0) * 100 / i.state.visibleItems; s === a && n > 0 && (n = 0), s === c && n < 0 && (n = 0); var l = s + 100 / (i.itemsWrapperRef.clientWidth / n); return i.itemsListRef && [ "WebkitTransform", "MozTransform", "MsTransform", "OTransform", "transform", "msTransform" ].forEach(function(e) { i.itemsListRef.style[e] = (0, r.default)(l, "%", i.props.axis); }), !0; }), x(v(i), "slideRight", function(e) { i.moveTo(i.state.firstItem - (typeof e == "number" ? e : 1)); }), x(v(i), "slideLeft", function(e) { i.moveTo(i.state.firstItem + (typeof e == "number" ? e : 1)); }), x(v(i), "moveTo", function(e) { e = e < 0 ? 0 : e, e = e >= i.state.lastPosition ? i.state.lastPosition : e, i.setState({ firstItem: e }); }), i.state = { selectedItem: t.selectedItem, swiping: !1, showArrows: !1, firstItem: 0, visibleItems: 0, lastPosition: 0 }, i; } return p(c, [ { key: "componentDidMount", value: function() { this.setupThumbs(); } }, { key: "componentDidUpdate", value: function(e) { this.props.selectedItem !== this.state.selectedItem && this.setState({ selectedItem: this.props.selectedItem, firstItem: this.getFirstItem(this.props.selectedItem) }), this.props.children !== e.children && this.updateSizes(); } }, { key: "componentWillUnmount", value: function() { this.destroyThumbs(); } }, { key: "setupThumbs", value: function() { (0, a.default)().addEventListener("resize", this.updateSizes), (0, a.default)().addEventListener("DOMContentLoaded", this.updateSizes), this.updateSizes(); } }, { key: "destroyThumbs", value: function() { (0, a.default)().removeEventListener("resize", this.updateSizes), (0, a.default)().removeEventListener("DOMContentLoaded", this.updateSizes); } }, { key: "getFirstItem", value: function(e) { var t = e; return e >= this.state.lastPosition && (t = this.state.lastPosition), e < this.state.firstItem + this.state.visibleItems && (t = this.state.firstItem), e < this.state.firstItem && (t = e), t; } }, { key: "renderItems", value: function() { var n = this; return this.props.children.map(function(r, i) { var a = { key: i, ref: function(e) { return n.setThumbsRef(e, i); }, className: t.default.ITEM(!1, i === n.state.selectedItem), onClick: n.handleClickItem.bind(n, i, n.props.children[i]), onKeyDown: n.handleClickItem.bind(n, i, n.props.children[i]), "aria-label": `${n.props.labels.item} ${i + 1}`, style: { width: n.props.thumbWidth } }; return /* @__PURE__ */ e.default.createElement("li", u({}, a, { role: "button", tabIndex: 0 }), r); }); } }, { key: "render", value: function() { var n = this; if (!this.props.children) return null; var a = e.Children.count(this.props.children) > 1, o = this.state.showArrows && this.state.firstItem > 0, s = this.state.showArrows && this.state.firstItem < this.state.lastPosition, c = {}, l = -this.state.firstItem * (this.state.itemSize || 0), u = (0, r.default)(l, "px", this.props.axis), d = this.props.transitionTime + "ms"; return c = { WebkitTransform: u, MozTransform: u, MsTransform: u, OTransform: u, transform: u, msTransform: u, WebkitTransitionDuration: d, MozTransitionDuration: d, MsTransitionDuration: d, OTransitionDuration: d, transitionDuration: d, msTransitionDuration: d }, /* @__PURE__ */ e.default.createElement("div", { className: t.default.CAROUSEL(!1) }, /* @__PURE__ */ e.default.createElement("div", { className: t.default.WRAPPER(!1), ref: this.setItemsWrapperRef }, /* @__PURE__ */ e.default.createElement("button", { type: "button", className: t.default.ARROW_PREV(!o), onClick: function() { return n.slideRight(); }, "aria-label": this.props.labels.leftArrow }), a ? /* @__PURE__ */ e.default.createElement(i.default, { tagName: "ul", className: t.default.SLIDER(!1, this.state.swiping), onSwipeLeft: this.slideLeft, onSwipeRight: this.slideRight, onSwipeMove: this.onSwipeMove, onSwipeStart: this.onSwipeStart, onSwipeEnd: this.onSwipeEnd, style: c, innerRef: this.setItemsListRef, allowMouseEvents: this.props.emulateTouch }, this.renderItems()) : /* @__PURE__ */ e.default.createElement("ul", { className: t.default.SLIDER(!1, this.state.swiping), ref: function(e) { return n.setItemsListRef(e); }, style: c }, this.renderItems()), /* @__PURE__ */ e.default.createElement("button", { type: "button", className: t.default.ARROW_NEXT(!s), onClick: function() { return n.slideLeft(); }, "aria-label": this.props.labels.rightArrow }))); } } ]), c; }(e.Component); return lr.default = C, x(C, "displayName", "Thumbs"), x(C, "defaultProps", { axis: "horizontal", labels: { leftArrow: "previous slide / item", rightArrow: "next slide / item", item: "slide item" }, selectedItem: 0, thumbWidth: 80, transitionTime: 350 }), lr; } var xr = {}, Sr; function Cr() { return Sr ? xr : (Sr = 1, Object.defineProperty(xr, "__esModule", { value: !0 }), xr.default = void 0, xr.default = function() { return document; }, xr); } var wr = {}, Tr; function Er() { if (Tr) return wr; Tr = 1, Object.defineProperty(wr, "__esModule", { value: !0 }), wr.setPosition = wr.getPosition = wr.isKeyboardEvent = wr.defaultStatusFormatter = wr.noop = void 0; var e = J.default, t = n(hr()); function n(e) { return e && e.__esModule ? e : { default: e }; } return wr.noop = function() {}, wr.defaultStatusFormatter = function(e, t) { return `${e} of ${t}`; }, wr.isKeyboardEvent = function(e) { return e ? e.hasOwnProperty("key") : !1; }, wr.getPosition = function(t, n) { if (n.infiniteLoop && ++t, t === 0) return 0; var r = e.Children.count(n.children); if (n.centerMode && n.axis === "horizontal") { var i = -t * n.centerSlidePercentage, a = r - 1; return t && (t !== a || n.infiniteLoop) ? i += (100 - n.centerSlidePercentage) / 2 : t === a && (i += 100 - n.centerSlidePercentage), i; } return -t * 100; }, wr.setPosition = function(e, n) { var r = {}; return [ "WebkitTransform", "MozTransform", "MsTransform", "OTransform", "transform", "msTransform" ].forEach(function(i) { r[i] = (0, t.default)(e, "%", n); }), r; }, wr; } var Dr = {}, Or; function kr() { if (Or) return Dr; Or = 1, Object.defineProperty(Dr, "__esModule", { value: !0 }), Dr.fadeAnimationHandler = Dr.slideStopSwipingHandler = Dr.slideSwipeAnimationHandler = Dr.slideAnimationHandler = void 0; var e = J.default, t = r(hr()), n = Er(); function r(e) { return e && e.__esModule ? e : { default: e }; } function i(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter(function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable; })), n.push.apply(n, r); } return n; } function a(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t] == null ? {} : arguments[t]; t % 2 ? i(Object(n), !0).forEach(function(t) { o(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : i(Object(n)).forEach(function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function o(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } return Dr.slideAnimationHandler = function(r, i) { var o = {}, s = i.selectedItem, c = s, l = e.Children.count(r.children) - 1; if (r.infiniteLoop && (s < 0 || s > l)) return c < 0 ? r.centerMode && r.centerSlidePercentage && r.axis === "horizontal" ? o.itemListStyle = (0, n.setPosition)(-(l + 2) * r.centerSlidePercentage - (100 - r.centerSlidePercentage) / 2, r.axis) : o.itemListStyle = (0, n.setPosition)(-(l + 2) * 100, r.axis) : c > l && (o.itemListStyle = (0, n.setPosition)(0, r.axis)), o; var u = (0, n.getPosition)(s, r), d = (0, t.default)(u, "%", r.axis), f = r.transitionTime + "ms"; return o.itemListStyle = { WebkitTransform: d, msTransform: d, OTransform: d, transform: d }, i.swiping || (o.itemListStyle = a(a({}, o.itemListStyle), {}, { WebkitTransitionDuration: f, MozTransitionDuration: f, OTransitionDuration: f, transitionDuration: f, msTransitionDuration: f })), o; }, Dr.slideSwipeAnimationHandler = function(t, r, i, a) { var o = {}, s = r.axis === "horizontal", c = e.Children.count(r.children), l = 0, u = (0, n.getPosition)(i.selectedItem, r), d = r.infiniteLoop ? (0, n.getPosition)(c - 1, r) - 100 : (0, n.getPosition)(c - 1, r), f = s ? t.x : t.y, p = f; u === l && f > 0 && (p = 0), u === d && f < 0 && (p = 0); var m = u + 100 / (i.itemSize / p), h = Math.abs(f) > r.swipeScrollTolerance; return r.infiniteLoop && h && (i.selectedItem === 0 && m > -100 ? m -= c * 100 : i.selectedItem === c - 1 && m < -c * 100 && (m += c * 100)), (!r.preventMovementUntilSwipeScrollTolerance || h || i.swipeMovementStarted) && (i.swipeMovementStarted || a({ swipeMovementStarted: !0 }), o.itemListStyle = (0, n.setPosition)(m, r.axis)), h && !i.cancelClick && a({ cancelClick: !0 }), o; }, Dr.slideStopSwipingHandler = function(e, t) { var r = (0, n.getPosition)(t.selectedItem, e); return { itemListStyle: (0, n.setPosition)(r, e.axis) }; }, Dr.fadeAnimationHandler = function(e, t) { var n = e.transitionTime + "ms", r = "ease-in-out", i = { position: "absolute", display: "block", zIndex: -2, minHeight: "100%", opacity: 0, top: 0, right: 0, left: 0, bottom: 0, transitionTimingFunction: r, msTransitionTimingFunction: r, MozTransitionTimingFunction: r, WebkitTransitionTimingFunction: r, OTransitionTimingFunction: r }; return t.swiping || (i = a(a({}, i), {}, { WebkitTransitionDuration: n, MozTransitionDuration: n, OTransitionDuration: n, transitionDuration: n, msTransitionDuration: n })), { slideStyle: i, selectedStyle: a(a({}, i), {}, { opacity: 1, position: "relative" }), prevStyle: a({}, i) }; }, Dr; } var Ar; function jr() { if (Ar) return $n; Ar = 1, Object.defineProperty($n, "__esModule", { value: !0 }), $n.default = void 0; var e = u(J.default), t = c(ar()), n = c(cr()), r = c(br()), i = c(Cr()), a = c(vr()), o = Er(), s = kr(); function c(e) { return e && e.__esModule ? e : { default: e }; } function l() { if (typeof WeakMap != "function") return null; var e = /* @__PURE__ */ new WeakMap(); return l = function() { return e; }, e; } function u(e) { if (e && e.__esModule) return e; if (e === null || d(e) !== "object" && typeof e != "function") return { default: e }; var t = l(); if (t && t.has(e)) return t.get(e); var n = {}, r = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var i in e) if (Object.prototype.hasOwnProperty.call(e, i)) { var a = r ? Object.getOwnPropertyDescriptor(e, i) : null; a && (a.get || a.set) ? Object.defineProperty(n, i, a) : n[i] = e[i]; } return n.default = e, t && t.set(e, n), n; } function d(e) { "@babel/helpers - typeof"; return d = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) { return typeof e; } : function(e) { return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }, d(e); } function f() { return f = Object.assign || function(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t]; for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]); } return e; }, f.apply(this, arguments); } function p(e, t) { var n = Object.keys(e); if (Object.getOwnPropertySymbols) { var r = Object.getOwnPropertySymbols(e); t && (r = r.filter(function(t) { return Object.getOwnPropertyDescriptor(e, t).enumerable; })), n.push.apply(n, r); } return n; } function m(e) { for (var t = 1; t < arguments.length; t++) { var n = arguments[t] == null ? {} : arguments[t]; t % 2 ? p(Object(n), !0).forEach(function(t) { T(e, t, n[t]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : p(Object(n)).forEach(function(t) { Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t)); }); } return e; } function h(e, t) { if (!(e instanceof t)) throw TypeError("Cannot call a class as a function"); } function g(e, t) { for (var n = 0; n < t.length; n++) { var r = t[n]; r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r); } } function _(e, t, n) { return t && g(e.prototype, t), e; } function v(e, t) { if (typeof t != "function" && t !== null) throw TypeError("Super expression must either be null or a function"); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: !0, configurable: !0 } }), t && y(e, t); } function y(e, t) { return y = Object.setPrototypeOf || function(e, t) { return e.__proto__ = t, e; }, y(e, t); } function b(e) { var t = C(); return function() { var n = w(e), r; if (t) { var i = w(this).constructor; r = Reflect.construct(n, arguments, i); } else r = n.apply(this, arguments); return x(this, r); }; } function x(e, t) { return t && (d(t) === "object" || typeof t == "function") ? t : S(e); } function S(e) { if (e === void 0) throw ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } function C() { if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1; if (typeof Proxy == "function") return !0; try { return Date.prototype.toString.call(Reflect.construct(Date, [], function() {})), !0; } catch { return !1; } } function w(e) { return w = Object.setPrototypeOf ? Object.getPrototypeOf : function(e) { return e.__proto__ || Object.getPrototypeOf(e); }, w(e); } function T(e, t, n) { return t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e; } var E = /* @__PURE__ */ function(c) { v(u, c); var l = b(u); function u(t) { var n; h(this, u), n = l.call(this, t), T(S(n), "thumbsRef", void 0), T(S(n), "carouselWrapperRef", void 0), T(S(n), "listRef", void 0), T(S(n), "itemsRef", void 0), T(S(n), "timer", void 0), T(S(n), "animationHandler", void 0), T(S(n), "setThumbsRef", function(e) { n.thumbsRef = e; }), T(S(n), "setCarouselWrapperRef", function(e) { n.carouselWrapperRef = e; }), T(S(n), "setListRef", function(e) { n.listRef = e; }), T(S(n), "setItemsRef", function(e, t) { n.itemsRef ||= [], n.itemsRef[t] = e; }), T(S(n), "autoPlay", function() { e.Children.count(n.props.children) <= 1 || (n.clearAutoPlay(), n.props.autoPlay && (n.timer = setTimeout(function() { n.increment(); }, n.props.interval))); }), T(S(n), "clearAutoPlay", function() { n.timer && clearTimeout(n.timer); }), T(S(n), "resetAutoPlay", function() { n.clearAutoPlay(), n.autoPlay(); }), T(S(n), "stopOnHover", function() { n.setState({ isMouseEntered: !0 }, n.clearAutoPlay); }), T(S(n), "startOnLeave", function() { n.setState({ isMouseEntered: !1 }, n.autoPlay); }), T(S(n), "isFocusWithinTheCarousel", function() { return n.carouselWrapperRef ? !!((0, i.default)().activeElement === n.carouselWrapperRef || n.carouselWrapperRef.contains((0, i.default)().activeElement)) : !1; }), T(S(n), "navigateWithKeyboard", function(e) { if (n.isFocusWithinTheCarousel()) { var t = n.props.axis === "horizontal", r = { ArrowUp: 38, ArrowRight: 39, ArrowDown: 40, ArrowLeft: 37 }, i = t ? r.ArrowRight : r.ArrowDown, a = t ? r.ArrowLeft : r.ArrowUp; i === e.keyCode ? n.increment() : a === e.keyCode && n.decrement(); } }), T(S(n), "updateSizes", function() { if (!(!n.state.initialized || !n.itemsRef || n.itemsRef.length === 0)) { var e = n.props.axis === "horizontal", t = n.itemsRef[0]; if (t) { var r = e ? t.clientWidth : t.clientHeight; n.setState({ itemSize: r }), n.thumbsRef && n.thumbsRef.updateSizes(); } } }), T(S(n), "setMountState", function() { n.setState({ hasMount: !0 }), n.updateSizes(); }), T(S(n), "handleClickItem", function(t, r) { if (e.Children.count(n.props.children) !== 0) { if (n.state.cancelClick) { n.setState({ cancelClick: !1 }); return; } n.props.onClickItem(t, r), t !== n.state.selectedItem && n.setState({ selectedItem: t }); } }), T(S(n), "handleOnChange", function(t, r) { e.Children.count(n.props.children) <= 1 || n.props.onChange(t, r); }), T(S(n), "handleClickThumb", function(e, t) { n.props.onClickThumb(e, t), n.moveTo(e); }), T(S(n), "onSwipeStart", function(e) { n.setState({ swiping: !0 }), n.props.onSwipeStart(e); }), T(S(n), "onSwipeEnd", function(e) { n.setState({ swiping: !1, cancelClick: !1, swipeMovementStarted: !1 }), n.props.onSwipeEnd(e), n.clearAutoPlay(), n.state.autoPlay && n.autoPlay(); }), T(S(n), "onSwipeMove", function(e, t) { n.props.onSwipeMove(t); var r = n.props.swipeAnimationHandler(e, n.props, n.state, n.setState.bind(S(n))); return n.setState(m({}, r)), !!Object.keys(r).length; }), T(S(n), "decrement", function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1; n.moveTo(n.state.selectedItem - (typeof e == "number" ? e : 1)); }), T(S(n), "increment", function() { var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 1; n.moveTo(n.state.selectedItem + (typeof e == "number" ? e : 1)); }), T(S(n), "moveTo", function(t) { if (typeof t == "number") { var r = e.Children.count(n.props.children) - 1; t < 0 && (t = n.props.infiniteLoop ? r : 0), t > r && (t = n.props.infiniteLoop ? 0 : r), n.selectItem({ selectedItem: t }), n.state.autoPlay && n.state.isMouseEntered === !1 && n.resetAutoPlay(); } }), T(S(n), "onClickNext", function() { n.increment(1); }), T(S(n), "onClickPrev", function() { n.decrement(1); }), T(S(n), "onSwipeForward", function() { n.increment(1), n.props.emulateTouch && n.setState({ cancelClick: !0 }); }), T(S(n), "onSwipeBackwards", function() { n.decrement(1), n.props.emulateTouch && n.setState({ cancelClick: !0 }); }), T(S(n), "changeItem", function(e) { return function(t) { (!(0, o.isKeyboardEvent)(t) || t.key === "Enter") && n.moveTo(e); }; }), T(S(n), "selectItem", function(t) { n.setState(m({ previousItem: n.state.selectedItem }, t), function() { n.setState(n.animationHandler(n.props, n.state)); }), n.handleOnChange(t.selectedItem, e.Children.toArray(n.props.children)[t.selectedItem]); }), T(S(n), "getInitialImage", function() { var e = n.props.selectedItem, t = n.itemsRef && n.itemsRef[e]; return (t && t.getElementsByTagName("img") || [])[0]; }), T(S(n), "getVariableItemHeight", function(e) { var t = n.itemsRef && n.itemsRef[e]; if (n.state.hasMount && t && t.children.length) { var r = t.children[0].getElementsByTagName("img") || []; if (r.length > 0) { var i = r[0]; i.complete || i.addEventListener("load", function e() { n.forceUpdate(), i.removeEventListener("load", e); }); } var a = (r[0] || t.children[0]).clientHeight; return a > 0 ? a : null; } return null; }); var r = { initialized: !1, previousItem: t.selectedItem, selectedItem: t.selectedItem, hasMount: !1, isMouseEntered: !1, autoPlay: t.autoPlay, swiping: !1, swipeMovementStarted: !1, cancelClick: !1, itemSize: 1, itemListStyle: {}, slideStyle: {}, selectedStyle: {}, prevStyle: {} }; return n.animationHandler = typeof t.animationHandler == "function" && t.animationHandler || t.animationHandler === "fade" && s.fadeAnimationHandler || s.slideAnimationHandler, n.state = m(m({}, r), n.animationHandler(t, r)), n; } return _(u, [ { key: "componentDidMount", value: function() { this.props.children && this.setupCarousel(); } }, { key: "componentDidUpdate", value: function(e, t) { !e.children && this.props.children && !this.state.initialized && this.setupCarousel(), !e.autoFocus && this.props.autoFocus && this.forceFocus(), t.swiping && !this.state.swiping && this.setState(m({}, this.props.stopSwipingHandler(this.props, this.state))), (e.selectedItem !== this.props.selectedItem || e.centerMode !== this.props.centerMode) && (this.updateSizes(), this.moveTo(this.props.selectedItem)), e.autoPlay !== this.props.autoPlay && (this.props.autoPlay ? this.setupAutoPlay() : this.destroyAutoPlay(), this.setState({ autoPlay: this.props.autoPlay })); } }, { key: "componentWillUnmount", value: function() { this.destroyCarousel(); } }, { key: "setupCarousel", value: function() { var t = this; this.bindEvents(), this.state.autoPlay && e.Children.count(this.props.children) > 1 && this.setupAutoPlay(), this.props.autoFocus && this.forceFocus(), this.setState({ initialized: !0 }, function() { var e = t.getInitialImage(); e && !e.complete ? e.addEventListener("load", t.setMountState) : t.setMountState(); }); } }, { key: "destroyCarousel", value: function() { this.state.initialized && (this.unbindEvents(), this.destroyAutoPlay()); } }, { key: "setupAutoPlay", value: function() { this.autoPlay(); var e = this.carouselWrapperRef; this.props.stopOnHover && e && (e.addEventListener("mouseenter", this.stopOnHover), e.addEventListener("mouseleave", this.startOnLeave)); } }, { key: "destroyAutoPlay", value: function() { this.clearAutoPlay(); var e = this.carouselWrapperRef; this.props.stopOnHover && e && (e.removeEventListener("mouseenter", this.stopOnHover), e.removeEventListener("mouseleave", this.startOnLeave)); } }, { key: "bindEvents", value: function() { (0, a.default)().addEventListener("resize", this.updateSizes), (0, a.defa