! function(e, t) { "object" == typeof exports && "object" == typeof module ? module.exports = t() : "function" == typeof define && define.amd ? define([], t) : "object" == typeof exports ? exports.Picker = t() : e.Picker = t() }(this, function() { return function(e) { function t(n) { if (i[n]) return i[n].exports; var r = i[n] = { exports: {}, id: n, loaded: !1 }; return e[n].call(r.exports, r, r.exports, t), r.loaded = !0, r.exports } var i = {}; return t.m = e, t.c = i, t.p = "", t(0) }([function(e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e } } t.__esModule = !0; var r = i(1), o = n(r); o. default.version = "1.1.2", t. default = o. default, e.exports = t. default }, function(e, t, i) { "use strict"; function n(e) { return e && e.__esModule ? e : { default: e } } function r(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function o(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function s(e, t) { if ("function" != typeof t && null !== t) throw new 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) } t.__esModule = !0; var a = function() { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) } } return function(t, i, n) { return i && e(t.prototype, i), n && e(t, n), t } }(), l = i(2), h = n(l), c = i(3), p = n(c), u = i(4), f = i(5), d = i(6), m = n(d), v = i(14), g = n(v); i(15); var y = function(e) { function t(e) { r(this, t); var i = o(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this)); return i.options = { data: [], title: "", selectedIndex: null, showCls: "show" }, (0, u.extend)(i.options, e), i.data = i.options.data, i.pickerEl = (0, f.createDom)((0, m. default)({ data: i.data, title: i.options.title })), document.body.appendChild(i.pickerEl), i.maskEl = i.pickerEl.getElementsByClassName("mask-hook")[0], i.wheelEl = i.pickerEl.getElementsByClassName("wheel-hook"), i.panelEl = i.pickerEl.getElementsByClassName("panel-hook")[0], i.confirmEl = i.pickerEl.getElementsByClassName("confirm-hook")[0], i.cancelEl = i.pickerEl.getElementsByClassName("cancel-hook")[0], i.scrollEl = i.pickerEl.getElementsByClassName("wheel-scroll-hook"), i._init(), i } return s(t, e), a(t, [{ key: "_init", value: function() { if (this.selectedIndex = [], this.selectedVal = [], this.options.selectedIndex) this.selectedIndex = this.options.selectedIndex; else for (var e = 0; e < this.data.length; e++) this.selectedIndex[e] = 0; this._bindEvent(); } }, { key: "_bindEvent", value: function() { var e = this; (0, f.addEvent)(this.pickerEl, "touchmove", function(e) { e.preventDefault() }), (0, f.addEvent)(this.confirmEl, "click", function() { console.log(e.selectedIndex+"..."); e.hide(); for (var t = !1, i = 0; i < e.data.length; i++) { var n = e.wheels[i].getSelectedIndex(); e.selectedIndex[i] = n; var r = null; e.data[i].length && (r = e.data[i][n].value), e.selectedVal[i] !== r && (t = !0), e.selectedVal[i] = r } $("#select_demo").val(e.selectedVal[0]+"-"+e.selectedVal[1]+"-"+e.selectedVal[2]); e.trigger("picker.select", e.selectedVal, e.selectedIndex), t && e.trigger("picker.valuechange", e.selectedVal, e.selectedIndex) }), (0, f.addEvent)(this.cancelEl, "click", function() { e.hide(), e.trigger("picker.cancel") }) } }, { key: "_createWheel", value: function(e, t) { var i = this; return this.wheels[t] = new h. default (e[t], { wheel: !0, selectedIndex: this.selectedIndex[t] }), function(e) { i.wheels[e].on("scrollEnd", function() { var n = i.wheels[e].getSelectedIndex(); i.selectedIndex[t] !== n && (i.selectedIndex[t] = n, i.trigger("picker.change", e, n)) }) }(t), this.wheels[t] } }, { key: "show", value: function(e) { var t = this; this.pickerEl.style.display = "block"; var i = this.options.showCls; window.setTimeout(function() { if ((0, f.addClass)(t.maskEl, i), (0, f.addClass)(t.panelEl, i), t.wheels) for (var n = 0; n < t.data.length; n++) t.wheels[n].enable(), t.wheels[n].wheelTo(t.selectedIndex[n]); else { t.wheels = []; for (var r = 0; r < t.data.length; r++) t._createWheel(t.wheelEl, r) } e && e() }, 0) } }, { key: "hide", value: function() { var e = this, t = this.options.showCls; (0, f.removeClass)(this.maskEl, t), (0, f.removeClass)(this.panelEl, t), window.setTimeout(function() { e.pickerEl.style.display = "none"; for (var t = 0; t < e.data.length; t++) e.wheels[t].disable() }, 500) } }, { key: "refillColumn", value: function(e, t) { var i = this.scrollEl[e], n = this.wheels[e]; if (i && n) { var r = this.data[e]; this.data[e] = t, i.innerHTML = (0, g. default)(t); var o = n.getSelectedIndex(), s = 0; if (r.length) for (var a = r[o].value, l = 0; l < t.length; l++) if (t[l].value === a) { s = l; break } return this.selectedIndex[e] = s, n.refresh(), n.wheelTo(s), s } } }, { key: "refill", value: function(e) { var t = this, i = []; return e.length ? (e.forEach(function(e, n) { i[n] = t.refillColumn(n, e) }), i) : i } }, { key: "scrollColumn", value: function(e, t) { var i = this.wheels[e]; i.wheelTo(t) } }]), t }(p. default); t. default = y, e.exports = t. default }, function(e, t, i) { ! function(t, i) { e.exports = i() }(this, function() { return function(e) { function t(n) { if (i[n]) return i[n].exports; var r = i[n] = { exports: {}, id: n, loaded: !1 }; return e[n].call(r.exports, r, r.exports, t), r.loaded = !0, r.exports } var i = {}; return t.m = e, t.c = i, t.p = "/assets/", t(0) }([function(e, t, i) { "use strict"; var n = i(1); n.BScroll.Version = "0.1.14", e.exports = n.BScroll }, function(e, t, i) { "use strict"; function n(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } function r(e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || "object" != typeof t && "function" != typeof t ? e : t } function o(e, t) { if ("function" != typeof t && null !== t) throw new 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) } Object.defineProperty(t, "__esModule", { value: !0 }), t.BScroll = void 0; var s = function() { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) } } return function(t, i, n) { return i && e(t.prototype, i), n && e(t, n), t } }(), a = i(2), l = 1; t.BScroll = function(e) { function t(e, i) { n(this, t); var o = r(this, Object.getPrototypeOf(t).call(this)); return o.wrapper = "string" == typeof e ? document.querySelector(e) : e, o.scroller = o.wrapper.children[0], o.scrollerStyle = o.scroller.style, o.options = { startX: 0, startY: 0, scrollY: !0, directionLockThreshold: 5, momentum: !0, bounce: !0, selectedIndex: 0, rotate: 25, wheel: !1, snap: !1, snapLoop: !1, snapThreshold: .1, swipeTime: 2500, bounceTime: 700, adjustTime: 400, swipeBounceTime: 1200, deceleration: .001, momentumLimitTime: 300, momentumLimitDistance: 15, resizePolling: 60, preventDefault: !0, preventDefaultException: { tagName: /^(INPUT|TEXTAREA|BUTTON|SELECT)$/ }, HWCompositing: !0, useTransition: !0, useTransform: !0 }, (0, a.extend)(o.options, i), o.translateZ = o.options.HWCompositing && a.hasPerspective ? " translateZ(0)" : "", o.options.useTransition = o.options.useTransition && a.hasTransition, o.options.useTransform = o.options.useTransform && a.hasTransform, o.options.eventPassthrough = o.options.eventPassthrough === !0 ? "vertical" : o.options.eventPassthrough, o.options.preventDefault = !o.options.eventPassthrough && o.options.preventDefault, o.options.scrollX = "horizontal" !== o.options.eventPassthrough && o.options.scrollX, o.options.scrollY = "vertical" !== o.options.eventPassthrough && o.options.scrollY, o.options.freeScroll = o.options.freeScroll && !o.options.eventPassthrough, o.options.directionLockThreshold = o.options.eventPassthrough ? 0 : o.options.directionLockThreshold, o.options.tap === !0 && (o.options.tap = "tap"), o._init(), o.options.snap && o._initSnap(), o.refresh(), o.options.snap || o.scrollTo(o.options.startX, o.options.startY), o.enable(), o } return o(t, e), s(t, [{ key: "_init", value: function() { this.x = 0, this.y = 0, this.directionX = 0, this.directionY = 0, this._addEvents() } }, { key: "_initSnap", value: function() { var e = this; if (this.currentPage = {}, this.options.snapLoop) { var t = this.scroller.children; t.length > 0 && ((0, a.prepend)(t[t.length - 1].cloneNode(!0), this.scroller), this.scroller.appendChild(t[1].cloneNode(!0))) } "string" == typeof this.options.snap && (this.options.snap = this.scroller.querySelectorAll(this.options.snap)), this.on("refresh", function() { if (e.pages = [], e.wrapperWidth && e.wrapperHeight && e.scrollerWidth && e.scrollerHeight) { var t = e.options.snapStepX || e.wrapperWidth, i = e.options.snapStepY || e.wrapperHeight, n = 0, r = void 0, o = void 0, s = void 0, l = 0, h = void 0, c = 0, p = void 0, u = void 0, f = void 0; if (e.options.snap === !0) for (o = Math.round(t / 2), s = Math.round(i / 2); n > -e.scrollerWidth;) { for (e.pages[l] = [], h = 0, r = 0; r > -e.scrollerHeight;) e.pages[l][h] = { x: Math.max(n, e.maxScrollX), y: Math.max(r, e.maxScrollY), width: t, height: i, cx: n - o, cy: r - s }, r -= i, h++; n -= t, l++ } else for (u = e.options.snap, h = u.length, p = -1; l < h; l++) f = (0, a.getRect)(u[l]), (0 === l || f.left <= (0, a.getRect)(u[l - 1]).left) && (c = 0, p++), e.pages[c] || (e.pages[c] = []), n = Math.max(-f.left, e.maxScrollX), r = Math.max(-f.top, e.maxScrollY), o = n - Math.round(f.width / 2), s = r - Math.round(f.height / 2), e.pages[c][p] = { x: n, y: r, width: f.width, height: f.height, cx: o, cy: s }, n > e.maxScrollX && c++; var d = e.options.snapLoop ? 1 : 0; e.goToPage(e.currentPage.pageX || d, e.currentPage.pageY || 0, 0), e.options.snapThreshold % 1 === 0 ? (e.snapThresholdX = e.options.snapThreshold, e.snapThresholdY = e.options.snapThreshold) : (e.snapThresholdX = Math.round(e.pages[e.currentPage.pageX][e.currentPage.pageY].width * e.options.snapThreshold), e.snapThresholdY = Math.round(e.pages[e.currentPage.pageX][e.currentPage.pageY].height * e.options.snapThreshold)) } }), this.on("scrollEnd", function() { e.options.snapLoop && (0 === e.currentPage.pageX && e.goToPage(e.pages.length - 2, e.currentPage.pageY, 0), e.currentPage.pageX === e.pages.length - 1 && e.goToPage(1, e.currentPage.pageY, 0)) }), this.on("flick", function() { var t = e.options.snapSpeed || Math.max(Math.max(Math.min(Math.abs(e.x - e.startX), 1e3), Math.min(Math.abs(e.y - e.startY), 1e3)), 300); e.goToPage(e.currentPage.pageX + e.directionX, e.currentPage.pageY + e.directionY, t) }) } }, { key: "_nearestSnap", value: function(e, t) { if (!this.pages.length) return { x: 0, y: 0, pageX: 0, pageY: 0 }; var i = 0; if (Math.abs(e - this.absStartX) < this.snapThresholdX && Math.abs(t - this.absStartY) < this.snapThresholdY) return this.currentPage; e > 0 ? e = 0 : e < this.maxScrollX && (e = this.maxScrollX), t > 0 ? t = 0 : t < this.maxScrollY && (t = this.maxScrollY); for (var n = this.pages.length; i < n; i++) if (e >= this.pages[i][0].cx) { e = this.pages[i][0].x; break } n = this.pages[i].length; for (var r = 0; r < n; r++) if (t >= this.pages[0][r].cy) { t = this.pages[0][r].y; break } return i === this.currentPage.pageX && (i += this.directionX, i < 0 ? i = 0 : i >= this.pages.length && (i = this.pages.length - 1), e = this.pages[i][0].x), r === this.currentPage.pageY && (r += this.directionY, r < 0 ? r = 0 : r >= this.pages[0].length && (r = this.pages[0].length - 1), t = this.pages[0][r].y), { x: e, y: t, pageX: i, pageY: r } } }, { key: "_addEvents", value: function() { var e = a.addEvent; this._handleEvents(e) } }, { key: "_removeEvents", value: function() { var e = a.removeEvent; this._handleEvents(e) } }, { key: "_handleEvents", value: function(e) { var t = this.options.bindToWrapper ? this.wrapper : window; e(window, "orientationchange", this), e(window, "resize", this), this.options.click && e(this.wrapper, "click", this), this.options.disableMouse || (e(this.wrapper, "mousedown", this), e(t, "mousemove", this), e(t, "mousecancel", this), e(t, "mouseup", this)), a.hasTouch && !this.options.disableTouch && (e(this.wrapper, "touchstart", this), e(t, "touchmove", this), e(t, "touchcancel", this), e(t, "touchend", this)), e(this.scroller, a.style.transitionEnd, this) } }, { key: "_start", value: function(e) { var t = a.eventType[e.type]; if ((t === l || 0 === e.button) && this.enabled && (!this.initiated || this.initiated === t)) { if (this.initiated = t, !this.options.preventDefault || a.isBadAndroid || (0, a.preventDefaultException)(e.target, this.options.preventDefaultException) || e.preventDefault(), this.moved = !1, this.distX = 0, this.distY = 0, this.directionX = 0, this.directionY = 0, this.directionLocked = 0, this._transitionTime(), this.startTime = +new Date, this.options.wheel && (this.target = e.target), this.options.useTransition && this.isInTransition) { this.isInTransition = !1; var i = this.getComputedPosition(); this._translate(i.x, i.y), this.options.wheel ? this.target = this.items[Math.round(-i.y / this.itemHeight)] : this.trigger("scrollEnd") } var n = e.touches ? e.touches[0] : e; this.startX = this.x, this.startY = this.y, this.absStartX = this.x, this.absStartY = this.y, this.pointX = n.pageX, this.pointY = n.pageY, this.trigger("beforeScrollStart") } } }, { key: "_move", value: function(e) { if (this.enabled && a.eventType[e.type] === this.initiated) { this.options.preventDefault && e.preventDefault(); var t = e.touches ? e.touches[0] : e, i = t.pageX - this.pointX, n = t.pageY - this.pointY; this.pointX = t.pageX, this.pointY = t.pageY, this.distX += i, this.distY += n; var r = Math.abs(this.distX), o = Math.abs(this.distY), s = +new Date; if (!(s - this.endTime > this.options.momentumLimitTime && o < this.options.momentumLimitDistance && r < this.options.momentumLimitDistance)) { if (this.directionLocked || this.options.freeScroll || (r > o + this.options.directionLockThreshold ? this.directionLocked = "h" : o >= r + this.options.directionLockThreshold ? this.directionLocked = "v" : this.directionLocked = "n"), "h" === this.directionLocked) { if ("vertical" === this.options.eventPassthrough) e.preventDefault(); else if ("horizontal" === this.options.eventPassthrough) return void(this.initiated = !1); n = 0 } else if ("v" === this.directionLocked) { if ("horizontal" === this.options.eventPassthrough) e.preventDefault(); else if ("vertical" === this.options.eventPassthrough) return void(this.initiated = !1); i = 0 } i = this.hasHorizontalScroll ? i : 0, n = this.hasVerticalScroll ? n : 0; var l = this.x + i, h = this.y + n; (l > 0 || l < this.maxScrollX) && (l = this.options.bounce ? this.x + i / 3 : l > 0 ? 0 : this.maxScrollX), (h > 0 || h < this.maxScrollY) && (h = this.options.bounce ? this.y + n / 3 : h > 0 ? 0 : this.maxScrollY), this.directionX = i > 0 ? -1 : i < 0 ? 1 : 0, this.directionY = n > 0 ? -1 : n < 0 ? 1 : 0, this.moved || (this.moved = !0, this.trigger("scrollStart")), this._translate(l, h), s - this.startTime > this.options.momentumLimitTime && (this.startTime = s, this.startX = this.x, this.startY = this.y, 1 === this.options.probeType && this.trigger("scroll", { x: this.x, y: this.y })), this.options.probeType > 1 && this.trigger("scroll", { x: this.x, y: this.y }); var c = document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft, p = document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop, u = this.pointX - c, f = this.pointY - p; (u > document.documentElement.clientWidth - this.options.momentumLimitDistance || u < this.options.momentumLimitDistance || f < this.options.momentumLimitDistance || f > document.documentElement.clientHeight - this.options.momentumLimitDistance) && this._end(e) } } } }, { key: "_end", value: function(e) { if (this.enabled && a.eventType[e.type] === this.initiated && (this.initiated = !1, this.options.preventDefault && !(0, a.preventDefaultException)(e.target, this.options.preventDefaultException) && e.preventDefault(), this.trigger("touchend", { x: this.x, y: this.y }), !this.resetPosition(this.options.bounceTime, a.ease.bounce))) { this.isInTransition = !1; var t = Math.round(this.x), i = Math.round(this.y); if (!this.moved) { if (this.options.wheel) { if (this.target && "wheel-scroll" === this.target.className) { var n = Math.abs(Math.round(i / this.itemHeight)), r = Math.round((this.pointY + (0, a.offset)(this.target).top - this.itemHeight / 2) / this.itemHeight); this.target = this.items[n + r] } this.scrollToElement(this.target, this.options.adjustTime, !0, !0, a.ease.swipe) } else this.options.tap && (0, a.tap)(e, this.options.tap), this.options.click && (0, a.click)(e); return void this.trigger("scrollCancel") } this.scrollTo(t, i), this.endTime = +new Date; var o = this.endTime - this.startTime, s = Math.abs(t - this.startX), l = Math.abs(i - this.startY); if (this._events.flick && o < this.options.momentumLimitTime && s < this.options.momentumLimitDistance && l < this.options.momentumLimitDistance) return void this.trigger("flick"); var h = 0; if (this.options.momentum && o < this.options.momentumLimitTime && (l > this.options.momentumLimitDistance || s > this.options.momentumLimitDistance)) { var c = this.hasHorizontalScroll ? (0, a.momentum)(this.x, this.startX, o, this.maxScrollX, this.options.bounce ? this.wrapperWidth : 0, this.options) : { destination: t, duration: 0 }, p = this.hasVerticalScroll ? (0, a.momentum)(this.y, this.startY, o, this.maxScrollY, this.options.bounce ? this.wrapperHeight : 0, this.options) : { destination: i, duration: 0 }; t = c.destination, i = p.destination, h = Math.max(c.duration, p.duration), this.isInTransition = 1 } else this.options.wheel && (i = Math.round(i / this.itemHeight) * this.itemHeight, h = this.options.adjustTime); var u = a.ease.swipe; if (this.options.snap) { var f = this._nearestSnap(t, i); this.currentPage = f, h = this.options.snapSpeed || Math.max(Math.max(Math.min(Math.abs(t - f.x), 1e3), Math.min(Math.abs(i - f.y), 1e3)), 300), t = f.x, i = f.y, this.directionX = 0, this.directionY = 0, u = a.ease.bounce } if (t !== this.x || i !== this.y) return (t > 0 || t < this.maxScrollX || i > 0 || i < this.maxScrollY) && (u = a.ease.swipeBounce), void this.scrollTo(t, i, h, u); this.options.wheel && (this.selectedIndex = 0 | Math.abs(this.y / this.itemHeight)), this.trigger("scrollEnd") } } }, { key: "_resize", value: function() { var e = this; this.enabled && (clearTimeout(this.resizeTimeout), this.resizeTimeout = setTimeout(function() { e.refresh() }, this.options.resizePolling)) } }, { key: "_startProbe", value: function() { function e() { var i = t.getComputedPosition(); t.trigger("scroll", i), t.isInTransition && (t.probeTimer = (0, a.requestAnimationFrame)(e)) }(0, a.cancelAnimationFrame)(this.probeTimer), this.probeTimer = (0, a.requestAnimationFrame)(e); var t = this } }, { key: "_transitionTime", value: function() { var e = this, t = arguments.length <= 0 || void 0 === arguments[0] ? 0 : arguments[0]; if (this.scrollerStyle[a.style.transitionDuration] = t + "ms", this.options.wheel && !a.isBadAndroid) for (var i = 0; i < this.items.length; i++) this.items[i].style[a.style.transitionDuration] = t + "ms"; !t && a.isBadAndroid && (this.scrollerStyle[a.style.transitionDuration] = "0.001s", (0, a.requestAnimationFrame)(function() { "0.0001ms" === e.scrollerStyle[a.style.transitionDuration] && (e.scrollerStyle[a.style.transitionDuration] = "0s") })) } }, { key: "_transitionTimingFunction", value: function(e) { if (this.scrollerStyle[a.style.transitionTimingFunction] = e, this.options.wheel && !a.isBadAndroid) for (var t = 0; t < this.items.length; t++) this.items[t].style[a.style.transitionTimingFunction] = e } }, { key: "_transitionEnd", value: function(e) { e.target === this.scroller && this.isInTransition && (this._transitionTime(), this.resetPosition(this.options.bounceTime, a.ease.bounce) || (this.isInTransition = !1, this.trigger("scrollEnd"))) } }, { key: "_translate", value: function(e, t) { if (this.options.useTransform ? this.scrollerStyle[a.style.transform] = "translate(" + e + "px," + t + "px)" + this.translateZ : (e = Math.round(e), t = Math.round(t), this.scrollerStyle.left = e + "px", this.scrollerStyle.top = t + "px"), this.options.wheel && !a.isBadAndroid) for (var i = 0; i < this.items.length; i++) { var n = this.options.rotate * (t / this.itemHeight + i); this.items[i].style[a.style.transform] = "rotateX(" + n + "deg)" } this.x = e, this.y = t } }, { key: "enable", value: function() { this.enabled = !0 } }, { key: "disable", value: function() { this.enabled = !1 } }, { key: "refresh", value: function() { this.wrapper.offsetHeight; this.wrapperWidth = parseInt(this.wrapper.style.width) || this.wrapper.clientWidth, this.wrapperHeight = parseInt(this.wrapper.style.height) || this.wrapper.clientHeight, this.scrollerWidth = parseInt(this.scroller.style.width) || this.scroller.clientWidth, this.scrollerHeight = parseInt(this.scroller.style.height) || this.scroller.clientHeight, this.options.wheel ? (this.items = this.scroller.children, this.options.itemHeight = this.itemHeight = this.items.length ? this.items[0].clientHeight : 0, void 0 === this.selectedIndex && (this.selectedIndex = this.options.selectedIndex), this.options.startY = -this.selectedIndex * this.itemHeight, this.maxScrollX = 0, this.maxScrollY = -this.itemHeight * (this.items.length - 1)) : (this.maxScrollX = this.wrapperWidth - this.scrollerWidth, this.maxScrollY = this.wrapperHeight - this.scrollerHeight), this.hasHorizontalScroll = this.options.scrollX && this.maxScrollX < 0, this.hasVerticalScroll = this.options.scrollY && this.maxScrollY < 0, this.hasHorizontalScroll || (this.maxScrollX = 0, this.scrollerWidth = this.wrapperWidth), this.hasVerticalScroll || (this.maxScrollY = 0, this.scrollerHeight = this.wrapperHeight), this.endTime = 0, this.directionX = 0, this.directionY = 0, this.wrapperOffset = (0, a.offset)(this.wrapper), this.trigger("refresh"), this.resetPosition() } }, { key: "resetPosition", value: function() { var e = arguments.length <= 0 || void 0 === arguments[0] ? 0 : arguments[0], t = arguments.length <= 1 || void 0 === arguments[1] ? a.ease.bounce : arguments[1], i = this.x; !this.hasHorizontalScroll || i > 0 ? i = 0 : i < this.maxScrollX && (i = this.maxScrollX); var n = this.y; return !this.hasVerticalScroll || n > 0 ? n = 0 : n < this.maxScrollY && (n = this.maxScrollY), (i !== this.x || n !== this.y) && (this.scrollTo(i, n, e, t), !0) } }, { key: "wheelTo", value: function(e) { this.options.wheel && (this.y = -e * this.itemHeight, this.scrollTo(0, this.y)) } }, { key: "scrollBy", value: function(e, t) { var i = arguments.length <= 2 || void 0 === arguments[2] ? 0 : arguments[2], n = arguments.length <= 3 || void 0 === arguments[3] ? a.ease.bounce : arguments[3]; e = this.x + e, t = this.y + t, this.scrollTo(e, t, i, n) } }, { key: "scrollTo", value: function(e, t, i) { var n = arguments.length <= 3 || void 0 === arguments[3] ? a.ease.bounce : arguments[3]; this.isInTransition = this.options.useTransition && i > 0 && (e !== this.x || t !== this.y), i && !this.options.useTransition || (this._transitionTimingFunction(n.style), this._transitionTime(i), this._translate(e, t), i && 3 === this.options.probeType && this._startProbe(), this.options.wheel && (t > 0 ? this.selectedIndex = 0 : t < this.maxScrollY ? this.selectedIndex = this.items.length - 1 : this.selectedIndex = 0 | Math.abs(t / this.itemHeight))) } }, { key: "getSelectedIndex", value: function() { return this.options.wheel && this.selectedIndex } }, { key: "getCurrentPage", value: function() { return this.options.snap && this.currentPage } }, { key: "scrollToElement", value: function(e, t, i, n, r) { if (e && (e = e.nodeType ? e : this.scroller.querySelector(e), !this.options.wheel || "wheel-item" === e.className)) { var o = (0, a.offset)(e); o.left -= this.wrapperOffset.left, o.top -= this.wrapperOffset.top, i === !0 && (i = Math.round(e.offsetWidth / 2 - this.wrapper.offsetWidth / 2)), n === !0 && (n = Math.round(e.offsetHeight / 2 - this.wrapper.offsetHeight / 2)), o.left -= i || 0, o.top -= n || 0, o.left = o.left > 0 ? 0 : o.left < this.maxScrollX ? this.maxScrollX : o.left, o.top = o.top > 0 ? 0 : o.top < this.maxScrollY ? this.maxScrollY : o.top, this.options.wheel && (o.top = Math.round(o.top / this.itemHeight) * this.itemHeight), t = void 0 === t || null === t || "auto" === t ? Math.max(Math.abs(this.x - o.left), Math.abs(this.y - o.top)) : t, this.scrollTo(o.left, o.top, t, r) } } }, { key: "getComputedPosition", value: function() { var e = window.getComputedStyle(this.scroller, null), t = void 0, i = void 0; return this.options.useTransform ? (e = e[a.style.transform].split(")")[0].split(", "), t = +(e[12] || e[4]), i = +(e[13] || e[5])) : (t = +e.left.replace(/[^-\d.]/g, ""), i = +e.top.replace(/[^-\d.]/g, "")), { x: t, y: i } } }, { key: "goToPage", value: function(e, t, i) { var n = arguments.length <= 3 || void 0 === arguments[3] ? a.ease.bounce : arguments[3]; e >= this.pages.length ? e = this.pages.length - 1 : e < 0 && (e = 0), t >= this.pages[e].length ? t = this.pages[e].length - 1 : t < 0 && (t = 0); var r = this.pages[e][t].x, o = this.pages[e][t].y; i = void 0 === i ? this.options.snapSpeed || Math.max(Math.max(Math.min(Math.abs(r - this.x), 1e3), Math.min(Math.abs(o - this.y), 1e3)), 300) : i, this.currentPage = { x: r, y: o, pageX: e, pageY: t }, this.scrollTo(r, o, i, n) } }, { key: "next", value: function(e, t) { var i = this.currentPage.pageX, n = this.currentPage.pageY; i++, i >= this.pages.length && this.hasVerticalScroll && (i = 0, n++), this.goToPage(i, n, e, t) } }, { key: "prev", value: function(e, t) { var i = this.currentPage.pageX, n = this.currentPage.pageY; i--, i < 0 && this.hasVerticalScroll && (i = 0, n--), this.goToPage(i, n, e, t) } }, { key: "destroy", value: function() { this._removeEvents(), this.trigger("destroy") } }, { key: "handleEvent", value: function(e) { switch (e.type) { case "touchstart": case "mousedown": this._start(e); break; case "touchmove": case "mousemove": this._move(e); break; case "touchend": case "mouseup": case "touchcancel": case "mousecancel": this._end(e); break; case "orientationchange": case "resize": this._resize(); break; case "transitionend": case "webkitTransitionEnd": case "oTransitionEnd": case "MSTransitionEnd": this._transitionEnd(e); break; case "click": !this.enabled || e._constructed || /(SELECT|INPUT|TEXTAREA)/i.test(e.target.tagName) || (e.preventDefault(), e.stopPropagation()) } } }]), t }(a.EventEmitter) }, function(e, t, i) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); var n = i(3); Object.keys(n).forEach(function(e) { "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, { enumerable: !0, get: function() { return n[e] } }) }); var r = i(4); Object.keys(r).forEach(function(e) { "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, { enumerable: !0, get: function() { return r[e] } }) }); var o = i(5); Object.keys(o).forEach(function(e) { "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, { enumerable: !0, get: function() { return o[e] } }) }); var s = i(6); Object.keys(s).forEach(function(e) { "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, { enumerable: !0, get: function() { return s[e] } }) }); var a = i(7); Object.keys(a).forEach(function(e) { "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, { enumerable: !0, get: function() { return a[e] } }) }); var l = i(8); Object.keys(l).forEach(function(e) { "default" !== e && "__esModule" !== e && Object.defineProperty(t, e, { enumerable: !0, get: function() { return l[e] } }) }) }, function(e, t) { "use strict"; function i(e) { return f !== !1 && ("standard" === f ? e : f + e.charAt(0).toUpperCase() + e.substr(1)) } function n(e, t, i, n) { e.addEventListener(t, i, { passive: !1, capture: !! n }) } function r(e, t, i, n) { e.removeEventListener(t, i, !! n) } function o(e) { for (var t = 0, i = 0; e;) t -= e.offsetLeft, i -= e.offsetTop, e = e.offsetParent; return { left: t, top: i } } function s(e) { if (e instanceof window.SVGElement) { var t = e.getBoundingClientRect(); return { top: t.top, left: t.left, width: t.width, height: t.height } } return { top: e.offsetTop, left: e.offsetLeft, width: e.offsetWidth, height: e.offsetHeight } } function a(e, t) { for (var i in t) if (t[i].test(e[i])) return !0; return !1 } function l(e, t) { var i = document.createEvent("Event"); i.initEvent(t, !0, !0), i.pageX = e.pageX, i.pageY = e.pageY, e.target.dispatchEvent(i) } function h(e) { var t = e.target; if (!/(SELECT|INPUT|TEXTAREA)/i.test(t.tagName)) { var i = document.createEvent(window.MouseEvent ? "MouseEvents" : "Event"); i.initEvent("click", !0, !0), i._constructed = !0, t.dispatchEvent(i) } } function c(e, t) { t.firstChild ? p(e, t.firstChild) : t.appendChild(e) } function p(e, t) { t.parentNode.insertBefore(e, t) } Object.defineProperty(t, "__esModule", { value: !0 }), t.addEvent = n, t.removeEvent = r, t.offset = o, t.getRect = s, t.preventDefaultException = a, t.tap = l, t.click = h, t.prepend = c, t.before = p; var u = document.createElement("div").style, f = function() { var e = { webkit: "webkitTransform", Moz: "MozTransform", O: "OTransform", ms: "msTransform", standard: "transform" }; for (var t in e) if (void 0 !== u[e[t]]) return t; return !1 }(), d = i("transform"), m = (t.hasPerspective = i("perspective") in u, t.hasTouch = "ontouchstart" in window, t.hasTransform = d !== !1, t.hasTransition = i("transition") in u, t.style = { transform: d, transitionTimingFunction: i("transitionTimingFunction"), transitionDuration: i("transitionDuration"), transitionDelay: i("transitionDelay"), transformOrigin: i("transformOrigin"), transitionEnd: i("transitionEnd") }, 1), v = 2; t.eventType = { touchstart: m, touchmove: m, touchend: m, mousedown: v, mousemove: v, mouseup: v } }, function(e, t) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); t.isBadAndroid = /Android /.test(window.navigator.appVersion) && !/Chrome\/\d/.test(window.navigator.appVersion) }, function(e, t) { "use strict"; Object.defineProperty(t, "__esModule", { value: !0 }); t.ease = { swipe: { style: "cubic-bezier(0.23, 1, 0.32, 1)", fn: function(e) { return 1 + --e * e * e * e * e } }, swipeBounce: { style: "cubic-bezier(0.25, 0.46, 0.45, 0.94)", fn: function(e) { return e * (2 - e) } }, bounce: { style: "cubic-bezier(0.165, 0.84, 0.44, 1)", fn: function(e) { return 1 - --e * e * e * e } } } }, function(e, t) { "use strict"; function i(e) { if (Array.isArray(e)) { for (var t = 0, i = Array(e.length); t < e.length; t++) i[t] = e[t]; return i } return Array.from(e) } function n(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } Object.defineProperty(t, "__esModule", { value: !0 }); var r = function() { function e(e, t) { var i = [], n = !0, r = !1, o = void 0; try { for (var s, a = e[Symbol.iterator](); !(n = (s = a.next()).done) && (i.push(s.value), !t || i.length !== t); n = !0); } catch (e) { r = !0, o = e } finally { try { !n && a. return &&a. return () } finally { if (r) throw o } } return i } return function(t, i) { if (Array.isArray(t)) return t; if (Symbol.iterator in Object(t)) return e(t, i); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }(), o = function() { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) } } return function(t, i, n) { return i && e(t.prototype, i), n && e(t, n), t } }(); t.EventEmitter = function() { function e() { n(this, e), this._events = {} } return o(e, [{ key: "on", value: function(e, t) { var i = arguments.length <= 2 || void 0 === arguments[2] ? this : arguments[2]; this._events[e] || (this._events[e] = []), this._events[e].push([t, i]) } }, { key: "once", value: function(e, t) { function i() { this.off(e, i), r || (r = !0, t.apply(n, arguments)) } var n = arguments.length <= 2 || void 0 === arguments[2] ? this : arguments[2], r = !1; this.on(e, i) } }, { key: "off", value: function(e, t) { var i = this._events[e]; if (i) for (var n = i.length; n--;) i[n][0] === t && (i[n][0] = void 0) } }, { key: "trigger", value: function(e) { var t = this._events[e]; if (t) for (var n = t.length, o = [].concat(i(t)), s = 0; s < n; s++) { var a = o[s], l = r(a, 2), h = l[0], c = l[1]; h && h.apply(c, [].slice.call(arguments, 1)) } } }]), e }() }, function(e, t) { "use strict"; function i(e, t, i, n, r, o) { var s = e - t, a = Math.abs(s) / i, l = o.deceleration, h = o.itemHeight, c = o.swipeBounceTime, p = o.bounceTime, u = o.swipeTime, f = o.wheel ? 4 : 15, d = e + a / l * (s < 0 ? -1 : 1); return o.wheel && h && (d = Math.round(d / h) * h), d < n ? (d = r ? n - r / f * a : n, u = c - p) : d > 0 && (d = r ? r / f * a : 0, u = c - p), { destination: Math.round(d), duration: u } } Object.defineProperty(t, "__esModule", { value: !0 }), t.momentum = i }, function(e, t) { "use strict"; function i(e, t) { for (var i in t) e[i] = t[i] } Object.defineProperty(t, "__esModule", { value: !0 }), t.extend = i; var n = 100 / 60; t.requestAnimationFrame = function() { return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || function(e) { return window.setTimeout(e, (e.interval || n) / 2) } }(), t.cancelAnimationFrame = function() { return window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || window.oCancelAnimationFrame || function(e) { window.clearTimeout(e) } }() }]) }) }, function(e, t) { "use strict"; function i(e) { if (Array.isArray(e)) { for (var t = 0, i = Array(e.length); t < e.length; t++) i[t] = e[t]; return i } return Array.from(e) } function n(e, t) { if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") } t.__esModule = !0; var r = function() { function e(e, t) { var i = [], n = !0, r = !1, o = void 0; try { for (var s, a = e[Symbol.iterator](); !(n = (s = a.next()).done) && (i.push(s.value), !t || i.length !== t); n = !0); } catch (e) { r = !0, o = e } finally { try { !n && a. return &&a. return () } finally { if (r) throw o } } return i } return function(t, i) { if (Array.isArray(t)) return t; if (Symbol.iterator in Object(t)) return e(t, i); throw new TypeError("Invalid attempt to destructure non-iterable instance") } }(), o = function() { function e(e, t) { for (var i = 0; i < t.length; i++) { var n = t[i]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n) } } return function(t, i, n) { return i && e(t.prototype, i), n && e(t, n), t } }(), s = function() { function e() { n(this, e), this._events = {} } return o(e, [{ key: "on", value: function(e, t) { var i = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this; this._events[e] || (this._events[e] = []), this._events[e].push([t, i]) } }, { key: "once", value: function(e, t) { function i() { this.off(e, i), r || (r = !0, t.apply(n, arguments)) } var n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : this, r = !1; this.on(e, i) } }, { key: "off", value: function(e, t) { var i = this._events[e]; if (i) for (var n = i.length; n--;) i[n][0] === t && (i[n][0] = void 0) } }, { key: "trigger", value: function(e) { var t = this._events[e]; if (t) for (var n = t.length, o = [].concat(i(t)), s = 0; s < n; s++) { var a = o[s], l = r(a, 2), h = l[0], c = l[1]; h && h.apply(c, [].slice.call(arguments, 1)) } } }]), e }(); t. default = s, e.exports = t. default }, function(e, t) { "use strict"; function i(e, t) { for (var i in t) e[i] = t[i] } t.__esModule = !0, t.extend = i }, function(e, t) { "use strict"; function i(e) { var t = document.createElement("div"); return t.innerHTML = e, t.childNodes[0] } function n(e, t, i, n) { e.addEventListener(t, i, !! n) } function r(e, t, i, n) { e.removeEventListener(t, i, !! n) } function o(e, t) { var i = new RegExp("(^|\\s)" + t + "(\\s|$)"); return i.test(e.className) } function s(e, t) { if (!o(e, t)) { var i = e.className.split(" "); i.push(t), e.className = i.join(" ") } } function a(e, t) { if (o(e, t)) { var i = new RegExp("(^|\\s)" + t + "(\\s|$)", "g"); e.className = e.className.replace(i, " ") } } t.__esModule = !0, t.createDom = i, t.addEvent = n, t.removeEvent = r, t.hasClass = o, t.addClass = s, t.removeClass = a }, function(e, t, i) { var n = i(7); e.exports = (n. default ||n).template(function(e, t, i, n, r) { function o(e, t) { var n, r = ""; return r += '\n