Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua
',
+ attributes: { class: 'gjs-fonts gjs-f-h1p' }
+ }),
+ a.add('image', {
+ label: t.imageBlkLabel,
+ category: t.categoryLabel,
+ attributes: { class: 'gjs-fonts gjs-f-image' },
+ content: { type: 'image', style: { color: 'black' }, activeOnRender: 1 }
+ }),
+ a.add('quote', {
+ label: t.quoteBlkLabel,
+ category: t.categoryLabel,
+ content:
+ ''
+ )),
+ (this.responsivetab.dropdown = this.responsivetab.find('.uk-dropdown')),
+ (this.responsivetab.lst = this.responsivetab.dropdown.find('ul')),
+ (this.responsivetab.caption = this.responsivetab.find('a:first')),
+ this.element.hasClass('uk-tab-bottom') && this.responsivetab.dropdown.addClass('uk-dropdown-up'),
+ this.responsivetab.lst.on('click.uk.tab', 'a', function (e) {
+ e.preventDefault(), e.stopPropagation()
+ var link = UI.$(this)
+ $this.element
+ .children('li:not(.uk-tab-responsive)')
+ .eq(link.data('index'))
+ .trigger('click')
+ }),
+ this.on('show.uk.switcher change.uk.tab', function (e, tab) {
+ $this.responsivetab.caption.html(tab.text())
+ }),
+ this.element.append(this.responsivetab),
+ this.options.connect &&
+ (this.switcher = UI.switcher(this.element, {
+ toggle: '>li:not(.uk-tab-responsive)',
+ connect: this.options.connect,
+ active: this.options.active,
+ animation: this.options.animation,
+ duration: this.options.duration,
+ swiping: this.options.swiping
+ })),
+ UI.dropdown(this.responsivetab, { mode: 'click', preventflip: 'y' }),
+ $this.trigger('change.uk.tab', [
+ this.element
+ .find(this.options.target)
+ .not('.uk-tab-responsive')
+ .filter('.uk-active')
+ ]),
+ this.check(),
+ UI.$win.on(
+ 'resize orientationchange',
+ UI.Utils.debounce(function () {
+ $this.element.is(':visible') && $this.check()
+ }, 100)
+ ),
+ this.on('display.uk.check', function () {
+ $this.element.is(':visible') && $this.check()
+ })
+ },
+ check: function () {
+ var children = this.element.children('li:not(.uk-tab-responsive)').removeClass('uk-hidden')
+ if (children.length) {
+ var item,
+ clone,
+ top = children.eq(0).offset().top + Math.ceil(children.eq(0).height() / 2),
+ doresponsive = !1
+ if (
+ (this.responsivetab.lst.empty(),
+ children.each(function () {
+ UI.$(this).offset().top > top && (doresponsive = !0)
+ }),
+ doresponsive)
+ )
+ for (var i = 0; i < children.length; i++)
+ (item = UI.$(children.eq(i))).find('a'),
+ 'none' == item.css('float') ||
+ item.attr('uk-dropdown') ||
+ (item.hasClass('uk-disabled') ||
+ ((clone = item[0].outerHTML.replace('
')
+ .parent()).attr('aria-expanded', 'false'),
+ ($toggle = $this.toggle.eq(index)),
+ $wrapper.data('toggle', $toggle),
+ $wrapper.data('content', $content),
+ $toggle.data('wrapper', $wrapper),
+ $content.data('wrapper', $wrapper)
+ }),
+ this.element.trigger('update.uk.accordion', [this])
+ }
+ }),
+ UI.accordion
+ )
+ }),
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var active
+ return (
+ UI.component('autocomplete', {
+ defaults: {
+ minLength: 3,
+ param: 'search',
+ method: 'post',
+ delay: 300,
+ loadingClass: 'uk-loading',
+ flipDropdown: !1,
+ skipClass: 'uk-skip',
+ hoverClass: 'uk-active',
+ source: null,
+ renderer: null,
+ template:
+ '
'
+ },
+ visible: !1,
+ value: null,
+ selected: null,
+ boot: function () {
+ UI.$html.on('focus.autocomplete.uikit', '[data-uk-autocomplete]', function (e) {
+ var ele = UI.$(this)
+ ele.data('autocomplete') || UI.autocomplete(ele, UI.Utils.options(ele.attr('data-uk-autocomplete')))
+ }),
+ UI.$html.on('click.autocomplete.uikit', function (e) {
+ active && e.target != active.input[0] && active.hide()
+ })
+ },
+ init: function () {
+ var $this = this,
+ select = !1,
+ trigger = UI.Utils.debounce(function (e) {
+ if (select) return (select = !1)
+ $this.handle()
+ }, this.options.delay)
+ ;(this.dropdown = this.find('.uk-dropdown')),
+ (this.template = this.find('script[type="text/autocomplete"]').html()),
+ (this.template = UI.Utils.template(this.template || this.options.template)),
+ (this.input = this.find('input:first').attr('autocomplete', 'off')),
+ this.dropdown.length ||
+ (this.dropdown = UI.$('
').appendTo(this.element)),
+ this.options.flipDropdown && this.dropdown.addClass('uk-dropdown-flip'),
+ this.dropdown.attr('aria-expanded', 'false'),
+ this.input.on({
+ keydown: function (e) {
+ if (e && e.which && !e.shiftKey)
+ switch (e.which) {
+ case 13:
+ ;(select = !0), $this.selected && (e.preventDefault(), $this.select())
+ break
+ case 38:
+ e.preventDefault(), $this.pick('prev', !0)
+ break
+ case 40:
+ e.preventDefault(), $this.pick('next', !0)
+ break
+ case 27:
+ case 9:
+ $this.hide()
+ }
+ },
+ keyup: trigger
+ }),
+ this.dropdown.on('click', '.uk-autocomplete-results > *', function () {
+ $this.select()
+ }),
+ this.dropdown.on('mouseover', '.uk-autocomplete-results > *', function () {
+ $this.pick(UI.$(this))
+ }),
+ (this.triggercomplete = trigger)
+ },
+ handle: function () {
+ var old = this.value
+ return (
+ (this.value = this.input.val()),
+ this.value.length < this.options.minLength ? this.hide() : (this.value != old && this.request(), this)
+ )
+ },
+ pick: function (item, scrollinview) {
+ var items = UI.$(
+ this.dropdown.find('.uk-autocomplete-results').children(':not(.' + this.options.skipClass + ')')
+ ),
+ selected = !1
+ if ('string' == typeof item || item.hasClass(this.options.skipClass)) {
+ if ('next' == item || 'prev' == item) {
+ if (this.selected) {
+ var index = items.index(this.selected)
+ selected =
+ 'next' == item
+ ? items.eq(index + 1 < items.length ? index + 1 : 0)
+ : items.eq(index - 1 < 0 ? items.length - 1 : index - 1)
+ } else selected = items['next' == item ? 'first' : 'last']()
+ selected = UI.$(selected)
+ }
+ } else selected = item
+ if (
+ selected &&
+ selected.length &&
+ ((this.selected = selected),
+ items.removeClass(this.options.hoverClass),
+ this.selected.addClass(this.options.hoverClass),
+ scrollinview)
+ ) {
+ var top = selected.position().top,
+ scrollTop = this.dropdown.scrollTop()
+ ;(this.dropdown.height() < top || top < 0) && this.dropdown.scrollTop(scrollTop + top)
+ }
+ },
+ select: function () {
+ if (this.selected) {
+ var data = this.selected.data()
+ this.trigger('selectitem.uk.autocomplete', [data, this]),
+ data.value && this.input.val(data.value).trigger('change'),
+ this.hide()
+ }
+ },
+ show: function () {
+ if (!this.visible)
+ return (
+ (this.visible = !0),
+ this.element.addClass('uk-open'),
+ active && active !== this && active.hide(),
+ (active = this).dropdown.attr('aria-expanded', 'true'),
+ this
+ )
+ },
+ hide: function () {
+ if (this.visible)
+ return (
+ (this.visible = !1),
+ this.element.removeClass('uk-open'),
+ active === this && (active = !1),
+ this.dropdown.attr('aria-expanded', 'false'),
+ this
+ )
+ },
+ request: function () {
+ var $this = this,
+ release = function (data) {
+ data && $this.render(data), $this.element.removeClass($this.options.loadingClass)
+ }
+ if ((this.element.addClass(this.options.loadingClass), this.options.source)) {
+ var source = this.options.source
+ switch (typeof this.options.source) {
+ case 'function':
+ this.options.source.apply(this, [release])
+ break
+ case 'object':
+ if (source.length) {
+ var items = []
+ source.forEach(function (item) {
+ item.value &&
+ -1 != item.value.toLowerCase().indexOf($this.value.toLowerCase()) &&
+ items.push(item)
+ }),
+ release(items)
+ }
+ break
+ case 'string':
+ var params = {}
+ ;(params[this.options.param] = this.value),
+ UI.$.ajax({
+ url: this.options.source,
+ data: params,
+ type: this.options.method,
+ dataType: 'json'
+ }).done(function (json) {
+ release(json || [])
+ })
+ break
+ default:
+ release(null)
+ }
+ } else this.element.removeClass($this.options.loadingClass)
+ },
+ render: function (data) {
+ return (
+ this.dropdown.empty(),
+ (this.selected = !1),
+ this.options.renderer
+ ? this.options.renderer.apply(this, [data])
+ : data &&
+ data.length &&
+ (this.dropdown.append(this.template({ items: data })),
+ this.show(),
+ this.trigger('show.uk.autocomplete')),
+ this
+ )
+ }
+ }),
+ UI.autocomplete
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var dropdown,
+ moment,
+ active = !1
+ return (
+ UI.component('datepicker', {
+ defaults: {
+ mobile: !1,
+ weekstart: 1,
+ i18n: {
+ months: [
+ 'January',
+ 'February',
+ 'March',
+ 'April',
+ 'May',
+ 'June',
+ 'July',
+ 'August',
+ 'September',
+ 'October',
+ 'November',
+ 'December'
+ ],
+ weekdays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
+ },
+ format: 'YYYY-MM-DD',
+ offsettop: 5,
+ maxDate: !1,
+ minDate: !1,
+ pos: 'auto',
+ template: function (data, opts) {
+ var i,
+ content = ''
+ if (
+ ((content += '
'),
+ (content += '
'),
+ (content += '
'),
+ UI.formSelect)
+ ) {
+ var months,
+ minYear,
+ maxYear,
+ currentyear = new Date().getFullYear(),
+ options = []
+ for (i = 0; i < opts.i18n.months.length; i++)
+ i == data.month
+ ? options.push('
' + opts.i18n.months[i] + ' ')
+ : options.push('
' + opts.i18n.months[i] + ' ')
+ for (
+ months =
+ '
' +
+ opts.i18n.months[data.month] +
+ '' +
+ options.join('') +
+ ' ',
+ options = [],
+ minYear = data.minDate ? data.minDate.year() : currentyear - 50,
+ maxYear = data.maxDate ? data.maxDate.year() : currentyear + 20,
+ i = minYear;
+ i <= maxYear;
+ i++
+ )
+ i == data.year
+ ? options.push('
' + i + ' ')
+ : options.push('
' + i + ' ')
+ content +=
+ '
' +
+ months +
+ ' ' +
+ data.year +
+ '' +
+ options.join('') +
+ '
'
+ } else
+ content +=
+ '
' + opts.i18n.months[data.month] + ' ' + data.year + '
'
+ for (
+ content += '
', content += '
', content += '', i = 0;
+ i < data.weekdays.length;
+ i++
+ )
+ data.weekdays[i] && (content += '' + data.weekdays[i] + ' ')
+ for (content += ' ', content += '', i = 0; i < data.days.length; i++)
+ if (data.days[i] && data.days[i].length) {
+ content += ''
+ for (var d = 0; d < data.days[i].length; d++)
+ if (data.days[i][d]) {
+ var day = data.days[i][d],
+ cls = []
+ day.inmonth || cls.push('uk-datepicker-table-muted'),
+ day.selected && cls.push('uk-active'),
+ day.disabled && cls.push('uk-datepicker-date-disabled uk-datepicker-table-muted'),
+ (content +=
+ '' +
+ day.day.format('D') +
+ ' ')
+ }
+ content += ' '
+ }
+ return (content += ' ') + '
'
+ }
+ },
+ boot: function () {
+ UI.$win.on('resize orientationchange', function () {
+ active && active.hide()
+ }),
+ UI.$html.on('focus.datepicker.uikit', '[data-uk-datepicker]', function (e) {
+ var ele = UI.$(this)
+ ele.data('datepicker') ||
+ (e.preventDefault(),
+ UI.datepicker(ele, UI.Utils.options(ele.attr('data-uk-datepicker'))),
+ ele.trigger('focus'))
+ }),
+ UI.$html.on('click focus', '*', function (e) {
+ var target = UI.$(e.target)
+ !active ||
+ target[0] == dropdown[0] ||
+ target.data('datepicker') ||
+ target.parents('.uk-datepicker:first').length ||
+ active.hide()
+ })
+ },
+ init: function () {
+ if (!UI.support.touch || 'date' != this.element.attr('type') || this.options.mobile) {
+ var $this = this
+ ;(this.current = this.element.val() ? moment(this.element.val(), this.options.format) : moment()),
+ this.on('click focus', function () {
+ active !== $this &&
+ $this.pick(this.value ? this.value : $this.options.minDate ? $this.options.minDate : '')
+ }).on('change', function () {
+ $this.element.val() &&
+ !moment($this.element.val(), $this.options.format).isValid() &&
+ $this.element.val(moment().format($this.options.format))
+ }),
+ dropdown ||
+ ((dropdown = UI.$('
')).on(
+ 'click',
+ '.uk-datepicker-next, .uk-datepicker-previous, [data-date]',
+ function (e) {
+ e.stopPropagation(), e.preventDefault()
+ var ele = UI.$(this)
+ if (ele.hasClass('uk-datepicker-date-disabled')) return !1
+ ele.is('[data-date]')
+ ? ((active.current = moment(ele.data('date'))),
+ active.element.val(active.current.format(active.options.format)).trigger('change'),
+ active.hide())
+ : active.add(ele.hasClass('uk-datepicker-next') ? 1 : -1, 'months')
+ }
+ ),
+ dropdown.on('change', '.update-picker-month, .update-picker-year', function () {
+ var select = UI.$(this)
+ active[select.is('.update-picker-year') ? 'setYear' : 'setMonth'](Number(select.val()))
+ }),
+ dropdown.appendTo('body'))
+ }
+ },
+ pick: function (initdate) {
+ var offset = this.element.offset(),
+ css = { left: offset.left, right: '' }
+ ;(this.current = isNaN(initdate) ? moment(initdate, this.options.format) : moment()),
+ (this.initdate = this.current.format('YYYY-MM-DD')),
+ this.update(),
+ 'right' == UI.langdirection &&
+ ((css.right = window.innerWidth - (css.left + this.element.outerWidth())), (css.left = ''))
+ var posTop =
+ offset.top -
+ this.element.outerHeight() +
+ this.element.height() -
+ this.options.offsettop -
+ dropdown.outerHeight(),
+ posBottom = offset.top + this.element.outerHeight() + this.options.offsettop
+ ;(css.top = posBottom),
+ 'top' == this.options.pos
+ ? (css.top = posTop)
+ : 'auto' == this.options.pos &&
+ window.innerHeight - posBottom - dropdown.outerHeight() < 0 &&
+ 0 <= posTop &&
+ (css.top = posTop),
+ dropdown.css(css).show(),
+ this.trigger('show.uk.datepicker'),
+ (active = this)
+ },
+ add: function (unit, value) {
+ this.current.add(unit, value), this.update()
+ },
+ setMonth: function (month) {
+ this.current.month(month), this.update()
+ },
+ setYear: function (year) {
+ this.current.year(year), this.update()
+ },
+ update: function () {
+ var data = this.getRows(this.current.year(), this.current.month()),
+ tpl = this.options.template(data, this.options)
+ dropdown.html(tpl), this.trigger('update.uk.datepicker')
+ },
+ getRows: function (year, month) {
+ var opts = this.options,
+ now = moment().format('YYYY-MM-DD'),
+ days = [
+ 31,
+ (year % 4 == 0 && year % 100 != 0) || year % 400 == 0 ? 29 : 28,
+ 31,
+ 30,
+ 31,
+ 30,
+ 31,
+ 31,
+ 30,
+ 31,
+ 30,
+ 31
+ ][month],
+ before = new Date(year, month, 1, 12).getDay(),
+ data = { month, year, weekdays: [], days: [], maxDate: !1, minDate: !1 },
+ row = []
+ !1 !== opts.maxDate &&
+ (data.maxDate = isNaN(opts.maxDate)
+ ? moment(opts.maxDate, opts.format)
+ : moment().add(opts.maxDate, 'days')),
+ !1 !== opts.minDate &&
+ (data.minDate = isNaN(opts.minDate)
+ ? moment(opts.minDate, opts.format)
+ : moment().add(opts.minDate - 1, 'days')),
+ (data.weekdays = (function () {
+ for (var i = 0, arr = []; i < 7; i++) {
+ for (var day = i + (opts.weekstart || 0); 7 <= day; ) day -= 7
+ arr.push(opts.i18n.weekdays[day])
+ }
+ return arr
+ })()),
+ opts.weekstart && 0 < opts.weekstart && (before -= opts.weekstart) < 0 && (before += 7)
+ for (
+ var day, isDisabled, isSelected, isToday, isInMonth, cells = days + before, after = cells;
+ 7 < after;
+
+ )
+ after -= 7
+ cells += 7 - after
+ for (var i = 0, r = 0; i < cells; i++)
+ (day = new Date(year, month, i - before + 1, 12)),
+ (isDisabled = (data.minDate && data.minDate > day) || (data.maxDate && day > data.maxDate)),
+ (isInMonth = !(i < before || days + before <= i)),
+ (day = moment(day)),
+ (isSelected = this.initdate == day.format('YYYY-MM-DD')),
+ (isToday = now == day.format('YYYY-MM-DD')),
+ row.push({ selected: isSelected, today: isToday, disabled: isDisabled, day, inmonth: isInMonth }),
+ 7 == ++r && (data.days.push(row), (row = []), (r = 0))
+ return data
+ },
+ hide: function () {
+ active && active === this && (dropdown.hide(), (active = !1), this.trigger('hide.uk.datepicker'))
+ }
+ }),
+ (moment = __webpack_provided_window_dot_moment),
+ (UI.Utils.moment = moment),
+ UI.datepicker
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ return (
+ UI.component('formPassword', {
+ defaults: { lblShow: 'Show', lblHide: 'Hide' },
+ boot: function () {
+ UI.$html.on('click.formpassword.uikit', '[data-uk-form-password]', function (e) {
+ var ele = UI.$(this)
+ ele.data('formPassword') ||
+ (e.preventDefault(),
+ UI.formPassword(ele, UI.Utils.options(ele.attr('data-uk-form-password'))),
+ ele.trigger('click'))
+ })
+ },
+ init: function () {
+ var $this = this
+ this.on('click', function (e) {
+ if ((e.preventDefault(), $this.input.length)) {
+ var type = $this.input.attr('type')
+ $this.input.attr('type', 'text' == type ? 'password' : 'text'),
+ $this.element.html($this.options['text' == type ? 'lblShow' : 'lblHide'])
+ }
+ }),
+ (this.input = this.element.next('input').length
+ ? this.element.next('input')
+ : this.element.prev('input')),
+ this.element.html(this.options[this.input.is("[type='password']") ? 'lblShow' : 'lblHide']),
+ this.element.data('formPassword', this)
+ }
+ }),
+ UI.formPassword
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ return (
+ UI.component('formSelect', {
+ defaults: { target: '>span:first', activeClass: 'uk-active' },
+ boot: function () {
+ UI.ready(function (context) {
+ UI.$('[data-uk-form-select]', context).each(function () {
+ var ele = UI.$(this)
+ ele.data('formSelect') || UI.formSelect(ele, UI.Utils.options(ele.attr('data-uk-form-select')))
+ })
+ })
+ },
+ init: function () {
+ var select,
+ fn,
+ $this = this
+ ;(this.target = this.find(this.options.target)),
+ (this.select = this.find('select')),
+ this.select.on(
+ 'change',
+ ((select = $this.select[0]),
+ (fn = function () {
+ try {
+ $this.target.text(select.options[select.selectedIndex].text)
+ } catch (e) {}
+ return (
+ $this.element[$this.select.val() ? 'addClass' : 'removeClass']($this.options.activeClass), fn
+ )
+ })())
+ ),
+ this.element.data('formSelect', this)
+ }
+ }),
+ UI.formSelect
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ UI.component('grid', {
+ defaults: { colwidth: 'auto', animation: !0, duration: 300, gutter: 0, controls: !1, filter: !1 },
+ boot: function () {
+ UI.ready(function (context) {
+ UI.$('[data-uk-grid]', context).each(function () {
+ var ele = UI.$(this)
+ ele.data('grid') || UI.grid(ele, UI.Utils.options(ele.attr('data-uk-grid')))
+ })
+ })
+ },
+ init: function () {
+ var $this = this,
+ gutter = String(this.options.gutter)
+ .trim()
+ .split(' ')
+ ;(this.gutterv = parseInt(gutter[0], 10)),
+ (this.gutterh = parseInt(gutter[1] || gutter[0], 10)),
+ this.element.css({ position: 'relative' }),
+ (this.controls = null),
+ this.options.controls &&
+ ((this.controls = UI.$(this.options.controls)),
+ this.controls.on('click', '[data-uk-filter]', function (e) {
+ e.preventDefault(), $this.filter(UI.$(this).data('ukFilter'))
+ }),
+ this.controls.on('click', '[data-uk-sort]', function (e) {
+ e.preventDefault()
+ var cmd = UI.$(this)
+ .attr('data-uk-sort')
+ .split(':')
+ $this.sort(cmd[0], cmd[1])
+ })),
+ UI.$win.on(
+ 'load resize orientationchange',
+ UI.Utils.debounce(
+ function () {
+ $this.currentfilter ? $this.filter($this.currentfilter) : this.updateLayout()
+ }.bind(this),
+ 100
+ )
+ ),
+ this.on('display.uk.check', function () {
+ $this.element.is(':visible') && $this.updateLayout()
+ }),
+ UI.$html.on('changed.uk.dom', function (e) {
+ $this.updateLayout()
+ }),
+ !1 !== this.options.filter ? this.filter(this.options.filter) : this.updateLayout()
+ },
+ _prepareElements: function () {
+ var css,
+ children = this.element.children(':not([data-grid-prepared])')
+ children.length &&
+ ((css = {
+ position: 'absolute',
+ 'box-sizing': 'border-box',
+ width: 'auto' == this.options.colwidth ? '' : this.options.colwidth
+ }),
+ this.options.gutter &&
+ ((css['padding-left'] = this.gutterh),
+ (css['padding-bottom'] = this.gutterv),
+ this.element.css('margin-left', -1 * this.gutterh)),
+ children.attr('data-grid-prepared', 'true').css(css))
+ },
+ updateLayout: function (elements) {
+ this._prepareElements()
+ var item,
+ width,
+ height,
+ pos,
+ i,
+ z,
+ max,
+ size,
+ children = (elements = elements || this.element.children(':visible')),
+ maxwidth = this.element.width() + 2 * this.gutterh + 2,
+ left = 0,
+ top = 0,
+ positions = []
+ this.trigger('beforeupdate.uk.grid', [children]),
+ children.each(function (index) {
+ for (
+ size = _getSize(this),
+ item = UI.$(this),
+ width = size.outerWidth,
+ height = size.outerHeight,
+ i = top = left = 0,
+ max = positions.length;
+ i < max;
+ i++
+ )
+ (pos = positions[i]),
+ left <= pos.aX && (left = pos.aX),
+ maxwidth < left + width && (left = 0),
+ top <= pos.aY && (top = pos.aY)
+ positions.push({ ele: item, top, left, width, height, aY: top + height, aX: left + width })
+ })
+ var posPrev,
+ maxHeight = 0
+ for (i = 0, max = positions.length; i < max; i++) {
+ for (pos = positions[i], z = top = 0; z < i; z++)
+ (posPrev = positions[z]), pos.left < posPrev.aX && posPrev.left + 1 < pos.aX && (top = posPrev.aY)
+ ;(pos.top = top), (pos.aY = top + pos.height), (maxHeight = Math.max(maxHeight, pos.aY))
+ }
+ ;(maxHeight -= this.gutterv),
+ this.options.animation
+ ? (this.element.stop().animate({ height: maxHeight }, 100),
+ positions.forEach(
+ function (pos) {
+ pos.ele.stop().animate({ top: pos.top, left: pos.left, opacity: 1 }, this.options.duration)
+ }.bind(this)
+ ))
+ : (this.element.css('height', maxHeight),
+ positions.forEach(
+ function (pos) {
+ pos.ele.css({ top: pos.top, left: pos.left, opacity: 1 })
+ }.bind(this)
+ )),
+ setTimeout(function () {
+ UI.$doc.trigger('scrolling.uk.document')
+ }, 2 * this.options.duration * (this.options.animation ? 1 : 0)),
+ this.trigger('afterupdate.uk.grid', [children])
+ },
+ filter: function (filter) {
+ 'number' == typeof (filter = (this.currentfilter = filter) || []) && (filter = filter.toString()),
+ 'string' == typeof filter &&
+ (filter = filter.split(/,/).map(function (item) {
+ return item.trim()
+ }))
+ var children = this.element.children(),
+ elements = { visible: [], hidden: [] }
+ children.each(function (index) {
+ var ele = UI.$(this),
+ f = ele.attr('data-uk-filter'),
+ infilter = !filter.length
+ f &&
+ ((f = f.split(/,/).map(function (item) {
+ return item.trim()
+ })),
+ filter.forEach(function (item) {
+ ;-1 < f.indexOf(item) && (infilter = !0)
+ })),
+ elements[infilter ? 'visible' : 'hidden'].push(ele)
+ }),
+ (elements.hidden = UI.$(elements.hidden).map(function () {
+ return this[0]
+ })),
+ (elements.visible = UI.$(elements.visible).map(function () {
+ return this[0]
+ })),
+ elements.hidden
+ .attr('aria-hidden', 'true')
+ .filter(':visible')
+ .fadeOut(this.options.duration),
+ elements.visible
+ .attr('aria-hidden', 'false')
+ .filter(':hidden')
+ .css('opacity', 0)
+ .show(),
+ this.updateLayout(elements.visible),
+ this.controls &&
+ this.controls.length &&
+ this.controls
+ .find('[data-uk-filter]')
+ .removeClass('uk-active')
+ .filter('[data-uk-filter="' + filter + '"]')
+ .addClass('uk-active')
+ },
+ sort: function (by, order) {
+ 'string' == typeof (order = order || 1) && (order = 'desc' == order.toLowerCase() ? -1 : 1)
+ var elements = this.element.children()
+ elements
+ .sort(function (a, b) {
+ return (a = UI.$(a)), ((b = UI.$(b)).data(by) || '') < (a.data(by) || '') ? order : -1 * order
+ })
+ .appendTo(this.element),
+ this.updateLayout(elements.filter(':visible')),
+ this.controls &&
+ this.controls.length &&
+ this.controls
+ .find('[data-uk-sort]')
+ .removeClass('uk-active')
+ .filter('[data-uk-sort="' + by + ':' + (-1 == order ? 'desc' : 'asc') + '"]')
+ .addClass('uk-active')
+ }
+ })
+ var _getSize = (function () {
+ var prefixes = 'Webkit Moz ms Ms O'.split(' '),
+ docElemStyle = document.documentElement.style
+ function getStyleSize (value) {
+ var num = parseFloat(value)
+ return -1 === value.indexOf('%') && !isNaN(num) && num
+ }
+ var getStyle,
+ boxSizingProp,
+ isBoxSizeOuter,
+ logError =
+ 'undefined' == typeof console
+ ? function () {}
+ : function (message) {
+ console.error(message)
+ },
+ measurements = [
+ 'paddingLeft',
+ 'paddingRight',
+ 'paddingTop',
+ 'paddingBottom',
+ 'marginLeft',
+ 'marginRight',
+ 'marginTop',
+ 'marginBottom',
+ 'borderLeftWidth',
+ 'borderRightWidth',
+ 'borderTopWidth',
+ 'borderBottomWidth'
+ ],
+ isSetup = !1
+ return function (elem) {
+ if (
+ ((function () {
+ if (!isSetup) {
+ isSetup = !0
+ var getStyleFn,
+ getComputedStyle = window.getComputedStyle
+ if (
+ ((getStyleFn = getComputedStyle
+ ? function (elem) {
+ return getComputedStyle(elem, null)
+ }
+ : function (elem) {
+ return elem.currentStyle
+ }),
+ (getStyle = function (elem) {
+ var style = getStyleFn(elem)
+ return (
+ style ||
+ logError(
+ 'Style returned ' +
+ style +
+ '. Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1'
+ ),
+ style
+ )
+ }),
+ (boxSizingProp = (function (propName) {
+ if (propName) {
+ if ('string' == typeof docElemStyle[propName]) return propName
+ var prefixed
+ propName = propName.charAt(0).toUpperCase() + propName.slice(1)
+ for (var i = 0, len = prefixes.length; i < len; i++)
+ if (((prefixed = prefixes[i] + propName), 'string' == typeof docElemStyle[prefixed]))
+ return prefixed
+ }
+ })('boxSizing')))
+ ) {
+ var div = document.createElement('div')
+ ;(div.style.width = '200px'),
+ (div.style.padding = '1px 2px 3px 4px'),
+ (div.style.borderStyle = 'solid'),
+ (div.style.borderWidth = '1px 2px 3px 4px'),
+ (div.style[boxSizingProp] = 'border-box')
+ var body = document.body || document.documentElement
+ body.appendChild(div)
+ var style = getStyle(div)
+ ;(isBoxSizeOuter = 200 === getStyleSize(style.width)), body.removeChild(div)
+ }
+ }
+ })(),
+ 'string' == typeof elem && (elem = document.querySelector(elem)),
+ elem && 'object' == typeof elem && elem.nodeType)
+ ) {
+ var style = getStyle(elem)
+ if ('none' === style.display)
+ return (function () {
+ for (
+ var size = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 },
+ i = 0,
+ len = measurements.length;
+ i < len;
+ i++
+ )
+ size[measurements[i]] = 0
+ return size
+ })()
+ var size = {}
+ ;(size.width = elem.offsetWidth), (size.height = elem.offsetHeight)
+ for (
+ var isBorderBox = (size.isBorderBox = !(
+ !boxSizingProp ||
+ !style[boxSizingProp] ||
+ 'border-box' !== style[boxSizingProp]
+ )),
+ i = 0,
+ len = measurements.length;
+ i < len;
+ i++
+ ) {
+ var measurement = measurements[i],
+ value = style[measurement],
+ num = parseFloat(value)
+ size[measurement] = isNaN(num) ? 0 : num
+ }
+ var paddingWidth = size.paddingLeft + size.paddingRight,
+ paddingHeight = size.paddingTop + size.paddingBottom,
+ marginWidth = size.marginLeft + size.marginRight,
+ marginHeight = size.marginTop + size.marginBottom,
+ borderWidth = size.borderLeftWidth + size.borderRightWidth,
+ borderHeight = size.borderTopWidth + size.borderBottomWidth,
+ isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter,
+ styleWidth = getStyleSize(style.width)
+ !1 !== styleWidth && (size.width = styleWidth + (isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth))
+ var styleHeight = getStyleSize(style.height)
+ return (
+ !1 !== styleHeight &&
+ (size.height = styleHeight + (isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight)),
+ (size.innerWidth = size.width - (paddingWidth + borderWidth)),
+ (size.innerHeight = size.height - (paddingHeight + borderHeight)),
+ (size.outerWidth = size.width + marginWidth),
+ (size.outerHeight = size.height + marginHeight),
+ size
+ )
+ }
+ }
+ })()
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var editors = []
+ return (
+ UI.component('htmleditor', {
+ defaults: {
+ iframe: !1,
+ mode: 'split',
+ markdown: !1,
+ autocomplete: !0,
+ height: 500,
+ maxsplitsize: 1e3,
+ codemirror: {
+ mode: 'htmlmixed',
+ lineWrapping: !0,
+ dragDrop: !1,
+ autoCloseTags: !0,
+ matchTags: !0,
+ autoCloseBrackets: !0,
+ matchBrackets: !0,
+ indentUnit: 4,
+ indentWithTabs: !1,
+ tabSize: 4,
+ hintOptions: { completionSingle: !1 }
+ },
+ toolbar: ['bold', 'italic', 'strike', 'link', 'image', 'blockquote', 'listUl', 'listOl'],
+ lblPreview: 'Preview',
+ lblCodeview: 'HTML',
+ lblMarkedview: 'Markdown'
+ },
+ boot: function () {
+ UI.ready(function (context) {
+ UI.$('textarea[data-uk-htmleditor]', context).each(function () {
+ var editor = UI.$(this)
+ editor.data('htmleditor') ||
+ UI.htmleditor(editor, UI.Utils.options(editor.attr('data-uk-htmleditor')))
+ })
+ })
+ },
+ init: function () {
+ var $this = this,
+ tpl = UI.components.htmleditor.template
+ ;(this.CodeMirror = this.options.CodeMirror || CodeMirror),
+ (this.buttons = {}),
+ (tpl = (tpl = tpl.replace(/\{:lblPreview}/g, this.options.lblPreview)).replace(
+ /\{:lblCodeview}/g,
+ this.options.lblCodeview
+ )),
+ (this.htmleditor = UI.$(tpl)),
+ (this.content = this.htmleditor.find('.uk-htmleditor-content')),
+ (this.toolbar = this.htmleditor.find('.uk-htmleditor-toolbar')),
+ (this.preview = this.htmleditor
+ .find('.uk-htmleditor-preview')
+ .children()
+ .eq(0)),
+ (this.code = this.htmleditor.find('.uk-htmleditor-code')),
+ this.element.before(this.htmleditor).appendTo(this.code),
+ (this.editor = this.CodeMirror.fromTextArea(this.element[0], this.options.codemirror)),
+ (this.editor.htmleditor = this).editor.on(
+ 'change',
+ UI.Utils.debounce(function () {
+ $this.render()
+ }, 150)
+ ),
+ this.editor.on('change', function () {
+ $this.editor.save(), $this.element.trigger('input')
+ }),
+ this.code.find('.CodeMirror').css('height', this.options.height),
+ this.options.iframe
+ ? ((this.iframe = UI.$(
+ '
'
+ )),
+ this.preview.append(this.iframe),
+ this.iframe[0].contentWindow.document.open(),
+ this.iframe[0].contentWindow.document.close(),
+ (this.preview.container = UI.$(this.iframe[0].contentWindow.document).find('body')),
+ 'string' == typeof this.options.iframe &&
+ this.preview.container
+ .parent()
+ .append('
'))
+ : (this.preview.container = this.preview),
+ UI.$win.on(
+ 'resize load',
+ UI.Utils.debounce(function () {
+ $this.fit()
+ }, 200)
+ )
+ var previewContainer = this.iframe ? this.preview.container : $this.preview.parent(),
+ codeContent = this.code.find('.CodeMirror-sizer'),
+ codeScroll = this.code.find('.CodeMirror-scroll').on(
+ 'scroll',
+ UI.Utils.debounce(function () {
+ if ('tab' != $this.htmleditor.attr('data-mode')) {
+ var codeHeight = codeContent.height() - codeScroll.height(),
+ ratio =
+ (previewContainer[0].scrollHeight -
+ ($this.iframe ? $this.iframe.height() : previewContainer.height())) /
+ codeHeight,
+ previewPosition = codeScroll.scrollTop() * ratio
+ previewContainer.scrollTop(previewPosition)
+ }
+ }, 10)
+ )
+ this.htmleditor.on('click', '.uk-htmleditor-button-code, .uk-htmleditor-button-preview', function (e) {
+ e.preventDefault(),
+ 'tab' == $this.htmleditor.attr('data-mode') &&
+ ($this.htmleditor
+ .find('.uk-htmleditor-button-code, .uk-htmleditor-button-preview')
+ .removeClass('uk-active')
+ .filter(this)
+ .addClass('uk-active'),
+ ($this.activetab = UI.$(this).hasClass('uk-htmleditor-button-code') ? 'code' : 'preview'),
+ $this.htmleditor.attr('data-active-tab', $this.activetab),
+ $this.editor.refresh())
+ }),
+ this.htmleditor.on('click', 'a[data-htmleditor-button]', function () {
+ $this.code.is(':visible') &&
+ $this.trigger('action.' + UI.$(this).data('htmleditor-button'), [$this.editor])
+ }),
+ this.preview.parent().css('height', this.code.height()),
+ this.options.autocomplete &&
+ this.CodeMirror.showHint &&
+ this.CodeMirror.hint &&
+ this.CodeMirror.hint.html &&
+ this.editor.on(
+ 'inputRead',
+ UI.Utils.debounce(function () {
+ var POS = $this.editor.getDoc().getCursor()
+ if (
+ 'xml' ==
+ $this.CodeMirror.innerMode($this.editor.getMode(), $this.editor.getTokenAt(POS).state).mode
+ .name
+ ) {
+ var cur = $this.editor.getCursor(),
+ token = $this.editor.getTokenAt(cur)
+ ;('<' != token.string.charAt(0) && 'attribute' != token.type) ||
+ $this.CodeMirror.showHint($this.editor, $this.CodeMirror.hint.html, { completeSingle: !1 })
+ }
+ }, 100)
+ ),
+ (this.debouncedRedraw = UI.Utils.debounce(function () {
+ $this.redraw()
+ }, 5)),
+ this.on('init.uk.component', function () {
+ $this.debouncedRedraw()
+ }),
+ this.element.attr('data-uk-check-display', 1).on(
+ 'display.uk.check',
+ function (e) {
+ this.htmleditor.is(':visible') && this.fit()
+ }.bind(this)
+ ),
+ editors.push(this)
+ },
+ addButton: function (name, button) {
+ this.buttons[name] = button
+ },
+ addButtons: function (buttons) {
+ UI.$.extend(this.buttons, buttons)
+ },
+ replaceInPreview: function (regexp, callback) {
+ var editor = this.editor,
+ results = [],
+ value = editor.getValue(),
+ offset = -1,
+ index = 0
+ function translateOffset (offset) {
+ var result = editor
+ .getValue()
+ .substring(0, offset)
+ .split('\n')
+ return { line: result.length - 1, ch: result[result.length - 1].length }
+ }
+ return (
+ (this.currentvalue = this.currentvalue.replace(regexp, function () {
+ var match = {
+ matches: arguments,
+ from: translateOffset((offset = value.indexOf(arguments[0], ++offset))),
+ to: translateOffset(offset + arguments[0].length),
+ replace: function (value) {
+ editor.replaceRange(value, match.from, match.to)
+ },
+ inRange: function (cursor) {
+ return cursor.line === match.from.line && cursor.line === match.to.line
+ ? cursor.ch >= match.from.ch && cursor.ch < match.to.ch
+ : (cursor.line === match.from.line && cursor.ch >= match.from.ch) ||
+ (cursor.line > match.from.line && cursor.line < match.to.line) ||
+ (cursor.line === match.to.line && cursor.ch < match.to.ch)
+ }
+ },
+ result = callback(match, index)
+ return result ? (index++, results.push(match), result) : arguments[0]
+ })),
+ results
+ )
+ },
+ _buildtoolbar: function () {
+ if (this.options.toolbar && this.options.toolbar.length) {
+ var $this = this,
+ bar = []
+ this.toolbar.empty(),
+ this.options.toolbar.forEach(function (button) {
+ if ($this.buttons[button]) {
+ var title = $this.buttons[button].title ? $this.buttons[button].title : button
+ bar.push(
+ '
' +
+ $this.buttons[button].label +
+ ' '
+ )
+ }
+ }),
+ this.toolbar.html(bar.join('\n'))
+ }
+ },
+ fit: function () {
+ var mode = this.options.mode
+ 'split' == mode && this.htmleditor.width() < this.options.maxsplitsize && (mode = 'tab'),
+ 'tab' == mode &&
+ (this.activetab ||
+ ((this.activetab = 'code'), this.htmleditor.attr('data-active-tab', this.activetab)),
+ this.htmleditor
+ .find('.uk-htmleditor-button-code, .uk-htmleditor-button-preview')
+ .removeClass('uk-active')
+ .filter('code' == this.activetab ? '.uk-htmleditor-button-code' : '.uk-htmleditor-button-preview')
+ .addClass('uk-active')),
+ this.editor.refresh(),
+ this.preview.parent().css('height', this.code.height()),
+ this.htmleditor.attr('data-mode', mode)
+ },
+ redraw: function () {
+ this._buildtoolbar(), this.render(), this.fit()
+ },
+ getMode: function () {
+ return this.editor.getOption('mode')
+ },
+ getCursorMode: function () {
+ var param = { mode: 'html' }
+ return this.trigger('cursorMode', [param]), param.mode
+ },
+ render: function () {
+ if (((this.currentvalue = this.editor.getValue()), !this.currentvalue))
+ return this.element.val(''), void this.preview.container.html('')
+ this.trigger('render', [this]),
+ this.trigger('renderLate', [this]),
+ this.preview.container.html(this.currentvalue)
+ },
+ addShortcut: function (name, callback) {
+ var map = {}
+ return (
+ UI.$.isArray(name) || (name = [name]),
+ name.forEach(function (key) {
+ map[key] = callback
+ }),
+ this.editor.addKeyMap(map),
+ map
+ )
+ },
+ addShortcutAction: function (action, shortcuts) {
+ var editor = this
+ this.addShortcut(shortcuts, function () {
+ editor.element.trigger('action.' + action, [editor.editor])
+ })
+ },
+ replaceSelection: function (replace) {
+ var text = this.editor.getSelection()
+ if (!text.length) {
+ for (
+ var cur = this.editor.getCursor(),
+ curLine = this.editor.getLine(cur.line),
+ start = cur.ch,
+ end = start;
+ end < curLine.length && /[\w$]+/.test(curLine.charAt(end));
+
+ )
+ ++end
+ for (; start && /[\w$]+/.test(curLine.charAt(start - 1)); ) --start
+ var curWord = start != end && curLine.slice(start, end)
+ curWord &&
+ (this.editor.setSelection({ line: cur.line, ch: start }, { line: cur.line, ch: end }),
+ (text = curWord))
+ }
+ var html = replace.replace('$1', text)
+ this.editor.replaceSelection(html, 'end'), this.editor.focus()
+ },
+ replaceLine: function (replace) {
+ var pos = this.editor.getDoc().getCursor(),
+ text = this.editor.getLine(pos.line),
+ html = replace.replace('$1', text)
+ this.editor.replaceRange(html, { line: pos.line, ch: 0 }, { line: pos.line, ch: text.length }),
+ this.editor.setCursor({ line: pos.line, ch: html.length }),
+ this.editor.focus()
+ },
+ save: function () {
+ this.editor.save()
+ }
+ }),
+ (UI.components.htmleditor.template = [
+ '
'
+ ].join('')),
+ UI.plugin('htmleditor', 'base', {
+ init: function (editor) {
+ editor.addButtons({
+ fullscreen: { title: 'Fullscreen', label: '
' },
+ bold: { title: 'Bold', label: '
' },
+ italic: { title: 'Italic', label: '
' },
+ strike: { title: 'Strikethrough', label: '
' },
+ blockquote: { title: 'Blockquote', label: '
' },
+ link: { title: 'Link', label: '
' },
+ image: { title: 'Image', label: '
' },
+ listUl: { title: 'Unordered List', label: '
' },
+ listOl: { title: 'Ordered List', label: '
' }
+ }),
+ addAction('bold', '
$1 '),
+ addAction('italic', '
$1 '),
+ addAction('strike', '
$1'),
+ addAction('blockquote', '
$1
', 'replaceLine'),
+ addAction('link', '
$1 '),
+ addAction('image', '
')
+ var listfn = function () {
+ if ('html' == editor.getCursorMode()) {
+ for (
+ var cm = editor.editor,
+ pos = cm.getDoc().getCursor(!0),
+ posend = cm.getDoc().getCursor(!1),
+ i = pos.line;
+ i < posend.line + 1;
+ i++
+ )
+ cm.replaceRange(
+ '
' + cm.getLine(i) + ' ',
+ { line: i, ch: 0 },
+ { line: i, ch: cm.getLine(i).length }
+ )
+ cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length }), cm.focus()
+ }
+ }
+ function addAction (name, replace, mode) {
+ editor.on('action.' + name, function () {
+ 'html' == editor.getCursorMode() &&
+ editor['replaceLine' == mode ? 'replaceLine' : 'replaceSelection'](replace)
+ })
+ }
+ editor.on('action.listUl', function () {
+ listfn()
+ }),
+ editor.on('action.listOl', function () {
+ listfn()
+ }),
+ editor.htmleditor.on('click', 'a[data-htmleditor-button="fullscreen"]', function () {
+ editor.htmleditor.toggleClass('uk-htmleditor-fullscreen')
+ var wrap = editor.editor.getWrapperElement()
+ if (editor.htmleditor.hasClass('uk-htmleditor-fullscreen'))
+ (editor.editor.state.fullScreenRestore = {
+ scrollTop: window.pageYOffset,
+ scrollLeft: window.pageXOffset,
+ width: wrap.style.width,
+ height: wrap.style.height
+ }),
+ (wrap.style.width = ''),
+ (wrap.style.height = editor.content.height() + 'px'),
+ (document.documentElement.style.overflow = 'hidden')
+ else {
+ document.documentElement.style.overflow = ''
+ var info = editor.editor.state.fullScreenRestore
+ ;(wrap.style.width = info.width),
+ (wrap.style.height = info.height),
+ window.scrollTo(info.scrollLeft, info.scrollTop)
+ }
+ setTimeout(function () {
+ editor.fit(), UI.$win.trigger('resize')
+ }, 50)
+ }),
+ editor.addShortcut(['Ctrl-S', 'Cmd-S'], function () {
+ editor.element.trigger('htmleditor-save', [editor])
+ }),
+ editor.addShortcutAction('bold', ['Ctrl-B', 'Cmd-B'])
+ }
+ }),
+ UI.plugin('htmleditor', 'markdown', {
+ init: function (editor) {
+ var parser = editor.options.mdparser || marked || null
+ function enableMarkdown () {
+ editor.editor.setOption('mode', 'gfm'),
+ editor.htmleditor.find('.uk-htmleditor-button-code a').html(editor.options.lblMarkedview)
+ }
+ function addAction (name, replace, mode) {
+ editor.on('action.' + name, function () {
+ 'markdown' == editor.getCursorMode() &&
+ editor['replaceLine' == mode ? 'replaceLine' : 'replaceSelection'](replace)
+ })
+ }
+ parser &&
+ (editor.options.markdown && enableMarkdown(),
+ addAction('bold', '**$1**'),
+ addAction('italic', '*$1*'),
+ addAction('strike', '~~$1~~'),
+ addAction('blockquote', '> $1', 'replaceLine'),
+ addAction('link', '[$1](http://)'),
+ addAction('image', '![$1](http://)'),
+ editor.on('action.listUl', function () {
+ if ('markdown' == editor.getCursorMode()) {
+ for (
+ var cm = editor.editor,
+ pos = cm.getDoc().getCursor(!0),
+ posend = cm.getDoc().getCursor(!1),
+ i = pos.line;
+ i < posend.line + 1;
+ i++
+ )
+ cm.replaceRange('* ' + cm.getLine(i), { line: i, ch: 0 }, { line: i, ch: cm.getLine(i).length })
+ cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length }), cm.focus()
+ }
+ }),
+ editor.on('action.listOl', function () {
+ if ('markdown' == editor.getCursorMode()) {
+ var matches,
+ cm = editor.editor,
+ pos = cm.getDoc().getCursor(!0),
+ posend = cm.getDoc().getCursor(!1),
+ prefix = 1
+ 0 < pos.line &&
+ (matches = cm.getLine(pos.line - 1).match(/^(\d+)\./)) &&
+ (prefix = Number(matches[1]) + 1)
+ for (var i = pos.line; i < posend.line + 1; i++)
+ cm.replaceRange(
+ prefix + '. ' + cm.getLine(i),
+ { line: i, ch: 0 },
+ { line: i, ch: cm.getLine(i).length }
+ ),
+ prefix++
+ cm.setCursor({ line: posend.line, ch: cm.getLine(posend.line).length }), cm.focus()
+ }
+ }),
+ editor.on('renderLate', function () {
+ 'gfm' == editor.editor.options.mode && (editor.currentvalue = parser(editor.currentvalue))
+ }),
+ editor.on('cursorMode', function (e, param) {
+ if ('gfm' == editor.editor.options.mode) {
+ var pos = editor.editor.getDoc().getCursor()
+ editor.editor.getTokenAt(pos).state.base.htmlState || (param.mode = 'markdown')
+ }
+ }),
+ UI.$.extend(editor, {
+ enableMarkdown: function () {
+ enableMarkdown(), this.render()
+ },
+ disableMarkdown: function () {
+ this.editor.setOption('mode', 'htmlmixed'),
+ this.htmleditor.find('.uk-htmleditor-button-code a').html(this.options.lblCodeview),
+ this.render()
+ }
+ }),
+ editor.on({
+ enableMarkdown: function () {
+ editor.enableMarkdown()
+ },
+ disableMarkdown: function () {
+ editor.disableMarkdown()
+ }
+ }))
+ }
+ }),
+ UI.htmleditor
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var modal,
+ cache = {}
+ return (
+ UI.component('lightbox', {
+ defaults: { group: !1, duration: 400, keyboard: !0 },
+ index: 0,
+ items: !1,
+ boot: function () {
+ UI.$html.on('click', '[data-uk-lightbox]', function (e) {
+ e.preventDefault()
+ var link = UI.$(this)
+ link.data('lightbox') || UI.lightbox(link, UI.Utils.options(link.attr('data-uk-lightbox'))),
+ link.data('lightbox').show(link)
+ }),
+ UI.$doc.on('keyup', function (e) {
+ if (modal && modal.is(':visible') && modal.lightbox.options.keyboard)
+ switch ((e.preventDefault(), e.keyCode)) {
+ case 37:
+ modal.lightbox.previous()
+ break
+ case 39:
+ modal.lightbox.next()
+ }
+ })
+ },
+ init: function () {
+ var siblings = []
+ if (((this.index = 0), (this.siblings = []), this.element && this.element.length)) {
+ var domSiblings = this.options.group
+ ? UI.$(
+ [
+ '[data-uk-lightbox*="' + this.options.group + '"]',
+ "[data-uk-lightbox*='" + this.options.group + "']"
+ ].join(',')
+ )
+ : this.element
+ domSiblings.each(function () {
+ var ele = UI.$(this)
+ siblings.push({
+ source: ele.attr('href'),
+ title: ele.attr('data-title') || ele.attr('title'),
+ type: ele.attr('data-lightbox-type') || 'auto',
+ link: ele
+ })
+ }),
+ (this.index = domSiblings.index(this.element)),
+ (this.siblings = siblings)
+ } else this.options.group && this.options.group.length && (this.siblings = this.options.group)
+ this.trigger('lightbox-init', [this])
+ },
+ show: function (index) {
+ ;(this.modal = (function (lightbox) {
+ return modal
+ ? ((modal.lightbox = lightbox), modal)
+ : (((modal = UI.$(
+ [
+ '
'
+ ].join('')
+ ).appendTo('body')).dialog = modal.find('.uk-modal-dialog:first')),
+ (modal.content = modal.find('.uk-lightbox-content:first')),
+ (modal.loader = modal.find('.uk-modal-spinner:first')),
+ (modal.closer = modal.find('.uk-close.uk-close-alt')),
+ (modal.modal = UI.modal(modal, { modal: !1 })),
+ modal
+ .on('swipeRight swipeLeft', function (e) {
+ modal.lightbox['swipeLeft' == e.type ? 'next' : 'previous']()
+ })
+ .on('click', '[data-lightbox-previous], [data-lightbox-next]', function (e) {
+ e.preventDefault(),
+ modal.lightbox[UI.$(this).is('[data-lightbox-next]') ? 'next' : 'previous']()
+ }),
+ modal.on('hide.uk.modal', function (e) {
+ modal.content.html('')
+ }),
+ UI.$win.on(
+ 'load resize orientationchange',
+ UI.Utils.debounce(
+ function (e) {
+ modal.is(':visible') && !UI.Utils.isFullscreen() && modal.lightbox.fitSize()
+ }.bind(this),
+ 100
+ )
+ ),
+ (modal.lightbox = lightbox),
+ modal)
+ })(this)),
+ this.modal.dialog.stop(),
+ this.modal.content.stop()
+ var data,
+ item,
+ $this = this,
+ promise = UI.$.Deferred()
+ 'object' == typeof (index = index || 0) &&
+ this.siblings.forEach(function (s, idx) {
+ index[0] === s.link[0] && (index = idx)
+ }),
+ index < 0 ? (index = this.siblings.length - index) : this.siblings[index] || (index = 0),
+ (item = this.siblings[index]),
+ (data = {
+ lightbox: $this,
+ source: item.source,
+ type: item.type,
+ index,
+ promise,
+ title: item.title,
+ item,
+ meta: { content: '', width: null, height: null }
+ }),
+ (this.index = index),
+ this.modal.content.empty(),
+ this.modal.is(':visible') ||
+ (this.modal.content.css({ width: '', height: '' }).empty(), this.modal.modal.show()),
+ this.modal.loader.removeClass('uk-hidden'),
+ promise
+ .promise()
+ .done(function () {
+ ;($this.data = data), $this.fitSize(data)
+ })
+ .fail(function () {
+ ;(data.meta.content =
+ '
Loading resource failed!
'),
+ (data.meta.width = 400),
+ (data.meta.height = 300),
+ ($this.data = data),
+ $this.fitSize(data)
+ }),
+ $this.trigger('showitem.uk.lightbox', [data])
+ },
+ fitSize: function () {
+ var $this = this,
+ data = this.data,
+ pad = this.modal.dialog.outerWidth() - this.modal.dialog.width(),
+ dpad =
+ parseInt(this.modal.dialog.css('margin-top'), 10) +
+ parseInt(this.modal.dialog.css('margin-bottom'), 10),
+ content = data.meta.content,
+ duration = $this.options.duration
+ 1 < this.siblings.length &&
+ (content = [
+ content,
+ '
',
+ '
'
+ ].join(''))
+ var maxwidth,
+ maxheight,
+ tmp = UI.$('
').css({
+ opacity: 0,
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ width: '100%',
+ 'max-width': $this.modal.dialog.css('max-width'),
+ padding: $this.modal.dialog.css('padding'),
+ margin: $this.modal.dialog.css('margin')
+ }),
+ w = data.meta.width,
+ h = data.meta.height
+ tmp.appendTo('body').width(),
+ (maxwidth = tmp.width()),
+ (maxheight = window.innerHeight - dpad),
+ tmp.remove(),
+ this.modal.dialog.find('.uk-modal-caption').remove(),
+ data.title &&
+ (this.modal.dialog.append('
' + data.title + '
'),
+ (maxheight -= this.modal.dialog.find('.uk-modal-caption').outerHeight())),
+ maxwidth < data.meta.width && ((h = Math.floor(h * (maxwidth / w))), (w = maxwidth)),
+ maxheight < h &&
+ ((h = Math.floor(maxheight)), (w = Math.ceil(data.meta.width * (maxheight / data.meta.height)))),
+ this.modal.content
+ .css('opacity', 0)
+ .width(w)
+ .html(content),
+ 'iframe' == data.type && this.modal.content.find('iframe:first').height(h)
+ var dh = h + pad,
+ t = Math.floor(window.innerHeight / 2 - dh / 2) - dpad
+ t < 0 && (t = 0),
+ this.modal.closer.addClass('uk-hidden'),
+ $this.modal.data('mwidth') == w && $this.modal.data('mheight') == h && (duration = 0),
+ this.modal.dialog.animate(
+ { width: w + pad, height: h + pad, top: t },
+ duration,
+ 'swing',
+ function () {
+ $this.modal.loader.addClass('uk-hidden'),
+ $this.modal.content.css({ width: '' }).animate({ opacity: 1 }, function () {
+ $this.modal.closer.removeClass('uk-hidden')
+ }),
+ $this.modal.data({ mwidth: w, mheight: h })
+ }
+ )
+ },
+ next: function () {
+ this.show(this.siblings[this.index + 1] ? this.index + 1 : 0)
+ },
+ previous: function () {
+ this.show(this.siblings[this.index - 1] ? this.index - 1 : this.siblings.length - 1)
+ }
+ }),
+ UI.plugin('lightbox', 'image', {
+ init: function (lightbox) {
+ lightbox.on('showitem.uk.lightbox', function (e, data) {
+ if ('image' == data.type || (data.source && data.source.match(/\.(jpg|jpeg|png|gif|svg)$/i))) {
+ var resolve = function (source, width, height) {
+ ;(data.meta = {
+ content:
+ '
',
+ width,
+ height
+ }),
+ (data.type = 'image'),
+ data.promise.resolve()
+ }
+ if (cache[data.source]) resolve(data.source, cache[data.source].width, cache[data.source].height)
+ else {
+ var img = new Image()
+ ;(img.onerror = function () {
+ data.promise.reject('Loading image failed')
+ }),
+ (img.onload = function () {
+ ;(cache[data.source] = { width: img.width, height: img.height }),
+ resolve(data.source, cache[data.source].width, cache[data.source].height)
+ }),
+ (img.src = data.source)
+ }
+ }
+ })
+ }
+ }),
+ UI.plugin('lightbox', 'youtube', {
+ init: function (lightbox) {
+ var youtubeRegExp = /(\/\/.*?youtube\.[a-z]+)\/watch\?v=([^&]+)&?(.*)/,
+ youtubeRegExpShort = /youtu\.be\/(.*)/
+ lightbox.on('showitem.uk.lightbox', function (e, data) {
+ var id,
+ matches,
+ resolve = function (id, width, height) {
+ ;(data.meta = {
+ content:
+ '
',
+ width,
+ height
+ }),
+ (data.type = 'iframe'),
+ data.promise.resolve()
+ }
+ if (
+ ((matches = data.source.match(youtubeRegExp)) && (id = matches[2]),
+ (matches = data.source.match(youtubeRegExpShort)) && (id = matches[1]),
+ id)
+ ) {
+ if (cache[id]) resolve(id, cache[id].width, cache[id].height)
+ else {
+ var img = new Image(),
+ lowres = !1
+ ;(img.onerror = function () {
+ ;(cache[id] = { width: 640, height: 320 }), resolve(id, cache[id].width, cache[id].height)
+ }),
+ (img.onload = function () {
+ 120 == img.width && 90 == img.height
+ ? lowres
+ ? ((cache[id] = { width: 640, height: 320 }),
+ resolve(id, cache[id].width, cache[id].height))
+ : ((lowres = !0), (img.src = '//img.youtube.com/vi/' + id + '/0.jpg'))
+ : ((cache[id] = { width: img.width, height: img.height }),
+ resolve(id, img.width, img.height))
+ }),
+ (img.src = '//img.youtube.com/vi/' + id + '/maxresdefault.jpg')
+ }
+ e.stopImmediatePropagation()
+ }
+ })
+ }
+ }),
+ UI.plugin('lightbox', 'vimeo', {
+ init: function (lightbox) {
+ var matches,
+ regex = /(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/
+ lightbox.on('showitem.uk.lightbox', function (e, data) {
+ var id,
+ resolve = function (id, width, height) {
+ ;(data.meta = {
+ content:
+ '
',
+ width,
+ height
+ }),
+ (data.type = 'iframe'),
+ data.promise.resolve()
+ }
+ ;(matches = data.source.match(regex)) &&
+ ((id = matches[2]),
+ cache[id]
+ ? resolve(id, cache[id].width, cache[id].height)
+ : UI.$.ajax({
+ type: 'GET',
+ url: 'http://vimeo.com/api/oembed.json?url=' + encodeURI(data.source),
+ jsonp: 'callback',
+ dataType: 'jsonp',
+ success: function (data) {
+ ;(cache[id] = { width: data.width, height: data.height }),
+ resolve(id, cache[id].width, cache[id].height)
+ }
+ }),
+ e.stopImmediatePropagation())
+ })
+ }
+ }),
+ UI.plugin('lightbox', 'video', {
+ init: function (lightbox) {
+ lightbox.on('showitem.uk.lightbox', function (e, data) {
+ var resolve = function (source, width, height) {
+ ;(data.meta = {
+ content:
+ '
',
+ width,
+ height
+ }),
+ (data.type = 'video'),
+ data.promise.resolve()
+ }
+ if ('video' == data.type || data.source.match(/\.(mp4|webm|ogv)$/i))
+ if (cache[data.source]) resolve(data.source, cache[data.source].width, cache[data.source].height)
+ else
+ var vid = UI.$('
')
+ .attr('src', data.source)
+ .appendTo('body'),
+ idle = setInterval(function () {
+ vid[0].videoWidth &&
+ (clearInterval(idle),
+ (cache[data.source] = { width: vid[0].videoWidth, height: vid[0].videoHeight }),
+ resolve(data.source, cache[data.source].width, cache[data.source].height),
+ vid.remove())
+ }, 20)
+ })
+ }
+ }),
+ (UI.lightbox.create = function (items, options) {
+ if (items) {
+ var group = []
+ return (
+ items.forEach(function (item) {
+ group.push(
+ UI.$.extend(
+ { source: '', title: '', type: 'auto', link: !1 },
+ 'string' == typeof item ? { source: item } : item
+ )
+ )
+ }),
+ UI.lightbox(UI.$.extend({}, options, { group }))
+ )
+ }
+ }),
+ UI.lightbox
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var draggingElement,
+ hasTouch = 'ontouchstart' in window,
+ html = UI.$html,
+ touchedlists = [],
+ $win = UI.$win,
+ eStart = hasTouch ? 'touchstart' : 'mousedown',
+ eMove = hasTouch ? 'touchmove' : 'mousemove',
+ eEnd = hasTouch ? 'touchend' : 'mouseup',
+ eCancel = hasTouch ? 'touchcancel' : 'mouseup'
+ return (
+ UI.component('nestable', {
+ defaults: {
+ listBaseClass: 'uk-nestable',
+ listClass: 'uk-nestable-list',
+ listItemClass: 'uk-nestable-item',
+ dragClass: 'uk-nestable-dragged',
+ movingClass: 'uk-nestable-moving',
+ noChildrenClass: 'uk-nestable-nochildren',
+ emptyClass: 'uk-nestable-empty',
+ handleClass: '',
+ collapsedClass: 'uk-collapsed',
+ placeholderClass: 'uk-nestable-placeholder',
+ noDragClass: 'uk-nestable-nodrag',
+ group: !1,
+ maxDepth: 10,
+ threshold: 20,
+ idlethreshold: 10
+ },
+ boot: function () {
+ UI.$html.on('mousemove touchmove', function (e) {
+ if (draggingElement) {
+ var top = draggingElement.offset().top
+ top < UI.$win.scrollTop()
+ ? UI.$win.scrollTop(UI.$win.scrollTop() - Math.ceil(draggingElement.height() / 2))
+ : top + draggingElement.height() > window.innerHeight + UI.$win.scrollTop() &&
+ UI.$win.scrollTop(UI.$win.scrollTop() + Math.ceil(draggingElement.height() / 2))
+ }
+ }),
+ UI.ready(function (context) {
+ UI.$('[data-uk-nestable]', context).each(function () {
+ var ele = UI.$(this)
+ ele.data('nestable') || UI.nestable(ele, UI.Utils.options(ele.attr('data-uk-nestable')))
+ })
+ })
+ },
+ init: function () {
+ var $this = this
+ Object.keys(this.options).forEach(function (key) {
+ ;-1 != String(key).indexOf('Class') && ($this.options['_' + key] = '.' + $this.options[key])
+ }),
+ this.find(this.options._listItemClass)
+ .find('>ul')
+ .addClass(this.options.listClass),
+ this.checkEmptyList(),
+ this.reset(),
+ this.element.data('nestable-group', this.options.group || UI.Utils.uid('nestable-group')),
+ this.find(this.options._listItemClass).each(function () {
+ $this.setParent(UI.$(this))
+ }),
+ this.on('click', '[data-nestable-action]', function (e) {
+ if (!$this.dragEl && (hasTouch || 0 === e.button)) {
+ e.preventDefault()
+ var target = UI.$(e.currentTarget),
+ action = target.data('nestableAction'),
+ item = target.closest($this.options._listItemClass)
+ 'collapse' === action && $this.collapseItem(item),
+ 'expand' === action && $this.expandItem(item),
+ 'toggle' === action && $this.toggleItem(item)
+ }
+ })
+ var onStartEvent = function (e) {
+ var handle = UI.$(e.target)
+ e.target !== $this.element[0] &&
+ (handle.is($this.options._noDragClass) ||
+ handle.closest($this.options._noDragClass).length ||
+ handle.is('[data-nestable-action]') ||
+ handle.closest('[data-nestable-action]').length ||
+ ($this.options.handleClass &&
+ !handle.hasClass($this.options.handleClass) &&
+ $this.options.handleClass &&
+ (handle = handle.closest($this.options._handleClass)),
+ !handle.length ||
+ $this.dragEl ||
+ (!hasTouch && 0 !== e.button) ||
+ (hasTouch && 1 !== e.touches.length) ||
+ (e.originalEvent && e.originalEvent.touches && (e = evt.originalEvent.touches[0]),
+ ($this.delayMove = function (evt) {
+ evt.preventDefault(),
+ $this.dragStart(e),
+ $this.trigger('start.uk.nestable', [$this]),
+ ($this.delayMove = !1)
+ }),
+ ($this.delayMove.x = parseInt(e.pageX, 10)),
+ ($this.delayMove.y = parseInt(e.pageY, 10)),
+ ($this.delayMove.threshold = $this.options.idlethreshold),
+ e.preventDefault())))
+ },
+ onMoveEvent = function (e) {
+ e.originalEvent && e.originalEvent.touches && (e = e.originalEvent.touches[0]),
+ $this.delayMove &&
+ (Math.abs(e.pageX - $this.delayMove.x) > $this.delayMove.threshold ||
+ Math.abs(e.pageY - $this.delayMove.y) > $this.delayMove.threshold) &&
+ (window.getSelection().toString() ? ($this.delayMove = !1) : $this.delayMove(e)),
+ $this.dragEl &&
+ (e.preventDefault(), $this.dragMove(e), $this.trigger('move.uk.nestable', [$this]))
+ },
+ onEndEvent = function (e) {
+ $this.dragEl && (e.preventDefault(), $this.dragStop(hasTouch ? e.touches[0] : e)),
+ (draggingElement = !1),
+ ($this.delayMove = !1)
+ }
+ hasTouch
+ ? (this.element[0].addEventListener(eStart, onStartEvent, !1),
+ window.addEventListener(eMove, onMoveEvent, !1),
+ window.addEventListener(eEnd, onEndEvent, !1),
+ window.addEventListener(eCancel, onEndEvent, !1))
+ : (this.on(eStart, onStartEvent), $win.on(eMove, onMoveEvent), $win.on(eEnd, onEndEvent))
+ },
+ serialize: function () {
+ var list = this,
+ step = function (level, depth) {
+ var array = []
+ return (
+ level.children(list.options._listItemClass).each(function () {
+ for (
+ var attribute, li = UI.$(this), item = {}, sub = li.children(list.options._listClass), i = 0;
+ i < li[0].attributes.length;
+ i++
+ )
+ 0 === (attribute = li[0].attributes[i]).name.indexOf('data-') &&
+ (item[attribute.name.substr(5)] = UI.Utils.str2json(attribute.value))
+ sub.length && (item.children = step(sub, depth + 1)), array.push(item)
+ }),
+ array
+ )
+ }
+ return step(list.element, 0)
+ },
+ list: function (options) {
+ var data = [],
+ step = function (level, depth, parent) {
+ level.children(options._listItemClass).each(function (index) {
+ var li = UI.$(this),
+ item = UI.$.extend({ parent_id: parent || null, depth, order: index }, li.data()),
+ sub = li.children(options._listClass)
+ data.push(item), sub.length && step(sub, depth + 1, li.data(options.idProperty || 'id'))
+ })
+ }
+ return (options = UI.$.extend({}, this.options, options)), step(this.element, 0), data
+ },
+ reset: function () {
+ ;(this.mouse = {
+ offsetX: 0,
+ offsetY: 0,
+ startX: 0,
+ startY: 0,
+ lastX: 0,
+ lastY: 0,
+ nowX: 0,
+ nowY: 0,
+ distX: 0,
+ distY: 0,
+ dirAx: 0,
+ dirX: 0,
+ dirY: 0,
+ lastDirX: 0,
+ lastDirY: 0,
+ distAxX: 0,
+ distAxY: 0
+ }),
+ (this.moving = !1),
+ (this.dragEl = null),
+ (this.dragRootEl = null),
+ (this.dragDepth = 0),
+ (this.hasNewRoot = !1),
+ (this.pointEl = null)
+ for (var i = 0; i < touchedlists.length; i++) this.checkEmptyList(touchedlists[i])
+ touchedlists = []
+ },
+ toggleItem: function (li) {
+ this[li.hasClass(this.options.collapsedClass) ? 'expandItem' : 'collapseItem'](li)
+ },
+ expandItem: function (li) {
+ li.removeClass(this.options.collapsedClass)
+ },
+ collapseItem: function (li) {
+ li.children(this.options._listClass).length && li.addClass(this.options.collapsedClass)
+ },
+ expandAll: function () {
+ var list = this
+ this.find(list.options._listItemClass).each(function () {
+ list.expandItem(UI.$(this))
+ })
+ },
+ collapseAll: function () {
+ var list = this
+ this.find(list.options._listItemClass).each(function () {
+ list.collapseItem(UI.$(this))
+ })
+ },
+ setParent: function (li) {
+ li.children(this.options._listClass).length && li.addClass('uk-parent')
+ },
+ unsetParent: function (li) {
+ li.removeClass('uk-parent ' + this.options.collapsedClass),
+ li.children(this.options._listClass).remove()
+ },
+ dragStart: function (e) {
+ var mouse = this.mouse,
+ dragItem = UI.$(e.target).closest(this.options._listItemClass),
+ offset = dragItem.offset()
+ ;(this.placeEl = dragItem),
+ (mouse.offsetX = e.pageX - offset.left),
+ (mouse.offsetY = e.pageY - offset.top),
+ (mouse.startX = mouse.lastX = offset.left),
+ (mouse.startY = mouse.lastY = offset.top),
+ (this.dragRootEl = this.element),
+ (this.dragEl = UI.$('
')
+ .addClass(this.options.listClass + ' ' + this.options.dragClass)
+ .append(dragItem.clone())),
+ this.dragEl.css('width', dragItem.width()),
+ this.placeEl.addClass(this.options.placeholderClass),
+ (draggingElement = this.dragEl),
+ (this.tmpDragOnSiblings = [dragItem[0].previousSibling, dragItem[0].nextSibling]),
+ UI.$body.append(this.dragEl),
+ this.dragEl.css({ left: offset.left, top: offset.top })
+ var i,
+ depth,
+ items = this.dragEl.find(this.options._listItemClass)
+ for (i = 0; i < items.length; i++)
+ (depth = UI.$(items[i]).parents(this.options._listClass + ',' + this.options._listBaseClass).length) >
+ this.dragDepth && (this.dragDepth = depth)
+ html.addClass(this.options.movingClass)
+ },
+ dragStop: function (e) {
+ var el = UI.$(this.placeEl),
+ root = this.placeEl.parents(this.options._listBaseClass + ':first')
+ this.placeEl.removeClass(this.options.placeholderClass),
+ this.dragEl.remove(),
+ this.element[0] !== root[0]
+ ? (root.trigger('change.uk.nestable', [root.data('nestable'), el, 'added']),
+ this.element.trigger('change.uk.nestable', [this, el, 'removed']))
+ : this.element.trigger('change.uk.nestable', [this, el, 'moved']),
+ this.trigger('stop.uk.nestable', [this, el]),
+ this.reset(),
+ html.removeClass(this.options.movingClass)
+ },
+ dragMove: function (e) {
+ var list,
+ parent,
+ prev,
+ opt = this.options,
+ mouse = this.mouse,
+ maxDepth = this.dragRootEl ? this.dragRootEl.data('nestable').options.maxDepth : opt.maxDepth
+ this.dragEl.css({ left: e.pageX - mouse.offsetX, top: e.pageY - mouse.offsetY }),
+ (mouse.lastX = mouse.nowX),
+ (mouse.lastY = mouse.nowY),
+ (mouse.nowX = e.pageX),
+ (mouse.nowY = e.pageY),
+ (mouse.distX = mouse.nowX - mouse.lastX),
+ (mouse.distY = mouse.nowY - mouse.lastY),
+ (mouse.lastDirX = mouse.dirX),
+ (mouse.lastDirY = mouse.dirY),
+ (mouse.dirX = 0 === mouse.distX ? 0 : 0 < mouse.distX ? 1 : -1),
+ (mouse.dirY = 0 === mouse.distY ? 0 : 0 < mouse.distY ? 1 : -1)
+ var newAx = Math.abs(mouse.distX) > Math.abs(mouse.distY) ? 1 : 0
+ if (!mouse.moving) return (mouse.dirAx = newAx), void (mouse.moving = !0)
+ if (
+ (mouse.dirAx !== newAx
+ ? ((mouse.distAxX = 0), (mouse.distAxY = 0))
+ : ((mouse.distAxX += Math.abs(mouse.distX)),
+ 0 !== mouse.dirX && mouse.dirX !== mouse.lastDirX && (mouse.distAxX = 0),
+ (mouse.distAxY += Math.abs(mouse.distY)),
+ 0 !== mouse.dirY && mouse.dirY !== mouse.lastDirY && (mouse.distAxY = 0)),
+ (mouse.dirAx = newAx),
+ mouse.dirAx &&
+ mouse.distAxX >= opt.threshold &&
+ ((mouse.distAxX = 0),
+ (prev = this.placeEl.prev('li')),
+ 0 < mouse.distX &&
+ prev.length &&
+ !prev.hasClass(opt.collapsedClass) &&
+ !prev.hasClass(opt.noChildrenClass) &&
+ ((list = prev.find(opt._listClass).last()),
+ this.placeEl.parents(opt._listClass + ',' + opt._listBaseClass).length + this.dragDepth <=
+ maxDepth &&
+ (list.length
+ ? (list = prev.children(opt._listClass).last()).append(this.placeEl)
+ : ((list = UI.$('
').addClass(opt.listClass)).append(this.placeEl),
+ prev.append(list),
+ this.setParent(prev)))),
+ mouse.distX < 0 && !this.placeEl.next(opt._listItemClass).length))
+ ) {
+ var parentUl = this.placeEl.closest([opt._listBaseClass, opt._listClass].join(',')),
+ surroundingLi = parentUl.closest(opt._listItemClass)
+ surroundingLi.length &&
+ (surroundingLi.after(this.placeEl), parentUl.children().length || this.unsetParent(surroundingLi))
+ }
+ var isEmpty = !1,
+ pointX = e.pageX - (window.pageXOffset || document.scrollLeft || 0),
+ pointY = e.pageY - (window.pageYOffset || document.documentElement.scrollTop)
+ if (
+ ((this.pointEl = UI.$(document.elementFromPoint(pointX, pointY))),
+ opt.handleClass && this.pointEl.hasClass(opt.handleClass))
+ )
+ this.pointEl = this.pointEl.closest(opt._listItemClass)
+ else {
+ var nestableitem = this.pointEl.closest(opt._listItemClass)
+ nestableitem.length && (this.pointEl = nestableitem)
+ }
+ if (!this.placeEl.find(this.pointEl).length) {
+ if (this.pointEl.data('nestable') && !this.pointEl.children().length)
+ (isEmpty = !0), this.checkEmptyList(this.pointEl)
+ else if (!this.pointEl.length || !this.pointEl.hasClass(opt.listItemClass)) return
+ var pointElRoot = this.element,
+ tmpRoot = this.pointEl.closest(this.options._listBaseClass),
+ isNewRoot = pointElRoot[0] != tmpRoot[0]
+ if (!mouse.dirAx || isNewRoot || isEmpty) {
+ if (isNewRoot && opt.group !== tmpRoot.data('nestable-group')) return
+ if (
+ (touchedlists.push(pointElRoot),
+ maxDepth <
+ this.dragDepth - 1 + this.pointEl.parents(opt._listClass + ',' + opt._listBaseClass).length)
+ )
+ return
+ var before = e.pageY < this.pointEl.offset().top + this.pointEl.height() / 2
+ ;(parent = this.placeEl.parent()),
+ isEmpty
+ ? this.pointEl.append(this.placeEl)
+ : before
+ ? this.pointEl.before(this.placeEl)
+ : this.pointEl.after(this.placeEl),
+ parent.children().length || parent.data('nestable') || this.unsetParent(parent.parent()),
+ this.checkEmptyList(this.dragRootEl),
+ this.checkEmptyList(pointElRoot),
+ isNewRoot &&
+ ((this.dragRootEl = tmpRoot), (this.hasNewRoot = this.element[0] !== this.dragRootEl[0]))
+ }
+ }
+ },
+ checkEmptyList: function (list) {
+ ;(list = list ? UI.$(list) : this.element),
+ this.options.emptyClass &&
+ list[list.children().length ? 'removeClass' : 'addClass'](this.options.emptyClass)
+ }
+ }),
+ UI.nestable
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var containers = {},
+ messages = {},
+ notify = function (options) {
+ return (
+ 'string' == UI.$.type(options) && (options = { message: options }),
+ arguments[1] &&
+ (options = UI.$.extend(
+ options,
+ 'string' == UI.$.type(arguments[1]) ? { status: arguments[1] } : arguments[1]
+ )),
+ new Message(options).show()
+ )
+ },
+ Message = function (options) {
+ ;(this.options = UI.$.extend({}, Message.defaults, options)),
+ (this.uuid = UI.Utils.uid('notifymsg')),
+ (this.element = UI.$(
+ ['
'].join('')
+ ).data('notifyMessage', this)),
+ this.content(this.options.message),
+ this.options.status &&
+ (this.element.addClass('uk-notify-message-' + this.options.status),
+ (this.currentstatus = this.options.status)),
+ (this.group = this.options.group),
+ (messages[this.uuid] = this),
+ containers[this.options.pos] ||
+ (containers[this.options.pos] = UI.$(
+ '
'
+ )
+ .appendTo('body')
+ .on('click', '.uk-notify-message', function () {
+ var message = UI.$(this).data('notifyMessage')
+ message.element.trigger('manualclose.uk.notify', [message]), message.close()
+ }))
+ }
+ return (
+ UI.$.extend(Message.prototype, {
+ uuid: !1,
+ element: !1,
+ timout: !1,
+ currentstatus: '',
+ group: !1,
+ show: function () {
+ if (!this.element.is(':visible')) {
+ var $this = this
+ containers[this.options.pos].show().prepend(this.element)
+ var marginbottom = parseInt(this.element.css('margin-bottom'), 10)
+ return (
+ this.element
+ .css({ opacity: 0, 'margin-top': -1 * this.element.outerHeight(), 'margin-bottom': 0 })
+ .animate({ opacity: 1, 'margin-top': 0, 'margin-bottom': marginbottom }, function () {
+ if ($this.options.timeout) {
+ var closefn = function () {
+ $this.close()
+ }
+ ;($this.timeout = setTimeout(closefn, $this.options.timeout)),
+ $this.element.hover(
+ function () {
+ clearTimeout($this.timeout)
+ },
+ function () {
+ $this.timeout = setTimeout(closefn, $this.options.timeout)
+ }
+ )
+ }
+ }),
+ this
+ )
+ }
+ },
+ close: function (instantly) {
+ var $this = this,
+ finalize = function () {
+ $this.element.remove(),
+ containers[$this.options.pos].children().length || containers[$this.options.pos].hide(),
+ $this.options.onClose.apply($this, []),
+ $this.element.trigger('close.uk.notify', [$this]),
+ delete messages[$this.uuid]
+ }
+ this.timeout && clearTimeout(this.timeout),
+ instantly
+ ? finalize()
+ : this.element.animate(
+ { opacity: 0, 'margin-top': -1 * this.element.outerHeight(), 'margin-bottom': 0 },
+ function () {
+ finalize()
+ }
+ )
+ },
+ content: function (html) {
+ var container = this.element.find('>div')
+ return html ? (container.html(html), this) : container.html()
+ },
+ status: function (status) {
+ return status
+ ? (this.element
+ .removeClass('uk-notify-message-' + this.currentstatus)
+ .addClass('uk-notify-message-' + status),
+ (this.currentstatus = status),
+ this)
+ : this.currentstatus
+ }
+ }),
+ (Message.defaults = {
+ message: '',
+ status: '',
+ timeout: 5e3,
+ group: null,
+ pos: 'top-center',
+ onClose: function () {}
+ }),
+ (UI.notify = notify),
+ (UI.notify.message = Message),
+ (UI.notify.closeAll = function (group, instantly) {
+ var id
+ if (group) for (id in messages) group === messages[id].group && messages[id].close(instantly)
+ else for (id in messages) messages[id].close(instantly)
+ }),
+ notify
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ return (
+ UI.component('pagination', {
+ defaults: {
+ items: 1,
+ itemsOnPage: 1,
+ pages: 0,
+ displayedPages: 7,
+ edges: 1,
+ currentPage: 0,
+ lblPrev: !1,
+ lblNext: !1,
+ onSelectPage: function () {}
+ },
+ boot: function () {
+ UI.ready(function (context) {
+ UI.$('[data-uk-pagination]', context).each(function () {
+ var ele = UI.$(this)
+ ele.data('pagination') || UI.pagination(ele, UI.Utils.options(ele.attr('data-uk-pagination')))
+ })
+ })
+ },
+ init: function () {
+ var $this = this
+ ;(this.pages = this.options.pages
+ ? this.options.pages
+ : Math.ceil(this.options.items / this.options.itemsOnPage)
+ ? Math.ceil(this.options.items / this.options.itemsOnPage)
+ : 1),
+ (this.currentPage = this.options.currentPage),
+ (this.halfDisplayed = this.options.displayedPages / 2),
+ this.on('click', 'a[data-page]', function (e) {
+ e.preventDefault(), $this.selectPage(UI.$(this).data('page'))
+ }),
+ this._render()
+ },
+ _getInterval: function () {
+ return {
+ start: Math.ceil(
+ this.currentPage > this.halfDisplayed
+ ? Math.max(
+ Math.min(this.currentPage - this.halfDisplayed, this.pages - this.options.displayedPages),
+ 0
+ )
+ : 0
+ ),
+ end: Math.ceil(
+ this.currentPage > this.halfDisplayed
+ ? Math.min(this.currentPage + this.halfDisplayed, this.pages)
+ : Math.min(this.options.displayedPages, this.pages)
+ )
+ }
+ },
+ render: function (pages) {
+ ;(this.pages = pages || this.pages), this._render()
+ },
+ selectPage: function (pageIndex, pages) {
+ ;(this.currentPage = pageIndex),
+ this.render(pages),
+ this.options.onSelectPage.apply(this, [pageIndex]),
+ this.trigger('select.uk.pagination', [pageIndex, this])
+ },
+ _render: function () {
+ var i,
+ o = this.options,
+ interval = this._getInterval()
+ if (
+ (this.element.empty(),
+ o.lblPrev && this._append(this.currentPage - 1, { text: o.lblPrev }),
+ 0 < interval.start && 0 < o.edges)
+ ) {
+ var end = Math.min(o.edges, interval.start)
+ for (i = 0; i < end; i++) this._append(i)
+ o.edges < interval.start && interval.start - o.edges != 1
+ ? this.element.append('
... ')
+ : interval.start - o.edges == 1 && this._append(o.edges)
+ }
+ for (i = interval.start; i < interval.end; i++) this._append(i)
+ if (interval.end < this.pages && 0 < o.edges)
+ for (
+ this.pages - o.edges > interval.end && this.pages - o.edges - interval.end != 1
+ ? this.element.append('
... ')
+ : this.pages - o.edges - interval.end == 1 && this._append(interval.end++),
+ i = Math.max(this.pages - o.edges, interval.end);
+ i < this.pages;
+ i++
+ )
+ this._append(i)
+ o.lblNext && this._append(this.currentPage + 1, { text: o.lblNext })
+ },
+ _append: function (pageIndex, opts) {
+ var item, options
+ ;(pageIndex = pageIndex < 0 ? 0 : pageIndex < this.pages ? pageIndex : this.pages - 1),
+ (options = UI.$.extend({ text: pageIndex + 1 }, opts)),
+ (item =
+ pageIndex == this.currentPage
+ ? '
' + options.text + ' '
+ : '
' +
+ options.text +
+ ' '),
+ this.element.append(item)
+ }
+ }),
+ UI.pagination
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var parallaxes = [],
+ supports3d = !1,
+ scrolltop = 0,
+ wh = window.innerHeight,
+ checkParallaxes = function () {
+ ;(scrolltop = UI.$win.scrollTop()),
+ window.requestAnimationFrame(function () {
+ for (var i = 0; i < parallaxes.length; i++) parallaxes[i].process()
+ })
+ }
+ UI.component('parallax', {
+ defaults: { velocity: 0.5, target: !1, viewport: !1, media: !1 },
+ boot: function () {
+ ;(supports3d = (function () {
+ var has3d,
+ el = document.createElement('div'),
+ transforms = {
+ WebkitTransform: '-webkit-transform',
+ MSTransform: '-ms-transform',
+ MozTransform: '-moz-transform',
+ Transform: 'transform'
+ }
+ for (var t in (document.body.insertBefore(el, null), transforms))
+ void 0 !== el.style[t] &&
+ ((el.style[t] = 'translate3d(1px,1px,1px)'),
+ (has3d = window.getComputedStyle(el).getPropertyValue(transforms[t])))
+ return document.body.removeChild(el), void 0 !== has3d && 0 < has3d.length && 'none' !== has3d
+ })()),
+ UI.$doc.on('scrolling.uk.document', checkParallaxes),
+ UI.$win.on(
+ 'load resize orientationchange',
+ UI.Utils.debounce(function () {
+ ;(wh = window.innerHeight), checkParallaxes()
+ }, 50)
+ ),
+ UI.ready(function (context) {
+ UI.$('[data-uk-parallax]', context).each(function () {
+ var parallax = UI.$(this)
+ parallax.data('parallax') ||
+ UI.parallax(parallax, UI.Utils.options(parallax.attr('data-uk-parallax')))
+ })
+ })
+ },
+ init: function () {
+ ;(this.base = this.options.target ? UI.$(this.options.target) : this.element),
+ (this.props = {}),
+ (this.velocity = this.options.velocity || 1)
+ var reserved = ['target', 'velocity', 'viewport', 'plugins', 'media']
+ Object.keys(this.options).forEach(
+ function (prop) {
+ if (-1 === reserved.indexOf(prop)) {
+ var start,
+ end,
+ dir,
+ diff,
+ startend = String(this.options[prop]).split(',')
+ prop.match(/color/i)
+ ? ((start = startend[1] ? startend[0] : this._getStartValue(prop)),
+ (end = startend[1] ? startend[1] : startend[0]),
+ start || (start = 'rgba(255,255,255,0)'))
+ : ((diff =
+ (start = parseFloat(startend[1] ? startend[0] : this._getStartValue(prop))) <
+ (end = parseFloat(startend[1] ? startend[1] : startend[0]))
+ ? end - start
+ : start - end),
+ (dir = start < end ? 1 : -1)),
+ (this.props[prop] = { start, end, dir, diff })
+ }
+ }.bind(this)
+ ),
+ parallaxes.push(this)
+ },
+ process: function () {
+ if (this.options.media)
+ switch (typeof this.options.media) {
+ case 'number':
+ if (window.innerWidth < this.options.media) return !1
+ break
+ case 'string':
+ if (window.matchMedia && !window.matchMedia(this.options.media).matches) return !1
+ }
+ var percent = this.percentageInViewport()
+ !1 !== this.options.viewport &&
+ (percent = 0 === this.options.viewport ? 1 : percent / this.options.viewport),
+ this.update(percent)
+ },
+ percentageInViewport: function () {
+ var distance,
+ top = this.base.offset().top,
+ height = this.base.outerHeight()
+ return scrolltop + wh < top
+ ? 0
+ : top + height < scrolltop
+ ? 1
+ : top + height < wh
+ ? (scrolltop < wh ? scrolltop : scrolltop - wh) / (top + height)
+ : ((distance = scrolltop + wh - top), Math.round(distance / ((wh + height) / 100)) / 100)
+ },
+ update: function (percent) {
+ var opts,
+ val,
+ css = { transform: '' },
+ compercent = percent * (1 - (this.velocity - this.velocity * percent))
+ compercent < 0 && (compercent = 0),
+ 1 < compercent && (compercent = 1),
+ (void 0 !== this._percent && this._percent == compercent) ||
+ (Object.keys(this.props).forEach(
+ function (prop) {
+ switch (
+ ((opts = this.props[prop]),
+ 0 === percent
+ ? (val = opts.start)
+ : 1 === percent
+ ? (val = opts.end)
+ : void 0 !== opts.diff && (val = opts.start + opts.diff * compercent * opts.dir),
+ ('bg' != prop && 'bgp' != prop) ||
+ this._bgcover ||
+ (this._bgcover = (function (obj, prop, opts) {
+ var url,
+ element,
+ size,
+ check,
+ ratio,
+ width,
+ height,
+ img = new Image()
+ return (
+ (url = (element = obj.element.css({
+ 'background-size': 'cover',
+ 'background-repeat': 'no-repeat'
+ }))
+ .css('background-image')
+ .replace(/^url\(/g, '')
+ .replace(/\)$/g, '')
+ .replace(/("|')/g, '')),
+ (check = function () {
+ var w = element.innerWidth(),
+ h = element.innerHeight(),
+ extra = 'bg' == prop ? opts.diff : (opts.diff / 100) * h
+ if (((h += extra), (w += Math.ceil(extra * ratio)) - extra < size.w && h < size.h))
+ return obj.element.css({ 'background-size': 'auto' })
+ w / ratio < h
+ ? ((width = Math.ceil(h * ratio)),
+ (height = h) > window.innerHeight && ((width *= 1.2), (height *= 1.2)))
+ : ((width = w), (height = Math.ceil(w / ratio))),
+ element
+ .css({ 'background-size': width + 'px ' + height + 'px' })
+ .data('bgsize', { w: width, h: height })
+ }),
+ (img.onerror = function () {}),
+ (img.onload = function () {
+ ;(size = { w: img.width, h: img.height }),
+ (ratio = img.width / img.height),
+ UI.$win.on(
+ 'load resize orientationchange',
+ UI.Utils.debounce(function () {
+ check()
+ }, 50)
+ ),
+ check()
+ }),
+ (img.src = url),
+ !0
+ )
+ })(this, prop, opts)),
+ prop)
+ ) {
+ case 'x':
+ css.transform += supports3d
+ ? ' translate3d(' + val + 'px, 0, 0)'
+ : ' translateX(' + val + 'px)'
+ break
+ case 'xp':
+ css.transform += supports3d ? ' translate3d(' + val + '%, 0, 0)' : ' translateX(' + val + '%)'
+ break
+ case 'y':
+ css.transform += supports3d
+ ? ' translate3d(0, ' + val + 'px, 0)'
+ : ' translateY(' + val + 'px)'
+ break
+ case 'yp':
+ css.transform += supports3d ? ' translate3d(0, ' + val + '%, 0)' : ' translateY(' + val + '%)'
+ break
+ case 'rotate':
+ css.transform += ' rotate(' + val + 'deg)'
+ break
+ case 'scale':
+ css.transform += ' scale(' + val + ')'
+ break
+ case 'bg':
+ css['background-position'] = '50% ' + val + 'px'
+ break
+ case 'bgp':
+ css['background-position'] = '50% ' + val + '%'
+ break
+ case 'color':
+ case 'background-color':
+ case 'border-color':
+ css[prop] = ((start = opts.start),
+ (end = opts.end),
+ (pos = compercent),
+ (function (begin, end, pos) {
+ return (
+ 'rgba(' +
+ parseInt(begin[0] + pos * (end[0] - begin[0]), 10) +
+ ',' +
+ parseInt(begin[1] + pos * (end[1] - begin[1]), 10) +
+ ',' +
+ parseInt(begin[2] + pos * (end[2] - begin[2]), 10) +
+ ',' +
+ (begin && end ? parseFloat(begin[3] + pos * (end[3] - begin[3])) : 1) +
+ ')'
+ )
+ })((start = parseColor(start)), (end = parseColor(end)), (pos = pos || 0)))
+ break
+ default:
+ css[prop] = val
+ }
+ var start, end, pos
+ }.bind(this)
+ ),
+ this.element.css(css),
+ (this._percent = compercent))
+ },
+ _getStartValue: function (prop) {
+ var value = 0
+ switch (prop) {
+ case 'scale':
+ value = 1
+ break
+ default:
+ value = this.element.css(prop)
+ }
+ return value || 0
+ }
+ })
+ var colors = {
+ black: [0, 0, 0, 1],
+ blue: [0, 0, 255, 1],
+ brown: [165, 42, 42, 1],
+ cyan: [0, 255, 255, 1],
+ fuchsia: [255, 0, 255, 1],
+ gold: [255, 215, 0, 1],
+ green: [0, 128, 0, 1],
+ indigo: [75, 0, 130, 1],
+ khaki: [240, 230, 140, 1],
+ lime: [0, 255, 0, 1],
+ magenta: [255, 0, 255, 1],
+ maroon: [128, 0, 0, 1],
+ navy: [0, 0, 128, 1],
+ olive: [128, 128, 0, 1],
+ orange: [255, 165, 0, 1],
+ pink: [255, 192, 203, 1],
+ purple: [128, 0, 128, 1],
+ violet: [128, 0, 128, 1],
+ red: [255, 0, 0, 1],
+ silver: [192, 192, 192, 1],
+ white: [255, 255, 255, 1],
+ yellow: [255, 255, 0, 1],
+ transparent: [255, 255, 255, 0]
+ }
+ function parseColor (color) {
+ var match
+ return (match = /#([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})/.exec(color))
+ ? [parseInt(match[1], 16), parseInt(match[2], 16), parseInt(match[3], 16), 1]
+ : (match = /#([0-9a-fA-F])([0-9a-fA-F])([0-9a-fA-F])/.exec(color))
+ ? [17 * parseInt(match[1], 16), 17 * parseInt(match[2], 16), 17 * parseInt(match[3], 16), 1]
+ : (match = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(color))
+ ? [parseInt(match[1]), parseInt(match[2]), parseInt(match[3]), 1]
+ : (match = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9\.]*)\s*\)/.exec(
+ color
+ ))
+ ? [parseInt(match[1], 10), parseInt(match[2], 10), parseInt(match[3], 10), parseFloat(match[4])]
+ : colors[color] || [255, 255, 255, 0]
+ }
+ return UI.parallax
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ var parallaxes = [],
+ checkParallaxes = function () {
+ requestAnimationFrame(function () {
+ for (var i = 0; i < parallaxes.length; i++) parallaxes[i].process()
+ })
+ }
+ function getcolumns (element) {
+ for (
+ var children = element.children(),
+ first = children.filter(':visible:first'),
+ top = first[0].offsetTop + first.outerHeight(),
+ column = 0;
+ column < children.length && !(children[column].offsetTop >= top);
+ column++
+ );
+ return column || 1
+ }
+ UI.component('gridparallax', {
+ defaults: { target: !1, smooth: 150, translate: 150 },
+ boot: function () {
+ UI.$doc.on('scrolling.uk.document', checkParallaxes),
+ UI.$win.on(
+ 'load resize orientationchange',
+ UI.Utils.debounce(function () {
+ checkParallaxes()
+ }, 50)
+ ),
+ UI.ready(function (context) {
+ UI.$('[data-uk-grid-parallax]', context).each(function () {
+ var parallax = UI.$(this)
+ parallax.data('gridparallax') ||
+ UI.gridparallax(parallax, UI.Utils.options(parallax.attr('data-uk-grid-parallax')))
+ })
+ })
+ },
+ init: function () {
+ var fn,
+ $this = this
+ this.initItems().process(),
+ parallaxes.push(this),
+ UI.$win.on(
+ 'load resize orientationchange',
+ ((fn = function () {
+ var columns = getcolumns($this.element)
+ $this.element.css('margin-bottom', ''),
+ 1 < columns &&
+ $this.element.css(
+ 'margin-bottom',
+ $this.options.translate + parseInt($this.element.css('margin-bottom'))
+ )
+ }),
+ UI.$(function () {
+ fn()
+ }),
+ UI.Utils.debounce(fn, 50))
+ )
+ },
+ initItems: function () {
+ var smooth = this.options.smooth
+ return (
+ (this.items = (this.options.target
+ ? this.element.find(this.options.target)
+ : this.element.children()
+ ).each(function () {
+ UI.$(this).css({ transition: 'transform ' + smooth + 'ms linear', transform: '' })
+ })),
+ this
+ )
+ },
+ process: function () {
+ var percent = (function (element) {
+ var distance,
+ percent,
+ top = element.offset().top,
+ height = element.outerHeight(),
+ scrolltop = UIkit.$win.scrollTop(),
+ wh = window.innerHeight
+ return (
+ scrolltop + wh < top
+ ? (percent = 0)
+ : top + height < scrolltop
+ ? (percent = 1)
+ : ((percent =
+ top + height < wh
+ ? (scrolltop < wh ? scrolltop : scrolltop - wh) / (top + height)
+ : ((distance = scrolltop + wh - top), Math.round(distance / ((wh + height) / 100)) / 100)),
+ top < wh && (percent = (percent * scrolltop) / (top + height - wh))),
+ 1 < percent ? 1 : percent
+ )
+ })(this.element),
+ columns = getcolumns(this.element),
+ items = this.items,
+ mods = [columns - 1]
+ if (1 != columns && percent) {
+ for (; mods.length < columns && mods[mods.length - 1] - 2; ) mods.push(mods[mods.length - 1] - 2)
+ var percenttranslate = percent * this.options.translate
+ items.each(function (idx, ele, translate) {
+ ;(translate = -1 != mods.indexOf((idx + 1) % columns) ? percenttranslate : percenttranslate / 8),
+ UI.$(this).css('transform', 'translate3d(0,' + translate + 'px, 0)')
+ })
+ } else items.css('transform', '')
+ }
+ })
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ UI.component('search', {
+ defaults: {
+ msgResultsHeader: 'Search Results',
+ msgMoreResults: 'More Results',
+ msgNoResults: 'No results found',
+ template:
+ '
',
+ renderer: function (data) {
+ var opts = this.options
+ this.dropdown.append(
+ this.template({
+ items: data.results || [],
+ msgResultsHeader: opts.msgResultsHeader,
+ msgMoreResults: opts.msgMoreResults,
+ msgNoResults: opts.msgNoResults
+ })
+ ),
+ this.show()
+ }
+ },
+ boot: function () {
+ UI.$html.on('focus.search.uikit', '[data-uk-search]', function (e) {
+ var ele = UI.$(this)
+ ele.data('search') || UI.search(ele, UI.Utils.options(ele.attr('data-uk-search')))
+ })
+ },
+ init: function () {
+ var $this = this
+ ;(this.autocomplete = UI.autocomplete(this.element, this.options)),
+ this.autocomplete.dropdown.addClass('uk-dropdown-search'),
+ this.autocomplete.input
+ .on('keyup', function () {
+ $this.element[$this.autocomplete.input.val() ? 'addClass' : 'removeClass']('uk-active')
+ })
+ .closest('form')
+ .on('reset', function () {
+ ;($this.value = ''), $this.element.removeClass('uk-active')
+ }),
+ this.on('selectitem.uk.autocomplete', function (e, data) {
+ data.url
+ ? (location.href = data.url)
+ : data.moreresults && $this.autocomplete.input.closest('form').submit()
+ }),
+ this.element.data('search', this)
+ }
+ })
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var dragging,
+ delayIdle,
+ anchor,
+ dragged,
+ store = {}
+ return (
+ UI.component('slider', {
+ defaults: {
+ center: !1,
+ threshold: 10,
+ infinite: !0,
+ autoplay: !1,
+ autoplayInterval: 7e3,
+ pauseOnHover: !0,
+ activecls: 'uk-active'
+ },
+ boot: function () {
+ UI.ready(function (context) {
+ setTimeout(function () {
+ UI.$('[data-uk-slider]', context).each(function () {
+ var ele = UI.$(this)
+ ele.data('slider') || UI.slider(ele, UI.Utils.options(ele.attr('data-uk-slider')))
+ })
+ }, 0)
+ })
+ },
+ init: function () {
+ var $this = this
+ ;(this.container = this.element.find('.uk-slider')),
+ (this.focus = 0),
+ UI.$win.on(
+ 'resize load',
+ UI.Utils.debounce(function () {
+ $this.resize(!0)
+ }, 100)
+ ),
+ this.on('click.uk.slider', '[data-uk-slider-item]', function (e) {
+ e.preventDefault()
+ var item = UI.$(this).attr('data-uk-slider-item')
+ if ($this.focus != item)
+ switch (($this.stop(), item)) {
+ case 'next':
+ case 'previous':
+ $this['next' == item ? 'next' : 'previous']()
+ break
+ default:
+ $this.updateFocus(parseInt(item, 10))
+ }
+ }),
+ this.container.on({
+ 'touchstart mousedown': function (evt) {
+ evt.originalEvent && evt.originalEvent.touches && (evt = evt.originalEvent.touches[0]),
+ (evt.button && 2 == evt.button) ||
+ !$this.active ||
+ ($this.stop(),
+ (anchor = UI.$(evt.target).is('a') ? UI.$(evt.target) : UI.$(evt.target).parents('a:first')),
+ (dragged = !1),
+ anchor.length &&
+ anchor.one('click', function (e) {
+ dragged && e.preventDefault()
+ }),
+ ((delayIdle = function (e) {
+ ;(dragged = !0),
+ (dragging = $this),
+ (store = {
+ touchx: parseInt(e.pageX, 10),
+ dir: 1,
+ focus: $this.focus,
+ base: $this.options.center ? 'center' : 'area'
+ }),
+ e.originalEvent && e.originalEvent.touches && (e = e.originalEvent.touches[0]),
+ dragging.element.data({
+ 'pointer-start': { x: parseInt(e.pageX, 10), y: parseInt(e.pageY, 10) },
+ 'pointer-pos-start': $this.pos
+ }),
+ $this.container.addClass('uk-drag'),
+ (delayIdle = !1)
+ }).x = parseInt(evt.pageX, 10)),
+ (delayIdle.threshold = $this.options.threshold))
+ },
+ mouseenter: function () {
+ $this.options.pauseOnHover && ($this.hovering = !0)
+ },
+ mouseleave: function () {
+ $this.hovering = !1
+ }
+ }),
+ this.resize(!0),
+ this.on('display.uk.check', function () {
+ $this.element.is(':visible') && $this.resize(!0)
+ }),
+ this.element.find('a,img').attr('draggable', 'false'),
+ this.options.autoplay && this.start()
+ },
+ resize: function (focus) {
+ var item,
+ width,
+ cwidth,
+ size,
+ $this = this,
+ pos = 0,
+ maxheight = 0
+ if (
+ ((this.items = this.container.children().filter(':visible')),
+ (this.vp = this.element[0].getBoundingClientRect().width),
+ this.container.css({ 'min-width': '', 'min-height': '' }),
+ this.items.each(function (idx) {
+ ;(item = UI.$(this)),
+ (size = item.css({ left: '', width: '' })[0].getBoundingClientRect()),
+ (width = size.width),
+ (cwidth = item.width()),
+ (maxheight = Math.max(maxheight, size.height)),
+ item
+ .css({ left: pos, width })
+ .data({
+ idx,
+ left: pos,
+ width,
+ cwidth,
+ area: pos + width,
+ center: pos - ($this.vp / 2 - cwidth / 2)
+ }),
+ (pos += width)
+ }),
+ this.container.css({ 'min-width': pos, 'min-height': maxheight }),
+ this.options.infinite && (pos <= 2 * this.vp || this.items.length < 5) && !this.itemsResized)
+ )
+ return (
+ this.container
+ .children()
+ .each(function (idx) {
+ $this.container.append(
+ $this.items
+ .eq(idx)
+ .clone(!0)
+ .attr('id', '')
+ )
+ })
+ .each(function (idx) {
+ $this.container.append(
+ $this.items
+ .eq(idx)
+ .clone(!0)
+ .attr('id', '')
+ )
+ }),
+ (this.itemsResized = !0),
+ this.resize()
+ )
+ ;(this.cw = pos),
+ (this.pos = 0),
+ (this.active = pos >= this.vp),
+ this.container.css({ '-ms-transform': '', '-webkit-transform': '', transform: '' }),
+ focus && this.updateFocus(this.focus)
+ },
+ updatePos: function (pos) {
+ ;(this.pos = pos),
+ this.container.css({
+ '-ms-transform': 'translateX(' + pos + 'px)',
+ '-webkit-transform': 'translateX(' + pos + 'px)',
+ transform: 'translateX(' + pos + 'px)'
+ })
+ },
+ updateFocus: function (idx, dir) {
+ if (this.active) {
+ dir = dir || (idx > this.focus ? 1 : -1)
+ var area,
+ i,
+ item = this.items.eq(idx)
+ if ((this.options.infinite && this.infinite(idx, dir), this.options.center))
+ this.updatePos(-1 * item.data('center')),
+ this.items.filter('.' + this.options.activecls).removeClass(this.options.activecls),
+ item.addClass(this.options.activecls)
+ else if (this.options.infinite) this.updatePos(-1 * item.data('left'))
+ else {
+ for (area = 0, i = idx; i < this.items.length; i++) area += this.items.eq(i).data('width')
+ if (area > this.vp) this.updatePos(-1 * item.data('left'))
+ else if (1 == dir) {
+ for (area = 0, i = this.items.length - 1; 0 <= i; i--) {
+ if ((area += this.items.eq(i).data('width')) == this.vp) {
+ idx = i
+ break
+ }
+ if (area > this.vp) {
+ idx = i < this.items.length - 1 ? i + 1 : i
+ break
+ }
+ }
+ area > this.vp
+ ? this.updatePos(-1 * (this.container.width() - this.vp))
+ : this.updatePos(-1 * this.items.eq(idx).data('left'))
+ }
+ }
+ var left = this.items.eq(idx).data('left')
+ this.items.removeClass('uk-slide-before uk-slide-after').each(function (i) {
+ i !== idx &&
+ UI.$(this).addClass(UI.$(this).data('left') < left ? 'uk-slide-before' : 'uk-slide-after')
+ }),
+ (this.focus = idx),
+ this.trigger('focusitem.uk.slider', [idx, this.items.eq(idx), this])
+ }
+ },
+ next: function () {
+ var focus = this.items[this.focus + 1] ? this.focus + 1 : this.options.infinite ? 0 : this.focus
+ this.updateFocus(focus, 1)
+ },
+ previous: function () {
+ var focus = this.items[this.focus - 1]
+ ? this.focus - 1
+ : this.options.infinite
+ ? this.items[this.focus - 1]
+ ? this.items - 1
+ : this.items.length - 1
+ : this.focus
+ this.updateFocus(focus, -1)
+ },
+ start: function () {
+ this.stop()
+ var $this = this
+ this.interval = setInterval(function () {
+ $this.hovering || $this.next()
+ }, this.options.autoplayInterval)
+ },
+ stop: function () {
+ this.interval && clearInterval(this.interval)
+ },
+ infinite: function (baseidx, direction) {
+ var i,
+ $this = this,
+ item = this.items.eq(baseidx),
+ z = baseidx,
+ move = [],
+ area = 0
+ if (1 == direction) {
+ for (
+ i = 0;
+ i < this.items.length &&
+ (z != baseidx && ((area += this.items.eq(z).data('width')), move.push(this.items.eq(z))),
+ !(area > this.vp));
+ i++
+ )
+ z = z + 1 == this.items.length ? 0 : z + 1
+ move.length &&
+ move.forEach(function (itm) {
+ var left = item.data('area')
+ itm
+ .css({ left })
+ .data({
+ left,
+ area: left + itm.data('width'),
+ center: left - ($this.vp / 2 - itm.data('cwidth') / 2)
+ }),
+ (item = itm)
+ })
+ } else {
+ for (
+ i = this.items.length - 1;
+ -1 < i &&
+ ((area += this.items.eq(z).data('width')),
+ z != baseidx && move.push(this.items.eq(z)),
+ !(area > this.vp));
+ i--
+ )
+ z = z - 1 == -1 ? this.items.length - 1 : z - 1
+ move.length &&
+ move.forEach(function (itm) {
+ var left = item.data('left') - itm.data('width')
+ itm
+ .css({ left })
+ .data({
+ left,
+ area: left + itm.data('width'),
+ center: left - ($this.vp / 2 - itm.data('cwidth') / 2)
+ }),
+ (item = itm)
+ })
+ }
+ }
+ }),
+ UI.$doc.on('mousemove.uk.slider touchmove.uk.slider', function (e) {
+ if (
+ (e.originalEvent && e.originalEvent.touches && (e = e.originalEvent.touches[0]),
+ delayIdle &&
+ Math.abs(e.pageX - delayIdle.x) > delayIdle.threshold &&
+ (window.getSelection().toString() ? (dragging = delayIdle = !1) : delayIdle(e)),
+ dragging)
+ ) {
+ var x, xDiff, pos, dir, focus, item, diff, i, z, itm
+ if (
+ (e.clientX || e.clientY
+ ? (x = e.clientX)
+ : (e.pageX || e.pageY) &&
+ (x = e.pageX - document.body.scrollLeft - document.documentElement.scrollLeft),
+ (focus = store.focus),
+ (xDiff = x - dragging.element.data('pointer-start').x),
+ (pos = dragging.element.data('pointer-pos-start') + xDiff),
+ (dir = x > dragging.element.data('pointer-start').x ? -1 : 1),
+ (item = dragging.items.eq(store.focus)),
+ 1 == dir)
+ )
+ for (
+ diff = item.data('left') + Math.abs(xDiff), i = 0, z = store.focus;
+ i < dragging.items.length;
+ i++
+ ) {
+ if (
+ ((itm = dragging.items.eq(z)),
+ z != store.focus && itm.data('left') < diff && itm.data('area') > diff)
+ ) {
+ focus = z
+ break
+ }
+ z = z + 1 == dragging.items.length ? 0 : z + 1
+ }
+ else
+ for (
+ diff = item.data('left') - Math.abs(xDiff), i = 0, z = store.focus;
+ i < dragging.items.length;
+ i++
+ ) {
+ if (
+ ((itm = dragging.items.eq(z)),
+ z != store.focus && itm.data('area') <= item.data('left') && itm.data('center') < diff)
+ ) {
+ focus = z
+ break
+ }
+ z = z - 1 == -1 ? dragging.items.length - 1 : z - 1
+ }
+ dragging.options.infinite && focus != store._focus && dragging.infinite(focus, dir),
+ dragging.updatePos(pos),
+ (store.dir = dir),
+ (store._focus = focus),
+ (store.touchx = parseInt(e.pageX, 10)),
+ (store.diff = diff)
+ }
+ }),
+ UI.$doc.on('mouseup.uk.slider touchend.uk.slider', function (e) {
+ if (dragging) {
+ dragging.container.removeClass('uk-drag'), dragging.items.eq(store.focus)
+ var itm,
+ i,
+ z,
+ focus = !1
+ if (1 == store.dir)
+ for (i = 0, z = store.focus; i < dragging.items.length; i++) {
+ if (((itm = dragging.items.eq(z)), z != store.focus && itm.data('left') > store.diff)) {
+ focus = z
+ break
+ }
+ z = z + 1 == dragging.items.length ? 0 : z + 1
+ }
+ else
+ for (i = 0, z = store.focus; i < dragging.items.length; i++) {
+ if (((itm = dragging.items.eq(z)), z != store.focus && itm.data('left') < store.diff)) {
+ focus = z
+ break
+ }
+ z = z - 1 == -1 ? dragging.items.length - 1 : z - 1
+ }
+ dragging.updateFocus(!1 !== focus ? focus : store._focus)
+ }
+ dragging = delayIdle = !1
+ }),
+ UI.slider
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ (__WEBPACK_LOCAL_MODULE_16__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__]))
+ })(function (UI) {
+ 'use strict'
+ var Animations,
+ playerId = 0
+ UI.component('slideshow', {
+ defaults: {
+ animation: 'fade',
+ duration: 500,
+ height: 'auto',
+ start: 0,
+ autoplay: !1,
+ autoplayInterval: 7e3,
+ videoautoplay: !0,
+ videomute: !0,
+ slices: 15,
+ pauseOnHover: !0,
+ kenburns: !1,
+ kenburnsanimations: [
+ 'uk-animation-middle-left',
+ 'uk-animation-top-right',
+ 'uk-animation-bottom-left',
+ 'uk-animation-top-center',
+ '',
+ 'uk-animation-bottom-right'
+ ]
+ },
+ current: !1,
+ interval: null,
+ hovering: !1,
+ boot: function () {
+ UI.ready(function (context) {
+ UI.$('[data-uk-slideshow]', context).each(function () {
+ var slideshow = UI.$(this)
+ slideshow.data('slideshow') ||
+ UI.slideshow(slideshow, UI.Utils.options(slideshow.attr('data-uk-slideshow')))
+ })
+ })
+ },
+ init: function () {
+ var canvas,
+ kbanimduration,
+ $this = this
+ ;(this.container = this.element.hasClass('uk-slideshow')
+ ? this.element
+ : UI.$(this.find('.uk-slideshow'))),
+ (this.slides = this.container.children()),
+ (this.slidesCount = this.slides.length),
+ (this.current = this.options.start),
+ (this.animating = !1),
+ (this.triggers = this.find('[data-uk-slideshow-item]')),
+ (this.fixFullscreen =
+ navigator.userAgent.match(/(iPad|iPhone|iPod)/g) &&
+ this.container.hasClass('uk-slideshow-fullscreen')),
+ this.options.kenburns &&
+ ((kbanimduration = !0 === this.options.kenburns ? '15s' : this.options.kenburns),
+ String(kbanimduration).match(/(ms|s)$/) || (kbanimduration += 'ms'),
+ 'string' == typeof this.options.kenburnsanimations &&
+ (this.options.kenburnsanimations = this.options.kenburnsanimations.split(','))),
+ this.slides.each(function (index) {
+ var slide = UI.$(this),
+ media = slide.children('img,video,iframe').eq(0)
+ if ((slide.data('media', media), slide.data('sizer', media), media.length)) {
+ var placeholder
+ switch (media[0].nodeName) {
+ case 'IMG':
+ var cover = UI.$('
').css({
+ 'background-image': 'url(' + media.attr('src') + ')'
+ })
+ media.attr('width') &&
+ media.attr('height') &&
+ ((placeholder = UI.$('
').attr({
+ width: media.attr('width'),
+ height: media.attr('height')
+ })),
+ media.replaceWith(placeholder),
+ (media = placeholder),
+ (placeholder = void 0)),
+ media.css({ width: '100%', height: 'auto', opacity: 0 }),
+ slide.prepend(cover).data('cover', cover)
+ break
+ case 'IFRAME':
+ var src = media[0].src,
+ iframeId = 'sw-' + ++playerId
+ media
+ .attr('src', '')
+ .on('load', function () {
+ if (
+ ((index !== $this.current || (index == $this.current && !$this.options.videoautoplay)) &&
+ $this.pausemedia(media),
+ $this.options.videomute)
+ ) {
+ $this.mutemedia(media)
+ var inv = setInterval(
+ ((ic = 0),
+ function () {
+ $this.mutemedia(media), 4 <= ++ic && clearInterval(inv)
+ }),
+ 250
+ )
+ }
+ var ic
+ })
+ .data('slideshow', $this)
+ .attr('data-player-id', iframeId)
+ .attr(
+ 'src',
+ [src, -1 < src.indexOf('?') ? '&' : '?', 'enablejsapi=1&api=1&player_id=' + iframeId].join(
+ ''
+ )
+ )
+ .addClass('uk-position-absolute'),
+ UI.support.touch || media.css('pointer-events', 'none'),
+ (placeholder = !0),
+ UI.cover && (UI.cover(media), media.attr('data-uk-cover', '{}'))
+ break
+ case 'VIDEO':
+ media.addClass('uk-cover-object uk-position-absolute'),
+ (placeholder = !0),
+ $this.options.videomute && $this.mutemedia(media)
+ }
+ if (placeholder) {
+ canvas = UI.$('
').attr({ width: media[0].width, height: media[0].height })
+ var img = UI.$('
').attr('src', canvas[0].toDataURL())
+ slide.prepend(img), slide.data('sizer', img)
+ }
+ } else slide.data('sizer', slide)
+ $this.hasKenBurns(slide) &&
+ slide
+ .data('cover')
+ .css({ '-webkit-animation-duration': kbanimduration, 'animation-duration': kbanimduration })
+ }),
+ this.on('click.uk.slideshow', '[data-uk-slideshow-item]', function (e) {
+ e.preventDefault()
+ var slide = UI.$(this).attr('data-uk-slideshow-item')
+ if ($this.current != slide) {
+ switch (slide) {
+ case 'next':
+ case 'previous':
+ $this['next' == slide ? 'next' : 'previous']()
+ break
+ default:
+ $this.show(parseInt(slide, 10))
+ }
+ $this.stop()
+ }
+ }),
+ this.slides
+ .attr('aria-hidden', 'true')
+ .eq(this.current)
+ .addClass('uk-active')
+ .attr('aria-hidden', 'false'),
+ this.triggers.filter('[data-uk-slideshow-item="' + this.current + '"]').addClass('uk-active'),
+ UI.$win.on(
+ 'resize load',
+ UI.Utils.debounce(function () {
+ $this.resize(),
+ $this.fixFullscreen &&
+ ($this.container.css('height', window.innerHeight),
+ $this.slides.css('height', window.innerHeight))
+ }, 100)
+ ),
+ setTimeout(function () {
+ $this.resize()
+ }, 80),
+ this.options.autoplay && this.start(),
+ this.options.videoautoplay &&
+ this.slides.eq(this.current).data('media') &&
+ this.playmedia(this.slides.eq(this.current).data('media')),
+ this.options.kenburns && this.applyKenBurns(this.slides.eq(this.current)),
+ this.container.on({
+ mouseenter: function () {
+ $this.options.pauseOnHover && ($this.hovering = !0)
+ },
+ mouseleave: function () {
+ $this.hovering = !1
+ }
+ }),
+ this.on('swipeRight swipeLeft', function (e) {
+ $this['swipeLeft' == e.type ? 'next' : 'previous']()
+ }),
+ this.on('display.uk.check', function () {
+ $this.element.is(':visible') &&
+ ($this.resize(),
+ $this.fixFullscreen &&
+ ($this.container.css('height', window.innerHeight),
+ $this.slides.css('height', window.innerHeight)))
+ })
+ },
+ resize: function () {
+ if (!this.container.hasClass('uk-slideshow-fullscreen')) {
+ var height = this.options.height
+ 'auto' === this.options.height &&
+ ((height = 0),
+ this.slides.css('height', '').each(function () {
+ height = Math.max(height, UI.$(this).height())
+ })),
+ this.container.css('height', height),
+ this.slides.css('height', height)
+ }
+ },
+ show: function (index, direction) {
+ if (!this.animating && this.current != index) {
+ this.animating = !0
+ var $this = this,
+ current = this.slides.eq(this.current),
+ next = this.slides.eq(index),
+ dir = direction || (this.current < index ? 1 : -1),
+ currentmedia = current.data('media'),
+ animation = Animations[this.options.animation] ? this.options.animation : 'fade',
+ nextmedia = next.data('media')
+ $this.applyKenBurns(next),
+ UI.support.animation || (animation = 'none'),
+ (current = UI.$(current)),
+ (next = UI.$(next)),
+ $this.trigger('beforeshow.uk.slideshow', [next, current, $this]),
+ Animations[animation].apply(this, [current, next, dir]).then(function () {
+ $this.animating &&
+ (currentmedia && currentmedia.is('video,iframe') && $this.pausemedia(currentmedia),
+ nextmedia && nextmedia.is('video,iframe') && $this.playmedia(nextmedia),
+ next.addClass('uk-active').attr('aria-hidden', 'false'),
+ current.removeClass('uk-active').attr('aria-hidden', 'true'),
+ ($this.animating = !1),
+ ($this.current = index),
+ UI.Utils.checkDisplay(
+ next,
+ '[class*="uk-animation-"]:not(.uk-cover-background.uk-position-cover)'
+ ),
+ $this.trigger('show.uk.slideshow', [next, current, $this]))
+ }),
+ $this.triggers.removeClass('uk-active'),
+ $this.triggers.filter('[data-uk-slideshow-item="' + index + '"]').addClass('uk-active')
+ }
+ },
+ applyKenBurns: function (slide) {
+ if (this.hasKenBurns(slide)) {
+ var animations = this.options.kenburnsanimations,
+ index = this.kbindex || 0
+ slide
+ .data('cover')
+ .attr('class', 'uk-cover-background uk-position-cover')
+ .width(),
+ slide
+ .data('cover')
+ .addClass(['uk-animation-scale', 'uk-animation-reverse', animations[index].trim()].join(' ')),
+ (this.kbindex = animations[index + 1] ? index + 1 : 0)
+ }
+ },
+ hasKenBurns: function (slide) {
+ return this.options.kenburns && slide.data('cover')
+ },
+ next: function () {
+ this.show(this.slides[this.current + 1] ? this.current + 1 : 0, 1)
+ },
+ previous: function () {
+ this.show(this.slides[this.current - 1] ? this.current - 1 : this.slides.length - 1, -1)
+ },
+ start: function () {
+ this.stop()
+ var $this = this
+ this.interval = setInterval(function () {
+ $this.hovering || $this.next()
+ }, this.options.autoplayInterval)
+ },
+ stop: function () {
+ this.interval && clearInterval(this.interval)
+ },
+ playmedia: function (media) {
+ if (media && media[0])
+ switch (media[0].nodeName) {
+ case 'VIDEO':
+ this.options.videomute || (media[0].muted = !1), media[0].play()
+ break
+ case 'IFRAME':
+ this.options.videomute ||
+ media[0].contentWindow.postMessage(
+ '{ "event": "command", "func": "unmute", "method":"setVolume", "value":1}',
+ '*'
+ ),
+ media[0].contentWindow.postMessage(
+ '{ "event": "command", "func": "playVideo", "method":"play"}',
+ '*'
+ )
+ }
+ },
+ pausemedia: function (media) {
+ switch (media[0].nodeName) {
+ case 'VIDEO':
+ media[0].pause()
+ break
+ case 'IFRAME':
+ media[0].contentWindow.postMessage(
+ '{ "event": "command", "func": "pauseVideo", "method":"pause"}',
+ '*'
+ )
+ }
+ },
+ mutemedia: function (media) {
+ switch (media[0].nodeName) {
+ case 'VIDEO':
+ media[0].muted = !0
+ break
+ case 'IFRAME':
+ media[0].contentWindow.postMessage(
+ '{ "event": "command", "func": "mute", "method":"setVolume", "value":0}',
+ '*'
+ )
+ }
+ }
+ }),
+ (Animations = {
+ none: function () {
+ var d = UI.$.Deferred()
+ return d.resolve(), d.promise()
+ },
+ scroll: function (current, next, dir) {
+ var d = UI.$.Deferred()
+ return (
+ current.css('animation-duration', this.options.duration + 'ms'),
+ next.css('animation-duration', this.options.duration + 'ms'),
+ next.css('opacity', 1).one(
+ UI.support.animation.end,
+ function () {
+ current.removeClass(
+ -1 == dir ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out'
+ ),
+ next
+ .css('opacity', '')
+ .removeClass(
+ -1 == dir ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in'
+ ),
+ d.resolve()
+ }.bind(this)
+ ),
+ current.addClass(-1 == dir ? 'uk-slideshow-scroll-backward-out' : 'uk-slideshow-scroll-forward-out'),
+ next.addClass(-1 == dir ? 'uk-slideshow-scroll-backward-in' : 'uk-slideshow-scroll-forward-in'),
+ next.width(),
+ d.promise()
+ )
+ },
+ swipe: function (current, next, dir) {
+ var d = UI.$.Deferred()
+ return (
+ current.css('animation-duration', this.options.duration + 'ms'),
+ next.css('animation-duration', this.options.duration + 'ms'),
+ next.css('opacity', 1).one(
+ UI.support.animation.end,
+ function () {
+ current.removeClass(
+ -1 === dir ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out'
+ ),
+ next
+ .css('opacity', '')
+ .removeClass(-1 === dir ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in'),
+ d.resolve()
+ }.bind(this)
+ ),
+ current.addClass(-1 == dir ? 'uk-slideshow-swipe-backward-out' : 'uk-slideshow-swipe-forward-out'),
+ next.addClass(-1 == dir ? 'uk-slideshow-swipe-backward-in' : 'uk-slideshow-swipe-forward-in'),
+ next.width(),
+ d.promise()
+ )
+ },
+ scale: function (current, next, dir) {
+ var d = UI.$.Deferred()
+ return (
+ current.css('animation-duration', this.options.duration + 'ms'),
+ next.css('animation-duration', this.options.duration + 'ms'),
+ next.css('opacity', 1),
+ current.one(
+ UI.support.animation.end,
+ function () {
+ current.removeClass('uk-slideshow-scale-out'), next.css('opacity', ''), d.resolve()
+ }.bind(this)
+ ),
+ current.addClass('uk-slideshow-scale-out'),
+ current.width(),
+ d.promise()
+ )
+ },
+ fade: function (current, next, dir) {
+ var d = UI.$.Deferred()
+ return (
+ current.css('animation-duration', this.options.duration + 'ms'),
+ next.css('animation-duration', this.options.duration + 'ms'),
+ next.css('opacity', 1),
+ next.data('cover') ||
+ next.data('placeholder') ||
+ next
+ .css('opacity', 1)
+ .one(UI.support.animation.end, function () {
+ next.removeClass('uk-slideshow-fade-in')
+ })
+ .addClass('uk-slideshow-fade-in'),
+ current.one(
+ UI.support.animation.end,
+ function () {
+ current.removeClass('uk-slideshow-fade-out'), next.css('opacity', ''), d.resolve()
+ }.bind(this)
+ ),
+ current.addClass('uk-slideshow-fade-out'),
+ current.width(),
+ d.promise()
+ )
+ }
+ }),
+ (UI.slideshow.animations = Animations),
+ window.addEventListener(
+ 'message',
+ function (e) {
+ var iframe,
+ data = e.data
+ if ('string' == typeof data)
+ try {
+ data = JSON.parse(data)
+ } catch (err) {
+ data = {}
+ }
+ e.origin &&
+ -1 < e.origin.indexOf('vimeo') &&
+ 'ready' == data.event &&
+ data.player_id &&
+ (iframe = UI.$('[data-player-id="' + data.player_id + '"]')).length &&
+ iframe.data('slideshow').mutemedia(iframe)
+ },
+ !1
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__, __WEBPACK_LOCAL_MODULE_16__])) ||
+ (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var Animations = UI.slideshow.animations
+ UI.$.extend(UI.slideshow.animations, {
+ slice: function (current, next, dir, fromfx) {
+ if (!current.data('cover')) return Animations.fade.apply(this, arguments)
+ for (
+ var bar,
+ d = UI.$.Deferred(),
+ sliceWidth = Math.ceil(this.element.width() / this.options.slices),
+ bgimage = next.data('cover').css('background-image'),
+ ghost = UI.$('
').css({
+ top: 0,
+ left: 0,
+ width: this.container.width(),
+ height: this.container.height(),
+ opacity: 1,
+ zIndex: 15
+ }),
+ ghostWidth = ghost.width(),
+ ghostHeight = ghost.height(),
+ i = 0;
+ i < this.options.slices;
+ i++
+ ) {
+ var clipfrom,
+ width = (this.options.slices, sliceWidth),
+ clipto = 'rect(0px, ' + width * (i + 1) + 'px, ' + ghostHeight + 'px, ' + sliceWidth * i + 'px)'
+ ;(clipfrom = 'rect(0px, ' + width * (i + 1) + 'px, 0px, ' + sliceWidth * i + 'px)'),
+ ('slice-up' == fromfx || ('slice-up-down' == fromfx && ((i % 2) + 2) % 2 == 0)) &&
+ (clipfrom =
+ 'rect(' +
+ ghostHeight +
+ 'px, ' +
+ width * (i + 1) +
+ 'px, ' +
+ ghostHeight +
+ 'px, ' +
+ sliceWidth * i +
+ 'px)'),
+ (bar = UI.$('
')
+ .css({
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ width: ghostWidth,
+ height: ghostHeight,
+ 'background-image': bgimage,
+ clip: clipfrom,
+ opacity: 0,
+ transition: 'all ' + this.options.duration + 'ms ease-in-out ' + 60 * i + 'ms',
+ '-webkit-transition': 'all ' + this.options.duration + 'ms ease-in-out ' + 60 * i + 'ms'
+ })
+ .data('clip', clipto)),
+ ghost.append(bar)
+ }
+ return (
+ this.container.append(ghost),
+ ghost
+ .children()
+ .last()
+ .on(UI.support.transition.end, function () {
+ ghost.remove(), d.resolve()
+ }),
+ ghost.width(),
+ ghost.children().each(function () {
+ var bar = UI.$(this)
+ bar.css({ clip: bar.data('clip'), opacity: 1 })
+ }),
+ d.promise()
+ )
+ },
+ 'slice-up': function (current, next, dir) {
+ return Animations.slice.apply(this, [current, next, dir, 'slice-up'])
+ },
+ 'slice-down': function (current, next, dir) {
+ return Animations.slice.apply(this, [current, next, dir, 'slice-down'])
+ },
+ 'slice-up-down': function (current, next, dir) {
+ return Animations.slice.apply(this, [current, next, dir, 'slice-up-down'])
+ },
+ fold: function (current, next, dir) {
+ if (!next.data('cover')) return Animations.fade.apply(this, arguments)
+ for (
+ var bar,
+ d = UI.$.Deferred(),
+ sliceWidth = Math.ceil(this.element.width() / this.options.slices),
+ bgimage = next.data('cover').css('background-image'),
+ ghost = UI.$('
').css({ width: next.width(), height: next.height(), opacity: 1, zIndex: 15 }),
+ ghostWidth = next.width(),
+ ghostHeight = next.height(),
+ i = 0;
+ i < this.options.slices;
+ i++
+ )
+ (bar = UI.$('
').css({
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ width: ghostWidth,
+ height: ghostHeight,
+ 'background-image': bgimage,
+ 'transform-origin': sliceWidth * i + 'px 0 0',
+ clip: 'rect(0px, ' + sliceWidth * (i + 1) + 'px, ' + ghostHeight + 'px, ' + sliceWidth * i + 'px)',
+ opacity: 0,
+ transform: 'scaleX(0.000001)',
+ transition: 'all ' + this.options.duration + 'ms ease-in-out ' + (100 + 60 * i) + 'ms',
+ '-webkit-transition': 'all ' + this.options.duration + 'ms ease-in-out ' + (100 + 60 * i) + 'ms'
+ })),
+ ghost.prepend(bar)
+ return (
+ this.container.append(ghost),
+ ghost.width(),
+ ghost
+ .children()
+ .first()
+ .on(UI.support.transition.end, function () {
+ ghost.remove(), d.resolve()
+ })
+ .end()
+ .css({ transform: 'scaleX(1)', opacity: 1 }),
+ d.promise()
+ )
+ },
+ puzzle: function (current, next, dir) {
+ if (!next.data('cover')) return Animations.fade.apply(this, arguments)
+ for (
+ var box,
+ rect,
+ d = UI.$.Deferred(),
+ $this = this,
+ boxCols = Math.round(this.options.slices / 2),
+ boxWidth = Math.round(next.width() / boxCols),
+ boxRows = Math.round(next.height() / boxWidth),
+ boxHeight = Math.round(next.height() / boxRows) + 1,
+ bgimage = next.data('cover').css('background-image'),
+ ghost = UI.$('
').css({
+ width: this.container.width(),
+ height: this.container.height(),
+ opacity: 1,
+ zIndex: 15
+ }),
+ ghostWidth = this.container.width(),
+ ghostHeight = this.container.height(),
+ rows = 0;
+ rows < boxRows;
+ rows++
+ )
+ for (var cols = 0; cols < boxCols; cols++)
+ (rect = [
+ boxHeight * rows + 'px',
+ (cols == boxCols - 1 ? boxWidth + 2 : boxWidth) * (cols + 1) + 'px',
+ boxHeight * (rows + 1) + 'px',
+ boxWidth * cols + 'px'
+ ]),
+ (box = UI.$('
').css({
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ opacity: 0,
+ width: ghostWidth,
+ height: ghostHeight,
+ 'background-image': bgimage,
+ clip: 'rect(' + rect.join(',') + ')',
+ '-webkit-transform': 'translateZ(0)',
+ transform: 'translateZ(0)'
+ })),
+ ghost.append(box)
+ this.container.append(ghost)
+ var boxes = shuffle(ghost.children())
+ return (
+ boxes
+ .each(function (i) {
+ UI.$(this).css({
+ transition: 'all ' + $this.options.duration + 'ms ease-in-out ' + (50 + 25 * i) + 'ms',
+ '-webkit-transition': 'all ' + $this.options.duration + 'ms ease-in-out ' + (50 + 25 * i) + 'ms'
+ })
+ })
+ .last()
+ .on(UI.support.transition.end, function () {
+ ghost.remove(), d.resolve()
+ }),
+ ghost.width(),
+ boxes.css({ opacity: 1 }),
+ d.promise()
+ )
+ },
+ boxes: function (current, next, dir, fromfx) {
+ if (!next.data('cover')) return Animations.fade.apply(this, arguments)
+ for (
+ var box,
+ rect,
+ cols,
+ d = UI.$.Deferred(),
+ boxCols = Math.round(this.options.slices / 2),
+ boxWidth = Math.round(next.width() / boxCols),
+ boxRows = Math.round(next.height() / boxWidth),
+ boxHeight = Math.round(next.height() / boxRows) + 1,
+ bgimage = next.data('cover').css('background-image'),
+ ghost = UI.$('
').css({ width: next.width(), height: next.height(), opacity: 1, zIndex: 15 }),
+ ghostWidth = next.width(),
+ ghostHeight = next.height(),
+ rows = 0;
+ rows < boxRows;
+ rows++
+ )
+ for (cols = 0; cols < boxCols; cols++)
+ (rect = [
+ boxHeight * rows + 'px',
+ (cols == boxCols - 1 ? boxWidth + 2 : boxWidth) * (cols + 1) + 'px',
+ boxHeight * (rows + 1) + 'px',
+ boxWidth * cols + 'px'
+ ]),
+ (box = UI.$('
').css({
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ opacity: 1,
+ width: ghostWidth,
+ height: ghostHeight,
+ 'background-image': bgimage,
+ 'transform-origin': rect[3] + ' ' + rect[0] + ' 0',
+ clip: 'rect(' + rect.join(',') + ')',
+ '-webkit-transform': 'scale(0.0000000000000001)',
+ transform: 'scale(0.0000000000000001)'
+ })),
+ ghost.append(box)
+ this.container.append(ghost)
+ var prevCol,
+ rowIndex = 0,
+ colIndex = 0,
+ timeBuff = 0,
+ box2Darr = [[]],
+ boxes = ghost.children()
+ for (
+ 'boxes-reverse' == fromfx && (boxes = [].reverse.apply(boxes)),
+ boxes.each(function () {
+ ;(box2Darr[rowIndex][colIndex] = UI.$(this)),
+ ++colIndex == boxCols && ((colIndex = 0), (box2Darr[++rowIndex] = []))
+ }),
+ prevCol = cols = 0;
+ cols < boxCols * boxRows;
+ cols++
+ ) {
+ prevCol = cols
+ for (var row = 0; row < boxRows; row++)
+ 0 <= prevCol &&
+ prevCol < boxCols &&
+ box2Darr[row][prevCol].css({
+ transition: 'all ' + this.options.duration + 'ms linear ' + (50 + timeBuff) + 'ms',
+ '-webkit-transition': 'all ' + this.options.duration + 'ms linear ' + (50 + timeBuff) + 'ms'
+ }),
+ prevCol--
+ timeBuff += 100
+ }
+ return (
+ boxes.last().on(UI.support.transition.end, function () {
+ ghost.remove(), d.resolve()
+ }),
+ ghost.width(),
+ boxes.css({ '-webkit-transform': 'scale(1)', transform: 'scale(1)' }),
+ d.promise()
+ )
+ },
+ 'boxes-reverse': function (current, next, dir) {
+ return Animations.boxes.apply(this, [current, next, dir, 'boxes-reverse'])
+ },
+ 'random-fx': function () {
+ var animations = ['slice-up', 'fold', 'puzzle', 'slice-down', 'boxes', 'slice-up-down', 'boxes-reverse']
+ return (
+ (this.fxIndex = (void 0 === this.fxIndex ? -1 : this.fxIndex) + 1),
+ animations[this.fxIndex] || (this.fxIndex = 0),
+ Animations[animations[this.fxIndex]].apply(this, arguments)
+ )
+ }
+ })
+ var shuffle = function (arr) {
+ for (
+ var j, x, i = arr.length;
+ i;
+ j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x
+ );
+ return arr
+ }
+ return UI.slideshow.animations
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var draggingPlaceholder,
+ currentlyDraggingElement,
+ currentlyDraggingTarget,
+ moving,
+ delayIdle,
+ touchedlists,
+ moved,
+ overElement,
+ supportsTouch = 'ontouchstart' in window || (window.DocumentTouch && document instanceof DocumentTouch)
+ return (
+ UI.component('sortable', {
+ defaults: {
+ animation: 150,
+ threshold: 10,
+ childClass: 'uk-sortable-item',
+ placeholderClass: 'uk-sortable-placeholder',
+ overClass: 'uk-sortable-over',
+ draggingClass: 'uk-sortable-dragged',
+ dragMovingClass: 'uk-sortable-moving',
+ baseClass: 'uk-sortable',
+ noDragClass: 'uk-sortable-nodrag',
+ emptyClass: 'uk-sortable-empty',
+ dragCustomClass: '',
+ handleClass: !1,
+ group: !1,
+ stop: function () {},
+ start: function () {},
+ change: function () {}
+ },
+ boot: function () {
+ UI.ready(function (context) {
+ UI.$('[data-uk-sortable]', context).each(function () {
+ var ele = UI.$(this)
+ ele.data('sortable') || UI.sortable(ele, UI.Utils.options(ele.attr('data-uk-sortable')))
+ })
+ }),
+ UI.$html.on('mousemove touchmove', function (e) {
+ if (delayIdle) {
+ var src = e.originalEvent.targetTouches ? e.originalEvent.targetTouches[0] : e
+ ;(Math.abs(src.pageX - delayIdle.pos.x) > delayIdle.threshold ||
+ Math.abs(src.pageY - delayIdle.pos.y) > delayIdle.threshold) &&
+ delayIdle.apply(src)
+ }
+ if (draggingPlaceholder) {
+ moving ||
+ ((moving = !0),
+ draggingPlaceholder.show(),
+ draggingPlaceholder.$current.addClass(draggingPlaceholder.$sortable.options.placeholderClass),
+ draggingPlaceholder.$sortable.element
+ .children()
+ .addClass(draggingPlaceholder.$sortable.options.childClass),
+ UI.$html.addClass(draggingPlaceholder.$sortable.options.dragMovingClass))
+ var offset = draggingPlaceholder.data('mouse-offset'),
+ left = parseInt(e.originalEvent.pageX, 10) + offset.left,
+ top = parseInt(e.originalEvent.pageY, 10) + offset.top
+ if (
+ (draggingPlaceholder.css({ left, top }),
+ top + draggingPlaceholder.height() / 3 > document.body.offsetHeight)
+ )
+ return
+ top < UI.$win.scrollTop()
+ ? UI.$win.scrollTop(UI.$win.scrollTop() - Math.ceil(draggingPlaceholder.height() / 3))
+ : top + draggingPlaceholder.height() / 3 > window.innerHeight + UI.$win.scrollTop() &&
+ UI.$win.scrollTop(UI.$win.scrollTop() + Math.ceil(draggingPlaceholder.height() / 3))
+ }
+ }),
+ UI.$html.on('mouseup touchend', function (e) {
+ if (((delayIdle = !1), currentlyDraggingElement && draggingPlaceholder)) {
+ var sortable = (function (ele) {
+ ele = UI.$(ele)
+ do {
+ if (ele.data('sortable')) return ele
+ ele = UI.$(ele).parent()
+ } while (ele.length)
+ return ele
+ })(currentlyDraggingElement),
+ component = draggingPlaceholder.$sortable,
+ ev = { type: e.type }
+ sortable[0] && component.dragDrop(ev, component.element), component.dragEnd(ev, component.element)
+ } else currentlyDraggingElement = draggingPlaceholder = null
+ })
+ },
+ init: function () {
+ var $this = this,
+ element = this.element[0]
+ ;(touchedlists = []),
+ this.checkEmptyList(),
+ this.element.data(
+ 'sortable-group',
+ this.options.group ? this.options.group : UI.Utils.uid('sortable-group')
+ )
+ var handleDragStart = delegate(function (e) {
+ if (!e.data || !e.data.sortable) {
+ var $target = UI.$(e.target),
+ $link = $target.is('a[href]') ? $target : $target.parents('a[href]')
+ if (!$target.is(':input'))
+ return (
+ e.preventDefault(),
+ !supportsTouch &&
+ $link.length &&
+ $link
+ .one('click', function (e) {
+ e.preventDefault()
+ })
+ .one('mouseup', function () {
+ moved || $link.trigger('click')
+ }),
+ (e.data = e.data || {}),
+ (e.data.sortable = element),
+ $this.dragStart(e, this)
+ )
+ }
+ }),
+ handleDragEnter = delegate(
+ UI.Utils.debounce(function (e) {
+ return $this.dragEnter(e, this)
+ })
+ ),
+ handleDragLeave = delegate(function (e) {
+ var previousCounter = $this.dragenterData(this)
+ $this.dragenterData(this, previousCounter - 1),
+ $this.dragenterData(this) ||
+ (UI.$(this).removeClass($this.options.overClass), $this.dragenterData(this, !1))
+ }),
+ handleTouchMove = delegate(function (e) {
+ return (
+ !currentlyDraggingElement ||
+ currentlyDraggingElement === this ||
+ currentlyDraggingTarget === this ||
+ ($this.element.children().removeClass($this.options.overClass),
+ (currentlyDraggingTarget = this),
+ $this.moveElementNextTo(currentlyDraggingElement, this),
+ (function (e) {
+ e.stopPropagation && e.stopPropagation(),
+ e.preventDefault && e.preventDefault(),
+ (e.returnValue = !1)
+ })(e))
+ )
+ })
+ function delegate (fn) {
+ return function (e) {
+ var target, context
+ e &&
+ ((target = ((supportsTouch && e.touches && e.touches[0]) || {}).target || e.target),
+ supportsTouch &&
+ document.elementFromPoint &&
+ (target = document.elementFromPoint(
+ e.pageX - document.body.scrollLeft,
+ e.pageY - document.body.scrollTop
+ )),
+ (overElement = UI.$(target))),
+ UI.$(target).hasClass($this.options.childClass)
+ ? fn.apply(target, [e])
+ : target !== element &&
+ (context = (function (parent, child) {
+ var cur = target
+ if (cur == parent) return null
+ for (; cur; ) {
+ if (cur.parentNode === parent) return cur
+ if (!(cur = cur.parentNode) || !cur.ownerDocument || 11 === cur.nodeType) break
+ }
+ return null
+ })(element)) &&
+ fn.apply(context, [e])
+ }
+ }
+ ;(this.addDragHandlers = function () {
+ supportsTouch
+ ? element.addEventListener('touchmove', handleTouchMove, !1)
+ : (element.addEventListener('mouseover', handleDragEnter, !1),
+ element.addEventListener('mouseout', handleDragLeave, !1))
+ }),
+ (this.removeDragHandlers = function () {
+ supportsTouch
+ ? element.removeEventListener('touchmove', handleTouchMove, !1)
+ : (element.removeEventListener('mouseover', handleDragEnter, !1),
+ element.removeEventListener('mouseout', handleDragLeave, !1))
+ }),
+ window.addEventListener(
+ supportsTouch ? 'touchmove' : 'mousemove',
+ function (e) {
+ currentlyDraggingElement && $this.dragMove(e, $this)
+ },
+ !1
+ ),
+ element.addEventListener(supportsTouch ? 'touchstart' : 'mousedown', handleDragStart, !1)
+ },
+ dragStart: function (e, elem) {
+ moving = moved = !1
+ var $this = this,
+ target = UI.$(e.target)
+ if (supportsTouch || 2 != e.button) {
+ if (
+ $this.options.handleClass &&
+ !(target.hasClass($this.options.handleClass)
+ ? target
+ : target.closest('.' + $this.options.handleClass, $this.element)
+ ).length
+ )
+ return
+ if (
+ !target.is('.' + $this.options.noDragClass) &&
+ !target.closest('.' + $this.options.noDragClass).length &&
+ !target.is(':input')
+ ) {
+ ;(currentlyDraggingElement = elem), draggingPlaceholder && draggingPlaceholder.remove()
+ var $current = UI.$(currentlyDraggingElement),
+ offset = $current.offset()
+ delayIdle = {
+ pos: { x: e.pageX, y: e.pageY },
+ threshold: $this.options.threshold,
+ apply: function (evt) {
+ ;((draggingPlaceholder = UI.$(
+ '
'
+ )
+ .css({
+ display: 'none',
+ top: offset.top,
+ left: offset.left,
+ width: $current.width(),
+ height: $current.height(),
+ padding: $current.css('padding')
+ })
+ .data({
+ 'mouse-offset': {
+ left: offset.left - parseInt(evt.pageX, 10),
+ top: offset.top - parseInt(evt.pageY, 10)
+ },
+ origin: $this.element,
+ index: $current.index()
+ })
+ .append($current.html())
+ .appendTo('body')).$current = $current),
+ (draggingPlaceholder.$sortable = $this),
+ $current.data({
+ 'start-list': $current.parent(),
+ 'start-index': $current.index(),
+ 'sortable-group': $this.options.group
+ }),
+ $this.addDragHandlers(),
+ $this.options.start(this, currentlyDraggingElement),
+ $this.trigger('start.uk.sortable', [$this, currentlyDraggingElement]),
+ (delayIdle = !(moved = !0))
+ }
+ }
+ }
+ }
+ },
+ dragMove: function (e, elem) {
+ var overChild,
+ overRoot = (overElement = UI.$(
+ document.elementFromPoint(
+ e.pageX - (document.body.scrollLeft || document.scrollLeft || 0),
+ e.pageY - (document.body.scrollTop || document.documentElement.scrollTop || 0)
+ )
+ )).closest('.' + this.options.baseClass),
+ groupOver = overRoot.data('sortable-group'),
+ $current = UI.$(currentlyDraggingElement),
+ currentRoot = $current.parent(),
+ groupCurrent = $current.data('sortable-group')
+ overRoot[0] !== currentRoot[0] &&
+ void 0 !== groupCurrent &&
+ groupOver === groupCurrent &&
+ (overRoot.data('sortable').addDragHandlers(),
+ touchedlists.push(overRoot),
+ overRoot.children().addClass(this.options.childClass),
+ 0 < overRoot.children().length
+ ? (overChild = overElement.closest('.' + this.options.childClass)).length
+ ? overChild.before($current)
+ : overRoot.append($current)
+ : overElement.append($current),
+ UIkit.$doc.trigger('mouseover')),
+ this.checkEmptyList(),
+ this.checkEmptyList(currentRoot)
+ },
+ dragEnter: function (e, elem) {
+ if (!currentlyDraggingElement || currentlyDraggingElement === elem) return !0
+ var previousCounter = this.dragenterData(elem)
+ if ((this.dragenterData(elem, previousCounter + 1), 0 === previousCounter)) {
+ var currentlist = UI.$(elem).parent(),
+ startlist = UI.$(currentlyDraggingElement).data('start-list')
+ if (currentlist[0] !== startlist[0]) {
+ var groupOver = currentlist.data('sortable-group'),
+ groupCurrent = UI.$(currentlyDraggingElement).data('sortable-group')
+ if ((groupOver || groupCurrent) && groupOver != groupCurrent) return !1
+ }
+ UI.$(elem).addClass(this.options.overClass), this.moveElementNextTo(currentlyDraggingElement, elem)
+ }
+ return !1
+ },
+ dragEnd: function (e, elem) {
+ var $this = this
+ currentlyDraggingElement && (this.options.stop(elem), this.trigger('stop.uk.sortable', [this])),
+ (currentlyDraggingTarget = currentlyDraggingElement = null),
+ touchedlists.push(this.element),
+ touchedlists.forEach(function (el, i) {
+ UI.$(el)
+ .children()
+ .each(function () {
+ 1 === this.nodeType &&
+ (UI.$(this)
+ .removeClass($this.options.overClass)
+ .removeClass($this.options.placeholderClass)
+ .removeClass($this.options.childClass),
+ $this.dragenterData(this, !1))
+ })
+ }),
+ (touchedlists = []),
+ UI.$html.removeClass(this.options.dragMovingClass),
+ this.removeDragHandlers(),
+ draggingPlaceholder && (draggingPlaceholder.remove(), (draggingPlaceholder = null))
+ },
+ dragDrop: function (e, elem) {
+ 'drop' === e.type && (e.stopPropagation && e.stopPropagation(), e.preventDefault && e.preventDefault()),
+ this.triggerChangeEvents()
+ },
+ triggerChangeEvents: function () {
+ if (currentlyDraggingElement) {
+ var $current = UI.$(currentlyDraggingElement),
+ oldRoot = draggingPlaceholder.data('origin'),
+ newRoot = $current.closest('.' + this.options.baseClass),
+ triggers = [],
+ el = UI.$(currentlyDraggingElement)
+ oldRoot[0] === newRoot[0] && draggingPlaceholder.data('index') != $current.index()
+ ? triggers.push({ sortable: this, mode: 'moved' })
+ : oldRoot[0] != newRoot[0] &&
+ triggers.push(
+ { sortable: UI.$(newRoot).data('sortable'), mode: 'added' },
+ { sortable: UI.$(oldRoot).data('sortable'), mode: 'removed' }
+ ),
+ triggers.forEach(function (trigger, i) {
+ trigger.sortable &&
+ trigger.sortable.element.trigger('change.uk.sortable', [trigger.sortable, el, trigger.mode])
+ })
+ }
+ },
+ dragenterData: function (element, val) {
+ if (((element = UI.$(element)), 1 == arguments.length))
+ return parseInt(element.data('child-dragenter'), 10) || 0
+ val ? element.data('child-dragenter', Math.max(0, val)) : element.removeData('child-dragenter')
+ },
+ moveElementNextTo: function (element, elementToMoveNextTo) {
+ var $this = this,
+ list = UI.$(element)
+ .parent()
+ .css('min-height', ''),
+ next = (function (el1, el2) {
+ var parent = el1.parentNode
+ if (el2.parentNode != parent) return !1
+ for (var cur = el1.previousSibling; cur && 9 !== cur.nodeType; ) {
+ if (cur === el2) return !0
+ cur = cur.previousSibling
+ }
+ return !1
+ })(element, elementToMoveNextTo)
+ ? elementToMoveNextTo
+ : elementToMoveNextTo.nextSibling,
+ children = list.children(),
+ count = children.length
+ if (!$this.options.animation)
+ return (
+ elementToMoveNextTo.parentNode.insertBefore(element, next),
+ void UI.Utils.checkDisplay($this.element.parent())
+ )
+ list.css('min-height', list.height()),
+ children.stop().each(function () {
+ var ele = UI.$(this),
+ offset = ele.position()
+ ;(offset.width = ele.width()), ele.data('offset-before', offset)
+ }),
+ elementToMoveNextTo.parentNode.insertBefore(element, next),
+ UI.Utils.checkDisplay($this.element.parent()),
+ (children = list
+ .children()
+ .each(function () {
+ var ele = UI.$(this)
+ ele.data('offset-after', ele.position())
+ })
+ .each(function () {
+ var ele = UI.$(this),
+ before = ele.data('offset-before')
+ ele.css({ position: 'absolute', top: before.top, left: before.left, 'min-width': before.width })
+ })).each(function () {
+ var ele = UI.$(this),
+ offset = (ele.data('offset-before'), ele.data('offset-after'))
+ ele.css('pointer-events', 'none').width(),
+ setTimeout(function () {
+ ele.animate({ top: offset.top, left: offset.left }, $this.options.animation, function () {
+ ele
+ .css({ position: '', top: '', left: '', 'min-width': '', 'pointer-events': '' })
+ .removeClass($this.options.overClass)
+ .removeData('child-dragenter'),
+ --count || (list.css('min-height', ''), UI.Utils.checkDisplay($this.element.parent()))
+ })
+ }, 0)
+ })
+ },
+ serialize: function () {
+ var item,
+ attribute,
+ data = []
+ return (
+ this.element.children().each(function (j, child) {
+ item = {}
+ for (var i = 0; i < child.attributes.length; i++)
+ 0 === (attribute = child.attributes[i]).name.indexOf('data-') &&
+ (item[attribute.name.substr(5)] = UI.Utils.str2json(attribute.value))
+ data.push(item)
+ }),
+ data
+ )
+ },
+ checkEmptyList: function (list) {
+ ;(list = list ? UI.$(list) : this.element),
+ this.options.emptyClass &&
+ list[list.children().length ? 'removeClass' : 'addClass'](this.options.emptyClass)
+ }
+ }),
+ UI.sortable
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var $win = UI.$win,
+ $doc = UI.$doc,
+ sticked = [],
+ direction = 1
+ function checkscrollposition (direction) {
+ var stickies = arguments.length ? arguments : sticked
+ if (stickies.length && !($win.scrollTop() < 0))
+ for (
+ var newTop,
+ containerBottom,
+ stickyHeight,
+ sticky,
+ scrollTop = $win.scrollTop(),
+ documentHeight = $doc.height(),
+ dwh = documentHeight - $win.height(),
+ extra = dwh < scrollTop ? dwh - scrollTop : 0,
+ i = 0;
+ i < stickies.length;
+ i++
+ )
+ if ((sticky = stickies[i]).element.is(':visible') && !sticky.animate) {
+ if (sticky.check()) {
+ if (
+ ((newTop =
+ sticky.top < 0
+ ? 0
+ : (newTop =
+ documentHeight -
+ (stickyHeight = sticky.element.outerHeight()) -
+ sticky.top -
+ sticky.options.bottom -
+ scrollTop -
+ extra) < 0
+ ? newTop + sticky.top
+ : sticky.top),
+ sticky.boundary && sticky.boundary.length)
+ ) {
+ var bTop = sticky.boundary.offset().top
+ ;(containerBottom = sticky.boundtoparent
+ ? documentHeight -
+ (bTop + sticky.boundary.outerHeight()) +
+ parseInt(sticky.boundary.css('padding-bottom'))
+ : documentHeight - bTop - parseInt(sticky.boundary.css('margin-top'))),
+ (newTop =
+ scrollTop + stickyHeight >
+ documentHeight - containerBottom - (sticky.top < 0 ? 0 : sticky.top)
+ ? documentHeight - containerBottom - (scrollTop + stickyHeight)
+ : newTop)
+ }
+ if (sticky.currentTop != newTop) {
+ if (
+ (sticky.element.css({
+ position: 'fixed',
+ top: newTop,
+ width: sticky.getWidthFrom.length ? sticky.getWidthFrom.width() : sticky.element.width()
+ }),
+ !sticky.init &&
+ (sticky.element.addClass(sticky.options.clsinit),
+ location.hash && 0 < scrollTop && sticky.options.target))
+ ) {
+ var $target = UI.$(location.hash)
+ $target.length &&
+ setTimeout(
+ (function ($target, sticky) {
+ return function () {
+ sticky.element.width()
+ var offset = $target.offset(),
+ maxoffset = offset.top + $target.outerHeight(),
+ stickyOffset = sticky.element.offset(),
+ stickyHeight = sticky.element.outerHeight(),
+ stickyMaxOffset = stickyOffset.top + stickyHeight
+ stickyOffset.top < maxoffset &&
+ offset.top < stickyMaxOffset &&
+ ((scrollTop = offset.top - stickyHeight - sticky.options.target),
+ window.scrollTo(0, scrollTop))
+ }
+ })($target, sticky),
+ 0
+ )
+ }
+ sticky.element.addClass(sticky.options.clsactive).removeClass(sticky.options.clsinactive),
+ sticky.element.trigger('active.uk.sticky'),
+ sticky.element.css('margin', ''),
+ sticky.options.animation &&
+ sticky.init &&
+ !UI.Utils.isInView(sticky.wrapper) &&
+ sticky.element.addClass(sticky.options.animation),
+ (sticky.currentTop = newTop)
+ }
+ } else null !== sticky.currentTop && sticky.reset()
+ sticky.init = !0
+ }
+ }
+ return (
+ UI.component('sticky', {
+ defaults: {
+ top: 0,
+ bottom: 0,
+ animation: '',
+ clsinit: 'uk-sticky-init',
+ clsactive: 'uk-active',
+ clsinactive: '',
+ getWidthFrom: '',
+ showup: !1,
+ boundary: !1,
+ media: !1,
+ target: !1,
+ disabled: !1
+ },
+ boot: function () {
+ UI.$doc.on('scrolling.uk.document', function (e, data) {
+ data && data.dir && ((direction = data.dir.y), checkscrollposition())
+ }),
+ UI.$win.on(
+ 'resize orientationchange',
+ UI.Utils.debounce(function () {
+ if (sticked.length) {
+ for (var i = 0; i < sticked.length; i++) sticked[i].reset(!0)
+ checkscrollposition()
+ }
+ }, 100)
+ ),
+ UI.ready(function (context) {
+ setTimeout(function () {
+ UI.$('[data-uk-sticky]', context).each(function () {
+ var $ele = UI.$(this)
+ $ele.data('sticky') || UI.sticky($ele, UI.Utils.options($ele.attr('data-uk-sticky')))
+ }),
+ checkscrollposition()
+ }, 0)
+ })
+ },
+ init: function () {
+ var boundtoparent,
+ boundary = this.options.boundary
+ ;(this.wrapper = this.element.wrap('
').parent()),
+ this.computeWrapper(),
+ this.element.css('margin', 0),
+ boundary &&
+ (!0 === boundary || '!' === boundary[0]
+ ? ((boundary =
+ !0 === boundary ? this.wrapper.parent() : this.wrapper.closest(boundary.substr(1))),
+ (boundtoparent = !0))
+ : 'string' == typeof boundary && (boundary = UI.$(boundary))),
+ (this.sticky = {
+ self: this,
+ options: this.options,
+ element: this.element,
+ currentTop: null,
+ wrapper: this.wrapper,
+ init: !1,
+ getWidthFrom: UI.$(this.options.getWidthFrom || this.wrapper),
+ boundary,
+ boundtoparent,
+ top: 0,
+ calcTop: function () {
+ var top = this.options.top
+ if (this.options.top && 'string' == typeof this.options.top)
+ if (this.options.top.match(/^(-|)(\d+)vh$/))
+ top = (window.innerHeight * parseInt(this.options.top, 10)) / 100
+ else {
+ var topElement = UI.$(this.options.top).first()
+ topElement.length &&
+ topElement.is(':visible') &&
+ (top =
+ -1 * (topElement.offset().top + topElement.outerHeight() - this.wrapper.offset().top))
+ }
+ this.top = top
+ },
+ reset: function (force) {
+ this.calcTop()
+ var finalize = function () {
+ this.element.css({ position: '', top: '', width: '', left: '', margin: '0' }),
+ this.element.removeClass(
+ [this.options.animation, 'uk-animation-reverse', this.options.clsactive].join(' ')
+ ),
+ this.element.addClass(this.options.clsinactive),
+ this.element.trigger('inactive.uk.sticky'),
+ (this.currentTop = null),
+ (this.animate = !1)
+ }.bind(this)
+ !force && this.options.animation && UI.support.animation && !UI.Utils.isInView(this.wrapper)
+ ? ((this.animate = !0),
+ this.element
+ .removeClass(this.options.animation)
+ .one(UI.support.animation.end, function () {
+ finalize()
+ })
+ .width(),
+ this.element.addClass(this.options.animation + ' uk-animation-reverse'))
+ : finalize()
+ },
+ check: function () {
+ if (this.options.disabled) return !1
+ if (this.options.media)
+ switch (typeof this.options.media) {
+ case 'number':
+ if (window.innerWidth < this.options.media) return !1
+ break
+ case 'string':
+ if (window.matchMedia && !window.matchMedia(this.options.media).matches) return !1
+ }
+ var scrollTop = $win.scrollTop(),
+ dwh = $doc.height() - window.innerHeight,
+ extra = dwh < scrollTop ? dwh - scrollTop : 0,
+ active = this.wrapper.offset().top - this.top - extra <= scrollTop
+ return (
+ active &&
+ this.options.showup &&
+ (1 == direction && (active = !1),
+ -1 == direction &&
+ !this.element.hasClass(this.options.clsactive) &&
+ UI.Utils.isInView(this.wrapper) &&
+ (active = !1)),
+ active
+ )
+ }
+ }),
+ this.sticky.calcTop(),
+ sticked.push(this.sticky)
+ },
+ update: function () {
+ checkscrollposition(this.sticky)
+ },
+ enable: function () {
+ ;(this.options.disabled = !1), this.update()
+ },
+ disable: function (force) {
+ ;(this.options.disabled = !0), this.sticky.reset(force)
+ },
+ computeWrapper: function () {
+ this.wrapper.css({
+ height:
+ -1 == ['absolute', 'fixed'].indexOf(this.element.css('position')) ? this.element.outerHeight() : '',
+ float: 'none' != this.element.css('float') ? this.element.css('float') : '',
+ margin: this.element.css('margin')
+ }),
+ 'fixed' == this.element.css('position') &&
+ this.element.css({
+ width: this.sticky.getWidthFrom.length ? this.sticky.getWidthFrom.width() : this.element.width()
+ })
+ }
+ }),
+ UI.sticky
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ UI.component('timepicker', {
+ defaults: { format: '24h', delay: 0, start: 0, end: 24 },
+ boot: function () {
+ UI.$html.on('focus.timepicker.uikit', '[data-uk-timepicker]', function (e) {
+ var ele = UI.$(this)
+ if (!ele.data('timepicker')) {
+ var obj = UI.timepicker(ele, UI.Utils.options(ele.attr('data-uk-timepicker')))
+ setTimeout(function () {
+ obj.autocomplete.input.focus()
+ }, 40)
+ }
+ })
+ },
+ init: function () {
+ var container,
+ $this = this,
+ times = (function (start, end) {
+ end = end || 24
+ var i,
+ h,
+ times = { '12h': [], '24h': [] }
+ for (i = start = start || 0, h = ''; i < end; i++)
+ (h = '' + i),
+ i < 10 && (h = '0' + h),
+ times['24h'].push({ value: h + ':00' }),
+ times['24h'].push({ value: h + ':30' }),
+ 0 === i &&
+ ((h = 12),
+ times['12h'].push({ value: h + ':00 AM' }),
+ times['12h'].push({ value: h + ':30 AM' })),
+ 0 < i &&
+ i < 13 &&
+ 12 !== i &&
+ (times['12h'].push({ value: h + ':00 AM' }), times['12h'].push({ value: h + ':30 AM' })),
+ 12 <= i &&
+ (0 == (h -= 12) && (h = 12),
+ h < 10 && (h = '0' + String(h)),
+ times['12h'].push({ value: h + ':00 PM' }),
+ times['12h'].push({ value: h + ':30 PM' }))
+ return times
+ })(this.options.start, this.options.end)
+ ;(this.options.minLength = 0),
+ (this.options.template =
+ '
'),
+ (this.options.source = function (release) {
+ release(times[$this.options.format] || times['12h'])
+ }),
+ (container = this.element.is('input')
+ ? (this.element.wrap('
'), this.element.parent())
+ : this.element.addClass('uk-autocomplete')),
+ (this.autocomplete = UI.autocomplete(container, this.options)),
+ this.autocomplete.dropdown.addClass('uk-dropdown-small uk-dropdown-scrollable'),
+ this.autocomplete.on('show.uk.autocomplete', function () {
+ var selected = $this.autocomplete.dropdown.find(
+ '[data-value="' + $this.autocomplete.input.val() + '"]'
+ )
+ setTimeout(function () {
+ $this.autocomplete.pick(selected, !0)
+ }, 10)
+ }),
+ this.autocomplete.input
+ .on('focus', function () {
+ ;($this.autocomplete.value = Math.random()), $this.autocomplete.triggercomplete()
+ })
+ .on(
+ 'blur',
+ UI.Utils.debounce(function () {
+ $this.checkTime()
+ }, 100)
+ ),
+ this.element.data('timepicker', this)
+ },
+ checkTime: function () {
+ var arr,
+ timeArray,
+ hour,
+ minute,
+ meridian = 'AM',
+ time = this.autocomplete.input.val()
+ '12h' == this.options.format
+ ? ((timeArray = (arr = time.split(' '))[0].split(':')), (meridian = arr[1]))
+ : (timeArray = time.split(':')),
+ (hour = parseInt(timeArray[0], 10)),
+ (minute = parseInt(timeArray[1], 10)),
+ isNaN(hour) && (hour = 0),
+ isNaN(minute) && (minute = 0),
+ '12h' == this.options.format
+ ? (12 < hour ? (hour = 12) : hour < 0 && (hour = 12),
+ 'am' === meridian || 'a' === meridian
+ ? (meridian = 'AM')
+ : ('pm' !== meridian && 'p' !== meridian) || (meridian = 'PM'),
+ 'AM' !== meridian && 'PM' !== meridian && (meridian = 'AM'))
+ : 24 <= hour
+ ? (hour = 23)
+ : hour < 0 && (hour = 0),
+ minute < 0 ? (minute = 0) : 60 <= minute && (minute = 0),
+ this.autocomplete.input.val(this.formatTime(hour, minute, meridian)).trigger('change')
+ },
+ formatTime: function (hour, minute, meridian) {
+ return (
+ (hour = hour < 10 ? '0' + hour : hour) +
+ ':' +
+ (minute = minute < 10 ? '0' + minute : minute) +
+ ('12h' == this.options.format ? ' ' + meridian : '')
+ )
+ }
+ })
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var $tooltip, tooltipdelay, checkdelay
+ return (
+ UI.component('tooltip', {
+ defaults: {
+ offset: 5,
+ pos: 'top',
+ animation: !1,
+ delay: 0,
+ cls: '',
+ activeClass: 'uk-active',
+ src: function (ele) {
+ var title = ele.attr('title')
+ return (
+ void 0 !== title && ele.data('cached-title', title).removeAttr('title'), ele.data('cached-title')
+ )
+ }
+ },
+ tip: '',
+ boot: function () {
+ UI.$html.on('mouseenter.tooltip.uikit focus.tooltip.uikit', '[data-uk-tooltip]', function (e) {
+ var ele = UI.$(this)
+ ele.data('tooltip') ||
+ (UI.tooltip(ele, UI.Utils.options(ele.attr('data-uk-tooltip'))), ele.trigger('mouseenter'))
+ })
+ },
+ init: function () {
+ var $this = this
+ $tooltip || ($tooltip = UI.$('
').appendTo('body')),
+ this.on({
+ focus: function (e) {
+ $this.show()
+ },
+ blur: function (e) {
+ $this.hide()
+ },
+ mouseenter: function (e) {
+ $this.show()
+ },
+ mouseleave: function (e) {
+ $this.hide()
+ }
+ })
+ },
+ show: function () {
+ if (
+ ((this.tip =
+ 'function' == typeof this.options.src ? this.options.src(this.element) : this.options.src),
+ tooltipdelay && clearTimeout(tooltipdelay),
+ checkdelay && clearTimeout(checkdelay),
+ 'string' == typeof this.tip && this.tip.length)
+ ) {
+ $tooltip
+ .stop()
+ .css({ top: -2e3, visibility: 'hidden' })
+ .removeClass(this.options.activeClass)
+ .show(),
+ $tooltip.html('
' + this.tip + '
')
+ var $this = this,
+ pos = UI.$.extend({}, this.element.offset(), {
+ width: this.element[0].offsetWidth,
+ height: this.element[0].offsetHeight
+ }),
+ width = $tooltip[0].offsetWidth,
+ height = $tooltip[0].offsetHeight,
+ offset =
+ 'function' == typeof this.options.offset
+ ? this.options.offset.call(this.element)
+ : this.options.offset,
+ position =
+ 'function' == typeof this.options.pos ? this.options.pos.call(this.element) : this.options.pos,
+ tmppos = position.split('-'),
+ tcss = {
+ display: 'none',
+ visibility: 'visible',
+ top: pos.top + pos.height + height,
+ left: pos.left
+ }
+ if ('fixed' == UI.$html.css('position') || 'fixed' == UI.$body.css('position')) {
+ var bodyoffset = UI.$('body').offset(),
+ htmloffset = UI.$('html').offset(),
+ docoffset_top = htmloffset.top + bodyoffset.top,
+ docoffset_left = htmloffset.left + bodyoffset.left
+ ;(pos.left -= docoffset_left), (pos.top -= docoffset_top)
+ }
+ ;('left' != tmppos[0] && 'right' != tmppos[0]) ||
+ 'right' != UI.langdirection ||
+ (tmppos[0] = 'left' == tmppos[0] ? 'right' : 'left')
+ var variants = {
+ bottom: { top: pos.top + pos.height + offset, left: pos.left + pos.width / 2 - width / 2 },
+ top: { top: pos.top - height - offset, left: pos.left + pos.width / 2 - width / 2 },
+ left: { top: pos.top + pos.height / 2 - height / 2, left: pos.left - width - offset },
+ right: { top: pos.top + pos.height / 2 - height / 2, left: pos.left + pos.width + offset }
+ }
+ UI.$.extend(tcss, variants[tmppos[0]]),
+ 2 == tmppos.length && (tcss.left = 'left' == tmppos[1] ? pos.left : pos.left + pos.width - width)
+ var boundary = this.checkBoundary(tcss.left, tcss.top, width, height)
+ if (boundary) {
+ switch (boundary) {
+ case 'x':
+ position =
+ 2 == tmppos.length
+ ? tmppos[0] + '-' + (tcss.left < 0 ? 'left' : 'right')
+ : tcss.left < 0
+ ? 'right'
+ : 'left'
+ break
+ case 'y':
+ position =
+ 2 == tmppos.length
+ ? (tcss.top < 0 ? 'bottom' : 'top') + '-' + tmppos[1]
+ : tcss.top < 0
+ ? 'bottom'
+ : 'top'
+ break
+ case 'xy':
+ position =
+ 2 == tmppos.length
+ ? (tcss.top < 0 ? 'bottom' : 'top') + '-' + (tcss.left < 0 ? 'left' : 'right')
+ : tcss.left < 0
+ ? 'right'
+ : 'left'
+ }
+ ;(tmppos = position.split('-')),
+ UI.$.extend(tcss, variants[tmppos[0]]),
+ 2 == tmppos.length && (tcss.left = 'left' == tmppos[1] ? pos.left : pos.left + pos.width - width)
+ }
+ ;(tcss.left -= UI.$body.position().left),
+ (tooltipdelay = setTimeout(function () {
+ $tooltip
+ .css(tcss)
+ .attr('class', ['uk-tooltip', 'uk-tooltip-' + position, $this.options.cls].join(' ')),
+ $this.options.animation
+ ? $tooltip
+ .css({ opacity: 0, display: 'block' })
+ .addClass($this.options.activeClass)
+ .animate({ opacity: 1 }, parseInt($this.options.animation, 10) || 400)
+ : $tooltip.show().addClass($this.options.activeClass),
+ (tooltipdelay = !1),
+ (checkdelay = setInterval(function () {
+ $this.element.is(':visible') || $this.hide()
+ }, 150))
+ }, parseInt(this.options.delay, 10) || 0))
+ }
+ },
+ hide: function () {
+ if (!this.element.is('input') || this.element[0] !== document.activeElement)
+ if (
+ (tooltipdelay && clearTimeout(tooltipdelay),
+ checkdelay && clearTimeout(checkdelay),
+ $tooltip.stop(),
+ this.options.animation)
+ ) {
+ var $this = this
+ $tooltip.fadeOut(parseInt(this.options.animation, 10) || 400, function () {
+ $tooltip.removeClass($this.options.activeClass)
+ })
+ } else $tooltip.hide().removeClass(this.options.activeClass)
+ },
+ content: function () {
+ return this.tip
+ },
+ checkBoundary: function (left, top, width, height) {
+ var axis = ''
+ return (
+ (left < 0 || left - UI.$win.scrollLeft() + width > window.innerWidth) && (axis += 'x'),
+ (top < 0 || top - UI.$win.scrollTop() + height > window.innerHeight) && (axis += 'y'),
+ axis
+ )
+ }
+ }),
+ UI.tooltip
+ )
+ }),
+ (function (addon) {
+ var component
+ window.UIkit && (component = addon(UIkit)),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return component || addon(UIkit)
+ }.apply(exports, [__WEBPACK_LOCAL_MODULE_0__])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(function (UI) {
+ 'use strict'
+ var xhr, fi
+ function xhrupload (files, settings) {
+ if (!UI.support.ajaxupload) return this
+ if (((settings = UI.$.extend({}, xhrupload.defaults, settings)), files.length)) {
+ if ('*.*' !== settings.allow)
+ for (var file, i = 0; (file = files[i]); i++)
+ if (
+ ((pattern = settings.allow),
+ (path = file.name),
+ (parsedPattern = void 0),
+ (parsedPattern =
+ '^' +
+ (parsedPattern =
+ '^' +
+ pattern
+ .replace(/\//g, '\\/')
+ .replace(/\*\*/g, '(\\/[^\\/]+)*')
+ .replace(/\*/g, '[^\\/]+')
+ .replace(/((?!\\))\?/g, '$1.') +
+ '$') +
+ '$'),
+ null === path.match(new RegExp(parsedPattern, 'i')))
+ )
+ return void ('string' == typeof settings.notallowed
+ ? alert(settings.notallowed)
+ : settings.notallowed(file, settings))
+ var complete = settings.complete
+ if (settings.single) {
+ var count = files.length,
+ uploaded = 0,
+ allow = !0
+ settings.beforeAll(files),
+ (settings.complete = function (response, xhr) {
+ ;(uploaded += 1),
+ complete(response, xhr),
+ settings.filelimit && uploaded >= settings.filelimit && (allow = !1),
+ allow && uploaded < count
+ ? upload([files[uploaded]], settings)
+ : settings.allcomplete(response, xhr)
+ }),
+ upload([files[0]], settings)
+ } else
+ (settings.complete = function (response, xhr) {
+ complete(response, xhr), settings.allcomplete(response, xhr)
+ }),
+ upload(files, settings)
+ }
+ var pattern, path, parsedPattern
+ function upload (files, settings) {
+ var formData = new FormData(),
+ xhr = new XMLHttpRequest()
+ if (!1 !== settings.before(settings, files)) {
+ for (var f, i = 0; (f = files[i]); i++) formData.append(settings.param, f)
+ for (var p in settings.params) formData.append(p, settings.params[p])
+ xhr.upload.addEventListener(
+ 'progress',
+ function (e) {
+ var percent = (e.loaded / e.total) * 100
+ settings.progress(percent, e)
+ },
+ !1
+ ),
+ xhr.addEventListener(
+ 'loadstart',
+ function (e) {
+ settings.loadstart(e)
+ },
+ !1
+ ),
+ xhr.addEventListener(
+ 'load',
+ function (e) {
+ settings.load(e)
+ },
+ !1
+ ),
+ xhr.addEventListener(
+ 'loadend',
+ function (e) {
+ settings.loadend(e)
+ },
+ !1
+ ),
+ xhr.addEventListener(
+ 'error',
+ function (e) {
+ settings.error(e)
+ },
+ !1
+ ),
+ xhr.addEventListener(
+ 'abort',
+ function (e) {
+ settings.abort(e)
+ },
+ !1
+ ),
+ xhr.open(settings.method, settings.action, !0),
+ 'json' == settings.type && xhr.setRequestHeader('Accept', 'application/json'),
+ (xhr.onreadystatechange = function () {
+ if ((settings.readystatechange(xhr), 4 == xhr.readyState)) {
+ var response = xhr.responseText
+ if ('json' == settings.type)
+ try {
+ response = UI.$.parseJSON(response)
+ } catch (e) {
+ response = !1
+ }
+ settings.complete(response, xhr)
+ }
+ }),
+ settings.beforeSend(xhr),
+ xhr.send(formData)
+ }
+ }
+ }
+ return (
+ UI.component('uploadSelect', {
+ init: function () {
+ var $this = this
+ this.on('change', function () {
+ xhrupload($this.element[0].files, $this.options)
+ var twin = $this.element.clone(!0).data('uploadSelect', $this)
+ $this.element.replaceWith(twin), ($this.element = twin)
+ })
+ }
+ }),
+ UI.component('uploadDrop', {
+ defaults: { dragoverClass: 'uk-dragover' },
+ init: function () {
+ var $this = this,
+ hasdragCls = !1
+ this.on('drop', function (e) {
+ e.dataTransfer &&
+ e.dataTransfer.files &&
+ (e.stopPropagation(),
+ e.preventDefault(),
+ $this.element.removeClass($this.options.dragoverClass),
+ $this.element.trigger('dropped.uk.upload', [e.dataTransfer.files]),
+ xhrupload(e.dataTransfer.files, $this.options))
+ })
+ .on('dragenter', function (e) {
+ e.stopPropagation(), e.preventDefault()
+ })
+ .on('dragover', function (e) {
+ e.stopPropagation(),
+ e.preventDefault(),
+ hasdragCls || ($this.element.addClass($this.options.dragoverClass), (hasdragCls = !0))
+ })
+ .on('dragleave', function (e) {
+ e.stopPropagation(),
+ e.preventDefault(),
+ $this.element.removeClass($this.options.dragoverClass),
+ (hasdragCls = !1)
+ })
+ }
+ }),
+ (UI.support.ajaxupload = (((fi = document.createElement('INPUT')).type = 'file'),
+ 'files' in fi &&
+ !!((xhr = new XMLHttpRequest()) && 'upload' in xhr && 'onprogress' in xhr.upload) &&
+ !!window.FormData)),
+ UI.support.ajaxupload && UI.$.event.props.push('dataTransfer'),
+ (xhrupload.defaults = {
+ action: '',
+ single: !0,
+ method: 'POST',
+ param: 'files[]',
+ params: {},
+ allow: '*.*',
+ type: 'text',
+ filelimit: !1,
+ before: function (o) {},
+ beforeSend: function (xhr) {},
+ beforeAll: function () {},
+ loadstart: function () {},
+ load: function () {},
+ loadend: function () {},
+ error: function () {},
+ abort: function () {},
+ progress: function () {},
+ complete: function () {},
+ allcomplete: function () {},
+ readystatechange: function () {},
+ notallowed: function (file, settings) {
+ alert('Only the following file types are allowed: ' + settings.allow)
+ }
+ }),
+ (UI.Utils.xhrupload = xhrupload)
+ )
+ })
+ var easing_swiftOut = [0.4, 0, 0.2, 1]
+ 'undefined' != typeof UIkit &&
+ UIkit.on('beforeready.uk.dom', function () {
+ var old_hide_function, old_show_function
+ if (
+ (void 0 !== UIkit.components.accordion &&
+ $.extend(UIkit.components.accordion.prototype.defaults, { easing: easing_swiftOut, duration: 200 }),
+ void 0 !== UIkit.components.datepicker && $.extend(UIkit.components.datepicker.prototype.defaults, {}),
+ void 0 !== UIkit.components.dropdown.prototype &&
+ ($.extend(UIkit.components.dropdown.prototype.defaults, { remaintime: 150, delay: 50 }),
+ (old_show_function = UIkit.components.dropdown.prototype.show),
+ (UIkit.components.dropdown.prototype.show = function () {
+ return (
+ this.dropdown
+ .css({ 'min-width': this.dropdown.outerWidth() })
+ .addClass('uk-dropdown-active uk-dropdown-shown'),
+ old_show_function.apply(this, arguments)
+ )
+ }),
+ (old_hide_function = UIkit.components.dropdown.prototype.hide),
+ (UIkit.components.dropdown.prototype.hide = function () {
+ var this_dropdown = this.dropdown
+ return (
+ this_dropdown.removeClass('uk-dropdown-shown'),
+ setTimeout(function () {
+ this_dropdown.removeClass('uk-dropdown-active')
+ }, 280),
+ old_hide_function.apply(this, arguments)
+ )
+ })),
+ void 0 !== UIkit.components.modal)
+ ) {
+ $.extend(UIkit.components.modal.prototype.defaults, { center: !0 })
+ var $body = $('body')
+ ;(UIkit.modal.dialog.template =
+ '
'),
+ $body.on('show.uk.modal', '.uk-modal-dialog-replace', function () {
+ setTimeout(function () {
+ var dialogReplace = $('.uk-modal-dialog-replace')
+ if (dialogReplace.find('.uk-button-primary').length) {
+ var actionBtn = dialogReplace
+ .find('.uk-button-primary')
+ .toggleClass('uk-button-primary md-btn-flat-primary')
+ actionBtn.next('button') && actionBtn.next('button').after(actionBtn)
+ }
+ dialogReplace.find('.uk-button').length &&
+ dialogReplace.find('.uk-button').toggleClass('uk-button md-btn md-btn-flat'),
+ dialogReplace.find('.uk-margin-small-top').length &&
+ dialogReplace.find('.uk-margin-small-top').toggleClass('uk-margin-small-top uk-margin-top'),
+ dialogReplace.find('input.uk-width-1-1').length &&
+ dialogReplace.find('input.uk-width-1-1').toggleClass('uk-width-1-1 md-input'),
+ dialogReplace.find('.uk-form').length && dialogReplace.find('.uk-form').removeClass('uk-form')
+ }, 50)
+ })
+ }
+ void 0 !== UIkit.components.tooltip &&
+ $.extend(UIkit.components.tooltip.prototype.defaults, { animation: 280, offset: 8 }),
+ void 0 !== UIkit.components.sortable &&
+ Modernizr.touch &&
+ $('[data-uk-sortable]')
+ .children()
+ .addClass('needsclick')
+ }),
+ (module.exports = UIkit)
+ }.call(
+ this,
+ __webpack_require__(0),
+ __webpack_require__(0),
+ __webpack_require__(5),
+ __webpack_require__(0),
+ __webpack_require__(3)
+ ))
+ },
+ function (module, exports, __webpack_require__) {
+ ;(function (module) {
+ module.exports = (function () {
+ 'use strict'
+ var hookCallback
+ function hooks () {
+ return hookCallback.apply(null, arguments)
+ }
+ function isArray (input) {
+ return input instanceof Array || '[object Array]' === Object.prototype.toString.call(input)
+ }
+ function isObject (input) {
+ return null != input && '[object Object]' === Object.prototype.toString.call(input)
+ }
+ function isUndefined (input) {
+ return void 0 === input
+ }
+ function isNumber (input) {
+ return 'number' == typeof input || '[object Number]' === Object.prototype.toString.call(input)
+ }
+ function isDate (input) {
+ return input instanceof Date || '[object Date]' === Object.prototype.toString.call(input)
+ }
+ function map (arr, fn) {
+ var i,
+ res = []
+ for (i = 0; i < arr.length; ++i) res.push(fn(arr[i], i))
+ return res
+ }
+ function hasOwnProp (a, b) {
+ return Object.prototype.hasOwnProperty.call(a, b)
+ }
+ function extend (a, b) {
+ for (var i in b) hasOwnProp(b, i) && (a[i] = b[i])
+ return (
+ hasOwnProp(b, 'toString') && (a.toString = b.toString),
+ hasOwnProp(b, 'valueOf') && (a.valueOf = b.valueOf),
+ a
+ )
+ }
+ function createUTC (input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, !0).utc()
+ }
+ function getParsingFlags (m) {
+ return (
+ null == m._pf &&
+ (m._pf = {
+ empty: !1,
+ unusedTokens: [],
+ unusedInput: [],
+ overflow: -2,
+ charsLeftOver: 0,
+ nullInput: !1,
+ invalidMonth: null,
+ invalidFormat: !1,
+ userInvalidated: !1,
+ iso: !1,
+ parsedDateParts: [],
+ meridiem: null,
+ rfc2822: !1,
+ weekdayMismatch: !1
+ }),
+ m._pf
+ )
+ }
+ var some$1 = Array.prototype.some
+ ? Array.prototype.some
+ : function (fun) {
+ for (var t = Object(this), len = t.length >>> 0, i = 0; i < len; i++)
+ if (i in t && fun.call(this, t[i], i, t)) return !0
+ return !1
+ }
+ function isValid (m) {
+ if (null == m._isValid) {
+ var flags = getParsingFlags(m),
+ parsedParts = some$1.call(flags.parsedDateParts, function (i) {
+ return null != i
+ }),
+ isNowValid =
+ !isNaN(m._d.getTime()) &&
+ flags.overflow < 0 &&
+ !flags.empty &&
+ !flags.invalidMonth &&
+ !flags.invalidWeekday &&
+ !flags.nullInput &&
+ !flags.invalidFormat &&
+ !flags.userInvalidated &&
+ (!flags.meridiem || (flags.meridiem && parsedParts))
+ if (
+ (m._strict &&
+ (isNowValid =
+ isNowValid &&
+ 0 === flags.charsLeftOver &&
+ 0 === flags.unusedTokens.length &&
+ void 0 === flags.bigHour),
+ null != Object.isFrozen && Object.isFrozen(m))
+ )
+ return isNowValid
+ m._isValid = isNowValid
+ }
+ return m._isValid
+ }
+ function createInvalid (flags) {
+ var m = createUTC(NaN)
+ return null != flags ? extend(getParsingFlags(m), flags) : (getParsingFlags(m).userInvalidated = !0), m
+ }
+ var momentProperties = (hooks.momentProperties = [])
+ function copyConfig (to, from) {
+ var i, prop, val
+ if (
+ (isUndefined(from._isAMomentObject) || (to._isAMomentObject = from._isAMomentObject),
+ isUndefined(from._i) || (to._i = from._i),
+ isUndefined(from._f) || (to._f = from._f),
+ isUndefined(from._l) || (to._l = from._l),
+ isUndefined(from._strict) || (to._strict = from._strict),
+ isUndefined(from._tzm) || (to._tzm = from._tzm),
+ isUndefined(from._isUTC) || (to._isUTC = from._isUTC),
+ isUndefined(from._offset) || (to._offset = from._offset),
+ isUndefined(from._pf) || (to._pf = getParsingFlags(from)),
+ isUndefined(from._locale) || (to._locale = from._locale),
+ momentProperties.length > 0)
+ )
+ for (i = 0; i < momentProperties.length; i++)
+ (prop = momentProperties[i]), isUndefined((val = from[prop])) || (to[prop] = val)
+ return to
+ }
+ var updateInProgress = !1
+ function Moment (config) {
+ copyConfig(this, config),
+ (this._d = new Date(null != config._d ? config._d.getTime() : NaN)),
+ this.isValid() || (this._d = new Date(NaN)),
+ !1 === updateInProgress && ((updateInProgress = !0), hooks.updateOffset(this), (updateInProgress = !1))
+ }
+ function isMoment (obj) {
+ return obj instanceof Moment || (null != obj && null != obj._isAMomentObject)
+ }
+ function absFloor (number) {
+ return number < 0 ? Math.ceil(number) || 0 : Math.floor(number)
+ }
+ function toInt (argumentForCoercion) {
+ var coercedNumber = +argumentForCoercion,
+ value = 0
+ return 0 !== coercedNumber && isFinite(coercedNumber) && (value = absFloor(coercedNumber)), value
+ }
+ function compareArrays (array1, array2, dontConvert) {
+ var i,
+ len = Math.min(array1.length, array2.length),
+ lengthDiff = Math.abs(array1.length - array2.length),
+ diffs = 0
+ for (i = 0; i < len; i++)
+ ((dontConvert && array1[i] !== array2[i]) || (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) &&
+ diffs++
+ return diffs + lengthDiff
+ }
+ function warn (msg) {
+ !1 === hooks.suppressDeprecationWarnings &&
+ 'undefined' != typeof console &&
+ console.warn &&
+ console.warn('Deprecation warning: ' + msg)
+ }
+ function deprecate (msg, fn) {
+ var firstTime = !0
+ return extend(function () {
+ if ((null != hooks.deprecationHandler && hooks.deprecationHandler(null, msg), firstTime)) {
+ for (var arg, args = [], i = 0; i < arguments.length; i++) {
+ if (((arg = ''), 'object' == typeof arguments[i])) {
+ for (var key in ((arg += '\n[' + i + '] '), arguments[0]))
+ arg += key + ': ' + arguments[0][key] + ', '
+ arg = arg.slice(0, -2)
+ } else arg = arguments[i]
+ args.push(arg)
+ }
+ warn(msg + '\nArguments: ' + Array.prototype.slice.call(args).join('') + '\n' + new Error().stack),
+ (firstTime = !1)
+ }
+ return fn.apply(this, arguments)
+ }, fn)
+ }
+ var deprecations = {}
+ function deprecateSimple (name, msg) {
+ null != hooks.deprecationHandler && hooks.deprecationHandler(name, msg),
+ deprecations[name] || (warn(msg), (deprecations[name] = !0))
+ }
+ function isFunction (input) {
+ return input instanceof Function || '[object Function]' === Object.prototype.toString.call(input)
+ }
+ function mergeConfigs (parentConfig, childConfig) {
+ var prop,
+ res = extend({}, parentConfig)
+ for (prop in childConfig)
+ hasOwnProp(childConfig, prop) &&
+ (isObject(parentConfig[prop]) && isObject(childConfig[prop])
+ ? ((res[prop] = {}), extend(res[prop], parentConfig[prop]), extend(res[prop], childConfig[prop]))
+ : null != childConfig[prop]
+ ? (res[prop] = childConfig[prop])
+ : delete res[prop])
+ for (prop in parentConfig)
+ hasOwnProp(parentConfig, prop) &&
+ !hasOwnProp(childConfig, prop) &&
+ isObject(parentConfig[prop]) &&
+ (res[prop] = extend({}, res[prop]))
+ return res
+ }
+ function Locale (config) {
+ null != config && this.set(config)
+ }
+ ;(hooks.suppressDeprecationWarnings = !1), (hooks.deprecationHandler = null)
+ var keys$1 = Object.keys
+ ? Object.keys
+ : function (obj) {
+ var i,
+ res = []
+ for (i in obj) hasOwnProp(obj, i) && res.push(i)
+ return res
+ },
+ aliases = {}
+ function addUnitAlias (unit, shorthand) {
+ var lowerCase = unit.toLowerCase()
+ aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit
+ }
+ function normalizeUnits (units) {
+ return 'string' == typeof units ? aliases[units] || aliases[units.toLowerCase()] : void 0
+ }
+ function normalizeObjectUnits (inputObject) {
+ var normalizedProp,
+ prop,
+ normalizedInput = {}
+ for (prop in inputObject)
+ hasOwnProp(inputObject, prop) &&
+ (normalizedProp = normalizeUnits(prop)) &&
+ (normalizedInput[normalizedProp] = inputObject[prop])
+ return normalizedInput
+ }
+ var priorities = {}
+ function addUnitPriority (unit, priority) {
+ priorities[unit] = priority
+ }
+ function makeGetSet (unit, keepTime) {
+ return function (value) {
+ return null != value
+ ? (set$1(this, unit, value), hooks.updateOffset(this, keepTime), this)
+ : get(this, unit)
+ }
+ }
+ function get (mom, unit) {
+ return mom.isValid() ? mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit]() : NaN
+ }
+ function set$1 (mom, unit, value) {
+ mom.isValid() && mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value)
+ }
+ function zeroFill (number, targetLength, forceSign) {
+ var absNumber = '' + Math.abs(number),
+ zerosToFill = targetLength - absNumber.length,
+ sign = number >= 0
+ return (
+ (sign ? (forceSign ? '+' : '') : '-') +
+ Math.pow(10, Math.max(0, zerosToFill))
+ .toString()
+ .substr(1) +
+ absNumber
+ )
+ }
+ var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
+ localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
+ formatFunctions = {},
+ formatTokenFunctions = {}
+ function addFormatToken (token, padded, ordinal, callback) {
+ var func = callback
+ 'string' == typeof callback &&
+ (func = function () {
+ return this[callback]()
+ }),
+ token && (formatTokenFunctions[token] = func),
+ padded &&
+ (formatTokenFunctions[padded[0]] = function () {
+ return zeroFill(func.apply(this, arguments), padded[1], padded[2])
+ }),
+ ordinal &&
+ (formatTokenFunctions[ordinal] = function () {
+ return this.localeData().ordinal(func.apply(this, arguments), token)
+ })
+ }
+ function formatMoment (m, format) {
+ return m.isValid()
+ ? ((format = expandFormat(format, m.localeData())),
+ (formatFunctions[format] =
+ formatFunctions[format] ||
+ (function (format) {
+ var i,
+ length,
+ input,
+ array = format.match(formattingTokens)
+ for (i = 0, length = array.length; i < length; i++)
+ formatTokenFunctions[array[i]]
+ ? (array[i] = formatTokenFunctions[array[i]])
+ : (array[i] = (input = array[i]).match(/\[[\s\S]/)
+ ? input.replace(/^\[|\]$/g, '')
+ : input.replace(/\\/g, ''))
+ return function (mom) {
+ var i,
+ output = ''
+ for (i = 0; i < length; i++) output += isFunction(array[i]) ? array[i].call(mom, format) : array[i]
+ return output
+ }
+ })(format)),
+ formatFunctions[format](m))
+ : m.localeData().invalidDate()
+ }
+ function expandFormat (format, locale) {
+ var i = 5
+ function replaceLongDateFormatTokens (input) {
+ return locale.longDateFormat(input) || input
+ }
+ for (localFormattingTokens.lastIndex = 0; i >= 0 && localFormattingTokens.test(format); )
+ (format = format.replace(localFormattingTokens, replaceLongDateFormatTokens)),
+ (localFormattingTokens.lastIndex = 0),
+ (i -= 1)
+ return format
+ }
+ var match1 = /\d/,
+ match2 = /\d\d/,
+ match3 = /\d{3}/,
+ match4 = /\d{4}/,
+ match6 = /[+-]?\d{6}/,
+ match1to2 = /\d\d?/,
+ match3to4 = /\d\d\d\d?/,
+ match5to6 = /\d\d\d\d\d\d?/,
+ match1to3 = /\d{1,3}/,
+ match1to4 = /\d{1,4}/,
+ match1to6 = /[+-]?\d{1,6}/,
+ matchUnsigned = /\d+/,
+ matchSigned = /[+-]?\d+/,
+ matchOffset = /Z|[+-]\d\d:?\d\d/gi,
+ matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi,
+ matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,
+ regexes = {}
+ function addRegexToken (token, regex, strictRegex) {
+ regexes[token] = isFunction(regex)
+ ? regex
+ : function (isStrict, localeData) {
+ return isStrict && strictRegex ? strictRegex : regex
+ }
+ }
+ function getParseRegexForToken (token, config) {
+ return hasOwnProp(regexes, token)
+ ? regexes[token](config._strict, config._locale)
+ : new RegExp(
+ regexEscape(
+ token
+ .replace('\\', '')
+ .replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) {
+ return p1 || p2 || p3 || p4
+ })
+ )
+ )
+ }
+ function regexEscape (s) {
+ return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
+ }
+ var tokens = {}
+ function addParseToken (token, callback) {
+ var i,
+ func = callback
+ for (
+ 'string' == typeof token && (token = [token]),
+ isNumber(callback) &&
+ (func = function (input, array) {
+ array[callback] = toInt(input)
+ }),
+ i = 0;
+ i < token.length;
+ i++
+ )
+ tokens[token[i]] = func
+ }
+ function addWeekParseToken (token, callback) {
+ addParseToken(token, function (input, array, config, token) {
+ ;(config._w = config._w || {}), callback(input, config._w, config, token)
+ })
+ }
+ function addTimeToArrayFromToken (token, input, config) {
+ null != input && hasOwnProp(tokens, token) && tokens[token](input, config._a, config, token)
+ }
+ var YEAR = 0,
+ MONTH = 1,
+ DATE = 2,
+ HOUR = 3,
+ MINUTE = 4,
+ SECOND = 5,
+ MILLISECOND = 6,
+ WEEK = 7,
+ WEEKDAY = 8,
+ indexOf$1 = Array.prototype.indexOf
+ ? Array.prototype.indexOf
+ : function (o) {
+ var i
+ for (i = 0; i < this.length; ++i) if (this[i] === o) return i
+ return -1
+ }
+ function daysInMonth (year, month) {
+ return new Date(Date.UTC(year, month + 1, 0)).getUTCDate()
+ }
+ addFormatToken('M', ['MM', 2], 'Mo', function () {
+ return this.month() + 1
+ }),
+ addFormatToken('MMM', 0, 0, function (format) {
+ return this.localeData().monthsShort(this, format)
+ }),
+ addFormatToken('MMMM', 0, 0, function (format) {
+ return this.localeData().months(this, format)
+ }),
+ addUnitAlias('month', 'M'),
+ addUnitPriority('month', 8),
+ addRegexToken('M', match1to2),
+ addRegexToken('MM', match1to2, match2),
+ addRegexToken('MMM', function (isStrict, locale) {
+ return locale.monthsShortRegex(isStrict)
+ }),
+ addRegexToken('MMMM', function (isStrict, locale) {
+ return locale.monthsRegex(isStrict)
+ }),
+ addParseToken(['M', 'MM'], function (input, array) {
+ array[MONTH] = toInt(input) - 1
+ }),
+ addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
+ var month = config._locale.monthsParse(input, token, config._strict)
+ null != month ? (array[MONTH] = month) : (getParsingFlags(config).invalidMonth = input)
+ })
+ var MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
+ defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split(
+ '_'
+ ),
+ defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_')
+ function setMonth (mom, value) {
+ var dayOfMonth
+ if (!mom.isValid()) return mom
+ if ('string' == typeof value)
+ if (/^\d+$/.test(value)) value = toInt(value)
+ else if (!isNumber((value = mom.localeData().monthsParse(value)))) return mom
+ return (
+ (dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value))),
+ mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth),
+ mom
+ )
+ }
+ function getSetMonth (value) {
+ return null != value ? (setMonth(this, value), hooks.updateOffset(this, !0), this) : get(this, 'Month')
+ }
+ var defaultMonthsShortRegex = matchWord,
+ defaultMonthsRegex = matchWord
+ function computeMonthsParse () {
+ function cmpLenRev (a, b) {
+ return b.length - a.length
+ }
+ var i,
+ mom,
+ shortPieces = [],
+ longPieces = [],
+ mixedPieces = []
+ for (i = 0; i < 12; i++)
+ (mom = createUTC([2e3, i])),
+ shortPieces.push(this.monthsShort(mom, '')),
+ longPieces.push(this.months(mom, '')),
+ mixedPieces.push(this.months(mom, '')),
+ mixedPieces.push(this.monthsShort(mom, ''))
+ for (shortPieces.sort(cmpLenRev), longPieces.sort(cmpLenRev), mixedPieces.sort(cmpLenRev), i = 0; i < 12; i++)
+ (shortPieces[i] = regexEscape(shortPieces[i])), (longPieces[i] = regexEscape(longPieces[i]))
+ for (i = 0; i < 24; i++) mixedPieces[i] = regexEscape(mixedPieces[i])
+ ;(this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i')),
+ (this._monthsShortRegex = this._monthsRegex),
+ (this._monthsStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i')),
+ (this._monthsShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i'))
+ }
+ function daysInYear (year) {
+ return isLeapYear(year) ? 366 : 365
+ }
+ function isLeapYear (year) {
+ return (year % 4 == 0 && year % 100 != 0) || year % 400 == 0
+ }
+ addFormatToken('Y', 0, 0, function () {
+ var y = this.year()
+ return y <= 9999 ? '' + y : '+' + y
+ }),
+ addFormatToken(0, ['YY', 2], 0, function () {
+ return this.year() % 100
+ }),
+ addFormatToken(0, ['YYYY', 4], 0, 'year'),
+ addFormatToken(0, ['YYYYY', 5], 0, 'year'),
+ addFormatToken(0, ['YYYYYY', 6, !0], 0, 'year'),
+ addUnitAlias('year', 'y'),
+ addUnitPriority('year', 1),
+ addRegexToken('Y', matchSigned),
+ addRegexToken('YY', match1to2, match2),
+ addRegexToken('YYYY', match1to4, match4),
+ addRegexToken('YYYYY', match1to6, match6),
+ addRegexToken('YYYYYY', match1to6, match6),
+ addParseToken(['YYYYY', 'YYYYYY'], YEAR),
+ addParseToken('YYYY', function (input, array) {
+ array[YEAR] = 2 === input.length ? hooks.parseTwoDigitYear(input) : toInt(input)
+ }),
+ addParseToken('YY', function (input, array) {
+ array[YEAR] = hooks.parseTwoDigitYear(input)
+ }),
+ addParseToken('Y', function (input, array) {
+ array[YEAR] = parseInt(input, 10)
+ }),
+ (hooks.parseTwoDigitYear = function (input) {
+ return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3)
+ })
+ var getSetYear = makeGetSet('FullYear', !0)
+ function createUTCDate (y) {
+ var date = new Date(Date.UTC.apply(null, arguments))
+ return y < 100 && y >= 0 && isFinite(date.getUTCFullYear()) && date.setUTCFullYear(y), date
+ }
+ function firstWeekOffset (year, dow, doy) {
+ var fwd = 7 + dow - doy,
+ fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7
+ return -fwdlw + fwd - 1
+ }
+ function dayOfYearFromWeeks (year, week, weekday, dow, doy) {
+ var resYear,
+ resDayOfYear,
+ localWeekday = (7 + weekday - dow) % 7,
+ weekOffset = firstWeekOffset(year, dow, doy),
+ dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset
+ return (
+ dayOfYear <= 0
+ ? (resDayOfYear = daysInYear((resYear = year - 1)) + dayOfYear)
+ : dayOfYear > daysInYear(year)
+ ? ((resYear = year + 1), (resDayOfYear = dayOfYear - daysInYear(year)))
+ : ((resYear = year), (resDayOfYear = dayOfYear)),
+ { year: resYear, dayOfYear: resDayOfYear }
+ )
+ }
+ function weekOfYear (mom, dow, doy) {
+ var resWeek,
+ resYear,
+ weekOffset = firstWeekOffset(mom.year(), dow, doy),
+ week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1
+ return (
+ week < 1
+ ? ((resYear = mom.year() - 1), (resWeek = week + weeksInYear(resYear, dow, doy)))
+ : week > weeksInYear(mom.year(), dow, doy)
+ ? ((resWeek = week - weeksInYear(mom.year(), dow, doy)), (resYear = mom.year() + 1))
+ : ((resYear = mom.year()), (resWeek = week)),
+ { week: resWeek, year: resYear }
+ )
+ }
+ function weeksInYear (year, dow, doy) {
+ var weekOffset = firstWeekOffset(year, dow, doy),
+ weekOffsetNext = firstWeekOffset(year + 1, dow, doy)
+ return (daysInYear(year) - weekOffset + weekOffsetNext) / 7
+ }
+ addFormatToken('w', ['ww', 2], 'wo', 'week'),
+ addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'),
+ addUnitAlias('week', 'w'),
+ addUnitAlias('isoWeek', 'W'),
+ addUnitPriority('week', 5),
+ addUnitPriority('isoWeek', 5),
+ addRegexToken('w', match1to2),
+ addRegexToken('ww', match1to2, match2),
+ addRegexToken('W', match1to2),
+ addRegexToken('WW', match1to2, match2),
+ addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) {
+ week[token.substr(0, 1)] = toInt(input)
+ }),
+ addFormatToken('d', 0, 'do', 'day'),
+ addFormatToken('dd', 0, 0, function (format) {
+ return this.localeData().weekdaysMin(this, format)
+ }),
+ addFormatToken('ddd', 0, 0, function (format) {
+ return this.localeData().weekdaysShort(this, format)
+ }),
+ addFormatToken('dddd', 0, 0, function (format) {
+ return this.localeData().weekdays(this, format)
+ }),
+ addFormatToken('e', 0, 0, 'weekday'),
+ addFormatToken('E', 0, 0, 'isoWeekday'),
+ addUnitAlias('day', 'd'),
+ addUnitAlias('weekday', 'e'),
+ addUnitAlias('isoWeekday', 'E'),
+ addUnitPriority('day', 11),
+ addUnitPriority('weekday', 11),
+ addUnitPriority('isoWeekday', 11),
+ addRegexToken('d', match1to2),
+ addRegexToken('e', match1to2),
+ addRegexToken('E', match1to2),
+ addRegexToken('dd', function (isStrict, locale) {
+ return locale.weekdaysMinRegex(isStrict)
+ }),
+ addRegexToken('ddd', function (isStrict, locale) {
+ return locale.weekdaysShortRegex(isStrict)
+ }),
+ addRegexToken('dddd', function (isStrict, locale) {
+ return locale.weekdaysRegex(isStrict)
+ }),
+ addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
+ var weekday = config._locale.weekdaysParse(input, token, config._strict)
+ null != weekday ? (week.d = weekday) : (getParsingFlags(config).invalidWeekday = input)
+ }),
+ addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
+ week[token] = toInt(input)
+ })
+ var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
+ defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
+ defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
+ defaultWeekdaysRegex = matchWord,
+ defaultWeekdaysShortRegex = matchWord,
+ defaultWeekdaysMinRegex = matchWord
+ function computeWeekdaysParse () {
+ function cmpLenRev (a, b) {
+ return b.length - a.length
+ }
+ var i,
+ mom,
+ minp,
+ shortp,
+ longp,
+ minPieces = [],
+ shortPieces = [],
+ longPieces = [],
+ mixedPieces = []
+ for (i = 0; i < 7; i++)
+ (mom = createUTC([2e3, 1]).day(i)),
+ (minp = this.weekdaysMin(mom, '')),
+ (shortp = this.weekdaysShort(mom, '')),
+ (longp = this.weekdays(mom, '')),
+ minPieces.push(minp),
+ shortPieces.push(shortp),
+ longPieces.push(longp),
+ mixedPieces.push(minp),
+ mixedPieces.push(shortp),
+ mixedPieces.push(longp)
+ for (
+ minPieces.sort(cmpLenRev),
+ shortPieces.sort(cmpLenRev),
+ longPieces.sort(cmpLenRev),
+ mixedPieces.sort(cmpLenRev),
+ i = 0;
+ i < 7;
+ i++
+ )
+ (shortPieces[i] = regexEscape(shortPieces[i])),
+ (longPieces[i] = regexEscape(longPieces[i])),
+ (mixedPieces[i] = regexEscape(mixedPieces[i]))
+ ;(this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i')),
+ (this._weekdaysShortRegex = this._weekdaysRegex),
+ (this._weekdaysMinRegex = this._weekdaysRegex),
+ (this._weekdaysStrictRegex = new RegExp('^(' + longPieces.join('|') + ')', 'i')),
+ (this._weekdaysShortStrictRegex = new RegExp('^(' + shortPieces.join('|') + ')', 'i')),
+ (this._weekdaysMinStrictRegex = new RegExp('^(' + minPieces.join('|') + ')', 'i'))
+ }
+ function hFormat () {
+ return this.hours() % 12 || 12
+ }
+ function meridiem (token, lowercase) {
+ addFormatToken(token, 0, 0, function () {
+ return this.localeData().meridiem(this.hours(), this.minutes(), lowercase)
+ })
+ }
+ function matchMeridiem (isStrict, locale) {
+ return locale._meridiemParse
+ }
+ addFormatToken('H', ['HH', 2], 0, 'hour'),
+ addFormatToken('h', ['hh', 2], 0, hFormat),
+ addFormatToken('k', ['kk', 2], 0, function () {
+ return this.hours() || 24
+ }),
+ addFormatToken('hmm', 0, 0, function () {
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2)
+ }),
+ addFormatToken('hmmss', 0, 0, function () {
+ return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2)
+ }),
+ addFormatToken('Hmm', 0, 0, function () {
+ return '' + this.hours() + zeroFill(this.minutes(), 2)
+ }),
+ addFormatToken('Hmmss', 0, 0, function () {
+ return '' + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2)
+ }),
+ meridiem('a', !0),
+ meridiem('A', !1),
+ addUnitAlias('hour', 'h'),
+ addUnitPriority('hour', 13),
+ addRegexToken('a', matchMeridiem),
+ addRegexToken('A', matchMeridiem),
+ addRegexToken('H', match1to2),
+ addRegexToken('h', match1to2),
+ addRegexToken('k', match1to2),
+ addRegexToken('HH', match1to2, match2),
+ addRegexToken('hh', match1to2, match2),
+ addRegexToken('kk', match1to2, match2),
+ addRegexToken('hmm', match3to4),
+ addRegexToken('hmmss', match5to6),
+ addRegexToken('Hmm', match3to4),
+ addRegexToken('Hmmss', match5to6),
+ addParseToken(['H', 'HH'], HOUR),
+ addParseToken(['k', 'kk'], function (input, array, config) {
+ var kInput = toInt(input)
+ array[HOUR] = 24 === kInput ? 0 : kInput
+ }),
+ addParseToken(['a', 'A'], function (input, array, config) {
+ ;(config._isPm = config._locale.isPM(input)), (config._meridiem = input)
+ }),
+ addParseToken(['h', 'hh'], function (input, array, config) {
+ ;(array[HOUR] = toInt(input)), (getParsingFlags(config).bigHour = !0)
+ }),
+ addParseToken('hmm', function (input, array, config) {
+ var pos = input.length - 2
+ ;(array[HOUR] = toInt(input.substr(0, pos))),
+ (array[MINUTE] = toInt(input.substr(pos))),
+ (getParsingFlags(config).bigHour = !0)
+ }),
+ addParseToken('hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2
+ ;(array[HOUR] = toInt(input.substr(0, pos1))),
+ (array[MINUTE] = toInt(input.substr(pos1, 2))),
+ (array[SECOND] = toInt(input.substr(pos2))),
+ (getParsingFlags(config).bigHour = !0)
+ }),
+ addParseToken('Hmm', function (input, array, config) {
+ var pos = input.length - 2
+ ;(array[HOUR] = toInt(input.substr(0, pos))), (array[MINUTE] = toInt(input.substr(pos)))
+ }),
+ addParseToken('Hmmss', function (input, array, config) {
+ var pos1 = input.length - 4,
+ pos2 = input.length - 2
+ ;(array[HOUR] = toInt(input.substr(0, pos1))),
+ (array[MINUTE] = toInt(input.substr(pos1, 2))),
+ (array[SECOND] = toInt(input.substr(pos2)))
+ })
+ var globalLocale,
+ getSetHour = makeGetSet('Hours', !0),
+ baseConfig = {
+ calendar: {
+ sameDay: '[Today at] LT',
+ nextDay: '[Tomorrow at] LT',
+ nextWeek: 'dddd [at] LT',
+ lastDay: '[Yesterday at] LT',
+ lastWeek: '[Last] dddd [at] LT',
+ sameElse: 'L'
+ },
+ longDateFormat: {
+ LTS: 'h:mm:ss A',
+ LT: 'h:mm A',
+ L: 'MM/DD/YYYY',
+ LL: 'MMMM D, YYYY',
+ LLL: 'MMMM D, YYYY h:mm A',
+ LLLL: 'dddd, MMMM D, YYYY h:mm A'
+ },
+ invalidDate: 'Invalid date',
+ ordinal: '%d',
+ dayOfMonthOrdinalParse: /\d{1,2}/,
+ relativeTime: {
+ future: 'in %s',
+ past: '%s ago',
+ s: 'a few seconds',
+ ss: '%d seconds',
+ m: 'a minute',
+ mm: '%d minutes',
+ h: 'an hour',
+ hh: '%d hours',
+ d: 'a day',
+ dd: '%d days',
+ M: 'a month',
+ MM: '%d months',
+ y: 'a year',
+ yy: '%d years'
+ },
+ months: defaultLocaleMonths,
+ monthsShort: defaultLocaleMonthsShort,
+ week: { dow: 0, doy: 6 },
+ weekdays: defaultLocaleWeekdays,
+ weekdaysMin: defaultLocaleWeekdaysMin,
+ weekdaysShort: defaultLocaleWeekdaysShort,
+ meridiemParse: /[ap]\.?m?\.?/i
+ },
+ locales = {},
+ localeFamilies = {}
+ function normalizeLocale (key) {
+ return key ? key.toLowerCase().replace('_', '-') : key
+ }
+ function loadLocale (name) {
+ var oldLocale = null
+ if (!locales[name] && void 0 !== module && module && module.exports)
+ try {
+ ;(oldLocale = globalLocale._abbr),
+ (function () {
+ var e = new Error("Cannot find module 'undefined'")
+ throw ((e.code = 'MODULE_NOT_FOUND'), e)
+ })(),
+ getSetGlobalLocale(oldLocale)
+ } catch (e) {}
+ return locales[name]
+ }
+ function getSetGlobalLocale (key, values) {
+ var data
+ return (
+ key && (data = isUndefined(values) ? getLocale(key) : defineLocale(key, values)) && (globalLocale = data),
+ globalLocale._abbr
+ )
+ }
+ function defineLocale (name, config) {
+ if (null !== config) {
+ var parentConfig = baseConfig
+ if (((config.abbr = name), null != locales[name]))
+ deprecateSimple(
+ 'defineLocaleOverride',
+ 'use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
+ ),
+ (parentConfig = locales[name]._config)
+ else if (null != config.parentLocale) {
+ if (null == locales[config.parentLocale])
+ return (
+ localeFamilies[config.parentLocale] || (localeFamilies[config.parentLocale] = []),
+ localeFamilies[config.parentLocale].push({ name, config }),
+ null
+ )
+ parentConfig = locales[config.parentLocale]._config
+ }
+ return (
+ (locales[name] = new Locale(mergeConfigs(parentConfig, config))),
+ localeFamilies[name] &&
+ localeFamilies[name].forEach(function (x) {
+ defineLocale(x.name, x.config)
+ }),
+ getSetGlobalLocale(name),
+ locales[name]
+ )
+ }
+ return delete locales[name], null
+ }
+ function getLocale (key) {
+ var locale
+ if ((key && key._locale && key._locale._abbr && (key = key._locale._abbr), !key)) return globalLocale
+ if (!isArray(key)) {
+ if ((locale = loadLocale(key))) return locale
+ key = [key]
+ }
+ return (function (names) {
+ for (var j, next, locale, split, i = 0; i < names.length; ) {
+ for (
+ split = normalizeLocale(names[i]).split('-'),
+ j = split.length,
+ next = (next = normalizeLocale(names[i + 1])) ? next.split('-') : null;
+ j > 0;
+
+ ) {
+ if ((locale = loadLocale(split.slice(0, j).join('-')))) return locale
+ if (next && next.length >= j && compareArrays(split, next, !0) >= j - 1) break
+ j--
+ }
+ i++
+ }
+ return null
+ })(key)
+ }
+ function checkOverflow (m) {
+ var overflow,
+ a = m._a
+ return (
+ a &&
+ -2 === getParsingFlags(m).overflow &&
+ ((overflow =
+ a[MONTH] < 0 || a[MONTH] > 11
+ ? MONTH
+ : a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
+ ? DATE
+ : a[HOUR] < 0 ||
+ a[HOUR] > 24 ||
+ (24 === a[HOUR] && (0 !== a[MINUTE] || 0 !== a[SECOND] || 0 !== a[MILLISECOND]))
+ ? HOUR
+ : a[MINUTE] < 0 || a[MINUTE] > 59
+ ? MINUTE
+ : a[SECOND] < 0 || a[SECOND] > 59
+ ? SECOND
+ : a[MILLISECOND] < 0 || a[MILLISECOND] > 999
+ ? MILLISECOND
+ : -1),
+ getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE) && (overflow = DATE),
+ getParsingFlags(m)._overflowWeeks && -1 === overflow && (overflow = WEEK),
+ getParsingFlags(m)._overflowWeekday && -1 === overflow && (overflow = WEEKDAY),
+ (getParsingFlags(m).overflow = overflow)),
+ m
+ )
+ }
+ var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
+ tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
+ isoDates = [
+ ['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
+ ['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
+ ['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
+ ['GGGG-[W]WW', /\d{4}-W\d\d/, !1],
+ ['YYYY-DDD', /\d{4}-\d{3}/],
+ ['YYYY-MM', /\d{4}-\d\d/, !1],
+ ['YYYYYYMMDD', /[+-]\d{10}/],
+ ['YYYYMMDD', /\d{8}/],
+ ['GGGG[W]WWE', /\d{4}W\d{3}/],
+ ['GGGG[W]WW', /\d{4}W\d{2}/, !1],
+ ['YYYYDDD', /\d{7}/]
+ ],
+ isoTimes = [
+ ['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
+ ['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
+ ['HH:mm:ss', /\d\d:\d\d:\d\d/],
+ ['HH:mm', /\d\d:\d\d/],
+ ['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
+ ['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
+ ['HHmmss', /\d\d\d\d\d\d/],
+ ['HHmm', /\d\d\d\d/],
+ ['HH', /\d\d/]
+ ],
+ aspNetJsonRegex = /^\/?Date\((\-?\d+)/i
+ function configFromISO (config) {
+ var i,
+ l,
+ allowTime,
+ dateFormat,
+ timeFormat,
+ tzFormat,
+ string = config._i,
+ match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string)
+ if (match) {
+ for (getParsingFlags(config).iso = !0, i = 0, l = isoDates.length; i < l; i++)
+ if (isoDates[i][1].exec(match[1])) {
+ ;(dateFormat = isoDates[i][0]), (allowTime = !1 !== isoDates[i][2])
+ break
+ }
+ if (null == dateFormat) return void (config._isValid = !1)
+ if (match[3]) {
+ for (i = 0, l = isoTimes.length; i < l; i++)
+ if (isoTimes[i][1].exec(match[3])) {
+ timeFormat = (match[2] || ' ') + isoTimes[i][0]
+ break
+ }
+ if (null == timeFormat) return void (config._isValid = !1)
+ }
+ if (!allowTime && null != timeFormat) return void (config._isValid = !1)
+ if (match[4]) {
+ if (!tzRegex.exec(match[4])) return void (config._isValid = !1)
+ tzFormat = 'Z'
+ }
+ ;(config._f = dateFormat + (timeFormat || '') + (tzFormat || '')), configFromStringAndFormat(config)
+ } else config._isValid = !1
+ }
+ var basicRfcRegex = /^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/
+ function configFromRFC2822 (config) {
+ var string,
+ match,
+ dayFormat,
+ dateFormat,
+ timeFormat,
+ timezone,
+ timezoneIndex,
+ timezones = {
+ ' GMT': ' +0000',
+ ' EDT': ' -0400',
+ ' EST': ' -0500',
+ ' CDT': ' -0500',
+ ' CST': ' -0600',
+ ' MDT': ' -0600',
+ ' MST': ' -0700',
+ ' PDT': ' -0700',
+ ' PST': ' -0800'
+ }
+ if (
+ ((string = config._i
+ .replace(/\([^\)]*\)|[\n\t]/g, ' ')
+ .replace(/(\s\s+)/g, ' ')
+ .replace(/^\s|\s$/g, '')),
+ (match = basicRfcRegex.exec(string)))
+ ) {
+ if (
+ ((dayFormat = match[1] ? 'ddd' + (5 === match[1].length ? ', ' : ' ') : ''),
+ (dateFormat = 'D MMM ' + (match[2].length > 10 ? 'YYYY ' : 'YY ')),
+ (timeFormat = 'HH:mm' + (match[4] ? ':ss' : '')),
+ match[1])
+ ) {
+ var momentDate = new Date(match[2]),
+ momentDay = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][momentDate.getDay()]
+ if (match[1].substr(0, 3) !== momentDay)
+ return (getParsingFlags(config).weekdayMismatch = !0), void (config._isValid = !1)
+ }
+ switch (match[5].length) {
+ case 2:
+ 0 === timezoneIndex
+ ? (timezone = ' +0000')
+ : ((timezoneIndex = 'YXWVUTSRQPONZABCDEFGHIKLM'.indexOf(match[5][1].toUpperCase()) - 12),
+ (timezone =
+ (timezoneIndex < 0 ? ' -' : ' +') +
+ ('' + timezoneIndex).replace(/^-?/, '0').match(/..$/)[0] +
+ '00'))
+ break
+ case 4:
+ timezone = timezones[match[5]]
+ break
+ default:
+ timezone = timezones[' GMT']
+ }
+ ;(match[5] = timezone),
+ (config._i = match.splice(1).join('')),
+ (config._f = dayFormat + dateFormat + timeFormat + ' ZZ'),
+ configFromStringAndFormat(config),
+ (getParsingFlags(config).rfc2822 = !0)
+ } else config._isValid = !1
+ }
+ function defaults (a, b, c) {
+ return null != a ? a : null != b ? b : c
+ }
+ function configFromArray (config) {
+ var i,
+ date,
+ currentDate,
+ yearToUse,
+ input = []
+ if (!config._d) {
+ for (
+ currentDate = (function (config) {
+ var nowValue = new Date(hooks.now())
+ return config._useUTC
+ ? [nowValue.getUTCFullYear(), nowValue.getUTCMonth(), nowValue.getUTCDate()]
+ : [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()]
+ })(config),
+ config._w &&
+ null == config._a[DATE] &&
+ null == config._a[MONTH] &&
+ (function (config) {
+ var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow
+ if (null != (w = config._w).GG || null != w.W || null != w.E)
+ (dow = 1),
+ (doy = 4),
+ (weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(createLocal(), 1, 4).year)),
+ (week = defaults(w.W, 1)),
+ ((weekday = defaults(w.E, 1)) < 1 || weekday > 7) && (weekdayOverflow = !0)
+ else {
+ ;(dow = config._locale._week.dow), (doy = config._locale._week.doy)
+ var curWeek = weekOfYear(createLocal(), dow, doy)
+ ;(weekYear = defaults(w.gg, config._a[YEAR], curWeek.year)),
+ (week = defaults(w.w, curWeek.week)),
+ null != w.d
+ ? ((weekday = w.d) < 0 || weekday > 6) && (weekdayOverflow = !0)
+ : null != w.e
+ ? ((weekday = w.e + dow), (w.e < 0 || w.e > 6) && (weekdayOverflow = !0))
+ : (weekday = dow)
+ }
+ week < 1 || week > weeksInYear(weekYear, dow, doy)
+ ? (getParsingFlags(config)._overflowWeeks = !0)
+ : null != weekdayOverflow
+ ? (getParsingFlags(config)._overflowWeekday = !0)
+ : ((temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy)),
+ (config._a[YEAR] = temp.year),
+ (config._dayOfYear = temp.dayOfYear))
+ })(config),
+ null != config._dayOfYear &&
+ ((yearToUse = defaults(config._a[YEAR], currentDate[YEAR])),
+ (config._dayOfYear > daysInYear(yearToUse) || 0 === config._dayOfYear) &&
+ (getParsingFlags(config)._overflowDayOfYear = !0),
+ (date = createUTCDate(yearToUse, 0, config._dayOfYear)),
+ (config._a[MONTH] = date.getUTCMonth()),
+ (config._a[DATE] = date.getUTCDate())),
+ i = 0;
+ i < 3 && null == config._a[i];
+ ++i
+ )
+ config._a[i] = input[i] = currentDate[i]
+ for (; i < 7; i++) config._a[i] = input[i] = null == config._a[i] ? (2 === i ? 1 : 0) : config._a[i]
+ 24 === config._a[HOUR] &&
+ 0 === config._a[MINUTE] &&
+ 0 === config._a[SECOND] &&
+ 0 === config._a[MILLISECOND] &&
+ ((config._nextDay = !0), (config._a[HOUR] = 0)),
+ (config._d = (config._useUTC
+ ? createUTCDate
+ : function (y, m, d, h, M, s, ms) {
+ var date = new Date(y, m, d, h, M, s, ms)
+ return y < 100 && y >= 0 && isFinite(date.getFullYear()) && date.setFullYear(y), date
+ }
+ ).apply(null, input)),
+ null != config._tzm && config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm),
+ config._nextDay && (config._a[HOUR] = 24)
+ }
+ }
+ function configFromStringAndFormat (config) {
+ if (config._f !== hooks.ISO_8601)
+ if (config._f !== hooks.RFC_2822) {
+ ;(config._a = []), (getParsingFlags(config).empty = !0)
+ var i,
+ parsedInput,
+ tokens,
+ token,
+ skipped,
+ string = '' + config._i,
+ stringLength = string.length,
+ totalParsedInputLength = 0
+ for (
+ tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [], i = 0;
+ i < tokens.length;
+ i++
+ )
+ (token = tokens[i]),
+ (parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0]) &&
+ ((skipped = string.substr(0, string.indexOf(parsedInput))).length > 0 &&
+ getParsingFlags(config).unusedInput.push(skipped),
+ (string = string.slice(string.indexOf(parsedInput) + parsedInput.length)),
+ (totalParsedInputLength += parsedInput.length)),
+ formatTokenFunctions[token]
+ ? (parsedInput
+ ? (getParsingFlags(config).empty = !1)
+ : getParsingFlags(config).unusedTokens.push(token),
+ addTimeToArrayFromToken(token, parsedInput, config))
+ : config._strict && !parsedInput && getParsingFlags(config).unusedTokens.push(token)
+ ;(getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength),
+ string.length > 0 && getParsingFlags(config).unusedInput.push(string),
+ config._a[HOUR] <= 12 &&
+ !0 === getParsingFlags(config).bigHour &&
+ config._a[HOUR] > 0 &&
+ (getParsingFlags(config).bigHour = void 0),
+ (getParsingFlags(config).parsedDateParts = config._a.slice(0)),
+ (getParsingFlags(config).meridiem = config._meridiem),
+ (config._a[HOUR] = ((locale = config._locale),
+ (hour = config._a[HOUR]),
+ null == (meridiem = config._meridiem)
+ ? hour
+ : null != locale.meridiemHour
+ ? locale.meridiemHour(hour, meridiem)
+ : null != locale.isPM
+ ? ((isPm = locale.isPM(meridiem)) && hour < 12 && (hour += 12),
+ isPm || 12 !== hour || (hour = 0),
+ hour)
+ : hour)),
+ configFromArray(config),
+ checkOverflow(config)
+ } else configFromRFC2822(config)
+ else configFromISO(config)
+ var locale, hour, meridiem, isPm
+ }
+ function prepareConfig (config) {
+ var input = config._i,
+ format = config._f
+ return (
+ (config._locale = config._locale || getLocale(config._l)),
+ null === input || (void 0 === format && '' === input)
+ ? createInvalid({ nullInput: !0 })
+ : ('string' == typeof input && (config._i = input = config._locale.preparse(input)),
+ isMoment(input)
+ ? new Moment(checkOverflow(input))
+ : (isDate(input)
+ ? (config._d = input)
+ : isArray(format)
+ ? (function (config) {
+ var tempConfig, bestMoment, scoreToBeat, i, currentScore
+ if (0 === config._f.length)
+ return (getParsingFlags(config).invalidFormat = !0), void (config._d = new Date(NaN))
+ for (i = 0; i < config._f.length; i++)
+ (currentScore = 0),
+ (tempConfig = copyConfig({}, config)),
+ null != config._useUTC && (tempConfig._useUTC = config._useUTC),
+ (tempConfig._f = config._f[i]),
+ configFromStringAndFormat(tempConfig),
+ isValid(tempConfig) &&
+ ((currentScore += getParsingFlags(tempConfig).charsLeftOver),
+ (currentScore += 10 * getParsingFlags(tempConfig).unusedTokens.length),
+ (getParsingFlags(tempConfig).score = currentScore),
+ (null == scoreToBeat || currentScore < scoreToBeat) &&
+ ((scoreToBeat = currentScore), (bestMoment = tempConfig)))
+ extend(config, bestMoment || tempConfig)
+ })(config)
+ : format
+ ? configFromStringAndFormat(config)
+ : (function (config) {
+ var input = config._i
+ isUndefined(input)
+ ? (config._d = new Date(hooks.now()))
+ : isDate(input)
+ ? (config._d = new Date(input.valueOf()))
+ : 'string' == typeof input
+ ? (function (config) {
+ var matched = aspNetJsonRegex.exec(config._i)
+ null === matched
+ ? (configFromISO(config),
+ !1 === config._isValid &&
+ (delete config._isValid,
+ configFromRFC2822(config),
+ !1 === config._isValid &&
+ (delete config._isValid, hooks.createFromInputFallback(config))))
+ : (config._d = new Date(+matched[1]))
+ })(config)
+ : isArray(input)
+ ? ((config._a = map(input.slice(0), function (obj) {
+ return parseInt(obj, 10)
+ })),
+ configFromArray(config))
+ : isObject(input)
+ ? (function (config) {
+ if (!config._d) {
+ var i = normalizeObjectUnits(config._i)
+ ;(config._a = map(
+ [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond],
+ function (obj) {
+ return obj && parseInt(obj, 10)
+ }
+ )),
+ configFromArray(config)
+ }
+ })(config)
+ : isNumber(input)
+ ? (config._d = new Date(input))
+ : hooks.createFromInputFallback(config)
+ })(config),
+ isValid(config) || (config._d = null),
+ config))
+ )
+ }
+ function createLocalOrUTC (input, format, locale, strict, isUTC) {
+ var res,
+ c = {}
+ return (
+ (!0 !== locale && !1 !== locale) || ((strict = locale), (locale = void 0)),
+ ((isObject(input) &&
+ (function (obj) {
+ var k
+ for (k in obj) return !1
+ return !0
+ })(input)) ||
+ (isArray(input) && 0 === input.length)) &&
+ (input = void 0),
+ (c._isAMomentObject = !0),
+ (c._useUTC = c._isUTC = isUTC),
+ (c._l = locale),
+ (c._i = input),
+ (c._f = format),
+ (c._strict = strict),
+ (res = new Moment(checkOverflow(prepareConfig(c))))._nextDay && (res.add(1, 'd'), (res._nextDay = void 0)),
+ res
+ )
+ }
+ function createLocal (input, format, locale, strict) {
+ return createLocalOrUTC(input, format, locale, strict, !1)
+ }
+ ;(hooks.createFromInputFallback = deprecate(
+ 'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
+ function (config) {
+ config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''))
+ }
+ )),
+ (hooks.ISO_8601 = function () {}),
+ (hooks.RFC_2822 = function () {})
+ var prototypeMin = deprecate(
+ 'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments)
+ return this.isValid() && other.isValid() ? (other < this ? this : other) : createInvalid()
+ }
+ ),
+ prototypeMax = deprecate(
+ 'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
+ function () {
+ var other = createLocal.apply(null, arguments)
+ return this.isValid() && other.isValid() ? (other > this ? this : other) : createInvalid()
+ }
+ )
+ function pickBy (fn, moments) {
+ var res, i
+ if ((1 === moments.length && isArray(moments[0]) && (moments = moments[0]), !moments.length))
+ return createLocal()
+ for (res = moments[0], i = 1; i < moments.length; ++i)
+ (moments[i].isValid() && !moments[i][fn](res)) || (res = moments[i])
+ return res
+ }
+ var ordering = ['year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', 'millisecond']
+ function Duration (duration) {
+ var normalizedInput = normalizeObjectUnits(duration),
+ years = normalizedInput.year || 0,
+ quarters = normalizedInput.quarter || 0,
+ months = normalizedInput.month || 0,
+ weeks = normalizedInput.week || 0,
+ days = normalizedInput.day || 0,
+ hours = normalizedInput.hour || 0,
+ minutes = normalizedInput.minute || 0,
+ seconds = normalizedInput.second || 0,
+ milliseconds = normalizedInput.millisecond || 0
+ ;(this._isValid = (function (m) {
+ for (var key in m) if (-1 === ordering.indexOf(key) || (null != m[key] && isNaN(m[key]))) return !1
+ for (var unitHasDecimal = !1, i = 0; i < ordering.length; ++i)
+ if (m[ordering[i]]) {
+ if (unitHasDecimal) return !1
+ parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]]) && (unitHasDecimal = !0)
+ }
+ return !0
+ })(normalizedInput)),
+ (this._milliseconds = +milliseconds + 1e3 * seconds + 6e4 * minutes + 1e3 * hours * 60 * 60),
+ (this._days = +days + 7 * weeks),
+ (this._months = +months + 3 * quarters + 12 * years),
+ (this._data = {}),
+ (this._locale = getLocale()),
+ this._bubble()
+ }
+ function isDuration (obj) {
+ return obj instanceof Duration
+ }
+ function absRound (number) {
+ return number < 0 ? -1 * Math.round(-1 * number) : Math.round(number)
+ }
+ function offset (token, separator) {
+ addFormatToken(token, 0, 0, function () {
+ var offset = this.utcOffset(),
+ sign = '+'
+ return (
+ offset < 0 && ((offset = -offset), (sign = '-')),
+ sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~offset % 60, 2)
+ )
+ })
+ }
+ offset('Z', ':'),
+ offset('ZZ', ''),
+ addRegexToken('Z', matchShortOffset),
+ addRegexToken('ZZ', matchShortOffset),
+ addParseToken(['Z', 'ZZ'], function (input, array, config) {
+ ;(config._useUTC = !0), (config._tzm = offsetFromString(matchShortOffset, input))
+ })
+ var chunkOffset = /([\+\-]|\d\d)/gi
+ function offsetFromString (matcher, string) {
+ var matches = (string || '').match(matcher)
+ if (null === matches) return null
+ var chunk = matches[matches.length - 1] || [],
+ parts = (chunk + '').match(chunkOffset) || ['-', 0, 0],
+ minutes = 60 * parts[1] + toInt(parts[2])
+ return 0 === minutes ? 0 : '+' === parts[0] ? minutes : -minutes
+ }
+ function cloneWithOffset (input, model) {
+ var res, diff
+ return model._isUTC
+ ? ((res = model.clone()),
+ (diff =
+ (isMoment(input) || isDate(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf()),
+ res._d.setTime(res._d.valueOf() + diff),
+ hooks.updateOffset(res, !1),
+ res)
+ : createLocal(input).local()
+ }
+ function getDateOffset (m) {
+ return 15 * -Math.round(m._d.getTimezoneOffset() / 15)
+ }
+ function isUtc () {
+ return !!this.isValid() && this._isUTC && 0 === this._offset
+ }
+ hooks.updateOffset = function () {}
+ var aspNetRegex = /^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,
+ isoRegex = /^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/
+ function createDuration (input, key) {
+ var sign,
+ ret,
+ diffRes,
+ base,
+ other,
+ res,
+ duration = input,
+ match = null
+ return (
+ isDuration(input)
+ ? (duration = { ms: input._milliseconds, d: input._days, M: input._months })
+ : isNumber(input)
+ ? ((duration = {}), key ? (duration[key] = input) : (duration.milliseconds = input))
+ : (match = aspNetRegex.exec(input))
+ ? ((sign = '-' === match[1] ? -1 : 1),
+ (duration = {
+ y: 0,
+ d: toInt(match[DATE]) * sign,
+ h: toInt(match[HOUR]) * sign,
+ m: toInt(match[MINUTE]) * sign,
+ s: toInt(match[SECOND]) * sign,
+ ms: toInt(absRound(1e3 * match[MILLISECOND])) * sign
+ }))
+ : (match = isoRegex.exec(input))
+ ? ((sign = '-' === match[1] ? -1 : 1),
+ (duration = {
+ y: parseIso(match[2], sign),
+ M: parseIso(match[3], sign),
+ w: parseIso(match[4], sign),
+ d: parseIso(match[5], sign),
+ h: parseIso(match[6], sign),
+ m: parseIso(match[7], sign),
+ s: parseIso(match[8], sign)
+ }))
+ : null == duration
+ ? (duration = {})
+ : 'object' == typeof duration &&
+ ('from' in duration || 'to' in duration) &&
+ ((base = createLocal(duration.from)),
+ (other = createLocal(duration.to)),
+ (diffRes =
+ base.isValid() && other.isValid()
+ ? ((other = cloneWithOffset(other, base)),
+ base.isBefore(other)
+ ? (res = positiveMomentsDifference(base, other))
+ : (((res = positiveMomentsDifference(other, base)).milliseconds = -res.milliseconds),
+ (res.months = -res.months)),
+ res)
+ : { milliseconds: 0, months: 0 }),
+ ((duration = {}).ms = diffRes.milliseconds),
+ (duration.M = diffRes.months)),
+ (ret = new Duration(duration)),
+ isDuration(input) && hasOwnProp(input, '_locale') && (ret._locale = input._locale),
+ ret
+ )
+ }
+ function parseIso (inp, sign) {
+ var res = inp && parseFloat(inp.replace(',', '.'))
+ return (isNaN(res) ? 0 : res) * sign
+ }
+ function positiveMomentsDifference (base, other) {
+ var res = { milliseconds: 0, months: 0 }
+ return (
+ (res.months = other.month() - base.month() + 12 * (other.year() - base.year())),
+ base
+ .clone()
+ .add(res.months, 'M')
+ .isAfter(other) && --res.months,
+ (res.milliseconds = +other - +base.clone().add(res.months, 'M')),
+ res
+ )
+ }
+ function createAdder (direction, name) {
+ return function (val, period) {
+ var tmp
+ return (
+ null === period ||
+ isNaN(+period) ||
+ (deprecateSimple(
+ name,
+ 'moment().' +
+ name +
+ '(period, number) is deprecated. Please use moment().' +
+ name +
+ '(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
+ ),
+ (tmp = val),
+ (val = period),
+ (period = tmp)),
+ addSubtract(this, createDuration((val = 'string' == typeof val ? +val : val), period), direction),
+ this
+ )
+ }
+ }
+ function addSubtract (mom, duration, isAdding, updateOffset) {
+ var milliseconds = duration._milliseconds,
+ days = absRound(duration._days),
+ months = absRound(duration._months)
+ mom.isValid() &&
+ ((updateOffset = null == updateOffset || updateOffset),
+ milliseconds && mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding),
+ days && set$1(mom, 'Date', get(mom, 'Date') + days * isAdding),
+ months && setMonth(mom, get(mom, 'Month') + months * isAdding),
+ updateOffset && hooks.updateOffset(mom, days || months))
+ }
+ ;(createDuration.fn = Duration.prototype),
+ (createDuration.invalid = function () {
+ return createDuration(NaN)
+ })
+ var add = createAdder(1, 'add'),
+ subtract = createAdder(-1, 'subtract')
+ function locale (key) {
+ var newLocaleData
+ return void 0 === key
+ ? this._locale._abbr
+ : (null != (newLocaleData = getLocale(key)) && (this._locale = newLocaleData), this)
+ }
+ ;(hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'), (hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]')
+ var lang = deprecate(
+ 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
+ function (key) {
+ return void 0 === key ? this.localeData() : this.locale(key)
+ }
+ )
+ function localeData () {
+ return this._locale
+ }
+ function addWeekYearFormatToken (token, getter) {
+ addFormatToken(0, [token, token.length], 0, getter)
+ }
+ function getSetWeekYearHelper (input, week, weekday, dow, doy) {
+ var weeksTarget
+ return null == input
+ ? weekOfYear(this, dow, doy).year
+ : ((weeksTarget = weeksInYear(input, dow, doy)),
+ week > weeksTarget && (week = weeksTarget),
+ function (weekYear, week, weekday, dow, doy) {
+ var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
+ date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear)
+ return (
+ this.year(date.getUTCFullYear()), this.month(date.getUTCMonth()), this.date(date.getUTCDate()), this
+ )
+ }.call(this, input, week, weekday, dow, doy))
+ }
+ addFormatToken(0, ['gg', 2], 0, function () {
+ return this.weekYear() % 100
+ }),
+ addFormatToken(0, ['GG', 2], 0, function () {
+ return this.isoWeekYear() % 100
+ }),
+ addWeekYearFormatToken('gggg', 'weekYear'),
+ addWeekYearFormatToken('ggggg', 'weekYear'),
+ addWeekYearFormatToken('GGGG', 'isoWeekYear'),
+ addWeekYearFormatToken('GGGGG', 'isoWeekYear'),
+ addUnitAlias('weekYear', 'gg'),
+ addUnitAlias('isoWeekYear', 'GG'),
+ addUnitPriority('weekYear', 1),
+ addUnitPriority('isoWeekYear', 1),
+ addRegexToken('G', matchSigned),
+ addRegexToken('g', matchSigned),
+ addRegexToken('GG', match1to2, match2),
+ addRegexToken('gg', match1to2, match2),
+ addRegexToken('GGGG', match1to4, match4),
+ addRegexToken('gggg', match1to4, match4),
+ addRegexToken('GGGGG', match1to6, match6),
+ addRegexToken('ggggg', match1to6, match6),
+ addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) {
+ week[token.substr(0, 2)] = toInt(input)
+ }),
+ addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
+ week[token] = hooks.parseTwoDigitYear(input)
+ }),
+ addFormatToken('Q', 0, 'Qo', 'quarter'),
+ addUnitAlias('quarter', 'Q'),
+ addUnitPriority('quarter', 7),
+ addRegexToken('Q', match1),
+ addParseToken('Q', function (input, array) {
+ array[MONTH] = 3 * (toInt(input) - 1)
+ }),
+ addFormatToken('D', ['DD', 2], 'Do', 'date'),
+ addUnitAlias('date', 'D'),
+ addUnitPriority('date', 9),
+ addRegexToken('D', match1to2),
+ addRegexToken('DD', match1to2, match2),
+ addRegexToken('Do', function (isStrict, locale) {
+ return isStrict
+ ? locale._dayOfMonthOrdinalParse || locale._ordinalParse
+ : locale._dayOfMonthOrdinalParseLenient
+ }),
+ addParseToken(['D', 'DD'], DATE),
+ addParseToken('Do', function (input, array) {
+ array[DATE] = toInt(input.match(match1to2)[0])
+ })
+ var getSetDayOfMonth = makeGetSet('Date', !0)
+ addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'),
+ addUnitAlias('dayOfYear', 'DDD'),
+ addUnitPriority('dayOfYear', 4),
+ addRegexToken('DDD', match1to3),
+ addRegexToken('DDDD', match3),
+ addParseToken(['DDD', 'DDDD'], function (input, array, config) {
+ config._dayOfYear = toInt(input)
+ }),
+ addFormatToken('m', ['mm', 2], 0, 'minute'),
+ addUnitAlias('minute', 'm'),
+ addUnitPriority('minute', 14),
+ addRegexToken('m', match1to2),
+ addRegexToken('mm', match1to2, match2),
+ addParseToken(['m', 'mm'], MINUTE)
+ var getSetMinute = makeGetSet('Minutes', !1)
+ addFormatToken('s', ['ss', 2], 0, 'second'),
+ addUnitAlias('second', 's'),
+ addUnitPriority('second', 15),
+ addRegexToken('s', match1to2),
+ addRegexToken('ss', match1to2, match2),
+ addParseToken(['s', 'ss'], SECOND)
+ var token,
+ getSetSecond = makeGetSet('Seconds', !1)
+ for (
+ addFormatToken('S', 0, 0, function () {
+ return ~~(this.millisecond() / 100)
+ }),
+ addFormatToken(0, ['SS', 2], 0, function () {
+ return ~~(this.millisecond() / 10)
+ }),
+ addFormatToken(0, ['SSS', 3], 0, 'millisecond'),
+ addFormatToken(0, ['SSSS', 4], 0, function () {
+ return 10 * this.millisecond()
+ }),
+ addFormatToken(0, ['SSSSS', 5], 0, function () {
+ return 100 * this.millisecond()
+ }),
+ addFormatToken(0, ['SSSSSS', 6], 0, function () {
+ return 1e3 * this.millisecond()
+ }),
+ addFormatToken(0, ['SSSSSSS', 7], 0, function () {
+ return 1e4 * this.millisecond()
+ }),
+ addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
+ return 1e5 * this.millisecond()
+ }),
+ addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
+ return 1e6 * this.millisecond()
+ }),
+ addUnitAlias('millisecond', 'ms'),
+ addUnitPriority('millisecond', 16),
+ addRegexToken('S', match1to3, match1),
+ addRegexToken('SS', match1to3, match2),
+ addRegexToken('SSS', match1to3, match3),
+ token = 'SSSS';
+ token.length <= 9;
+ token += 'S'
+ )
+ addRegexToken(token, matchUnsigned)
+ function parseMs (input, array) {
+ array[MILLISECOND] = toInt(1e3 * ('0.' + input))
+ }
+ for (token = 'S'; token.length <= 9; token += 'S') addParseToken(token, parseMs)
+ var getSetMillisecond = makeGetSet('Milliseconds', !1)
+ addFormatToken('z', 0, 0, 'zoneAbbr'), addFormatToken('zz', 0, 0, 'zoneName')
+ var proto = Moment.prototype
+ function preParsePostFormat (string) {
+ return string
+ }
+ ;(proto.add = add),
+ (proto.calendar = function (time, formats) {
+ var now = time || createLocal(),
+ sod = cloneWithOffset(now, this).startOf('day'),
+ format = hooks.calendarFormat(this, sod) || 'sameElse',
+ output = formats && (isFunction(formats[format]) ? formats[format].call(this, now) : formats[format])
+ return this.format(output || this.localeData().calendar(format, this, createLocal(now)))
+ }),
+ (proto.clone = function () {
+ return new Moment(this)
+ }),
+ (proto.diff = function (input, units, asFloat) {
+ var that, zoneDelta, delta, output, a, b, anchor2, adjust, wholeMonthDiff, anchor
+ return this.isValid() && (that = cloneWithOffset(input, this)).isValid()
+ ? ((zoneDelta = 6e4 * (that.utcOffset() - this.utcOffset())),
+ 'year' === (units = normalizeUnits(units)) || 'month' === units || 'quarter' === units
+ ? ((a = this),
+ (wholeMonthDiff = 12 * ((b = that).year() - a.year()) + (b.month() - a.month())),
+ (anchor = a.clone().add(wholeMonthDiff, 'months')),
+ b - anchor < 0
+ ? ((anchor2 = a.clone().add(wholeMonthDiff - 1, 'months')),
+ (adjust = (b - anchor) / (anchor - anchor2)))
+ : ((anchor2 = a.clone().add(wholeMonthDiff + 1, 'months')),
+ (adjust = (b - anchor) / (anchor2 - anchor))),
+ (output = -(wholeMonthDiff + adjust) || 0),
+ 'quarter' === units ? (output /= 3) : 'year' === units && (output /= 12))
+ : ((delta = this - that),
+ (output =
+ 'second' === units
+ ? delta / 1e3
+ : 'minute' === units
+ ? delta / 6e4
+ : 'hour' === units
+ ? delta / 36e5
+ : 'day' === units
+ ? (delta - zoneDelta) / 864e5
+ : 'week' === units
+ ? (delta - zoneDelta) / 6048e5
+ : delta)),
+ asFloat ? output : absFloor(output))
+ : NaN
+ }),
+ (proto.endOf = function (units) {
+ return void 0 === (units = normalizeUnits(units)) || 'millisecond' === units
+ ? this
+ : ('date' === units && (units = 'day'),
+ this.startOf(units)
+ .add(1, 'isoWeek' === units ? 'week' : units)
+ .subtract(1, 'ms'))
+ }),
+ (proto.format = function (inputString) {
+ inputString || (inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat)
+ var output = formatMoment(this, inputString)
+ return this.localeData().postformat(output)
+ }),
+ (proto.from = function (time, withoutSuffix) {
+ return this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ? createDuration({ to: this, from: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix)
+ : this.localeData().invalidDate()
+ }),
+ (proto.fromNow = function (withoutSuffix) {
+ return this.from(createLocal(), withoutSuffix)
+ }),
+ (proto.to = function (time, withoutSuffix) {
+ return this.isValid() && ((isMoment(time) && time.isValid()) || createLocal(time).isValid())
+ ? createDuration({ from: this, to: time })
+ .locale(this.locale())
+ .humanize(!withoutSuffix)
+ : this.localeData().invalidDate()
+ }),
+ (proto.toNow = function (withoutSuffix) {
+ return this.to(createLocal(), withoutSuffix)
+ }),
+ (proto.get = function (units) {
+ return isFunction(this[(units = normalizeUnits(units))]) ? this[units]() : this
+ }),
+ (proto.invalidAt = function () {
+ return getParsingFlags(this).overflow
+ }),
+ (proto.isAfter = function (input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input)
+ return (
+ !(!this.isValid() || !localInput.isValid()) &&
+ ('millisecond' === (units = normalizeUnits(isUndefined(units) ? 'millisecond' : units))
+ ? this.valueOf() > localInput.valueOf()
+ : localInput.valueOf() <
+ this.clone()
+ .startOf(units)
+ .valueOf())
+ )
+ }),
+ (proto.isBefore = function (input, units) {
+ var localInput = isMoment(input) ? input : createLocal(input)
+ return (
+ !(!this.isValid() || !localInput.isValid()) &&
+ ('millisecond' === (units = normalizeUnits(isUndefined(units) ? 'millisecond' : units))
+ ? this.valueOf() < localInput.valueOf()
+ : this.clone()
+ .endOf(units)
+ .valueOf() < localInput.valueOf())
+ )
+ }),
+ (proto.isBetween = function (from, to, units, inclusivity) {
+ return (
+ ('(' === (inclusivity = inclusivity || '()')[0]
+ ? this.isAfter(from, units)
+ : !this.isBefore(from, units)) &&
+ (')' === inclusivity[1] ? this.isBefore(to, units) : !this.isAfter(to, units))
+ )
+ }),
+ (proto.isSame = function (input, units) {
+ var inputMs,
+ localInput = isMoment(input) ? input : createLocal(input)
+ return (
+ !(!this.isValid() || !localInput.isValid()) &&
+ ('millisecond' === (units = normalizeUnits(units || 'millisecond'))
+ ? this.valueOf() === localInput.valueOf()
+ : ((inputMs = localInput.valueOf()),
+ this.clone()
+ .startOf(units)
+ .valueOf() <= inputMs &&
+ inputMs <=
+ this.clone()
+ .endOf(units)
+ .valueOf()))
+ )
+ }),
+ (proto.isSameOrAfter = function (input, units) {
+ return this.isSame(input, units) || this.isAfter(input, units)
+ }),
+ (proto.isSameOrBefore = function (input, units) {
+ return this.isSame(input, units) || this.isBefore(input, units)
+ }),
+ (proto.isValid = function () {
+ return isValid(this)
+ }),
+ (proto.lang = lang),
+ (proto.locale = locale),
+ (proto.localeData = localeData),
+ (proto.max = prototypeMax),
+ (proto.min = prototypeMin),
+ (proto.parsingFlags = function () {
+ return extend({}, getParsingFlags(this))
+ }),
+ (proto.set = function (units, value) {
+ if ('object' == typeof units)
+ for (
+ var prioritized = (function (unitsObj) {
+ var units = []
+ for (var u in unitsObj) units.push({ unit: u, priority: priorities[u] })
+ return (
+ units.sort(function (a, b) {
+ return a.priority - b.priority
+ }),
+ units
+ )
+ })((units = normalizeObjectUnits(units))),
+ i = 0;
+ i < prioritized.length;
+ i++
+ )
+ this[prioritized[i].unit](units[prioritized[i].unit])
+ else if (isFunction(this[(units = normalizeUnits(units))])) return this[units](value)
+ return this
+ }),
+ (proto.startOf = function (units) {
+ switch ((units = normalizeUnits(units))) {
+ case 'year':
+ this.month(0)
+ case 'quarter':
+ case 'month':
+ this.date(1)
+ case 'week':
+ case 'isoWeek':
+ case 'day':
+ case 'date':
+ this.hours(0)
+ case 'hour':
+ this.minutes(0)
+ case 'minute':
+ this.seconds(0)
+ case 'second':
+ this.milliseconds(0)
+ }
+ return (
+ 'week' === units && this.weekday(0),
+ 'isoWeek' === units && this.isoWeekday(1),
+ 'quarter' === units && this.month(3 * Math.floor(this.month() / 3)),
+ this
+ )
+ }),
+ (proto.subtract = subtract),
+ (proto.toArray = function () {
+ var m = this
+ return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]
+ }),
+ (proto.toObject = function () {
+ var m = this
+ return {
+ years: m.year(),
+ months: m.month(),
+ date: m.date(),
+ hours: m.hours(),
+ minutes: m.minutes(),
+ seconds: m.seconds(),
+ milliseconds: m.milliseconds()
+ }
+ }),
+ (proto.toDate = function () {
+ return new Date(this.valueOf())
+ }),
+ (proto.toISOString = function () {
+ if (!this.isValid()) return null
+ var m = this.clone().utc()
+ return m.year() < 0 || m.year() > 9999
+ ? formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]')
+ : isFunction(Date.prototype.toISOString)
+ ? this.toDate().toISOString()
+ : formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]')
+ }),
+ (proto.inspect = function () {
+ if (!this.isValid()) return 'moment.invalid(/* ' + this._i + ' */)'
+ var func = 'moment',
+ zone = ''
+ this.isLocal() || ((func = 0 === this.utcOffset() ? 'moment.utc' : 'moment.parseZone'), (zone = 'Z'))
+ var prefix = '[' + func + '("]',
+ year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY',
+ suffix = zone + '[")]'
+ return this.format(prefix + year + '-MM-DD[T]HH:mm:ss.SSS' + suffix)
+ }),
+ (proto.toJSON = function () {
+ return this.isValid() ? this.toISOString() : null
+ }),
+ (proto.toString = function () {
+ return this.clone()
+ .locale('en')
+ .format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ')
+ }),
+ (proto.unix = function () {
+ return Math.floor(this.valueOf() / 1e3)
+ }),
+ (proto.valueOf = function () {
+ return this._d.valueOf() - 6e4 * (this._offset || 0)
+ }),
+ (proto.creationData = function () {
+ return { input: this._i, format: this._f, locale: this._locale, isUTC: this._isUTC, strict: this._strict }
+ }),
+ (proto.year = getSetYear),
+ (proto.isLeapYear = function () {
+ return isLeapYear(this.year())
+ }),
+ (proto.weekYear = function (input) {
+ return getSetWeekYearHelper.call(
+ this,
+ input,
+ this.week(),
+ this.weekday(),
+ this.localeData()._week.dow,
+ this.localeData()._week.doy
+ )
+ }),
+ (proto.isoWeekYear = function (input) {
+ return getSetWeekYearHelper.call(this, input, this.isoWeek(), this.isoWeekday(), 1, 4)
+ }),
+ (proto.quarter = proto.quarters = function (input) {
+ return null == input ? Math.ceil((this.month() + 1) / 3) : this.month(3 * (input - 1) + (this.month() % 3))
+ }),
+ (proto.month = getSetMonth),
+ (proto.daysInMonth = function () {
+ return daysInMonth(this.year(), this.month())
+ }),
+ (proto.week = proto.weeks = function (input) {
+ var week = this.localeData().week(this)
+ return null == input ? week : this.add(7 * (input - week), 'd')
+ }),
+ (proto.isoWeek = proto.isoWeeks = function (input) {
+ var week = weekOfYear(this, 1, 4).week
+ return null == input ? week : this.add(7 * (input - week), 'd')
+ }),
+ (proto.weeksInYear = function () {
+ var weekInfo = this.localeData()._week
+ return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy)
+ }),
+ (proto.isoWeeksInYear = function () {
+ return weeksInYear(this.year(), 1, 4)
+ }),
+ (proto.date = getSetDayOfMonth),
+ (proto.day = proto.days = function (input) {
+ if (!this.isValid()) return null != input ? this : NaN
+ var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay()
+ return null != input
+ ? ((input = (function (input, locale) {
+ return 'string' != typeof input
+ ? input
+ : isNaN(input)
+ ? 'number' == typeof (input = locale.weekdaysParse(input))
+ ? input
+ : null
+ : parseInt(input, 10)
+ })(input, this.localeData())),
+ this.add(input - day, 'd'))
+ : day
+ }),
+ (proto.weekday = function (input) {
+ if (!this.isValid()) return null != input ? this : NaN
+ var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7
+ return null == input ? weekday : this.add(input - weekday, 'd')
+ }),
+ (proto.isoWeekday = function (input) {
+ if (!this.isValid()) return null != input ? this : NaN
+ if (null != input) {
+ var weekday = (function (input, locale) {
+ return 'string' == typeof input ? locale.weekdaysParse(input) % 7 || 7 : isNaN(input) ? null : input
+ })(input, this.localeData())
+ return this.day(this.day() % 7 ? weekday : weekday - 7)
+ }
+ return this.day() || 7
+ }),
+ (proto.dayOfYear = function (input) {
+ var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1
+ return null == input ? dayOfYear : this.add(input - dayOfYear, 'd')
+ }),
+ (proto.hour = proto.hours = getSetHour),
+ (proto.minute = proto.minutes = getSetMinute),
+ (proto.second = proto.seconds = getSetSecond),
+ (proto.millisecond = proto.milliseconds = getSetMillisecond),
+ (proto.utcOffset = function (input, keepLocalTime, keepMinutes) {
+ var localAdjust,
+ offset = this._offset || 0
+ if (!this.isValid()) return null != input ? this : NaN
+ if (null != input) {
+ if ('string' == typeof input) {
+ if (null === (input = offsetFromString(matchShortOffset, input))) return this
+ } else Math.abs(input) < 16 && !keepMinutes && (input *= 60)
+ return (
+ !this._isUTC && keepLocalTime && (localAdjust = getDateOffset(this)),
+ (this._offset = input),
+ (this._isUTC = !0),
+ null != localAdjust && this.add(localAdjust, 'm'),
+ offset !== input &&
+ (!keepLocalTime || this._changeInProgress
+ ? addSubtract(this, createDuration(input - offset, 'm'), 1, !1)
+ : this._changeInProgress ||
+ ((this._changeInProgress = !0), hooks.updateOffset(this, !0), (this._changeInProgress = null))),
+ this
+ )
+ }
+ return this._isUTC ? offset : getDateOffset(this)
+ }),
+ (proto.utc = function (keepLocalTime) {
+ return this.utcOffset(0, keepLocalTime)
+ }),
+ (proto.local = function (keepLocalTime) {
+ return (
+ this._isUTC &&
+ (this.utcOffset(0, keepLocalTime),
+ (this._isUTC = !1),
+ keepLocalTime && this.subtract(getDateOffset(this), 'm')),
+ this
+ )
+ }),
+ (proto.parseZone = function () {
+ if (null != this._tzm) this.utcOffset(this._tzm, !1, !0)
+ else if ('string' == typeof this._i) {
+ var tZone = offsetFromString(matchOffset, this._i)
+ null != tZone ? this.utcOffset(tZone) : this.utcOffset(0, !0)
+ }
+ return this
+ }),
+ (proto.hasAlignedHourOffset = function (input) {
+ return (
+ !!this.isValid() &&
+ ((input = input ? createLocal(input).utcOffset() : 0), (this.utcOffset() - input) % 60 == 0)
+ )
+ }),
+ (proto.isDST = function () {
+ return (
+ this.utcOffset() >
+ this.clone()
+ .month(0)
+ .utcOffset() ||
+ this.utcOffset() >
+ this.clone()
+ .month(5)
+ .utcOffset()
+ )
+ }),
+ (proto.isLocal = function () {
+ return !!this.isValid() && !this._isUTC
+ }),
+ (proto.isUtcOffset = function () {
+ return !!this.isValid() && this._isUTC
+ }),
+ (proto.isUtc = isUtc),
+ (proto.isUTC = isUtc),
+ (proto.zoneAbbr = function () {
+ return this._isUTC ? 'UTC' : ''
+ }),
+ (proto.zoneName = function () {
+ return this._isUTC ? 'Coordinated Universal Time' : ''
+ }),
+ (proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth)),
+ (proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth)),
+ (proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear)),
+ (proto.zone = deprecate(
+ 'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
+ function (input, keepLocalTime) {
+ return null != input
+ ? ('string' != typeof input && (input = -input), this.utcOffset(input, keepLocalTime), this)
+ : -this.utcOffset()
+ }
+ )),
+ (proto.isDSTShifted = deprecate(
+ 'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
+ function () {
+ if (!isUndefined(this._isDSTShifted)) return this._isDSTShifted
+ var c = {}
+ if ((copyConfig(c, this), (c = prepareConfig(c))._a)) {
+ var other = c._isUTC ? createUTC(c._a) : createLocal(c._a)
+ this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0
+ } else this._isDSTShifted = !1
+ return this._isDSTShifted
+ }
+ ))
+ var proto$1 = Locale.prototype
+ function get$1 (format, index, field, setter) {
+ var locale = getLocale(),
+ utc = createUTC().set(setter, index)
+ return locale[field](utc, format)
+ }
+ function listMonthsImpl (format, index, field) {
+ if ((isNumber(format) && ((index = format), (format = void 0)), (format = format || ''), null != index))
+ return get$1(format, index, field, 'month')
+ var i,
+ out = []
+ for (i = 0; i < 12; i++) out[i] = get$1(format, i, field, 'month')
+ return out
+ }
+ function listWeekdaysImpl (localeSorted, format, index, field) {
+ 'boolean' == typeof localeSorted
+ ? (isNumber(format) && ((index = format), (format = void 0)), (format = format || ''))
+ : ((index = format = localeSorted),
+ (localeSorted = !1),
+ isNumber(format) && ((index = format), (format = void 0)),
+ (format = format || ''))
+ var i,
+ locale = getLocale(),
+ shift = localeSorted ? locale._week.dow : 0
+ if (null != index) return get$1(format, (index + shift) % 7, field, 'day')
+ var out = []
+ for (i = 0; i < 7; i++) out[i] = get$1(format, (i + shift) % 7, field, 'day')
+ return out
+ }
+ ;(proto$1.calendar = function (key, mom, now) {
+ var output = this._calendar[key] || this._calendar.sameElse
+ return isFunction(output) ? output.call(mom, now) : output
+ }),
+ (proto$1.longDateFormat = function (key) {
+ var format = this._longDateFormat[key],
+ formatUpper = this._longDateFormat[key.toUpperCase()]
+ return format || !formatUpper
+ ? format
+ : ((this._longDateFormat[key] = formatUpper.replace(/MMMM|MM|DD|dddd/g, function (val) {
+ return val.slice(1)
+ })),
+ this._longDateFormat[key])
+ }),
+ (proto$1.invalidDate = function () {
+ return this._invalidDate
+ }),
+ (proto$1.ordinal = function (number) {
+ return this._ordinal.replace('%d', number)
+ }),
+ (proto$1.preparse = preParsePostFormat),
+ (proto$1.postformat = preParsePostFormat),
+ (proto$1.relativeTime = function (number, withoutSuffix, string, isFuture) {
+ var output = this._relativeTime[string]
+ return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number)
+ }),
+ (proto$1.pastFuture = function (diff, output) {
+ var format = this._relativeTime[diff > 0 ? 'future' : 'past']
+ return isFunction(format) ? format(output) : format.replace(/%s/i, output)
+ }),
+ (proto$1.set = function (config) {
+ var prop, i
+ for (i in config) isFunction((prop = config[i])) ? (this[i] = prop) : (this['_' + i] = prop)
+ ;(this._config = config),
+ (this._dayOfMonthOrdinalParseLenient = new RegExp(
+ (this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + '|' + /\d{1,2}/.source
+ ))
+ }),
+ (proto$1.months = function (m, format) {
+ return m
+ ? isArray(this._months)
+ ? this._months[m.month()]
+ : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format) ? 'format' : 'standalone'][
+ m.month()
+ ]
+ : isArray(this._months)
+ ? this._months
+ : this._months.standalone
+ }),
+ (proto$1.monthsShort = function (m, format) {
+ return m
+ ? isArray(this._monthsShort)
+ ? this._monthsShort[m.month()]
+ : this._monthsShort[MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'][m.month()]
+ : isArray(this._monthsShort)
+ ? this._monthsShort
+ : this._monthsShort.standalone
+ }),
+ (proto$1.monthsParse = function (monthName, format, strict) {
+ var i, mom, regex
+ if (this._monthsParseExact)
+ return function (monthName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = monthName.toLocaleLowerCase()
+ if (!this._monthsParse)
+ for (
+ this._monthsParse = [], this._longMonthsParse = [], this._shortMonthsParse = [], i = 0;
+ i < 12;
+ ++i
+ )
+ (mom = createUTC([2e3, i])),
+ (this._shortMonthsParse[i] = this.monthsShort(mom, '').toLocaleLowerCase()),
+ (this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase())
+ return strict
+ ? 'MMM' === format
+ ? -1 !== (ii = indexOf$1.call(this._shortMonthsParse, llc))
+ ? ii
+ : null
+ : -1 !== (ii = indexOf$1.call(this._longMonthsParse, llc))
+ ? ii
+ : null
+ : 'MMM' === format
+ ? -1 !== (ii = indexOf$1.call(this._shortMonthsParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._longMonthsParse, llc))
+ ? ii
+ : null
+ : -1 !== (ii = indexOf$1.call(this._longMonthsParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._shortMonthsParse, llc))
+ ? ii
+ : null
+ }.call(this, monthName, format, strict)
+ for (
+ this._monthsParse ||
+ ((this._monthsParse = []), (this._longMonthsParse = []), (this._shortMonthsParse = [])),
+ i = 0;
+ i < 12;
+ i++
+ ) {
+ if (
+ ((mom = createUTC([2e3, i])),
+ strict &&
+ !this._longMonthsParse[i] &&
+ ((this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i')),
+ (this._shortMonthsParse[i] = new RegExp(
+ '^' + this.monthsShort(mom, '').replace('.', '') + '$',
+ 'i'
+ ))),
+ strict ||
+ this._monthsParse[i] ||
+ ((regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '')),
+ (this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'))),
+ strict && 'MMMM' === format && this._longMonthsParse[i].test(monthName))
+ )
+ return i
+ if (strict && 'MMM' === format && this._shortMonthsParse[i].test(monthName)) return i
+ if (!strict && this._monthsParse[i].test(monthName)) return i
+ }
+ }),
+ (proto$1.monthsRegex = function (isStrict) {
+ return this._monthsParseExact
+ ? (hasOwnProp(this, '_monthsRegex') || computeMonthsParse.call(this),
+ isStrict ? this._monthsStrictRegex : this._monthsRegex)
+ : (hasOwnProp(this, '_monthsRegex') || (this._monthsRegex = defaultMonthsRegex),
+ this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex)
+ }),
+ (proto$1.monthsShortRegex = function (isStrict) {
+ return this._monthsParseExact
+ ? (hasOwnProp(this, '_monthsRegex') || computeMonthsParse.call(this),
+ isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex)
+ : (hasOwnProp(this, '_monthsShortRegex') || (this._monthsShortRegex = defaultMonthsShortRegex),
+ this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex)
+ }),
+ (proto$1.week = function (mom) {
+ return weekOfYear(mom, this._week.dow, this._week.doy).week
+ }),
+ (proto$1.firstDayOfYear = function () {
+ return this._week.doy
+ }),
+ (proto$1.firstDayOfWeek = function () {
+ return this._week.dow
+ }),
+ (proto$1.weekdays = function (m, format) {
+ return m
+ ? isArray(this._weekdays)
+ ? this._weekdays[m.day()]
+ : this._weekdays[this._weekdays.isFormat.test(format) ? 'format' : 'standalone'][m.day()]
+ : isArray(this._weekdays)
+ ? this._weekdays
+ : this._weekdays.standalone
+ }),
+ (proto$1.weekdaysMin = function (m) {
+ return m ? this._weekdaysMin[m.day()] : this._weekdaysMin
+ }),
+ (proto$1.weekdaysShort = function (m) {
+ return m ? this._weekdaysShort[m.day()] : this._weekdaysShort
+ }),
+ (proto$1.weekdaysParse = function (weekdayName, format, strict) {
+ var i, mom, regex
+ if (this._weekdaysParseExact)
+ return function (weekdayName, format, strict) {
+ var i,
+ ii,
+ mom,
+ llc = weekdayName.toLocaleLowerCase()
+ if (!this._weekdaysParse)
+ for (
+ this._weekdaysParse = [], this._shortWeekdaysParse = [], this._minWeekdaysParse = [], i = 0;
+ i < 7;
+ ++i
+ )
+ (mom = createUTC([2e3, 1]).day(i)),
+ (this._minWeekdaysParse[i] = this.weekdaysMin(mom, '').toLocaleLowerCase()),
+ (this._shortWeekdaysParse[i] = this.weekdaysShort(mom, '').toLocaleLowerCase()),
+ (this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase())
+ return strict
+ ? 'dddd' === format
+ ? -1 !== (ii = indexOf$1.call(this._weekdaysParse, llc))
+ ? ii
+ : null
+ : 'ddd' === format
+ ? -1 !== (ii = indexOf$1.call(this._shortWeekdaysParse, llc))
+ ? ii
+ : null
+ : -1 !== (ii = indexOf$1.call(this._minWeekdaysParse, llc))
+ ? ii
+ : null
+ : 'dddd' === format
+ ? -1 !== (ii = indexOf$1.call(this._weekdaysParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._shortWeekdaysParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._minWeekdaysParse, llc))
+ ? ii
+ : null
+ : 'ddd' === format
+ ? -1 !== (ii = indexOf$1.call(this._shortWeekdaysParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._weekdaysParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._minWeekdaysParse, llc))
+ ? ii
+ : null
+ : -1 !== (ii = indexOf$1.call(this._minWeekdaysParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._weekdaysParse, llc))
+ ? ii
+ : -1 !== (ii = indexOf$1.call(this._shortWeekdaysParse, llc))
+ ? ii
+ : null
+ }.call(this, weekdayName, format, strict)
+ for (
+ this._weekdaysParse ||
+ ((this._weekdaysParse = []),
+ (this._minWeekdaysParse = []),
+ (this._shortWeekdaysParse = []),
+ (this._fullWeekdaysParse = [])),
+ i = 0;
+ i < 7;
+ i++
+ ) {
+ if (
+ ((mom = createUTC([2e3, 1]).day(i)),
+ strict &&
+ !this._fullWeekdaysParse[i] &&
+ ((this._fullWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdays(mom, '').replace('.', '.?') + '$',
+ 'i'
+ )),
+ (this._shortWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysShort(mom, '').replace('.', '.?') + '$',
+ 'i'
+ )),
+ (this._minWeekdaysParse[i] = new RegExp(
+ '^' + this.weekdaysMin(mom, '').replace('.', '.?') + '$',
+ 'i'
+ ))),
+ this._weekdaysParse[i] ||
+ ((regex =
+ '^' +
+ this.weekdays(mom, '') +
+ '|^' +
+ this.weekdaysShort(mom, '') +
+ '|^' +
+ this.weekdaysMin(mom, '')),
+ (this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'))),
+ strict && 'dddd' === format && this._fullWeekdaysParse[i].test(weekdayName))
+ )
+ return i
+ if (strict && 'ddd' === format && this._shortWeekdaysParse[i].test(weekdayName)) return i
+ if (strict && 'dd' === format && this._minWeekdaysParse[i].test(weekdayName)) return i
+ if (!strict && this._weekdaysParse[i].test(weekdayName)) return i
+ }
+ }),
+ (proto$1.weekdaysRegex = function (isStrict) {
+ return this._weekdaysParseExact
+ ? (hasOwnProp(this, '_weekdaysRegex') || computeWeekdaysParse.call(this),
+ isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex)
+ : (hasOwnProp(this, '_weekdaysRegex') || (this._weekdaysRegex = defaultWeekdaysRegex),
+ this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex)
+ }),
+ (proto$1.weekdaysShortRegex = function (isStrict) {
+ return this._weekdaysParseExact
+ ? (hasOwnProp(this, '_weekdaysRegex') || computeWeekdaysParse.call(this),
+ isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex)
+ : (hasOwnProp(this, '_weekdaysShortRegex') || (this._weekdaysShortRegex = defaultWeekdaysShortRegex),
+ this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex)
+ }),
+ (proto$1.weekdaysMinRegex = function (isStrict) {
+ return this._weekdaysParseExact
+ ? (hasOwnProp(this, '_weekdaysRegex') || computeWeekdaysParse.call(this),
+ isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex)
+ : (hasOwnProp(this, '_weekdaysMinRegex') || (this._weekdaysMinRegex = defaultWeekdaysMinRegex),
+ this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex)
+ }),
+ (proto$1.isPM = function (input) {
+ return 'p' === (input + '').toLowerCase().charAt(0)
+ }),
+ (proto$1.meridiem = function (hours, minutes, isLower) {
+ return hours > 11 ? (isLower ? 'pm' : 'PM') : isLower ? 'am' : 'AM'
+ }),
+ getSetGlobalLocale('en', {
+ dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
+ ordinal: function (number) {
+ var b = number % 10,
+ output =
+ 1 === toInt((number % 100) / 10) ? 'th' : 1 === b ? 'st' : 2 === b ? 'nd' : 3 === b ? 'rd' : 'th'
+ return number + output
+ }
+ }),
+ (hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', getSetGlobalLocale)),
+ (hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', getLocale))
+ var mathAbs = Math.abs
+ function addSubtract$1 (duration, input, value, direction) {
+ var other = createDuration(input, value)
+ return (
+ (duration._milliseconds += direction * other._milliseconds),
+ (duration._days += direction * other._days),
+ (duration._months += direction * other._months),
+ duration._bubble()
+ )
+ }
+ function absCeil (number) {
+ return number < 0 ? Math.floor(number) : Math.ceil(number)
+ }
+ function daysToMonths (days) {
+ return (4800 * days) / 146097
+ }
+ function monthsToDays (months) {
+ return (146097 * months) / 4800
+ }
+ function makeAs (alias) {
+ return function () {
+ return this.as(alias)
+ }
+ }
+ var asMilliseconds = makeAs('ms'),
+ asSeconds = makeAs('s'),
+ asMinutes = makeAs('m'),
+ asHours = makeAs('h'),
+ asDays = makeAs('d'),
+ asWeeks = makeAs('w'),
+ asMonths = makeAs('M'),
+ asYears = makeAs('y')
+ function makeGetter (name) {
+ return function () {
+ return this.isValid() ? this._data[name] : NaN
+ }
+ }
+ var milliseconds = makeGetter('milliseconds'),
+ seconds = makeGetter('seconds'),
+ minutes = makeGetter('minutes'),
+ hours = makeGetter('hours'),
+ days = makeGetter('days'),
+ months = makeGetter('months'),
+ years = makeGetter('years'),
+ round = Math.round,
+ thresholds = { ss: 44, s: 45, m: 45, h: 22, d: 26, M: 11 },
+ abs$1 = Math.abs
+ function toISOString$1 () {
+ if (!this.isValid()) return this.localeData().invalidDate()
+ var minutes,
+ hours,
+ seconds = abs$1(this._milliseconds) / 1e3,
+ days = abs$1(this._days),
+ months = abs$1(this._months)
+ ;(minutes = absFloor(seconds / 60)), (hours = absFloor(minutes / 60)), (seconds %= 60), (minutes %= 60)
+ var Y = absFloor(months / 12),
+ M = (months %= 12),
+ D = days,
+ h = hours,
+ m = minutes,
+ s = seconds,
+ total = this.asSeconds()
+ return total
+ ? (total < 0 ? '-' : '') +
+ 'P' +
+ (Y ? Y + 'Y' : '') +
+ (M ? M + 'M' : '') +
+ (D ? D + 'D' : '') +
+ (h || m || s ? 'T' : '') +
+ (h ? h + 'H' : '') +
+ (m ? m + 'M' : '') +
+ (s ? s + 'S' : '')
+ : 'P0D'
+ }
+ var proto$2 = Duration.prototype
+ return (
+ (proto$2.isValid = function () {
+ return this._isValid
+ }),
+ (proto$2.abs = function () {
+ var data = this._data
+ return (
+ (this._milliseconds = mathAbs(this._milliseconds)),
+ (this._days = mathAbs(this._days)),
+ (this._months = mathAbs(this._months)),
+ (data.milliseconds = mathAbs(data.milliseconds)),
+ (data.seconds = mathAbs(data.seconds)),
+ (data.minutes = mathAbs(data.minutes)),
+ (data.hours = mathAbs(data.hours)),
+ (data.months = mathAbs(data.months)),
+ (data.years = mathAbs(data.years)),
+ this
+ )
+ }),
+ (proto$2.add = function (input, value) {
+ return addSubtract$1(this, input, value, 1)
+ }),
+ (proto$2.subtract = function (input, value) {
+ return addSubtract$1(this, input, value, -1)
+ }),
+ (proto$2.as = function (units) {
+ if (!this.isValid()) return NaN
+ var days,
+ months,
+ milliseconds = this._milliseconds
+ if ('month' === (units = normalizeUnits(units)) || 'year' === units)
+ return (
+ (days = this._days + milliseconds / 864e5),
+ (months = this._months + daysToMonths(days)),
+ 'month' === units ? months : months / 12
+ )
+ switch (((days = this._days + Math.round(monthsToDays(this._months))), units)) {
+ case 'week':
+ return days / 7 + milliseconds / 6048e5
+ case 'day':
+ return days + milliseconds / 864e5
+ case 'hour':
+ return 24 * days + milliseconds / 36e5
+ case 'minute':
+ return 1440 * days + milliseconds / 6e4
+ case 'second':
+ return 86400 * days + milliseconds / 1e3
+ case 'millisecond':
+ return Math.floor(864e5 * days) + milliseconds
+ default:
+ throw new Error('Unknown unit ' + units)
+ }
+ }),
+ (proto$2.asMilliseconds = asMilliseconds),
+ (proto$2.asSeconds = asSeconds),
+ (proto$2.asMinutes = asMinutes),
+ (proto$2.asHours = asHours),
+ (proto$2.asDays = asDays),
+ (proto$2.asWeeks = asWeeks),
+ (proto$2.asMonths = asMonths),
+ (proto$2.asYears = asYears),
+ (proto$2.valueOf = function () {
+ return this.isValid()
+ ? this._milliseconds +
+ 864e5 * this._days +
+ (this._months % 12) * 2592e6 +
+ 31536e6 * toInt(this._months / 12)
+ : NaN
+ }),
+ (proto$2._bubble = function () {
+ var seconds,
+ minutes,
+ hours,
+ years,
+ monthsFromDays,
+ milliseconds = this._milliseconds,
+ days = this._days,
+ months = this._months,
+ data = this._data
+ return (
+ (milliseconds >= 0 && days >= 0 && months >= 0) ||
+ (milliseconds <= 0 && days <= 0 && months <= 0) ||
+ ((milliseconds += 864e5 * absCeil(monthsToDays(months) + days)), (days = 0), (months = 0)),
+ (data.milliseconds = milliseconds % 1e3),
+ (seconds = absFloor(milliseconds / 1e3)),
+ (data.seconds = seconds % 60),
+ (minutes = absFloor(seconds / 60)),
+ (data.minutes = minutes % 60),
+ (hours = absFloor(minutes / 60)),
+ (data.hours = hours % 24),
+ (days += absFloor(hours / 24)),
+ (monthsFromDays = absFloor(daysToMonths(days))),
+ (months += monthsFromDays),
+ (days -= absCeil(monthsToDays(monthsFromDays))),
+ (years = absFloor(months / 12)),
+ (months %= 12),
+ (data.days = days),
+ (data.months = months),
+ (data.years = years),
+ this
+ )
+ }),
+ (proto$2.get = function (units) {
+ return (units = normalizeUnits(units)), this.isValid() ? this[units + 's']() : NaN
+ }),
+ (proto$2.milliseconds = milliseconds),
+ (proto$2.seconds = seconds),
+ (proto$2.minutes = minutes),
+ (proto$2.hours = hours),
+ (proto$2.days = days),
+ (proto$2.weeks = function () {
+ return absFloor(this.days() / 7)
+ }),
+ (proto$2.months = months),
+ (proto$2.years = years),
+ (proto$2.humanize = function (withSuffix) {
+ if (!this.isValid()) return this.localeData().invalidDate()
+ var locale = this.localeData(),
+ output = (function (posNegDuration, withoutSuffix, locale) {
+ var duration = createDuration(posNegDuration).abs(),
+ seconds = round(duration.as('s')),
+ minutes = round(duration.as('m')),
+ hours = round(duration.as('h')),
+ days = round(duration.as('d')),
+ months = round(duration.as('M')),
+ years = round(duration.as('y')),
+ a = (seconds <= thresholds.ss && ['s', seconds]) ||
+ (seconds < thresholds.s && ['ss', seconds]) ||
+ (minutes <= 1 && ['m']) ||
+ (minutes < thresholds.m && ['mm', minutes]) ||
+ (hours <= 1 && ['h']) ||
+ (hours < thresholds.h && ['hh', hours]) ||
+ (days <= 1 && ['d']) ||
+ (days < thresholds.d && ['dd', days]) ||
+ (months <= 1 && ['M']) ||
+ (months < thresholds.M && ['MM', months]) ||
+ (years <= 1 && ['y']) || ['yy', years]
+ return (
+ (a[2] = withoutSuffix),
+ (a[3] = +posNegDuration > 0),
+ (a[4] = locale),
+ function (string, number, withoutSuffix, isFuture, locale) {
+ return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture)
+ }.apply(null, a)
+ )
+ })(this, !withSuffix, locale)
+ return withSuffix && (output = locale.pastFuture(+this, output)), locale.postformat(output)
+ }),
+ (proto$2.toISOString = toISOString$1),
+ (proto$2.toString = toISOString$1),
+ (proto$2.toJSON = toISOString$1),
+ (proto$2.locale = locale),
+ (proto$2.localeData = localeData),
+ (proto$2.toIsoString = deprecate(
+ 'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
+ toISOString$1
+ )),
+ (proto$2.lang = lang),
+ addFormatToken('X', 0, 0, 'unix'),
+ addFormatToken('x', 0, 0, 'valueOf'),
+ addRegexToken('x', matchSigned),
+ addRegexToken('X', /[+-]?\d+(\.\d{1,3})?/),
+ addParseToken('X', function (input, array, config) {
+ config._d = new Date(1e3 * parseFloat(input, 10))
+ }),
+ addParseToken('x', function (input, array, config) {
+ config._d = new Date(toInt(input))
+ }),
+ (hooks.version = '2.18.1'),
+ (hookCallback = createLocal),
+ (hooks.fn = proto),
+ (hooks.min = function () {
+ return pickBy('isBefore', [].slice.call(arguments, 0))
+ }),
+ (hooks.max = function () {
+ return pickBy('isAfter', [].slice.call(arguments, 0))
+ }),
+ (hooks.now = function () {
+ return Date.now ? Date.now() : +new Date()
+ }),
+ (hooks.utc = createUTC),
+ (hooks.unix = function (input) {
+ return createLocal(1e3 * input)
+ }),
+ (hooks.months = function (format, index) {
+ return listMonthsImpl(format, index, 'months')
+ }),
+ (hooks.isDate = isDate),
+ (hooks.locale = getSetGlobalLocale),
+ (hooks.invalid = createInvalid),
+ (hooks.duration = createDuration),
+ (hooks.isMoment = isMoment),
+ (hooks.weekdays = function (localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdays')
+ }),
+ (hooks.parseZone = function () {
+ return createLocal.apply(null, arguments).parseZone()
+ }),
+ (hooks.localeData = getLocale),
+ (hooks.isDuration = isDuration),
+ (hooks.monthsShort = function (format, index) {
+ return listMonthsImpl(format, index, 'monthsShort')
+ }),
+ (hooks.weekdaysMin = function (localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin')
+ }),
+ (hooks.defineLocale = defineLocale),
+ (hooks.updateLocale = function (name, config) {
+ if (null != config) {
+ var locale,
+ parentConfig = baseConfig
+ null != locales[name] && (parentConfig = locales[name]._config),
+ (config = mergeConfigs(parentConfig, config)),
+ ((locale = new Locale(config)).parentLocale = locales[name]),
+ (locales[name] = locale),
+ getSetGlobalLocale(name)
+ } else
+ null != locales[name] &&
+ (null != locales[name].parentLocale
+ ? (locales[name] = locales[name].parentLocale)
+ : null != locales[name] && delete locales[name])
+ return locales[name]
+ }),
+ (hooks.locales = function () {
+ return keys$1(locales)
+ }),
+ (hooks.weekdaysShort = function (localeSorted, format, index) {
+ return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort')
+ }),
+ (hooks.normalizeUnits = normalizeUnits),
+ (hooks.relativeTimeRounding = function (roundingFunction) {
+ return void 0 === roundingFunction
+ ? round
+ : 'function' == typeof roundingFunction && ((round = roundingFunction), !0)
+ }),
+ (hooks.relativeTimeThreshold = function (threshold, limit) {
+ return (
+ void 0 !== thresholds[threshold] &&
+ (void 0 === limit
+ ? thresholds[threshold]
+ : ((thresholds[threshold] = limit), 's' === threshold && (thresholds.ss = limit - 1), !0))
+ )
+ }),
+ (hooks.calendarFormat = function (myMoment, now) {
+ var diff = myMoment.diff(now, 'days', !0)
+ return diff < -6
+ ? 'sameElse'
+ : diff < -1
+ ? 'lastWeek'
+ : diff < 0
+ ? 'lastDay'
+ : diff < 1
+ ? 'sameDay'
+ : diff < 2
+ ? 'nextDay'
+ : diff < 7
+ ? 'nextWeek'
+ : 'sameElse'
+ }),
+ (hooks.prototype = proto),
+ hooks
+ )
+ })()
+ }.call(this, __webpack_require__(10)(module)))
+ },
+ function (module, exports) {
+ var g
+ g = (function () {
+ return this
+ })()
+ try {
+ g = g || new Function('return this')()
+ } catch (e) {
+ 'object' == typeof window && (g = window)
+ }
+ module.exports = g
+ },
+ function (module, exports, __webpack_require__) {
+ ;(function (global, module, setImmediate, process) {
+ ;(function (exports) {
+ 'use strict'
+ var nativeMax = Math.max
+ function identity (value) {
+ return value
+ }
+ function rest (func, start) {
+ return (function (func, start, transform) {
+ return (
+ (start = nativeMax(void 0 === start ? func.length - 1 : start, 0)),
+ function () {
+ for (
+ var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length);
+ ++index < length;
+
+ )
+ array[index] = args[start + index]
+ index = -1
+ for (var otherArgs = Array(start + 1); ++index < start; ) otherArgs[index] = args[index]
+ return (
+ (otherArgs[start] = transform(array)),
+ (function (func, thisArg, args) {
+ switch (args.length) {
+ case 0:
+ return func.call(thisArg)
+ case 1:
+ return func.call(thisArg, args[0])
+ case 2:
+ return func.call(thisArg, args[0], args[1])
+ case 3:
+ return func.call(thisArg, args[0], args[1], args[2])
+ }
+ return func.apply(thisArg, args)
+ })(func, this, otherArgs)
+ )
+ }
+ )
+ })(func, start, identity)
+ }
+ var initialParams = function (fn) {
+ return rest(function (args) {
+ var callback = args.pop()
+ fn.call(this, args, callback)
+ })
+ }
+ function applyEach$1 (eachfn) {
+ return rest(function (fns, args) {
+ var go = initialParams(function (args, callback) {
+ var that = this
+ return eachfn(
+ fns,
+ function (fn, cb) {
+ fn.apply(that, args.concat(cb))
+ },
+ callback
+ )
+ })
+ return args.length ? go.apply(this, args) : go
+ })
+ }
+ var freeGlobal = 'object' == typeof global && global && global.Object === Object && global,
+ freeSelf = 'object' == typeof self && self && self.Object === Object && self,
+ root = freeGlobal || freeSelf || Function('return this')(),
+ Symbol$1 = root.Symbol,
+ objectProto = Object.prototype,
+ hasOwnProperty = objectProto.hasOwnProperty,
+ nativeObjectToString = objectProto.toString,
+ symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : void 0,
+ nativeObjectToString$1 = Object.prototype.toString,
+ nullTag = '[object Null]',
+ undefinedTag = '[object Undefined]',
+ symToStringTag = Symbol$1 ? Symbol$1.toStringTag : void 0
+ function baseGetTag (value) {
+ return null == value
+ ? void 0 === value
+ ? undefinedTag
+ : nullTag
+ : ((value = Object(value)),
+ symToStringTag && symToStringTag in value
+ ? (function (value) {
+ var isOwn = hasOwnProperty.call(value, symToStringTag$1),
+ tag = value[symToStringTag$1]
+ try {
+ value[symToStringTag$1] = void 0
+ var unmasked = !0
+ } catch (e) {}
+ var result = nativeObjectToString.call(value)
+ return (
+ unmasked && (isOwn ? (value[symToStringTag$1] = tag) : delete value[symToStringTag$1]), result
+ )
+ })(value)
+ : (function (value) {
+ return nativeObjectToString$1.call(value)
+ })(value))
+ }
+ function isObject (value) {
+ var type = typeof value
+ return null != value && ('object' == type || 'function' == type)
+ }
+ var asyncTag = '[object AsyncFunction]',
+ funcTag = '[object Function]',
+ genTag = '[object GeneratorFunction]',
+ proxyTag = '[object Proxy]',
+ MAX_SAFE_INTEGER = 9007199254740991
+ function isLength (value) {
+ return 'number' == typeof value && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER
+ }
+ function isArrayLike (value) {
+ return (
+ null != value &&
+ isLength(value.length) &&
+ !(function (value) {
+ if (!isObject(value)) return !1
+ var tag = baseGetTag(value)
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag
+ })(value)
+ )
+ }
+ function noop () {}
+ function once (fn) {
+ return function () {
+ if (null !== fn) {
+ var callFn = fn
+ ;(fn = null), callFn.apply(this, arguments)
+ }
+ }
+ }
+ var iteratorSymbol = 'function' == typeof Symbol && Symbol.iterator,
+ getIterator = function (coll) {
+ return iteratorSymbol && coll[iteratorSymbol] && coll[iteratorSymbol]()
+ }
+ function isObjectLike (value) {
+ return null != value && 'object' == typeof value
+ }
+ var argsTag = '[object Arguments]'
+ function baseIsArguments (value) {
+ return isObjectLike(value) && baseGetTag(value) == argsTag
+ }
+ var objectProto$3 = Object.prototype,
+ hasOwnProperty$2 = objectProto$3.hasOwnProperty,
+ propertyIsEnumerable = objectProto$3.propertyIsEnumerable,
+ isArguments = baseIsArguments(
+ (function () {
+ return arguments
+ })()
+ )
+ ? baseIsArguments
+ : function (value) {
+ return (
+ isObjectLike(value) &&
+ hasOwnProperty$2.call(value, 'callee') &&
+ !propertyIsEnumerable.call(value, 'callee')
+ )
+ },
+ isArray = Array.isArray,
+ freeExports = 'object' == typeof exports && exports && !exports.nodeType && exports,
+ freeModule = freeExports && 'object' == typeof module && module && !module.nodeType && module,
+ Buffer = freeModule && freeModule.exports === freeExports ? root.Buffer : void 0,
+ isBuffer =
+ (Buffer ? Buffer.isBuffer : void 0) ||
+ function () {
+ return !1
+ },
+ MAX_SAFE_INTEGER$1 = 9007199254740991,
+ reIsUint = /^(?:0|[1-9]\d*)$/
+ function isIndex (value, length) {
+ return (
+ !!(length = null == length ? MAX_SAFE_INTEGER$1 : length) &&
+ ('number' == typeof value || reIsUint.test(value)) &&
+ value > -1 &&
+ value % 1 == 0 &&
+ value < length
+ )
+ }
+ var typedArrayTags = {}
+ ;(typedArrayTags['[object Float32Array]'] = typedArrayTags['[object Float64Array]'] = typedArrayTags[
+ '[object Int8Array]'
+ ] = typedArrayTags['[object Int16Array]'] = typedArrayTags['[object Int32Array]'] = typedArrayTags[
+ '[object Uint8Array]'
+ ] = typedArrayTags['[object Uint8ClampedArray]'] = typedArrayTags['[object Uint16Array]'] = typedArrayTags[
+ '[object Uint32Array]'
+ ] = !0),
+ (typedArrayTags['[object Arguments]'] = typedArrayTags['[object Array]'] = typedArrayTags[
+ '[object ArrayBuffer]'
+ ] = typedArrayTags['[object Boolean]'] = typedArrayTags['[object DataView]'] = typedArrayTags[
+ '[object Date]'
+ ] = typedArrayTags['[object Error]'] = typedArrayTags['[object Function]'] = typedArrayTags[
+ '[object Map]'
+ ] = typedArrayTags['[object Number]'] = typedArrayTags['[object Object]'] = typedArrayTags[
+ '[object RegExp]'
+ ] = typedArrayTags['[object Set]'] = typedArrayTags['[object String]'] = typedArrayTags[
+ '[object WeakMap]'
+ ] = !1)
+ var func,
+ freeExports$1 = 'object' == typeof exports && exports && !exports.nodeType && exports,
+ freeModule$1 = freeExports$1 && 'object' == typeof module && module && !module.nodeType && module,
+ freeProcess = freeModule$1 && freeModule$1.exports === freeExports$1 && freeGlobal.process,
+ nodeUtil = (function () {
+ try {
+ return freeProcess && freeProcess.binding('util')
+ } catch (e) {}
+ })(),
+ nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray,
+ isTypedArray = nodeIsTypedArray
+ ? ((func = nodeIsTypedArray),
+ function (value) {
+ return func(value)
+ })
+ : function (value) {
+ return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)]
+ },
+ hasOwnProperty$1 = Object.prototype.hasOwnProperty
+ function arrayLikeKeys (value, inherited) {
+ var isArr = isArray(value),
+ isArg = !isArr && isArguments(value),
+ isBuff = !isArr && !isArg && isBuffer(value),
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
+ skipIndexes = isArr || isArg || isBuff || isType,
+ result = skipIndexes
+ ? (function (n, iteratee) {
+ for (var index = -1, result = Array(n); ++index < n; ) result[index] = iteratee(index)
+ return result
+ })(value.length, String)
+ : [],
+ length = result.length
+ for (var key in value)
+ (!inherited && !hasOwnProperty$1.call(value, key)) ||
+ (skipIndexes &&
+ ('length' == key ||
+ (isBuff && ('offset' == key || 'parent' == key)) ||
+ (isType && ('buffer' == key || 'byteLength' == key || 'byteOffset' == key)) ||
+ isIndex(key, length))) ||
+ result.push(key)
+ return result
+ }
+ var objectProto$5 = Object.prototype,
+ nativeKeys = (function (func, transform) {
+ return function (arg) {
+ return func(transform(arg))
+ }
+ })(Object.keys, Object),
+ hasOwnProperty$3 = Object.prototype.hasOwnProperty
+ function baseKeys (object) {
+ if (
+ ((Ctor = (value = object) && value.constructor),
+ value !== (('function' == typeof Ctor && Ctor.prototype) || objectProto$5))
+ )
+ return nativeKeys(object)
+ var value,
+ Ctor,
+ result = []
+ for (var key in Object(object)) hasOwnProperty$3.call(object, key) && 'constructor' != key && result.push(key)
+ return result
+ }
+ function keys (object) {
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object)
+ }
+ function iterator (coll) {
+ if (isArrayLike(coll))
+ return (function (coll) {
+ var i = -1,
+ len = coll.length
+ return function () {
+ return ++i < len ? { value: coll[i], key: i } : null
+ }
+ })(coll)
+ var obj,
+ okeys,
+ i,
+ len,
+ iterator = getIterator(coll)
+ return iterator
+ ? (function (iterator) {
+ var i = -1
+ return function () {
+ var item = iterator.next()
+ return item.done ? null : (i++, { value: item.value, key: i })
+ }
+ })(iterator)
+ : ((okeys = keys((obj = coll))),
+ (i = -1),
+ (len = okeys.length),
+ function () {
+ var key = okeys[++i]
+ return i < len ? { value: obj[key], key } : null
+ })
+ }
+ function onlyOnce (fn) {
+ return function () {
+ if (null === fn) throw new Error('Callback was already called.')
+ var callFn = fn
+ ;(fn = null), callFn.apply(this, arguments)
+ }
+ }
+ var breakLoop = {}
+ function _eachOfLimit (limit) {
+ return function (obj, iteratee, callback) {
+ if (((callback = once(callback || noop)), limit <= 0 || !obj)) return callback(null)
+ var nextElem = iterator(obj),
+ done = !1,
+ running = 0
+ function iterateeCallback (err, value) {
+ if (((running -= 1), err)) (done = !0), callback(err)
+ else {
+ if (value === breakLoop || (done && running <= 0)) return (done = !0), callback(null)
+ replenish()
+ }
+ }
+ function replenish () {
+ for (; running < limit && !done; ) {
+ var elem = nextElem()
+ if (null === elem) return (done = !0), void (running <= 0 && callback(null))
+ ;(running += 1), iteratee(elem.value, elem.key, onlyOnce(iterateeCallback))
+ }
+ }
+ replenish()
+ }
+ }
+ function eachOfLimit (coll, limit, iteratee, callback) {
+ _eachOfLimit(limit)(coll, iteratee, callback)
+ }
+ function doLimit (fn, limit) {
+ return function (iterable, iteratee, callback) {
+ return fn(iterable, limit, iteratee, callback)
+ }
+ }
+ function eachOfArrayLike (coll, iteratee, callback) {
+ callback = once(callback || noop)
+ var index = 0,
+ completed = 0,
+ length = coll.length
+ function iteratorCallback (err) {
+ err ? callback(err) : ++completed === length && callback(null)
+ }
+ for (0 === length && callback(null); index < length; index++)
+ iteratee(coll[index], index, onlyOnce(iteratorCallback))
+ }
+ var eachOfGeneric = doLimit(eachOfLimit, 1 / 0),
+ eachOf = function (coll, iteratee, callback) {
+ ;(isArrayLike(coll) ? eachOfArrayLike : eachOfGeneric)(coll, iteratee, callback)
+ }
+ function doParallel (fn) {
+ return function (obj, iteratee, callback) {
+ return fn(eachOf, obj, iteratee, callback)
+ }
+ }
+ function _asyncMap (eachfn, arr, iteratee, callback) {
+ callback = callback || noop
+ var results = [],
+ counter = 0
+ eachfn(
+ (arr = arr || []),
+ function (value, _, callback) {
+ var index = counter++
+ iteratee(value, function (err, v) {
+ ;(results[index] = v), callback(err)
+ })
+ },
+ function (err) {
+ callback(err, results)
+ }
+ )
+ }
+ var map = doParallel(_asyncMap),
+ applyEach = applyEach$1(map)
+ function doParallelLimit (fn) {
+ return function (obj, limit, iteratee, callback) {
+ return fn(_eachOfLimit(limit), obj, iteratee, callback)
+ }
+ }
+ var mapLimit = doParallelLimit(_asyncMap),
+ mapSeries = doLimit(mapLimit, 1),
+ applyEachSeries = applyEach$1(mapSeries),
+ apply$2 = rest(function (fn, args) {
+ return rest(function (callArgs) {
+ return fn.apply(null, args.concat(callArgs))
+ })
+ })
+ function asyncify (func) {
+ return initialParams(function (args, callback) {
+ var result
+ try {
+ result = func.apply(this, args)
+ } catch (e) {
+ return callback(e)
+ }
+ isObject(result) && 'function' == typeof result.then
+ ? result.then(
+ function (value) {
+ callback(null, value)
+ },
+ function (err) {
+ callback(err.message ? err : new Error(err))
+ }
+ )
+ : callback(null, result)
+ })
+ }
+ function arrayEach (array, iteratee) {
+ for (
+ var index = -1, length = null == array ? 0 : array.length;
+ ++index < length && !1 !== iteratee(array[index], index, array);
+
+ );
+ return array
+ }
+ var fromRight,
+ baseFor = function (object, iteratee, keysFunc) {
+ for (
+ var index = -1, iterable = Object(object), props = keysFunc(object), length = props.length;
+ length--;
+
+ ) {
+ var key = props[fromRight ? length : ++index]
+ if (!1 === iteratee(iterable[key], key, iterable)) break
+ }
+ return object
+ }
+ function baseForOwn (object, iteratee) {
+ return object && baseFor(object, iteratee, keys)
+ }
+ function baseIsNaN (value) {
+ return value != value
+ }
+ function baseIndexOf (array, value, fromIndex) {
+ return value == value
+ ? (function (array, value, fromIndex) {
+ for (var index = fromIndex - 1, length = array.length; ++index < length; )
+ if (array[index] === value) return index
+ return -1
+ })(array, value, fromIndex)
+ : (function (array, predicate, fromIndex, fromRight) {
+ for (
+ var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
+ fromRight ? index-- : ++index < length;
+
+ )
+ if (predicate(array[index], index, array)) return index
+ return -1
+ })(array, baseIsNaN, fromIndex)
+ }
+ var auto = function (tasks, concurrency, callback) {
+ 'function' == typeof concurrency && ((callback = concurrency), (concurrency = null)),
+ (callback = once(callback || noop))
+ var numTasks = keys(tasks).length
+ if (!numTasks) return callback(null)
+ concurrency || (concurrency = numTasks)
+ var results = {},
+ runningTasks = 0,
+ hasError = !1,
+ listeners = {},
+ readyTasks = [],
+ readyToCheck = [],
+ uncheckedDependencies = {}
+ function enqueueTask (key, task) {
+ readyTasks.push(function () {
+ !(function (key, task) {
+ if (hasError) return
+ var taskCallback = onlyOnce(
+ rest(function (err, args) {
+ if ((runningTasks--, args.length <= 1 && (args = args[0]), err)) {
+ var safeResults = {}
+ baseForOwn(results, function (val, rkey) {
+ safeResults[rkey] = val
+ }),
+ (safeResults[key] = args),
+ (hasError = !0),
+ (listeners = []),
+ callback(err, safeResults)
+ } else
+ (results[key] = args),
+ arrayEach(listeners[key] || [], function (fn) {
+ fn()
+ }),
+ processQueue()
+ })
+ )
+ runningTasks++
+ var taskFn = task[task.length - 1]
+ task.length > 1 ? taskFn(results, taskCallback) : taskFn(taskCallback)
+ })(key, task)
+ })
+ }
+ function processQueue () {
+ if (0 === readyTasks.length && 0 === runningTasks) return callback(null, results)
+ for (; readyTasks.length && runningTasks < concurrency; ) {
+ readyTasks.shift()()
+ }
+ }
+ function getDependents (taskName) {
+ var result = []
+ return (
+ baseForOwn(tasks, function (task, key) {
+ isArray(task) && baseIndexOf(task, taskName, 0) >= 0 && result.push(key)
+ }),
+ result
+ )
+ }
+ baseForOwn(tasks, function (task, key) {
+ if (!isArray(task)) return enqueueTask(key, [task]), void readyToCheck.push(key)
+ var dependencies = task.slice(0, task.length - 1),
+ remainingDependencies = dependencies.length
+ if (0 === remainingDependencies) return enqueueTask(key, task), void readyToCheck.push(key)
+ ;(uncheckedDependencies[key] = remainingDependencies),
+ arrayEach(dependencies, function (dependencyName) {
+ if (!tasks[dependencyName])
+ throw new Error(
+ 'async.auto task `' + key + '` has a non-existent dependency in ' + dependencies.join(', ')
+ )
+ !(function (taskName, fn) {
+ var taskListeners = listeners[taskName]
+ taskListeners || (taskListeners = listeners[taskName] = [])
+ taskListeners.push(fn)
+ })(dependencyName, function () {
+ 0 === --remainingDependencies && enqueueTask(key, task)
+ })
+ })
+ }),
+ (function () {
+ var currentTask,
+ counter = 0
+ for (; readyToCheck.length; )
+ (currentTask = readyToCheck.pop()),
+ counter++,
+ arrayEach(getDependents(currentTask), function (dependent) {
+ 0 == --uncheckedDependencies[dependent] && readyToCheck.push(dependent)
+ })
+ if (counter !== numTasks) throw new Error('async.auto cannot execute tasks due to a recursive dependency')
+ })(),
+ processQueue()
+ }
+ function arrayMap (array, iteratee) {
+ for (var index = -1, length = null == array ? 0 : array.length, result = Array(length); ++index < length; )
+ result[index] = iteratee(array[index], index, array)
+ return result
+ }
+ var symbolTag = '[object Symbol]',
+ INFINITY = 1 / 0,
+ symbolProto = Symbol$1 ? Symbol$1.prototype : void 0,
+ symbolToString = symbolProto ? symbolProto.toString : void 0
+ function baseToString (value) {
+ if ('string' == typeof value) return value
+ if (isArray(value)) return arrayMap(value, baseToString) + ''
+ if (
+ (function (value) {
+ return 'symbol' == typeof value || (isObjectLike(value) && baseGetTag(value) == symbolTag)
+ })(value)
+ )
+ return symbolToString ? symbolToString.call(value) : ''
+ var result = value + ''
+ return '0' == result && 1 / value == -INFINITY ? '-0' : result
+ }
+ function castSlice (array, start, end) {
+ var length = array.length
+ return (
+ (end = void 0 === end ? length : end),
+ !start && end >= length
+ ? array
+ : (function (array, start, end) {
+ var index = -1,
+ length = array.length
+ start < 0 && (start = -start > length ? 0 : length + start),
+ (end = end > length ? length : end) < 0 && (end += length),
+ (length = start > end ? 0 : (end - start) >>> 0),
+ (start >>>= 0)
+ for (var result = Array(length); ++index < length; ) result[index] = array[index + start]
+ return result
+ })(array, start, end)
+ )
+ }
+ var reHasUnicode = RegExp(
+ '[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0\\ufe0e\\ufe0f]'
+ ),
+ rsAstral = '[\\ud800-\\udfff]',
+ rsCombo = '[\\u0300-\\u036f\\ufe20-\\ufe23\\u20d0-\\u20f0]',
+ rsFitz = '\\ud83c[\\udffb-\\udfff]',
+ rsNonAstral = '[^\\ud800-\\udfff]',
+ rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
+ rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
+ reOptMod = '(?:' + rsCombo + '|' + rsFitz + ')' + '?',
+ rsSeq =
+ '[\\ufe0e\\ufe0f]?' +
+ reOptMod +
+ ('(?:\\u200d(?:' +
+ [rsNonAstral, rsRegional, rsSurrPair].join('|') +
+ ')[\\ufe0e\\ufe0f]?' +
+ reOptMod +
+ ')*'),
+ rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')',
+ reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g')
+ function stringToArray (string) {
+ return (function (string) {
+ return reHasUnicode.test(string)
+ })(string)
+ ? (function (string) {
+ return string.match(reUnicode) || []
+ })(string)
+ : (function (string) {
+ return string.split('')
+ })(string)
+ }
+ var reTrim = /^\s+|\s+$/g
+ function trim (string, chars, guard) {
+ var value
+ if ((string = null == (value = string) ? '' : baseToString(value)) && (guard || void 0 === chars))
+ return string.replace(reTrim, '')
+ if (!string || !(chars = baseToString(chars))) return string
+ var strSymbols = stringToArray(string),
+ chrSymbols = stringToArray(chars)
+ return castSlice(
+ strSymbols,
+ (function (strSymbols, chrSymbols) {
+ for (
+ var index = -1, length = strSymbols.length;
+ ++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1;
+
+ );
+ return index
+ })(strSymbols, chrSymbols),
+ (function (strSymbols, chrSymbols) {
+ for (var index = strSymbols.length; index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1; );
+ return index
+ })(strSymbols, chrSymbols) + 1
+ ).join('')
+ }
+ var FN_ARGS = /^(function)?\s*[^\(]*\(\s*([^\)]*)\)/m,
+ FN_ARG_SPLIT = /,/,
+ FN_ARG = /(=.+)?(\s*)$/,
+ STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm
+ function autoInject (tasks, callback) {
+ var newTasks = {}
+ baseForOwn(tasks, function (taskFn, key) {
+ var params, func
+ if (isArray(taskFn))
+ (params = taskFn.slice(0, -1)),
+ (taskFn = taskFn[taskFn.length - 1]),
+ (newTasks[key] = params.concat(params.length > 0 ? newTask : taskFn))
+ else if (1 === taskFn.length) newTasks[key] = taskFn
+ else {
+ if (
+ ((params = func = (func = (func = (func = (func = taskFn).toString().replace(STRIP_COMMENTS, ''))
+ .match(FN_ARGS)[2]
+ .replace(' ', ''))
+ ? func.split(FN_ARG_SPLIT)
+ : []).map(function (arg) {
+ return trim(arg.replace(FN_ARG, ''))
+ })),
+ 0 === taskFn.length && 0 === params.length)
+ )
+ throw new Error('autoInject task functions require explicit parameters.')
+ params.pop(), (newTasks[key] = params.concat(newTask))
+ }
+ function newTask (results, taskCb) {
+ var newArgs = arrayMap(params, function (name) {
+ return results[name]
+ })
+ newArgs.push(taskCb), taskFn.apply(null, newArgs)
+ }
+ }),
+ auto(newTasks, callback)
+ }
+ var hasSetImmediate = 'function' == typeof setImmediate && setImmediate,
+ hasNextTick = 'object' == typeof process && 'function' == typeof process.nextTick
+ function fallback (fn) {
+ setTimeout(fn, 0)
+ }
+ function wrap (defer) {
+ return rest(function (fn, args) {
+ defer(function () {
+ fn.apply(null, args)
+ })
+ })
+ }
+ var setImmediate$1 = wrap(hasSetImmediate ? setImmediate : hasNextTick ? process.nextTick : fallback)
+ function DLL () {
+ ;(this.head = this.tail = null), (this.length = 0)
+ }
+ function setInitial (dll, node) {
+ ;(dll.length = 1), (dll.head = dll.tail = node)
+ }
+ function queue (worker, concurrency, payload) {
+ if (null == concurrency) concurrency = 1
+ else if (0 === concurrency) throw new Error('Concurrency must not be zero')
+ function _insert (data, insertAtFront, callback) {
+ if (null != callback && 'function' != typeof callback) throw new Error('task callback must be a function')
+ if (((q.started = !0), isArray(data) || (data = [data]), 0 === data.length && q.idle()))
+ return setImmediate$1(function () {
+ q.drain()
+ })
+ for (var i = 0, l = data.length; i < l; i++) {
+ var item = { data: data[i], callback: callback || noop }
+ insertAtFront ? q._tasks.unshift(item) : q._tasks.push(item)
+ }
+ setImmediate$1(q.process)
+ }
+ function _next (tasks) {
+ return rest(function (args) {
+ workers -= 1
+ for (var i = 0, l = tasks.length; i < l; i++) {
+ var task = tasks[i],
+ index = baseIndexOf(workersList, task, 0)
+ index >= 0 && workersList.splice(index),
+ task.callback.apply(task, args),
+ null != args[0] && q.error(args[0], task.data)
+ }
+ workers <= q.concurrency - q.buffer && q.unsaturated(), q.idle() && q.drain(), q.process()
+ })
+ }
+ var workers = 0,
+ workersList = [],
+ q = {
+ _tasks: new DLL(),
+ concurrency,
+ payload,
+ saturated: noop,
+ unsaturated: noop,
+ buffer: concurrency / 4,
+ empty: noop,
+ drain: noop,
+ error: noop,
+ started: !1,
+ paused: !1,
+ push: function (data, callback) {
+ _insert(data, !1, callback)
+ },
+ kill: function () {
+ ;(q.drain = noop), q._tasks.empty()
+ },
+ unshift: function (data, callback) {
+ _insert(data, !0, callback)
+ },
+ process: function () {
+ for (; !q.paused && workers < q.concurrency && q._tasks.length; ) {
+ var tasks = [],
+ data = [],
+ l = q._tasks.length
+ q.payload && (l = Math.min(l, q.payload))
+ for (var i = 0; i < l; i++) {
+ var node = q._tasks.shift()
+ tasks.push(node), data.push(node.data)
+ }
+ 0 === q._tasks.length && q.empty(),
+ (workers += 1),
+ workersList.push(tasks[0]),
+ workers === q.concurrency && q.saturated()
+ var cb = onlyOnce(_next(tasks))
+ worker(data, cb)
+ }
+ },
+ length: function () {
+ return q._tasks.length
+ },
+ running: function () {
+ return workers
+ },
+ workersList: function () {
+ return workersList
+ },
+ idle: function () {
+ return q._tasks.length + workers === 0
+ },
+ pause: function () {
+ q.paused = !0
+ },
+ resume: function () {
+ if (!1 !== q.paused) {
+ q.paused = !1
+ for (var resumeCount = Math.min(q.concurrency, q._tasks.length), w = 1; w <= resumeCount; w++)
+ setImmediate$1(q.process)
+ }
+ }
+ }
+ return q
+ }
+ function cargo (worker, payload) {
+ return queue(worker, 1, payload)
+ }
+ ;(DLL.prototype.removeLink = function (node) {
+ return (
+ node.prev ? (node.prev.next = node.next) : (this.head = node.next),
+ node.next ? (node.next.prev = node.prev) : (this.tail = node.prev),
+ (node.prev = node.next = null),
+ (this.length -= 1),
+ node
+ )
+ }),
+ (DLL.prototype.empty = DLL),
+ (DLL.prototype.insertAfter = function (node, newNode) {
+ ;(newNode.prev = node),
+ (newNode.next = node.next),
+ node.next ? (node.next.prev = newNode) : (this.tail = newNode),
+ (node.next = newNode),
+ (this.length += 1)
+ }),
+ (DLL.prototype.insertBefore = function (node, newNode) {
+ ;(newNode.prev = node.prev),
+ (newNode.next = node),
+ node.prev ? (node.prev.next = newNode) : (this.head = newNode),
+ (node.prev = newNode),
+ (this.length += 1)
+ }),
+ (DLL.prototype.unshift = function (node) {
+ this.head ? this.insertBefore(this.head, node) : setInitial(this, node)
+ }),
+ (DLL.prototype.push = function (node) {
+ this.tail ? this.insertAfter(this.tail, node) : setInitial(this, node)
+ }),
+ (DLL.prototype.shift = function () {
+ return this.head && this.removeLink(this.head)
+ }),
+ (DLL.prototype.pop = function () {
+ return this.tail && this.removeLink(this.tail)
+ })
+ var eachOfSeries = doLimit(eachOfLimit, 1)
+ function reduce (coll, memo, iteratee, callback) {
+ ;(callback = once(callback || noop)),
+ eachOfSeries(
+ coll,
+ function (x, i, callback) {
+ iteratee(memo, x, function (err, v) {
+ ;(memo = v), callback(err)
+ })
+ },
+ function (err) {
+ callback(err, memo)
+ }
+ )
+ }
+ var seq$1 = rest(function (functions) {
+ return rest(function (args) {
+ var that = this,
+ cb = args[args.length - 1]
+ 'function' == typeof cb ? args.pop() : (cb = noop),
+ reduce(
+ functions,
+ args,
+ function (newargs, fn, cb) {
+ fn.apply(
+ that,
+ newargs.concat(
+ rest(function (err, nextargs) {
+ cb(err, nextargs)
+ })
+ )
+ )
+ },
+ function (err, results) {
+ cb.apply(that, [err].concat(results))
+ }
+ )
+ })
+ }),
+ compose = rest(function (args) {
+ return seq$1.apply(null, args.reverse())
+ })
+ function concat$1 (eachfn, arr, fn, callback) {
+ var result = []
+ eachfn(
+ arr,
+ function (x, index, cb) {
+ fn(x, function (err, y) {
+ ;(result = result.concat(y || [])), cb(err)
+ })
+ },
+ function (err) {
+ callback(err, result)
+ }
+ )
+ }
+ var fn,
+ concat = doParallel(concat$1),
+ concatSeries = ((fn = concat$1),
+ function (obj, iteratee, callback) {
+ return fn(eachOfSeries, obj, iteratee, callback)
+ }),
+ constant = rest(function (values) {
+ var args = [null].concat(values)
+ return initialParams(function (ignoredArgs, callback) {
+ return callback.apply(this, args)
+ })
+ })
+ function _createTester (eachfn, check, getResult) {
+ return function (arr, limit, iteratee, cb) {
+ function done () {
+ cb && cb(null, getResult(!1))
+ }
+ function wrappedIteratee (x, _, callback) {
+ if (!cb) return callback()
+ iteratee(x, function (err, v) {
+ cb && (err || check(v))
+ ? (err ? cb(err) : cb(err, getResult(!0, x)), (cb = iteratee = !1), callback(err, breakLoop))
+ : callback()
+ })
+ }
+ arguments.length > 3
+ ? ((cb = cb || noop), eachfn(arr, limit, wrappedIteratee, done))
+ : ((cb = (cb = iteratee) || noop), (iteratee = limit), eachfn(arr, wrappedIteratee, done))
+ }
+ }
+ function _findGetResult (v, x) {
+ return x
+ }
+ var detect = _createTester(eachOf, identity, _findGetResult),
+ detectLimit = _createTester(eachOfLimit, identity, _findGetResult),
+ detectSeries = _createTester(eachOfSeries, identity, _findGetResult)
+ function consoleFunc (name) {
+ return rest(function (fn, args) {
+ fn.apply(
+ null,
+ args.concat(
+ rest(function (err, args) {
+ 'object' == typeof console &&
+ (err
+ ? console.error && console.error(err)
+ : console[name] &&
+ arrayEach(args, function (x) {
+ console[name](x)
+ }))
+ })
+ )
+ )
+ })
+ }
+ var dir = consoleFunc('dir')
+ function doDuring (fn, test, callback) {
+ callback = onlyOnce(callback || noop)
+ var next = rest(function (err, args) {
+ if (err) return callback(err)
+ args.push(check), test.apply(this, args)
+ })
+ function check (err, truth) {
+ return err ? callback(err) : truth ? void fn(next) : callback(null)
+ }
+ check(null, !0)
+ }
+ function doWhilst (iteratee, test, callback) {
+ callback = onlyOnce(callback || noop)
+ var next = rest(function (err, args) {
+ return err
+ ? callback(err)
+ : test.apply(this, args)
+ ? iteratee(next)
+ : void callback.apply(null, [null].concat(args))
+ })
+ iteratee(next)
+ }
+ function doUntil (fn, test, callback) {
+ doWhilst(
+ fn,
+ function () {
+ return !test.apply(this, arguments)
+ },
+ callback
+ )
+ }
+ function during (test, fn, callback) {
+ function next (err) {
+ if (err) return callback(err)
+ test(check)
+ }
+ function check (err, truth) {
+ return err ? callback(err) : truth ? void fn(next) : callback(null)
+ }
+ ;(callback = onlyOnce(callback || noop)), test(check)
+ }
+ function _withoutIndex (iteratee) {
+ return function (value, index, callback) {
+ return iteratee(value, callback)
+ }
+ }
+ function eachLimit (coll, iteratee, callback) {
+ eachOf(coll, _withoutIndex(iteratee), callback)
+ }
+ function eachLimit$1 (coll, limit, iteratee, callback) {
+ _eachOfLimit(limit)(coll, _withoutIndex(iteratee), callback)
+ }
+ var eachSeries = doLimit(eachLimit$1, 1)
+ function ensureAsync (fn) {
+ return initialParams(function (args, callback) {
+ var sync = !0
+ args.push(function () {
+ var innerArgs = arguments
+ sync
+ ? setImmediate$1(function () {
+ callback.apply(null, innerArgs)
+ })
+ : callback.apply(null, innerArgs)
+ }),
+ fn.apply(this, args),
+ (sync = !1)
+ })
+ }
+ function notId (v) {
+ return !v
+ }
+ var every = _createTester(eachOf, notId, notId),
+ everyLimit = _createTester(eachOfLimit, notId, notId),
+ everySeries = doLimit(everyLimit, 1)
+ function baseProperty (key) {
+ return function (object) {
+ return null == object ? void 0 : object[key]
+ }
+ }
+ function filterArray (eachfn, arr, iteratee, callback) {
+ var truthValues = new Array(arr.length)
+ eachfn(
+ arr,
+ function (x, index, callback) {
+ iteratee(x, function (err, v) {
+ ;(truthValues[index] = !!v), callback(err)
+ })
+ },
+ function (err) {
+ if (err) return callback(err)
+ for (var results = [], i = 0; i < arr.length; i++) truthValues[i] && results.push(arr[i])
+ callback(null, results)
+ }
+ )
+ }
+ function filterGeneric (eachfn, coll, iteratee, callback) {
+ var results = []
+ eachfn(
+ coll,
+ function (x, index, callback) {
+ iteratee(x, function (err, v) {
+ err ? callback(err) : (v && results.push({ index, value: x }), callback())
+ })
+ },
+ function (err) {
+ err
+ ? callback(err)
+ : callback(
+ null,
+ arrayMap(
+ results.sort(function (a, b) {
+ return a.index - b.index
+ }),
+ baseProperty('value')
+ )
+ )
+ }
+ )
+ }
+ function _filter (eachfn, coll, iteratee, callback) {
+ ;(isArrayLike(coll) ? filterArray : filterGeneric)(eachfn, coll, iteratee, callback || noop)
+ }
+ var filter = doParallel(_filter),
+ filterLimit = doParallelLimit(_filter),
+ filterSeries = doLimit(filterLimit, 1)
+ function forever (fn, errback) {
+ var done = onlyOnce(errback || noop),
+ task = ensureAsync(fn)
+ !(function next (err) {
+ if (err) return done(err)
+ task(next)
+ })()
+ }
+ var log = consoleFunc('log')
+ function mapValuesLimit (obj, limit, iteratee, callback) {
+ callback = once(callback || noop)
+ var newObj = {}
+ eachOfLimit(
+ obj,
+ limit,
+ function (val, key, next) {
+ iteratee(val, key, function (err, result) {
+ if (err) return next(err)
+ ;(newObj[key] = result), next()
+ })
+ },
+ function (err) {
+ callback(err, newObj)
+ }
+ )
+ }
+ var mapValues = doLimit(mapValuesLimit, 1 / 0),
+ mapValuesSeries = doLimit(mapValuesLimit, 1)
+ function has (obj, key) {
+ return key in obj
+ }
+ function memoize (fn, hasher) {
+ var memo = Object.create(null),
+ queues = Object.create(null)
+ hasher = hasher || identity
+ var memoized = initialParams(function (args, callback) {
+ var key = hasher.apply(null, args)
+ has(memo, key)
+ ? setImmediate$1(function () {
+ callback.apply(null, memo[key])
+ })
+ : has(queues, key)
+ ? queues[key].push(callback)
+ : ((queues[key] = [callback]),
+ fn.apply(
+ null,
+ args.concat(
+ rest(function (args) {
+ memo[key] = args
+ var q = queues[key]
+ delete queues[key]
+ for (var i = 0, l = q.length; i < l; i++) q[i].apply(null, args)
+ })
+ )
+ ))
+ })
+ return (memoized.memo = memo), (memoized.unmemoized = fn), memoized
+ }
+ var nextTick = wrap(hasNextTick ? process.nextTick : hasSetImmediate ? setImmediate : fallback)
+ function _parallel (eachfn, tasks, callback) {
+ callback = callback || noop
+ var results = isArrayLike(tasks) ? [] : {}
+ eachfn(
+ tasks,
+ function (task, key, callback) {
+ task(
+ rest(function (err, args) {
+ args.length <= 1 && (args = args[0]), (results[key] = args), callback(err)
+ })
+ )
+ },
+ function (err) {
+ callback(err, results)
+ }
+ )
+ }
+ function parallelLimit (tasks, callback) {
+ _parallel(eachOf, tasks, callback)
+ }
+ function parallelLimit$1 (tasks, limit, callback) {
+ _parallel(_eachOfLimit(limit), tasks, callback)
+ }
+ var queue$1 = function (worker, concurrency) {
+ return queue(
+ function (items, cb) {
+ worker(items[0], cb)
+ },
+ concurrency,
+ 1
+ )
+ },
+ priorityQueue = function (worker, concurrency) {
+ var q = queue$1(worker, concurrency)
+ return (
+ (q.push = function (data, priority, callback) {
+ if ((null == callback && (callback = noop), 'function' != typeof callback))
+ throw new Error('task callback must be a function')
+ if (((q.started = !0), isArray(data) || (data = [data]), 0 === data.length))
+ return setImmediate$1(function () {
+ q.drain()
+ })
+ priority = priority || 0
+ for (var nextNode = q._tasks.head; nextNode && priority >= nextNode.priority; ) nextNode = nextNode.next
+ for (var i = 0, l = data.length; i < l; i++) {
+ var item = { data: data[i], priority, callback }
+ nextNode ? q._tasks.insertBefore(nextNode, item) : q._tasks.push(item)
+ }
+ setImmediate$1(q.process)
+ }),
+ delete q.unshift,
+ q
+ )
+ }
+ function race (tasks, callback) {
+ if (((callback = once(callback || noop)), !isArray(tasks)))
+ return callback(new TypeError('First argument to race must be an array of functions'))
+ if (!tasks.length) return callback()
+ for (var i = 0, l = tasks.length; i < l; i++) tasks[i](callback)
+ }
+ var slice = Array.prototype.slice
+ function reduceRight (array, memo, iteratee, callback) {
+ reduce(slice.call(array).reverse(), memo, iteratee, callback)
+ }
+ function reflect (fn) {
+ return initialParams(function (args, reflectCallback) {
+ return (
+ args.push(
+ rest(function (err, cbArgs) {
+ if (err) reflectCallback(null, { error: err })
+ else {
+ var value = null
+ 1 === cbArgs.length ? (value = cbArgs[0]) : cbArgs.length > 1 && (value = cbArgs),
+ reflectCallback(null, { value })
+ }
+ })
+ ),
+ fn.apply(this, args)
+ )
+ })
+ }
+ function reject$1 (eachfn, arr, iteratee, callback) {
+ _filter(
+ eachfn,
+ arr,
+ function (value, cb) {
+ iteratee(value, function (err, v) {
+ cb(err, !v)
+ })
+ },
+ callback
+ )
+ }
+ var reject = doParallel(reject$1)
+ function reflectAll (tasks) {
+ var results
+ return (
+ isArray(tasks)
+ ? (results = arrayMap(tasks, reflect))
+ : ((results = {}),
+ baseForOwn(tasks, function (task, key) {
+ results[key] = reflect.call(this, task)
+ })),
+ results
+ )
+ }
+ var rejectLimit = doParallelLimit(reject$1),
+ rejectSeries = doLimit(rejectLimit, 1)
+ function constant$1 (value) {
+ return function () {
+ return value
+ }
+ }
+ function retry (opts, task, callback) {
+ var DEFAULT_TIMES = 5,
+ DEFAULT_INTERVAL = 0,
+ options = { times: DEFAULT_TIMES, intervalFunc: constant$1(DEFAULT_INTERVAL) }
+ if (
+ (arguments.length < 3 && 'function' == typeof opts
+ ? ((callback = task || noop), (task = opts))
+ : (!(function (acc, t) {
+ if ('object' == typeof t)
+ (acc.times = +t.times || DEFAULT_TIMES),
+ (acc.intervalFunc =
+ 'function' == typeof t.interval ? t.interval : constant$1(+t.interval || DEFAULT_INTERVAL)),
+ (acc.errorFilter = t.errorFilter)
+ else {
+ if ('number' != typeof t && 'string' != typeof t)
+ throw new Error('Invalid arguments for async.retry')
+ acc.times = +t || DEFAULT_TIMES
+ }
+ })(options, opts),
+ (callback = callback || noop)),
+ 'function' != typeof task)
+ )
+ throw new Error('Invalid arguments for async.retry')
+ var attempt = 1
+ !(function retryAttempt () {
+ task(function (err) {
+ err && attempt++ < options.times && ('function' != typeof options.errorFilter || options.errorFilter(err))
+ ? setTimeout(retryAttempt, options.intervalFunc(attempt))
+ : callback.apply(null, arguments)
+ })
+ })()
+ }
+ var retryable = function (opts, task) {
+ return (
+ task || ((task = opts), (opts = null)),
+ initialParams(function (args, callback) {
+ function taskFn (cb) {
+ task.apply(null, args.concat(cb))
+ }
+ opts ? retry(opts, taskFn, callback) : retry(taskFn, callback)
+ })
+ )
+ }
+ function series (tasks, callback) {
+ _parallel(eachOfSeries, tasks, callback)
+ }
+ var some = _createTester(eachOf, Boolean, identity),
+ someLimit = _createTester(eachOfLimit, Boolean, identity),
+ someSeries = doLimit(someLimit, 1)
+ function sortBy (coll, iteratee, callback) {
+ function comparator (left, right) {
+ var a = left.criteria,
+ b = right.criteria
+ return a < b ? -1 : a > b ? 1 : 0
+ }
+ map(
+ coll,
+ function (x, callback) {
+ iteratee(x, function (err, criteria) {
+ if (err) return callback(err)
+ callback(null, { value: x, criteria })
+ })
+ },
+ function (err, results) {
+ if (err) return callback(err)
+ callback(null, arrayMap(results.sort(comparator), baseProperty('value')))
+ }
+ )
+ }
+ function timeout (asyncFn, milliseconds, info) {
+ var originalCallback,
+ timer,
+ timedOut = !1
+ function injectedCallback () {
+ timedOut || (originalCallback.apply(null, arguments), clearTimeout(timer))
+ }
+ function timeoutCallback () {
+ var name = asyncFn.name || 'anonymous',
+ error = new Error('Callback function "' + name + '" timed out.')
+ ;(error.code = 'ETIMEDOUT'), info && (error.info = info), (timedOut = !0), originalCallback(error)
+ }
+ return initialParams(function (args, origCallback) {
+ ;(originalCallback = origCallback),
+ (timer = setTimeout(timeoutCallback, milliseconds)),
+ asyncFn.apply(null, args.concat(injectedCallback))
+ })
+ }
+ var nativeCeil = Math.ceil,
+ nativeMax$1 = Math.max
+ function timeLimit (count, limit, iteratee, callback) {
+ mapLimit(
+ (function (start, end, step, fromRight) {
+ for (
+ var index = -1,
+ length = nativeMax$1(nativeCeil((end - start) / (step || 1)), 0),
+ result = Array(length);
+ length--;
+
+ )
+ (result[fromRight ? length : ++index] = start), (start += step)
+ return result
+ })(0, count, 1),
+ limit,
+ iteratee,
+ callback
+ )
+ }
+ var times = doLimit(timeLimit, 1 / 0),
+ timesSeries = doLimit(timeLimit, 1)
+ function transform (coll, accumulator, iteratee, callback) {
+ 3 === arguments.length &&
+ ((callback = iteratee), (iteratee = accumulator), (accumulator = isArray(coll) ? [] : {})),
+ (callback = once(callback || noop)),
+ eachOf(
+ coll,
+ function (v, k, cb) {
+ iteratee(accumulator, v, k, cb)
+ },
+ function (err) {
+ callback(err, accumulator)
+ }
+ )
+ }
+ function unmemoize (fn) {
+ return function () {
+ return (fn.unmemoized || fn).apply(null, arguments)
+ }
+ }
+ function whilst (test, iteratee, callback) {
+ if (((callback = onlyOnce(callback || noop)), !test())) return callback(null)
+ var next = rest(function (err, args) {
+ return err ? callback(err) : test() ? iteratee(next) : void callback.apply(null, [null].concat(args))
+ })
+ iteratee(next)
+ }
+ function until (test, fn, callback) {
+ whilst(
+ function () {
+ return !test.apply(this, arguments)
+ },
+ fn,
+ callback
+ )
+ }
+ var waterfall = function (tasks, callback) {
+ if (((callback = once(callback || noop)), !isArray(tasks)))
+ return callback(new Error('First argument to waterfall must be an array of functions'))
+ if (!tasks.length) return callback()
+ var taskIndex = 0
+ !(function nextTask (args) {
+ if (taskIndex === tasks.length) return callback.apply(null, [null].concat(args))
+ var taskCallback = onlyOnce(
+ rest(function (err, args) {
+ if (err) return callback.apply(null, [err].concat(args))
+ nextTask(args)
+ })
+ )
+ args.push(taskCallback), tasks[taskIndex++].apply(null, args)
+ })([])
+ },
+ index = {
+ applyEach,
+ applyEachSeries,
+ apply: apply$2,
+ asyncify,
+ auto,
+ autoInject,
+ cargo,
+ compose,
+ concat,
+ concatSeries,
+ constant,
+ detect,
+ detectLimit,
+ detectSeries,
+ dir,
+ doDuring,
+ doUntil,
+ doWhilst,
+ during,
+ each: eachLimit,
+ eachLimit: eachLimit$1,
+ eachOf,
+ eachOfLimit,
+ eachOfSeries,
+ eachSeries,
+ ensureAsync,
+ every,
+ everyLimit,
+ everySeries,
+ filter,
+ filterLimit,
+ filterSeries,
+ forever,
+ log,
+ map,
+ mapLimit,
+ mapSeries,
+ mapValues,
+ mapValuesLimit,
+ mapValuesSeries,
+ memoize,
+ nextTick,
+ parallel: parallelLimit,
+ parallelLimit: parallelLimit$1,
+ priorityQueue,
+ queue: queue$1,
+ race,
+ reduce,
+ reduceRight,
+ reflect,
+ reflectAll,
+ reject,
+ rejectLimit,
+ rejectSeries,
+ retry,
+ retryable,
+ seq: seq$1,
+ series,
+ setImmediate: setImmediate$1,
+ some,
+ someLimit,
+ someSeries,
+ sortBy,
+ timeout,
+ times,
+ timesLimit: timeLimit,
+ timesSeries,
+ transform,
+ unmemoize,
+ until,
+ waterfall,
+ whilst,
+ all: every,
+ any: some,
+ forEach: eachLimit,
+ forEachSeries: eachSeries,
+ forEachLimit: eachLimit$1,
+ forEachOf: eachOf,
+ forEachOfSeries: eachOfSeries,
+ forEachOfLimit: eachOfLimit,
+ inject: reduce,
+ foldl: reduce,
+ foldr: reduceRight,
+ select: filter,
+ selectLimit: filterLimit,
+ selectSeries: filterSeries,
+ wrapSync: asyncify
+ }
+ ;(exports.default = index),
+ (exports.applyEach = applyEach),
+ (exports.applyEachSeries = applyEachSeries),
+ (exports.apply = apply$2),
+ (exports.asyncify = asyncify),
+ (exports.auto = auto),
+ (exports.autoInject = autoInject),
+ (exports.cargo = cargo),
+ (exports.compose = compose),
+ (exports.concat = concat),
+ (exports.concatSeries = concatSeries),
+ (exports.constant = constant),
+ (exports.detect = detect),
+ (exports.detectLimit = detectLimit),
+ (exports.detectSeries = detectSeries),
+ (exports.dir = dir),
+ (exports.doDuring = doDuring),
+ (exports.doUntil = doUntil),
+ (exports.doWhilst = doWhilst),
+ (exports.during = during),
+ (exports.each = eachLimit),
+ (exports.eachLimit = eachLimit$1),
+ (exports.eachOf = eachOf),
+ (exports.eachOfLimit = eachOfLimit),
+ (exports.eachOfSeries = eachOfSeries),
+ (exports.eachSeries = eachSeries),
+ (exports.ensureAsync = ensureAsync),
+ (exports.every = every),
+ (exports.everyLimit = everyLimit),
+ (exports.everySeries = everySeries),
+ (exports.filter = filter),
+ (exports.filterLimit = filterLimit),
+ (exports.filterSeries = filterSeries),
+ (exports.forever = forever),
+ (exports.log = log),
+ (exports.map = map),
+ (exports.mapLimit = mapLimit),
+ (exports.mapSeries = mapSeries),
+ (exports.mapValues = mapValues),
+ (exports.mapValuesLimit = mapValuesLimit),
+ (exports.mapValuesSeries = mapValuesSeries),
+ (exports.memoize = memoize),
+ (exports.nextTick = nextTick),
+ (exports.parallel = parallelLimit),
+ (exports.parallelLimit = parallelLimit$1),
+ (exports.priorityQueue = priorityQueue),
+ (exports.queue = queue$1),
+ (exports.race = race),
+ (exports.reduce = reduce),
+ (exports.reduceRight = reduceRight),
+ (exports.reflect = reflect),
+ (exports.reflectAll = reflectAll),
+ (exports.reject = reject),
+ (exports.rejectLimit = rejectLimit),
+ (exports.rejectSeries = rejectSeries),
+ (exports.retry = retry),
+ (exports.retryable = retryable),
+ (exports.seq = seq$1),
+ (exports.series = series),
+ (exports.setImmediate = setImmediate$1),
+ (exports.some = some),
+ (exports.someLimit = someLimit),
+ (exports.someSeries = someSeries),
+ (exports.sortBy = sortBy),
+ (exports.timeout = timeout),
+ (exports.times = times),
+ (exports.timesLimit = timeLimit),
+ (exports.timesSeries = timesSeries),
+ (exports.transform = transform),
+ (exports.unmemoize = unmemoize),
+ (exports.until = until),
+ (exports.waterfall = waterfall),
+ (exports.whilst = whilst),
+ (exports.all = every),
+ (exports.allLimit = everyLimit),
+ (exports.allSeries = everySeries),
+ (exports.any = some),
+ (exports.anyLimit = someLimit),
+ (exports.anySeries = someSeries),
+ (exports.find = detect),
+ (exports.findLimit = detectLimit),
+ (exports.findSeries = detectSeries),
+ (exports.forEach = eachLimit),
+ (exports.forEachSeries = eachSeries),
+ (exports.forEachLimit = eachLimit$1),
+ (exports.forEachOf = eachOf),
+ (exports.forEachOfSeries = eachOfSeries),
+ (exports.forEachOfLimit = eachOfLimit),
+ (exports.inject = reduce),
+ (exports.foldl = reduce),
+ (exports.foldr = reduceRight),
+ (exports.select = filter),
+ (exports.selectLimit = filterLimit),
+ (exports.selectSeries = filterSeries),
+ (exports.wrapSync = asyncify),
+ Object.defineProperty(exports, '__esModule', { value: !0 })
+ })(exports)
+ }.call(
+ this,
+ __webpack_require__(6),
+ __webpack_require__(10)(module),
+ __webpack_require__(7),
+ __webpack_require__(33)
+ ))
+ },
+ function (module, exports, __webpack_require__) {
+ 'use strict'
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__
+ ;(__WEBPACK_AMD_DEFINE_ARRAY__ = [
+ __webpack_require__(0),
+ __webpack_require__(1),
+ __webpack_require__(5),
+ __webpack_require__(4),
+ __webpack_require__(17),
+ __webpack_require__(30),
+ __webpack_require__(24),
+ __webpack_require__(11),
+ __webpack_require__(31),
+ __webpack_require__(32),
+ __webpack_require__(18),
+ __webpack_require__(19),
+ __webpack_require__(7),
+ __webpack_require__(12),
+ __webpack_require__(25),
+ __webpack_require__(20),
+ __webpack_require__(21),
+ __webpack_require__(23),
+ __webpack_require__(26)
+ ]),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function (
+ $,
+ _,
+ moment,
+ UIkit,
+ CountUp,
+ Waves,
+ Selectize,
+ Snackbar,
+ ROLES,
+ Cookies,
+ Tether
+ ) {
+ var helpers = {},
+ easingSwiftOut = [0.4, 0, 0.2, 1]
+ function updateInput (object) {
+ object
+ .closest('.uk-input-group')
+ .removeClass('uk-input-group-danger uk-input-group-success uk-input-group-nocolor'),
+ object
+ .closest('.md-input-wrapper')
+ .removeClass(
+ 'md-input-wrapper-danger md-input-wrapper-success uk-input-wrapper-nocolor md-input-wrapper-disabled'
+ ),
+ object.hasClass('md-input-danger') &&
+ (object.closest('.uk-input-group').length &&
+ object.closest('.uk-input-group').addClass('uk-input-group-danger'),
+ object.closest('.md-input-wrapper').addClass('md-input-wrapper-danger')),
+ object.hasClass('md-input-success') &&
+ (object.closest('.uk-input-group').length &&
+ object.closest('.uk-input-group').addClass('uk-input-group-success'),
+ object.closest('.md-input-wrapper').addClass('md-input-wrapper-success')),
+ object.hasClass('md-input-nocolor') &&
+ (object.closest('.uk-input-group').length &&
+ object.closest('.uk-input-group').addClass('uk-input-group-nocolor'),
+ object.closest('.md-input-wrapper').addClass('md-input-wrapper-nocolor')),
+ object.prop('disabled') && object.closest('.md-input-wrapper').addClass('md-input-wrapper-disabled'),
+ object.hasClass('label-fixed') && object.closest('.md-input-wrapper').addClass('md-input-filled'),
+ '' !== object.val() && object.closest('.md-input-wrapper').addClass('md-input-filled')
+ }
+ function flashTimeout () {
+ var flashText = $('.flash-message').find('.flash-text')
+ flashText.length < 1 ||
+ flashText.stop().animate({ top: '-50px' }, 500, function () {
+ $('.flash-message').hide()
+ })
+ }
+ function newMessageSubmit (e) {
+ e.preventDefault()
+ var form = $('#newMessageForm'),
+ formData = form.serializeObject()
+ if (!form.isValid(null, null, !1)) return !0
+ var data = {
+ to: formData.newMessageTo,
+ from: formData.from,
+ subject: formData.newMessageSubject,
+ message: formData.newMessageText
+ }
+ $.ajax({
+ method: 'POST',
+ url: '/api/v1/messages/send',
+ data: JSON.stringify(data),
+ processData: !1,
+ contentType: 'application/json; charset=utf-8',
+ dataType: 'json'
+ })
+ .success(function () {
+ helpers.UI.showSnackbar({ text: 'Message Sent' }), helpers.closeMessageWindow()
+ })
+ .error(function (err) {
+ helpers.closeMessageWindow(),
+ helpers.UI.showSnackbar({ text: err.error, actionTextColor: '#B92929' }),
+ console.log('[trudesk:helpers:newMessageSubmit] Error - ' + err)
+ })
+ }
+ return (
+ (helpers.loaded = !1),
+ (helpers.init = function (reload) {
+ reload && (this.loaded = !1),
+ this.loaded && console.warn('Helpers already loaded. Possible double load.'),
+ this.prototypes(),
+ this.setTimezone(),
+ this.resizeFullHeight(),
+ this.setupScrollers(),
+ this.formvalidator(),
+ this.pToolTip(),
+ this.setupDonutchart(),
+ this.setupBarChart(),
+ this.actionButtons(),
+ this.bindKeys(),
+ this.ajaxFormSubmit(),
+ this.setupChosen(),
+ this.bindNewMessageSubmit(),
+ this.jsPreventDefault(),
+ this.UI.initSidebar(),
+ this.UI.bindExpand(),
+ this.UI.setupSidebarTether(),
+ this.UI.bindAccordion(),
+ this.UI.fabToolbar(),
+ this.UI.fabSheet(),
+ this.UI.inputs(),
+ this.UI.cardOverlay(),
+ this.UI.setupPeity(),
+ this.UI.selectize(),
+ this.UI.multiSelect(),
+ this.UI.waves(),
+ this.UI.matchHeight(),
+ this.UI.onlineUserSearch()
+ var layout = this.onWindowResize()
+ layout(), $(window).resize(layout), (this.loaded = !0)
+ }),
+ (helpers.countUpMe = function () {
+ $('.countUpMe').each(function () {
+ var countTo = $(this).text()
+ new CountUp(this, 0, countTo, 0, 2).start()
+ })
+ }),
+ (helpers.jsPreventDefault = function () {
+ $('.js-prevent-default').each(function () {
+ $(this).on('click', function (event) {
+ event.preventDefault()
+ })
+ })
+ }),
+ (helpers.UI = {}),
+ (helpers.UI.playSound = function (soundId) {
+ var audio = $('audio#' + soundId + '_audio')
+ audio.length > 0 && audio.trigger('play')
+ }),
+ (helpers.UI.bindAccordion = function () {
+ $('li[data-nav-accordion]').each(function () {
+ if (
+ $(this).hasClass('active') &&
+ $(this)
+ .parents('.sidebar')
+ .hasClass('expand')
+ ) {
+ $(this).addClass('hasSubMenuOpen')
+ var subMenu = $(this).find('#' + $(this).attr('data-nav-accordion-target'))
+ subMenu.length > 0 && subMenu.addClass('subMenuOpen')
+ }
+ var $this = $(this).find('> a')
+ $this.off('click'),
+ $this.on('click', function (e) {
+ if (
+ (e.preventDefault(),
+ e.stopPropagation(),
+ !$(this)
+ .parents('.sidebar')
+ .hasClass('expand'))
+ ) {
+ var href = $(this).attr('href')
+ return '#' !== href && History.pushState(null, null, href), !0
+ }
+ $('li[data-nav-accordion].hasSubMenuOpen').each(function () {
+ $('#' + $(this).attr('data-nav-accordion-target')).removeClass('subMenuOpen'),
+ $(this).removeClass('hasSubMenuOpen')
+ })
+ var $target = $('#' + $this.parent('li').attr('data-nav-accordion-target'))
+ $target.length > 0 &&
+ ($target.toggleClass('subMenuOpen'),
+ $(this)
+ .parent('li.hasSubMenu')
+ .toggleClass('hasSubMenuOpen'))
+ })
+ })
+ }),
+ (helpers.UI.expandSidebar = function () {
+ var $sidebar = $('.sidebar')
+ $sidebar.addClass('no-animation expand'),
+ $('#page-content').addClass('no-animation expanded-sidebar'),
+ setTimeout(function () {
+ $sidebar.removeClass('no-animation'), $('#page-content').removeClass('no-animation')
+ }, 500)
+ }),
+ (helpers.UI.toggleSidebar = function () {
+ var $sidebar = $('.sidebar')
+ $sidebar.toggleClass('expand'),
+ $('#page-content').toggleClass('expanded-sidebar'),
+ $sidebar.hasClass('expand')
+ ? ($('.sidebar')
+ .find('.tether-element.tether-enabled')
+ .hide(),
+ $sidebar.find('li[data-nav-accordion-target].active').addClass('hasSubMenuOpen'),
+ $sidebar.find('li[data-nav-accordion-target].active > ul').addClass('subMenuOpen'))
+ : (setTimeout(function () {
+ Tether.position(),
+ $('.sidebar')
+ .find('.tether-element.tether-enabled')
+ .show()
+ }, 500),
+ $sidebar.find('li[data-nav-accordion-target]').removeClass('hasSubMenuOpen'),
+ $sidebar.find('ul.side-nav-accordion.side-nav-sub').removeClass('subMenuOpen'))
+ }),
+ (helpers.UI.bindExpand = function () {
+ var menuButton = $('#expand-menu')
+ menuButton.length > 0 &&
+ (menuButton.off('click'),
+ menuButton.on('click', function (e) {
+ e.preventDefault(),
+ helpers.UI.toggleSidebar(),
+ $('.sidebar').hasClass('expand')
+ ? Cookies.set('$trudesk:sidebar:expanded', !0, { expires: 999 })
+ : Cookies.set('$trudesk:sidebar:expanded', !1, { expires: 999 })
+ }))
+ }),
+ (helpers.UI.initSidebar = function () {
+ 'true' === Cookies.get('$trudesk:sidebar:expanded') && helpers.UI.expandSidebar()
+ }),
+ (helpers.UI.tooltipSidebar = function () {
+ $('.sidebar')
+ .find('a[data-uk-tooltip]')
+ .each(function () {
+ $(this).attr('style', 'padding: 0 !important; font-size: 0 !important;')
+ })
+ }),
+ (helpers.UI.setupSidebarTether = function () {
+ _.each(
+ [
+ { element: '#side-nav-sub-tickets', target: 'tickets' },
+ { element: '#side-nav-sub-reports', target: 'reports' },
+ { element: '#side-nav-sub-settings', target: 'settings' }
+ ],
+ function (item) {
+ var element = $('.sidebar-to-right').find(item.element)
+ if (!(element.length < 1)) {
+ var sidebar = $('.sidebar'),
+ target = sidebar.find('li[data-nav-id="' + item.target + '"]')
+ if (!(target.length < 1)) {
+ helpers.UI.sidebarTether(element, target)
+ var isInside = !1
+ target.on('mouseover', function () {
+ sidebar.hasClass('expand')
+ ? (element.removeClass('sub-menu-right-open'), (isInside = !1))
+ : (element.addClass('sub-menu-right-open'), (isInside = !0))
+ }),
+ target.on('mouseleave', function () {
+ ;(isInside = !1),
+ setTimeout(function () {
+ isInside || element.removeClass('sub-menu-right-open')
+ }, 100)
+ }),
+ element.on('mouseover', function () {
+ isInside = !0
+ }),
+ element.on('mouseleave', function () {
+ ;(isInside = !1),
+ setTimeout(function () {
+ isInside || element.removeClass('sub-menu-right-open')
+ }, 100)
+ })
+ }
+ }
+ }
+ )
+ }),
+ (helpers.UI.sidebarTether = function (element, target) {
+ _.isUndefined(element) ||
+ _.isUndefined(target) ||
+ element.length < 1 ||
+ target.length < 1 ||
+ new Tether({ element, target, attachment: 'top left', targetAttachment: 'top right', offset: '0 -3px' })
+ }),
+ (helpers.UI.setNavItem = function (id) {
+ var $sidebar = $('.sidebar')
+ $sidebar.find('li.active').removeClass('active'),
+ $sidebar.find('li[data-nav-id="' + id.toLowerCase() + '"]').addClass('active')
+ }),
+ (helpers.UI.onlineUserSearch = function () {
+ function onSearchKeyUp () {
+ var searchTerm = $('.online-list-search-box')
+ .find('input')
+ .val()
+ .toLowerCase()
+ $('.user-list li').each(function () {
+ $(this).filter('[data-search-term *= ' + searchTerm + ']').length > 0 || searchTerm.length < 1
+ ? $(this).show()
+ : $(this).hide()
+ })
+ }
+ $(document).off('keyup', '.online-list-search-box input[type="text"]', onSearchKeyUp),
+ $(document).on('keyup', '.online-list-search-box input[type="text"]', onSearchKeyUp)
+ }),
+ (helpers.UI.matchHeight = function () {
+ $('div[data-match-height]').each(function () {
+ var self = $(this),
+ target = self.attr('data-match-height'),
+ $targetHeight = $(target).height()
+ self.height($targetHeight)
+ })
+ }),
+ (helpers.UI.showDisconnectedOverlay = function () {
+ setTimeout(function () {
+ var $disconnected = $('.disconnected')
+ if ('block' === $disconnected.css('display')) return !0
+ $disconnected.velocity('fadeIn', {
+ duration: 500,
+ easing: easingSwiftOut,
+ begin: function () {
+ $disconnected.css({ display: 'block', opacity: 0 })
+ }
+ })
+ }, 500)
+ }),
+ (helpers.UI.hideDisconnectedOverlay = function () {
+ var $disconnected = $('.disconnected')
+ if ('none' === $disconnected.css('display')) return !0
+ $disconnected.velocity('fadeOut', {
+ duration: 500,
+ easing: easingSwiftOut,
+ complete: function () {
+ $disconnected.css({ display: 'none', opacity: 0 })
+ }
+ })
+ }),
+ (helpers.UI.showSnackbar = function () {
+ return 1 === arguments.length && _.isObject(arguments[0])
+ ? helpers.UI.showSnackbar_.apply(this, arguments)
+ : helpers.UI.showSnackbar__.apply(this, arguments)
+ }),
+ (helpers.UI.showSnackbar_ = function (options) {
+ Snackbar.show(options)
+ }),
+ (helpers.UI.showSnackbar__ = function (text, error) {
+ ;(_.isUndefined(error) || _.isNull(error)) && (error = !1)
+ var actionText = '#4CAF50'
+ error && (actionText = '#FF4835'), Snackbar.show({ text, actionTextColor: actionText })
+ }),
+ (helpers.UI.closeSnackbar = function () {
+ Snackbar.close()
+ }),
+ (helpers.UI.inputs = function (parent) {
+ ;(void 0 === parent ? $('.md-input') : $(parent).find('.md-input')).each(function () {
+ if (!$(this).closest('.md-input-wrapper').length) {
+ var $this = $(this)
+ $this.prev('label').length
+ ? $this
+ .prev('label')
+ .andSelf()
+ .wrapAll('
')
+ : $this.siblings('[data-uk-form-password]').length
+ ? $this
+ .siblings('[data-uk-form-password]')
+ .andSelf()
+ .wrapAll('
')
+ : $this.wrap('
'),
+ $this.closest('.md-input-wrapper').append('
'),
+ updateInput($this)
+ }
+ $('body')
+ .on('focus', '.md-input', function () {
+ $(this)
+ .closest('.md-input-wrapper')
+ .addClass('md-input-focus')
+ })
+ .on('blur', '.md-input', function () {
+ $(this)
+ .closest('.md-input-wrapper')
+ .removeClass('md-input-focus'),
+ $(this).hasClass('label-fixed') ||
+ ('' !== $(this).val()
+ ? $(this)
+ .closest('.md-input-wrapper')
+ .addClass('md-input-filled')
+ : $(this)
+ .closest('.md-input-wrapper')
+ .removeClass('md-input-filled'))
+ })
+ .on('change', '.md-input', function () {
+ updateInput($(this))
+ }),
+ $('.search-input')
+ .focus(function () {
+ $(this)
+ .parent()
+ .addClass('focus')
+ })
+ .blur(function () {
+ $(this)
+ .parent()
+ .removeClass('focus')
+ })
+ })
+ }),
+ (helpers.UI.reRenderInputs = function () {
+ $('.md-input').each(function () {
+ updateInput($(this))
+ })
+ }),
+ (helpers.UI.fabToolbar = function () {
+ var $fabToolbar = $('.md-fab-toolbar')
+ $fabToolbar &&
+ ($fabToolbar.children('i').on('click', function (e) {
+ e.preventDefault()
+ var toolbarItems = $fabToolbar.children('.md-fab-toolbar-actions').children().length
+ $fabToolbar.addClass('md-fab-animated')
+ var fabPadding = $fabToolbar.hasClass('md-fab-small') ? 24 : 16,
+ fabSize = $fabToolbar.hasClass('md-fab-small') ? 44 : 64
+ setTimeout(function () {
+ $fabToolbar.width(toolbarItems * fabSize + fabPadding)
+ }, 140),
+ setTimeout(function () {
+ $fabToolbar.addClass('md-fab-active')
+ }, 420)
+ }),
+ $('.page-content').on('scroll', function (e) {
+ $fabToolbar.hasClass('md-fab-active') &&
+ ($(e.target).closest($fabToolbar).length ||
+ ($fabToolbar.css({ height: '', width: '' }).removeClass('md-fab-active'),
+ setTimeout(function () {
+ $fabToolbar.removeClass('md-fab-animated')
+ }, 140)))
+ }),
+ $(document).on('click scroll', function (e) {
+ $fabToolbar.hasClass('md-fab-active') &&
+ ($(e.target).closest($fabToolbar).length ||
+ ($fabToolbar.css('width', '').removeClass('md-fab-active'),
+ setTimeout(function () {
+ $fabToolbar.removeClass('md-fab-animated')
+ }, 140)))
+ }))
+ }),
+ (helpers.UI.fabSheet = function () {
+ var $fabSheet = $('.md-fab-sheet')
+ $fabSheet &&
+ ($fabSheet.children('i').on('click', function (e) {
+ e.preventDefault()
+ var sheetItems = $fabSheet.children('.md-fab-sheet-actions').children('a').length
+ $fabSheet.addClass('md-fab-animated'),
+ setTimeout(function () {
+ $fabSheet.width('240px').height(40 * sheetItems + 8)
+ }, 140),
+ setTimeout(function () {
+ $fabSheet.addClass('md-fab-active')
+ }, 280)
+ }),
+ $fabSheet
+ .children('.md-fab-sheet-actions')
+ .children('a')
+ .on('click', function () {
+ $fabSheet.hasClass('md-fab-active') &&
+ ($fabSheet.css({ height: '', width: '' }).removeClass('md-fab-active'),
+ setTimeout(function () {
+ $fabSheet.removeClass('md-fab-animated')
+ }, 140))
+ }),
+ $('.page-content').on('scroll', function (e) {
+ $fabSheet.hasClass('md-fab-active') &&
+ ($(e.target).closest($fabSheet).length ||
+ ($fabSheet.css({ height: '', width: '' }).removeClass('md-fab-active'),
+ setTimeout(function () {
+ $fabSheet.removeClass('md-fab-animated')
+ }, 140)))
+ }),
+ $(document).on('click scroll', function (e) {
+ $fabSheet.hasClass('md-fab-active') &&
+ ($(e.target).closest($fabSheet).length ||
+ ($fabSheet.css({ height: '', width: '' }).removeClass('md-fab-active'),
+ setTimeout(function () {
+ $fabSheet.removeClass('md-fab-animated')
+ }, 140)))
+ }))
+ }),
+ (helpers.UI.waves = function () {
+ Waves.attach('.md-btn-wave,.md-fab-wave', ['waves-button']),
+ Waves.attach('.md-btn-wave-light,.md-fab-wave-light', ['waves-button', 'waves-light']),
+ Waves.attach('.wave-box', ['waves-float']),
+ Waves.init({ delay: 300 })
+ }),
+ (helpers.UI.selectize = function (parent) {
+ void 0 !== $.fn.selectize &&
+ Selectize.define('dropdown_after', function () {
+ this.positionDropdown = function () {
+ var $control = this.$control,
+ position = $control.position(),
+ paddingLeft = position.left,
+ paddingTop = position.top + $control.outerHeight(!0) + 32
+ this.$dropdown.css({ width: $control.outerWidth(), top: paddingTop, left: paddingLeft })
+ }
+ }),
+ (parent ? $(parent).find('select') : $('[data-md-selectize],.data-md-selectize')).each(function () {
+ var $this = $(this)
+ if (!$this.hasClass('selectized')) {
+ var thisPosBottom = $this.attr('data-md-selectize-bottom'),
+ posTopOffset = $this.attr('data-md-selectize-top-offset'),
+ closeOnSelect =
+ 'undefined' !== $this.attr('data-md-selectize-closeOnSelect') &&
+ $this.attr('data-md-selectize-closeOnSelect')
+ $this.after('
').selectize({
+ plugins: ['remove_button'],
+ hideSelected: !0,
+ dropdownParent: 'body',
+ closeAfterSelect: closeOnSelect,
+ onDropdownOpen: function ($dropdown) {
+ $dropdown.hide().velocity('slideDown', {
+ begin: function () {
+ void 0 !== thisPosBottom &&
+ ($dropdown.css({ 'margin-top': '0' }),
+ void 0 !== posTopOffset && $dropdown.css({ 'margin-top': posTopOffset + 'px' }))
+ },
+ duration: 200,
+ easing: easingSwiftOut
+ })
+ },
+ onDropdownClose: function ($dropdown) {
+ $dropdown.show().velocity('slideUp', {
+ complete: function () {
+ void 0 !== thisPosBottom && $dropdown.css({ 'margin-top': '' }),
+ closeOnSelect &&
+ $($dropdown)
+ .prev()
+ .find('input')
+ .blur()
+ },
+ duration: 200,
+ easing: easingSwiftOut
+ })
+ }
+ })
+ }
+ }),
+ $('[data-md-selectize-inline]').each(function () {
+ var $this = $(this)
+ if (!$this.hasClass('selectized')) {
+ var thisPosBottom = $this.attr('data-md-selectize-bottom'),
+ posTopOffset = $this.attr('data-md-selectize-top-offset'),
+ closeOnSelect =
+ 'undefined' !== $this.attr('data-md-selectize-closeOnSelect') &&
+ $this.attr('data-md-selectize-closeOnSelect'),
+ maxOptions =
+ 'undefined' !== $this.attr('data-md-selectize-maxOptions')
+ ? $this.attr('data-md-selectize-maxOptions')
+ : 1e3
+ $this
+ .after('
')
+ .closest('div')
+ .addClass('uk-position-relative')
+ .end()
+ .selectize({
+ plugins: ['dropdown_after', 'remove_button'],
+ dropdownParent: $this.closest('div'),
+ hideSelected: !0,
+ closeAfterSelect: closeOnSelect,
+ maxOptions,
+ onDropdownOpen: function ($dropdown) {
+ $dropdown.hide().velocity('slideDown', {
+ begin: function () {
+ void 0 !== thisPosBottom &&
+ ($dropdown.css({ 'margin-top': '0' }),
+ void 0 !== posTopOffset && $dropdown.css({ 'margin-top': posTopOffset + 'px' }))
+ },
+ duration: 200,
+ easing: easingSwiftOut
+ })
+ },
+ onDropdownClose: function ($dropdown) {
+ $dropdown.show().velocity('slideUp', {
+ complete: function () {
+ void 0 !== thisPosBottom && $dropdown.css({ 'margin-top': '' }),
+ closeOnSelect &&
+ $($dropdown)
+ .prev()
+ .find('input')
+ .blur()
+ },
+ duration: 200,
+ easing: easingSwiftOut
+ })
+ }
+ })
+ }
+ })
+ }),
+ (helpers.UI.multiSelect = function () {
+ $('.multiselect').each(function () {
+ $(this).multiSelect()
+ })
+ }),
+ (helpers.UI.cardShow = function () {
+ $('.tru-card-intro').each(function () {
+ $(this).velocity({ scale: 0.99999999, opacity: 1 }, { duration: 400, easing: easingSwiftOut })
+ })
+ }),
+ (helpers.UI.cardOverlay = function () {
+ var $truCard = $('.tru-card')
+ $truCard.each(function () {
+ var $this = $(this)
+ $this.hasClass('tru-card-overlay-active') && $this.find('.tru-card-overlay-toggler').html('close')
+ }),
+ $truCard.on('click', '.tru-card-overlay-toggler', function (e) {
+ e.preventDefault(),
+ $(this)
+ .closest('.tru-card')
+ .hasClass('tru-card-overlay-active')
+ ? $(this)
+ .html('more_vert')
+ .closest('.tru-card')
+ .removeClass('tru-card-overlay-active')
+ : $(this)
+ .html('close')
+ .closest('.tru-card')
+ .addClass('tru-card-overlay-active')
+ })
+ }),
+ (helpers.UI.setupPeity = function () {
+ $('.peity-bar').each(function () {
+ $(this).peity('bar', { height: 28, width: 48, fill: ['#e74c3c'], padding: 0.2 })
+ }),
+ $('.peity-pie').each(function () {
+ $(this).peity('donut', { height: 24, width: 24, fill: ['#29b955', '#ccc'] })
+ }),
+ $('.peity-line').each(function () {
+ $(this).peity('line', { height: 28, width: 64, fill: '#d1e4f6', stroke: '#0288d1' })
+ })
+ }),
+ (helpers.closeNotificationsWindow = function () {
+ UIkit.modal('#viewAllNotificationsModal').hide()
+ }),
+ (helpers.showFlash = function (message, error, sticky) {
+ var flash = $('.flash-message')
+ if (flash.length < 1) return !0
+ var flashTO,
+ e = !!error,
+ s = !!sticky,
+ flashText = flash.find('.flash-text')
+ if (
+ (flashText.html(message),
+ e ? flashText.css('background', '#de4d4d') : flashText.css('background', '#29b955'),
+ s && (flash.off('mouseout'), flash.off('mouseover')),
+ s ||
+ (flash.mouseout(function () {
+ flashTO = setTimeout(flashTimeout, 2e3)
+ }),
+ flash.mouseover(function () {
+ clearTimeout(flashTO)
+ })),
+ flashText.is(':visible'))
+ )
+ return !0
+ flashText.css('top', '-50px'),
+ flash.show(),
+ flashTO && clearTimeout(flashTO),
+ flashText.stop().animate({ top: '0' }, 500, function () {
+ s || (flashTO = setTimeout(flashTimeout, 2e3))
+ })
+ }),
+ (helpers.clearFlash = function () {
+ flashTimeout()
+ }),
+ (helpers.formvalidator = function () {
+ $.validate({ errorElementClass: 'uk-form-danger', errorMessageClass: 'uk-form-danger' })
+ }),
+ (helpers.bindKeys = function () {
+ var ticketIssue = $('#createTicketForm').find('textarea#issue')
+ ticketIssue.length > 0 &&
+ (ticketIssue.off('keydown'),
+ ticketIssue.on('keydown', function (e) {
+ var keyCode = e.which ? e.which : e.keyCode
+ ;(10 === keyCode || (13 === keyCode && e.ctrlKey)) && $('#saveTicketBtn').trigger('click')
+ }))
+ var keyBindEnter = $('*[data-keyBindSubmit]')
+ keyBindEnter.length > 0 &&
+ $.each(keyBindEnter, function (k, val) {
+ var item = $(val)
+ if (!(item.length < 1)) {
+ item.off('keydown')
+ var actionItem = item.attr('data-keyBindSubmit')
+ if (actionItem.length > 0) {
+ var itemObj = $(actionItem)
+ itemObj.length > 0 &&
+ item.on('keydown', function (e) {
+ var keyCode = e.which ? e.which : e.keyCode
+ ;(10 === keyCode || (13 === keyCode && e.ctrlKey)) && itemObj.trigger('click')
+ })
+ }
+ }
+ })
+ }),
+ (helpers.onWindowResize = function () {
+ var self = this
+ return _.debounce(function () {
+ $('body > .side-nav-sub.tether-element').each(function () {
+ $(this).remove()
+ }),
+ self.resizeFullHeight(),
+ self.hideAllpDropDowns(),
+ self.resizeDataTables('.ticketList'),
+ self.resizeDataTables('.tagsList')
+ }, 100)
+ }),
+ (helpers.setupScrollers = function () {
+ $('.scrollable').css({ 'overflow-y': 'auto', 'overflow-x': 'hidden' }),
+ $('.scrollable-dark').css({ 'overflow-y': 'auto', 'overflow-x': 'hidden' })
+ }),
+ (helpers.scrollToBottom = function (jqueryObject, animate) {
+ if (_.isUndefined(jqueryObject) || jqueryObject.length < 1) return !0
+ _.isUndefined(animate) && (animate = !1),
+ jqueryObject.jquery || (jqueryObject = $(jqueryObject)),
+ animate
+ ? jqueryObject.animate({ scrollTop: jqueryObject[0].scrollHeight }, 1e3)
+ : jqueryObject.scrollTop(jqueryObject[0].scrollHeight)
+ }),
+ (helpers.resizeAll = function () {
+ var self = this
+ _.debounce(function () {
+ self.resizeFullHeight(),
+ self.UI.matchHeight(),
+ self.hideAllpDropDowns(),
+ self.resizeDataTables('.ticketList'),
+ self.resizeDataTables('.tagsList')
+ }, 100)()
+ }),
+ (helpers.resizeFullHeight = function () {
+ var ele = $('.full-height')
+ $.each(ele, function () {
+ var self = $(this)
+ ele.ready(function () {
+ var h = $(window).height()
+ 'solid' === self.css('borderTopStyle') && (h -= 1)
+ var dataOffset = self.attr('data-offset')
+ _.isUndefined(dataOffset) || (h -= dataOffset), self.height(h - self.offset().top)
+ })
+ })
+ }),
+ (helpers.resizeDataTables = function (selector, hasFooter) {
+ if (_.isUndefined(selector)) return !0
+ _.isUndefined(hasFooter) && (hasFooter = !1),
+ $(document).ready(function () {
+ var $selector = $(selector),
+ scroller = $selector.find('.dataTables_scrollBody')
+ if (0 !== scroller.length) {
+ var tableHead = $selector.find('.dataTables_scrollHead'),
+ optionsHead = $selector.find('.table-options'),
+ hasFilter = $selector.find('.dataTables_filter'),
+ headHeight = 0
+ 0 !== optionsHead.length
+ ? (headHeight = optionsHead.height())
+ : 0 !== hasFilter.length && (headHeight = hasFilter.height())
+ var footerHeight = 0
+ hasFooter && (footerHeight = tableHead.height()),
+ scroller.css({
+ height: $selector.height() - tableHead.height() - headHeight - footerHeight + 'px'
+ })
+ }
+ })
+ }),
+ (helpers.hideAllpDropDowns = function () {
+ $('a[data-notifications]').each(function () {
+ var drop = $('#' + $(this).attr('data-notifications'))
+ drop.hasClass('pDropOpen') && drop.removeClass('pDropOpen')
+ })
+ }),
+ (helpers.hideAllUiKitDropdowns = function () {
+ $('.uk-dropdown').each(function () {
+ var thisDropdown = $(this)
+ thisDropdown.removeClass('uk-dropdown-shown'),
+ setTimeout(function () {
+ thisDropdown.removeClass('uk-dropdown-active'),
+ thisDropdown
+ .parents('*[data-uk-dropdown]')
+ .removeClass('uk-open')
+ .attr('aria-expanded', !1)
+ }, 280)
+ })
+ }),
+ (helpers.pToolTip = function () {
+ $(document).ready(function () {
+ var pToolTip = $('span[data-ptooltip]')
+ pToolTip.each(function () {
+ var title = $(this).attr('data-title'),
+ type = $(this).attr('data-ptooltip-type'),
+ html =
+ "
'
+ var k = $('
').css({ position: 'relative' })
+ k.append(html), $(this).append(k)
+ }),
+ pToolTip.hover(
+ function () {
+ var id = $(this).attr('id')
+ $('div.ptooltip-box-wrap[data-ptooltip-id="' + id + '"]').show()
+ },
+ function () {
+ var id = $(this).attr('id')
+ $('div.ptooltip-box-wrap[data-ptooltip-id="' + id + '"]').hide()
+ }
+ )
+ })
+ }),
+ (helpers.setupDonutchart = function () {
+ $(document).ready(function () {
+ $('.donutchart').each(function () {
+ var trackColor = $(this).attr('data-trackColor')
+ ;(null === trackColor || trackColor.length <= 0) && (trackColor = '#e74c3c')
+ var numCount = $(this).attr('data-numcount')
+ ;(null === numCount || numCount.length <= 0) && (numCount = !1)
+ var $size = $(this).attr('data-size')
+ ;(null === $size || $size.length <= 0) && ($size = 150),
+ $(this).css({ height: $size, width: $size }),
+ $(this).easyPieChart({
+ size: $size,
+ lineCap: 'round',
+ lineWidth: 8,
+ scaleColor: !1,
+ barColor: trackColor,
+ trackColor: '#e3e5e8',
+ onStart: function (value) {
+ $(this.el)
+ .find('.chart-value')
+ .text(value)
+ },
+ onStop: function (value, to) {
+ if (numCount) {
+ var totalNum = parseInt($(this.el).attr('data-totalNumCount'))
+ return (
+ !(totalNum <= 0) &&
+ ($(this.el)
+ .find('.chart-value')
+ .text(totalNum),
+ !0)
+ )
+ }
+ to === 1 / 0 && (to = 0),
+ $(this.el)
+ .find('.chart-value')
+ .text(Math.round(to))
+ },
+ onStep: function (from, to, percent) {
+ if (numCount) {
+ var countVal = parseInt($(this.el).attr('data-totalNumCount'))
+ if (countVal <= 0) return !1
+ var current = parseInt(
+ $(this.el)
+ .find('.chart-value')
+ .text()
+ )
+ if (null !== countVal && countVal > 0 && null !== current) {
+ var val = Math.round(countVal * (100 / Math.round(to))) * (0.01 * Math.round(percent)),
+ final = Math.round(val)
+ return (
+ !!isNaN(final) ||
+ ($(this.el)
+ .find('.chart-value')
+ .text(final),
+ !0)
+ )
+ }
+ }
+ percent === 1 / 0 && (percent = 0),
+ $(this.el)
+ .find('.chart-value')
+ .text(Math.round(percent))
+ }
+ })
+ })
+ })
+ }),
+ (helpers.setupBarChart = function () {
+ $(document).ready(function () {
+ $('.bar-chart > .bar').each(function () {
+ var $this = $(this),
+ i = 0.01 * $this.attr('data-percent') * 170
+ $this
+ .find('span.bar-track')
+ .height(0)
+ .animate({ height: i }, 1e3)
+ })
+ })
+ }),
+ (helpers.actionButtons = function () {
+ $(document).ready(function () {
+ $('*[data-action]').each(function () {
+ var self = $(this),
+ action = self.attr('data-action')
+ if ('submit' === action.toLowerCase()) {
+ var formId = self.attr('data-form')
+ if (!_.isUndefined(formId)) {
+ var form = $('#' + formId)
+ 0 !== form.length &&
+ self.click(function (e) {
+ form.submit()
+ var preventDefault = self.attr('data-preventDefault')
+ _.isUndefined(preventDefault) || preventDefault.length < 1
+ ? e.preventDefault()
+ : 'true' === preventDefault.toLowerCase() && e.preventDefault()
+ })
+ }
+ } else if ('scrolltobottom' === action.toLowerCase()) {
+ var targetScroll = self.attr('data-targetScroll')
+ if (!_.isUndefined(targetScroll)) {
+ var target = $(targetScroll)
+ 0 !== target.length &&
+ self.click(function (e) {
+ var animation = self.attr('data-action-animation')
+ _.isUndefined(animation) || 'false' !== animation.toLowerCase()
+ ? target.animate({ scrollTop: target[0].scrollHeight }, 1e3)
+ : target.animate({ scrollTop: target[0].scrollHeight }, 0)
+ var preventDefault = self.attr('data-preventDefault')
+ _.isUndefined(preventDefault) || preventDefault.length < 1
+ ? e.preventDefault()
+ : 'true' === preventDefault.toLowerCase() && e.preventDefault()
+ })
+ }
+ }
+ })
+ })
+ }),
+ (helpers.fadeOutLoader = function (time) {
+ _.isUndefined(time) && (time = 100),
+ $(document).ready(function () {
+ $('#loader').fadeOut(time)
+ })
+ }),
+ (helpers.hideLoader = function (time) {
+ ;(_.isUndefined(time) || _.isNull(time)) && (time = 280),
+ $(document).ready(function () {
+ $('#loader-wrapper').fadeOut(time)
+ })
+ }),
+ (helpers.showLoader = function (opacity) {
+ ;(_.isUndefined(opacity) || _.isNull(opacity)) && (opacity = 1)
+ var $loader = $('#loader-wrapper')
+ $loader.css({ opacity: 0, display: 'block' }), $loader.animate({ opacity }, 500)
+ }),
+ (helpers.ajaxFormSubmit = function () {
+ $('form.ajaxSubmit').each(function () {
+ var self = $(this)
+ self.submit(function (e) {
+ return (
+ $.ajax({
+ type: self.attr('method'),
+ url: self.attr('action'),
+ data: self.serialize(),
+ success: function () {
+ self.find('*[data-clearOnSubmit="true"]').each(function () {
+ $(this).val('')
+ })
+ }
+ }),
+ e.preventDefault(),
+ !1
+ )
+ })
+ })
+ }),
+ (helpers.setTimezone = function () {
+ var timezone,
+ $timezone = $('#__timezone')
+ if ($timezone.length < 1) Cookies.set('$trudesk:timezone', 'America/New_York')
+ else {
+ timezone = Cookies.get('$trudesk:timezone')
+ var __timezone = $timezone.text()
+ timezone
+ ? timezone !== __timezone && Cookies.set('$trudesk:timezone', __timezone)
+ : Cookies.set('$trudesk:timezone', __timezone)
+ }
+ ;(timezone = Cookies.get('$trudesk:timezone')), moment.tz.setDefault(timezone), $timezone.remove()
+ }),
+ (helpers.getTimezone = function () {
+ var timezone = Cookies.get('$trudesk:timezone')
+ return timezone || (timezone = 'America/New_York'), timezone
+ }),
+ (helpers.getTimeFormat = function () {
+ return window.trudeskSettingsService
+ ? window.trudeskSettingsService.getSettings().timeFormat.value
+ : 'hh:mma'
+ }),
+ (helpers.getCalendarDate = function (date) {
+ return (
+ moment.updateLocale('en', {
+ calendar: {
+ sameDay: '[Today at] LT',
+ lastDay: '[Yesterday at] LT',
+ nextDay: '[Tomorrow at] LT',
+ lastWeek: '[Last] ddd [at] LT',
+ nextWeek: 'ddd [at] LT',
+ sameElse: helpers.getShortDateFormat()
+ }
+ }),
+ moment
+ .utc(date)
+ .tz(this.getTimezone())
+ .calendar()
+ )
+ }),
+ (helpers.getShortDateFormat = function () {
+ return window.trudeskSettingsService
+ ? window.trudeskSettingsService.getSettings().shortDateFormat.value
+ : 'MM/DD/YYYY'
+ }),
+ (helpers.getLongDateFormat = function () {
+ return window.trudeskSettingsService
+ ? window.trudeskSettingsService.getSettings().longDateFormat.value
+ : 'MMM DD, YYYY'
+ }),
+ (helpers.formatDate = function (date, format) {
+ var timezone = this.getTimezone()
+ return (
+ timezone || (timezone = 'America/New_York'),
+ moment
+ .utc(date)
+ .tz(timezone)
+ .format(format)
+ )
+ }),
+ (helpers.setupChosen = function () {
+ $('.chosen-select').each(function () {
+ var self = $(this),
+ nosearch = $(this).attr('data-nosearch'),
+ placeholder = '',
+ elePlaceHolder = $(this).attr('data-placeholder'),
+ noResults = 'No Results Found For ',
+ eleNoResults = $(this).attr('data-noresults'),
+ searchNum = 10
+ nosearch && (searchNum = 9e4),
+ !_.isUndefined(elePlaceHolder) && elePlaceHolder.length > 0 && (placeholder = elePlaceHolder),
+ !_.isUndefined(eleNoResults) && eleNoResults.length > 0 && (noResults = eleNoResults),
+ self.chosen({
+ disable_search_threshold: searchNum,
+ placeholder_text_single: placeholder,
+ placeholder_text_multiple: placeholder,
+ no_results_text: noResults
+ })
+ })
+ }),
+ (helpers.clearMessageContent = function () {
+ var contentDiv = $('#message-content')
+ contentDiv.length > 0 && contentDiv.html('')
+ }),
+ (helpers.closeMessageWindow = function () {
+ UIkit.modal('#newMessageModal').hide()
+ var $newMessageTo = $('#newMessageTo')
+ $newMessageTo.find('option').prop('selected', !1),
+ $newMessageTo.trigger('chosen:updated'),
+ $('#newMessageSubject').val(''),
+ $('#newMessageText').val('')
+ }),
+ (helpers.bindNewMessageSubmit = function () {
+ var messageForm = $('#newMessageForm')
+ messageForm.length < 1 ||
+ (messageForm.unbind('submit', newMessageSubmit), messageForm.bind('submit', newMessageSubmit))
+ }),
+ (helpers.canUser = function (a) {
+ var role = window.trudeskSessionService.getUser().role
+ if (_.isUndefined(role)) return !1
+ var rolePerm = _.find(ROLES, { id: role })
+ if (_.isUndefined(rolePerm)) return !1
+ if ('*' === rolePerm.allowedAction) return !0
+ if (-1 !== _.indexOf(rolePerm.allowedAction, '*')) return !0
+ var actionType = a.split(':')[0],
+ action = a.split(':')[1]
+ if (_.isUndefined(actionType) || _.isUndefined(action)) return !1
+ var result = _.filter(rolePerm.allowedAction, function (value) {
+ if (((prefix = actionType + ':'), value.slice(0, prefix.length) === prefix)) return value
+ var prefix
+ })
+ if (_.isUndefined(result) || _.size(result) < 1) return !1
+ if (1 === _.size(result) && '*' === result[0]) return !0
+ var typePerm = result[0].split(':')[1].split(' ')
+ return (
+ (typePerm = _.uniq(typePerm)), -1 !== _.indexOf(typePerm, '*') || -1 !== _.indexOf(typePerm, action)
+ )
+ }),
+ (helpers.canUserEditSelf = function (ownerId, perm) {
+ var id = window.trudeskSessionService.getUser()._id
+ return !!helpers.canUser(perm + ':editSelf') && id.toString() === ownerId.toString()
+ }),
+ (helpers.setupContextMenu = function (selector, complete) {
+ var menuOpenFor,
+ $selector = $(selector)
+ if ($selector.length < 1) return !1
+ $(document).off('mousedown'),
+ $(document).on('mousedown', function (e) {
+ if ($(e.target).parents('.context-menu').length < 1) {
+ var cm = $('.context-menu')
+ cm.length > 0 && cm.hide(100)
+ }
+ }),
+ $selector.off('contextmenu'),
+ $selector.on('contextmenu', function (event) {
+ event.preventDefault(),
+ (menuOpenFor = event.target),
+ $('.context-menu')
+ .finish()
+ .toggle(100)
+ .css({ top: event.pageY + 'px', left: event.pageX + 'px' })
+ }),
+ $selector.off('mousedown'),
+ $selector.on('mousedown', function (event) {
+ $(event.target).parents('.context-menu').length < 1 && $('.context-menu').hide(100)
+ }),
+ $('.context-menu li').each(function () {
+ var $item = $(this)
+ $item.off('click'),
+ $item.on('click', function () {
+ if (($('.context-menu').hide(100), _.isFunction(complete)))
+ return complete($(this).attr('data-action'), menuOpenFor)
+ console.log('Invalid Callback Function in Context-Menu!')
+ })
+ })
+ }),
+ (helpers.setupTruTabs = function (tabs) {
+ _.each(tabs, function (i) {
+ var element
+ $((element = i)).hasClass('active') &&
+ $(element)
+ .parent()
+ .find('.tru-tab-highlighter')
+ .css({ width: $(element).outerWidth() }),
+ $(element).off('click'),
+ $(element).on('click', function (event) {
+ if ((event.preventDefault(), $(this).hasClass('active'))) return !0
+ var $highlighter = $(this)
+ .parent()
+ .find('.tru-tab-highlighter')
+ $(this)
+ .parent()
+ .find('.tru-tab-selector')
+ .each(function () {
+ $(this).removeClass('active')
+ }),
+ $(this).addClass('active'),
+ $highlighter.css({ width: $(this).outerWidth() })
+ var tabId = $(this).attr('data-tabid')
+ $(this)
+ .parents('.tru-tabs')
+ .find('.tru-tab-section')
+ .each(function () {
+ $(this)
+ .removeClass('visible')
+ .addClass('hidden')
+ }),
+ $(this)
+ .parents('.tru-tabs')
+ .find('.tru-tab-section[data-tabid="' + tabId + '"]')
+ .addClass('visible')
+ .removeClass('hidden')
+ var highlighterPos = $(this).position().left + 'px'
+ $highlighter.css('transform', 'translateX(' + highlighterPos + ')')
+ })
+ })
+ }),
+ (helpers.prototypes = function () {
+ String.prototype.formatUnicorn =
+ String.prototype.formatUnicorn ||
+ function () {
+ var str = this.toString()
+ if (arguments.length) {
+ var key,
+ t = typeof arguments[0],
+ args = 'string' === t || 'number' === t ? Array.prototype.slice.call(arguments) : arguments[0]
+ for (key in args) str = str.replace(new RegExp('\\{' + key + '\\}', 'gi'), args[key])
+ }
+ return str
+ }
+ }),
+ helpers
+ )
+ }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ },
+ ,
+ function (module, exports) {
+ module.exports = function (module) {
+ return (
+ module.webpackPolyfill ||
+ ((module.deprecate = function () {}),
+ (module.paths = []),
+ module.children || (module.children = []),
+ Object.defineProperty(module, 'loaded', {
+ enumerable: !0,
+ get: function () {
+ return module.l
+ }
+ }),
+ Object.defineProperty(module, 'id', {
+ enumerable: !0,
+ get: function () {
+ return module.i
+ }
+ }),
+ (module.webpackPolyfill = 1)),
+ module
+ )
+ }
+ },
+ function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_RESULT__
+ /*!
+ * Snackbar v0.1.3
+ * http://polonel.com/Snackbar
+ *
+ * Copyright 2016 Chris Brame and other contributors
+ * Released under the MIT license
+ * https://github.com/polonel/Snackbar/blob/master/LICENSE
+ */
+ /*!
+ * Snackbar v0.1.3
+ * http://polonel.com/Snackbar
+ *
+ * Copyright 2016 Chris Brame and other contributors
+ * Released under the MIT license
+ * https://github.com/polonel/Snackbar/blob/master/LICENSE
+ */
+ !(function (root, factory) {
+ 'use strict'
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return (root.Snackbar = (function () {
+ var Snackbar = { current: null },
+ $defaults = {
+ text: 'Default Text',
+ textColor: '#ffffff',
+ width: 'auto',
+ showAction: !0,
+ actionText: 'Dismiss',
+ actionTextColor: '#4caf50',
+ backgroundColor: '#323232',
+ pos: 'bottom-left',
+ duration: 5e3,
+ customClass: '',
+ onActionClick: function (element) {
+ element.style.opacity = 0
+ }
+ }
+ ;(Snackbar.show = function ($options) {
+ var options = extend(!0, $defaults, $options)
+ Snackbar.current &&
+ ((Snackbar.current.style.opacity = 0),
+ setTimeout(
+ function () {
+ var $parent = this.parentElement
+ $parent && $parent.removeChild(this)
+ }.bind(Snackbar.current),
+ 500
+ )),
+ (Snackbar.snackbar = document.createElement('div')),
+ (Snackbar.snackbar.className = 'snackbar-container ' + options.customClass),
+ (Snackbar.snackbar.style.width = options.width)
+ var $p = document.createElement('p')
+ if (
+ (($p.style.margin = 0),
+ ($p.style.padding = 0),
+ ($p.style.color = options.textColor),
+ ($p.style.fontSize = '14px'),
+ ($p.style.fontWeight = 300),
+ ($p.style.lineHeight = '1em'),
+ ($p.innerHTML = options.text),
+ Snackbar.snackbar.appendChild($p),
+ (Snackbar.snackbar.style.background = options.backgroundColor),
+ options.showAction)
+ ) {
+ var actionButton = document.createElement('button')
+ ;(actionButton.className = 'action'),
+ (actionButton.innerHTML = options.actionText),
+ (actionButton.style.color = options.actionTextColor),
+ actionButton.addEventListener('click', function () {
+ options.onActionClick(Snackbar.snackbar)
+ }),
+ Snackbar.snackbar.appendChild(actionButton)
+ }
+ setTimeout(
+ function () {
+ Snackbar.current === this && (Snackbar.current.style.opacity = 0)
+ }.bind(Snackbar.snackbar),
+ options.duration
+ ),
+ Snackbar.snackbar.addEventListener(
+ 'transitionend',
+ function (event, elapsed) {
+ 'opacity' == event.propertyName &&
+ '0' == this.style.opacity &&
+ (this.parentElement.removeChild(this), Snackbar.current === this && (Snackbar.current = null))
+ }.bind(Snackbar.snackbar)
+ ),
+ (Snackbar.current = Snackbar.snackbar),
+ (document.body.style.overflow = 'hidden'),
+ ('top-left' !== options.pos &&
+ 'top-center' !== options.pos &&
+ 'top' !== options.pos &&
+ 'top-right' !== options.pos) ||
+ (Snackbar.snackbar.style.top = '-100px'),
+ document.body.appendChild(Snackbar.snackbar)
+ getComputedStyle(Snackbar.snackbar).bottom, getComputedStyle(Snackbar.snackbar).top
+ ;(Snackbar.snackbar.style.opacity = 1),
+ (Snackbar.snackbar.className =
+ 'snackbar-container ' + options.customClass + ' snackbar-pos ' + options.pos),
+ 'top-left' === options.pos || 'top-right' === options.pos
+ ? (Snackbar.snackbar.style.top = 0)
+ : 'top-center' === options.pos || 'top' === options.pos
+ ? (Snackbar.snackbar.style.top = '25px')
+ : ('bottom-center' !== options.pos && 'bottom' !== options.pos) ||
+ (Snackbar.snackbar.style.bottom = '-25px'),
+ setTimeout(function () {
+ document.body.style.overflow = 'auto'
+ }, 500)
+ }),
+ (Snackbar.close = function () {
+ Snackbar.current && (Snackbar.current.style.opacity = 0)
+ })
+ var extend = function () {
+ var extended = {},
+ deep = !1,
+ i = 0,
+ length = arguments.length
+ '[object Boolean]' === Object.prototype.toString.call(arguments[0]) && ((deep = arguments[0]), i++)
+ for (
+ var merge = function (obj) {
+ for (var prop in obj)
+ Object.prototype.hasOwnProperty.call(obj, prop) &&
+ (deep && '[object Object]' === Object.prototype.toString.call(obj[prop])
+ ? (extended[prop] = extend(!0, extended[prop], obj[prop]))
+ : (extended[prop] = obj[prop]))
+ };
+ i < length;
+ i++
+ ) {
+ var obj = arguments[i]
+ merge(obj)
+ }
+ return extended
+ }
+ return Snackbar
+ })())
+ }.apply(exports, [])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })(this)
+ },
+ function (module, exports, __webpack_require__) {
+ ;(function (jQuery) {
+ var a, b, c
+ module.exports = ((a = __webpack_require__(0)),
+ (b = function (a, b) {
+ var c,
+ d = document.createElement('canvas')
+ a.appendChild(d), 'undefined' != typeof G_vmlCanvasManager && G_vmlCanvasManager.initElement(d)
+ var e = d.getContext('2d')
+ d.width = d.height = b.size
+ var f = 1
+ window.devicePixelRatio > 1 &&
+ ((f = window.devicePixelRatio),
+ (d.style.width = d.style.height = [b.size, 'px'].join('')),
+ (d.width = d.height = b.size * f),
+ e.scale(f, f)),
+ e.translate(b.size / 2, b.size / 2),
+ e.rotate((b.rotate / 180 - 0.5) * Math.PI)
+ var g = (b.size - b.lineWidth) / 2
+ b.scaleColor && b.scaleLength && (g -= b.scaleLength + 2),
+ (Date.now =
+ Date.now ||
+ function () {
+ return +new Date()
+ })
+ var h = function (a, b, c) {
+ var d = 0 >= (c = Math.min(Math.max(-1, c || 0), 1))
+ e.beginPath(), e.arc(0, 0, g, 0, 2 * Math.PI * c, d), (e.strokeStyle = a), (e.lineWidth = b), e.stroke()
+ },
+ j =
+ window.requestAnimationFrame ||
+ window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame ||
+ function (a) {
+ window.setTimeout(a, 1e3 / 60)
+ },
+ k = function () {
+ b.scaleColor &&
+ (function () {
+ var a, c
+ ;(e.lineWidth = 1), (e.fillStyle = b.scaleColor), e.save()
+ for (var d = 24; d > 0; --d)
+ d % 6 == 0 ? ((c = b.scaleLength), (a = 0)) : ((c = 0.6 * b.scaleLength), (a = b.scaleLength - c)),
+ e.fillRect(-b.size / 2 + a, 0, c, 1),
+ e.rotate(Math.PI / 12)
+ e.restore()
+ })(),
+ b.trackColor && h(b.trackColor, b.lineWidth, 1)
+ }
+ ;(this.getCanvas = function () {
+ return d
+ }),
+ (this.getCtx = function () {
+ return e
+ }),
+ (this.clear = function () {
+ e.clearRect(b.size / -2, b.size / -2, b.size, b.size)
+ }),
+ (this.draw = function (a) {
+ var d
+ b.scaleColor || b.trackColor
+ ? e.getImageData && e.putImageData
+ ? c
+ ? e.putImageData(c, 0, 0)
+ : (k(), (c = e.getImageData(0, 0, b.size * f, b.size * f)))
+ : (this.clear(), k())
+ : this.clear(),
+ (e.lineCap = b.lineCap),
+ (d = 'function' == typeof b.barColor ? b.barColor(a) : b.barColor),
+ h(d, b.lineWidth, a / 100)
+ }.bind(this)),
+ (this.animate = function (a, c) {
+ var d = Date.now()
+ b.onStart(a, c)
+ var e = function () {
+ var f = Math.min(Date.now() - d, b.animate.duration),
+ g = b.easing(this, f, a, c - a, b.animate.duration)
+ this.draw(g), b.onStep(a, c, g), f >= b.animate.duration ? b.onStop(a, c) : j(e)
+ }.bind(this)
+ j(e)
+ }.bind(this))
+ }),
+ (c = function (a, c) {
+ var d = {
+ barColor: '#ef1e25',
+ trackColor: '#f9f9f9',
+ scaleColor: '#dfe0e0',
+ scaleLength: 5,
+ lineCap: 'round',
+ lineWidth: 3,
+ size: 110,
+ rotate: 0,
+ animate: { duration: 1e3, enabled: !0 },
+ easing: function (a, b, c, d, e) {
+ return 1 > (b /= e / 2) ? (d / 2) * b * b + c : (-d / 2) * (--b * (b - 2) - 1) + c
+ },
+ onStart: function () {},
+ onStep: function () {},
+ onStop: function () {}
+ }
+ if (void 0 !== b) d.renderer = b
+ else {
+ if ('undefined' == typeof SVGRenderer) throw new Error('Please load either the SVG- or the CanvasRenderer')
+ d.renderer = SVGRenderer
+ }
+ var e = {},
+ f = 0,
+ g = function () {
+ for (var b in ((this.el = a), (this.options = e), d))
+ d.hasOwnProperty(b) &&
+ ((e[b] = c && void 0 !== c[b] ? c[b] : d[b]), 'function' == typeof e[b] && (e[b] = e[b].bind(this)))
+ ;(e.easing =
+ 'string' == typeof e.easing && void 0 !== jQuery && jQuery.isFunction(jQuery.easing[e.easing])
+ ? jQuery.easing[e.easing]
+ : d.easing),
+ 'number' == typeof e.animate && (e.animate = { duration: e.animate, enabled: !0 }),
+ 'boolean' != typeof e.animate || e.animate || (e.animate = { duration: 1e3, enabled: e.animate }),
+ (this.renderer = new e.renderer(a, e)),
+ this.renderer.draw(f),
+ a.dataset && a.dataset.percent
+ ? this.update(parseFloat(a.dataset.percent))
+ : a.getAttribute &&
+ a.getAttribute('data-percent') &&
+ this.update(parseFloat(a.getAttribute('data-percent')))
+ }.bind(this)
+ ;(this.update = function (a) {
+ return (
+ (a = parseFloat(a)), e.animate.enabled ? this.renderer.animate(f, a) : this.renderer.draw(a), (f = a), this
+ )
+ }.bind(this)),
+ (this.disableAnimation = function () {
+ return (e.animate.enabled = !1), this
+ }),
+ (this.enableAnimation = function () {
+ return (e.animate.enabled = !0), this
+ }),
+ g()
+ }),
+ void (a.fn.easyPieChart = function (b) {
+ return this.each(function () {
+ var d
+ a.data(this, 'easyPieChart') ||
+ ((d = a.extend({}, b, a(this).data())), a.data(this, 'easyPieChart', new c(this, d)))
+ })
+ }))
+ }.call(this, __webpack_require__(0)))
+ },
+ ,
+ ,
+ ,
+ function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__, m, n, k
+ /*!
+ Scroller 1.2.2
+ ©2011-2014 SpryMedia Ltd - datatables.net/license
+ */
+ /*!
+ Scroller 1.2.2
+ ©2011-2014 SpryMedia Ltd - datatables.net/license
+ */
+ ;(m = window),
+ (n = document),
+ (__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0), __webpack_require__(2)]),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ =
+ 'function' ==
+ typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function (e) {
+ var g = function (a, b) {
+ !this instanceof g
+ ? alert("Scroller warning: Scroller must be initialised with the 'new' keyword.")
+ : (void 0 === b && (b = {}),
+ (this.s = {
+ dt: a,
+ tableTop: 0,
+ tableBottom: 0,
+ redrawTop: 0,
+ redrawBottom: 0,
+ autoHeight: !0,
+ viewportRows: 0,
+ stateTO: null,
+ drawTO: null,
+ heights: { jump: null, page: null, virtual: null, scroll: null, row: null, viewport: null },
+ topRowFloat: 0,
+ scrollDrawDiff: null,
+ loaderVisible: !1
+ }),
+ (this.s = e.extend(this.s, g.oDefaults, b)),
+ (this.s.heights.row = this.s.rowHeight),
+ (this.dom = { force: n.createElement('div'), scroller: null, table: null, loader: null }),
+ (this.s.dt.oScroller = this),
+ this._fnConstruct())
+ }
+ if (
+ ((g.prototype = {
+ fnRowToPixels: function (a, b, c) {
+ return (
+ (a = c
+ ? this._domain('virtualToPhysical', a * this.s.heights.row)
+ : this.s.baseScrollTop + (a - this.s.baseRowTop) * this.s.heights.row),
+ b || b === k ? parseInt(a, 10) : a
+ )
+ },
+ fnPixelsToRow: function (a, b, c) {
+ var d = a - this.s.baseScrollTop
+ return (
+ (a = c
+ ? this._domain('physicalToVirtual', a) / this.s.heights.row
+ : d / this.s.heights.row + this.s.baseRowTop),
+ b || b === k ? parseInt(a, 10) : a
+ )
+ },
+ fnScrollToRow: function (a, b) {
+ var c = this,
+ d = !1,
+ f = this.fnRowToPixels(a),
+ h = a - ((this.s.displayBuffer - 1) / 2) * this.s.viewportRows
+ 0 > h && (h = 0),
+ (f > this.s.redrawBottom || f < this.s.redrawTop) &&
+ this.s.dt._iDisplayStart !== h &&
+ ((d = !0), (f = this.fnRowToPixels(a, !1, !0))),
+ void 0 === b || b
+ ? ((this.s.ani = d),
+ e(this.dom.scroller).animate({ scrollTop: f }, function () {
+ setTimeout(function () {
+ c.s.ani = !1
+ }, 25)
+ }))
+ : e(this.dom.scroller).scrollTop(f)
+ },
+ fnMeasure: function (a) {
+ this.s.autoHeight && this._fnCalcRowHeight()
+ var b = this.s.heights
+ ;(b.viewport = e(this.dom.scroller).height()),
+ (this.s.viewportRows = parseInt(b.viewport / b.row, 10) + 1),
+ (this.s.dt._iDisplayLength = this.s.viewportRows * this.s.displayBuffer),
+ (a === k || a) && this.s.dt.oInstance.fnDraw()
+ },
+ _fnConstruct: function () {
+ var a = this
+ if (this.s.dt.oFeatures.bPaginate) {
+ ;(this.dom.force.style.position = 'absolute'),
+ (this.dom.force.style.top = '0px'),
+ (this.dom.force.style.left = '0px'),
+ (this.dom.force.style.width = '1px'),
+ (this.dom.scroller = e('div.' + this.s.dt.oClasses.sScrollBody, this.s.dt.nTableWrapper)[0]),
+ this.dom.scroller.appendChild(this.dom.force),
+ (this.dom.scroller.style.position = 'relative'),
+ (this.dom.table = e('>table', this.dom.scroller)[0]),
+ (this.dom.table.style.position = 'absolute'),
+ (this.dom.table.style.top = '0px'),
+ (this.dom.table.style.left = '0px'),
+ e(this.s.dt.nTableWrapper).addClass('DTS'),
+ this.s.loadingIndicator &&
+ ((this.dom.loader = e(
+ '
' + this.s.dt.oLanguage.sLoadingRecords + '
'
+ ).css('display', 'none')),
+ e(this.dom.scroller.parentNode)
+ .css('position', 'relative')
+ .append(this.dom.loader)),
+ this.s.heights.row && 'auto' != this.s.heights.row && (this.s.autoHeight = !1),
+ this.fnMeasure(!1),
+ (this.s.ingnoreScroll = !0),
+ (this.s.stateSaveThrottle = this.s.dt.oApi._fnThrottle(function () {
+ a.s.dt.oApi._fnSaveState(a.s.dt)
+ }, 500)),
+ e(this.dom.scroller).on('scroll.DTS', function () {
+ a._fnScroll.call(a)
+ }),
+ e(this.dom.scroller).on('touchstart.DTS', function () {
+ a._fnScroll.call(a)
+ }),
+ this.s.dt.aoDrawCallback.push({
+ fn: function () {
+ a.s.dt.bInitialised && a._fnDrawCallback.call(a)
+ },
+ sName: 'Scroller'
+ }),
+ e(m).on('resize.DTS', function () {
+ a.fnMeasure(!1), a._fnInfo()
+ })
+ var b = !0
+ this.s.dt.oApi._fnCallbackReg(
+ this.s.dt,
+ 'aoStateSaveParams',
+ function (c, d) {
+ b && a.s.dt.oLoadedState
+ ? ((d.iScroller = a.s.dt.oLoadedState.iScroller),
+ (d.iScrollerTopRow = a.s.dt.oLoadedState.iScrollerTopRow),
+ (b = !1))
+ : ((d.iScroller = a.dom.scroller.scrollTop), (d.iScrollerTopRow = a.s.topRowFloat))
+ },
+ 'Scroller_State'
+ ),
+ this.s.dt.oLoadedState && (this.s.topRowFloat = this.s.dt.oLoadedState.iScrollerTopRow || 0),
+ this.s.dt.aoDestroyCallback.push({
+ sName: 'Scroller',
+ fn: function () {
+ e(m).off('resize.DTS'),
+ e(a.dom.scroller).off('touchstart.DTS scroll.DTS'),
+ e(a.s.dt.nTableWrapper).removeClass('DTS'),
+ e('div.DTS_Loading', a.dom.scroller.parentNode).remove(),
+ (a.dom.table.style.position = ''),
+ (a.dom.table.style.top = ''),
+ (a.dom.table.style.left = '')
+ }
+ })
+ } else this.s.dt.oApi._fnLog(this.s.dt, 0, 'Pagination must be enabled for Scroller')
+ },
+ _fnScroll: function () {
+ var d,
+ a = this,
+ b = this.s.heights,
+ c = this.dom.scroller.scrollTop
+ if (!this.s.skip && !this.s.ingnoreScroll)
+ if (this.s.dt.bFiltered || this.s.dt.bSorted) this.s.lastScrollTop = 0
+ else {
+ if (
+ (this._fnInfo(),
+ clearTimeout(this.s.stateTO),
+ (this.s.stateTO = setTimeout(function () {
+ a.s.dt.oApi._fnSaveState(a.s.dt)
+ }, 250)),
+ c < this.s.redrawTop || c > this.s.redrawBottom)
+ ) {
+ var f = Math.ceil(((this.s.displayBuffer - 1) / 2) * this.s.viewportRows)
+ Math.abs(c - this.s.lastScrollTop) > b.viewport || this.s.ani
+ ? ((d = parseInt(this._domain('physicalToVirtual', c) / b.row, 10) - f),
+ (this.s.topRowFloat = this._domain('physicalToVirtual', c) / b.row))
+ : ((d = this.fnPixelsToRow(c) - f), (this.s.topRowFloat = this.fnPixelsToRow(c, !1))),
+ 0 >= d
+ ? (d = 0)
+ : d + this.s.dt._iDisplayLength > this.s.dt.fnRecordsDisplay()
+ ? 0 > (d = this.s.dt.fnRecordsDisplay() - this.s.dt._iDisplayLength) && (d = 0)
+ : 0 != d % 2 && d++,
+ d != this.s.dt._iDisplayStart &&
+ ((this.s.tableTop = e(this.s.dt.nTable).offset().top),
+ (this.s.tableBottom = e(this.s.dt.nTable).height() + this.s.tableTop),
+ (b = function () {
+ null === a.s.scrollDrawReq && (a.s.scrollDrawReq = c),
+ (a.s.dt._iDisplayStart = d),
+ a.s.dt.oApi._fnCalculateEnd && a.s.dt.oApi._fnCalculateEnd(a.s.dt),
+ a.s.dt.oApi._fnDraw(a.s.dt)
+ }),
+ this.s.dt.oFeatures.bServerSide
+ ? (clearTimeout(this.s.drawTO), (this.s.drawTO = setTimeout(b, this.s.serverWait)))
+ : b(),
+ this.dom.loader && !this.s.loaderVisible) &&
+ (this.dom.loader.css('display', 'block'), (this.s.loaderVisible = !0))
+ }
+ ;(this.s.lastScrollTop = c), this.s.stateSaveThrottle()
+ }
+ },
+ _domain: function (a, b) {
+ var d,
+ c = this.s.heights
+ if (c.virtual === c.scroll) {
+ if (((d = (c.virtual - c.viewport) / (c.scroll - c.viewport)), 'virtualToPhysical' === a))
+ return b / d
+ if ('physicalToVirtual' === a) return b * d
+ }
+ var e = (c.scroll - c.viewport) / 2,
+ h = (c.virtual - c.viewport) / 2
+ return (
+ (d = h / (e * e)),
+ 'virtualToPhysical' === a
+ ? b < h
+ ? Math.pow(b / d, 0.5)
+ : 0 > (b = 2 * h - b)
+ ? c.scroll
+ : 2 * e - Math.pow(b / d, 0.5)
+ : 'physicalToVirtual' === a
+ ? b < e
+ ? b * b * d
+ : 0 > (b = 2 * e - b)
+ ? c.virtual
+ : 2 * h - b * b * d
+ : void 0
+ )
+ },
+ _fnDrawCallback: function () {
+ var a = this,
+ b = this.s.heights,
+ c = this.dom.scroller.scrollTop,
+ d = e(this.s.dt.nTable).height(),
+ f = this.s.dt._iDisplayStart,
+ h = this.s.dt._iDisplayLength,
+ g = this.s.dt.fnRecordsDisplay()
+ ;(this.s.skip = !0),
+ this._fnScrollForce(),
+ (c =
+ 0 === f
+ ? this.s.topRowFloat * b.row
+ : f + h >= g
+ ? b.scroll - (g - this.s.topRowFloat) * b.row
+ : this._domain('virtualToPhysical', this.s.topRowFloat * b.row)),
+ (this.dom.scroller.scrollTop = c),
+ (this.s.baseScrollTop = c),
+ (this.s.baseRowTop = this.s.topRowFloat)
+ var j = c - (this.s.topRowFloat - f) * b.row
+ 0 === f ? (j = 0) : f + h >= g && (j = b.scroll - d),
+ (this.dom.table.style.top = j + 'px'),
+ (this.s.tableTop = j),
+ (this.s.tableBottom = d + this.s.tableTop),
+ (d = (c - this.s.tableTop) * this.s.boundaryScale),
+ (this.s.redrawTop = c - d),
+ (this.s.redrawBottom = c + d),
+ (this.s.skip = !1),
+ this.s.dt.oFeatures.bStateSave &&
+ null !== this.s.dt.oLoadedState &&
+ void 0 !== this.s.dt.oLoadedState.iScroller
+ ? (((c = !((!this.s.dt.sAjaxSource && !a.s.dt.ajax) || this.s.dt.oFeatures.bServerSide)) &&
+ 2 == this.s.dt.iDraw) ||
+ (!c && 1 == this.s.dt.iDraw)) &&
+ setTimeout(function () {
+ e(a.dom.scroller).scrollTop(a.s.dt.oLoadedState.iScroller),
+ (a.s.redrawTop = a.s.dt.oLoadedState.iScroller - b.viewport / 2),
+ setTimeout(function () {
+ a.s.ingnoreScroll = !1
+ }, 0)
+ }, 0)
+ : (a.s.ingnoreScroll = !1),
+ setTimeout(function () {
+ a._fnInfo.call(a)
+ }, 0),
+ this.dom.loader &&
+ this.s.loaderVisible &&
+ (this.dom.loader.css('display', 'none'), (this.s.loaderVisible = !1))
+ },
+ _fnScrollForce: function () {
+ var a = this.s.heights
+ ;(a.virtual = a.row * this.s.dt.fnRecordsDisplay()),
+ (a.scroll = a.virtual),
+ 1e6 < a.scroll && (a.scroll = 1e6),
+ (this.dom.force.style.height = a.scroll + 'px')
+ },
+ _fnCalcRowHeight: function () {
+ var a = this.s.dt,
+ b = a.nTable,
+ c = b.cloneNode(!1),
+ d = e('
').appendTo(c),
+ f = e(
+ '
'
+ )
+ for (
+ e('tbody tr:lt(4)', b)
+ .clone()
+ .appendTo(d);
+ 3 > e('tr', d).length;
+
+ )
+ d.append('
')
+ e('div.' + a.oClasses.sScrollBody, f).append(c),
+ a._bInitComplete
+ ? (a = b.parentNode)
+ : (this.s.dt.nHolding || (this.s.dt.nHolding = e('
').insertBefore(this.s.dt.nTable)),
+ (a = this.s.dt.nHolding)),
+ f.appendTo(a),
+ (this.s.heights.row = e('tr', d)
+ .eq(1)
+ .outerHeight()),
+ f.remove()
+ },
+ _fnInfo: function () {
+ if (this.s.dt.oFeatures.bInfo) {
+ var a = this.s.dt,
+ b = a.oLanguage,
+ c = this.dom.scroller.scrollTop,
+ d = Math.floor(this.fnPixelsToRow(c, !1, this.s.ani) + 1),
+ f = a.fnRecordsTotal(),
+ h = a.fnRecordsDisplay(),
+ g = ((c =
+ h < (c = Math.ceil(this.fnPixelsToRow(c + this.s.heights.viewport, !1, this.s.ani))) ? h : c),
+ a.fnFormatNumber(d)),
+ j = a.fnFormatNumber(c),
+ i = a.fnFormatNumber(f),
+ k = a.fnFormatNumber(h)
+ if (
+ ((g =
+ 0 === a.fnRecordsDisplay() && a.fnRecordsDisplay() == a.fnRecordsTotal()
+ ? b.sInfoEmpty + b.sInfoPostFix
+ : 0 === a.fnRecordsDisplay()
+ ? b.sInfoEmpty + ' ' + b.sInfoFiltered.replace('_MAX_', i) + b.sInfoPostFix
+ : a.fnRecordsDisplay() == a.fnRecordsTotal()
+ ? b.sInfo
+ .replace('_START_', g)
+ .replace('_END_', j)
+ .replace('_MAX_', i)
+ .replace('_TOTAL_', k) + b.sInfoPostFix
+ : b.sInfo
+ .replace('_START_', g)
+ .replace('_END_', j)
+ .replace('_MAX_', i)
+ .replace('_TOTAL_', k) +
+ ' ' +
+ b.sInfoFiltered.replace('_MAX_', a.fnFormatNumber(a.fnRecordsTotal())) +
+ b.sInfoPostFix),
+ (b = b.fnInfoCallback) && (g = b.call(a.oInstance, a, d, c, f, h, g)),
+ void 0 !== (a = a.aanFeatures.i))
+ )
+ for (d = 0, f = a.length; d < f; d++) e(a[d]).html(g)
+ }
+ }
+ }),
+ (g.defaults = {
+ trace: !1,
+ rowHeight: 'auto',
+ serverWait: 200,
+ displayBuffer: 9,
+ boundaryScale: 0.5,
+ loadingIndicator: !1
+ }),
+ (g.oDefaults = g.defaults),
+ (g.version = '1.2.2'),
+ 'function' == typeof e.fn.dataTable &&
+ 'function' == typeof e.fn.dataTableExt.fnVersionCheck &&
+ e.fn.dataTableExt.fnVersionCheck('1.9.0')
+ ? e.fn.dataTableExt.aoFeatures.push({
+ fnInit: function (a) {
+ var b = a.oInit
+ return new g(a, b.scroller || b.oScroller || {}).dom.wrapper
+ },
+ cFeature: 'S',
+ sFeature: 'Scroller'
+ })
+ : alert('Warning: Scroller requires DataTables 1.9.0 or greater - www.datatables.net/download'),
+ (e.fn.dataTable.Scroller = g),
+ (e.fn.DataTable.Scroller = g),
+ e.fn.dataTable.Api)
+ ) {
+ var i = e.fn.dataTable.Api
+ i.register('scroller()', function () {
+ return this
+ }),
+ i.register('scroller().rowToPixels()', function (a, b, c) {
+ var d = this.context
+ if (d.length && d[0].oScroller) return d[0].oScroller.fnRowToPixels(a, b, c)
+ }),
+ i.register('scroller().pixelsToRow()', function (a, b, c) {
+ var d = this.context
+ if (d.length && d[0].oScroller) return d[0].oScroller.fnPixelsToRow(a, b, c)
+ }),
+ i.register('scroller().scrollToRow()', function (a, b) {
+ return (
+ this.iterator('table', function (c) {
+ c.oScroller && c.oScroller.fnScrollToRow(a, b)
+ }),
+ this
+ )
+ }),
+ i.register('scroller().measure()', function (a) {
+ return (
+ this.iterator('table', function (b) {
+ b.oScroller && b.oScroller.fnMeasure(a)
+ }),
+ this
+ )
+ })
+ }
+ return g
+ })
+ ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)
+ : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ },
+ function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ =
+ 'function' ==
+ typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function (t, a, e) {
+ return function (t, a, e, n, i, r) {
+ for (var o = 0, s = ['webkit', 'moz', 'ms', 'o'], m = 0; m < s.length && !window.requestAnimationFrame; ++m)
+ (window.requestAnimationFrame = window[s[m] + 'RequestAnimationFrame']),
+ (window.cancelAnimationFrame =
+ window[s[m] + 'CancelAnimationFrame'] || window[s[m] + 'CancelRequestAnimationFrame'])
+ for (var u in (window.requestAnimationFrame ||
+ (window.requestAnimationFrame = function (t, a) {
+ var e = new Date().getTime(),
+ n = Math.max(0, 16 - (e - o)),
+ i = window.setTimeout(function () {
+ t(e + n)
+ }, n)
+ return (o = e + n), i
+ }),
+ window.cancelAnimationFrame ||
+ (window.cancelAnimationFrame = function (t) {
+ clearTimeout(t)
+ }),
+ (this.options = { useEasing: !0, useGrouping: !0, separator: ',', decimal: '.', postFormatter: null }),
+ r))
+ r.hasOwnProperty(u) && (this.options[u] = r[u])
+ '' === this.options.separator && (this.options.useGrouping = !1),
+ this.options.prefix || (this.options.prefix = ''),
+ this.options.suffix || (this.options.suffix = ''),
+ (this.d = 'string' == typeof t ? document.getElementById(t) : t),
+ (this.startVal = Number(a)),
+ (this.endVal = Number(e)),
+ (this.countDown = this.startVal > this.endVal),
+ (this.frameVal = this.startVal),
+ (this.decimals = Math.max(0, n || 0)),
+ (this.dec = Math.pow(10, this.decimals)),
+ (this.duration = 1e3 * Number(i) || 2e3)
+ var l = this
+ ;(this.version = function () {
+ return '1.6.1'
+ }),
+ (this.printValue = function (t) {
+ var a = isNaN(t) ? '--' : l.formatNumber(t)
+ 'INPUT' == l.d.tagName
+ ? (this.d.value = a)
+ : 'text' == l.d.tagName || 'tspan' == l.d.tagName
+ ? (this.d.textContent = a)
+ : (this.d.innerHTML = a)
+ }),
+ (this.easeOutExpo = function (t, a, e, n) {
+ return (e * (1 - Math.pow(2, (-10 * t) / n)) * 1024) / 1023 + a
+ }),
+ (this.count = function (t) {
+ l.startTime || (l.startTime = t), (l.timestamp = t)
+ var a = t - l.startTime
+ ;(l.remaining = l.duration - a),
+ l.options.useEasing
+ ? l.countDown
+ ? (l.frameVal = l.startVal - l.easeOutExpo(a, 0, l.startVal - l.endVal, l.duration))
+ : (l.frameVal = l.easeOutExpo(a, l.startVal, l.endVal - l.startVal, l.duration))
+ : l.countDown
+ ? (l.frameVal = l.startVal - (l.startVal - l.endVal) * (a / l.duration))
+ : (l.frameVal = l.startVal + (l.endVal - l.startVal) * (a / l.duration)),
+ l.countDown
+ ? (l.frameVal = l.frameVal < l.endVal ? l.endVal : l.frameVal)
+ : (l.frameVal = l.frameVal > l.endVal ? l.endVal : l.frameVal),
+ (l.frameVal = Math.floor(l.frameVal * l.dec) / l.dec),
+ l.printValue(l.frameVal),
+ a < l.duration ? (l.rAF = requestAnimationFrame(l.count)) : l.callback && l.callback()
+ }),
+ (this.start = function (t) {
+ return (l.callback = t), (l.rAF = requestAnimationFrame(l.count)), !1
+ }),
+ (this.pauseResume = function () {
+ l.paused
+ ? ((l.paused = !1),
+ delete l.startTime,
+ (l.duration = l.remaining),
+ (l.startVal = l.frameVal),
+ requestAnimationFrame(l.count))
+ : ((l.paused = !0), cancelAnimationFrame(l.rAF))
+ }),
+ (this.reset = function () {
+ ;(l.paused = !1),
+ delete l.startTime,
+ (l.startVal = a),
+ cancelAnimationFrame(l.rAF),
+ l.printValue(l.startVal)
+ }),
+ (this.update = function (t) {
+ cancelAnimationFrame(l.rAF),
+ (l.paused = !1),
+ delete l.startTime,
+ (l.startVal = l.frameVal),
+ (l.endVal = Number(t)),
+ (l.countDown = l.startVal > l.endVal),
+ (l.rAF = requestAnimationFrame(l.count))
+ }),
+ (this.formatNumber = function (t) {
+ var a, e, n, i
+ if (
+ ((t = t.toFixed(l.decimals)),
+ (a = (t += '').split('.')),
+ (e = a[0]),
+ (n = a.length > 1 ? l.options.decimal + a[1] : ''),
+ (i = /(\d+)(\d{3})/),
+ l.options.useGrouping)
+ )
+ for (; i.test(e); ) e = e.replace(i, '$1' + l.options.separator + '$2')
+ var r = l.options.prefix + e + n + l.options.suffix
+ return null != l.options.postFormatter && (r = l.options.postFormatter(r)), r
+ }),
+ l.printValue(l.startVal)
+ }
+ })
+ ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)
+ : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ },
+ function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ =
+ 'function' ==
+ typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function (t, e, o) {
+ 'use strict'
+ function i (t, e) {
+ if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
+ }
+ function n (t) {
+ var e = t.getBoundingClientRect(),
+ o = {}
+ for (var i in e) o[i] = e[i]
+ if (t.ownerDocument !== document) {
+ var r = t.ownerDocument.defaultView.frameElement
+ if (r) {
+ var s = n(r)
+ ;(o.top += s.top), (o.bottom += s.top), (o.left += s.left), (o.right += s.left)
+ }
+ }
+ return o
+ }
+ function r (t) {
+ var e = getComputedStyle(t) || {},
+ o = e.position,
+ i = []
+ if ('fixed' === o) return [t]
+ for (var n = t; (n = n.parentNode) && n && 1 === n.nodeType; ) {
+ var r = void 0
+ try {
+ r = getComputedStyle(n)
+ } catch (s) {}
+ if (null == r) return i.push(n), i
+ var a = r,
+ f = a.overflow,
+ l = a.overflowX,
+ h = a.overflowY
+ ;/(auto|scroll)/.test(f + h + l) &&
+ ('absolute' !== o || ['relative', 'absolute', 'fixed'].indexOf(r.position) >= 0) &&
+ i.push(n)
+ }
+ return i.push(t.ownerDocument.body), t.ownerDocument !== document && i.push(t.ownerDocument.defaultView), i
+ }
+ function s () {
+ A && document.body.removeChild(A), (A = null)
+ }
+ function a (t) {
+ var e = void 0
+ t === document ? ((e = document), (t = document.documentElement)) : (e = t.ownerDocument)
+ var o = e.documentElement,
+ i = n(t),
+ r = P()
+ return (
+ (i.top -= r.top),
+ (i.left -= r.left),
+ void 0 === i.width && (i.width = document.body.scrollWidth - i.left - i.right),
+ void 0 === i.height && (i.height = document.body.scrollHeight - i.top - i.bottom),
+ (i.top = i.top - o.clientTop),
+ (i.left = i.left - o.clientLeft),
+ (i.right = e.body.clientWidth - i.width - i.left),
+ (i.bottom = e.body.clientHeight - i.height - i.top),
+ i
+ )
+ }
+ function f (t) {
+ return t.offsetParent || document.documentElement
+ }
+ function l () {
+ if (M) return M
+ var t = document.createElement('div')
+ ;(t.style.width = '100%'), (t.style.height = '200px')
+ var e = document.createElement('div')
+ h(e.style, {
+ position: 'absolute',
+ top: 0,
+ left: 0,
+ pointerEvents: 'none',
+ visibility: 'hidden',
+ width: '200px',
+ height: '150px',
+ overflow: 'hidden'
+ }),
+ e.appendChild(t),
+ document.body.appendChild(e)
+ var o = t.offsetWidth
+ e.style.overflow = 'scroll'
+ var i = t.offsetWidth
+ o === i && (i = e.clientWidth), document.body.removeChild(e)
+ var n = o - i
+ return (M = { width: n, height: n })
+ }
+ function h () {
+ var t = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0],
+ e = []
+ return (
+ Array.prototype.push.apply(e, arguments),
+ e.slice(1).forEach(function (e) {
+ if (e) for (var o in e) ({}.hasOwnProperty.call(e, o) && (t[o] = e[o]))
+ }),
+ t
+ )
+ }
+ function d (t, e) {
+ if (void 0 !== t.classList)
+ e.split(' ').forEach(function (e) {
+ e.trim() && t.classList.remove(e)
+ })
+ else {
+ var o = new RegExp('(^| )' + e.split(' ').join('|') + '( |$)', 'gi'),
+ i = c(t).replace(o, ' ')
+ g(t, i)
+ }
+ }
+ function p (t, e) {
+ if (void 0 !== t.classList)
+ e.split(' ').forEach(function (e) {
+ e.trim() && t.classList.add(e)
+ })
+ else {
+ d(t, e)
+ var o = c(t) + ' ' + e
+ g(t, o)
+ }
+ }
+ function u (t, e) {
+ if (void 0 !== t.classList) return t.classList.contains(e)
+ var o = c(t)
+ return new RegExp('(^| )' + e + '( |$)', 'gi').test(o)
+ }
+ function c (t) {
+ return t.className instanceof t.ownerDocument.defaultView.SVGAnimatedString
+ ? t.className.baseVal
+ : t.className
+ }
+ function g (t, e) {
+ t.setAttribute('class', e)
+ }
+ function m (t, e, o) {
+ o.forEach(function (o) {
+ ;-1 === e.indexOf(o) && u(t, o) && d(t, o)
+ }),
+ e.forEach(function (e) {
+ u(t, e) || p(t, e)
+ })
+ }
+ function i (t, e) {
+ if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function')
+ }
+ function y (t, e) {
+ var o = arguments.length <= 2 || void 0 === arguments[2] ? 1 : arguments[2]
+ return t + o >= e && e >= t - o
+ }
+ function b () {
+ return 'undefined' != typeof performance && void 0 !== performance.now ? performance.now() : +new Date()
+ }
+ function w () {
+ for (var t = { top: 0, left: 0 }, e = arguments.length, o = Array(e), i = 0; i < e; i++) o[i] = arguments[i]
+ return (
+ o.forEach(function (e) {
+ var o = e.top,
+ i = e.left
+ 'string' == typeof o && (o = parseFloat(o, 10)),
+ 'string' == typeof i && (i = parseFloat(i, 10)),
+ (t.top += o),
+ (t.left += i)
+ }),
+ t
+ )
+ }
+ function C (t, e) {
+ return (
+ 'string' == typeof t.left &&
+ -1 !== t.left.indexOf('%') &&
+ (t.left = (parseFloat(t.left, 10) / 100) * e.width),
+ 'string' == typeof t.top &&
+ -1 !== t.top.indexOf('%') &&
+ (t.top = (parseFloat(t.top, 10) / 100) * e.height),
+ t
+ )
+ }
+ function O (t, e) {
+ return (
+ 'scrollParent' === e
+ ? (e = t.scrollParents[0])
+ : 'window' === e &&
+ (e = [pageXOffset, pageYOffset, innerWidth + pageXOffset, innerHeight + pageYOffset]),
+ e === document && (e = e.documentElement),
+ void 0 !== e.nodeType &&
+ (function () {
+ var t = e,
+ o = a(e),
+ i = o,
+ n = getComputedStyle(e)
+ if (((e = [i.left, i.top, o.width + i.left, o.height + i.top]), t.ownerDocument !== document)) {
+ var r = t.ownerDocument.defaultView
+ ;(e[0] += r.pageXOffset), (e[1] += r.pageYOffset), (e[2] += r.pageXOffset), (e[3] += r.pageYOffset)
+ }
+ G.forEach(function (t, o) {
+ 'Top' === (t = t[0].toUpperCase() + t.substr(1)) || 'Left' === t
+ ? (e[o] += parseFloat(n['border' + t + 'Width']))
+ : (e[o] -= parseFloat(n['border' + t + 'Width']))
+ })
+ })(),
+ e
+ )
+ }
+ var E = (function () {
+ function t (t, e) {
+ for (var o = 0; o < e.length; o++) {
+ var i = e[o]
+ ;(i.enumerable = i.enumerable || !1),
+ (i.configurable = !0),
+ 'value' in i && (i.writable = !0),
+ Object.defineProperty(t, i.key, i)
+ }
+ }
+ return function (e, o, i) {
+ return o && t(e.prototype, o), i && t(e, i), e
+ }
+ })(),
+ x = void 0
+ void 0 === x && (x = { modules: [] })
+ var A = null,
+ T = (function () {
+ var t = 0
+ return function () {
+ return ++t
+ }
+ })(),
+ S = {},
+ P = function () {
+ var t = A
+ ;(t && document.body.contains(t)) ||
+ ((t = document.createElement('div')).setAttribute('data-tether-id', T()),
+ h(t.style, { top: 0, left: 0, position: 'absolute' }),
+ document.body.appendChild(t),
+ (A = t))
+ var e = t.getAttribute('data-tether-id')
+ return (
+ void 0 === S[e] &&
+ ((S[e] = n(t)),
+ k(function () {
+ delete S[e]
+ })),
+ S[e]
+ )
+ },
+ M = null,
+ W = [],
+ k = function (t) {
+ W.push(t)
+ },
+ _ = function () {
+ for (var t = void 0; (t = W.pop()); ) t()
+ },
+ B = (function () {
+ function t () {
+ i(this, t)
+ }
+ return (
+ E(t, [
+ {
+ key: 'on',
+ value: function (t, e, o) {
+ var i = !(arguments.length <= 3 || void 0 === arguments[3]) && arguments[3]
+ void 0 === this.bindings && (this.bindings = {}),
+ void 0 === this.bindings[t] && (this.bindings[t] = []),
+ this.bindings[t].push({ handler: e, ctx: o, once: i })
+ }
+ },
+ {
+ key: 'once',
+ value: function (t, e, o) {
+ this.on(t, e, o, !0)
+ }
+ },
+ {
+ key: 'off',
+ value: function (t, e) {
+ if (void 0 !== this.bindings && void 0 !== this.bindings[t])
+ if (void 0 === e) delete this.bindings[t]
+ else
+ for (var o = 0; o < this.bindings[t].length; )
+ this.bindings[t][o].handler === e ? this.bindings[t].splice(o, 1) : ++o
+ }
+ },
+ {
+ key: 'trigger',
+ value: function (t) {
+ if (void 0 !== this.bindings && this.bindings[t]) {
+ for (var e = 0, o = arguments.length, i = Array(o > 1 ? o - 1 : 0), n = 1; n < o; n++)
+ i[n - 1] = arguments[n]
+ for (; e < this.bindings[t].length; ) {
+ var r = this.bindings[t][e],
+ s = r.handler,
+ a = r.ctx,
+ f = r.once,
+ l = a
+ void 0 === l && (l = this), s.apply(l, i), f ? this.bindings[t].splice(e, 1) : ++e
+ }
+ }
+ }
+ }
+ ]),
+ t
+ )
+ })()
+ x.Utils = {
+ getActualBoundingClientRect: n,
+ getScrollParents: r,
+ getBounds: a,
+ getOffsetParent: f,
+ extend: h,
+ addClass: p,
+ removeClass: d,
+ hasClass: u,
+ updateClasses: m,
+ defer: k,
+ flush: _,
+ uniqueId: T,
+ Evented: B,
+ getScrollBarSize: l,
+ removeUtilElements: s
+ }
+ var z = function (e, o) {
+ if (Array.isArray(e)) return e
+ if (Symbol.iterator in Object(e))
+ return (function (t, e) {
+ var o = [],
+ i = !0,
+ n = !1,
+ r = void 0
+ try {
+ for (
+ var s, a = t[Symbol.iterator]();
+ !(i = (s = a.next()).done) && (o.push(s.value), !e || o.length !== e);
+ i = !0
+ );
+ } catch (f) {
+ ;(n = !0), (r = f)
+ } finally {
+ try {
+ !i && a.return && a.return()
+ } finally {
+ if (n) throw r
+ }
+ }
+ return o
+ })(e, o)
+ throw new TypeError('Invalid attempt to destructure non-iterable instance')
+ },
+ E = (function () {
+ function t (t, e) {
+ for (var o = 0; o < e.length; o++) {
+ var i = e[o]
+ ;(i.enumerable = i.enumerable || !1),
+ (i.configurable = !0),
+ 'value' in i && (i.writable = !0),
+ Object.defineProperty(t, i.key, i)
+ }
+ }
+ return function (e, o, i) {
+ return o && t(e.prototype, o), i && t(e, i), e
+ }
+ })(),
+ j = function (t, e, o) {
+ for (var i = !0; i; ) {
+ var n = t,
+ r = e,
+ s = o
+ ;(i = !1), null === n && (n = Function.prototype)
+ var a = Object.getOwnPropertyDescriptor(n, r)
+ if (void 0 !== a) {
+ if ('value' in a) return a.value
+ var f = a.get
+ if (void 0 === f) return
+ return f.call(s)
+ }
+ var l = Object.getPrototypeOf(n)
+ if (null === l) return
+ ;(t = l), (e = r), (o = s), (i = !0), (a = l = void 0)
+ }
+ }
+ if (void 0 === x) throw new Error('You must include the utils.js file before tether.js')
+ var r = (Y = x.Utils).getScrollParents,
+ a = Y.getBounds,
+ f = Y.getOffsetParent,
+ h = Y.extend,
+ p = Y.addClass,
+ d = Y.removeClass,
+ m = Y.updateClasses,
+ k = Y.defer,
+ _ = Y.flush,
+ l = Y.getScrollBarSize,
+ s = Y.removeUtilElements,
+ L = (function () {
+ if ('undefined' == typeof document) return ''
+ for (
+ var t = document.createElement('div'),
+ e = ['transform', 'WebkitTransform', 'OTransform', 'MozTransform', 'msTransform'],
+ o = 0;
+ o < e.length;
+ ++o
+ ) {
+ var i = e[o]
+ if (void 0 !== t.style[i]) return i
+ }
+ })(),
+ D = [],
+ X = function () {
+ D.forEach(function (t) {
+ t.position(!1)
+ }),
+ _()
+ }
+ !(function () {
+ var t = null,
+ e = null,
+ o = null,
+ i = function n () {
+ return void 0 !== e && e > 16
+ ? ((e = Math.min(e - 16, 250)), void (o = setTimeout(n, 250)))
+ : void (
+ (void 0 !== t && b() - t < 10) ||
+ (null != o && (clearTimeout(o), (o = null)), (t = b()), X(), (e = b() - t))
+ )
+ }
+ 'undefined' != typeof window &&
+ void 0 !== window.addEventListener &&
+ ['resize', 'scroll', 'touchmove'].forEach(function (t) {
+ window.addEventListener(t, i)
+ })
+ })()
+ var F = { center: 'center', left: 'right', right: 'left' },
+ H = { middle: 'middle', top: 'bottom', bottom: 'top' },
+ N = { top: 0, left: 0, middle: '50%', center: '50%', bottom: '100%', right: '100%' },
+ V = function (t) {
+ var e = t.left,
+ o = t.top
+ return void 0 !== N[t.left] && (e = N[t.left]), void 0 !== N[t.top] && (o = N[t.top]), { left: e, top: o }
+ },
+ R = function (t) {
+ var e = t.split(' '),
+ o = z(e, 2),
+ i = o[0],
+ n = o[1]
+ return { top: i, left: n }
+ },
+ q = R,
+ I = (function (t) {
+ function e (t) {
+ var o = this
+ i(this, e),
+ j(Object.getPrototypeOf(e.prototype), 'constructor', this).call(this),
+ (this.position = this.position.bind(this)),
+ D.push(this),
+ (this.history = []),
+ this.setOptions(t, !1),
+ x.modules.forEach(function (t) {
+ void 0 !== t.initialize && t.initialize.call(o)
+ }),
+ this.position()
+ }
+ return (
+ (function (t, e) {
+ if ('function' != typeof e && null !== e)
+ throw new TypeError('Super expression must either be null or a function, not ' + typeof e)
+ ;(t.prototype = Object.create(e && e.prototype, {
+ constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 }
+ })),
+ e && (Object.setPrototypeOf ? Object.setPrototypeOf(t, e) : (t.__proto__ = e))
+ })(e, t),
+ E(e, [
+ {
+ key: 'getClass',
+ value: function () {
+ var t = arguments.length <= 0 || void 0 === arguments[0] ? '' : arguments[0],
+ e = this.options.classes
+ return void 0 !== e && e[t]
+ ? this.options.classes[t]
+ : this.options.classPrefix
+ ? this.options.classPrefix + '-' + t
+ : t
+ }
+ },
+ {
+ key: 'setOptions',
+ value: function (t) {
+ var e = this,
+ o = arguments.length <= 1 || void 0 === arguments[1] || arguments[1]
+ this.options = h(
+ { offset: '0 0', targetOffset: '0 0', targetAttachment: 'auto auto', classPrefix: 'tether' },
+ t
+ )
+ var n = this.options,
+ s = n.element,
+ a = n.target,
+ f = n.targetModifier
+ if (
+ ((this.element = s),
+ (this.target = a),
+ (this.targetModifier = f),
+ 'viewport' === this.target
+ ? ((this.target = document.body), (this.targetModifier = 'visible'))
+ : 'scroll-handle' === this.target &&
+ ((this.target = document.body), (this.targetModifier = 'scroll-handle')),
+ ['element', 'target'].forEach(function (t) {
+ if (void 0 === e[t]) throw new Error('Tether Error: Both element and target must be defined')
+ void 0 !== e[t].jquery
+ ? (e[t] = e[t][0])
+ : 'string' == typeof e[t] && (e[t] = document.querySelector(e[t]))
+ }),
+ p(this.element, this.getClass('element')),
+ !1 !== this.options.addTargetClasses && p(this.target, this.getClass('target')),
+ !this.options.attachment)
+ )
+ throw new Error('Tether Error: You must provide an attachment')
+ ;(this.targetAttachment = q(this.options.targetAttachment)),
+ (this.attachment = q(this.options.attachment)),
+ (this.offset = R(this.options.offset)),
+ (this.targetOffset = R(this.options.targetOffset)),
+ void 0 !== this.scrollParents && this.disable(),
+ 'scroll-handle' === this.targetModifier
+ ? (this.scrollParents = [this.target])
+ : (this.scrollParents = r(this.target)),
+ !1 !== this.options.enabled && this.enable(o)
+ }
+ },
+ {
+ key: 'getTargetBounds',
+ value: function () {
+ if (void 0 === this.targetModifier) return a(this.target)
+ if ('visible' === this.targetModifier) {
+ if (this.target === document.body)
+ return { top: pageYOffset, left: pageXOffset, height: innerHeight, width: innerWidth }
+ var t = a(this.target),
+ e = { height: t.height, width: t.width, top: t.top, left: t.left }
+ return (
+ (e.height = Math.min(e.height, t.height - (pageYOffset - t.top))),
+ (e.height = Math.min(e.height, t.height - (t.top + t.height - (pageYOffset + innerHeight)))),
+ (e.height = Math.min(innerHeight, e.height)),
+ (e.height -= 2),
+ (e.width = Math.min(e.width, t.width - (pageXOffset - t.left))),
+ (e.width = Math.min(e.width, t.width - (t.left + t.width - (pageXOffset + innerWidth)))),
+ (e.width = Math.min(innerWidth, e.width)),
+ (e.width -= 2),
+ e.top < pageYOffset && (e.top = pageYOffset),
+ e.left < pageXOffset && (e.left = pageXOffset),
+ e
+ )
+ }
+ if ('scroll-handle' === this.targetModifier) {
+ var t = void 0,
+ o = this.target
+ o === document.body
+ ? ((o = document.documentElement),
+ (t = { left: pageXOffset, top: pageYOffset, height: innerHeight, width: innerWidth }))
+ : (t = a(o))
+ var i = getComputedStyle(o),
+ n =
+ o.scrollWidth > o.clientWidth ||
+ [i.overflow, i.overflowX].indexOf('scroll') >= 0 ||
+ this.target !== document.body,
+ r = 0
+ n && (r = 15)
+ var s = t.height - parseFloat(i.borderTopWidth) - parseFloat(i.borderBottomWidth) - r,
+ e = {
+ width: 15,
+ height: 0.975 * s * (s / o.scrollHeight),
+ left: t.left + t.width - parseFloat(i.borderLeftWidth) - 15
+ },
+ f = 0
+ s < 408 && this.target === document.body && (f = -11e-5 * Math.pow(s, 2) - 0.00727 * s + 22.58),
+ this.target !== document.body && (e.height = Math.max(e.height, 24))
+ var l = this.target.scrollTop / (o.scrollHeight - s)
+ return (
+ (e.top = l * (s - e.height - f) + t.top + parseFloat(i.borderTopWidth)),
+ this.target === document.body && (e.height = Math.max(e.height, 24)),
+ e
+ )
+ }
+ }
+ },
+ {
+ key: 'clearCache',
+ value: function () {
+ this._cache = {}
+ }
+ },
+ {
+ key: 'cache',
+ value: function (t, e) {
+ return (
+ void 0 === this._cache && (this._cache = {}),
+ void 0 === this._cache[t] && (this._cache[t] = e.call(this)),
+ this._cache[t]
+ )
+ }
+ },
+ {
+ key: 'enable',
+ value: function () {
+ var t = this,
+ e = arguments.length <= 0 || void 0 === arguments[0] || arguments[0]
+ !1 !== this.options.addTargetClasses && p(this.target, this.getClass('enabled')),
+ p(this.element, this.getClass('enabled')),
+ (this.enabled = !0),
+ this.scrollParents.forEach(function (e) {
+ e !== t.target.ownerDocument && e.addEventListener('scroll', t.position)
+ }),
+ e && this.position()
+ }
+ },
+ {
+ key: 'disable',
+ value: function () {
+ var t = this
+ d(this.target, this.getClass('enabled')),
+ d(this.element, this.getClass('enabled')),
+ (this.enabled = !1),
+ void 0 !== this.scrollParents &&
+ this.scrollParents.forEach(function (e) {
+ e.removeEventListener('scroll', t.position)
+ })
+ }
+ },
+ {
+ key: 'destroy',
+ value: function () {
+ var t = this
+ this.disable(),
+ D.forEach(function (e, o) {
+ e === t && D.splice(o, 1)
+ }),
+ 0 === D.length && s()
+ }
+ },
+ {
+ key: 'updateAttachClasses',
+ value: function (t, e) {
+ var o = this
+ ;(t = t || this.attachment),
+ (e = e || this.targetAttachment),
+ void 0 !== this._addAttachClasses &&
+ this._addAttachClasses.length &&
+ this._addAttachClasses.splice(0, this._addAttachClasses.length),
+ void 0 === this._addAttachClasses && (this._addAttachClasses = [])
+ var n = this._addAttachClasses
+ t.top && n.push(this.getClass('element-attached') + '-' + t.top),
+ t.left && n.push(this.getClass('element-attached') + '-' + t.left),
+ e.top && n.push(this.getClass('target-attached') + '-' + e.top),
+ e.left && n.push(this.getClass('target-attached') + '-' + e.left)
+ var r = []
+ ;['left', 'top', 'bottom', 'right', 'middle', 'center'].forEach(function (t) {
+ r.push(o.getClass('element-attached') + '-' + t),
+ r.push(o.getClass('target-attached') + '-' + t)
+ }),
+ k(function () {
+ void 0 !== o._addAttachClasses &&
+ (m(o.element, o._addAttachClasses, r),
+ !1 !== o.options.addTargetClasses && m(o.target, o._addAttachClasses, r),
+ delete o._addAttachClasses)
+ })
+ }
+ },
+ {
+ key: 'position',
+ value: function () {
+ var t = this,
+ e = arguments.length <= 0 || void 0 === arguments[0] || arguments[0]
+ if (this.enabled) {
+ this.clearCache()
+ var o = (function (t, e) {
+ var o = t.left,
+ i = t.top
+ return 'auto' === o && (o = F[e.left]), 'auto' === i && (i = H[e.top]), { left: o, top: i }
+ })(this.targetAttachment, this.attachment)
+ this.updateAttachClasses(this.attachment, o)
+ var i = this.cache('element-bounds', function () {
+ return a(t.element)
+ }),
+ n = i.width,
+ r = i.height
+ if (0 === n && 0 === r && void 0 !== this.lastSize) {
+ var s = this.lastSize
+ ;(n = s.width), (r = s.height)
+ } else this.lastSize = { width: n, height: r }
+ var h = this.cache('target-bounds', function () {
+ return t.getTargetBounds()
+ }),
+ d = h,
+ p = C(V(this.attachment), { width: n, height: r }),
+ u = C(V(o), d),
+ c = C(this.offset, { width: n, height: r }),
+ g = C(this.targetOffset, d)
+ ;(p = w(p, c)), (u = w(u, g))
+ for (
+ var m = h.left + u.left - p.left, v = h.top + u.top - p.top, y = 0;
+ y < x.modules.length;
+ ++y
+ ) {
+ var b = x.modules[y],
+ O = b.position.call(this, {
+ left: m,
+ top: v,
+ targetAttachment: o,
+ targetPos: h,
+ elementPos: i,
+ offset: p,
+ targetOffset: u,
+ manualOffset: c,
+ manualTargetOffset: g,
+ scrollbarSize: S,
+ attachment: this.attachment
+ })
+ if (!1 === O) return !1
+ void 0 !== O && 'object' == typeof O && ((v = O.top), (m = O.left))
+ }
+ var E = {
+ page: { top: v, left: m },
+ viewport: {
+ top: v - pageYOffset,
+ bottom: pageYOffset - v - r + innerHeight,
+ left: m - pageXOffset,
+ right: pageXOffset - m - n + innerWidth
+ }
+ },
+ A = this.target.ownerDocument,
+ T = A.defaultView,
+ S = void 0
+ return (
+ T.innerHeight > A.documentElement.clientHeight &&
+ ((S = this.cache('scrollbar-size', l)), (E.viewport.bottom -= S.height)),
+ T.innerWidth > A.documentElement.clientWidth &&
+ ((S = this.cache('scrollbar-size', l)), (E.viewport.right -= S.width)),
+ (-1 !== ['', 'static'].indexOf(A.body.style.position) &&
+ -1 !== ['', 'static'].indexOf(A.body.parentElement.style.position)) ||
+ ((E.page.bottom = A.body.scrollHeight - v - r),
+ (E.page.right = A.body.scrollWidth - m - n)),
+ void 0 !== this.options.optimizations &&
+ !1 !== this.options.optimizations.moveElement &&
+ void 0 === this.targetModifier &&
+ (function () {
+ var e = t.cache('target-offsetparent', function () {
+ return f(t.target)
+ }),
+ o = t.cache('target-offsetparent-bounds', function () {
+ return a(e)
+ }),
+ i = getComputedStyle(e),
+ n = o,
+ r = {}
+ if (
+ (['Top', 'Left', 'Bottom', 'Right'].forEach(function (t) {
+ r[t.toLowerCase()] = parseFloat(i['border' + t + 'Width'])
+ }),
+ (o.right = A.body.scrollWidth - o.left - n.width + r.right),
+ (o.bottom = A.body.scrollHeight - o.top - n.height + r.bottom),
+ E.page.top >= o.top + r.top &&
+ E.page.bottom >= o.bottom &&
+ E.page.left >= o.left + r.left &&
+ E.page.right >= o.right)
+ ) {
+ var s = e.scrollTop,
+ l = e.scrollLeft
+ E.offset = {
+ top: E.page.top - o.top + s - r.top,
+ left: E.page.left - o.left + l - r.left
+ }
+ }
+ })(),
+ this.move(E),
+ this.history.unshift(E),
+ this.history.length > 3 && this.history.pop(),
+ e && _(),
+ !0
+ )
+ }
+ }
+ },
+ {
+ key: 'move',
+ value: function (t) {
+ var e = this
+ if (void 0 !== this.element.parentNode) {
+ var o = {}
+ for (var i in t)
+ for (var n in ((o[i] = {}), t[i])) {
+ for (var r = !1, s = 0; s < this.history.length; ++s) {
+ var a = this.history[s]
+ if (void 0 !== a[i] && !y(a[i][n], t[i][n])) {
+ r = !0
+ break
+ }
+ }
+ r || (o[i][n] = !0)
+ }
+ var l = { top: '', left: '', right: '', bottom: '' },
+ d = function (t, o) {
+ var i = void 0 !== e.options.optimizations,
+ n = i ? e.options.optimizations.gpu : null
+ if (!1 !== n) {
+ var r = void 0,
+ s = void 0
+ if (
+ (t.top ? ((l.top = 0), (r = o.top)) : ((l.bottom = 0), (r = -o.bottom)),
+ t.left ? ((l.left = 0), (s = o.left)) : ((l.right = 0), (s = -o.right)),
+ window.matchMedia)
+ ) {
+ var a =
+ window.matchMedia('only screen and (min-resolution: 1.3dppx)').matches ||
+ window.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches
+ a || ((s = Math.round(s)), (r = Math.round(r)))
+ }
+ ;(l[L] = 'translateX(' + s + 'px) translateY(' + r + 'px)'),
+ 'msTransform' !== L && (l[L] += ' translateZ(0)')
+ } else
+ t.top ? (l.top = o.top + 'px') : (l.bottom = o.bottom + 'px'),
+ t.left ? (l.left = o.left + 'px') : (l.right = o.right + 'px')
+ },
+ p = !1
+ if (
+ ((o.page.top || o.page.bottom) && (o.page.left || o.page.right)
+ ? ((l.position = 'absolute'), d(o.page, t.page))
+ : (o.viewport.top || o.viewport.bottom) && (o.viewport.left || o.viewport.right)
+ ? ((l.position = 'fixed'), d(o.viewport, t.viewport))
+ : void 0 !== o.offset && o.offset.top && o.offset.left
+ ? (function () {
+ l.position = 'absolute'
+ var i = e.cache('target-offsetparent', function () {
+ return f(e.target)
+ })
+ f(e.element) !== i &&
+ k(function () {
+ e.element.parentNode.removeChild(e.element), i.appendChild(e.element)
+ }),
+ d(o.offset, t.offset),
+ (p = !0)
+ })()
+ : ((l.position = 'absolute'), d({ top: !0, left: !0 }, t.page)),
+ !p)
+ )
+ if (this.options.bodyElement) this.options.bodyElement.appendChild(this.element)
+ else {
+ for (
+ var u = !0, c = this.element.parentNode;
+ c && 1 === c.nodeType && 'BODY' !== c.tagName;
+
+ ) {
+ if ('static' !== getComputedStyle(c).position) {
+ u = !1
+ break
+ }
+ c = c.parentNode
+ }
+ u ||
+ (this.element.parentNode.removeChild(this.element),
+ this.element.ownerDocument.body.appendChild(this.element))
+ }
+ var g = {},
+ m = !1
+ for (var n in l) {
+ var v = l[n],
+ b = this.element.style[n]
+ b !== v && ((m = !0), (g[n] = v))
+ }
+ m &&
+ k(function () {
+ h(e.element.style, g), e.trigger('repositioned')
+ })
+ }
+ }
+ }
+ ]),
+ e
+ )
+ })(B)
+ ;(I.modules = []), (x.position = X)
+ var $ = h(I, x),
+ z = function (e, o) {
+ if (Array.isArray(e)) return e
+ if (Symbol.iterator in Object(e))
+ return (function (t, e) {
+ var o = [],
+ i = !0,
+ n = !1,
+ r = void 0
+ try {
+ for (
+ var s, a = t[Symbol.iterator]();
+ !(i = (s = a.next()).done) && (o.push(s.value), !e || o.length !== e);
+ i = !0
+ );
+ } catch (f) {
+ ;(n = !0), (r = f)
+ } finally {
+ try {
+ !i && a.return && a.return()
+ } finally {
+ if (n) throw r
+ }
+ }
+ return o
+ })(e, o)
+ throw new TypeError('Invalid attempt to destructure non-iterable instance')
+ },
+ a = (Y = x.Utils).getBounds,
+ h = Y.extend,
+ m = Y.updateClasses,
+ k = Y.defer,
+ G = ['left', 'top', 'right', 'bottom']
+ x.modules.push({
+ position: function (t) {
+ var e = this,
+ o = t.top,
+ i = t.left,
+ n = t.targetAttachment
+ if (!this.options.constraints) return !0
+ var r = this.cache('element-bounds', function () {
+ return a(e.element)
+ }),
+ s = r.height,
+ f = r.width
+ if (0 === f && 0 === s && void 0 !== this.lastSize) {
+ var l = this.lastSize
+ ;(f = l.width), (s = l.height)
+ }
+ var d = this.cache('target-bounds', function () {
+ return e.getTargetBounds()
+ }),
+ p = d.height,
+ u = d.width,
+ c = [this.getClass('pinned'), this.getClass('out-of-bounds')]
+ this.options.constraints.forEach(function (t) {
+ var e = t.outOfBoundsClass,
+ o = t.pinnedClass
+ e && c.push(e), o && c.push(o)
+ }),
+ c.forEach(function (t) {
+ ;['left', 'top', 'right', 'bottom'].forEach(function (e) {
+ c.push(t + '-' + e)
+ })
+ })
+ var g = [],
+ v = h({}, n),
+ y = h({}, this.attachment)
+ return (
+ this.options.constraints.forEach(function (t) {
+ var r = t.to,
+ a = t.attachment,
+ l = t.pin
+ void 0 === a && (a = '')
+ var h = void 0,
+ d = void 0
+ if (a.indexOf(' ') >= 0) {
+ var c = a.split(' '),
+ m = z(c, 2)
+ ;(d = m[0]), (h = m[1])
+ } else h = d = a
+ var b = O(e, r)
+ ;('target' !== d && 'both' !== d) ||
+ (o < b[1] && 'top' === v.top && ((o += p), (v.top = 'bottom')),
+ o + s > b[3] && 'bottom' === v.top && ((o -= p), (v.top = 'top'))),
+ 'together' === d &&
+ ('top' === v.top &&
+ ('bottom' === y.top && o < b[1]
+ ? ((o += p), (v.top = 'bottom'), (o += s), (y.top = 'top'))
+ : 'top' === y.top &&
+ o + s > b[3] &&
+ o - (s - p) >= b[1] &&
+ ((o -= s - p), (v.top = 'bottom'), (y.top = 'bottom'))),
+ 'bottom' === v.top &&
+ ('top' === y.top && o + s > b[3]
+ ? ((o -= p), (v.top = 'top'), (o -= s), (y.top = 'bottom'))
+ : 'bottom' === y.top &&
+ o < b[1] &&
+ o + (2 * s - p) <= b[3] &&
+ ((o += s - p), (v.top = 'top'), (y.top = 'top'))),
+ 'middle' === v.top &&
+ (o + s > b[3] && 'top' === y.top
+ ? ((o -= s), (y.top = 'bottom'))
+ : o < b[1] && 'bottom' === y.top && ((o += s), (y.top = 'top')))),
+ ('target' !== h && 'both' !== h) ||
+ (i < b[0] && 'left' === v.left && ((i += u), (v.left = 'right')),
+ i + f > b[2] && 'right' === v.left && ((i -= u), (v.left = 'left'))),
+ 'together' === h &&
+ (i < b[0] && 'left' === v.left
+ ? 'right' === y.left
+ ? ((i += u), (v.left = 'right'), (i += f), (y.left = 'left'))
+ : 'left' === y.left && ((i += u), (v.left = 'right'), (i -= f), (y.left = 'right'))
+ : i + f > b[2] && 'right' === v.left
+ ? 'left' === y.left
+ ? ((i -= u), (v.left = 'left'), (i -= f), (y.left = 'right'))
+ : 'right' === y.left && ((i -= u), (v.left = 'left'), (i += f), (y.left = 'left'))
+ : 'center' === v.left &&
+ (i + f > b[2] && 'left' === y.left
+ ? ((i -= f), (y.left = 'right'))
+ : i < b[0] && 'right' === y.left && ((i += f), (y.left = 'left')))),
+ ('element' !== d && 'both' !== d) ||
+ (o < b[1] && 'bottom' === y.top && ((o += s), (y.top = 'top')),
+ o + s > b[3] && 'top' === y.top && ((o -= s), (y.top = 'bottom'))),
+ ('element' !== h && 'both' !== h) ||
+ (i < b[0] &&
+ ('right' === y.left
+ ? ((i += f), (y.left = 'left'))
+ : 'center' === y.left && ((i += f / 2), (y.left = 'left'))),
+ i + f > b[2] &&
+ ('left' === y.left
+ ? ((i -= f), (y.left = 'right'))
+ : 'center' === y.left && ((i -= f / 2), (y.left = 'right')))),
+ 'string' == typeof l
+ ? (l = l.split(',').map(function (t) {
+ return t.trim()
+ }))
+ : !0 === l && (l = ['top', 'left', 'right', 'bottom']),
+ (l = l || [])
+ var w = [],
+ C = []
+ o < b[1] && (l.indexOf('top') >= 0 ? ((o = b[1]), w.push('top')) : C.push('top')),
+ o + s > b[3] && (l.indexOf('bottom') >= 0 ? ((o = b[3] - s), w.push('bottom')) : C.push('bottom')),
+ i < b[0] && (l.indexOf('left') >= 0 ? ((i = b[0]), w.push('left')) : C.push('left')),
+ i + f > b[2] && (l.indexOf('right') >= 0 ? ((i = b[2] - f), w.push('right')) : C.push('right')),
+ w.length &&
+ (function () {
+ var t = void 0
+ ;(t = void 0 !== e.options.pinnedClass ? e.options.pinnedClass : e.getClass('pinned')),
+ g.push(t),
+ w.forEach(function (e) {
+ g.push(t + '-' + e)
+ })
+ })(),
+ C.length &&
+ (function () {
+ var t = void 0
+ ;(t =
+ void 0 !== e.options.outOfBoundsClass
+ ? e.options.outOfBoundsClass
+ : e.getClass('out-of-bounds')),
+ g.push(t),
+ C.forEach(function (e) {
+ g.push(t + '-' + e)
+ })
+ })(),
+ (w.indexOf('left') >= 0 || w.indexOf('right') >= 0) && (y.left = v.left = !1),
+ (w.indexOf('top') >= 0 || w.indexOf('bottom') >= 0) && (y.top = v.top = !1),
+ (v.top === n.top &&
+ v.left === n.left &&
+ y.top === e.attachment.top &&
+ y.left === e.attachment.left) ||
+ (e.updateAttachClasses(y, v), e.trigger('update', { attachment: y, targetAttachment: v }))
+ }),
+ k(function () {
+ !1 !== e.options.addTargetClasses && m(e.target, g, c), m(e.element, g, c)
+ }),
+ { top: o, left: i }
+ )
+ }
+ })
+ var Y,
+ a = (Y = x.Utils).getBounds,
+ m = Y.updateClasses,
+ k = Y.defer
+ x.modules.push({
+ position: function (t) {
+ var e = this,
+ o = t.top,
+ i = t.left,
+ n = this.cache('element-bounds', function () {
+ return a(e.element)
+ }),
+ r = n.height,
+ s = n.width,
+ f = this.getTargetBounds(),
+ l = o + r,
+ h = i + s,
+ d = []
+ o <= f.bottom &&
+ l >= f.top &&
+ ['left', 'right'].forEach(function (t) {
+ var e = f[t]
+ ;(e !== i && e !== h) || d.push(t)
+ }),
+ i <= f.right &&
+ h >= f.left &&
+ ['top', 'bottom'].forEach(function (t) {
+ var e = f[t]
+ ;(e !== o && e !== l) || d.push(t)
+ })
+ var p = [],
+ u = []
+ return (
+ p.push(this.getClass('abutted')),
+ ['left', 'top', 'right', 'bottom'].forEach(function (t) {
+ p.push(e.getClass('abutted') + '-' + t)
+ }),
+ d.length && u.push(this.getClass('abutted')),
+ d.forEach(function (t) {
+ u.push(e.getClass('abutted') + '-' + t)
+ }),
+ k(function () {
+ !1 !== e.options.addTargetClasses && m(e.target, u, p), m(e.element, u, p)
+ }),
+ !0
+ )
+ }
+ })
+ var z = function (e, o) {
+ if (Array.isArray(e)) return e
+ if (Symbol.iterator in Object(e))
+ return (function (t, e) {
+ var o = [],
+ i = !0,
+ n = !1,
+ r = void 0
+ try {
+ for (
+ var s, a = t[Symbol.iterator]();
+ !(i = (s = a.next()).done) && (o.push(s.value), !e || o.length !== e);
+ i = !0
+ );
+ } catch (f) {
+ ;(n = !0), (r = f)
+ } finally {
+ try {
+ !i && a.return && a.return()
+ } finally {
+ if (n) throw r
+ }
+ }
+ return o
+ })(e, o)
+ throw new TypeError('Invalid attempt to destructure non-iterable instance')
+ }
+ return (
+ x.modules.push({
+ position: function (t) {
+ var e = t.top,
+ o = t.left
+ if (this.options.shift) {
+ var i = this.options.shift
+ 'function' == typeof this.options.shift && (i = this.options.shift.call(this, { top: e, left: o }))
+ var n = void 0,
+ r = void 0
+ if ('string' == typeof i) {
+ ;(i = i.split(' '))[1] = i[1] || i[0]
+ var s = i,
+ a = z(s, 2)
+ ;(n = a[0]), (r = a[1]), (n = parseFloat(n, 10)), (r = parseFloat(r, 10))
+ } else (n = i.top), (r = i.left)
+ return { top: (e += n), left: (o += r) }
+ }
+ }
+ }),
+ $
+ )
+ })
+ ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)
+ : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ },
+ function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__
+ ;(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(0)]),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function (a0) {
+ /** File generated by Grunt -- do not modify
+ * JQUERY-FORM-VALIDATOR
+ *
+ * @version 2.3.26
+ * @website http://formvalidator.net/
+ * @author Victor Jonsson, http://victorjonsson.se
+ * @license MIT
+ */
+ return (
+ (function ($, undefined) {
+ 'use strict'
+ ;($.fn.validateForm = function (language, conf) {
+ return (
+ $.formUtils.warn('Use of deprecated function $.validateForm, use $.isValid instead'),
+ this.isValid(language, conf, !0)
+ )
+ }),
+ $(window).on('validatorsLoaded formValidationSetup', function (evt, $form, config) {
+ $form || ($form = $('form')),
+ (function (config) {
+ config &&
+ 'custom' === config.errorMessagePosition &&
+ 'function' == typeof config.errorMessageCustom &&
+ ($.formUtils.warn(
+ 'Use of deprecated function errorMessageCustom, use config.submitErrorMessageCallback instead'
+ ),
+ (config.submitErrorMessageCallback = function ($form, errorMessages) {
+ config.errorMessageCustom($form, config.language.errorTitle, errorMessages, config)
+ }))
+ })(config),
+ (function (config) {
+ if (config.errorMessagePosition && 'object' == typeof config.errorMessagePosition) {
+ $.formUtils.warn(
+ 'Deprecated use of config parameter errorMessagePosition, use config.submitErrorMessageCallback instead'
+ )
+ var $errorMessageContainer = config.errorMessagePosition
+ ;(config.errorMessagePosition = 'top'),
+ (config.submitErrorMessageCallback = function () {
+ return $errorMessageContainer
+ })
+ }
+ })(config),
+ (function ($form) {
+ var $inputsDependingOnCheckedInputs = $form.find('[data-validation-if-checked]')
+ $inputsDependingOnCheckedInputs.length &&
+ $.formUtils.warn(
+ 'Detected use of attribute "data-validation-if-checked" which is deprecated. Use "data-validation-depends-on" provided by module "logic"'
+ ),
+ $inputsDependingOnCheckedInputs.on('beforeValidation', function () {
+ var $elem = $(this),
+ nameOfDependingInput = $elem.valAttr('if-checked'),
+ $dependingInput = $('input[name="' + nameOfDependingInput + '"]', $form),
+ dependingInputIsChecked = $dependingInput.is(':checked'),
+ valueOfDependingInput = ($.formUtils.getValue($dependingInput) || '').toString(),
+ requiredValueOfDependingInput = $elem.valAttr('if-checked-value')
+ ;(!dependingInputIsChecked ||
+ (requiredValueOfDependingInput &&
+ requiredValueOfDependingInput !== valueOfDependingInput)) &&
+ $elem.valAttr('skipped', !0)
+ })
+ })($form)
+ })
+ })((jQuery = a0)),
+ (function ($) {
+ 'use strict'
+ var dialogs = {
+ resolveErrorMessage: function ($elem, validator, validatorName, conf, language) {
+ var errorMsgAttr = conf.validationErrorMsgAttribute + '-' + validatorName.replace('validate_', ''),
+ validationErrorMsg = $elem.attr(errorMsgAttr)
+ return (
+ validationErrorMsg ||
+ (validationErrorMsg = $elem.attr(conf.validationErrorMsgAttribute)) ||
+ (validationErrorMsg =
+ 'function' != typeof validator.errorMessageKey
+ ? language[validator.errorMessageKey]
+ : language[validator.errorMessageKey(conf)]) ||
+ (validationErrorMsg = validator.errorMessage),
+ validationErrorMsg
+ )
+ },
+ getParentContainer: function ($elem) {
+ if ($elem.valAttr('error-msg-container')) return $($elem.valAttr('error-msg-container'))
+ var $parent = $elem.parent()
+ if (!$parent.hasClass('form-group') && !$parent.closest('form').hasClass('form-horizontal')) {
+ var $formGroup = $parent.closest('.form-group')
+ if ($formGroup.length) return $formGroup.eq(0)
+ }
+ return $parent
+ },
+ applyInputErrorStyling: function ($input, conf) {
+ $input.addClass(conf.errorElementClass).removeClass('valid'),
+ this.getParentContainer($input)
+ .addClass(conf.inputParentClassOnError)
+ .removeClass(conf.inputParentClassOnSuccess),
+ '' !== conf.borderColorOnError && $input.css('border-color', conf.borderColorOnError)
+ },
+ applyInputSuccessStyling: function ($input, conf) {
+ $input.addClass('valid'), this.getParentContainer($input).addClass(conf.inputParentClassOnSuccess)
+ },
+ removeInputStylingAndMessage: function ($input, conf) {
+ $input
+ .removeClass('valid')
+ .removeClass(conf.errorElementClass)
+ .css('border-color', '')
+ var $parentContainer = dialogs.getParentContainer($input)
+ if (
+ ($parentContainer
+ .removeClass(conf.inputParentClassOnError)
+ .removeClass(conf.inputParentClassOnSuccess),
+ 'function' == typeof conf.inlineErrorMessageCallback)
+ ) {
+ var $errorMessage = conf.inlineErrorMessageCallback($input, !1, conf)
+ $errorMessage && $errorMessage.html('')
+ } else $parentContainer.find('.' + conf.errorMessageClass).remove()
+ },
+ removeAllMessagesAndStyling: function ($form, conf) {
+ if ('function' == typeof conf.submitErrorMessageCallback) {
+ var $errorMessagesInTopOfForm = conf.submitErrorMessageCallback($form, conf)
+ $errorMessagesInTopOfForm && $errorMessagesInTopOfForm.html('')
+ } else $form.find('.' + conf.errorMessageClass + '.alert').remove()
+ $form.find('.' + conf.errorElementClass + ',.valid').each(function () {
+ dialogs.removeInputStylingAndMessage($(this), conf)
+ })
+ },
+ setInlineMessage: function ($input, errorMsg, conf) {
+ this.applyInputErrorStyling($input, conf)
+ var $message,
+ custom = document.getElementById($input.attr('name') + '_err_msg'),
+ $messageContainer = !1,
+ setErrorMessage = function ($elem) {
+ $.formUtils.$win.trigger('validationErrorDisplay', [$input, $elem]), $elem.html(errorMsg)
+ },
+ addErrorToMessageContainer = function () {
+ var $found = !1
+ $messageContainer.find('.' + conf.errorMessageClass).each(function () {
+ if (this.inputReferer === $input[0]) return ($found = $(this)), !1
+ }),
+ $found
+ ? errorMsg
+ ? setErrorMessage($found)
+ : $found.remove()
+ : '' !== errorMsg &&
+ (($message = $('
')),
+ setErrorMessage($message),
+ ($message[0].inputReferer = $input[0]),
+ $messageContainer.prepend($message))
+ }
+ if (custom)
+ $.formUtils.warn('Using deprecated element reference ' + custom.id),
+ ($messageContainer = $(custom)),
+ addErrorToMessageContainer()
+ else if ('function' == typeof conf.inlineErrorMessageCallback) {
+ if (!($messageContainer = conf.inlineErrorMessageCallback($input, errorMsg, conf))) return
+ addErrorToMessageContainer()
+ } else {
+ var $parent = this.getParentContainer($input)
+ 0 === ($message = $parent.find('.' + conf.errorMessageClass + '.help-block')).length &&
+ ($message = $('
')
+ .addClass('help-block')
+ .addClass(conf.errorMessageClass)).appendTo($parent),
+ setErrorMessage($message)
+ }
+ },
+ setMessageInTopOfForm: function ($form, errorMessages, conf, lang) {
+ var view =
+ '
',
+ $container = !1
+ if (
+ 'function' != typeof conf.submitErrorMessageCallback ||
+ ($container = conf.submitErrorMessageCallback($form, errorMessages, conf))
+ ) {
+ var viewParams = {
+ errorTitle: lang.errorTitle,
+ fields: '',
+ errorMessageClass: conf.errorMessageClass
+ }
+ $.each(errorMessages, function (i, msg) {
+ viewParams.fields += '
' + msg + ' '
+ }),
+ $.each(viewParams, function (param, value) {
+ view = view.replace('{' + param + '}', value)
+ }),
+ $container
+ ? $container.html(view)
+ : $form
+ .children()
+ .eq(0)
+ .before($(view))
+ }
+ }
+ }
+ $.formUtils = $.extend($.formUtils || {}, { dialogs })
+ })(jQuery),
+ (function ($, window, undefined) {
+ 'use strict'
+ var _helpers = 0
+ ;($.fn.validateOnBlur = function (language, conf) {
+ var $form = this,
+ $elems = this.find('*[data-validation]')
+ return (
+ $elems.each(function () {
+ var $this = $(this)
+ if ($this.is('[type=radio]')) {
+ var $additionals = $form.find('[type=radio][name="' + $this.attr('name') + '"]')
+ $additionals.bind('blur.validation', function () {
+ $this.validateInputOnBlur(language, conf, !0, 'blur')
+ }),
+ conf.validateCheckboxRadioOnClick &&
+ $additionals.bind('click.validation', function () {
+ $this.validateInputOnBlur(language, conf, !0, 'click')
+ })
+ }
+ }),
+ $elems.bind('blur.validation', function () {
+ $(this).validateInputOnBlur(language, conf, !0, 'blur')
+ }),
+ conf.validateCheckboxRadioOnClick &&
+ this.find('input[type=checkbox][data-validation],input[type=radio][data-validation]').bind(
+ 'click.validation',
+ function () {
+ $(this).validateInputOnBlur(language, conf, !0, 'click')
+ }
+ ),
+ this
+ )
+ }),
+ ($.fn.validateOnEvent = function (language, config) {
+ var $elements = 'FORM' === this[0].nodeName ? this.find('*[data-validation-event]') : this
+ return (
+ $elements.each(function () {
+ var $el = $(this),
+ etype = $el.valAttr('event')
+ etype &&
+ $el.unbind(etype + '.validation').bind(etype + '.validation', function (evt) {
+ 9 !== (evt || {}).keyCode && $(this).validateInputOnBlur(language, config, !0, etype)
+ })
+ }),
+ this
+ )
+ }),
+ ($.fn.showHelpOnFocus = function (attrName) {
+ return (
+ attrName || (attrName = 'data-validation-help'),
+ this.find('.has-help-txt')
+ .valAttr('has-keyup-event', !1)
+ .removeClass('has-help-txt'),
+ this.find('textarea,input').each(function () {
+ var $elem = $(this),
+ className = 'jquery_form_help_' + ++_helpers,
+ help = $elem.attr(attrName)
+ help &&
+ $elem
+ .addClass('has-help-txt')
+ .unbind('focus.help')
+ .bind('focus.help', function () {
+ var $help = $elem.parent().find('.' + className)
+ 0 === $help.length &&
+ (($help = $('
')
+ .addClass(className)
+ .addClass('help')
+ .addClass('help-block')
+ .text(help)
+ .hide()),
+ $elem.after($help)),
+ $help.fadeIn()
+ })
+ .unbind('blur.help')
+ .bind('blur.help', function () {
+ $(this)
+ .parent()
+ .find('.' + className)
+ .fadeOut('slow')
+ })
+ }),
+ this
+ )
+ }),
+ ($.fn.validate = function (cb, conf, lang) {
+ var language = $.extend({}, $.formUtils.LANG, lang || {})
+ this.each(function () {
+ var $elem = $(this),
+ formDefaultConfig = $elem.closest('form').get(0).validationConfig || {}
+ $elem.one('validation', function (evt, isValid) {
+ 'function' == typeof cb && cb(isValid, this, evt)
+ }),
+ $elem.validateInputOnBlur(language, $.extend({}, formDefaultConfig, conf || {}), !0)
+ })
+ }),
+ ($.fn.willPostponeValidation = function () {
+ return (
+ (this.valAttr('suggestion-nr') || this.valAttr('postpone') || this.hasClass('hasDatepicker')) &&
+ !window.postponedValidation
+ )
+ }),
+ ($.fn.validateInputOnBlur = function (language, conf, attachKeyupEvent, eventType) {
+ if ((($.formUtils.eventType = eventType), this.willPostponeValidation())) {
+ var _self = this,
+ postponeTime = this.valAttr('postpone') || 200
+ return (
+ (window.postponedValidation = function () {
+ _self.validateInputOnBlur(language, conf, attachKeyupEvent, eventType),
+ (window.postponedValidation = !1)
+ }),
+ setTimeout(function () {
+ window.postponedValidation && window.postponedValidation()
+ }, postponeTime),
+ this
+ )
+ }
+ ;(language = $.extend({}, $.formUtils.LANG, language || {})),
+ $.formUtils.dialogs.removeInputStylingAndMessage(this, conf)
+ var $form = this.closest('form'),
+ result = $.formUtils.validateInput(this, language, conf, $form, eventType)
+ return (
+ attachKeyupEvent && this.unbind('keyup.validation'),
+ result.shouldChangeDisplay &&
+ (result.isValid
+ ? $.formUtils.dialogs.applyInputSuccessStyling(this, conf)
+ : $.formUtils.dialogs.setInlineMessage(this, result.errorMsg, conf)),
+ !result.isValid &&
+ attachKeyupEvent &&
+ this.bind('keyup.validation', function (evt) {
+ 9 !== evt.keyCode && $(this).validateInputOnBlur(language, conf, !1, 'keyup')
+ }),
+ this
+ )
+ }),
+ ($.fn.valAttr = function (name, val) {
+ return void 0 === val
+ ? this.attr('data-validation-' + name)
+ : !1 === val || null === val
+ ? this.removeAttr('data-validation-' + name)
+ : ((name = name.length > 0 ? '-' + name : ''), this.attr('data-validation' + name, val))
+ }),
+ ($.fn.isValid = function (language, conf, displayError) {
+ if ($.formUtils.isLoadingModules) {
+ var $self = this
+ return (
+ setTimeout(function () {
+ $self.isValid(language, conf, displayError)
+ }, 200),
+ null
+ )
+ }
+ ;(conf = $.extend({}, $.formUtils.defaultConfig(), conf || {})),
+ (language = $.extend({}, $.formUtils.LANG, language || {})),
+ (displayError = !1 !== displayError),
+ $.formUtils.errorDisplayPreventedWhenHalted &&
+ (delete $.formUtils.errorDisplayPreventedWhenHalted, (displayError = !1)),
+ ($.formUtils.isValidatingEntireForm = !0),
+ ($.formUtils.haltValidation = !1)
+ var addErrorMessage = function (mess, $elem) {
+ $.inArray(mess, errorMessages) < 0 && errorMessages.push(mess),
+ errorInputs.push($elem),
+ $elem.attr('current-error', mess),
+ displayError && $.formUtils.dialogs.applyInputErrorStyling($elem, conf)
+ },
+ checkedInputs = [],
+ errorMessages = [],
+ errorInputs = [],
+ $form = this
+ if (
+ (displayError && $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf),
+ $form
+ .find('input,textarea,select')
+ .filter(':not([type="submit"],[type="button"])')
+ .each(function () {
+ var name,
+ type,
+ $elem = $(this),
+ elementType = $elem.attr('type'),
+ isCheckboxOrRadioBtn = 'radio' === elementType || 'checkbox' === elementType,
+ elementName = $elem.attr('name')
+ if (
+ ((name = elementName),
+ !(
+ 'submit' === (type = elementType) ||
+ 'button' === type ||
+ 'reset' === type ||
+ $.inArray(name, conf.ignore || []) > -1
+ ) &&
+ (!isCheckboxOrRadioBtn || $.inArray(elementName, checkedInputs) < 0))
+ ) {
+ isCheckboxOrRadioBtn && checkedInputs.push(elementName)
+ var result = $.formUtils.validateInput($elem, language, conf, $form, 'submit')
+ result.isValid
+ ? result.isValid &&
+ result.shouldChangeDisplay &&
+ ($elem.valAttr('current-error', !1),
+ $.formUtils.dialogs.applyInputSuccessStyling($elem, conf))
+ : addErrorMessage(result.errorMsg, $elem)
+ }
+ }),
+ 'function' == typeof conf.onValidate)
+ ) {
+ var errors = conf.onValidate($form)
+ $.isArray(errors)
+ ? $.each(errors, function (i, err) {
+ addErrorMessage(err.message, err.element)
+ })
+ : errors && errors.element && errors.message && addErrorMessage(errors.message, errors.element)
+ }
+ return (
+ ($.formUtils.isValidatingEntireForm = !1),
+ !$.formUtils.haltValidation && errorInputs.length > 0
+ ? (displayError &&
+ ('top' === conf.errorMessagePosition
+ ? $.formUtils.dialogs.setMessageInTopOfForm($form, errorMessages, conf, language)
+ : $.each(errorInputs, function (i, $input) {
+ $.formUtils.dialogs.setInlineMessage($input, $input.attr('current-error'), conf)
+ }),
+ conf.scrollToTopOnError && $.formUtils.$win.scrollTop($form.offset().top - 20)),
+ !1)
+ : (!displayError &&
+ $.formUtils.haltValidation &&
+ ($.formUtils.errorDisplayPreventedWhenHalted = !0),
+ !$.formUtils.haltValidation)
+ )
+ }),
+ ($.fn.restrictLength = function (maxLengthElement) {
+ return new $.formUtils.lengthRestriction(this, maxLengthElement), this
+ }),
+ ($.fn.addSuggestions = function (settings) {
+ var sugs = !1
+ return (
+ this.find('input').each(function () {
+ var $field = $(this)
+ ;(sugs = $.split($field.attr('data-suggestions'))).length > 0 &&
+ !$field.hasClass('has-suggestions') &&
+ ($.formUtils.suggest($field, sugs, settings), $field.addClass('has-suggestions'))
+ }),
+ this
+ )
+ })
+ })(jQuery, window),
+ (function ($) {
+ 'use strict'
+ $.formUtils = $.extend($.formUtils || {}, {
+ isLoadingModules: !1,
+ loadedModules: {},
+ loadModules: function (modules, path, callback) {
+ if ($.formUtils.isLoadingModules)
+ setTimeout(function () {
+ $.formUtils.loadModules(modules, path, callback)
+ }, 10)
+ else {
+ var hasLoadedAnyModule = !1,
+ loadModuleScripts = function (modules, path) {
+ var moduleList = $.split(modules),
+ numModules = moduleList.length,
+ moduleLoadedCallback = function () {
+ 0 == --numModules &&
+ (($.formUtils.isLoadingModules = !1),
+ callback && hasLoadedAnyModule && 'function' == typeof callback && callback())
+ }
+ numModules > 0 && ($.formUtils.isLoadingModules = !0)
+ var cacheSuffix = '?_=' + new Date().getTime(),
+ appendToElement =
+ document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]
+ $.each(moduleList, function (i, modName) {
+ if (0 === (modName = $.trim(modName)).length) moduleLoadedCallback()
+ else {
+ var scriptUrl = path + modName + ('.js' === modName.slice(-3) ? '' : '.js'),
+ script = document.createElement('SCRIPT')
+ scriptUrl in $.formUtils.loadedModules
+ ? moduleLoadedCallback()
+ : (($.formUtils.loadedModules[scriptUrl] = 1),
+ (hasLoadedAnyModule = !0),
+ (script.type = 'text/javascript'),
+ (script.onload = moduleLoadedCallback),
+ (script.src = scriptUrl + ('.dev.js' === scriptUrl.slice(-7) ? cacheSuffix : '')),
+ (script.onerror = function () {
+ $.formUtils.warn('Unable to load form validation module ' + scriptUrl)
+ }),
+ (script.onreadystatechange = function () {
+ ;('complete' !== this.readyState && 'loaded' !== this.readyState) ||
+ (moduleLoadedCallback(), (this.onload = null), (this.onreadystatechange = null))
+ }),
+ appendToElement.appendChild(script))
+ }
+ })
+ }
+ if (path) loadModuleScripts(modules, path)
+ else {
+ var findScriptPathAndLoadModules = function () {
+ var foundPath = !1
+ return (
+ $('script[src*="form-validator"]').each(function () {
+ return (
+ '/' == (foundPath = this.src.substr(0, this.src.lastIndexOf('/')) + '/') &&
+ (foundPath = ''),
+ !1
+ )
+ }),
+ !1 !== foundPath && (loadModuleScripts(modules, foundPath), !0)
+ )
+ }
+ findScriptPathAndLoadModules() || $(findScriptPathAndLoadModules)
+ }
+ }
+ }
+ })
+ })(jQuery),
+ (function ($) {
+ 'use strict'
+ ;($.split = function (val, callback) {
+ if ('function' != typeof callback) {
+ if (!val) return []
+ var values = []
+ return (
+ $.each(val.split(callback || /[,|\-\s]\s*/g), function (i, str) {
+ ;(str = $.trim(str)).length && values.push(str)
+ }),
+ values
+ )
+ }
+ val &&
+ $.each(val.split(/[,|\-\s]\s*/g), function (i, str) {
+ if ((str = $.trim(str)).length) return callback(str, i)
+ })
+ }),
+ ($.validate = function (conf) {
+ var defaultConf = $.extend($.formUtils.defaultConfig(), {
+ form: 'form',
+ validateOnEvent: !1,
+ validateOnBlur: !0,
+ validateCheckboxRadioOnClick: !0,
+ showHelpOnFocus: !0,
+ addSuggestions: !0,
+ modules: '',
+ onModulesLoaded: null,
+ language: !1,
+ onSuccess: !1,
+ onError: !1,
+ onElementValidate: !1
+ })
+ if ((conf = $.extend(defaultConf, conf || {})).lang && 'en' !== conf.lang) {
+ var langModule = 'lang/' + conf.lang + '.js'
+ conf.modules += conf.modules.length ? ',' + langModule : langModule
+ }
+ $(conf.form).each(function (i, form) {
+ form.validationConfig = conf
+ var $form = $(form)
+ $form.trigger('formValidationSetup', [$form, conf]),
+ $form
+ .find('.has-help-txt')
+ .unbind('focus.validation')
+ .unbind('blur.validation'),
+ $form
+ .removeClass('has-validation-callback')
+ .unbind('submit.validation')
+ .unbind('reset.validation')
+ .find('input[data-validation],textarea[data-validation]')
+ .unbind('blur.validation'),
+ $form
+ .bind('submit.validation', function (evt) {
+ var $form = $(this),
+ stop = function () {
+ return evt.stopImmediatePropagation(), !1
+ }
+ if ($.formUtils.haltValidation) return stop()
+ if ($.formUtils.isLoadingModules)
+ return (
+ setTimeout(function () {
+ $form.trigger('submit.validation')
+ }, 200),
+ stop()
+ )
+ var valid = $form.isValid(conf.language, conf)
+ if ($.formUtils.haltValidation) return stop()
+ if (!valid || 'function' != typeof conf.onSuccess)
+ return valid || 'function' != typeof conf.onError
+ ? !!valid || stop()
+ : (conf.onError($form), stop())
+ var callbackResponse = conf.onSuccess($form)
+ return !1 === callbackResponse ? stop() : void 0
+ })
+ .bind('reset.validation', function () {
+ $.formUtils.dialogs.removeAllMessagesAndStyling($form, conf)
+ })
+ .addClass('has-validation-callback'),
+ conf.showHelpOnFocus && $form.showHelpOnFocus(),
+ conf.addSuggestions && $form.addSuggestions(),
+ conf.validateOnBlur &&
+ ($form.validateOnBlur(conf.language, conf),
+ $form.bind('html5ValidationAttrsFound', function () {
+ $form.validateOnBlur(conf.language, conf)
+ })),
+ conf.validateOnEvent && $form.validateOnEvent(conf.language, conf)
+ }),
+ '' !== conf.modules &&
+ $.formUtils.loadModules(conf.modules, !1, function () {
+ 'function' == typeof conf.onModulesLoaded && conf.onModulesLoaded()
+ var $form = 'string' == typeof conf.form ? $(conf.form) : conf.form
+ $.formUtils.$win.trigger('validatorsLoaded', [$form, conf])
+ })
+ })
+ })(jQuery),
+ (function ($, window) {
+ 'use strict'
+ var $win = $(window)
+ $.formUtils = $.extend($.formUtils || {}, {
+ $win,
+ defaultConfig: function () {
+ return {
+ ignore: [],
+ errorElementClass: 'error',
+ borderColorOnError: '#b94a48',
+ errorMessageClass: 'form-error',
+ validationRuleAttribute: 'data-validation',
+ validationErrorMsgAttribute: 'data-validation-error-msg',
+ errorMessagePosition: 'inline',
+ errorMessageTemplate: {
+ container: '
{messages}
',
+ messages: '
{errorTitle} ',
+ field: '
{msg} '
+ },
+ scrollToTopOnError: !0,
+ dateFormat: 'yyyy-mm-dd',
+ addValidClassOnAll: !1,
+ decimalSeparator: '.',
+ inputParentClassOnError: 'has-error',
+ inputParentClassOnSuccess: 'has-success',
+ validateHiddenInputs: !1,
+ inlineErrorMessageCallback: !1,
+ submitErrorMessageCallback: !1
+ }
+ },
+ validators: {},
+ _events: { load: [], valid: [], invalid: [] },
+ haltValidation: !1,
+ isValidatingEntireForm: !1,
+ addValidator: function (validator) {
+ var name = 0 === validator.name.indexOf('validate_') ? validator.name : 'validate_' + validator.name
+ void 0 === validator.validateOnKeyUp && (validator.validateOnKeyUp = !0),
+ (this.validators[name] = validator)
+ },
+ warn: function (msg) {
+ 'console' in window
+ ? 'function' == typeof window.console.warn
+ ? window.console.warn(msg)
+ : 'function' == typeof window.console.log && window.console.log(msg)
+ : alert(msg)
+ },
+ getValue: function (query, $parent) {
+ var $inputs = $parent ? $parent.find(query) : query
+ if ($inputs.length > 0) {
+ var type = $inputs.eq(0).attr('type')
+ return 'radio' === type || 'checkbox' === type ? $inputs.filter(':checked').val() : $inputs.val()
+ }
+ return !1
+ },
+ validateInput: function ($elem, language, conf, $form, eventContext) {
+ ;(conf = conf || $.formUtils.defaultConfig()), (language = language || $.formUtils.LANG)
+ var value = this.getValue($elem)
+ $elem
+ .valAttr('skipped', !1)
+ .one('beforeValidation', function () {
+ ;($elem.attr('disabled') || (!$elem.is(':visible') && !conf.validateHiddenInputs)) &&
+ $elem.valAttr('skipped', 1)
+ })
+ .trigger('beforeValidation', [value, conf, language])
+ var inputIsOptional = 'true' === $elem.valAttr('optional'),
+ skipBecauseItsEmpty = !value && inputIsOptional,
+ validationRules = $elem.attr(conf.validationRuleAttribute),
+ isValid = !0,
+ errorMsg = '',
+ result = { isValid: !0, shouldChangeDisplay: !0, errorMsg: '' }
+ if (!validationRules || skipBecauseItsEmpty || $elem.valAttr('skipped'))
+ return (result.shouldChangeDisplay = conf.addValidClassOnAll), result
+ var ignore = $elem.valAttr('ignore')
+ return (
+ ignore &&
+ $.each(ignore.split(''), function (i, char) {
+ value = value.replace(new RegExp('\\' + char), '')
+ }),
+ $.split(
+ validationRules,
+ function (rule) {
+ 0 !== rule.indexOf('validate_') && (rule = 'validate_' + rule)
+ var validator = $.formUtils.validators[rule]
+ if (!validator)
+ throw new Error(
+ 'Using undefined validator "' +
+ rule +
+ '". Maybe you have forgotten to load the module that "' +
+ rule +
+ '" belongs to?'
+ )
+ if (
+ ('validate_checkbox_group' === rule &&
+ ($elem = $form.find('[name="' + $elem.attr('name') + '"]:eq(0)')),
+ ('keyup' !== eventContext || validator.validateOnKeyUp) &&
+ (isValid = validator.validatorFunction(value, $elem, conf, language, $form)),
+ !isValid)
+ )
+ return (
+ (errorMsg = $.formUtils.dialogs.resolveErrorMessage(
+ $elem,
+ validator,
+ rule,
+ conf,
+ language
+ )),
+ !1
+ )
+ },
+ ' '
+ ),
+ !1 === isValid
+ ? ($elem.trigger('validation', !1),
+ (result.errorMsg = errorMsg),
+ (result.isValid = !1),
+ (result.shouldChangeDisplay = !0))
+ : null === isValid
+ ? (result.shouldChangeDisplay = !1)
+ : ($elem.trigger('validation', !0), (result.shouldChangeDisplay = !0)),
+ 'function' == typeof conf.onElementValidate &&
+ null !== errorMsg &&
+ conf.onElementValidate(result.isValid, $elem, $form, errorMsg),
+ $elem.trigger('afterValidation', [result, eventContext]),
+ result
+ )
+ },
+ parseDate: function (val, dateFormat, addMissingLeadingZeros) {
+ var matches,
+ day,
+ month,
+ year,
+ divider = dateFormat.replace(/[a-zA-Z]/gi, '').substring(0, 1),
+ regexp = '^',
+ formatParts = dateFormat.split(divider || null)
+ if (
+ ($.each(formatParts, function (i, part) {
+ regexp += (i > 0 ? '\\' + divider : '') + '(\\d{' + part.length + '})'
+ }),
+ (regexp += '$'),
+ addMissingLeadingZeros)
+ ) {
+ var newValueParts = []
+ $.each(val.split(divider), function (i, part) {
+ 1 === part.length && (part = '0' + part), newValueParts.push(part)
+ }),
+ (val = newValueParts.join(divider))
+ }
+ if (null === (matches = val.match(new RegExp(regexp)))) return !1
+ var findDateUnit = function (unit, formatParts, matches) {
+ for (var i = 0; i < formatParts.length; i++)
+ if (formatParts[i].substring(0, 1) === unit) return $.formUtils.parseDateInt(matches[i + 1])
+ return -1
+ }
+ return (
+ (month = findDateUnit('m', formatParts, matches)),
+ (day = findDateUnit('d', formatParts, matches)),
+ (year = findDateUnit('y', formatParts, matches)),
+ !(
+ (2 === month && day > 28 && (year % 4 != 0 || (year % 100 == 0 && year % 400 != 0))) ||
+ (2 === month && day > 29 && (year % 4 == 0 || (year % 100 != 0 && year % 400 == 0))) ||
+ month > 12 ||
+ 0 === month
+ ) &&
+ !(
+ (this.isShortMonth(month) && day > 30) ||
+ (!this.isShortMonth(month) && day > 31) ||
+ 0 === day
+ ) && [year, month, day]
+ )
+ },
+ parseDateInt: function (val) {
+ return 0 === val.indexOf('0') && (val = val.replace('0', '')), parseInt(val, 10)
+ },
+ isShortMonth: function (m) {
+ return (m % 2 == 0 && m < 7) || (m % 2 != 0 && m > 7)
+ },
+ lengthRestriction: function ($inputElement, $maxLengthElement) {
+ var maxChars = parseInt($maxLengthElement.text(), 10),
+ charsLeft = 0,
+ countCharacters = function () {
+ var numChars = $inputElement.val().length
+ if (numChars > maxChars) {
+ var currScrollTopPos = $inputElement.scrollTop()
+ $inputElement.val($inputElement.val().substring(0, maxChars)),
+ $inputElement.scrollTop(currScrollTopPos)
+ }
+ ;(charsLeft = maxChars - numChars) < 0 && (charsLeft = 0), $maxLengthElement.text(charsLeft)
+ }
+ $($inputElement)
+ .bind('keydown keyup keypress focus blur', countCharacters)
+ .bind('cut paste', function () {
+ setTimeout(countCharacters, 100)
+ }),
+ $(document).bind('ready', countCharacters)
+ },
+ numericRangeCheck: function (value, rangeAllowed) {
+ var range = $.split(rangeAllowed),
+ minmax = parseInt(rangeAllowed.substr(3), 10)
+ return (
+ 1 === range.length &&
+ -1 === rangeAllowed.indexOf('min') &&
+ -1 === rangeAllowed.indexOf('max') &&
+ (range = [rangeAllowed, rangeAllowed]),
+ 2 === range.length && (value < parseInt(range[0], 10) || value > parseInt(range[1], 10))
+ ? ['out', range[0], range[1]]
+ : 0 === rangeAllowed.indexOf('min') && value < minmax
+ ? ['min', minmax]
+ : 0 === rangeAllowed.indexOf('max') && value > minmax
+ ? ['max', minmax]
+ : ['ok']
+ )
+ },
+ _numSuggestionElements: 0,
+ _selectedSuggestion: null,
+ _previousTypedVal: null,
+ suggest: function ($elem, suggestions, settings) {
+ var conf = {
+ css: {
+ maxHeight: '150px',
+ background: '#FFF',
+ lineHeight: '150%',
+ textDecoration: 'underline',
+ overflowX: 'hidden',
+ overflowY: 'auto',
+ border: '#CCC solid 1px',
+ borderTop: 'none',
+ cursor: 'pointer'
+ },
+ activeSuggestionCSS: { background: '#E9E9E9' }
+ },
+ setSuggsetionPosition = function ($suggestionContainer, $input) {
+ var offset = $input.offset()
+ $suggestionContainer.css({
+ width: $input.outerWidth(),
+ left: offset.left + 'px',
+ top: offset.top + $input.outerHeight() + 'px'
+ })
+ }
+ settings && $.extend(conf, settings),
+ (conf.css.position = 'absolute'),
+ (conf.css['z-index'] = 9999),
+ $elem.attr('autocomplete', 'off'),
+ 0 === this._numSuggestionElements &&
+ $win.bind('resize', function () {
+ $('.jquery-form-suggestions').each(function () {
+ var $container = $(this),
+ suggestID = $container.attr('data-suggest-container')
+ setSuggsetionPosition($container, $('.suggestions-' + suggestID).eq(0))
+ })
+ }),
+ this._numSuggestionElements++
+ var onSelectSuggestion = function ($el) {
+ var suggestionId = $el.valAttr('suggestion-nr')
+ ;($.formUtils._selectedSuggestion = null),
+ ($.formUtils._previousTypedVal = null),
+ $('.jquery-form-suggestion-' + suggestionId).fadeOut('fast')
+ }
+ return (
+ $elem
+ .data('suggestions', suggestions)
+ .valAttr('suggestion-nr', this._numSuggestionElements)
+ .unbind('focus.suggest')
+ .bind('focus.suggest', function () {
+ $(this).trigger('keyup'), ($.formUtils._selectedSuggestion = null)
+ })
+ .unbind('keyup.suggest')
+ .bind('keyup.suggest', function () {
+ var $input = $(this),
+ foundSuggestions = [],
+ val = $.trim($input.val()).toLocaleLowerCase()
+ if (val !== $.formUtils._previousTypedVal) {
+ $.formUtils._previousTypedVal = val
+ var hasTypedSuggestion = !1,
+ suggestionId = $input.valAttr('suggestion-nr'),
+ $suggestionContainer = $('.jquery-form-suggestion-' + suggestionId)
+ if (($suggestionContainer.scrollTop(0), '' !== val)) {
+ var findPartial = val.length > 2
+ $.each($input.data('suggestions'), function (i, suggestion) {
+ var lowerCaseVal = suggestion.toLocaleLowerCase()
+ if (lowerCaseVal === val)
+ return (
+ foundSuggestions.push('
' + suggestion + ' '),
+ (hasTypedSuggestion = !0),
+ !1
+ )
+ ;(0 === lowerCaseVal.indexOf(val) || (findPartial && lowerCaseVal.indexOf(val) > -1)) &&
+ foundSuggestions.push(suggestion.replace(new RegExp(val, 'gi'), '
$& '))
+ })
+ }
+ hasTypedSuggestion || (0 === foundSuggestions.length && $suggestionContainer.length > 0)
+ ? $suggestionContainer.hide()
+ : foundSuggestions.length > 0 && 0 === $suggestionContainer.length
+ ? (($suggestionContainer = $('
')
+ .css(conf.css)
+ .appendTo('body')),
+ $elem.addClass('suggestions-' + suggestionId),
+ $suggestionContainer
+ .attr('data-suggest-container', suggestionId)
+ .addClass('jquery-form-suggestions')
+ .addClass('jquery-form-suggestion-' + suggestionId))
+ : foundSuggestions.length > 0 &&
+ !$suggestionContainer.is(':visible') &&
+ $suggestionContainer.show(),
+ foundSuggestions.length > 0 &&
+ val.length !== foundSuggestions[0].length &&
+ (setSuggsetionPosition($suggestionContainer, $input),
+ $suggestionContainer.html(''),
+ $.each(foundSuggestions, function (i, text) {
+ $('
')
+ .append(text)
+ .css({
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ padding: '5px'
+ })
+ .addClass('form-suggest-element')
+ .appendTo($suggestionContainer)
+ .click(function () {
+ $input.focus(),
+ $input.val($(this).text()),
+ $input.trigger('change'),
+ onSelectSuggestion($input)
+ })
+ }))
+ }
+ })
+ .unbind('keydown.validation')
+ .bind('keydown.validation', function (e) {
+ var suggestionId,
+ $suggestionContainer,
+ code = e.keyCode ? e.keyCode : e.which,
+ $input = $(this)
+ if (13 === code && null !== $.formUtils._selectedSuggestion) {
+ if (
+ ((suggestionId = $input.valAttr('suggestion-nr')),
+ ($suggestionContainer = $('.jquery-form-suggestion-' + suggestionId)).length > 0)
+ ) {
+ var newText = $suggestionContainer
+ .find('div')
+ .eq($.formUtils._selectedSuggestion)
+ .text()
+ $input.val(newText),
+ $input.trigger('change'),
+ onSelectSuggestion($input),
+ e.preventDefault()
+ }
+ } else {
+ suggestionId = $input.valAttr('suggestion-nr')
+ var $suggestions = ($suggestionContainer = $(
+ '.jquery-form-suggestion-' + suggestionId
+ )).children()
+ if ($suggestions.length > 0 && $.inArray(code, [38, 40]) > -1) {
+ 38 === code
+ ? (null === $.formUtils._selectedSuggestion
+ ? ($.formUtils._selectedSuggestion = $suggestions.length - 1)
+ : $.formUtils._selectedSuggestion--,
+ $.formUtils._selectedSuggestion < 0 &&
+ ($.formUtils._selectedSuggestion = $suggestions.length - 1))
+ : 40 === code &&
+ (null === $.formUtils._selectedSuggestion
+ ? ($.formUtils._selectedSuggestion = 0)
+ : $.formUtils._selectedSuggestion++,
+ $.formUtils._selectedSuggestion > $suggestions.length - 1 &&
+ ($.formUtils._selectedSuggestion = 0))
+ var containerInnerHeight = $suggestionContainer.innerHeight(),
+ containerScrollTop = $suggestionContainer.scrollTop(),
+ suggestionHeight = $suggestionContainer
+ .children()
+ .eq(0)
+ .outerHeight(),
+ activeSuggestionPosY = suggestionHeight * $.formUtils._selectedSuggestion
+ return (
+ (activeSuggestionPosY < containerScrollTop ||
+ activeSuggestionPosY > containerScrollTop + containerInnerHeight) &&
+ $suggestionContainer.scrollTop(activeSuggestionPosY),
+ $suggestions
+ .removeClass('active-suggestion')
+ .css('background', 'none')
+ .eq($.formUtils._selectedSuggestion)
+ .addClass('active-suggestion')
+ .css(conf.activeSuggestionCSS),
+ e.preventDefault(),
+ !1
+ )
+ }
+ }
+ })
+ .unbind('blur.suggest')
+ .bind('blur.suggest', function () {
+ onSelectSuggestion($(this))
+ }),
+ $elem
+ )
+ },
+ LANG: {
+ errorTitle: 'Form submission failed!',
+ requiredField: 'This is a required field',
+ requiredFields: 'You have not answered all required fields',
+ badTime: 'You have not given a correct time',
+ badEmail: 'You have not given a correct e-mail address',
+ badTelephone: 'You have not given a correct phone number',
+ badSecurityAnswer: 'You have not given a correct answer to the security question',
+ badDate: 'You have not given a correct date',
+ lengthBadStart: 'The input value must be between ',
+ lengthBadEnd: ' characters',
+ lengthTooLongStart: 'The input value is longer than ',
+ lengthTooShortStart: 'The input value is shorter than ',
+ notConfirmed: 'Input values could not be confirmed',
+ badDomain: 'Incorrect domain value',
+ badUrl: 'The input value is not a correct URL',
+ badCustomVal: 'The input value is incorrect',
+ andSpaces: ' and spaces ',
+ badInt: 'The input value was not a correct number',
+ badSecurityNumber: 'Your social security number was incorrect',
+ badUKVatAnswer: 'Incorrect UK VAT Number',
+ badUKNin: 'Incorrect UK NIN',
+ badUKUtr: 'Incorrect UK UTR Number',
+ badStrength: "The password isn't strong enough",
+ badNumberOfSelectedOptionsStart: 'You have to choose at least ',
+ badNumberOfSelectedOptionsEnd: ' answers',
+ badAlphaNumeric: 'The input value can only contain alphanumeric characters ',
+ badAlphaNumericExtra: ' and ',
+ wrongFileSize: 'The file you are trying to upload is too large (max %s)',
+ wrongFileType: 'Only files of type %s is allowed',
+ groupCheckedRangeStart: 'Please choose between ',
+ groupCheckedTooFewStart: 'Please choose at least ',
+ groupCheckedTooManyStart: 'Please choose a maximum of ',
+ groupCheckedEnd: ' item(s)',
+ badCreditCard: 'The credit card number is not correct',
+ badCVV: 'The CVV number was not correct',
+ wrongFileDim: 'Incorrect image dimensions,',
+ imageTooTall: 'the image can not be taller than',
+ imageTooWide: 'the image can not be wider than',
+ imageTooSmall: 'the image was too small',
+ min: 'min',
+ max: 'max',
+ imageRatioNotAccepted: 'Image ratio is not be accepted',
+ badBrazilTelephoneAnswer: 'The phone number entered is invalid',
+ badBrazilCEPAnswer: 'The CEP entered is invalid',
+ badBrazilCPFAnswer: 'The CPF entered is invalid',
+ badPlPesel: 'The PESEL entered is invalid',
+ badPlNip: 'The NIP entered is invalid',
+ badPlRegon: 'The REGON entered is invalid',
+ badreCaptcha: 'Please confirm that you are not a bot'
+ }
+ })
+ })(jQuery, window),
+ ($ = jQuery).formUtils.addValidator({
+ name: 'email',
+ validatorFunction: function (email) {
+ var emailParts = email.toLowerCase().split('@'),
+ localPart = emailParts[0],
+ domain = emailParts[1]
+ if (localPart && domain) {
+ if (0 === localPart.indexOf('"')) {
+ var len = localPart.length
+ if ((localPart = localPart.replace(/\"/g, '')).length !== len - 2) return !1
+ }
+ return (
+ $.formUtils.validators.validate_domain.validatorFunction(emailParts[1]) &&
+ 0 !== localPart.indexOf('.') &&
+ '.' !== localPart.substring(localPart.length - 1, localPart.length) &&
+ -1 === localPart.indexOf('..') &&
+ !/[^\w\+\.\-\#\-\_\~\!\$\&\'\(\)\*\+\,\;\=\:]/.test(localPart)
+ )
+ }
+ return !1
+ },
+ errorMessage: '',
+ errorMessageKey: 'badEmail'
+ }),
+ $.formUtils.addValidator({
+ name: 'domain',
+ validatorFunction: function (val) {
+ return (
+ val.length > 0 &&
+ val.length <= 253 &&
+ !/[^a-zA-Z0-9]/.test(val.slice(-2)) &&
+ !/[^a-zA-Z0-9]/.test(val.substr(0, 1)) &&
+ !/[^a-zA-Z0-9\.\-]/.test(val) &&
+ 1 === val.split('..').length &&
+ val.split('.').length > 1
+ )
+ },
+ errorMessage: '',
+ errorMessageKey: 'badDomain'
+ }),
+ $.formUtils.addValidator({
+ name: 'required',
+ validatorFunction: function (val, $el, config, language, $form) {
+ switch ($el.attr('type')) {
+ case 'checkbox':
+ return $el.is(':checked')
+ case 'radio':
+ return $form.find('input[name="' + $el.attr('name') + '"]').filter(':checked').length > 0
+ default:
+ return '' !== $.trim(val)
+ }
+ },
+ errorMessage: '',
+ errorMessageKey: function (config) {
+ return 'top' === config.errorMessagePosition || 'function' == typeof config.errorMessagePosition
+ ? 'requiredFields'
+ : 'requiredField'
+ }
+ }),
+ $.formUtils.addValidator({
+ name: 'length',
+ validatorFunction: function (val, $el, conf, lang) {
+ var lengthAllowed = $el.valAttr('length'),
+ type = $el.attr('type')
+ if (void 0 === lengthAllowed)
+ return (
+ alert(
+ 'Please add attribute "data-validation-length" to ' +
+ $el[0].nodeName +
+ ' named ' +
+ $el.attr('name')
+ ),
+ !0
+ )
+ var checkResult,
+ len = 'file' === type && void 0 !== $el.get(0).files ? $el.get(0).files.length : val.length,
+ lengthCheckResults = $.formUtils.numericRangeCheck(len, lengthAllowed)
+ switch (lengthCheckResults[0]) {
+ case 'out':
+ ;(this.errorMessage = lang.lengthBadStart + lengthAllowed + lang.lengthBadEnd), (checkResult = !1)
+ break
+ case 'min':
+ ;(this.errorMessage = lang.lengthTooShortStart + lengthCheckResults[1] + lang.lengthBadEnd),
+ (checkResult = !1)
+ break
+ case 'max':
+ ;(this.errorMessage = lang.lengthTooLongStart + lengthCheckResults[1] + lang.lengthBadEnd),
+ (checkResult = !1)
+ break
+ default:
+ checkResult = !0
+ }
+ return checkResult
+ },
+ errorMessage: '',
+ errorMessageKey: ''
+ }),
+ $.formUtils.addValidator({
+ name: 'url',
+ validatorFunction: function (url) {
+ if (
+ /^(https?|ftp):\/\/((((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])(\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|\[|\]|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#(((\w|-|\.|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(
+ url
+ )
+ ) {
+ var domain = url.split('://')[1],
+ domainSlashPos = domain.indexOf('/')
+ return (
+ domainSlashPos > -1 && (domain = domain.substr(0, domainSlashPos)),
+ $.formUtils.validators.validate_domain.validatorFunction(domain)
+ )
+ }
+ return !1
+ },
+ errorMessage: '',
+ errorMessageKey: 'badUrl'
+ }),
+ $.formUtils.addValidator({
+ name: 'number',
+ validatorFunction: function (val, $el, conf) {
+ if ('' !== val) {
+ var begin,
+ end,
+ allowing = $el.valAttr('allowing') || '',
+ decimalSeparator = $el.valAttr('decimal-separator') || conf.decimalSeparator,
+ allowsRange = !1,
+ steps = $el.valAttr('step') || '',
+ allowsSteps = !1,
+ sanitize = $el.attr('data-sanitize') || '',
+ isFormattedWithNumeral = sanitize.match(/(^|[\s])numberFormat([\s]|$)/i)
+ if (isFormattedWithNumeral) {
+ if (!window.numeral)
+ throw new ReferenceError(
+ 'The data-sanitize value numberFormat cannot be used without the numeral library. Please see Data Validation in http://www.formvalidator.net for more information.'
+ )
+ val.length && (val = String(numeral().unformat(val)))
+ }
+ if (
+ (-1 === allowing.indexOf('number') && (allowing += ',number'),
+ -1 === allowing.indexOf('negative') && 0 === val.indexOf('-'))
+ )
+ return !1
+ if (
+ (allowing.indexOf('range') > -1 &&
+ ((begin = parseFloat(allowing.substring(allowing.indexOf('[') + 1, allowing.indexOf(';')))),
+ (end = parseFloat(allowing.substring(allowing.indexOf(';') + 1, allowing.indexOf(']')))),
+ (allowsRange = !0)),
+ '' !== steps && (allowsSteps = !0),
+ ',' === decimalSeparator)
+ ) {
+ if (val.indexOf('.') > -1) return !1
+ val = val.replace(',', '.')
+ }
+ if (
+ '' === val.replace(/[0-9-]/g, '') &&
+ (!allowsRange || (val >= begin && val <= end)) &&
+ (!allowsSteps || val % steps == 0)
+ )
+ return !0
+ if (
+ allowing.indexOf('float') > -1 &&
+ null !== val.match(new RegExp('^([0-9-]+)\\.([0-9]+)$')) &&
+ (!allowsRange || (val >= begin && val <= end)) &&
+ (!allowsSteps || val % steps == 0)
+ )
+ return !0
+ }
+ return !1
+ },
+ errorMessage: '',
+ errorMessageKey: 'badInt'
+ }),
+ $.formUtils.addValidator({
+ name: 'alphanumeric',
+ validatorFunction: function (val, $el, conf, language) {
+ var additionalChars = $el.valAttr('allowing'),
+ pattern = ''
+ if (additionalChars) {
+ pattern = '^([a-zA-Z0-9' + additionalChars + ']+)$'
+ var extra = additionalChars.replace(/\\/g, '')
+ extra.indexOf(' ') > -1 &&
+ ((extra = extra.replace(' ', '')), (extra += language.andSpaces || $.formUtils.LANG.andSpaces)),
+ (this.errorMessage = language.badAlphaNumeric + language.badAlphaNumericExtra + extra)
+ } else (pattern = '^([a-zA-Z0-9]+)$'), (this.errorMessage = language.badAlphaNumeric)
+ return new RegExp(pattern).test(val)
+ },
+ errorMessage: '',
+ errorMessageKey: ''
+ }),
+ $.formUtils.addValidator({
+ name: 'custom',
+ validatorFunction: function (val, $el) {
+ var regexp = new RegExp($el.valAttr('regexp'))
+ return regexp.test(val)
+ },
+ errorMessage: '',
+ errorMessageKey: 'badCustomVal'
+ }),
+ $.formUtils.addValidator({
+ name: 'date',
+ validatorFunction: function (date, $el, conf) {
+ var dateFormat = $el.valAttr('format') || conf.dateFormat || 'yyyy-mm-dd',
+ addMissingLeadingZeros = 'false' === $el.valAttr('require-leading-zero')
+ return !1 !== $.formUtils.parseDate(date, dateFormat, addMissingLeadingZeros)
+ },
+ errorMessage: '',
+ errorMessageKey: 'badDate'
+ }),
+ $.formUtils.addValidator({
+ name: 'checkbox_group',
+ validatorFunction: function (val, $el, conf, lang, $form) {
+ var isValid = !0,
+ elname = $el.attr('name'),
+ $checkBoxes = $('input[type=checkbox][name^="' + elname + '"]', $form),
+ checkedCount = $checkBoxes.filter(':checked').length,
+ qtyAllowed = $el.valAttr('qty')
+ if (void 0 === qtyAllowed) {
+ var elementType = $el.get(0).nodeName
+ alert('Attribute "data-validation-qty" is missing from ' + elementType + ' named ' + $el.attr('name'))
+ }
+ var qtyCheckResults = $.formUtils.numericRangeCheck(checkedCount, qtyAllowed)
+ switch (qtyCheckResults[0]) {
+ case 'out':
+ ;(this.errorMessage = lang.groupCheckedRangeStart + qtyAllowed + lang.groupCheckedEnd),
+ (isValid = !1)
+ break
+ case 'min':
+ ;(this.errorMessage = lang.groupCheckedTooFewStart + qtyCheckResults[1] + lang.groupCheckedEnd),
+ (isValid = !1)
+ break
+ case 'max':
+ ;(this.errorMessage = lang.groupCheckedTooManyStart + qtyCheckResults[1] + lang.groupCheckedEnd),
+ (isValid = !1)
+ break
+ default:
+ isValid = !0
+ }
+ if (!isValid) {
+ var _triggerOnBlur = function () {
+ $checkBoxes.unbind('click', _triggerOnBlur),
+ $checkBoxes.filter('*[data-validation]').validateInputOnBlur(lang, conf, !1, 'blur')
+ }
+ $checkBoxes.bind('click', _triggerOnBlur)
+ }
+ return isValid
+ }
+ }),
+ void $.formUtils.addValidator({
+ name: 'confirmation',
+ validatorFunction: function (value, $el, config, language, $form) {
+ var password,
+ passwordInputName = $el.valAttr('confirm') || $el.attr('name') + '_confirmation',
+ $passwordInput = $form.find('[name="' + passwordInputName + '"]')
+ if (!$passwordInput.length)
+ return (
+ $.formUtils.warn(
+ 'Password confirmation validator: could not find an input with name "' + passwordInputName + '"',
+ !0
+ ),
+ !1
+ )
+ if (
+ ((password = $passwordInput.val()), config.validateOnBlur && !$passwordInput[0].hasValidationCallback)
+ ) {
+ $passwordInput[0].hasValidationCallback = !0
+ var keyUpCallback = function () {
+ $el.validate()
+ }
+ $passwordInput.on('keyup', keyUpCallback),
+ $form.one('formValidationSetup', function () {
+ ;($passwordInput[0].hasValidationCallback = !1), $passwordInput.off('keyup', keyUpCallback)
+ })
+ }
+ return value === password
+ },
+ errorMessage: '',
+ errorMessageKey: 'notConfirmed'
+ })
+ )
+ var jQuery, $
+ }.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ },
+ function (module, exports, __webpack_require__) {
+ ;(function (__webpack_provided_window_dot_jQuery, jQuery) {
+ var __WEBPACK_AMD_DEFINE_FACTORY__,
+ __WEBPACK_AMD_DEFINE_RESULT__,
+ a /*! VelocityJS.org (1.2.3). (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */
+ /*! VelocityJS.org jQuery Shim (1.0.1). (C) 2014 The jQuery Foundation. MIT @license: en.wikipedia.org/wiki/MIT_License. */ !(function (
+ a
+ ) {
+ function b (a) {
+ var b = a.length,
+ d = c.type(a)
+ return (
+ 'function' !== d &&
+ !c.isWindow(a) &&
+ (!(1 !== a.nodeType || !b) || ('array' === d || 0 === b || ('number' == typeof b && b > 0 && b - 1 in a)))
+ )
+ }
+ if (!__webpack_provided_window_dot_jQuery) {
+ var c = function (a, b) {
+ return new c.fn.init(a, b)
+ }
+ ;(c.isWindow = function (a) {
+ return null != a && a == a.window
+ }),
+ (c.type = function (a) {
+ return null == a
+ ? a + ''
+ : 'object' == typeof a || 'function' == typeof a
+ ? e[g.call(a)] || 'object'
+ : typeof a
+ }),
+ (c.isArray =
+ Array.isArray ||
+ function (a) {
+ return 'array' === c.type(a)
+ }),
+ (c.isPlainObject = function (a) {
+ var b
+ if (!a || 'object' !== c.type(a) || a.nodeType || c.isWindow(a)) return !1
+ try {
+ if (a.constructor && !f.call(a, 'constructor') && !f.call(a.constructor.prototype, 'isPrototypeOf'))
+ return !1
+ } catch (d) {
+ return !1
+ }
+ for (b in a);
+ return void 0 === b || f.call(a, b)
+ }),
+ (c.each = function (a, c, d) {
+ var f = 0,
+ g = a.length,
+ h = b(a)
+ if (d) {
+ if (h) for (; g > f && !1 !== c.apply(a[f], d); f++);
+ else for (f in a) if (!1 === c.apply(a[f], d)) break
+ } else if (h) for (; g > f && !1 !== c.call(a[f], f, a[f]); f++);
+ else for (f in a) if (!1 === c.call(a[f], f, a[f])) break
+ return a
+ }),
+ (c.data = function (a, b, e) {
+ if (void 0 === e) {
+ var g = (f = a[c.expando]) && d[f]
+ if (void 0 === b) return g
+ if (g && b in g) return g[b]
+ } else if (void 0 !== b) {
+ var f = a[c.expando] || (a[c.expando] = ++c.uuid)
+ return (d[f] = d[f] || {}), (d[f][b] = e), e
+ }
+ }),
+ (c.removeData = function (a, b) {
+ var e = a[c.expando],
+ f = e && d[e]
+ f &&
+ c.each(b, function (a, b) {
+ delete f[b]
+ })
+ }),
+ (c.extend = function () {
+ var a,
+ b,
+ d,
+ e,
+ f,
+ g,
+ h = arguments[0] || {},
+ i = 1,
+ j = arguments.length,
+ k = !1
+ for (
+ 'boolean' == typeof h && ((k = h), (h = arguments[i] || {}), i++),
+ 'object' != typeof h && 'function' !== c.type(h) && (h = {}),
+ i === j && ((h = this), i--);
+ j > i;
+ i++
+ )
+ if (null != (f = arguments[i]))
+ for (e in f)
+ (a = h[e]),
+ h !== (d = f[e]) &&
+ (k && d && (c.isPlainObject(d) || (b = c.isArray(d)))
+ ? (b ? ((b = !1), (g = a && c.isArray(a) ? a : [])) : (g = a && c.isPlainObject(a) ? a : {}),
+ (h[e] = c.extend(k, g, d)))
+ : void 0 !== d && (h[e] = d))
+ return h
+ }),
+ (c.queue = function (a, d, e) {
+ if (a) {
+ d = (d || 'fx') + 'queue'
+ var g = c.data(a, d)
+ return e
+ ? (!g || c.isArray(e)
+ ? (g = c.data(
+ a,
+ d,
+ (function (a, c) {
+ var d = c || []
+ return (
+ null != a &&
+ (b(Object(a))
+ ? (function (a, b) {
+ for (var c = +b.length, d = 0, e = a.length; c > d; ) a[e++] = b[d++]
+ if (c != c) for (; void 0 !== b[d]; ) a[e++] = b[d++]
+ a.length = e
+ })(d, 'string' == typeof a ? [a] : a)
+ : [].push.call(d, a)),
+ d
+ )
+ })(e)
+ ))
+ : g.push(e),
+ g)
+ : g || []
+ }
+ }),
+ (c.dequeue = function (a, b) {
+ c.each(a.nodeType ? [a] : a, function (a, d) {
+ b = b || 'fx'
+ var e = c.queue(d, b),
+ f = e.shift()
+ 'inprogress' === f && (f = e.shift()),
+ f &&
+ ('fx' === b && e.unshift('inprogress'),
+ f.call(d, function () {
+ c.dequeue(d, b)
+ }))
+ })
+ }),
+ (c.fn = c.prototype = {
+ init: function (a) {
+ if (a.nodeType) return (this[0] = a), this
+ throw new Error('Not a DOM node.')
+ },
+ offset: function () {
+ var b = this[0].getBoundingClientRect ? this[0].getBoundingClientRect() : { top: 0, left: 0 }
+ return {
+ top: b.top + (a.pageYOffset || document.scrollTop || 0) - (document.clientTop || 0),
+ left: b.left + (a.pageXOffset || document.scrollLeft || 0) - (document.clientLeft || 0)
+ }
+ },
+ position: function () {
+ function a () {
+ for (
+ var a = this.offsetParent || document;
+ a && 'html' === !a.nodeType.toLowerCase && 'static' === a.style.position;
+
+ )
+ a = a.offsetParent
+ return a || document
+ }
+ var b = this[0],
+ a = a.apply(b),
+ d = this.offset(),
+ e = /^(?:body|html)$/i.test(a.nodeName) ? { top: 0, left: 0 } : c(a).offset()
+ return (
+ (d.top -= parseFloat(b.style.marginTop) || 0),
+ (d.left -= parseFloat(b.style.marginLeft) || 0),
+ a.style &&
+ ((e.top += parseFloat(a.style.borderTopWidth) || 0),
+ (e.left += parseFloat(a.style.borderLeftWidth) || 0)),
+ { top: d.top - e.top, left: d.left - e.left }
+ )
+ }
+ })
+ var d = {}
+ ;(c.expando = 'velocity' + new Date().getTime()), (c.uuid = 0)
+ for (
+ var e = {},
+ f = e.hasOwnProperty,
+ g = e.toString,
+ h = 'Boolean Number String Function Array Date RegExp Object Error'.split(' '),
+ i = 0;
+ i < h.length;
+ i++
+ )
+ e['[object ' + h[i] + ']'] = h[i].toLowerCase()
+ ;(c.fn.init.prototype = c.fn), (a.Velocity = { Utilities: c })
+ }
+ })(window),
+ (a = function () {
+ return (function (a, b, c, d) {
+ function f (a) {
+ return p.isWrapped(a) ? (a = [].slice.call(a)) : p.isNode(a) && (a = [a]), a
+ }
+ function g (a) {
+ var b = m.data(a, 'velocity')
+ return null === b ? d : b
+ }
+ function i (a, c, d, e) {
+ function f (a, b) {
+ return 1 - 3 * b + 3 * a
+ }
+ function g (a, b) {
+ return 3 * b - 6 * a
+ }
+ function h (a) {
+ return 3 * a
+ }
+ function i (a, b, c) {
+ return ((f(b, c) * a + g(b, c)) * a + h(b)) * a
+ }
+ function j (a, b, c) {
+ return 3 * f(b, c) * a * a + 2 * g(b, c) * a + h(b)
+ }
+ function k (b, c) {
+ for (var e = 0; p > e; ++e) {
+ var f = j(c, a, d)
+ if (0 === f) return c
+ c -= (i(c, a, d) - b) / f
+ }
+ return c
+ }
+ function m (b, c, e) {
+ var f,
+ g,
+ h = 0
+ do {
+ ;(f = i((g = c + (e - c) / 2), a, d) - b) > 0 ? (e = g) : (c = g)
+ } while (Math.abs(f) > r && ++h < s)
+ return g
+ }
+ function o () {
+ ;(y = !0),
+ (a != c || d != e) &&
+ (function () {
+ for (var b = 0; t > b; ++b) x[b] = i(b * u, a, d)
+ })()
+ }
+ var p = 4,
+ q = 0.001,
+ r = 1e-7,
+ s = 10,
+ t = 11,
+ u = 1 / (t - 1),
+ v = 'Float32Array' in b
+ if (4 !== arguments.length) return !1
+ for (var w = 0; 4 > w; ++w)
+ if ('number' != typeof arguments[w] || isNaN(arguments[w]) || !isFinite(arguments[w])) return !1
+ ;(a = Math.min(a, 1)), (d = Math.min(d, 1)), (a = Math.max(a, 0)), (d = Math.max(d, 0))
+ var x = v ? new Float32Array(t) : new Array(t),
+ y = !1,
+ z = function (b) {
+ return (
+ y || o(),
+ a === c && d === e
+ ? b
+ : 0 === b
+ ? 0
+ : 1 === b
+ ? 1
+ : i(
+ (function (b) {
+ for (var c = 0, e = 1, f = t - 1; e != f && x[e] <= b; ++e) c += u
+ var h = c + ((b - x[--e]) / (x[e + 1] - x[e])) * u,
+ i = j(h, a, d)
+ return i >= q ? k(b, h) : 0 == i ? h : m(b, c, c + u)
+ })(b),
+ c,
+ e
+ )
+ )
+ }
+ z.getControlPoints = function () {
+ return [{ x: a, y: c }, { x: d, y: e }]
+ }
+ var A = 'generateBezier(' + [a, c, d, e] + ')'
+ return (
+ (z.toString = function () {
+ return A
+ }),
+ z
+ )
+ }
+ function j (a, b) {
+ var c = a
+ return (
+ p.isString(a)
+ ? t.Easings[a] || (c = !1)
+ : (c =
+ p.isArray(a) && 1 === a.length
+ ? function (a) {
+ return function (b) {
+ return Math.round(b * a) * (1 / a)
+ }
+ }.apply(null, a)
+ : p.isArray(a) && 2 === a.length
+ ? u.apply(null, a.concat([b]))
+ : !(!p.isArray(a) || 4 !== a.length) && i.apply(null, a)),
+ !1 === c && (c = t.Easings[t.defaults.easing] ? t.defaults.easing : s),
+ c
+ )
+ }
+ function k (a) {
+ if (a) {
+ var b = new Date().getTime(),
+ c = t.State.calls.length
+ c > 1e4 &&
+ (t.State.calls = (function (a) {
+ for (var b = -1, c = a ? a.length : 0, d = []; ++b < c; ) {
+ var e = a[b]
+ e && d.push(e)
+ }
+ return d
+ })(t.State.calls))
+ for (var f = 0; c > f; f++)
+ if (t.State.calls[f]) {
+ var h = t.State.calls[f],
+ i = h[0],
+ j = h[2],
+ n = h[3],
+ o = !!n,
+ q = null
+ n || (n = t.State.calls[f][3] = b - 16)
+ for (var r = Math.min((b - n) / j.duration, 1), s = 0, u = i.length; u > s; s++) {
+ var w = i[s],
+ y = w.element
+ if (g(y)) {
+ var z = !1
+ if (j.display !== d && null !== j.display && 'none' !== j.display) {
+ if ('flex' === j.display) {
+ m.each(['-webkit-box', '-moz-box', '-ms-flexbox', '-webkit-flex'], function (a, b) {
+ v.setPropertyValue(y, 'display', b)
+ })
+ }
+ v.setPropertyValue(y, 'display', j.display)
+ }
+ for (var B in (j.visibility !== d &&
+ 'hidden' !== j.visibility &&
+ v.setPropertyValue(y, 'visibility', j.visibility),
+ w))
+ if ('element' !== B) {
+ var C,
+ D = w[B],
+ E = p.isString(D.easing) ? t.Easings[D.easing] : D.easing
+ if (1 === r) C = D.endValue
+ else {
+ var F = D.endValue - D.startValue
+ if (((C = D.startValue + F * E(r, j, F)), !o && C === D.currentValue)) continue
+ }
+ if (((D.currentValue = C), 'tween' === B)) q = C
+ else {
+ if (v.Hooks.registered[B]) {
+ var G = v.Hooks.getRoot(B),
+ H = g(y).rootPropertyValueCache[G]
+ H && (D.rootPropertyValue = H)
+ }
+ var I = v.setPropertyValue(
+ y,
+ B,
+ D.currentValue + (0 === parseFloat(C) ? '' : D.unitType),
+ D.rootPropertyValue,
+ D.scrollData
+ )
+ v.Hooks.registered[B] &&
+ (g(y).rootPropertyValueCache[G] = v.Normalizations.registered[G]
+ ? v.Normalizations.registered[G]('extract', null, I[1])
+ : I[1]),
+ 'transform' === I[0] && (z = !0)
+ }
+ }
+ j.mobileHA &&
+ g(y).transformCache.translate3d === d &&
+ ((g(y).transformCache.translate3d = '(0px, 0px, 0px)'), (z = !0)),
+ z && v.flushTransformCache(y)
+ }
+ }
+ j.display !== d && 'none' !== j.display && (t.State.calls[f][2].display = !1),
+ j.visibility !== d && 'hidden' !== j.visibility && (t.State.calls[f][2].visibility = !1),
+ j.progress && j.progress.call(h[1], h[1], r, Math.max(0, n + j.duration - b), n, q),
+ 1 === r && l(f)
+ }
+ }
+ t.State.isTicking && x(k)
+ }
+ function l (a, b) {
+ if (!t.State.calls[a]) return !1
+ for (
+ var c = t.State.calls[a][0],
+ e = t.State.calls[a][1],
+ f = t.State.calls[a][2],
+ h = t.State.calls[a][4],
+ i = !1,
+ j = 0,
+ k = c.length;
+ k > j;
+ j++
+ ) {
+ var l = c[j].element
+ if (
+ (b ||
+ f.loop ||
+ ('none' === f.display && v.setPropertyValue(l, 'display', f.display),
+ 'hidden' === f.visibility && v.setPropertyValue(l, 'visibility', f.visibility)),
+ !0 !== f.loop && (m.queue(l)[1] === d || !/\.velocityQueueEntryFlag/i.test(m.queue(l)[1])) && g(l))
+ ) {
+ ;(g(l).isAnimating = !1), (g(l).rootPropertyValueCache = {})
+ var n = !1
+ m.each(v.Lists.transforms3D, function (a, b) {
+ var c = /^scale/.test(b) ? 1 : 0,
+ e = g(l).transformCache[b]
+ g(l).transformCache[b] !== d &&
+ new RegExp('^\\(' + c + '[^.]').test(e) &&
+ ((n = !0), delete g(l).transformCache[b])
+ }),
+ f.mobileHA && ((n = !0), delete g(l).transformCache.translate3d),
+ n && v.flushTransformCache(l),
+ v.Values.removeClass(l, 'velocity-animating')
+ }
+ if (!b && f.complete && !f.loop && j === k - 1)
+ try {
+ f.complete.call(e, e)
+ } catch (o) {
+ setTimeout(function () {
+ throw o
+ }, 1)
+ }
+ h && !0 !== f.loop && h(e),
+ g(l) &&
+ !0 === f.loop &&
+ !b &&
+ (m.each(g(l).tweensContainer, function (a, b) {
+ ;/^rotate/.test(a) && 360 === parseFloat(b.endValue) && ((b.endValue = 0), (b.startValue = 360)),
+ /^backgroundPosition/.test(a) &&
+ 100 === parseFloat(b.endValue) &&
+ '%' === b.unitType &&
+ ((b.endValue = 0), (b.startValue = 100))
+ }),
+ t(l, 'reverse', { loop: !0, delay: f.delay })),
+ !1 !== f.queue && m.dequeue(l, f.queue)
+ }
+ t.State.calls[a] = !1
+ for (var p = 0, q = t.State.calls.length; q > p; p++)
+ if (!1 !== t.State.calls[p]) {
+ i = !0
+ break
+ }
+ !1 === i && ((t.State.isTicking = !1), delete t.State.calls, (t.State.calls = []))
+ }
+ var m,
+ n = (function () {
+ if (c.documentMode) return c.documentMode
+ for (var a = 7; a > 4; a--) {
+ var b = c.createElement('div')
+ if (
+ ((b.innerHTML = '\x3c!--[if IE ' + a + ']>
0))
+ )
+ },
+ isWrapped: function (a) {
+ return a && (a.jquery || (b.Zepto && b.Zepto.zepto.isZ(a)))
+ },
+ isSVG: function (a) {
+ return b.SVGElement && a instanceof b.SVGElement
+ },
+ isEmptyObject: function (a) {
+ for (var b in a) return !1
+ return !0
+ }
+ },
+ q = !1
+ if ((a.fn && a.fn.jquery ? ((m = a), (q = !0)) : (m = b.Velocity.Utilities), 8 >= n && !q))
+ throw new Error('Velocity: IE8 and below require jQuery to be loaded before Velocity.')
+ if (!(7 >= n)) {
+ var r = 400,
+ s = 'swing',
+ t = {
+ State: {
+ isMobile: /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
+ navigator.userAgent
+ ),
+ isAndroid: /Android/i.test(navigator.userAgent),
+ isGingerbread: /Android 2\.3\.[3-7]/i.test(navigator.userAgent),
+ isChrome: b.chrome,
+ isFirefox: /Firefox/i.test(navigator.userAgent),
+ prefixElement: c.createElement('div'),
+ prefixMatches: {},
+ scrollAnchor: null,
+ scrollPropertyLeft: null,
+ scrollPropertyTop: null,
+ isTicking: !1,
+ calls: []
+ },
+ CSS: {},
+ Utilities: m,
+ Redirects: {},
+ Easings: {},
+ Promise: b.Promise,
+ defaults: {
+ queue: '',
+ duration: r,
+ easing: s,
+ begin: d,
+ complete: d,
+ progress: d,
+ display: d,
+ visibility: d,
+ loop: !1,
+ delay: !1,
+ mobileHA: !0,
+ _cacheValues: !0
+ },
+ init: function (a) {
+ m.data(a, 'velocity', {
+ isSVG: p.isSVG(a),
+ isAnimating: !1,
+ computedStyle: null,
+ tweensContainer: null,
+ rootPropertyValueCache: {},
+ transformCache: {}
+ })
+ },
+ hook: null,
+ mock: !1,
+ version: { major: 1, minor: 2, patch: 2 },
+ debug: !1
+ }
+ b.pageYOffset !== d
+ ? ((t.State.scrollAnchor = b),
+ (t.State.scrollPropertyLeft = 'pageXOffset'),
+ (t.State.scrollPropertyTop = 'pageYOffset'))
+ : ((t.State.scrollAnchor = c.documentElement || c.body.parentNode || c.body),
+ (t.State.scrollPropertyLeft = 'scrollLeft'),
+ (t.State.scrollPropertyTop = 'scrollTop'))
+ var u = (function () {
+ function a (a) {
+ return -a.tension * a.x - a.friction * a.v
+ }
+ function b (b, c, d) {
+ var e = { x: b.x + d.dx * c, v: b.v + d.dv * c, tension: b.tension, friction: b.friction }
+ return { dx: e.v, dv: a(e) }
+ }
+ function c (c, d) {
+ var e = { dx: c.v, dv: a(c) },
+ f = b(c, 0.5 * d, e),
+ g = b(c, 0.5 * d, f),
+ h = b(c, d, g),
+ i = (1 / 6) * (e.dx + 2 * (f.dx + g.dx) + h.dx),
+ j = (1 / 6) * (e.dv + 2 * (f.dv + g.dv) + h.dv)
+ return (c.x = c.x + i * d), (c.v = c.v + j * d), c
+ }
+ return function d (a, b, e) {
+ var f,
+ g,
+ h,
+ i = { x: -1, v: 0, tension: null, friction: null },
+ j = [0],
+ k = 0
+ for (
+ a = parseFloat(a) || 500,
+ b = parseFloat(b) || 20,
+ e = e || null,
+ i.tension = a,
+ i.friction = b,
+ (f = null !== e) ? (g = ((k = d(a, b)) / e) * 0.016) : (g = 0.016);
+ (h = c(h || i, g)), j.push(1 + h.x), (k += 16), Math.abs(h.x) > 1e-4 && Math.abs(h.v) > 1e-4;
+
+ );
+ return f
+ ? function (a) {
+ return j[(a * (j.length - 1)) | 0]
+ }
+ : k
+ }
+ })()
+ ;(t.Easings = {
+ linear: function (a) {
+ return a
+ },
+ swing: function (a) {
+ return 0.5 - Math.cos(a * Math.PI) / 2
+ },
+ spring: function (a) {
+ return 1 - Math.cos(4.5 * a * Math.PI) * Math.exp(6 * -a)
+ }
+ }),
+ m.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 (a, b) {
+ t.Easings[b[0]] = i.apply(null, b[1])
+ }
+ )
+ var v = (t.CSS = {
+ RegEx: {
+ isHex: /^#([A-f\d]{3}){1,2}$/i,
+ valueUnwrap: /^[A-z]+\((.*)\)$/i,
+ wrappedValueAlreadyExtracted: /[0-9.]+ [0-9.]+ [0-9.]+( [0-9.]+)?/,
+ valueSplit: /([A-z]+\(.+\))|(([A-z0-9#-.]+?)(?=\s|$))/gi
+ },
+ 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']
+ },
+ Hooks: {
+ 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%']
+ },
+ registered: {},
+ register: function () {
+ for (var a = 0; a < v.Lists.colors.length; a++) {
+ var b = 'color' === v.Lists.colors[a] ? '0 0 0 1' : '255 255 255 1'
+ v.Hooks.templates[v.Lists.colors[a]] = ['Red Green Blue Alpha', b]
+ }
+ var c, d, e
+ if (n)
+ for (c in v.Hooks.templates) {
+ e = (d = v.Hooks.templates[c])[0].split(' ')
+ var f = d[1].match(v.RegEx.valueSplit)
+ 'Color' === e[0] &&
+ (e.push(e.shift()), f.push(f.shift()), (v.Hooks.templates[c] = [e.join(' '), f.join(' ')]))
+ }
+ for (c in v.Hooks.templates)
+ for (var a in (e = (d = v.Hooks.templates[c])[0].split(' '))) {
+ var g = c + e[a],
+ h = a
+ v.Hooks.registered[g] = [c, h]
+ }
+ },
+ getRoot: function (a) {
+ var b = v.Hooks.registered[a]
+ return b ? b[0] : a
+ },
+ cleanRootPropertyValue: function (a, b) {
+ return (
+ v.RegEx.valueUnwrap.test(b) && (b = b.match(v.RegEx.valueUnwrap)[1]),
+ v.Values.isCSSNullValue(b) && (b = v.Hooks.templates[a][1]),
+ b
+ )
+ },
+ extractValue: function (a, b) {
+ var c = v.Hooks.registered[a]
+ if (c) {
+ var d = c[0],
+ e = c[1]
+ return (b = v.Hooks.cleanRootPropertyValue(d, b)).toString().match(v.RegEx.valueSplit)[e]
+ }
+ return b
+ },
+ injectValue: function (a, b, c) {
+ var d = v.Hooks.registered[a]
+ if (d) {
+ var e,
+ g = d[0],
+ h = d[1]
+ return (
+ ((e = (c = v.Hooks.cleanRootPropertyValue(g, c)).toString().match(v.RegEx.valueSplit))[h] = b),
+ e.join(' ')
+ )
+ }
+ return c
+ }
+ },
+ Normalizations: {
+ registered: {
+ clip: function (a, b, c) {
+ switch (a) {
+ case 'name':
+ return 'clip'
+ case 'extract':
+ var d
+ return (
+ v.RegEx.wrappedValueAlreadyExtracted.test(c)
+ ? (d = c)
+ : (d = (d = c.toString().match(v.RegEx.valueUnwrap)) ? d[1].replace(/,(\s+)?/g, ' ') : c),
+ d
+ )
+ case 'inject':
+ return 'rect(' + c + ')'
+ }
+ },
+ blur: function (a, b, c) {
+ switch (a) {
+ case 'name':
+ return t.State.isFirefox ? 'filter' : '-webkit-filter'
+ case 'extract':
+ var d = parseFloat(c)
+ if (!d && 0 !== d) {
+ var e = c.toString().match(/blur\(([0-9]+[A-z]+)\)/i)
+ d = e ? e[1] : 0
+ }
+ return d
+ case 'inject':
+ return parseFloat(c) ? 'blur(' + c + ')' : 'none'
+ }
+ },
+ opacity: function (a, b, c) {
+ if (8 >= n)
+ switch (a) {
+ case 'name':
+ return 'filter'
+ case 'extract':
+ var d = c.toString().match(/alpha\(opacity=(.*)\)/i)
+ return d ? d[1] / 100 : 1
+ case 'inject':
+ return (
+ (b.style.zoom = 1),
+ parseFloat(c) >= 1 ? '' : 'alpha(opacity=' + parseInt(100 * parseFloat(c), 10) + ')'
+ )
+ }
+ else
+ switch (a) {
+ case 'name':
+ return 'opacity'
+ case 'extract':
+ case 'inject':
+ return c
+ }
+ }
+ },
+ register: function () {
+ 9 >= n ||
+ t.State.isGingerbread ||
+ (v.Lists.transformsBase = v.Lists.transformsBase.concat(v.Lists.transforms3D))
+ for (var a = 0; a < v.Lists.transformsBase.length; a++)
+ !(function () {
+ var b = v.Lists.transformsBase[a]
+ v.Normalizations.registered[b] = function (a, c, e) {
+ switch (a) {
+ case 'name':
+ return 'transform'
+ case 'extract':
+ return g(c) === d || g(c).transformCache[b] === d
+ ? /^scale/i.test(b)
+ ? 1
+ : 0
+ : g(c).transformCache[b].replace(/[()]/g, '')
+ case 'inject':
+ var f = !1
+ switch (b.substr(0, b.length - 1)) {
+ case 'translate':
+ f = !/(%|px|em|rem|vw|vh|\d)$/i.test(e)
+ break
+ case 'scal':
+ case 'scale':
+ t.State.isAndroid && g(c).transformCache[b] === d && 1 > e && (e = 1),
+ (f = !/(\d)$/i.test(e))
+ break
+ case 'skew':
+ f = !/(deg|\d)$/i.test(e)
+ break
+ case 'rotate':
+ f = !/(deg|\d)$/i.test(e)
+ }
+ return f || (g(c).transformCache[b] = '(' + e + ')'), g(c).transformCache[b]
+ }
+ }
+ })()
+ for (a = 0; a < v.Lists.colors.length; a++)
+ !(function () {
+ var b = v.Lists.colors[a]
+ v.Normalizations.registered[b] = function (a, c, e) {
+ switch (a) {
+ case 'name':
+ return b
+ case 'extract':
+ var f
+ if (v.RegEx.wrappedValueAlreadyExtracted.test(e)) f = e
+ else {
+ var g,
+ h = {
+ 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)'
+ }
+ ;/^[A-z]+$/i.test(e)
+ ? (g = h[e] !== d ? h[e] : h.black)
+ : v.RegEx.isHex.test(e)
+ ? (g = 'rgb(' + v.Values.hexToRgb(e).join(' ') + ')')
+ : /^rgba?\(/i.test(e) || (g = h.black),
+ (f = (g || e)
+ .toString()
+ .match(v.RegEx.valueUnwrap)[1]
+ .replace(/,(\s+)?/g, ' '))
+ }
+ return 8 >= n || 3 !== f.split(' ').length || (f += ' 1'), f
+ case 'inject':
+ return (
+ 8 >= n
+ ? 4 === e.split(' ').length &&
+ (e = e
+ .split(/\s+/)
+ .slice(0, 3)
+ .join(' '))
+ : 3 === e.split(' ').length && (e += ' 1'),
+ (8 >= n ? 'rgb' : 'rgba') +
+ '(' +
+ e.replace(/\s+/g, ',').replace(/\.(\d)+(?=,)/g, '') +
+ ')'
+ )
+ }
+ }
+ })()
+ }
+ },
+ Names: {
+ camelCase: function (a) {
+ return a.replace(/-(\w)/g, function (a, b) {
+ return b.toUpperCase()
+ })
+ },
+ SVGAttribute: function (a) {
+ var b = 'width|height|x|y|cx|cy|r|rx|ry|x1|x2|y1|y2'
+ return (
+ (n || (t.State.isAndroid && !t.State.isChrome)) && (b += '|transform'),
+ new RegExp('^(' + b + ')$', 'i').test(a)
+ )
+ },
+ prefixCheck: function (a) {
+ if (t.State.prefixMatches[a]) return [t.State.prefixMatches[a], !0]
+ for (var b = ['', 'Webkit', 'Moz', 'ms', 'O'], c = 0, d = b.length; d > c; c++) {
+ var e
+ if (
+ ((e =
+ 0 === c
+ ? a
+ : b[c] +
+ a.replace(/^\w/, function (a) {
+ return a.toUpperCase()
+ })),
+ p.isString(t.State.prefixElement.style[e]))
+ )
+ return (t.State.prefixMatches[a] = e), [e, !0]
+ }
+ return [a, !1]
+ }
+ },
+ Values: {
+ hexToRgb: function (a) {
+ var b
+ return (
+ (a = a.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i, function (a, b, c, d) {
+ return b + b + c + c + d + d
+ })),
+ (b = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a))
+ ? [parseInt(b[1], 16), parseInt(b[2], 16), parseInt(b[3], 16)]
+ : [0, 0, 0]
+ )
+ },
+ isCSSNullValue: function (a) {
+ return 0 == a || /^(none|auto|transparent|(rgba\(0, ?0, ?0, ?0\)))$/i.test(a)
+ },
+ getUnitType: function (a) {
+ return /^(rotate|skew)/i.test(a)
+ ? 'deg'
+ : /(^(scale|scaleX|scaleY|scaleZ|alpha|flexGrow|flexHeight|zIndex|fontWeight)$)|((opacity|red|green|blue|alpha)$)/i.test(
+ a
+ )
+ ? ''
+ : 'px'
+ },
+ getDisplayType: function (a) {
+ var b = a && a.tagName.toString().toLowerCase()
+ return /^(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(
+ b
+ )
+ ? 'inline'
+ : /^(li)$/i.test(b)
+ ? 'list-item'
+ : /^(tr)$/i.test(b)
+ ? 'table-row'
+ : /^(table)$/i.test(b)
+ ? 'table'
+ : /^(tbody)$/i.test(b)
+ ? 'table-row-group'
+ : 'block'
+ },
+ addClass: function (a, b) {
+ a.classList ? a.classList.add(b) : (a.className += (a.className.length ? ' ' : '') + b)
+ },
+ removeClass: function (a, b) {
+ a.classList
+ ? a.classList.remove(b)
+ : (a.className = a.className
+ .toString()
+ .replace(new RegExp('(^|\\s)' + b.split(' ').join('|') + '(\\s|$)', 'gi'), ' '))
+ }
+ },
+ getPropertyValue: function (a, c, e, f) {
+ function h (a, c) {
+ function e () {
+ j && v.setPropertyValue(a, 'display', 'none')
+ }
+ var i = 0
+ if (8 >= n) i = m.css(a, c)
+ else {
+ var o,
+ j = !1
+ if (
+ (/^(width|height)$/.test(c) &&
+ 0 === v.getPropertyValue(a, 'display') &&
+ ((j = !0), v.setPropertyValue(a, 'display', v.Values.getDisplayType(a))),
+ !f)
+ ) {
+ if (
+ 'height' === c &&
+ 'border-box' !==
+ v
+ .getPropertyValue(a, 'boxSizing')
+ .toString()
+ .toLowerCase()
+ ) {
+ var k =
+ a.offsetHeight -
+ (parseFloat(v.getPropertyValue(a, 'borderTopWidth')) || 0) -
+ (parseFloat(v.getPropertyValue(a, 'borderBottomWidth')) || 0) -
+ (parseFloat(v.getPropertyValue(a, 'paddingTop')) || 0) -
+ (parseFloat(v.getPropertyValue(a, 'paddingBottom')) || 0)
+ return e(), k
+ }
+ if (
+ 'width' === c &&
+ 'border-box' !==
+ v
+ .getPropertyValue(a, 'boxSizing')
+ .toString()
+ .toLowerCase()
+ ) {
+ var l =
+ a.offsetWidth -
+ (parseFloat(v.getPropertyValue(a, 'borderLeftWidth')) || 0) -
+ (parseFloat(v.getPropertyValue(a, 'borderRightWidth')) || 0) -
+ (parseFloat(v.getPropertyValue(a, 'paddingLeft')) || 0) -
+ (parseFloat(v.getPropertyValue(a, 'paddingRight')) || 0)
+ return e(), l
+ }
+ }
+ ;(o =
+ g(a) === d
+ ? b.getComputedStyle(a, null)
+ : g(a).computedStyle
+ ? g(a).computedStyle
+ : (g(a).computedStyle = b.getComputedStyle(a, null))),
+ 'borderColor' === c && (c = 'borderTopColor'),
+ ('' === (i = 9 === n && 'filter' === c ? o.getPropertyValue(c) : o[c]) || null === i) &&
+ (i = a.style[c]),
+ e()
+ }
+ if ('auto' === i && /^(top|right|bottom|left)$/i.test(c)) {
+ var p = h(a, 'position')
+ ;('fixed' === p || ('absolute' === p && /top|left/i.test(c))) && (i = m(a).position()[c] + 'px')
+ }
+ return i
+ }
+ var i
+ if (v.Hooks.registered[c]) {
+ var j = c,
+ k = v.Hooks.getRoot(j)
+ e === d && (e = v.getPropertyValue(a, v.Names.prefixCheck(k)[0])),
+ v.Normalizations.registered[k] && (e = v.Normalizations.registered[k]('extract', a, e)),
+ (i = v.Hooks.extractValue(j, e))
+ } else if (v.Normalizations.registered[c]) {
+ var l, o
+ 'transform' !== (l = v.Normalizations.registered[c]('name', a)) &&
+ ((o = h(a, v.Names.prefixCheck(l)[0])),
+ v.Values.isCSSNullValue(o) && v.Hooks.templates[c] && (o = v.Hooks.templates[c][1])),
+ (i = v.Normalizations.registered[c]('extract', a, o))
+ }
+ if (!/^[\d-]/.test(i))
+ if (g(a) && g(a).isSVG && v.Names.SVGAttribute(c))
+ if (/^(height|width)$/i.test(c))
+ try {
+ i = a.getBBox()[c]
+ } catch (p) {
+ i = 0
+ }
+ else i = a.getAttribute(c)
+ else i = h(a, v.Names.prefixCheck(c)[0])
+ return v.Values.isCSSNullValue(i) && (i = 0), t.debug >= 2 && console.log('Get ' + c + ': ' + i), i
+ },
+ setPropertyValue: function (a, c, d, e, f) {
+ var h = c
+ if ('scroll' === c)
+ f.container
+ ? (f.container['scroll' + f.direction] = d)
+ : 'Left' === f.direction
+ ? b.scrollTo(d, f.alternateValue)
+ : b.scrollTo(f.alternateValue, d)
+ else if (v.Normalizations.registered[c] && 'transform' === v.Normalizations.registered[c]('name', a))
+ v.Normalizations.registered[c]('inject', a, d), (h = 'transform'), (d = g(a).transformCache[c])
+ else {
+ if (v.Hooks.registered[c]) {
+ var i = c,
+ j = v.Hooks.getRoot(c)
+ ;(e = e || v.getPropertyValue(a, j)), (d = v.Hooks.injectValue(i, d, e)), (c = j)
+ }
+ if (
+ (v.Normalizations.registered[c] &&
+ ((d = v.Normalizations.registered[c]('inject', a, d)),
+ (c = v.Normalizations.registered[c]('name', a))),
+ (h = v.Names.prefixCheck(c)[0]),
+ 8 >= n)
+ )
+ try {
+ a.style[h] = d
+ } catch (k) {
+ t.debug && console.log('Browser does not support [' + d + '] for [' + h + ']')
+ }
+ else g(a) && g(a).isSVG && v.Names.SVGAttribute(c) ? a.setAttribute(c, d) : (a.style[h] = d)
+ t.debug >= 2 && console.log('Set ' + c + ' (' + h + '): ' + d)
+ }
+ return [h, d]
+ },
+ flushTransformCache: function (a) {
+ function b (b) {
+ return parseFloat(v.getPropertyValue(a, b))
+ }
+ var c = ''
+ if ((n || (t.State.isAndroid && !t.State.isChrome)) && g(a).isSVG) {
+ var d = {
+ translate: [b('translateX'), b('translateY')],
+ skewX: [b('skewX')],
+ skewY: [b('skewY')],
+ scale: 1 !== b('scale') ? [b('scale'), b('scale')] : [b('scaleX'), b('scaleY')],
+ rotate: [b('rotateZ'), 0, 0]
+ }
+ m.each(g(a).transformCache, function (a) {
+ ;/^translate/i.test(a)
+ ? (a = 'translate')
+ : /^scale/i.test(a)
+ ? (a = 'scale')
+ : /^rotate/i.test(a) && (a = 'rotate'),
+ d[a] && ((c += a + '(' + d[a].join(' ') + ') '), delete d[a])
+ })
+ } else {
+ var e, f
+ m.each(g(a).transformCache, function (b) {
+ return (
+ (e = g(a).transformCache[b]),
+ 'transformPerspective' === b
+ ? ((f = e), !0)
+ : (9 === n && 'rotateZ' === b && (b = 'rotate'), void (c += b + e + ' '))
+ )
+ }),
+ f && (c = 'perspective' + f + ' ' + c)
+ }
+ v.setPropertyValue(a, 'transform', c)
+ }
+ })
+ v.Hooks.register(),
+ v.Normalizations.register(),
+ (t.hook = function (a, b, c) {
+ var e = d
+ return (
+ (a = f(a)),
+ m.each(a, function (a, f) {
+ if ((g(f) === d && t.init(f), c === d)) e === d && (e = t.CSS.getPropertyValue(f, b))
+ else {
+ var h = t.CSS.setPropertyValue(f, b, c)
+ 'transform' === h[0] && t.CSS.flushTransformCache(f), (e = h)
+ }
+ }),
+ e
+ )
+ })
+ var w = function () {
+ function a () {
+ return h ? B.promise || null : i
+ }
+ function e () {
+ function a () {
+ function a (a, b) {
+ var c = d,
+ e = d,
+ g = d
+ return (
+ p.isArray(a)
+ ? ((c = a[0]),
+ (!p.isArray(a[1]) && /^[\d-]/.test(a[1])) || p.isFunction(a[1]) || v.RegEx.isHex.test(a[1])
+ ? (g = a[1])
+ : ((p.isString(a[1]) && !v.RegEx.isHex.test(a[1])) || p.isArray(a[1])) &&
+ ((e = b ? a[1] : j(a[1], h.duration)), a[2] !== d && (g = a[2])))
+ : (c = a),
+ b || (e = e || h.easing),
+ p.isFunction(c) && (c = c.call(f, y, x)),
+ p.isFunction(g) && (g = g.call(f, y, x)),
+ [c || 0, e, g]
+ )
+ }
+ function l (a, b) {
+ var c, d
+ return (
+ (d = (b || '0')
+ .toString()
+ .toLowerCase()
+ .replace(/[%A-z]+$/, function (a) {
+ return (c = a), ''
+ })),
+ c || (c = v.Values.getUnitType(a)),
+ [d, c]
+ )
+ }
+ function n () {
+ var a = {
+ myParent: f.parentNode || c.body,
+ position: v.getPropertyValue(f, 'position'),
+ fontSize: v.getPropertyValue(f, 'fontSize')
+ },
+ d = a.position === I.lastPosition && a.myParent === I.lastParent,
+ e = a.fontSize === I.lastFontSize
+ ;(I.lastParent = a.myParent), (I.lastPosition = a.position), (I.lastFontSize = a.fontSize)
+ var h = 100,
+ i = {}
+ if (e && d)
+ (i.emToPx = I.lastEmToPx),
+ (i.percentToPxWidth = I.lastPercentToPxWidth),
+ (i.percentToPxHeight = I.lastPercentToPxHeight)
+ else {
+ var j = g(f).isSVG
+ ? c.createElementNS('http://www.w3.org/2000/svg', 'rect')
+ : c.createElement('div')
+ t.init(j),
+ a.myParent.appendChild(j),
+ m.each(['overflow', 'overflowX', 'overflowY'], function (a, b) {
+ t.CSS.setPropertyValue(j, b, 'hidden')
+ }),
+ t.CSS.setPropertyValue(j, 'position', a.position),
+ t.CSS.setPropertyValue(j, 'fontSize', a.fontSize),
+ t.CSS.setPropertyValue(j, 'boxSizing', 'content-box'),
+ m.each(['minWidth', 'maxWidth', 'width', 'minHeight', 'maxHeight', 'height'], function (
+ a,
+ b
+ ) {
+ t.CSS.setPropertyValue(j, b, h + '%')
+ }),
+ t.CSS.setPropertyValue(j, 'paddingLeft', h + 'em'),
+ (i.percentToPxWidth = I.lastPercentToPxWidth =
+ (parseFloat(v.getPropertyValue(j, 'width', null, !0)) || 1) / h),
+ (i.percentToPxHeight = I.lastPercentToPxHeight =
+ (parseFloat(v.getPropertyValue(j, 'height', null, !0)) || 1) / h),
+ (i.emToPx = I.lastEmToPx = (parseFloat(v.getPropertyValue(j, 'paddingLeft')) || 1) / h),
+ a.myParent.removeChild(j)
+ }
+ return (
+ null === I.remToPx && (I.remToPx = parseFloat(v.getPropertyValue(c.body, 'fontSize')) || 16),
+ null === I.vwToPx &&
+ ((I.vwToPx = parseFloat(b.innerWidth) / 100), (I.vhToPx = parseFloat(b.innerHeight) / 100)),
+ (i.remToPx = I.remToPx),
+ (i.vwToPx = I.vwToPx),
+ (i.vhToPx = I.vhToPx),
+ t.debug >= 1 && console.log('Unit ratios: ' + JSON.stringify(i), f),
+ i
+ )
+ }
+ if (h.begin && 0 === y)
+ try {
+ h.begin.call(o, o)
+ } catch (r) {
+ setTimeout(function () {
+ throw r
+ }, 1)
+ }
+ if ('scroll' === C) {
+ var u,
+ w,
+ z,
+ A = /^x$/i.test(h.axis) ? 'Left' : 'Top',
+ D = parseFloat(h.offset) || 0
+ h.container
+ ? p.isWrapped(h.container) || p.isNode(h.container)
+ ? ((h.container = h.container[0] || h.container),
+ (z = (u = h.container['scroll' + A]) + m(f).position()[A.toLowerCase()] + D))
+ : (h.container = null)
+ : ((u = t.State.scrollAnchor[t.State['scrollProperty' + A]]),
+ (w = t.State.scrollAnchor[t.State['scrollProperty' + ('Left' === A ? 'Top' : 'Left')]]),
+ (z = m(f).offset()[A.toLowerCase()] + D)),
+ (i = {
+ scroll: {
+ rootPropertyValue: !1,
+ startValue: u,
+ currentValue: u,
+ endValue: z,
+ unitType: '',
+ easing: h.easing,
+ scrollData: { container: h.container, direction: A, alternateValue: w }
+ },
+ element: f
+ }),
+ t.debug && console.log('tweensContainer (scroll): ', i.scroll, f)
+ } else if ('reverse' === C) {
+ if (!g(f).tweensContainer) return void m.dequeue(f, h.queue)
+ 'none' === g(f).opts.display && (g(f).opts.display = 'auto'),
+ 'hidden' === g(f).opts.visibility && (g(f).opts.visibility = 'visible'),
+ (g(f).opts.loop = !1),
+ (g(f).opts.begin = null),
+ (g(f).opts.complete = null),
+ s.easing || delete h.easing,
+ s.duration || delete h.duration,
+ (h = m.extend({}, g(f).opts, h))
+ var E = m.extend(!0, {}, g(f).tweensContainer)
+ for (var F in E)
+ if ('element' !== F) {
+ var G = E[F].startValue
+ ;(E[F].startValue = E[F].currentValue = E[F].endValue),
+ (E[F].endValue = G),
+ p.isEmptyObject(s) || (E[F].easing = h.easing),
+ t.debug && console.log('reverse tweensContainer (' + F + '): ' + JSON.stringify(E[F]), f)
+ }
+ i = E
+ } else if ('start' === C) {
+ for (var H in (g(f).tweensContainer && !0 === g(f).isAnimating && (E = g(f).tweensContainer),
+ m.each(q, function (b, c) {
+ if (RegExp('^' + v.Lists.colors.join('$|^') + '$').test(b)) {
+ var e = a(c, !0),
+ f = e[0],
+ g = e[1],
+ h = e[2]
+ if (v.RegEx.isHex.test(f)) {
+ for (
+ var i = ['Red', 'Green', 'Blue'],
+ j = v.Values.hexToRgb(f),
+ k = h ? v.Values.hexToRgb(h) : d,
+ l = 0;
+ l < i.length;
+ l++
+ ) {
+ var m = [j[l]]
+ g && m.push(g), k !== d && m.push(k[l]), (q[b + i[l]] = m)
+ }
+ delete q[b]
+ }
+ }
+ }),
+ q)) {
+ var K = a(q[H]),
+ L = K[0],
+ M = K[1],
+ N = K[2]
+ H = v.Names.camelCase(H)
+ var O = v.Hooks.getRoot(H),
+ P = !1
+ if (
+ g(f).isSVG ||
+ 'tween' === O ||
+ !1 !== v.Names.prefixCheck(O)[1] ||
+ v.Normalizations.registered[O] !== d
+ ) {
+ ;((h.display !== d && null !== h.display && 'none' !== h.display) ||
+ (h.visibility !== d && 'hidden' !== h.visibility)) &&
+ /opacity|filter/.test(H) &&
+ !N &&
+ 0 !== L &&
+ (N = 0),
+ h._cacheValues && E && E[H]
+ ? (N === d && (N = E[H].endValue + E[H].unitType), (P = g(f).rootPropertyValueCache[O]))
+ : v.Hooks.registered[H]
+ ? N === d
+ ? ((P = v.getPropertyValue(f, O)), (N = v.getPropertyValue(f, H, P)))
+ : (P = v.Hooks.templates[O][1])
+ : N === d && (N = v.getPropertyValue(f, H))
+ var Q,
+ R,
+ S,
+ T = !1
+ if (
+ ((N = (Q = l(H, N))[0]),
+ (S = Q[1]),
+ (L = (Q = l(H, L))[0].replace(/^([+-\/*])=/, function (a, b) {
+ return (T = b), ''
+ })),
+ (R = Q[1]),
+ (N = parseFloat(N) || 0),
+ (L = parseFloat(L) || 0),
+ '%' === R &&
+ (/^(fontSize|lineHeight)$/.test(H)
+ ? ((L /= 100), (R = 'em'))
+ : /^scale/.test(H)
+ ? ((L /= 100), (R = ''))
+ : /(Red|Green|Blue)$/i.test(H) && ((L = (L / 100) * 255), (R = ''))),
+ /[\/*]/.test(T))
+ )
+ R = S
+ else if (S !== R && 0 !== N)
+ if (0 === L) R = S
+ else {
+ e = e || n()
+ var U =
+ /margin|padding|left|right|width|text|word|letter/i.test(H) || /X$/.test(H) || 'x' === H
+ ? 'x'
+ : 'y'
+ switch (S) {
+ case '%':
+ N *= 'x' === U ? e.percentToPxWidth : e.percentToPxHeight
+ break
+ case 'px':
+ break
+ default:
+ N *= e[S + 'ToPx']
+ }
+ switch (R) {
+ case '%':
+ N *= 1 / ('x' === U ? e.percentToPxWidth : e.percentToPxHeight)
+ break
+ case 'px':
+ break
+ default:
+ N *= 1 / e[R + 'ToPx']
+ }
+ }
+ switch (T) {
+ case '+':
+ L = N + L
+ break
+ case '-':
+ L = N - L
+ break
+ case '*':
+ L *= N
+ break
+ case '/':
+ L = N / L
+ }
+ ;(i[H] = {
+ rootPropertyValue: P,
+ startValue: N,
+ currentValue: N,
+ endValue: L,
+ unitType: R,
+ easing: M
+ }),
+ t.debug && console.log('tweensContainer (' + H + '): ' + JSON.stringify(i[H]), f)
+ } else t.debug && console.log('Skipping [' + O + '] due to a lack of browser support.')
+ }
+ i.element = f
+ }
+ i.element &&
+ (v.Values.addClass(f, 'velocity-animating'),
+ J.push(i),
+ '' === h.queue && ((g(f).tweensContainer = i), (g(f).opts = h)),
+ (g(f).isAnimating = !0),
+ y === x - 1
+ ? (t.State.calls.push([J, o, h, null, B.resolver]),
+ !1 === t.State.isTicking && ((t.State.isTicking = !0), k()))
+ : y++)
+ }
+ var e,
+ f = this,
+ h = m.extend({}, t.defaults, s),
+ i = {}
+ switch (
+ (g(f) === d && t.init(f),
+ parseFloat(h.delay) &&
+ !1 !== h.queue &&
+ m.queue(f, h.queue, function (a) {
+ ;(t.velocityQueueEntryFlag = !0),
+ (g(f).delayTimer = { setTimeout: setTimeout(a, parseFloat(h.delay)), next: a })
+ }),
+ h.duration.toString().toLowerCase())
+ ) {
+ case 'fast':
+ h.duration = 200
+ break
+ case 'normal':
+ h.duration = r
+ break
+ case 'slow':
+ h.duration = 600
+ break
+ default:
+ h.duration = parseFloat(h.duration) || 1
+ }
+ !1 !== t.mock &&
+ (!0 === t.mock
+ ? (h.duration = h.delay = 1)
+ : ((h.duration *= parseFloat(t.mock) || 1), (h.delay *= parseFloat(t.mock) || 1))),
+ (h.easing = j(h.easing, h.duration)),
+ h.begin && !p.isFunction(h.begin) && (h.begin = null),
+ h.progress && !p.isFunction(h.progress) && (h.progress = null),
+ h.complete && !p.isFunction(h.complete) && (h.complete = null),
+ h.display !== d &&
+ null !== h.display &&
+ ((h.display = h.display.toString().toLowerCase()),
+ 'auto' === h.display && (h.display = t.CSS.Values.getDisplayType(f))),
+ h.visibility !== d &&
+ null !== h.visibility &&
+ (h.visibility = h.visibility.toString().toLowerCase()),
+ (h.mobileHA = h.mobileHA && t.State.isMobile && !t.State.isGingerbread),
+ !1 === h.queue
+ ? h.delay
+ ? setTimeout(a, h.delay)
+ : a()
+ : m.queue(f, h.queue, function (b, c) {
+ return !0 === c
+ ? (B.promise && B.resolver(o), !0)
+ : ((t.velocityQueueEntryFlag = !0), void a())
+ }),
+ ('' !== h.queue && 'fx' !== h.queue) || 'inprogress' === m.queue(f)[0] || m.dequeue(f)
+ }
+ var h,
+ i,
+ n,
+ o,
+ q,
+ s,
+ u =
+ arguments[0] &&
+ (arguments[0].p ||
+ (m.isPlainObject(arguments[0].properties) && !arguments[0].properties.names) ||
+ p.isString(arguments[0].properties))
+ if (
+ (p.isWrapped(this)
+ ? ((h = !1), (n = 0), (o = this), (i = this))
+ : ((h = !0), (n = 1), (o = u ? arguments[0].elements || arguments[0].e : arguments[0])),
+ (o = f(o)))
+ ) {
+ u
+ ? ((q = arguments[0].properties || arguments[0].p), (s = arguments[0].options || arguments[0].o))
+ : ((q = arguments[n]), (s = arguments[n + 1]))
+ var x = o.length,
+ y = 0
+ if (!/^(stop|finish|finishAll)$/i.test(q) && !m.isPlainObject(s)) {
+ s = {}
+ for (var A = n + 1; A < arguments.length; A++)
+ p.isArray(arguments[A]) ||
+ (!/^(fast|normal|slow)$/i.test(arguments[A]) && !/^\d/.test(arguments[A]))
+ ? p.isString(arguments[A]) || p.isArray(arguments[A])
+ ? (s.easing = arguments[A])
+ : p.isFunction(arguments[A]) && (s.complete = arguments[A])
+ : (s.duration = arguments[A])
+ }
+ var C,
+ B = { promise: null, resolver: null, rejecter: null }
+ switch (
+ (h &&
+ t.Promise &&
+ (B.promise = new t.Promise(function (a, b) {
+ ;(B.resolver = a), (B.rejecter = b)
+ })),
+ q)
+ ) {
+ case 'scroll':
+ C = 'scroll'
+ break
+ case 'reverse':
+ C = 'reverse'
+ break
+ case 'finish':
+ case 'finishAll':
+ case 'stop':
+ m.each(o, function (a, b) {
+ g(b) &&
+ g(b).delayTimer &&
+ (clearTimeout(g(b).delayTimer.setTimeout),
+ g(b).delayTimer.next && g(b).delayTimer.next(),
+ delete g(b).delayTimer),
+ 'finishAll' !== q ||
+ (!0 !== s && !p.isString(s)) ||
+ (m.each(m.queue(b, p.isString(s) ? s : ''), function (a, b) {
+ p.isFunction(b) && b()
+ }),
+ m.queue(b, p.isString(s) ? s : '', []))
+ })
+ var D = []
+ return (
+ m.each(t.State.calls, function (a, b) {
+ b &&
+ m.each(b[1], function (c, e) {
+ var f = s === d ? '' : s
+ return (
+ (!0 !== f && b[2].queue !== f && (s !== d || !1 !== b[2].queue)) ||
+ void m.each(o, function (c, d) {
+ d === e &&
+ ((!0 === s || p.isString(s)) &&
+ (m.each(m.queue(d, p.isString(s) ? s : ''), function (a, b) {
+ p.isFunction(b) && b(null, !0)
+ }),
+ m.queue(d, p.isString(s) ? s : '', [])),
+ 'stop' === q
+ ? (g(d) &&
+ g(d).tweensContainer &&
+ !1 !== f &&
+ m.each(g(d).tweensContainer, function (a, b) {
+ b.endValue = b.currentValue
+ }),
+ D.push(a))
+ : ('finish' === q || 'finishAll' === q) && (b[2].duration = 1))
+ })
+ )
+ })
+ }),
+ 'stop' === q &&
+ (m.each(D, function (a, b) {
+ l(b, !0)
+ }),
+ B.promise && B.resolver(o)),
+ a()
+ )
+ default:
+ if (!m.isPlainObject(q) || p.isEmptyObject(q)) {
+ if (p.isString(q) && t.Redirects[q]) {
+ var F = (E = m.extend({}, s)).duration,
+ G = E.delay || 0
+ return (
+ !0 === E.backwards && (o = m.extend(!0, [], o).reverse()),
+ m.each(o, function (a, b) {
+ parseFloat(E.stagger)
+ ? (E.delay = G + parseFloat(E.stagger) * a)
+ : p.isFunction(E.stagger) && (E.delay = G + E.stagger.call(b, a, x)),
+ E.drag &&
+ ((E.duration = parseFloat(F) || (/^(callout|transition)/.test(q) ? 1e3 : r)),
+ (E.duration = Math.max(
+ E.duration * (E.backwards ? 1 - a / x : (a + 1) / x),
+ 0.75 * E.duration,
+ 200
+ ))),
+ t.Redirects[q].call(b, b, E || {}, a, x, o, B.promise ? B : d)
+ }),
+ a()
+ )
+ }
+ var H =
+ 'Velocity: First argument (' +
+ q +
+ ') was not a property map, a known action, or a registered redirect. Aborting.'
+ return B.promise ? B.rejecter(new Error(H)) : console.log(H), a()
+ }
+ C = 'start'
+ }
+ var K,
+ E,
+ I = {
+ lastParent: null,
+ lastPosition: null,
+ lastFontSize: null,
+ lastPercentToPxWidth: null,
+ lastPercentToPxHeight: null,
+ lastEmToPx: null,
+ remToPx: null,
+ vwToPx: null,
+ vhToPx: null
+ },
+ J = []
+ if (
+ (m.each(o, function (a, b) {
+ p.isNode(b) && e.call(b)
+ }),
+ ((E = m.extend({}, t.defaults, s)).loop = parseInt(E.loop)),
+ (K = 2 * E.loop - 1),
+ E.loop)
+ )
+ for (var L = 0; K > L; L++) {
+ var M = { delay: E.delay, progress: E.progress }
+ L === K - 1 &&
+ ((M.display = E.display), (M.visibility = E.visibility), (M.complete = E.complete)),
+ w(o, 'reverse', M)
+ }
+ return a()
+ }
+ }
+ ;(t = m.extend(w, t)).animate = w
+ var x = b.requestAnimationFrame || o
+ return (
+ t.State.isMobile ||
+ c.hidden === d ||
+ c.addEventListener('visibilitychange', function () {
+ c.hidden
+ ? ((x = function (a) {
+ return setTimeout(function () {
+ a(!0)
+ }, 16)
+ }),
+ k())
+ : (x = b.requestAnimationFrame || o)
+ }),
+ (a.Velocity = t),
+ a !== b && ((a.fn.velocity = w), (a.fn.velocity.defaults = t.defaults)),
+ m.each(['Down', 'Up'], function (a, b) {
+ t.Redirects['slide' + b] = function (a, c, e, f, g, h) {
+ var i = m.extend({}, c),
+ j = i.begin,
+ k = i.complete,
+ l = { height: '', marginTop: '', marginBottom: '', paddingTop: '', paddingBottom: '' },
+ n = {}
+ i.display === d &&
+ (i.display =
+ 'Down' === b
+ ? 'inline' === t.CSS.Values.getDisplayType(a)
+ ? 'inline-block'
+ : 'block'
+ : 'none'),
+ (i.begin = function () {
+ for (var c in (j && j.call(g, g), l)) {
+ n[c] = a.style[c]
+ var d = t.CSS.getPropertyValue(a, c)
+ l[c] = 'Down' === b ? [d, 0] : [0, d]
+ }
+ ;(n.overflow = a.style.overflow), (a.style.overflow = 'hidden')
+ }),
+ (i.complete = function () {
+ for (var b in n) a.style[b] = n[b]
+ k && k.call(g, g), h && h.resolver(g)
+ }),
+ t(a, l, i)
+ }
+ }),
+ m.each(['In', 'Out'], function (a, b) {
+ t.Redirects['fade' + b] = function (a, c, e, f, g, h) {
+ var i = m.extend({}, c),
+ j = { opacity: 'In' === b ? 1 : 0 },
+ k = i.complete
+ ;(i.complete =
+ e !== f - 1
+ ? (i.begin = null)
+ : function () {
+ k && k.call(g, g), h && h.resolver(g)
+ }),
+ i.display === d && (i.display = 'In' === b ? 'auto' : 'none'),
+ t(this, j, i)
+ }
+ }),
+ t
+ )
+ }
+ jQuery.fn.velocity = jQuery.fn.animate
+ })(__webpack_provided_window_dot_jQuery || window.Zepto || window, window, document)
+ }),
+ 'object' == typeof module.exports
+ ? (module.exports = a())
+ : void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ =
+ 'function' == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = a)
+ ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)
+ : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ }.call(this, __webpack_require__(0), __webpack_require__(0)))
+ },
+ function (module, exports, __webpack_require__) {
+ ;(function (jQuery) {
+ var k, w, h, v, d, x, o, q, y
+ ;(k = jQuery),
+ (w = document),
+ (h = Math),
+ (d = k.fn.peity = function (a, b) {
+ return (
+ y &&
+ this.each(function () {
+ var e = k(this),
+ c = e.data('_peity')
+ c
+ ? (a && (c.type = a), k.extend(c.opts, b))
+ : ((c = new x(e, a, k.extend({}, d.defaults[a], e.data('peity'), b))),
+ e
+ .change(function () {
+ c.draw()
+ })
+ .data('_peity', c)),
+ c.draw()
+ }),
+ this
+ )
+ }),
+ (o = (x = function (a, b, e) {
+ ;(this.$el = a), (this.type = b), (this.opts = e)
+ }).prototype),
+ (q = o.svgElement = function (a, b) {
+ return k(w.createElementNS('http://www.w3.org/2000/svg', a)).attr(b)
+ }),
+ (y = 'createElementNS' in w && q('svg', {})[0].createSVGRect),
+ (o.draw = function () {
+ var a = this.opts
+ d.graphers[this.type].call(this, a), a.after && a.after.call(this, a)
+ }),
+ (o.fill = function () {
+ var a = this.opts.fill
+ return k.isFunction(a)
+ ? a
+ : function (b, e) {
+ return a[e % a.length]
+ }
+ }),
+ (o.prepare = function (a, b) {
+ return (
+ this.$svg || this.$el.hide().after((this.$svg = q('svg', { class: 'peity' }))),
+ this.$svg
+ .empty()
+ .data('peity', this)
+ .attr({ height: b, width: a })
+ )
+ }),
+ (o.values = function () {
+ return k.map(this.$el.text().split(this.opts.delimiter), function (a) {
+ return parseFloat(a)
+ })
+ }),
+ (d.defaults = {}),
+ (d.graphers = {}),
+ (d.register = function (a, b, e) {
+ ;(this.defaults[a] = b), (this.graphers[a] = e)
+ }),
+ d.register('pie', { fill: ['#ff9900', '#fff4dd', '#ffc66e'], radius: 8 }, function (a) {
+ if (!a.delimiter) {
+ var b = this.$el.text().match(/[^0-9\.]/)
+ a.delimiter = b ? b[0] : ','
+ }
+ ;(b = k.map(this.values(), function (a) {
+ return 0 < a ? a : 0
+ })),
+ '/' == a.delimiter && (b = [(e = b[0]), h.max(0, b[1] - e)])
+ for (var c = 0, e = b.length, t = 0; c < e; c++) t += b[c]
+ t || ((e = 2), (t = 1), (b = [0, 1]))
+ var l = 2 * a.radius,
+ f = ((c = (l = this.prepare(a.width || l, a.height || l)).width()), l.height()),
+ j = c / 2,
+ d = f / 2
+ ;(f = h.min(j, d)), (a = a.innerRadius), 'donut' == this.type && !a && (a = 0.5 * f)
+ var r = h.PI,
+ s = this.fill(),
+ g = (this.scale = function (a, b) {
+ var c = (a / t) * r * 2 - r / 2
+ return [b * h.cos(c) + j, b * h.sin(c) + d]
+ }),
+ m = 0
+ for (c = 0; c < e; c++) {
+ var u = b[c]
+ if (0 != (i = u / t)) {
+ if (1 == i)
+ if (a)
+ var p = d - f,
+ n = d - a,
+ i = q('path', {
+ d: ['M', j, p, 'A', f, f, 0, 1, 1, (i = j - 0.01), p, 'L', i, n, 'A', a, a, 0, 1, 0, j, n].join(
+ ' '
+ )
+ })
+ else i = q('circle', { cx: j, cy: d, r: f })
+ else
+ (p = m + u),
+ (n = ['M'].concat(g(m, f), 'A', f, f, 0, 0.5 < i ? 1 : 0, 1, g(p, f), 'L')),
+ a ? (n = n.concat(g(p, a), 'A', a, a, 0, 0.5 < i ? 1 : 0, 0, g(m, a))) : n.push(j, d),
+ (m += u),
+ (i = q('path', { d: n.join(' ') }))
+ i.attr('fill', s.call(this, u, c, b)), l.append(i)
+ }
+ }
+ }),
+ d.register('donut', k.extend(!0, {}, d.defaults.pie), function (a) {
+ d.graphers.pie.call(this, a)
+ }),
+ d.register(
+ 'line',
+ { delimiter: ',', fill: '#c6d9fd', height: 16, min: 0, stroke: '#4d89f9', strokeWidth: 1, width: 32 },
+ function (a) {
+ var b = this.values()
+ 1 == b.length && b.push(b[0])
+ for (
+ var e = h.max.apply(h, a.max == v ? b : b.concat(a.max)),
+ c = h.min.apply(h, a.min == v ? b : b.concat(a.min)),
+ d = this.prepare(a.width, a.height),
+ l = a.strokeWidth,
+ f = d.width(),
+ j = d.height() - l,
+ k = e - c,
+ r = ((e = this.x = function (a) {
+ return a * (f / (b.length - 1))
+ }),
+ (this.y = function (a) {
+ var b = j
+ return k && (b -= ((a - c) / k) * j), b + l / 2
+ })),
+ s = r(h.max(c, 0)),
+ g = [0, s],
+ m = 0;
+ m < b.length;
+ m++
+ )
+ g.push(e(m), r(b[m]))
+ g.push(f, s),
+ a.fill && d.append(q('polygon', { fill: a.fill, points: g.join(' ') })),
+ l &&
+ d.append(
+ q('polyline', {
+ fill: 'none',
+ points: g.slice(2, g.length - 2).join(' '),
+ stroke: a.stroke,
+ 'stroke-width': l,
+ 'stroke-linecap': 'square'
+ })
+ )
+ }
+ ),
+ d.register('bar', { delimiter: ',', fill: ['#4D89F9'], height: 16, min: 0, padding: 0.1, width: 32 }, function (
+ a
+ ) {
+ for (
+ var b = this.values(),
+ e = h.max.apply(h, a.max == v ? b : b.concat(a.max)),
+ c = h.min.apply(h, a.min == v ? b : b.concat(a.min)),
+ d = this.prepare(a.width, a.height),
+ l = d.width(),
+ f = d.height(),
+ j = e - c,
+ k = ((a = a.padding), this.fill()),
+ r = (this.x = function (a) {
+ return (a * l) / b.length
+ }),
+ s = (this.y = function (a) {
+ return f - (j ? ((a - c) / j) * f : 1)
+ }),
+ g = 0;
+ g < b.length;
+ g++
+ ) {
+ var o,
+ m = r(g + a),
+ u = r(g + 1 - a) - m,
+ i = b[g],
+ p = s(i),
+ n = p
+ j ? (0 > i ? (n = s(h.min(e, 0))) : (p = s(h.max(c, 0)))) : (o = 1),
+ 0 == (o = p - n) && ((o = 1), 0 < e && j && n--),
+ d.append(q('rect', { fill: k.call(this, i, g, b), x: m, y: n, width: u, height: o }))
+ }
+ })
+ }.call(this, __webpack_require__(0)))
+ },
+ ,
+ function (module, exports, __webpack_require__) {
+ ;(function (__webpack_provided_window_dot_jQuery) {
+ !(function ($) {
+ 'use strict'
+ var MultiSelect = function (element, options) {
+ ;(this.options = options),
+ (this.$element = $(element)),
+ (this.$container = $('
', { class: 'ms-container' })),
+ (this.$selectableContainer = $('
', { class: 'ms-selectable' })),
+ (this.$selectionContainer = $('
', { class: 'ms-selection' })),
+ (this.$selectableUl = $('
', { class: 'ms-list', tabindex: '-1' })),
+ (this.$selectionUl = $('
', { class: 'ms-list', tabindex: '-1' })),
+ (this.scrollTo = 0),
+ (this.elemsSelector =
+ 'li:visible:not(.ms-optgroup-label,.ms-optgroup-container,.' + options.disabledClass + ')')
+ }
+ ;(MultiSelect.prototype = {
+ constructor: MultiSelect,
+ init: function () {
+ var that = this,
+ ms = this.$element
+ if (0 === ms.next('.ms-container').length) {
+ ms.css({ position: 'absolute', left: '-9999px' }),
+ ms.attr('id', ms.attr('id') ? ms.attr('id') : Math.ceil(1e3 * Math.random()) + 'multiselect'),
+ this.$container.attr('id', 'ms-' + ms.attr('id')),
+ this.$container.addClass(that.options.cssClass),
+ ms.find('option').each(function () {
+ that.generateLisFromOption(this)
+ }),
+ this.$selectionUl.find('.ms-optgroup-label').hide(),
+ that.options.selectableHeader && that.$selectableContainer.append(that.options.selectableHeader),
+ that.$selectableContainer.append(that.$selectableUl),
+ that.options.selectableFooter && that.$selectableContainer.append(that.options.selectableFooter),
+ that.options.selectionHeader && that.$selectionContainer.append(that.options.selectionHeader),
+ that.$selectionContainer.append(that.$selectionUl),
+ that.options.selectionFooter && that.$selectionContainer.append(that.options.selectionFooter),
+ that.$container.append(that.$selectableContainer),
+ that.$container.append(that.$selectionContainer),
+ ms.after(that.$container),
+ that.activeMouse(that.$selectableUl),
+ that.activeKeyboard(that.$selectableUl)
+ var action = that.options.dblClick ? 'dblclick' : 'click'
+ that.$selectableUl.on(action, '.ms-elem-selectable', function () {
+ that.select($(this).data('ms-value'))
+ }),
+ that.$selectionUl.on(action, '.ms-elem-selection', function () {
+ that.deselect($(this).data('ms-value'))
+ }),
+ that.activeMouse(that.$selectionUl),
+ that.activeKeyboard(that.$selectionUl),
+ ms.on('focus', function () {
+ that.$selectableUl.focus()
+ })
+ }
+ var selectedValues = ms
+ .find('option:selected')
+ .map(function () {
+ return $(this).val()
+ })
+ .get()
+ that.select(selectedValues, 'init'),
+ 'function' == typeof that.options.afterInit && that.options.afterInit.call(this, this.$container)
+ },
+ generateLisFromOption: function (option, index, $container) {
+ for (
+ var that = this, ms = that.$element, attributes = '', $option = $(option), cpt = 0;
+ cpt < option.attributes.length;
+ cpt++
+ ) {
+ var attr = option.attributes[cpt]
+ 'value' !== attr.name && 'disabled' !== attr.name && (attributes += attr.name + '="' + attr.value + '" ')
+ }
+ var selectableLi = $('
' + that.escapeHTML($option.text()) + ' '),
+ selectedLi = selectableLi.clone(),
+ value = $option.val(),
+ elementId = that.sanitize(value)
+ selectableLi
+ .data('ms-value', value)
+ .addClass('ms-elem-selectable')
+ .attr('id', elementId + '-selectable'),
+ selectedLi
+ .data('ms-value', value)
+ .addClass('ms-elem-selection')
+ .attr('id', elementId + '-selection')
+ .hide(),
+ ($option.prop('disabled') || ms.prop('disabled')) &&
+ (selectedLi.addClass(that.options.disabledClass), selectableLi.addClass(that.options.disabledClass))
+ var $optgroup = $option.parent('optgroup')
+ if ($optgroup.length > 0) {
+ var optgroupLabel = $optgroup.attr('label'),
+ optgroupId = that.sanitize(optgroupLabel),
+ $selectableOptgroup = that.$selectableUl.find('#optgroup-selectable-' + optgroupId),
+ $selectionOptgroup = that.$selectionUl.find('#optgroup-selection-' + optgroupId)
+ if (0 === $selectableOptgroup.length) {
+ var optgroupTpl =
+ '
'
+ ;($selectableOptgroup = $('
')),
+ ($selectionOptgroup = $('
')),
+ $selectableOptgroup.attr('id', 'optgroup-selectable-' + optgroupId),
+ $selectionOptgroup.attr('id', 'optgroup-selection-' + optgroupId),
+ $selectableOptgroup.append($(optgroupTpl)),
+ $selectionOptgroup.append($(optgroupTpl)),
+ that.options.selectableOptgroup &&
+ ($selectableOptgroup.find('.ms-optgroup-label').on('click', function () {
+ var values = $optgroup
+ .children(':not(:selected, :disabled)')
+ .map(function () {
+ return $(this).val()
+ })
+ .get()
+ that.select(values)
+ }),
+ $selectionOptgroup.find('.ms-optgroup-label').on('click', function () {
+ var values = $optgroup
+ .children(':selected:not(:disabled)')
+ .map(function () {
+ return $(this).val()
+ })
+ .get()
+ that.deselect(values)
+ })),
+ that.$selectableUl.append($selectableOptgroup),
+ that.$selectionUl.append($selectionOptgroup)
+ }
+ ;(index = void 0 === index ? $selectableOptgroup.find('ul').children().length : index + 1),
+ selectableLi.insertAt(index, $selectableOptgroup.children()),
+ selectedLi.insertAt(index, $selectionOptgroup.children())
+ } else
+ (index = void 0 === index ? that.$selectableUl.children().length : index),
+ selectableLi.insertAt(index, that.$selectableUl),
+ selectedLi.insertAt(index, that.$selectionUl)
+ },
+ addOption: function (options) {
+ var that = this
+ void 0 !== options.value && null !== options.value && (options = [options]),
+ $.each(options, function (index, option) {
+ if (
+ void 0 !== option.value &&
+ null !== option.value &&
+ 0 === that.$element.find("option[value='" + option.value + "']").length
+ ) {
+ var $option = $('
' + option.text + ' '),
+ $container = void 0 === option.nested ? that.$element : $("optgroup[label='" + option.nested + "']")
+ index = parseInt(void 0 === option.index ? $container.children().length : option.index)
+ option.optionClass && $option.addClass(option.optionClass),
+ option.disabled && $option.prop('disabled', !0),
+ $option.insertAt(index, $container),
+ that.generateLisFromOption($option.get(0), index, option.nested)
+ }
+ })
+ },
+ escapeHTML: function (text) {
+ return $('
')
+ .text(text)
+ .html()
+ },
+ activeKeyboard: function ($list) {
+ var that = this
+ $list
+ .on('focus', function () {
+ $(this).addClass('ms-focus')
+ })
+ .on('blur', function () {
+ $(this).removeClass('ms-focus')
+ })
+ .on('keydown', function (e) {
+ switch (e.which) {
+ case 40:
+ case 38:
+ return (
+ e.preventDefault(), e.stopPropagation(), void that.moveHighlight($(this), 38 === e.which ? -1 : 1)
+ )
+ case 37:
+ case 39:
+ return e.preventDefault(), e.stopPropagation(), void that.switchList($list)
+ case 9:
+ if (that.$element.is('[tabindex]')) {
+ e.preventDefault()
+ var tabindex = parseInt(that.$element.attr('tabindex'), 10)
+ return (
+ (tabindex = e.shiftKey ? tabindex - 1 : tabindex + 1),
+ void $('[tabindex="' + tabindex + '"]').focus()
+ )
+ }
+ e.shiftKey && that.$element.trigger('focus')
+ }
+ if ($.inArray(e.which, that.options.keySelect) > -1)
+ return e.preventDefault(), e.stopPropagation(), void that.selectHighlighted($list)
+ })
+ },
+ moveHighlight: function ($list, direction) {
+ var $elems = $list.find(this.elemsSelector),
+ $currElem = $elems.filter('.ms-hover'),
+ $nextElem = null,
+ elemHeight = $elems.first().outerHeight(),
+ containerHeight = $list.height()
+ this.$container.prop('id')
+ if (($elems.removeClass('ms-hover'), 1 === direction)) {
+ if (0 === ($nextElem = $currElem.nextAll(this.elemsSelector).first()).length)
+ if (($optgroupUl = $currElem.parent()).hasClass('ms-optgroup')) {
+ var $nextOptgroupLi = $optgroupUl.parent().next(':visible')
+ $nextElem =
+ $nextOptgroupLi.length > 0 ? $nextOptgroupLi.find(this.elemsSelector).first() : $elems.first()
+ } else $nextElem = $elems.first()
+ } else if (-1 === direction) {
+ var $optgroupUl
+ if (0 === ($nextElem = $currElem.prevAll(this.elemsSelector).first()).length)
+ if (($optgroupUl = $currElem.parent()).hasClass('ms-optgroup')) {
+ var $prevOptgroupLi = $optgroupUl.parent().prev(':visible')
+ $nextElem =
+ $prevOptgroupLi.length > 0 ? $prevOptgroupLi.find(this.elemsSelector).last() : $elems.last()
+ } else $nextElem = $elems.last()
+ }
+ if ($nextElem.length > 0) {
+ $nextElem.addClass('ms-hover')
+ var scrollTo = $list.scrollTop() + $nextElem.position().top - containerHeight / 2 + elemHeight / 2
+ $list.scrollTop(scrollTo)
+ }
+ },
+ selectHighlighted: function ($list) {
+ var $elems = $list.find(this.elemsSelector),
+ $highlightedElem = $elems.filter('.ms-hover').first()
+ $highlightedElem.length > 0 &&
+ ($list.parent().hasClass('ms-selectable')
+ ? this.select($highlightedElem.data('ms-value'))
+ : this.deselect($highlightedElem.data('ms-value')),
+ $elems.removeClass('ms-hover'))
+ },
+ switchList: function ($list) {
+ $list.blur(),
+ this.$container.find(this.elemsSelector).removeClass('ms-hover'),
+ $list.parent().hasClass('ms-selectable') ? this.$selectionUl.focus() : this.$selectableUl.focus()
+ },
+ activeMouse: function ($list) {
+ var that = this
+ this.$container.on('mouseenter', that.elemsSelector, function () {
+ $(this)
+ .parents('.ms-container')
+ .find(that.elemsSelector)
+ .removeClass('ms-hover'),
+ $(this).addClass('ms-hover')
+ }),
+ this.$container.on('mouseleave', that.elemsSelector, function () {
+ $(this)
+ .parents('.ms-container')
+ .find(that.elemsSelector)
+ .removeClass('ms-hover')
+ })
+ },
+ refresh: function () {
+ this.destroy(), this.$element.multiSelect(this.options)
+ },
+ destroy: function () {
+ $('#ms-' + this.$element.attr('id')).remove(),
+ this.$element.off('focus'),
+ this.$element.css('position', '').css('left', ''),
+ this.$element.removeData('multiselect')
+ },
+ select: function (value, method) {
+ 'string' == typeof value && (value = [value])
+ var that = this,
+ ms = this.$element,
+ msIds = $.map(value, function (val) {
+ return that.sanitize(val)
+ }),
+ selectables = this.$selectableUl
+ .find('#' + msIds.join('-selectable, #') + '-selectable')
+ .filter(':not(.' + that.options.disabledClass + ')'),
+ selections = this.$selectionUl
+ .find('#' + msIds.join('-selection, #') + '-selection')
+ .filter(':not(.' + that.options.disabledClass + ')'),
+ options = ms.find('option:not(:disabled)').filter(function () {
+ return $.inArray(this.value, value) > -1
+ })
+ if (
+ ('init' === method &&
+ ((selectables = this.$selectableUl.find('#' + msIds.join('-selectable, #') + '-selectable')),
+ (selections = this.$selectionUl.find('#' + msIds.join('-selection, #') + '-selection'))),
+ selectables.length > 0)
+ ) {
+ selectables.addClass('ms-selected').hide(),
+ selections.addClass('ms-selected').show(),
+ options.prop('selected', !0),
+ that.$container.find(that.elemsSelector).removeClass('ms-hover')
+ var selectableOptgroups = that.$selectableUl.children('.ms-optgroup-container')
+ if (selectableOptgroups.length > 0)
+ selectableOptgroups.each(function () {
+ var selectablesLi = $(this).find('.ms-elem-selectable')
+ selectablesLi.length === selectablesLi.filter('.ms-selected').length &&
+ $(this)
+ .find('.ms-optgroup-label')
+ .hide()
+ }),
+ that.$selectionUl.children('.ms-optgroup-container').each(function () {
+ $(this)
+ .find('.ms-elem-selection')
+ .filter('.ms-selected').length > 0 &&
+ $(this)
+ .find('.ms-optgroup-label')
+ .show()
+ })
+ else if (that.options.keepOrder && 'init' !== method) {
+ var selectionLiLast = that.$selectionUl.find('.ms-selected')
+ selectionLiLast.length > 1 &&
+ selectionLiLast.last().get(0) != selections.get(0) &&
+ selections.insertAfter(selectionLiLast.last())
+ }
+ 'init' !== method &&
+ (ms.trigger('change'),
+ 'function' == typeof that.options.afterSelect && that.options.afterSelect.call(this, value))
+ }
+ },
+ deselect: function (value) {
+ 'string' == typeof value && (value = [value])
+ var that = this,
+ ms = this.$element,
+ msIds = $.map(value, function (val) {
+ return that.sanitize(val)
+ }),
+ selectables = this.$selectableUl.find('#' + msIds.join('-selectable, #') + '-selectable'),
+ selections = this.$selectionUl
+ .find('#' + msIds.join('-selection, #') + '-selection')
+ .filter('.ms-selected')
+ .filter(':not(.' + that.options.disabledClass + ')'),
+ options = ms.find('option').filter(function () {
+ return $.inArray(this.value, value) > -1
+ })
+ if (selections.length > 0) {
+ selectables.removeClass('ms-selected').show(),
+ selections.removeClass('ms-selected').hide(),
+ options.prop('selected', !1),
+ that.$container.find(that.elemsSelector).removeClass('ms-hover')
+ var selectableOptgroups = that.$selectableUl.children('.ms-optgroup-container')
+ if (selectableOptgroups.length > 0)
+ selectableOptgroups.each(function () {
+ $(this)
+ .find('.ms-elem-selectable')
+ .filter(':not(.ms-selected)').length > 0 &&
+ $(this)
+ .find('.ms-optgroup-label')
+ .show()
+ }),
+ that.$selectionUl.children('.ms-optgroup-container').each(function () {
+ 0 ===
+ $(this)
+ .find('.ms-elem-selection')
+ .filter('.ms-selected').length &&
+ $(this)
+ .find('.ms-optgroup-label')
+ .hide()
+ })
+ ms.trigger('change'),
+ 'function' == typeof that.options.afterDeselect && that.options.afterDeselect.call(this, value)
+ }
+ },
+ select_all: function () {
+ var ms = this.$element,
+ values = ms.val()
+ if (
+ (ms.find('option:not(":disabled")').prop('selected', !0),
+ this.$selectableUl
+ .find('.ms-elem-selectable')
+ .filter(':not(.' + this.options.disabledClass + ')')
+ .addClass('ms-selected')
+ .hide(),
+ this.$selectionUl.find('.ms-optgroup-label').show(),
+ this.$selectableUl.find('.ms-optgroup-label').hide(),
+ this.$selectionUl
+ .find('.ms-elem-selection')
+ .filter(':not(.' + this.options.disabledClass + ')')
+ .addClass('ms-selected')
+ .show(),
+ this.$selectionUl.focus(),
+ ms.trigger('change'),
+ 'function' == typeof this.options.afterSelect)
+ ) {
+ var selectedValues = $.grep(ms.val(), function (item) {
+ return $.inArray(item, values) < 0
+ })
+ this.options.afterSelect.call(this, selectedValues)
+ }
+ },
+ deselect_all: function () {
+ var ms = this.$element,
+ values = ms.val()
+ ms.find('option').prop('selected', !1),
+ this.$selectableUl
+ .find('.ms-elem-selectable')
+ .removeClass('ms-selected')
+ .show(),
+ this.$selectionUl.find('.ms-optgroup-label').hide(),
+ this.$selectableUl.find('.ms-optgroup-label').show(),
+ this.$selectionUl
+ .find('.ms-elem-selection')
+ .removeClass('ms-selected')
+ .hide(),
+ this.$selectableUl.focus(),
+ ms.trigger('change'),
+ 'function' == typeof this.options.afterDeselect && this.options.afterDeselect.call(this, values)
+ },
+ sanitize: function (value) {
+ var i,
+ hash = 0
+ if (0 == value.length) return hash
+ var ls
+ for (i = 0, ls = value.length; i < ls; i++) (hash = (hash << 5) - hash + value.charCodeAt(i)), (hash |= 0)
+ return hash
+ }
+ }),
+ ($.fn.multiSelect = function () {
+ var option = arguments[0],
+ args = arguments
+ return this.each(function () {
+ var $this = $(this),
+ data = $this.data('multiselect'),
+ options = $.extend({}, $.fn.multiSelect.defaults, $this.data(), 'object' == typeof option && option)
+ data || $this.data('multiselect', (data = new MultiSelect(this, options))),
+ 'string' == typeof option ? data[option](args[1]) : data.init()
+ })
+ }),
+ ($.fn.multiSelect.defaults = {
+ keySelect: [32],
+ selectableOptgroup: !1,
+ disabledClass: 'disabled',
+ dblClick: !1,
+ keepOrder: !1,
+ cssClass: ''
+ }),
+ ($.fn.multiSelect.Constructor = MultiSelect),
+ ($.fn.insertAt = function (index, $parent) {
+ return this.each(function () {
+ 0 === index
+ ? $parent.prepend(this)
+ : $parent
+ .children()
+ .eq(index - 1)
+ .after(this)
+ })
+ })
+ })(__webpack_provided_window_dot_jQuery)
+ }.call(this, __webpack_require__(0)))
+ },
+ function (module, exports, __webpack_require__) {
+ ;(function ($) {
+ var __WEBPACK_LOCAL_MODULE_0__,
+ __WEBPACK_LOCAL_MODULE_0__factory,
+ __WEBPACK_LOCAL_MODULE_0__module,
+ __WEBPACK_LOCAL_MODULE_1__,
+ __WEBPACK_LOCAL_MODULE_1__factory,
+ __WEBPACK_LOCAL_MODULE_1__module,
+ __WEBPACK_AMD_DEFINE_FACTORY__,
+ __WEBPACK_AMD_DEFINE_ARRAY__,
+ __WEBPACK_AMD_DEFINE_RESULT__
+ ;(__WEBPACK_LOCAL_MODULE_0__module = { id: 'sifter', exports: {}, loaded: !1 }),
+ (__WEBPACK_LOCAL_MODULE_0__ =
+ 'function' ==
+ typeof (__WEBPACK_LOCAL_MODULE_0__factory = function () {
+ var Sifter = function (items, settings) {
+ ;(this.items = items), (this.settings = settings || { diacritics: !0 })
+ }
+ ;(Sifter.prototype.tokenize = function (query) {
+ if (!(query = trim(String(query || '').toLowerCase())) || !query.length) return []
+ var i,
+ n,
+ regex,
+ letter,
+ tokens = [],
+ words = query.split(/ +/)
+ for (i = 0, n = words.length; i < n; i++) {
+ if (((regex = escape_regex(words[i])), this.settings.diacritics))
+ for (letter in DIACRITICS)
+ DIACRITICS.hasOwnProperty(letter) &&
+ (regex = regex.replace(new RegExp(letter, 'g'), DIACRITICS[letter]))
+ tokens.push({ string: words[i], regex: new RegExp(regex, 'i') })
+ }
+ return tokens
+ }),
+ (Sifter.prototype.iterator = function (object, callback) {
+ ;(is_array(object)
+ ? Array.prototype.forEach ||
+ function (callback) {
+ for (var i = 0, n = this.length; i < n; i++) callback(this[i], i, this)
+ }
+ : function (callback) {
+ for (var key in this) this.hasOwnProperty(key) && callback(this[key], key, this)
+ }
+ ).apply(object, [callback])
+ }),
+ (Sifter.prototype.getScoreFunction = function (search, options) {
+ var fields, tokens, token_count
+ ;(search = this.prepareSearch(search, options)),
+ (tokens = search.tokens),
+ (fields = search.options.fields),
+ (token_count = tokens.length)
+ var field_count,
+ scoreValue = function (value, token) {
+ var score, pos
+ return value
+ ? ((value = String(value || '')),
+ -1 === (pos = value.search(token.regex))
+ ? 0
+ : ((score = token.string.length / value.length), 0 === pos && (score += 0.5), score))
+ : 0
+ },
+ scoreObject = (field_count = fields.length)
+ ? 1 === field_count
+ ? function (token, data) {
+ return scoreValue(data[fields[0]], token)
+ }
+ : function (token, data) {
+ for (var i = 0, sum = 0; i < field_count; i++) sum += scoreValue(data[fields[i]], token)
+ return sum / field_count
+ }
+ : function () {
+ return 0
+ }
+ return token_count
+ ? 1 === token_count
+ ? function (data) {
+ return scoreObject(tokens[0], data)
+ }
+ : 'and' === search.options.conjunction
+ ? function (data) {
+ for (var score, i = 0, sum = 0; i < token_count; i++) {
+ if ((score = scoreObject(tokens[i], data)) <= 0) return 0
+ sum += score
+ }
+ return sum / token_count
+ }
+ : function (data) {
+ for (var i = 0, sum = 0; i < token_count; i++) sum += scoreObject(tokens[i], data)
+ return sum / token_count
+ }
+ : function () {
+ return 0
+ }
+ }),
+ (Sifter.prototype.getSortFunction = function (search, options) {
+ var i, n, self, field, fields, fields_count, multiplier, multipliers, get_field, implicit_score, sort
+ if (
+ ((search = (self = this).prepareSearch(search, options)),
+ (sort = (!search.query && options.sort_empty) || options.sort),
+ (get_field = function (name, result) {
+ return '$score' === name ? result.score : self.items[result.id][name]
+ }),
+ (fields = []),
+ sort)
+ )
+ for (i = 0, n = sort.length; i < n; i++)
+ (search.query || '$score' !== sort[i].field) && fields.push(sort[i])
+ if (search.query) {
+ for (implicit_score = !0, i = 0, n = fields.length; i < n; i++)
+ if ('$score' === fields[i].field) {
+ implicit_score = !1
+ break
+ }
+ implicit_score && fields.unshift({ field: '$score', direction: 'desc' })
+ } else
+ for (i = 0, n = fields.length; i < n; i++)
+ if ('$score' === fields[i].field) {
+ fields.splice(i, 1)
+ break
+ }
+ for (multipliers = [], i = 0, n = fields.length; i < n; i++)
+ multipliers.push('desc' === fields[i].direction ? -1 : 1)
+ return (fields_count = fields.length)
+ ? 1 === fields_count
+ ? ((field = fields[0].field),
+ (multiplier = multipliers[0]),
+ function (a, b) {
+ return multiplier * cmp(get_field(field, a), get_field(field, b))
+ })
+ : function (a, b) {
+ var i, result, field
+ for (i = 0; i < fields_count; i++)
+ if (
+ ((field = fields[i].field),
+ (result = multipliers[i] * cmp(get_field(field, a), get_field(field, b))))
+ )
+ return result
+ return 0
+ }
+ : null
+ }),
+ (Sifter.prototype.prepareSearch = function (query, options) {
+ if ('object' == typeof query) return query
+ var option_fields = (options = extend({}, options)).fields,
+ option_sort = options.sort,
+ option_sort_empty = options.sort_empty
+ return (
+ option_fields && !is_array(option_fields) && (options.fields = [option_fields]),
+ option_sort && !is_array(option_sort) && (options.sort = [option_sort]),
+ option_sort_empty && !is_array(option_sort_empty) && (options.sort_empty = [option_sort_empty]),
+ {
+ options,
+ query: String(query || '').toLowerCase(),
+ tokens: this.tokenize(query),
+ total: 0,
+ items: []
+ }
+ )
+ }),
+ (Sifter.prototype.search = function (query, options) {
+ var score, search, fn_sort, fn_score
+ return (
+ (search = this.prepareSearch(query, options)),
+ (options = search.options),
+ (query = search.query),
+ (fn_score = options.score || this.getScoreFunction(search)),
+ query.length
+ ? this.iterator(this.items, function (item, id) {
+ ;(score = fn_score(item)),
+ (!1 === options.filter || score > 0) && search.items.push({ score, id })
+ })
+ : this.iterator(this.items, function (item, id) {
+ search.items.push({ score: 1, id })
+ }),
+ (fn_sort = this.getSortFunction(search, options)) && search.items.sort(fn_sort),
+ (search.total = search.items.length),
+ 'number' == typeof options.limit && (search.items = search.items.slice(0, options.limit)),
+ search
+ )
+ })
+ var cmp = function (a, b) {
+ return 'number' == typeof a && 'number' == typeof b
+ ? a > b
+ ? 1
+ : a < b
+ ? -1
+ : 0
+ : ((a = asciifold(String(a || ''))), (b = asciifold(String(b || ''))), a > b ? 1 : b > a ? -1 : 0)
+ },
+ extend = function (a, b) {
+ var i, n, k, object
+ for (i = 1, n = arguments.length; i < n; i++)
+ if ((object = arguments[i])) for (k in object) object.hasOwnProperty(k) && (a[k] = object[k])
+ return a
+ },
+ trim = function (str) {
+ return (str + '').replace(/^\s+|\s+$|/g, '')
+ },
+ escape_regex = function (str) {
+ return (str + '').replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1')
+ },
+ is_array =
+ Array.isArray ||
+ ($ && $.isArray) ||
+ function (object) {
+ return '[object Array]' === Object.prototype.toString.call(object)
+ },
+ DIACRITICS = {
+ a: '[aÀÁÂÃÄÅàáâãäåĀāąĄ]',
+ c: '[cÇçćĆčČ]',
+ d: '[dđĐďĎ]',
+ e: '[eÈÉÊËèéêëěĚĒēęĘ]',
+ i: '[iÌÍÎÏìíîïĪī]',
+ l: '[lłŁ]',
+ n: '[nÑñňŇńŃ]',
+ o: '[oÒÓÔÕÕÖØòóôõöøŌō]',
+ r: '[rřŘ]',
+ s: '[sŠšśŚ]',
+ t: '[tťŤ]',
+ u: '[uÙÚÛÜùúûüůŮŪū]',
+ y: '[yŸÿýÝ]',
+ z: '[zŽžżŻźŹ]'
+ },
+ asciifold = (function () {
+ var i,
+ n,
+ k,
+ chunk,
+ foreignletters = '',
+ lookup = {}
+ for (k in DIACRITICS)
+ if (DIACRITICS.hasOwnProperty(k))
+ for (
+ chunk = DIACRITICS[k].substring(2, DIACRITICS[k].length - 1),
+ foreignletters += chunk,
+ i = 0,
+ n = chunk.length;
+ i < n;
+ i++
+ )
+ lookup[chunk.charAt(i)] = k
+ var regexp = new RegExp('[' + foreignletters + ']', 'g')
+ return function (str) {
+ return str
+ .replace(regexp, function (foreignletter) {
+ return lookup[foreignletter]
+ })
+ .toLowerCase()
+ }
+ })()
+ return Sifter
+ })
+ ? __WEBPACK_LOCAL_MODULE_0__factory.call(
+ __WEBPACK_LOCAL_MODULE_0__module.exports,
+ __webpack_require__,
+ __WEBPACK_LOCAL_MODULE_0__module.exports,
+ __WEBPACK_LOCAL_MODULE_0__module
+ )
+ : __WEBPACK_LOCAL_MODULE_0__factory),
+ (__WEBPACK_LOCAL_MODULE_0__module.loaded = !0),
+ void 0 !== __WEBPACK_LOCAL_MODULE_0__ ||
+ (__WEBPACK_LOCAL_MODULE_0__ = __WEBPACK_LOCAL_MODULE_0__module.exports),
+ (__WEBPACK_LOCAL_MODULE_1__module = { id: 'microplugin', exports: {}, loaded: !1 }),
+ (__WEBPACK_LOCAL_MODULE_1__ =
+ 'function' ==
+ typeof (__WEBPACK_LOCAL_MODULE_1__factory = function () {
+ var MicroPlugin = {
+ mixin: function (Interface) {
+ ;(Interface.plugins = {}),
+ (Interface.prototype.initializePlugins = function (plugins) {
+ var i,
+ n,
+ key,
+ queue = []
+ if (
+ ((this.plugins = { names: [], settings: {}, requested: {}, loaded: {} }),
+ utils.isArray(plugins))
+ )
+ for (i = 0, n = plugins.length; i < n; i++)
+ 'string' == typeof plugins[i]
+ ? queue.push(plugins[i])
+ : ((this.plugins.settings[plugins[i].name] = plugins[i].options),
+ queue.push(plugins[i].name))
+ else if (plugins)
+ for (key in plugins)
+ plugins.hasOwnProperty(key) && ((this.plugins.settings[key] = plugins[key]), queue.push(key))
+ for (; queue.length; ) this.require(queue.shift())
+ }),
+ (Interface.prototype.loadPlugin = function (name) {
+ var plugins = this.plugins,
+ plugin = Interface.plugins[name]
+ if (!Interface.plugins.hasOwnProperty(name))
+ throw new Error('Unable to find "' + name + '" plugin')
+ ;(plugins.requested[name] = !0),
+ (plugins.loaded[name] = plugin.fn.apply(this, [this.plugins.settings[name] || {}])),
+ plugins.names.push(name)
+ }),
+ (Interface.prototype.require = function (name) {
+ var plugins = this.plugins
+ if (!this.plugins.loaded.hasOwnProperty(name)) {
+ if (plugins.requested[name]) throw new Error('Plugin has circular dependency ("' + name + '")')
+ this.loadPlugin(name)
+ }
+ return plugins.loaded[name]
+ }),
+ (Interface.define = function (name, fn) {
+ Interface.plugins[name] = { name, fn }
+ })
+ }
+ },
+ utils = {
+ isArray:
+ Array.isArray ||
+ function (vArg) {
+ return '[object Array]' === Object.prototype.toString.call(vArg)
+ }
+ }
+ return MicroPlugin
+ })
+ ? __WEBPACK_LOCAL_MODULE_1__factory.call(
+ __WEBPACK_LOCAL_MODULE_1__module.exports,
+ __webpack_require__,
+ __WEBPACK_LOCAL_MODULE_1__module.exports,
+ __WEBPACK_LOCAL_MODULE_1__module
+ )
+ : __WEBPACK_LOCAL_MODULE_1__factory),
+ (__WEBPACK_LOCAL_MODULE_1__module.loaded = !0),
+ void 0 !== __WEBPACK_LOCAL_MODULE_1__ ||
+ (__WEBPACK_LOCAL_MODULE_1__ = __WEBPACK_LOCAL_MODULE_1__module.exports),
+ (__WEBPACK_AMD_DEFINE_ARRAY__ = [
+ __webpack_require__(0),
+ __WEBPACK_LOCAL_MODULE_0__,
+ __WEBPACK_LOCAL_MODULE_1__
+ ]),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ =
+ 'function' ==
+ typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function ($, Sifter, MicroPlugin) {
+ 'use strict'
+ var highlight = function ($element, pattern) {
+ if ('string' != typeof pattern || pattern.length) {
+ var regex = 'string' == typeof pattern ? new RegExp(pattern, 'i') : pattern,
+ highlight = function (node) {
+ var skip = 0
+ if (3 === node.nodeType) {
+ var pos = node.data.search(regex)
+ if (pos >= 0 && node.data.length > 0) {
+ var match = node.data.match(regex),
+ spannode = document.createElement('span')
+ spannode.className = 'highlight'
+ var middlebit = node.splitText(pos),
+ middleclone = (middlebit.splitText(match[0].length), middlebit.cloneNode(!0))
+ spannode.appendChild(middleclone),
+ middlebit.parentNode.replaceChild(spannode, middlebit),
+ (skip = 1)
+ }
+ } else if (1 === node.nodeType && node.childNodes && !/(script|style)/i.test(node.tagName))
+ for (var i = 0; i < node.childNodes.length; ++i) i += highlight(node.childNodes[i])
+ return skip
+ }
+ return $element.each(function () {
+ highlight(this)
+ })
+ }
+ },
+ MicroEvent = function () {}
+ ;(MicroEvent.prototype = {
+ on: function (event, fct) {
+ ;(this._events = this._events || {}),
+ (this._events[event] = this._events[event] || []),
+ this._events[event].push(fct)
+ },
+ off: function (event, fct) {
+ var n = arguments.length
+ return 0 === n
+ ? delete this._events
+ : 1 === n
+ ? delete this._events[event]
+ : ((this._events = this._events || {}),
+ void (
+ event in this._events != 0 && this._events[event].splice(this._events[event].indexOf(fct), 1)
+ ))
+ },
+ trigger: function (event) {
+ if (((this._events = this._events || {}), event in this._events != 0))
+ for (var i = 0; i < this._events[event].length; i++)
+ this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1))
+ }
+ }),
+ (MicroEvent.mixin = function (destObject) {
+ for (var props = ['on', 'off', 'trigger'], i = 0; i < props.length; i++)
+ destObject.prototype[props[i]] = MicroEvent.prototype[props[i]]
+ })
+ var IS_MAC = /Mac/.test(navigator.userAgent),
+ KEY_CMD = IS_MAC ? 91 : 17,
+ KEY_CTRL = IS_MAC ? 18 : 17,
+ SUPPORTS_VALIDITY_API =
+ !/android/i.test(window.navigator.userAgent) && !!document.createElement('form').validity,
+ isset = function (object) {
+ return void 0 !== object
+ },
+ hash_key = function (value) {
+ return null == value ? null : 'boolean' == typeof value ? (value ? '1' : '0') : value + ''
+ },
+ escape_html = function (str) {
+ return (str + '')
+ .replace(/&/g, '&')
+ .replace(//g, '>')
+ .replace(/"/g, '"')
+ },
+ escape_replace = function (str) {
+ return (str + '').replace(/\$/g, '$$$$')
+ },
+ hook = {
+ before: function (self, method, fn) {
+ var original = self[method]
+ self[method] = function () {
+ return fn.apply(self, arguments), original.apply(self, arguments)
+ }
+ },
+ after: function (self, method, fn) {
+ var original = self[method]
+ self[method] = function () {
+ var result = original.apply(self, arguments)
+ return fn.apply(self, arguments), result
+ }
+ }
+ },
+ debounce_events = function (self, types, fn) {
+ var type,
+ trigger = self.trigger,
+ event_args = {}
+ for (type in ((self.trigger = function () {
+ var type = arguments[0]
+ if (-1 === types.indexOf(type)) return trigger.apply(self, arguments)
+ event_args[type] = arguments
+ }),
+ fn.apply(self, []),
+ (self.trigger = trigger),
+ event_args))
+ event_args.hasOwnProperty(type) && trigger.apply(self, event_args[type])
+ },
+ getSelection = function (input) {
+ var result = {}
+ if ('selectionStart' in input)
+ (result.start = input.selectionStart), (result.length = input.selectionEnd - result.start)
+ else if (document.selection) {
+ input.focus()
+ var sel = document.selection.createRange(),
+ selLen = document.selection.createRange().text.length
+ sel.moveStart('character', -input.value.length),
+ (result.start = sel.text.length - selLen),
+ (result.length = selLen)
+ }
+ return result
+ },
+ Selectize = function ($input, settings) {
+ var i, n, dir, input
+ ;(input = $input[0]).selectize = this
+ var fn,
+ delay,
+ timeout,
+ computedStyle = window.getComputedStyle && window.getComputedStyle(input, null)
+ if (
+ ((dir =
+ (dir = computedStyle
+ ? computedStyle.getPropertyValue('direction')
+ : input.currentStyle && input.currentStyle.direction) ||
+ $input.parents('[dir]:first').attr('dir') ||
+ ''),
+ $.extend(this, {
+ order: 0,
+ settings,
+ $input,
+ tabIndex: $input.attr('tabindex') || '',
+ tagType: 'select' === input.tagName.toLowerCase() ? 1 : 2,
+ rtl: /rtl/i.test(dir),
+ eventNS: '.selectize' + ++Selectize.count,
+ highlightedValue: null,
+ isOpen: !1,
+ isDisabled: !1,
+ isRequired: $input.is('[required]'),
+ isInvalid: !1,
+ isLocked: !1,
+ isFocused: !1,
+ isInputHidden: !1,
+ isSetup: !1,
+ isShiftDown: !1,
+ isCmdDown: !1,
+ isCtrlDown: !1,
+ ignoreFocus: !1,
+ ignoreBlur: !1,
+ ignoreHover: !1,
+ hasOptions: !1,
+ currentResults: null,
+ lastValue: '',
+ caretPos: 0,
+ loading: 0,
+ loadedSearches: {},
+ $activeOption: null,
+ $activeItems: [],
+ optgroups: {},
+ options: {},
+ userOptions: {},
+ items: [],
+ renderCache: {},
+ onSearchChange:
+ null === settings.loadThrottle
+ ? this.onSearchChange
+ : ((fn = this.onSearchChange),
+ (delay = settings.loadThrottle),
+ function () {
+ var self = this,
+ args = arguments
+ window.clearTimeout(timeout),
+ (timeout = window.setTimeout(function () {
+ fn.apply(self, args)
+ }, delay))
+ })
+ }),
+ (this.sifter = new Sifter(this.options, { diacritics: settings.diacritics })),
+ this.settings.options)
+ ) {
+ for (i = 0, n = this.settings.options.length; i < n; i++)
+ this.registerOption(this.settings.options[i])
+ delete this.settings.options
+ }
+ if (this.settings.optgroups) {
+ for (i = 0, n = this.settings.optgroups.length; i < n; i++)
+ this.registerOptionGroup(this.settings.optgroups[i])
+ delete this.settings.optgroups
+ }
+ ;(this.settings.mode = this.settings.mode || (1 === this.settings.maxItems ? 'single' : 'multi')),
+ 'boolean' != typeof this.settings.hideSelected &&
+ (this.settings.hideSelected = 'multi' === this.settings.mode),
+ this.initializePlugins(this.settings.plugins),
+ this.setupCallbacks(),
+ this.setupTemplates(),
+ this.setup()
+ }
+ return (
+ MicroEvent.mixin(Selectize),
+ MicroPlugin.mixin(Selectize),
+ $.extend(Selectize.prototype, {
+ setup: function () {
+ var $wrapper,
+ $control,
+ $control_input,
+ $dropdown,
+ $dropdown_content,
+ $dropdown_parent,
+ inputMode,
+ classes,
+ classes_plugins,
+ $parent,
+ event,
+ selector,
+ fn,
+ self = this,
+ settings = self.settings,
+ eventNS = self.eventNS,
+ $window = $(window),
+ $document = $(document),
+ $input = self.$input
+ if (
+ ((inputMode = self.settings.mode),
+ (classes = $input.attr('class') || ''),
+ ($wrapper = $('
')
+ .addClass(settings.wrapperClass)
+ .addClass(classes)
+ .addClass(inputMode)),
+ ($control = $('
')
+ .addClass(settings.inputClass)
+ .addClass('items')
+ .appendTo($wrapper)),
+ ($control_input = $('
')
+ .appendTo($control)
+ .attr('tabindex', $input.is(':disabled') ? '-1' : self.tabIndex)),
+ ($dropdown_parent = $(settings.dropdownParent || $wrapper)),
+ ($dropdown = $('
')
+ .addClass(settings.dropdownClass)
+ .addClass(inputMode)
+ .hide()
+ .appendTo($dropdown_parent)),
+ ($dropdown_content = $('
')
+ .addClass(settings.dropdownContentClass)
+ .appendTo($dropdown)),
+ self.settings.copyClassesToDropdown && $dropdown.addClass(classes),
+ $wrapper.css({ width: $input[0].style.width }),
+ self.plugins.names.length &&
+ ((classes_plugins = 'plugin-' + self.plugins.names.join(' plugin-')),
+ $wrapper.addClass(classes_plugins),
+ $dropdown.addClass(classes_plugins)),
+ (null === settings.maxItems || settings.maxItems > 1) &&
+ 1 === self.tagType &&
+ $input.attr('multiple', 'multiple'),
+ self.settings.placeholder && $control_input.attr('placeholder', settings.placeholder),
+ !self.settings.splitOn && self.settings.delimiter)
+ ) {
+ var delimiterEscaped = self.settings.delimiter.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
+ self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*')
+ }
+ $input.attr('autocorrect') && $control_input.attr('autocorrect', $input.attr('autocorrect')),
+ $input.attr('autocapitalize') &&
+ $control_input.attr('autocapitalize', $input.attr('autocapitalize')),
+ (self.$wrapper = $wrapper),
+ (self.$control = $control),
+ (self.$control_input = $control_input),
+ (self.$dropdown = $dropdown),
+ (self.$dropdown_content = $dropdown_content),
+ $dropdown.on('mouseenter', '[data-selectable]', function () {
+ return self.onOptionHover.apply(self, arguments)
+ }),
+ $dropdown.on('mousedown click', '[data-selectable]', function () {
+ return self.onOptionSelect.apply(self, arguments)
+ }),
+ (event = 'mousedown'),
+ (selector = '*:not(input)'),
+ (fn = function () {
+ return self.onItemSelect.apply(self, arguments)
+ }),
+ ($parent = $control).on(event, selector, function (e) {
+ for (var child = e.target; child && child.parentNode !== $parent[0]; ) child = child.parentNode
+ return (e.currentTarget = child), fn.apply(this, [e])
+ }),
+ (function ($input) {
+ var currentWidth = null,
+ update = function (e, options) {
+ var value, keyCode, printable, placeholder, width, shift, character, selection
+ ;(e = e || window.event || {}),
+ (options = options || {}),
+ e.metaKey ||
+ e.altKey ||
+ ((options.force || !1 !== $input.data('grow')) &&
+ ((value = $input.val()),
+ e.type &&
+ 'keydown' === e.type.toLowerCase() &&
+ ((keyCode = e.keyCode),
+ (printable =
+ (keyCode >= 97 && keyCode <= 122) ||
+ (keyCode >= 65 && keyCode <= 90) ||
+ (keyCode >= 48 && keyCode <= 57) ||
+ 32 === keyCode),
+ 46 === keyCode || 8 === keyCode
+ ? (selection = getSelection($input[0])).length
+ ? (value =
+ value.substring(0, selection.start) +
+ value.substring(selection.start + selection.length))
+ : 8 === keyCode && selection.start
+ ? (value =
+ value.substring(0, selection.start - 1) +
+ value.substring(selection.start + 1))
+ : 46 === keyCode &&
+ void 0 !== selection.start &&
+ (value =
+ value.substring(0, selection.start) + value.substring(selection.start + 1))
+ : printable &&
+ ((shift = e.shiftKey),
+ (character = String.fromCharCode(e.keyCode)),
+ (character = shift ? character.toUpperCase() : character.toLowerCase()),
+ (value += character))),
+ (placeholder = $input.attr('placeholder')),
+ !value && placeholder && (value = placeholder),
+ (width =
+ (function (str, $parent) {
+ if (!str) return 0
+ var $test = $('
')
+ .css({
+ position: 'absolute',
+ top: -99999,
+ left: -99999,
+ width: 'auto',
+ padding: 0,
+ whiteSpace: 'pre'
+ })
+ .text(str)
+ .appendTo('body')
+ !(function ($from, $to, properties) {
+ var i,
+ n,
+ styles = {}
+ if (properties)
+ for (i = 0, n = properties.length; i < n; i++)
+ styles[properties[i]] = $from.css(properties[i])
+ else styles = $from.css()
+ $to.css(styles)
+ })($parent, $test, [
+ 'letterSpacing',
+ 'fontSize',
+ 'fontFamily',
+ 'fontWeight',
+ 'textTransform'
+ ])
+ var width = $test.width()
+ return $test.remove(), width
+ })(value, $input) + 4) !== currentWidth &&
+ ((currentWidth = width), $input.width(width), $input.triggerHandler('resize'))))
+ }
+ $input.on('keydown keyup update blur', update), update()
+ })($control_input),
+ $control.on({
+ mousedown: function () {
+ return self.onMouseDown.apply(self, arguments)
+ },
+ click: function () {
+ return self.onClick.apply(self, arguments)
+ }
+ }),
+ $control_input.on({
+ mousedown: function (e) {
+ e.stopPropagation()
+ },
+ keydown: function () {
+ return self.onKeyDown.apply(self, arguments)
+ },
+ keyup: function () {
+ return self.onKeyUp.apply(self, arguments)
+ },
+ keypress: function () {
+ return self.onKeyPress.apply(self, arguments)
+ },
+ resize: function () {
+ self.positionDropdown.apply(self, [])
+ },
+ blur: function () {
+ return self.onBlur.apply(self, arguments)
+ },
+ focus: function () {
+ return (self.ignoreBlur = !1), self.onFocus.apply(self, arguments)
+ },
+ paste: function () {
+ return self.onPaste.apply(self, arguments)
+ }
+ }),
+ $document.on('keydown' + eventNS, function (e) {
+ ;(self.isCmdDown = e[IS_MAC ? 'metaKey' : 'ctrlKey']),
+ (self.isCtrlDown = e[IS_MAC ? 'altKey' : 'ctrlKey']),
+ (self.isShiftDown = e.shiftKey)
+ }),
+ $document.on('keyup' + eventNS, function (e) {
+ e.keyCode === KEY_CTRL && (self.isCtrlDown = !1),
+ 16 === e.keyCode && (self.isShiftDown = !1),
+ e.keyCode === KEY_CMD && (self.isCmdDown = !1)
+ }),
+ $document.on('mousedown' + eventNS, function (e) {
+ if (self.isFocused) {
+ if (e.target === self.$dropdown[0] || e.target.parentNode === self.$dropdown[0]) return !1
+ self.$control.has(e.target).length || e.target === self.$control[0] || self.blur(e.target)
+ }
+ }),
+ $window.on(['scroll' + eventNS, 'resize' + eventNS].join(' '), function () {
+ self.isOpen && self.positionDropdown.apply(self, arguments)
+ }),
+ $window.on('mousemove' + eventNS, function () {
+ self.ignoreHover = !1
+ }),
+ (this.revertSettings = {
+ $children: $input.children().detach(),
+ tabindex: $input.attr('tabindex')
+ }),
+ $input
+ .attr('tabindex', -1)
+ .hide()
+ .after(self.$wrapper),
+ $.isArray(settings.items) && (self.setValue(settings.items), delete settings.items),
+ SUPPORTS_VALIDITY_API &&
+ $input.on('invalid' + eventNS, function (e) {
+ e.preventDefault(), (self.isInvalid = !0), self.refreshState()
+ }),
+ self.updateOriginalInput(),
+ self.refreshItems(),
+ self.refreshState(),
+ self.updatePlaceholder(),
+ (self.isSetup = !0),
+ $input.is(':disabled') && self.disable(),
+ self.on('change', this.onChange),
+ $input.data('selectize', self),
+ $input.addClass('selectized'),
+ self.trigger('initialize'),
+ self.positionDropdown(),
+ !0 === settings.preload && self.onSearchChange('')
+ },
+ setupTemplates: function () {
+ var field_label = this.settings.labelField,
+ field_optgroup = this.settings.optgroupLabelField,
+ templates = {
+ optgroup: function (data) {
+ return '' + data.html + '
'
+ },
+ optgroup_header: function (data, escape) {
+ return ''
+ },
+ option: function (data, escape) {
+ return '' + escape(data[field_label]) + '
'
+ },
+ item: function (data, escape) {
+ return '' + escape(data[field_label]) + '
'
+ },
+ option_create: function (data, escape) {
+ return 'Add ' + escape(data.input) + ' …
'
+ }
+ }
+ this.settings.render = $.extend({}, templates, this.settings.render)
+ },
+ setupCallbacks: function () {
+ var key,
+ fn,
+ callbacks = {
+ initialize: 'onInitialize',
+ change: 'onChange',
+ item_add: 'onItemAdd',
+ item_remove: 'onItemRemove',
+ clear: 'onClear',
+ option_add: 'onOptionAdd',
+ option_remove: 'onOptionRemove',
+ option_clear: 'onOptionClear',
+ optgroup_add: 'onOptionGroupAdd',
+ optgroup_remove: 'onOptionGroupRemove',
+ optgroup_clear: 'onOptionGroupClear',
+ dropdown_open: 'onDropdownOpen',
+ dropdown_close: 'onDropdownClose',
+ type: 'onType',
+ load: 'onLoad',
+ focus: 'onFocus',
+ blur: 'onBlur'
+ }
+ for (key in callbacks)
+ callbacks.hasOwnProperty(key) && (fn = this.settings[callbacks[key]]) && this.on(key, fn)
+ },
+ onClick: function (e) {
+ this.isFocused || (this.focus(), e.preventDefault())
+ },
+ onMouseDown: function (e) {
+ var self = this,
+ defaultPrevented = e.isDefaultPrevented()
+ if (($(e.target), self.isFocused)) {
+ if (e.target !== self.$control_input[0])
+ return (
+ 'single' === self.settings.mode
+ ? self.isOpen
+ ? self.close()
+ : self.open()
+ : defaultPrevented || self.setActiveItem(null),
+ !1
+ )
+ } else
+ defaultPrevented ||
+ window.setTimeout(function () {
+ self.focus()
+ }, 0)
+ },
+ onChange: function () {
+ this.$input.trigger('change')
+ },
+ onPaste: function (e) {
+ var self = this
+ self.isFull() || self.isInputHidden || self.isLocked
+ ? e.preventDefault()
+ : self.settings.splitOn &&
+ setTimeout(function () {
+ for (
+ var splitInput = $.trim(self.$control_input.val() || '').split(self.settings.splitOn),
+ i = 0,
+ n = splitInput.length;
+ i < n;
+ i++
+ )
+ self.createItem(splitInput[i])
+ }, 0)
+ },
+ onKeyPress: function (e) {
+ if (this.isLocked) return e && e.preventDefault()
+ var character = String.fromCharCode(e.keyCode || e.which)
+ return this.settings.create &&
+ 'multi' === this.settings.mode &&
+ character === this.settings.delimiter
+ ? (this.createItem(), e.preventDefault(), !1)
+ : void 0
+ },
+ onKeyDown: function (e) {
+ if ((e.target, this.$control_input[0], this.isLocked)) 9 !== e.keyCode && e.preventDefault()
+ else {
+ switch (e.keyCode) {
+ case 65:
+ if (this.isCmdDown) return void this.selectAll()
+ break
+ case 27:
+ return void (this.isOpen && (e.preventDefault(), e.stopPropagation(), this.close()))
+ case 78:
+ if (!e.ctrlKey || e.altKey) break
+ case 40:
+ if (!this.isOpen && this.hasOptions) this.open()
+ else if (this.$activeOption) {
+ this.ignoreHover = !0
+ var $next = this.getAdjacentOption(this.$activeOption, 1)
+ $next.length && this.setActiveOption($next, !0, !0)
+ }
+ return void e.preventDefault()
+ case 80:
+ if (!e.ctrlKey || e.altKey) break
+ case 38:
+ if (this.$activeOption) {
+ this.ignoreHover = !0
+ var $prev = this.getAdjacentOption(this.$activeOption, -1)
+ $prev.length && this.setActiveOption($prev, !0, !0)
+ }
+ return void e.preventDefault()
+ case 13:
+ return void (
+ this.isOpen &&
+ this.$activeOption &&
+ (this.onOptionSelect({ currentTarget: this.$activeOption }), e.preventDefault())
+ )
+ case 37:
+ return void this.advanceSelection(-1, e)
+ case 39:
+ return void this.advanceSelection(1, e)
+ case 9:
+ return (
+ this.settings.selectOnTab &&
+ this.isOpen &&
+ this.$activeOption &&
+ (this.onOptionSelect({ currentTarget: this.$activeOption }),
+ this.isFull() || e.preventDefault()),
+ void (this.settings.create && this.createItem() && e.preventDefault())
+ )
+ case 8:
+ case 46:
+ return void this.deleteSelection(e)
+ }
+ ;(!this.isFull() && !this.isInputHidden) || (IS_MAC ? e.metaKey : e.ctrlKey) || e.preventDefault()
+ }
+ },
+ onKeyUp: function (e) {
+ if (this.isLocked) return e && e.preventDefault()
+ var value = this.$control_input.val() || ''
+ this.lastValue !== value &&
+ ((this.lastValue = value),
+ this.onSearchChange(value),
+ this.refreshOptions(),
+ this.trigger('type', value))
+ },
+ onSearchChange: function (value) {
+ var self = this,
+ fn = self.settings.load
+ fn &&
+ (self.loadedSearches.hasOwnProperty(value) ||
+ ((self.loadedSearches[value] = !0),
+ self.load(function (callback) {
+ fn.apply(self, [value, callback])
+ })))
+ },
+ onFocus: function (e) {
+ var wasFocused = this.isFocused
+ if (this.isDisabled) return this.blur(), e && e.preventDefault(), !1
+ this.ignoreFocus ||
+ ((this.isFocused = !0),
+ 'focus' === this.settings.preload && this.onSearchChange(''),
+ wasFocused || this.trigger('focus'),
+ this.$activeItems.length ||
+ (this.showInput(), this.setActiveItem(null), this.refreshOptions(!!this.settings.openOnFocus)),
+ this.refreshState())
+ },
+ onBlur: function (e, dest) {
+ var self = this
+ if (self.isFocused && ((self.isFocused = !1), !self.ignoreFocus)) {
+ if (!self.ignoreBlur && document.activeElement === self.$dropdown_content[0])
+ return (self.ignoreBlur = !0), void self.onFocus(e)
+ var deactivate = function () {
+ self.close(),
+ self.setTextboxValue(''),
+ self.setActiveItem(null),
+ self.setActiveOption(null),
+ self.setCaret(self.items.length),
+ self.refreshState(),
+ (dest || document.body).focus(),
+ (self.ignoreFocus = !1),
+ self.trigger('blur')
+ }
+ ;(self.ignoreFocus = !0),
+ self.settings.create && self.settings.createOnBlur
+ ? self.createItem(null, !1, deactivate)
+ : deactivate()
+ }
+ },
+ onOptionHover: function (e) {
+ this.ignoreHover || this.setActiveOption(e.currentTarget, !1)
+ },
+ onOptionSelect: function (e) {
+ var value,
+ $target,
+ self = this
+ e.preventDefault && (e.preventDefault(), e.stopPropagation()),
+ ($target = $(e.currentTarget)).hasClass('create')
+ ? self.createItem(null, function () {
+ self.settings.closeAfterSelect && self.close()
+ })
+ : void 0 !== (value = $target.attr('data-value')) &&
+ ((self.lastQuery = null),
+ self.setTextboxValue(''),
+ self.addItem(value),
+ self.settings.closeAfterSelect
+ ? self.close()
+ : !self.settings.hideSelected &&
+ e.type &&
+ /mouse/.test(e.type) &&
+ self.setActiveOption(self.getOption(value)))
+ },
+ onItemSelect: function (e) {
+ this.isLocked ||
+ ('multi' === this.settings.mode && (e.preventDefault(), this.setActiveItem(e.currentTarget, e)))
+ },
+ load: function (fn) {
+ var self = this,
+ $wrapper = self.$wrapper.addClass(self.settings.loadingClass)
+ self.loading++,
+ fn.apply(self, [
+ function (results) {
+ ;(self.loading = Math.max(self.loading - 1, 0)),
+ results &&
+ results.length &&
+ (self.addOption(results), self.refreshOptions(self.isFocused && !self.isInputHidden)),
+ self.loading || $wrapper.removeClass(self.settings.loadingClass),
+ self.trigger('load', results)
+ }
+ ])
+ },
+ setTextboxValue: function (value) {
+ var $input = this.$control_input
+ $input.val() !== value && ($input.val(value).triggerHandler('update'), (this.lastValue = value))
+ },
+ getValue: function () {
+ return 1 === this.tagType && this.$input.attr('multiple')
+ ? this.items
+ : this.items.join(this.settings.delimiter)
+ },
+ setValue: function (value, silent) {
+ debounce_events(this, silent ? [] : ['change'], function () {
+ this.clear(silent), this.addItems(value, silent)
+ })
+ },
+ setActiveItem: function ($item, e) {
+ var eventName, i, idx, begin, end, item, swap, $last
+ if ('single' !== this.settings.mode) {
+ if (!($item = $($item)).length)
+ return (
+ $(this.$activeItems).removeClass('active'),
+ (this.$activeItems = []),
+ void (this.isFocused && this.showInput())
+ )
+ if (
+ 'mousedown' === (eventName = e && e.type.toLowerCase()) &&
+ this.isShiftDown &&
+ this.$activeItems.length
+ ) {
+ for (
+ $last = this.$control.children('.active:last'),
+ (begin = Array.prototype.indexOf.apply(this.$control[0].childNodes, [$last[0]])) >
+ (end = Array.prototype.indexOf.apply(this.$control[0].childNodes, [$item[0]])) &&
+ ((swap = begin), (begin = end), (end = swap)),
+ i = begin;
+ i <= end;
+ i++
+ )
+ (item = this.$control[0].childNodes[i]),
+ -1 === this.$activeItems.indexOf(item) &&
+ ($(item).addClass('active'), this.$activeItems.push(item))
+ e.preventDefault()
+ } else
+ ('mousedown' === eventName && this.isCtrlDown) || ('keydown' === eventName && this.isShiftDown)
+ ? $item.hasClass('active')
+ ? ((idx = this.$activeItems.indexOf($item[0])),
+ this.$activeItems.splice(idx, 1),
+ $item.removeClass('active'))
+ : this.$activeItems.push($item.addClass('active')[0])
+ : ($(this.$activeItems).removeClass('active'),
+ (this.$activeItems = [$item.addClass('active')[0]]))
+ this.hideInput(), this.isFocused || this.focus()
+ }
+ },
+ setActiveOption: function ($option, scroll, animate) {
+ var height_menu, height_item, y, scroll_top, scroll_bottom
+ this.$activeOption && this.$activeOption.removeClass('active'),
+ (this.$activeOption = null),
+ ($option = $($option)).length &&
+ ((this.$activeOption = $option.addClass('active')),
+ (!scroll && isset(scroll)) ||
+ ((height_menu = this.$dropdown_content.height()),
+ (height_item = this.$activeOption.outerHeight(!0)),
+ (scroll = this.$dropdown_content.scrollTop() || 0),
+ (scroll_top = y =
+ this.$activeOption.offset().top - this.$dropdown_content.offset().top + scroll),
+ (scroll_bottom = y - height_menu + height_item),
+ y + height_item > height_menu + scroll
+ ? this.$dropdown_content
+ .stop()
+ .animate({ scrollTop: scroll_bottom }, animate ? this.settings.scrollDuration : 0)
+ : y < scroll &&
+ this.$dropdown_content
+ .stop()
+ .animate({ scrollTop: scroll_top }, animate ? this.settings.scrollDuration : 0)))
+ },
+ selectAll: function () {
+ 'single' !== this.settings.mode &&
+ ((this.$activeItems = Array.prototype.slice.apply(
+ this.$control.children(':not(input)').addClass('active')
+ )),
+ this.$activeItems.length && (this.hideInput(), this.close()),
+ this.focus())
+ },
+ hideInput: function () {
+ this.setTextboxValue(''),
+ this.$control_input.css({ opacity: 0, position: 'absolute', left: this.rtl ? 1e4 : -1e4 }),
+ (this.isInputHidden = !0)
+ },
+ showInput: function () {
+ this.$control_input.css({ opacity: 1, position: 'relative', left: 0 }), (this.isInputHidden = !1)
+ },
+ focus: function () {
+ var self = this
+ self.isDisabled ||
+ ((self.ignoreFocus = !0),
+ self.$control_input[0].focus(),
+ window.setTimeout(function () {
+ ;(self.ignoreFocus = !1), self.onFocus()
+ }, 0))
+ },
+ blur: function (dest) {
+ this.$control_input[0].blur(), this.onBlur(null, dest)
+ },
+ getScoreFunction: function (query) {
+ return this.sifter.getScoreFunction(query, this.getSearchOptions())
+ },
+ getSearchOptions: function () {
+ var settings = this.settings,
+ sort = settings.sortField
+ return (
+ 'string' == typeof sort && (sort = [{ field: sort }]),
+ { fields: settings.searchField, conjunction: settings.searchConjunction, sort }
+ )
+ },
+ search: function (query) {
+ var i,
+ result,
+ calculateScore,
+ settings = this.settings,
+ options = this.getSearchOptions()
+ if (
+ settings.score &&
+ 'function' != typeof (calculateScore = this.settings.score.apply(this, [query]))
+ )
+ throw new Error('Selectize "score" setting must be a function that returns a function')
+ if (
+ (query !== this.lastQuery
+ ? ((this.lastQuery = query),
+ (result = this.sifter.search(query, $.extend(options, { score: calculateScore }))),
+ (this.currentResults = result))
+ : (result = $.extend(!0, {}, this.currentResults)),
+ settings.hideSelected)
+ )
+ for (i = result.items.length - 1; i >= 0; i--)
+ -1 !== this.items.indexOf(hash_key(result.items[i].id)) && result.items.splice(i, 1)
+ return result
+ },
+ refreshOptions: function (triggerDropdown) {
+ var i,
+ j,
+ k,
+ n,
+ groups,
+ groups_order,
+ option,
+ option_html,
+ optgroup,
+ optgroups,
+ html,
+ html_children,
+ has_create_option,
+ $active,
+ $active_before,
+ $create
+ void 0 === triggerDropdown && (triggerDropdown = !0)
+ var self = this,
+ query = $.trim(self.$control_input.val()),
+ results = self.search(query),
+ $dropdown_content = self.$dropdown_content,
+ active_before = self.$activeOption && hash_key(self.$activeOption.attr('data-value'))
+ for (
+ n = results.items.length,
+ 'number' == typeof self.settings.maxOptions && (n = Math.min(n, self.settings.maxOptions)),
+ groups = {},
+ groups_order = [],
+ i = 0;
+ i < n;
+ i++
+ )
+ for (
+ option = self.options[results.items[i].id],
+ option_html = self.render('option', option),
+ optgroup = option[self.settings.optgroupField] || '',
+ j = 0,
+ k = (optgroups = $.isArray(optgroup) ? optgroup : [optgroup]) && optgroups.length;
+ j < k;
+ j++
+ )
+ (optgroup = optgroups[j]),
+ self.optgroups.hasOwnProperty(optgroup) || (optgroup = ''),
+ groups.hasOwnProperty(optgroup) || ((groups[optgroup] = []), groups_order.push(optgroup)),
+ groups[optgroup].push(option_html)
+ for (
+ this.settings.lockOptgroupOrder &&
+ groups_order.sort(function (a, b) {
+ return (self.optgroups[a].$order || 0) - (self.optgroups[b].$order || 0)
+ }),
+ html = [],
+ i = 0,
+ n = groups_order.length;
+ i < n;
+ i++
+ )
+ (optgroup = groups_order[i]),
+ self.optgroups.hasOwnProperty(optgroup) && groups[optgroup].length
+ ? ((html_children = self.render('optgroup_header', self.optgroups[optgroup]) || ''),
+ (html_children += groups[optgroup].join('')),
+ html.push(
+ self.render('optgroup', $.extend({}, self.optgroups[optgroup], { html: html_children }))
+ ))
+ : html.push(groups[optgroup].join(''))
+ if (
+ ($dropdown_content.html(html.join('')),
+ self.settings.highlight && results.query.length && results.tokens.length)
+ )
+ for (i = 0, n = results.tokens.length; i < n; i++)
+ highlight($dropdown_content, results.tokens[i].regex)
+ if (!self.settings.hideSelected)
+ for (i = 0, n = self.items.length; i < n; i++) self.getOption(self.items[i]).addClass('selected')
+ ;(has_create_option = self.canCreate(query)) &&
+ ($dropdown_content.prepend(self.render('option_create', { input: query })),
+ ($create = $($dropdown_content[0].childNodes[0]))),
+ (self.hasOptions = results.items.length > 0 || has_create_option),
+ self.hasOptions
+ ? (results.items.length > 0
+ ? (($active_before = active_before && self.getOption(active_before)) &&
+ $active_before.length
+ ? ($active = $active_before)
+ : 'single' === self.settings.mode &&
+ self.items.length &&
+ ($active = self.getOption(self.items[0])),
+ ($active && $active.length) ||
+ ($active =
+ $create && !self.settings.addPrecedence
+ ? self.getAdjacentOption($create, 1)
+ : $dropdown_content.find('[data-selectable]:first')))
+ : ($active = $create),
+ self.setActiveOption($active),
+ triggerDropdown && !self.isOpen && self.open())
+ : (self.setActiveOption(null), triggerDropdown && self.isOpen && self.close())
+ },
+ addOption: function (data) {
+ var i, n, value
+ if ($.isArray(data)) for (i = 0, n = data.length; i < n; i++) this.addOption(data[i])
+ else
+ (value = this.registerOption(data)) &&
+ ((this.userOptions[value] = !0),
+ (this.lastQuery = null),
+ this.trigger('option_add', value, data))
+ },
+ registerOption: function (data) {
+ var key = hash_key(data[this.settings.valueField])
+ return (
+ !(!key || this.options.hasOwnProperty(key)) &&
+ ((data.$order = data.$order || ++this.order), (this.options[key] = data), key)
+ )
+ },
+ registerOptionGroup: function (data) {
+ var key = hash_key(data[this.settings.optgroupValueField])
+ return !!key && ((data.$order = data.$order || ++this.order), (this.optgroups[key] = data), key)
+ },
+ addOptionGroup: function (id, data) {
+ ;(data[this.settings.optgroupValueField] = id),
+ (id = this.registerOptionGroup(data)) && this.trigger('optgroup_add', id, data)
+ },
+ removeOptionGroup: function (id) {
+ this.optgroups.hasOwnProperty(id) &&
+ (delete this.optgroups[id], (this.renderCache = {}), this.trigger('optgroup_remove', id))
+ },
+ clearOptionGroups: function () {
+ ;(this.optgroups = {}), (this.renderCache = {}), this.trigger('optgroup_clear')
+ },
+ updateOption: function (value, data) {
+ var $item, $item_new, value_new, index_item, cache_items, cache_options, order_old
+ if (
+ ((value = hash_key(value)),
+ (value_new = hash_key(data[this.settings.valueField])),
+ null !== value && this.options.hasOwnProperty(value))
+ ) {
+ if ('string' != typeof value_new) throw new Error('Value must be set in option data')
+ ;(order_old = this.options[value].$order),
+ value_new !== value &&
+ (delete this.options[value],
+ -1 !== (index_item = this.items.indexOf(value)) &&
+ this.items.splice(index_item, 1, value_new)),
+ (data.$order = data.$order || order_old),
+ (this.options[value_new] = data),
+ (cache_items = this.renderCache.item),
+ (cache_options = this.renderCache.option),
+ cache_items && (delete cache_items[value], delete cache_items[value_new]),
+ cache_options && (delete cache_options[value], delete cache_options[value_new]),
+ -1 !== this.items.indexOf(value_new) &&
+ (($item = this.getItem(value)),
+ ($item_new = $(this.render('item', data))),
+ $item.hasClass('active') && $item_new.addClass('active'),
+ $item.replaceWith($item_new)),
+ (this.lastQuery = null),
+ this.isOpen && this.refreshOptions(!1)
+ }
+ },
+ removeOption: function (value, silent) {
+ value = hash_key(value)
+ var cache_items = this.renderCache.item,
+ cache_options = this.renderCache.option
+ cache_items && delete cache_items[value],
+ cache_options && delete cache_options[value],
+ delete this.userOptions[value],
+ delete this.options[value],
+ (this.lastQuery = null),
+ this.trigger('option_remove', value),
+ this.removeItem(value, silent)
+ },
+ clearOptions: function () {
+ ;(this.loadedSearches = {}),
+ (this.userOptions = {}),
+ (this.renderCache = {}),
+ (this.options = this.sifter.items = {}),
+ (this.lastQuery = null),
+ this.trigger('option_clear'),
+ this.clear()
+ },
+ getOption: function (value) {
+ return this.getElementWithValue(value, this.$dropdown_content.find('[data-selectable]'))
+ },
+ getAdjacentOption: function ($option, direction) {
+ var $options = this.$dropdown.find('[data-selectable]'),
+ index = $options.index($option) + direction
+ return index >= 0 && index < $options.length ? $options.eq(index) : $()
+ },
+ getElementWithValue: function (value, $els) {
+ if (null != (value = hash_key(value)))
+ for (var i = 0, n = $els.length; i < n; i++)
+ if ($els[i].getAttribute('data-value') === value) return $($els[i])
+ return $()
+ },
+ getItem: function (value) {
+ return this.getElementWithValue(value, this.$control.children())
+ },
+ addItems: function (values, silent) {
+ for (var items = $.isArray(values) ? values : [values], i = 0, n = items.length; i < n; i++)
+ (this.isPending = i < n - 1), this.addItem(items[i], silent)
+ },
+ addItem: function (value, silent) {
+ debounce_events(this, silent ? [] : ['change'], function () {
+ var $item,
+ $option,
+ $options,
+ value_next,
+ wasFull,
+ inputMode = this.settings.mode
+ ;(value = hash_key(value)),
+ -1 === this.items.indexOf(value)
+ ? this.options.hasOwnProperty(value) &&
+ ('single' === inputMode && this.clear(silent),
+ ('multi' === inputMode && this.isFull()) ||
+ (($item = $(this.render('item', this.options[value]))),
+ (wasFull = this.isFull()),
+ this.items.splice(this.caretPos, 0, value),
+ this.insertAtCaret($item),
+ (!this.isPending || (!wasFull && this.isFull())) && this.refreshState(),
+ this.isSetup &&
+ (($options = this.$dropdown_content.find('[data-selectable]')),
+ this.isPending ||
+ (($option = this.getOption(value)),
+ (value_next = this.getAdjacentOption($option, 1).attr('data-value')),
+ this.refreshOptions(this.isFocused && 'single' !== inputMode),
+ value_next && this.setActiveOption(this.getOption(value_next))),
+ !$options.length || this.isFull() ? this.close() : this.positionDropdown(),
+ this.updatePlaceholder(),
+ this.trigger('item_add', value, $item),
+ this.updateOriginalInput({ silent }))))
+ : 'single' === inputMode && this.close()
+ })
+ },
+ removeItem: function (value, silent) {
+ var $item, i, idx
+ ;($item = 'object' == typeof value ? value : this.getItem(value)),
+ (value = hash_key($item.attr('data-value'))),
+ -1 !== (i = this.items.indexOf(value)) &&
+ ($item.remove(),
+ $item.hasClass('active') &&
+ ((idx = this.$activeItems.indexOf($item[0])), this.$activeItems.splice(idx, 1)),
+ this.items.splice(i, 1),
+ (this.lastQuery = null),
+ !this.settings.persist &&
+ this.userOptions.hasOwnProperty(value) &&
+ this.removeOption(value, silent),
+ i < this.caretPos && this.setCaret(this.caretPos - 1),
+ this.refreshState(),
+ this.updatePlaceholder(),
+ this.updateOriginalInput({ silent }),
+ this.positionDropdown(),
+ this.trigger('item_remove', value, $item))
+ },
+ createItem: function (input, triggerDropdown) {
+ var self = this,
+ caret = self.caretPos
+ input = input || $.trim(self.$control_input.val() || '')
+ var callback = arguments[arguments.length - 1]
+ if (
+ ('function' != typeof callback && (callback = function () {}),
+ 'boolean' != typeof triggerDropdown && (triggerDropdown = !0),
+ !self.canCreate(input))
+ )
+ return callback(), !1
+ self.lock()
+ var fn,
+ called,
+ setup =
+ 'function' == typeof self.settings.create
+ ? this.settings.create
+ : function (input) {
+ var data = {}
+ return (
+ (data[self.settings.labelField] = input), (data[self.settings.valueField] = input), data
+ )
+ },
+ create = ((fn = function (data) {
+ if ((self.unlock(), !data || 'object' != typeof data)) return callback()
+ var value = hash_key(data[self.settings.valueField])
+ if ('string' != typeof value) return callback()
+ self.setTextboxValue(''),
+ self.addOption(data),
+ self.setCaret(caret),
+ self.addItem(value),
+ self.refreshOptions(triggerDropdown && 'single' !== self.settings.mode),
+ callback(data)
+ }),
+ (called = !1),
+ function () {
+ called || ((called = !0), fn.apply(this, arguments))
+ }),
+ output = setup.apply(this, [input, create])
+ return void 0 !== output && create(output), !0
+ },
+ refreshItems: function () {
+ ;(this.lastQuery = null),
+ this.isSetup && this.addItem(this.items),
+ this.refreshState(),
+ this.updateOriginalInput()
+ },
+ refreshState: function () {
+ this.isRequired &&
+ (this.items.length && (this.isInvalid = !1), this.$control_input.prop('required', void 0)),
+ this.refreshClasses()
+ },
+ refreshClasses: function () {
+ var isFull = this.isFull(),
+ isLocked = this.isLocked
+ this.$wrapper.toggleClass('rtl', this.rtl),
+ this.$control
+ .toggleClass('focus', this.isFocused)
+ .toggleClass('disabled', this.isDisabled)
+ .toggleClass('required', this.isRequired)
+ .toggleClass('invalid', this.isInvalid)
+ .toggleClass('locked', isLocked)
+ .toggleClass('full', isFull)
+ .toggleClass('not-full', !isFull)
+ .toggleClass('input-active', this.isFocused && !this.isInputHidden)
+ .toggleClass('dropdown-active', this.isOpen)
+ .toggleClass('has-options', !$.isEmptyObject(this.options))
+ .toggleClass('has-items', this.items.length > 0),
+ this.$control_input.data('grow', !isFull && !isLocked)
+ },
+ isFull: function () {
+ return null !== this.settings.maxItems && this.items.length >= this.settings.maxItems
+ },
+ updateOriginalInput: function (opts) {
+ var i, n, options, label
+ if (((opts = opts || {}), 1 === this.tagType)) {
+ for (options = [], i = 0, n = this.items.length; i < n; i++)
+ (label = this.options[this.items[i]][this.settings.labelField] || ''),
+ options.push(
+ '' +
+ escape_html(label) +
+ ' '
+ )
+ options.length ||
+ this.$input.attr('multiple') ||
+ options.push(' '),
+ this.$input.html(options.join(''))
+ } else this.$input.val(this.getValue()), this.$input.attr('value', this.$input.val())
+ this.isSetup && (opts.silent || this.trigger('change', this.$input.val()))
+ },
+ updatePlaceholder: function () {
+ if (this.settings.placeholder) {
+ var $input = this.$control_input
+ this.items.length
+ ? $input.removeAttr('placeholder')
+ : $input.attr('placeholder', this.settings.placeholder),
+ $input.triggerHandler('update', { force: !0 })
+ }
+ },
+ open: function () {
+ this.isLocked ||
+ this.isOpen ||
+ ('multi' === this.settings.mode && this.isFull()) ||
+ (this.focus(),
+ (this.isOpen = !0),
+ this.refreshState(),
+ this.$dropdown.css({ visibility: 'hidden', display: 'block' }),
+ this.positionDropdown(),
+ this.positionDropdown(),
+ this.$dropdown.css({ visibility: 'visible' }),
+ this.trigger('dropdown_open', this.$dropdown))
+ },
+ close: function () {
+ var trigger = this.isOpen
+ 'single' === this.settings.mode && this.items.length && this.hideInput(),
+ (this.isOpen = !1),
+ this.$dropdown.hide(),
+ this.setActiveOption(null),
+ this.refreshState(),
+ trigger && this.trigger('dropdown_close', this.$dropdown)
+ },
+ positionDropdown: function () {
+ var $control = this.$control,
+ offset = 'body' === this.settings.dropdownParent ? $control.offset() : $control.position()
+ ;(offset.top += $control.outerHeight(!0)),
+ this.$dropdown.css({ width: $control.outerWidth(), top: offset.top, left: offset.left })
+ },
+ clear: function (silent) {
+ this.items.length &&
+ (this.$control.children(':not(input)').remove(),
+ (this.items = []),
+ (this.lastQuery = null),
+ this.setCaret(0),
+ this.setActiveItem(null),
+ this.updatePlaceholder(),
+ this.updateOriginalInput({ silent }),
+ this.refreshState(),
+ this.showInput(),
+ this.trigger('clear'))
+ },
+ insertAtCaret: function ($el) {
+ var caret = Math.min(this.caretPos, this.items.length)
+ 0 === caret ? this.$control.prepend($el) : $(this.$control[0].childNodes[caret]).before($el),
+ this.setCaret(caret + 1)
+ },
+ deleteSelection: function (e) {
+ var i, n, direction, selection, values, caret, option_select, $option_select, $tail
+ if (
+ ((direction = e && 8 === e.keyCode ? -1 : 1),
+ (selection = getSelection(this.$control_input[0])),
+ this.$activeOption &&
+ !this.settings.hideSelected &&
+ (option_select = this.getAdjacentOption(this.$activeOption, -1).attr('data-value')),
+ (values = []),
+ this.$activeItems.length)
+ ) {
+ for (
+ $tail = this.$control.children('.active:' + (direction > 0 ? 'last' : 'first')),
+ caret = this.$control.children(':not(input)').index($tail),
+ direction > 0 && caret++,
+ i = 0,
+ n = this.$activeItems.length;
+ i < n;
+ i++
+ )
+ values.push($(this.$activeItems[i]).attr('data-value'))
+ e && (e.preventDefault(), e.stopPropagation())
+ } else
+ (this.isFocused || 'single' === this.settings.mode) &&
+ this.items.length &&
+ (direction < 0 && 0 === selection.start && 0 === selection.length
+ ? values.push(this.items[this.caretPos - 1])
+ : direction > 0 &&
+ selection.start === this.$control_input.val().length &&
+ values.push(this.items[this.caretPos]))
+ if (
+ !values.length ||
+ ('function' == typeof this.settings.onDelete &&
+ !1 === this.settings.onDelete.apply(this, [values]))
+ )
+ return !1
+ for (void 0 !== caret && this.setCaret(caret); values.length; ) this.removeItem(values.pop())
+ return (
+ this.showInput(),
+ this.positionDropdown(),
+ this.refreshOptions(!0),
+ option_select &&
+ ($option_select = this.getOption(option_select)).length &&
+ this.setActiveOption($option_select),
+ !0
+ )
+ },
+ advanceSelection: function (direction, e) {
+ var tail, selection, idx, valueLength, $tail
+ 0 !== direction &&
+ (this.rtl && (direction *= -1),
+ (tail = direction > 0 ? 'last' : 'first'),
+ (selection = getSelection(this.$control_input[0])),
+ this.isFocused && !this.isInputHidden
+ ? ((valueLength = this.$control_input.val().length),
+ (direction < 0
+ ? 0 === selection.start && 0 === selection.length
+ : selection.start === valueLength) &&
+ !valueLength &&
+ this.advanceCaret(direction, e))
+ : ($tail = this.$control.children('.active:' + tail)).length &&
+ ((idx = this.$control.children(':not(input)').index($tail)),
+ this.setActiveItem(null),
+ this.setCaret(direction > 0 ? idx + 1 : idx)))
+ },
+ advanceCaret: function (direction, e) {
+ var fn, $adj
+ 0 !== direction &&
+ ((fn = direction > 0 ? 'next' : 'prev'),
+ this.isShiftDown
+ ? ($adj = this.$control_input[fn]()).length &&
+ (this.hideInput(), this.setActiveItem($adj), e && e.preventDefault())
+ : this.setCaret(this.caretPos + direction))
+ },
+ setCaret: function (i) {
+ var j, n, $children, $child
+ if (
+ ((i =
+ 'single' === this.settings.mode
+ ? this.items.length
+ : Math.max(0, Math.min(this.items.length, i))),
+ !this.isPending)
+ )
+ for (j = 0, n = ($children = this.$control.children(':not(input)')).length; j < n; j++)
+ ($child = $($children[j]).detach()),
+ j < i ? this.$control_input.before($child) : this.$control.append($child)
+ this.caretPos = i
+ },
+ lock: function () {
+ this.close(), (this.isLocked = !0), this.refreshState()
+ },
+ unlock: function () {
+ ;(this.isLocked = !1), this.refreshState()
+ },
+ disable: function () {
+ this.$input.prop('disabled', !0),
+ this.$control_input.prop('disabled', !0).prop('tabindex', -1),
+ (this.isDisabled = !0),
+ this.lock()
+ },
+ enable: function () {
+ this.$input.prop('disabled', !1),
+ this.$control_input.prop('disabled', !1).prop('tabindex', this.tabIndex),
+ (this.isDisabled = !1),
+ this.unlock()
+ },
+ destroy: function () {
+ var eventNS = this.eventNS,
+ revertSettings = this.revertSettings
+ this.trigger('destroy'),
+ this.off(),
+ this.$wrapper.remove(),
+ this.$dropdown.remove(),
+ this.$input
+ .html('')
+ .append(revertSettings.$children)
+ .removeAttr('tabindex')
+ .removeClass('selectized')
+ .attr({ tabindex: revertSettings.tabindex })
+ .show(),
+ this.$control_input.removeData('grow'),
+ this.$input.removeData('selectize'),
+ $(window).off(eventNS),
+ $(document).off(eventNS),
+ $(document.body).off(eventNS),
+ delete this.$input[0].selectize
+ },
+ render: function (templateName, data) {
+ var value,
+ id,
+ html = '',
+ cache = !1,
+ regex_tag = /^[\t \r\n]*<([a-z][a-z0-9\-_]*(?:\:[a-z][a-z0-9\-_]*)?)/i
+ return (
+ ('option' !== templateName && 'item' !== templateName) ||
+ (cache = !!(value = hash_key(data[this.settings.valueField]))),
+ cache &&
+ (isset(this.renderCache[templateName]) || (this.renderCache[templateName] = {}),
+ this.renderCache[templateName].hasOwnProperty(value))
+ ? this.renderCache[templateName][value]
+ : ((html = this.settings.render[templateName].apply(this, [data, escape_html])),
+ ('option' !== templateName && 'option_create' !== templateName) ||
+ (html = html.replace(regex_tag, '<$1 data-selectable')),
+ 'optgroup' === templateName &&
+ ((id = data[this.settings.optgroupValueField] || ''),
+ (html = html.replace(
+ regex_tag,
+ '<$1 data-group="' + escape_replace(escape_html(id)) + '"'
+ ))),
+ ('option' !== templateName && 'item' !== templateName) ||
+ (html = html.replace(
+ regex_tag,
+ '<$1 data-value="' + escape_replace(escape_html(value || '')) + '"'
+ )),
+ cache && (this.renderCache[templateName][value] = html),
+ html)
+ )
+ },
+ clearCache: function (templateName) {
+ void 0 === templateName ? (this.renderCache = {}) : delete this.renderCache[templateName]
+ },
+ canCreate: function (input) {
+ if (!this.settings.create) return !1
+ var filter = this.settings.createFilter
+ return (
+ input.length &&
+ ('function' != typeof filter || filter.apply(this, [input])) &&
+ ('string' != typeof filter || new RegExp(filter).test(input)) &&
+ (!(filter instanceof RegExp) || filter.test(input))
+ )
+ }
+ }),
+ (Selectize.count = 0),
+ (Selectize.defaults = {
+ options: [],
+ optgroups: [],
+ plugins: [],
+ delimiter: ',',
+ splitOn: null,
+ persist: !0,
+ diacritics: !0,
+ create: !1,
+ createOnBlur: !1,
+ createFilter: null,
+ highlight: !0,
+ openOnFocus: !0,
+ maxOptions: 1e3,
+ maxItems: null,
+ hideSelected: null,
+ addPrecedence: !1,
+ selectOnTab: !1,
+ preload: !1,
+ allowEmptyOption: !1,
+ closeAfterSelect: !1,
+ scrollDuration: 60,
+ loadThrottle: 300,
+ loadingClass: 'loading',
+ dataAttr: 'data-data',
+ optgroupField: 'optgroup',
+ valueField: 'value',
+ labelField: 'text',
+ optgroupLabelField: 'label',
+ optgroupValueField: 'value',
+ lockOptgroupOrder: !1,
+ sortField: '$order',
+ searchField: ['text'],
+ searchConjunction: 'and',
+ mode: null,
+ wrapperClass: 'selectize-control',
+ inputClass: 'selectize-input',
+ dropdownClass: 'selectize-dropdown',
+ dropdownContentClass: 'selectize-dropdown-content',
+ dropdownParent: null,
+ copyClassesToDropdown: !0,
+ render: {}
+ }),
+ ($.fn.selectize = function (settings_user) {
+ var defaults = $.fn.selectize.defaults,
+ settings = $.extend({}, defaults, settings_user),
+ attr_data = settings.dataAttr,
+ field_label = settings.labelField,
+ field_value = settings.valueField,
+ field_optgroup = settings.optgroupField,
+ field_optgroup_label = settings.optgroupLabelField,
+ field_optgroup_value = settings.optgroupValueField
+ return this.each(function () {
+ if (!this.selectize) {
+ var $input = $(this),
+ tag_name = this.tagName.toLowerCase(),
+ placeholder = $input.attr('placeholder') || $input.attr('data-placeholder')
+ placeholder ||
+ settings.allowEmptyOption ||
+ (placeholder = $input.children('option[value=""]').text())
+ var settings_element = { placeholder, options: [], optgroups: [], items: [] }
+ 'select' === tag_name
+ ? (function ($input, settings_element) {
+ var i,
+ n,
+ tagName,
+ $children,
+ options = settings_element.options,
+ optionsMap = {},
+ readData = function ($el) {
+ var data = attr_data && $el.attr(attr_data)
+ return 'string' == typeof data && data.length ? JSON.parse(data) : null
+ },
+ addOption = function ($option, group) {
+ $option = $($option)
+ var value = hash_key($option.attr('value'))
+ if (value || settings.allowEmptyOption)
+ if (optionsMap.hasOwnProperty(value)) {
+ if (group) {
+ var arr = optionsMap[value][field_optgroup]
+ arr
+ ? $.isArray(arr)
+ ? arr.push(group)
+ : (optionsMap[value][field_optgroup] = [arr, group])
+ : (optionsMap[value][field_optgroup] = group)
+ }
+ } else {
+ var option = readData($option) || {}
+ ;(option[field_label] = option[field_label] || $option.text()),
+ (option[field_value] = option[field_value] || value),
+ (option[field_optgroup] = option[field_optgroup] || group),
+ (optionsMap[value] = option),
+ options.push(option),
+ $option.is(':selected') && settings_element.items.push(value)
+ }
+ },
+ addGroup = function ($optgroup) {
+ var i, n, id, optgroup, $options
+ for (
+ (id = ($optgroup = $($optgroup)).attr('label')) &&
+ (((optgroup = readData($optgroup) || {})[field_optgroup_label] = id),
+ (optgroup[field_optgroup_value] = id),
+ settings_element.optgroups.push(optgroup)),
+ i = 0,
+ n = ($options = $('option', $optgroup)).length;
+ i < n;
+ i++
+ )
+ addOption($options[i], id)
+ }
+ for (
+ settings_element.maxItems = $input.attr('multiple') ? null : 1,
+ i = 0,
+ n = ($children = $input.children()).length;
+ i < n;
+ i++
+ )
+ 'optgroup' === (tagName = $children[i].tagName.toLowerCase())
+ ? addGroup($children[i])
+ : 'option' === tagName && addOption($children[i])
+ })($input, settings_element)
+ : (function ($input, settings_element) {
+ var i,
+ n,
+ values,
+ option,
+ data_raw = $input.attr(attr_data)
+ if (data_raw)
+ for (
+ settings_element.options = JSON.parse(data_raw),
+ i = 0,
+ n = settings_element.options.length;
+ i < n;
+ i++
+ )
+ settings_element.items.push(settings_element.options[i][field_value])
+ else {
+ var value = $.trim($input.val() || '')
+ if (!settings.allowEmptyOption && !value.length) return
+ for (i = 0, n = (values = value.split(settings.delimiter)).length; i < n; i++)
+ ((option = {})[field_label] = values[i]),
+ (option[field_value] = values[i]),
+ settings_element.options.push(option)
+ settings_element.items = values
+ }
+ })($input, settings_element),
+ new Selectize($input, $.extend(!0, {}, defaults, settings_element, settings_user))
+ }
+ })
+ }),
+ ($.fn.selectize.defaults = Selectize.defaults),
+ ($.fn.selectize.support = { validity: SUPPORTS_VALIDITY_API }),
+ Selectize.define('drag_drop', function (options) {
+ if (!$.fn.sortable) throw new Error('The "drag_drop" plugin requires jQuery UI "sortable".')
+ if ('multi' === this.settings.mode) {
+ var original,
+ self = this
+ ;(self.lock = ((original = self.lock),
+ function () {
+ var sortable = self.$control.data('sortable')
+ return sortable && sortable.disable(), original.apply(self, arguments)
+ })),
+ (self.unlock = (function () {
+ var original = self.unlock
+ return function () {
+ var sortable = self.$control.data('sortable')
+ return sortable && sortable.enable(), original.apply(self, arguments)
+ }
+ })()),
+ (self.setup = (function () {
+ var original = self.setup
+ return function () {
+ original.apply(this, arguments)
+ var $control = self.$control.sortable({
+ items: '[data-value]',
+ forcePlaceholderSize: !0,
+ disabled: self.isLocked,
+ start: function (e, ui) {
+ ui.placeholder.css('width', ui.helper.css('width')), $control.css({ overflow: 'visible' })
+ },
+ stop: function () {
+ $control.css({ overflow: 'hidden' })
+ var active = self.$activeItems ? self.$activeItems.slice() : null,
+ values = []
+ $control.children('[data-value]').each(function () {
+ values.push($(this).attr('data-value'))
+ }),
+ self.setValue(values),
+ self.setActiveItem(active)
+ }
+ })
+ }
+ })())
+ }
+ }),
+ Selectize.define('dropdown_header', function (options) {
+ var original,
+ self = this
+ ;(options = $.extend(
+ {
+ title: 'Untitled',
+ headerClass: 'selectize-dropdown-header',
+ titleRowClass: 'selectize-dropdown-header-title',
+ labelClass: 'selectize-dropdown-header-label',
+ closeClass: 'selectize-dropdown-header-close',
+ html: function (data) {
+ return (
+ ''
+ )
+ }
+ },
+ options
+ )),
+ (self.setup = ((original = self.setup),
+ function () {
+ original.apply(self, arguments),
+ (self.$dropdown_header = $(options.html(options))),
+ self.$dropdown.prepend(self.$dropdown_header)
+ }))
+ }),
+ Selectize.define('optgroup_columns', function (options) {
+ var original,
+ self = this
+ ;(options = $.extend({ equalizeWidth: !0, equalizeHeight: !0 }, options)),
+ (this.getAdjacentOption = function ($option, direction) {
+ var $options = $option.closest('[data-group]').find('[data-selectable]'),
+ index = $options.index($option) + direction
+ return index >= 0 && index < $options.length ? $options.eq(index) : $()
+ }),
+ (this.onKeyDown = ((original = self.onKeyDown),
+ function (e) {
+ var index, $option, $options, $optgroup
+ return !this.isOpen || (37 !== e.keyCode && 39 !== e.keyCode)
+ ? original.apply(this, arguments)
+ : ((self.ignoreHover = !0),
+ (index = ($optgroup = this.$activeOption.closest('[data-group]'))
+ .find('[data-selectable]')
+ .index(this.$activeOption)),
+ void (
+ ($option = ($options = ($optgroup =
+ 37 === e.keyCode ? $optgroup.prev('[data-group]') : $optgroup.next('[data-group]')).find(
+ '[data-selectable]'
+ )).eq(Math.min($options.length - 1, index))).length && this.setActiveOption($option)
+ ))
+ }))
+ var getScrollbarWidth = function () {
+ var div,
+ width = getScrollbarWidth.width,
+ doc = document
+ return (
+ void 0 === width &&
+ (((div = doc.createElement('div')).innerHTML =
+ ''),
+ (div = div.firstChild),
+ doc.body.appendChild(div),
+ (width = getScrollbarWidth.width = div.offsetWidth - div.clientWidth),
+ doc.body.removeChild(div)),
+ width
+ )
+ },
+ equalizeSizes = function () {
+ var i, n, height_max, width, width_last, width_parent, $optgroups
+ if (
+ (n = ($optgroups = $('[data-group]', self.$dropdown_content)).length) &&
+ self.$dropdown_content.width()
+ ) {
+ if (options.equalizeHeight) {
+ for (height_max = 0, i = 0; i < n; i++)
+ height_max = Math.max(height_max, $optgroups.eq(i).height())
+ $optgroups.css({ height: height_max })
+ }
+ options.equalizeWidth &&
+ ((width_parent = self.$dropdown_content.innerWidth() - getScrollbarWidth()),
+ (width = Math.round(width_parent / n)),
+ $optgroups.css({ width }),
+ n > 1 &&
+ ((width_last = width_parent - width * (n - 1)),
+ $optgroups.eq(n - 1).css({ width: width_last })))
+ }
+ }
+ ;(options.equalizeHeight || options.equalizeWidth) &&
+ (hook.after(this, 'positionDropdown', equalizeSizes),
+ hook.after(this, 'refreshOptions', equalizeSizes))
+ }),
+ Selectize.define('remove_button', function (options) {
+ if ('single' !== this.settings.mode) {
+ options = $.extend({ label: '×', title: 'Remove', className: 'remove', append: !0 }, options)
+ var original,
+ self = this,
+ html =
+ ' '
+ this.setup = ((original = self.setup),
+ function () {
+ if (options.append) {
+ var render_item = self.settings.render.item
+ self.settings.render.item = function (data) {
+ return (
+ (html_container = render_item.apply(this, arguments)),
+ (html_element = html),
+ (pos = html_container.search(/(<\/[^>]+>\s*)$/)),
+ html_container.substring(0, pos) + html_element + html_container.substring(pos)
+ )
+ var html_container, html_element, pos
+ }
+ }
+ original.apply(this, arguments),
+ this.$control.on('click', '.' + options.className, function (e) {
+ if ((e.preventDefault(), !self.isLocked)) {
+ var $item = $(e.currentTarget).parent()
+ self.setActiveItem($item), self.deleteSelection() && self.setCaret(self.items.length)
+ }
+ })
+ })
+ }
+ }),
+ Selectize.define('restore_on_backspace', function (options) {
+ var original,
+ self = this
+ ;(options.text =
+ options.text ||
+ function (option) {
+ return option[this.settings.labelField]
+ }),
+ (this.onKeyDown = ((original = self.onKeyDown),
+ function (e) {
+ var index, option
+ return 8 === e.keyCode &&
+ '' === this.$control_input.val() &&
+ !this.$activeItems.length &&
+ (index = this.caretPos - 1) >= 0 &&
+ index < this.items.length
+ ? ((option = this.options[this.items[index]]),
+ this.deleteSelection(e) &&
+ (this.setTextboxValue(options.text.apply(this, [option])), this.refreshOptions(!0)),
+ void e.preventDefault())
+ : original.apply(this, arguments)
+ }))
+ }),
+ Selectize
+ )
+ })
+ ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)
+ : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ }.call(this, __webpack_require__(0)))
+ },
+ function (module, exports, __webpack_require__) {
+ ;(function (jQuery) {
+ ;(function () {
+ var a,
+ AbstractChosen,
+ Chosen,
+ SelectParser,
+ c = {}.hasOwnProperty,
+ d = function (a, b) {
+ function d () {
+ this.constructor = a
+ }
+ for (var e in b) c.call(b, e) && (a[e] = b[e])
+ return (d.prototype = b.prototype), (a.prototype = new d()), (a.__super__ = b.prototype), a
+ }
+ ;((SelectParser = (function () {
+ function SelectParser () {
+ ;(this.options_index = 0), (this.parsed = [])
+ }
+ return (
+ (SelectParser.prototype.add_node = function (a) {
+ return 'OPTGROUP' === a.nodeName.toUpperCase() ? this.add_group(a) : this.add_option(a)
+ }),
+ (SelectParser.prototype.add_group = function (a) {
+ var b, c, d, e, f, g
+ for (
+ b = this.parsed.length,
+ this.parsed.push({
+ array_index: b,
+ group: !0,
+ label: this.escapeExpression(a.label),
+ children: 0,
+ disabled: a.disabled,
+ classes: a.className
+ }),
+ g = [],
+ d = 0,
+ e = (f = a.childNodes).length;
+ e > d;
+ d++
+ )
+ (c = f[d]), g.push(this.add_option(c, b, a.disabled))
+ return g
+ }),
+ (SelectParser.prototype.add_option = function (a, b, c) {
+ return 'OPTION' === a.nodeName.toUpperCase()
+ ? ('' !== a.text
+ ? (null != b && (this.parsed[b].children += 1),
+ this.parsed.push({
+ array_index: this.parsed.length,
+ options_index: this.options_index,
+ value: a.value,
+ text: a.text,
+ html: a.innerHTML,
+ selected: a.selected,
+ disabled: !0 === c ? c : a.disabled,
+ group_array_index: b,
+ classes: a.className,
+ style: a.style.cssText
+ }))
+ : this.parsed.push({
+ array_index: this.parsed.length,
+ options_index: this.options_index,
+ empty: !0
+ }),
+ (this.options_index += 1))
+ : void 0
+ }),
+ (SelectParser.prototype.escapeExpression = function (a) {
+ var b, c
+ return null == a || !1 === a
+ ? ''
+ : /[\&\<\>\"\'\`]/.test(a)
+ ? ((b = { '<': '<', '>': '>', '"': '"', "'": ''', '`': '`' }),
+ (c = /&(?!\w+;)|[\<\>\"\'\`]/g),
+ a.replace(c, function (a) {
+ return b[a] || '&'
+ }))
+ : a
+ }),
+ SelectParser
+ )
+ })()).select_to_array = function (a) {
+ var b, c, d, e, f
+ for (c = new SelectParser(), d = 0, e = (f = a.childNodes).length; e > d; d++) (b = f[d]), c.add_node(b)
+ return c.parsed
+ }),
+ (AbstractChosen = (function () {
+ function AbstractChosen (a, b) {
+ ;(this.form_field = a),
+ (this.options = null != b ? b : {}),
+ AbstractChosen.browser_is_supported() &&
+ ((this.is_multiple = this.form_field.multiple),
+ this.set_default_text(),
+ this.set_default_values(),
+ this.setup(),
+ this.set_up_html(),
+ this.register_observers(),
+ this.on_ready())
+ }
+ return (
+ (AbstractChosen.prototype.set_default_values = function () {
+ var a = this
+ return (
+ (this.click_test_action = function (b) {
+ return a.test_active_click(b)
+ }),
+ (this.activate_action = function (b) {
+ return a.activate_field(b)
+ }),
+ (this.active_field = !1),
+ (this.mouse_on_container = !1),
+ (this.results_showing = !1),
+ (this.result_highlighted = null),
+ (this.allow_single_deselect =
+ null != this.options.allow_single_deselect &&
+ null != this.form_field.options[0] &&
+ '' === this.form_field.options[0].text &&
+ this.options.allow_single_deselect),
+ (this.disable_search_threshold = this.options.disable_search_threshold || 0),
+ (this.disable_search = this.options.disable_search || !1),
+ (this.enable_split_word_search =
+ null == this.options.enable_split_word_search || this.options.enable_split_word_search),
+ (this.group_search = null == this.options.group_search || this.options.group_search),
+ (this.search_contains = this.options.search_contains || !1),
+ (this.single_backstroke_delete =
+ null == this.options.single_backstroke_delete || this.options.single_backstroke_delete),
+ (this.max_selected_options = this.options.max_selected_options || 1 / 0),
+ (this.inherit_select_classes = this.options.inherit_select_classes || !1),
+ (this.display_selected_options =
+ null == this.options.display_selected_options || this.options.display_selected_options),
+ (this.display_disabled_options =
+ null == this.options.display_disabled_options || this.options.display_disabled_options)
+ )
+ }),
+ (AbstractChosen.prototype.set_default_text = function () {
+ return (
+ (this.default_text = this.form_field.getAttribute('data-placeholder')
+ ? this.form_field.getAttribute('data-placeholder')
+ : this.is_multiple
+ ? this.options.placeholder_text_multiple ||
+ this.options.placeholder_text ||
+ AbstractChosen.default_multiple_text
+ : this.options.placeholder_text_single ||
+ this.options.placeholder_text ||
+ AbstractChosen.default_single_text),
+ (this.results_none_found =
+ this.form_field.getAttribute('data-no_results_text') ||
+ this.options.no_results_text ||
+ AbstractChosen.default_no_result_text)
+ )
+ }),
+ (AbstractChosen.prototype.mouse_enter = function () {
+ return (this.mouse_on_container = !0)
+ }),
+ (AbstractChosen.prototype.mouse_leave = function () {
+ return (this.mouse_on_container = !1)
+ }),
+ (AbstractChosen.prototype.input_focus = function () {
+ var a = this
+ if (this.is_multiple) {
+ if (!this.active_field)
+ return setTimeout(function () {
+ return a.container_mousedown()
+ }, 50)
+ } else if (!this.active_field) return this.activate_field()
+ }),
+ (AbstractChosen.prototype.input_blur = function () {
+ var a = this
+ return this.mouse_on_container
+ ? void 0
+ : ((this.active_field = !1),
+ setTimeout(function () {
+ return a.blur_test()
+ }, 100))
+ }),
+ (AbstractChosen.prototype.results_option_build = function (a) {
+ var b, c, d, e, f
+ for (b = '', d = 0, e = (f = this.results_data).length; e > d; d++)
+ (b += (c = f[d]).group ? this.result_add_group(c) : this.result_add_option(c)),
+ (null != a ? a.first : void 0) &&
+ (c.selected && this.is_multiple
+ ? this.choice_build(c)
+ : c.selected && !this.is_multiple && this.single_set_selected_text(c.text))
+ return b
+ }),
+ (AbstractChosen.prototype.result_add_option = function (a) {
+ var b, c
+ return a.search_match && this.include_option_in_results(a)
+ ? ((b = []),
+ a.disabled || (a.selected && this.is_multiple) || b.push('active-result'),
+ !a.disabled || (a.selected && this.is_multiple) || b.push('disabled-result'),
+ a.selected && b.push('result-selected'),
+ null != a.group_array_index && b.push('group-option'),
+ '' !== a.classes && b.push(a.classes),
+ ((c = document.createElement('li')).className = b.join(' ')),
+ (c.style.cssText = a.style),
+ c.setAttribute('data-option-array-index', a.array_index),
+ (c.innerHTML = a.search_text),
+ this.outerHTML(c))
+ : ''
+ }),
+ (AbstractChosen.prototype.result_add_group = function (a) {
+ var b, c
+ return (a.search_match || a.group_match) && a.active_options > 0
+ ? ((b = []).push('group-result'),
+ a.classes && b.push(a.classes),
+ ((c = document.createElement('li')).className = b.join(' ')),
+ (c.innerHTML = a.search_text),
+ this.outerHTML(c))
+ : ''
+ }),
+ (AbstractChosen.prototype.results_update_field = function () {
+ return (
+ this.set_default_text(),
+ this.is_multiple || this.results_reset_cleanup(),
+ this.result_clear_highlight(),
+ this.results_build(),
+ this.results_showing ? this.winnow_results() : void 0
+ )
+ }),
+ (AbstractChosen.prototype.reset_single_select_options = function () {
+ var a, b, c, d, e
+ for (e = [], b = 0, c = (d = this.results_data).length; c > b; b++)
+ (a = d[b]).selected ? e.push((a.selected = !1)) : e.push(void 0)
+ return e
+ }),
+ (AbstractChosen.prototype.results_toggle = function () {
+ return this.results_showing ? this.results_hide() : this.results_show()
+ }),
+ (AbstractChosen.prototype.results_search = function () {
+ return this.results_showing ? this.winnow_results() : this.results_show()
+ }),
+ (AbstractChosen.prototype.winnow_results = function () {
+ var a, b, c, d, e, f, g, h, i, j, k, l
+ for (
+ this.no_results_clear(),
+ d = 0,
+ a = (f = this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g, '\\$&'),
+ i = new RegExp(a, 'i'),
+ c = this.get_search_regex(a),
+ j = 0,
+ k = (l = this.results_data).length;
+ k > j;
+ j++
+ )
+ ((b = l[j]).search_match = !1),
+ (e = null),
+ this.include_option_in_results(b) &&
+ (b.group && ((b.group_match = !1), (b.active_options = 0)),
+ null != b.group_array_index &&
+ this.results_data[b.group_array_index] &&
+ (0 === (e = this.results_data[b.group_array_index]).active_options &&
+ e.search_match &&
+ (d += 1),
+ (e.active_options += 1)),
+ (!b.group || this.group_search) &&
+ ((b.search_text = b.group ? b.label : b.text),
+ (b.search_match = this.search_string_match(b.search_text, c)),
+ b.search_match && !b.group && (d += 1),
+ b.search_match
+ ? (f.length &&
+ ((g = b.search_text.search(i)),
+ (h =
+ b.search_text.substr(0, g + f.length) + '' + b.search_text.substr(g + f.length)),
+ (b.search_text = h.substr(0, g) + '' + h.substr(g))),
+ null != e && (e.group_match = !0))
+ : null != b.group_array_index &&
+ this.results_data[b.group_array_index].search_match &&
+ (b.search_match = !0)))
+ return (
+ this.result_clear_highlight(),
+ 1 > d && f.length
+ ? (this.update_results_content(''), this.no_results(f))
+ : (this.update_results_content(this.results_option_build()), this.winnow_results_set_highlight())
+ )
+ }),
+ (AbstractChosen.prototype.get_search_regex = function (a) {
+ var b
+ return (b = this.search_contains ? '' : '^'), new RegExp(b + a, 'i')
+ }),
+ (AbstractChosen.prototype.search_string_match = function (a, b) {
+ var c, d, e, f
+ if (b.test(a)) return !0
+ if (
+ this.enable_split_word_search &&
+ (a.indexOf(' ') >= 0 || 0 === a.indexOf('[')) &&
+ (d = a.replace(/\[|\]/g, '').split(' ')).length
+ )
+ for (e = 0, f = d.length; f > e; e++) if (((c = d[e]), b.test(c))) return !0
+ }),
+ (AbstractChosen.prototype.choices_count = function () {
+ var b, c, d
+ if (null != this.selected_option_count) return this.selected_option_count
+ for (this.selected_option_count = 0, b = 0, c = (d = this.form_field.options).length; c > b; b++)
+ d[b].selected && (this.selected_option_count += 1)
+ return this.selected_option_count
+ }),
+ (AbstractChosen.prototype.choices_click = function (a) {
+ return a.preventDefault(), this.results_showing || this.is_disabled ? void 0 : this.results_show()
+ }),
+ (AbstractChosen.prototype.keyup_checker = function (a) {
+ var b, c
+ switch (((b = null != (c = a.which) ? c : a.keyCode), this.search_field_scale(), b)) {
+ case 8:
+ if (this.is_multiple && this.backstroke_length < 1 && this.choices_count() > 0)
+ return this.keydown_backstroke()
+ if (!this.pending_backstroke) return this.result_clear_highlight(), this.results_search()
+ break
+ case 13:
+ if ((a.preventDefault(), this.results_showing)) return this.result_select(a)
+ break
+ case 27:
+ return this.results_showing && this.results_hide(), !0
+ case 9:
+ case 38:
+ case 40:
+ case 16:
+ case 91:
+ case 17:
+ break
+ default:
+ return this.results_search()
+ }
+ }),
+ (AbstractChosen.prototype.clipboard_event_checker = function () {
+ var a = this
+ return setTimeout(function () {
+ return a.results_search()
+ }, 50)
+ }),
+ (AbstractChosen.prototype.container_width = function () {
+ return null != this.options.width ? this.options.width : this.form_field.offsetWidth + 'px'
+ }),
+ (AbstractChosen.prototype.include_option_in_results = function (a) {
+ return (
+ !(this.is_multiple && !this.display_selected_options && a.selected) &&
+ (!(!this.display_disabled_options && a.disabled) && !a.empty)
+ )
+ }),
+ (AbstractChosen.prototype.search_results_touchstart = function (a) {
+ return (this.touch_started = !0), this.search_results_mouseover(a)
+ }),
+ (AbstractChosen.prototype.search_results_touchmove = function (a) {
+ return (this.touch_started = !1), this.search_results_mouseout(a)
+ }),
+ (AbstractChosen.prototype.search_results_touchend = function (a) {
+ return this.touch_started ? this.search_results_mouseup(a) : void 0
+ }),
+ (AbstractChosen.prototype.outerHTML = function (a) {
+ var b
+ return a.outerHTML ? a.outerHTML : ((b = document.createElement('div')).appendChild(a), b.innerHTML)
+ }),
+ (AbstractChosen.browser_is_supported = function () {
+ return 'Microsoft Internet Explorer' === window.navigator.appName
+ ? document.documentMode >= 8
+ : !/iP(od|hone)/i.test(window.navigator.userAgent) &&
+ (!/Android/i.test(window.navigator.userAgent) || !/Mobile/i.test(window.navigator.userAgent))
+ }),
+ (AbstractChosen.default_multiple_text = 'Select Some Options'),
+ (AbstractChosen.default_single_text = 'Select an Option'),
+ (AbstractChosen.default_no_result_text = 'No results match'),
+ AbstractChosen
+ )
+ })()),
+ (a = jQuery).fn.extend({
+ chosen: function (b) {
+ return AbstractChosen.browser_is_supported()
+ ? this.each(function () {
+ var c, d
+ ;(d = (c = a(this)).data('chosen')),
+ 'destroy' === b && d instanceof Chosen
+ ? d.destroy()
+ : d instanceof Chosen || c.data('chosen', new Chosen(this, b))
+ })
+ : this
+ }
+ }),
+ (Chosen = (function (c) {
+ function Chosen () {
+ return Chosen.__super__.constructor.apply(this, arguments)
+ }
+ return (
+ d(Chosen, AbstractChosen),
+ (Chosen.prototype.setup = function () {
+ return (
+ (this.form_field_jq = a(this.form_field)),
+ (this.current_selectedIndex = this.form_field.selectedIndex),
+ (this.is_rtl = this.form_field_jq.hasClass('chosen-rtl'))
+ )
+ }),
+ (Chosen.prototype.set_up_html = function () {
+ var b, c
+ return (
+ (b = ['chosen-container']).push('chosen-container-' + (this.is_multiple ? 'multi' : 'single')),
+ this.inherit_select_classes && this.form_field.className && b.push(this.form_field.className),
+ this.is_rtl && b.push('chosen-rtl'),
+ (c = {
+ class: b.join(' '),
+ style: 'width: ' + this.container_width() + ';',
+ title: this.form_field.title
+ }),
+ this.form_field.id.length && (c.id = this.form_field.id.replace(/[^\w]/g, '_') + '_chosen'),
+ (this.container = a('
', c)),
+ this.is_multiple
+ ? this.container.html(
+ ''
+ )
+ : this.container.html(
+ '' +
+ this.default_text +
+ '
'
+ ),
+ this.form_field_jq.hide().after(this.container),
+ (this.dropdown = this.container.find('div.chosen-drop').first()),
+ (this.search_field = this.container.find('input').first()),
+ (this.search_results = this.container.find('ul.chosen-results').first()),
+ this.search_field_scale(),
+ (this.search_no_results = this.container.find('li.no-results').first()),
+ this.is_multiple
+ ? ((this.search_choices = this.container.find('ul.chosen-choices').first()),
+ (this.search_container = this.container.find('li.search-field').first()))
+ : ((this.search_container = this.container.find('div.chosen-search').first()),
+ (this.selected_item = this.container.find('.chosen-single').first())),
+ this.results_build(),
+ this.set_tab_index(),
+ this.set_label_behavior()
+ )
+ }),
+ (Chosen.prototype.on_ready = function () {
+ return this.form_field_jq.trigger('chosen:ready', { chosen: this })
+ }),
+ (Chosen.prototype.register_observers = function () {
+ var a = this
+ return (
+ this.container.bind('touchstart.chosen', function (b) {
+ a.container_mousedown(b)
+ }),
+ this.container.bind('touchend.chosen', function (b) {
+ a.container_mouseup(b)
+ }),
+ this.container.bind('mousedown.chosen', function (b) {
+ a.container_mousedown(b)
+ }),
+ this.container.bind('mouseup.chosen', function (b) {
+ a.container_mouseup(b)
+ }),
+ this.container.bind('mouseenter.chosen', function (b) {
+ a.mouse_enter(b)
+ }),
+ this.container.bind('mouseleave.chosen', function (b) {
+ a.mouse_leave(b)
+ }),
+ this.search_results.bind('mouseup.chosen', function (b) {
+ a.search_results_mouseup(b)
+ }),
+ this.search_results.bind('mouseover.chosen', function (b) {
+ a.search_results_mouseover(b)
+ }),
+ this.search_results.bind('mouseout.chosen', function (b) {
+ a.search_results_mouseout(b)
+ }),
+ this.search_results.bind('mousewheel.chosen DOMMouseScroll.chosen', function (b) {
+ a.search_results_mousewheel(b)
+ }),
+ this.search_results.bind('touchstart.chosen', function (b) {
+ a.search_results_touchstart(b)
+ }),
+ this.search_results.bind('touchmove.chosen', function (b) {
+ a.search_results_touchmove(b)
+ }),
+ this.search_results.bind('touchend.chosen', function (b) {
+ a.search_results_touchend(b)
+ }),
+ this.form_field_jq.bind('chosen:updated.chosen', function (b) {
+ a.results_update_field(b)
+ }),
+ this.form_field_jq.bind('chosen:activate.chosen', function (b) {
+ a.activate_field(b)
+ }),
+ this.form_field_jq.bind('chosen:open.chosen', function (b) {
+ a.container_mousedown(b)
+ }),
+ this.form_field_jq.bind('chosen:close.chosen', function (b) {
+ a.input_blur(b)
+ }),
+ this.search_field.bind('blur.chosen', function (b) {
+ a.input_blur(b)
+ }),
+ this.search_field.bind('keyup.chosen', function (b) {
+ a.keyup_checker(b)
+ }),
+ this.search_field.bind('keydown.chosen', function (b) {
+ a.keydown_checker(b)
+ }),
+ this.search_field.bind('focus.chosen', function (b) {
+ a.input_focus(b)
+ }),
+ this.search_field.bind('cut.chosen', function (b) {
+ a.clipboard_event_checker(b)
+ }),
+ this.search_field.bind('paste.chosen', function (b) {
+ a.clipboard_event_checker(b)
+ }),
+ this.is_multiple
+ ? this.search_choices.bind('click.chosen', function (b) {
+ a.choices_click(b)
+ })
+ : this.container.bind('click.chosen', function (a) {
+ a.preventDefault()
+ })
+ )
+ }),
+ (Chosen.prototype.destroy = function () {
+ return (
+ a(this.container[0].ownerDocument).unbind('click.chosen', this.click_test_action),
+ this.search_field[0].tabIndex && (this.form_field_jq[0].tabIndex = this.search_field[0].tabIndex),
+ this.container.remove(),
+ this.form_field_jq.removeData('chosen'),
+ this.form_field_jq.show()
+ )
+ }),
+ (Chosen.prototype.search_field_disabled = function () {
+ return (
+ (this.is_disabled = this.form_field_jq[0].disabled),
+ this.is_disabled
+ ? (this.container.addClass('chosen-disabled'),
+ (this.search_field[0].disabled = !0),
+ this.is_multiple || this.selected_item.unbind('focus.chosen', this.activate_action),
+ this.close_field())
+ : (this.container.removeClass('chosen-disabled'),
+ (this.search_field[0].disabled = !1),
+ this.is_multiple ? void 0 : this.selected_item.bind('focus.chosen', this.activate_action))
+ )
+ }),
+ (Chosen.prototype.container_mousedown = function (b) {
+ return this.is_disabled ||
+ (b && 'mousedown' === b.type && !this.results_showing && b.preventDefault(),
+ null != b && a(b.target).hasClass('search-choice-close'))
+ ? void 0
+ : (this.active_field
+ ? this.is_multiple ||
+ !b ||
+ (a(b.target)[0] !== this.selected_item[0] && !a(b.target).parents('a.chosen-single').length) ||
+ (b.preventDefault(), this.results_toggle())
+ : (this.is_multiple && this.search_field.val(''),
+ a(this.container[0].ownerDocument).bind('click.chosen', this.click_test_action),
+ this.results_show()),
+ this.activate_field())
+ }),
+ (Chosen.prototype.container_mouseup = function (a) {
+ return 'ABBR' !== a.target.nodeName || this.is_disabled ? void 0 : this.results_reset(a)
+ }),
+ (Chosen.prototype.search_results_mousewheel = function (a) {
+ var b
+ return (
+ a.originalEvent &&
+ (b = a.originalEvent.deltaY || -a.originalEvent.wheelDelta || a.originalEvent.detail),
+ null != b
+ ? (a.preventDefault(),
+ 'DOMMouseScroll' === a.type && (b *= 40),
+ this.search_results.scrollTop(b + this.search_results.scrollTop()))
+ : void 0
+ )
+ }),
+ (Chosen.prototype.blur_test = function () {
+ return !this.active_field && this.container.hasClass('chosen-container-active')
+ ? this.close_field()
+ : void 0
+ }),
+ (Chosen.prototype.close_field = function () {
+ return (
+ a(this.container[0].ownerDocument).unbind('click.chosen', this.click_test_action),
+ (this.active_field = !1),
+ this.results_hide(),
+ this.container.removeClass('chosen-container-active'),
+ this.clear_backstroke(),
+ this.show_search_field_default(),
+ this.search_field_scale()
+ )
+ }),
+ (Chosen.prototype.activate_field = function () {
+ return (
+ this.container.addClass('chosen-container-active'),
+ (this.active_field = !0),
+ this.search_field.val(this.search_field.val()),
+ this.search_field.focus()
+ )
+ }),
+ (Chosen.prototype.test_active_click = function (b) {
+ var c
+ return (c = a(b.target).closest('.chosen-container')).length && this.container[0] === c[0]
+ ? (this.active_field = !0)
+ : this.close_field()
+ }),
+ (Chosen.prototype.results_build = function () {
+ return (
+ (this.parsing = !0),
+ (this.selected_option_count = null),
+ (this.results_data = SelectParser.select_to_array(this.form_field)),
+ this.is_multiple
+ ? this.search_choices.find('li.search-choice').remove()
+ : this.is_multiple ||
+ (this.single_set_selected_text(),
+ this.disable_search || this.form_field.options.length <= this.disable_search_threshold
+ ? ((this.search_field[0].readOnly = !0),
+ this.container.addClass('chosen-container-single-nosearch'))
+ : ((this.search_field[0].readOnly = !1),
+ this.container.removeClass('chosen-container-single-nosearch'))),
+ this.update_results_content(this.results_option_build({ first: !0 })),
+ this.search_field_disabled(),
+ this.show_search_field_default(),
+ this.search_field_scale(),
+ (this.parsing = !1)
+ )
+ }),
+ (Chosen.prototype.result_do_highlight = function (a) {
+ var b, c, d, e, f
+ if (a.length) {
+ if (
+ (this.result_clear_highlight(),
+ (this.result_highlight = a),
+ this.result_highlight.addClass('highlighted'),
+ (e =
+ (d = parseInt(this.search_results.css('maxHeight'), 10)) + (f = this.search_results.scrollTop())),
+ (b =
+ (c = this.result_highlight.position().top + this.search_results.scrollTop()) +
+ this.result_highlight.outerHeight()) >= e)
+ )
+ return this.search_results.scrollTop(b - d > 0 ? b - d : 0)
+ if (f > c) return this.search_results.scrollTop(c)
+ }
+ }),
+ (Chosen.prototype.result_clear_highlight = function () {
+ return (
+ this.result_highlight && this.result_highlight.removeClass('highlighted'),
+ (this.result_highlight = null)
+ )
+ }),
+ (Chosen.prototype.results_show = function () {
+ return this.is_multiple && this.max_selected_options <= this.choices_count()
+ ? (this.form_field_jq.trigger('chosen:maxselected', { chosen: this }), !1)
+ : (this.container.addClass('chosen-with-drop'),
+ (this.results_showing = !0),
+ this.search_field.focus(),
+ this.search_field.val(this.search_field.val()),
+ this.winnow_results(),
+ this.form_field_jq.trigger('chosen:showing_dropdown', { chosen: this }))
+ }),
+ (Chosen.prototype.update_results_content = function (a) {
+ return this.search_results.html(a)
+ }),
+ (Chosen.prototype.results_hide = function () {
+ return (
+ this.results_showing &&
+ (this.result_clear_highlight(),
+ this.container.removeClass('chosen-with-drop'),
+ this.form_field_jq.trigger('chosen:hiding_dropdown', { chosen: this })),
+ (this.results_showing = !1)
+ )
+ }),
+ (Chosen.prototype.set_tab_index = function () {
+ var a
+ return this.form_field.tabIndex
+ ? ((a = this.form_field.tabIndex),
+ (this.form_field.tabIndex = -1),
+ (this.search_field[0].tabIndex = a))
+ : void 0
+ }),
+ (Chosen.prototype.set_label_behavior = function () {
+ var b = this
+ return (
+ (this.form_field_label = this.form_field_jq.parents('label')),
+ !this.form_field_label.length &&
+ this.form_field.id.length &&
+ (this.form_field_label = a("label[for='" + this.form_field.id + "']")),
+ this.form_field_label.length > 0
+ ? this.form_field_label.bind('click.chosen', function (a) {
+ return b.is_multiple ? b.container_mousedown(a) : b.activate_field()
+ })
+ : void 0
+ )
+ }),
+ (Chosen.prototype.show_search_field_default = function () {
+ return this.is_multiple && this.choices_count() < 1 && !this.active_field
+ ? (this.search_field.val(this.default_text), this.search_field.addClass('default'))
+ : (this.search_field.val(''), this.search_field.removeClass('default'))
+ }),
+ (Chosen.prototype.search_results_mouseup = function (b) {
+ var c
+ return (c = a(b.target).hasClass('active-result')
+ ? a(b.target)
+ : a(b.target)
+ .parents('.active-result')
+ .first()).length
+ ? ((this.result_highlight = c), this.result_select(b), this.search_field.focus())
+ : void 0
+ }),
+ (Chosen.prototype.search_results_mouseover = function (b) {
+ var c
+ return (c = a(b.target).hasClass('active-result')
+ ? a(b.target)
+ : a(b.target)
+ .parents('.active-result')
+ .first())
+ ? this.result_do_highlight(c)
+ : void 0
+ }),
+ (Chosen.prototype.search_results_mouseout = function (b) {
+ return a(b.target).hasClass('active-result') ? this.result_clear_highlight() : void 0
+ }),
+ (Chosen.prototype.choice_build = function (b) {
+ var c,
+ d,
+ e = this
+ return (
+ (c = a(' ', { class: 'search-choice' }).html('' + b.html + ' ')),
+ b.disabled
+ ? c.addClass('search-choice-disabled')
+ : ((d = a(' ', {
+ class: 'search-choice-close',
+ 'data-option-array-index': b.array_index
+ })).bind('click.chosen', function (a) {
+ return e.choice_destroy_link_click(a)
+ }),
+ c.append(d)),
+ this.search_container.before(c)
+ )
+ }),
+ (Chosen.prototype.choice_destroy_link_click = function (b) {
+ return (
+ b.preventDefault(), b.stopPropagation(), this.is_disabled ? void 0 : this.choice_destroy(a(b.target))
+ )
+ }),
+ (Chosen.prototype.choice_destroy = function (a) {
+ return this.result_deselect(a[0].getAttribute('data-option-array-index'))
+ ? (this.show_search_field_default(),
+ this.is_multiple &&
+ this.choices_count() > 0 &&
+ this.search_field.val().length < 1 &&
+ this.results_hide(),
+ a
+ .parents('li')
+ .first()
+ .remove(),
+ this.search_field_scale())
+ : void 0
+ }),
+ (Chosen.prototype.results_reset = function () {
+ return (
+ this.reset_single_select_options(),
+ (this.form_field.options[0].selected = !0),
+ this.single_set_selected_text(),
+ this.show_search_field_default(),
+ this.results_reset_cleanup(),
+ this.form_field_jq.trigger('change'),
+ this.active_field ? this.results_hide() : void 0
+ )
+ }),
+ (Chosen.prototype.results_reset_cleanup = function () {
+ return (
+ (this.current_selectedIndex = this.form_field.selectedIndex), this.selected_item.find('abbr').remove()
+ )
+ }),
+ (Chosen.prototype.result_select = function (a) {
+ var b, c
+ return this.result_highlight
+ ? ((b = this.result_highlight),
+ this.result_clear_highlight(),
+ this.is_multiple && this.max_selected_options <= this.choices_count()
+ ? (this.form_field_jq.trigger('chosen:maxselected', { chosen: this }), !1)
+ : (this.is_multiple ? b.removeClass('active-result') : this.reset_single_select_options(),
+ ((c = this.results_data[b[0].getAttribute('data-option-array-index')]).selected = !0),
+ (this.form_field.options[c.options_index].selected = !0),
+ (this.selected_option_count = null),
+ this.is_multiple ? this.choice_build(c) : this.single_set_selected_text(c.text),
+ ((a.metaKey || a.ctrlKey) && this.is_multiple) || this.results_hide(),
+ this.search_field.val(''),
+ (this.is_multiple || this.form_field.selectedIndex !== this.current_selectedIndex) &&
+ this.form_field_jq.trigger('change', {
+ selected: this.form_field.options[c.options_index].value
+ }),
+ (this.current_selectedIndex = this.form_field.selectedIndex),
+ this.search_field_scale()))
+ : void 0
+ }),
+ (Chosen.prototype.single_set_selected_text = function (a) {
+ return (
+ null == a && (a = this.default_text),
+ a === this.default_text
+ ? this.selected_item.addClass('chosen-default')
+ : (this.single_deselect_control_build(), this.selected_item.removeClass('chosen-default')),
+ this.selected_item.find('span').text(a)
+ )
+ }),
+ (Chosen.prototype.result_deselect = function (a) {
+ var b
+ return (
+ (b = this.results_data[a]),
+ !this.form_field.options[b.options_index].disabled &&
+ ((b.selected = !1),
+ (this.form_field.options[b.options_index].selected = !1),
+ (this.selected_option_count = null),
+ this.result_clear_highlight(),
+ this.results_showing && this.winnow_results(),
+ this.form_field_jq.trigger('change', {
+ deselected: this.form_field.options[b.options_index].value
+ }),
+ this.search_field_scale(),
+ !0)
+ )
+ }),
+ (Chosen.prototype.single_deselect_control_build = function () {
+ return this.allow_single_deselect
+ ? (this.selected_item.find('abbr').length ||
+ this.selected_item
+ .find('span')
+ .first()
+ .after(' '),
+ this.selected_item.addClass('chosen-single-with-deselect'))
+ : void 0
+ }),
+ (Chosen.prototype.get_search_text = function () {
+ return this.search_field.val() === this.default_text
+ ? ''
+ : a('
')
+ .text(a.trim(this.search_field.val()))
+ .html()
+ }),
+ (Chosen.prototype.winnow_results_set_highlight = function () {
+ var a, b
+ return null !=
+ (a = (b = this.is_multiple ? [] : this.search_results.find('.result-selected.active-result')).length
+ ? b.first()
+ : this.search_results.find('.active-result').first())
+ ? this.result_do_highlight(a)
+ : void 0
+ }),
+ (Chosen.prototype.no_results = function (b) {
+ var c
+ return (
+ (c = a('' + this.results_none_found + ' " " '))
+ .find('span')
+ .first()
+ .html(b),
+ this.search_results.append(c),
+ this.form_field_jq.trigger('chosen:no_results', { chosen: this })
+ )
+ }),
+ (Chosen.prototype.no_results_clear = function () {
+ return this.search_results.find('.no-results').remove()
+ }),
+ (Chosen.prototype.keydown_arrow = function () {
+ var a
+ return this.results_showing && this.result_highlight
+ ? (a = this.result_highlight.nextAll('li.active-result').first())
+ ? this.result_do_highlight(a)
+ : void 0
+ : this.results_show()
+ }),
+ (Chosen.prototype.keyup_arrow = function () {
+ var a
+ return this.results_showing || this.is_multiple
+ ? this.result_highlight
+ ? (a = this.result_highlight.prevAll('li.active-result')).length
+ ? this.result_do_highlight(a.first())
+ : (this.choices_count() > 0 && this.results_hide(), this.result_clear_highlight())
+ : void 0
+ : this.results_show()
+ }),
+ (Chosen.prototype.keydown_backstroke = function () {
+ var a
+ return this.pending_backstroke
+ ? (this.choice_destroy(this.pending_backstroke.find('a').first()), this.clear_backstroke())
+ : (a = this.search_container.siblings('li.search-choice').last()).length &&
+ !a.hasClass('search-choice-disabled')
+ ? ((this.pending_backstroke = a),
+ this.single_backstroke_delete
+ ? this.keydown_backstroke()
+ : this.pending_backstroke.addClass('search-choice-focus'))
+ : void 0
+ }),
+ (Chosen.prototype.clear_backstroke = function () {
+ return (
+ this.pending_backstroke && this.pending_backstroke.removeClass('search-choice-focus'),
+ (this.pending_backstroke = null)
+ )
+ }),
+ (Chosen.prototype.keydown_checker = function (a) {
+ var b, c
+ switch (
+ ((b = null != (c = a.which) ? c : a.keyCode),
+ this.search_field_scale(),
+ 8 !== b && this.pending_backstroke && this.clear_backstroke(),
+ b)
+ ) {
+ case 8:
+ this.backstroke_length = this.search_field.val().length
+ break
+ case 9:
+ this.results_showing && !this.is_multiple && this.result_select(a), (this.mouse_on_container = !1)
+ break
+ case 13:
+ this.results_showing && a.preventDefault()
+ break
+ case 32:
+ this.disable_search && a.preventDefault()
+ break
+ case 38:
+ a.preventDefault(), this.keyup_arrow()
+ break
+ case 40:
+ a.preventDefault(), this.keydown_arrow()
+ }
+ }),
+ (Chosen.prototype.search_field_scale = function () {
+ var b, c, e, f, g, h, i, j
+ if (this.is_multiple) {
+ for (
+ 0,
+ h = 0,
+ f = 'position:absolute; left: -1000px; top: -1000px; display:none;',
+ i = 0,
+ j = (g = [
+ 'font-size',
+ 'font-style',
+ 'font-weight',
+ 'font-family',
+ 'line-height',
+ 'text-transform',
+ 'letter-spacing'
+ ]).length;
+ j > i;
+ i++
+ )
+ f += (e = g[i]) + ':' + this.search_field.css(e) + ';'
+ return (
+ (b = a('
', { style: f })).text(this.search_field.val()),
+ a('body').append(b),
+ (h = b.width() + 25),
+ b.remove(),
+ h > (c = this.container.outerWidth()) - 10 && (h = c - 10),
+ this.search_field.css({ width: h + 'px' })
+ )
+ }
+ }),
+ Chosen
+ )
+ })())
+ }.call(this))
+ }.call(this, __webpack_require__(0)))
+ },
+ function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__ //! moment-timezone.js
+ //! version : 0.5.17
+ //! Copyright (c) JS Foundation and other contributors
+ //! license : MIT
+ //! github.com/moment/moment-timezone
+ //! moment-timezone.js
+ //! version : 0.5.17
+ //! Copyright (c) JS Foundation and other contributors
+ //! license : MIT
+ //! github.com/moment/moment-timezone
+ !(function (root, factory) {
+ 'use strict'
+ ;(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(5)]),
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ =
+ 'function' ==
+ typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = function (moment) {
+ var cachedGuess,
+ zones = {},
+ links = {},
+ names = {},
+ guesses = {},
+ momentVersion = moment.version.split('.'),
+ major = +momentVersion[0],
+ minor = +momentVersion[1]
+ ;(major < 2 || (2 === major && minor < 6)) &&
+ logError(
+ 'Moment Timezone requires Moment.js >= 2.6.0. You are using Moment.js ' +
+ moment.version +
+ '. See momentjs.com'
+ )
+ function charCodeToInt (charCode) {
+ return charCode > 96 ? charCode - 87 : charCode > 64 ? charCode - 29 : charCode - 48
+ }
+ function unpackBase60 (string) {
+ var num,
+ i = 0,
+ parts = string.split('.'),
+ whole = parts[0],
+ fractional = parts[1] || '',
+ multiplier = 1,
+ out = 0,
+ sign = 1
+ for (45 === string.charCodeAt(0) && ((i = 1), (sign = -1)); i < whole.length; i++)
+ (num = charCodeToInt(whole.charCodeAt(i))), (out = 60 * out + num)
+ for (i = 0; i < fractional.length; i++)
+ (multiplier /= 60), (num = charCodeToInt(fractional.charCodeAt(i))), (out += num * multiplier)
+ return out * sign
+ }
+ function arrayToInt (array) {
+ for (var i = 0; i < array.length; i++) array[i] = unpackBase60(array[i])
+ }
+ function mapIndices (source, indices) {
+ var i,
+ out = []
+ for (i = 0; i < indices.length; i++) out[i] = source[indices[i]]
+ return out
+ }
+ function unpack (string) {
+ var data = string.split('|'),
+ offsets = data[2].split(' '),
+ indices = data[3].split(''),
+ untils = data[4].split(' ')
+ return (
+ arrayToInt(offsets),
+ arrayToInt(indices),
+ arrayToInt(untils),
+ (function (array, length) {
+ for (var i = 0; i < length; i++) array[i] = Math.round((array[i - 1] || 0) + 6e4 * array[i])
+ array[length - 1] = 1 / 0
+ })(untils, indices.length),
+ {
+ name: data[0],
+ abbrs: mapIndices(data[1].split(' '), indices),
+ offsets: mapIndices(offsets, indices),
+ untils,
+ population: 0 | data[5]
+ }
+ )
+ }
+ function Zone (packedString) {
+ packedString && this._set(unpack(packedString))
+ }
+ function OffsetAt (at) {
+ var timeString = at.toTimeString(),
+ abbr = timeString.match(/\([a-z ]+\)/i)
+ 'GMT' ===
+ (abbr =
+ abbr && abbr[0]
+ ? (abbr = abbr[0].match(/[A-Z]/g))
+ ? abbr.join('')
+ : void 0
+ : (abbr = timeString.match(/[A-Z]{3,5}/g))
+ ? abbr[0]
+ : void 0) && (abbr = void 0),
+ (this.at = +at),
+ (this.abbr = abbr),
+ (this.offset = at.getTimezoneOffset())
+ }
+ function ZoneScore (zone) {
+ ;(this.zone = zone), (this.offsetScore = 0), (this.abbrScore = 0)
+ }
+ function findChange (low, high) {
+ for (var mid, diff; (diff = 6e4 * (((high.at - low.at) / 12e4) | 0)); )
+ (mid = new OffsetAt(new Date(low.at + diff))).offset === low.offset ? (low = mid) : (high = mid)
+ return low
+ }
+ function sortZoneScores (a, b) {
+ return a.offsetScore !== b.offsetScore
+ ? a.offsetScore - b.offsetScore
+ : a.abbrScore !== b.abbrScore
+ ? a.abbrScore - b.abbrScore
+ : b.zone.population - a.zone.population
+ }
+ function addToGuesses (name, offsets) {
+ var i, offset
+ for (arrayToInt(offsets), i = 0; i < offsets.length; i++)
+ (offset = offsets[i]), (guesses[offset] = guesses[offset] || {}), (guesses[offset][name] = !0)
+ }
+ function guessesForUserOffsets (offsets) {
+ var i,
+ j,
+ guessesOffset,
+ offsetsLength = offsets.length,
+ filteredGuesses = {},
+ out = []
+ for (i = 0; i < offsetsLength; i++)
+ for (j in (guessesOffset = guesses[offsets[i].offset] || {}))
+ guessesOffset.hasOwnProperty(j) && (filteredGuesses[j] = !0)
+ for (i in filteredGuesses) filteredGuesses.hasOwnProperty(i) && out.push(names[i])
+ return out
+ }
+ function rebuildGuess () {
+ try {
+ var intlName = Intl.DateTimeFormat().resolvedOptions().timeZone
+ if (intlName && intlName.length > 3) {
+ var name = names[normalizeName(intlName)]
+ if (name) return name
+ logError(
+ 'Moment Timezone found ' + intlName + ' from the Intl api, but did not have that data loaded.'
+ )
+ }
+ } catch (e) {}
+ var zoneScore,
+ i,
+ j,
+ offsets = (function () {
+ var change,
+ next,
+ i,
+ startYear = new Date().getFullYear() - 2,
+ last = new OffsetAt(new Date(startYear, 0, 1)),
+ offsets = [last]
+ for (i = 1; i < 48; i++)
+ (next = new OffsetAt(new Date(startYear, i, 1))).offset !== last.offset &&
+ ((change = findChange(last, next)),
+ offsets.push(change),
+ offsets.push(new OffsetAt(new Date(change.at + 6e4)))),
+ (last = next)
+ for (i = 0; i < 4; i++)
+ offsets.push(new OffsetAt(new Date(startYear + i, 0, 1))),
+ offsets.push(new OffsetAt(new Date(startYear + i, 6, 1)))
+ return offsets
+ })(),
+ offsetsLength = offsets.length,
+ guesses = guessesForUserOffsets(offsets),
+ zoneScores = []
+ for (i = 0; i < guesses.length; i++) {
+ for (zoneScore = new ZoneScore(getZone(guesses[i]), offsetsLength), j = 0; j < offsetsLength; j++)
+ zoneScore.scoreOffsetAt(offsets[j])
+ zoneScores.push(zoneScore)
+ }
+ return zoneScores.sort(sortZoneScores), zoneScores.length > 0 ? zoneScores[0].zone.name : void 0
+ }
+ function normalizeName (name) {
+ return (name || '').toLowerCase().replace(/\//g, '_')
+ }
+ function addZone (packed) {
+ var i, name, split, normalized
+ for ('string' == typeof packed && (packed = [packed]), i = 0; i < packed.length; i++)
+ (split = packed[i].split('|')),
+ (name = split[0]),
+ (normalized = normalizeName(name)),
+ (zones[normalized] = packed[i]),
+ (names[normalized] = name),
+ addToGuesses(normalized, split[2].split(' '))
+ }
+ function getZone (name, caller) {
+ name = normalizeName(name)
+ var link,
+ zone = zones[name]
+ return zone instanceof Zone
+ ? zone
+ : 'string' == typeof zone
+ ? ((zone = new Zone(zone)), (zones[name] = zone), zone)
+ : links[name] && caller !== getZone && (link = getZone(links[name], getZone))
+ ? ((zone = zones[name] = new Zone())._set(link), (zone.name = names[name]), zone)
+ : null
+ }
+ function addLink (aliases) {
+ var i, alias, normal0, normal1
+ for ('string' == typeof aliases && (aliases = [aliases]), i = 0; i < aliases.length; i++)
+ (alias = aliases[i].split('|')),
+ (normal0 = normalizeName(alias[0])),
+ (normal1 = normalizeName(alias[1])),
+ (links[normal0] = normal1),
+ (names[normal0] = alias[0]),
+ (links[normal1] = normal0),
+ (names[normal1] = alias[1])
+ }
+ function loadData (data) {
+ addZone(data.zones), addLink(data.links), (tz.dataVersion = data.version)
+ }
+ function needsOffset (m) {
+ var isUnixTimestamp = 'X' === m._f || 'x' === m._f
+ return !(!m._a || void 0 !== m._tzm || isUnixTimestamp)
+ }
+ function logError (message) {
+ 'undefined' != typeof console && 'function' == typeof console.error && console.error(message)
+ }
+ function tz (input) {
+ var args = Array.prototype.slice.call(arguments, 0, -1),
+ name = arguments[arguments.length - 1],
+ zone = getZone(name),
+ out = moment.utc.apply(null, args)
+ return (
+ zone && !moment.isMoment(input) && needsOffset(out) && out.add(zone.parse(out), 'minutes'),
+ out.tz(name),
+ out
+ )
+ }
+ ;(Zone.prototype = {
+ _set: function (unpacked) {
+ ;(this.name = unpacked.name),
+ (this.abbrs = unpacked.abbrs),
+ (this.untils = unpacked.untils),
+ (this.offsets = unpacked.offsets),
+ (this.population = unpacked.population)
+ },
+ _index: function (timestamp) {
+ var i,
+ target = +timestamp,
+ untils = this.untils
+ for (i = 0; i < untils.length; i++) if (target < untils[i]) return i
+ },
+ parse: function (timestamp) {
+ var offset,
+ offsetNext,
+ offsetPrev,
+ i,
+ target = +timestamp,
+ offsets = this.offsets,
+ untils = this.untils,
+ max = untils.length - 1
+ for (i = 0; i < max; i++)
+ if (
+ ((offset = offsets[i]),
+ (offsetNext = offsets[i + 1]),
+ (offsetPrev = offsets[i ? i - 1 : i]),
+ offset < offsetNext && tz.moveAmbiguousForward
+ ? (offset = offsetNext)
+ : offset > offsetPrev && tz.moveInvalidForward && (offset = offsetPrev),
+ target < untils[i] - 6e4 * offset)
+ )
+ return offsets[i]
+ return offsets[max]
+ },
+ abbr: function (mom) {
+ return this.abbrs[this._index(mom)]
+ },
+ offset: function (mom) {
+ return (
+ logError('zone.offset has been deprecated in favor of zone.utcOffset'),
+ this.offsets[this._index(mom)]
+ )
+ },
+ utcOffset: function (mom) {
+ return this.offsets[this._index(mom)]
+ }
+ }),
+ (ZoneScore.prototype.scoreOffsetAt = function (offsetAt) {
+ ;(this.offsetScore += Math.abs(this.zone.utcOffset(offsetAt.at) - offsetAt.offset)),
+ this.zone.abbr(offsetAt.at).replace(/[^A-Z]/g, '') !== offsetAt.abbr && this.abbrScore++
+ }),
+ (tz.version = '0.5.17'),
+ (tz.dataVersion = ''),
+ (tz._zones = zones),
+ (tz._links = links),
+ (tz._names = names),
+ (tz.add = addZone),
+ (tz.link = addLink),
+ (tz.load = loadData),
+ (tz.zone = getZone),
+ (tz.zoneExists = function zoneExists (name) {
+ zoneExists.didShowError ||
+ ((zoneExists.didShowError = !0),
+ logError(
+ "moment.tz.zoneExists('" +
+ name +
+ "') has been deprecated in favor of !moment.tz.zone('" +
+ name +
+ "')"
+ ))
+ return !!getZone(name)
+ }),
+ (tz.guess = function (ignoreCache) {
+ ;(cachedGuess && !ignoreCache) || (cachedGuess = rebuildGuess())
+ return cachedGuess
+ }),
+ (tz.names = function () {
+ var i,
+ out = []
+ for (i in names)
+ names.hasOwnProperty(i) && (zones[i] || zones[links[i]]) && names[i] && out.push(names[i])
+ return out.sort()
+ }),
+ (tz.Zone = Zone),
+ (tz.unpack = unpack),
+ (tz.unpackBase60 = unpackBase60),
+ (tz.needsOffset = needsOffset),
+ (tz.moveInvalidForward = !0),
+ (tz.moveAmbiguousForward = !1)
+ var fn = moment.fn
+ function abbrWrap (old) {
+ return function () {
+ return this._z ? this._z.abbr(this) : old.call(this)
+ }
+ }
+ ;(moment.tz = tz),
+ (moment.defaultZone = null),
+ (moment.updateOffset = function (mom, keepTime) {
+ var offset,
+ zone = moment.defaultZone
+ void 0 === mom._z &&
+ (zone &&
+ needsOffset(mom) &&
+ !mom._isUTC &&
+ ((mom._d = moment.utc(mom._a)._d), mom.utc().add(zone.parse(mom), 'minutes')),
+ (mom._z = zone)),
+ mom._z &&
+ ((offset = mom._z.utcOffset(mom)),
+ Math.abs(offset) < 16 && (offset /= 60),
+ void 0 !== mom.utcOffset ? mom.utcOffset(-offset, keepTime) : mom.zone(offset, keepTime))
+ }),
+ (fn.tz = function (name, keepTime) {
+ return name
+ ? ((this._z = getZone(name)),
+ this._z
+ ? moment.updateOffset(this, keepTime)
+ : logError(
+ 'Moment Timezone has no data for ' +
+ name +
+ '. See http://momentjs.com/timezone/docs/#/data-loading/.'
+ ),
+ this)
+ : this._z
+ ? this._z.name
+ : void 0
+ }),
+ (fn.zoneName = abbrWrap(fn.zoneName)),
+ (fn.zoneAbbr = abbrWrap(fn.zoneAbbr)),
+ (fn.utc = ((old = fn.utc),
+ function () {
+ return (this._z = null), old.apply(this, arguments)
+ })),
+ (moment.tz.setDefault = function (name) {
+ return (
+ (major < 2 || (2 === major && minor < 9)) &&
+ logError(
+ 'Moment Timezone setDefault() requires Moment.js >= 2.9.0. You are using Moment.js ' +
+ moment.version +
+ '.'
+ ),
+ (moment.defaultZone = name ? getZone(name) : null),
+ moment
+ )
+ })
+ var old
+ var momentProperties = moment.momentProperties
+ '[object Array]' === Object.prototype.toString.call(momentProperties)
+ ? (momentProperties.push('_z'), momentProperties.push('_a'))
+ : momentProperties && (momentProperties._z = null)
+ return (
+ loadData({
+ version: '2018e',
+ zones: [
+ 'Africa/Abidjan|GMT|0|0||48e5',
+ 'Africa/Nairobi|EAT|-30|0||47e5',
+ 'Africa/Algiers|CET|-10|0||26e5',
+ 'Africa/Lagos|WAT|-10|0||17e6',
+ 'Africa/Maputo|CAT|-20|0||26e5',
+ 'Africa/Cairo|EET EEST|-20 -30|01010|1M2m0 gL0 e10 mn0|15e6',
+ 'Africa/Casablanca|WET WEST|0 -10|0101010101010101010101010101010101010101010|1H3C0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 Rc0 11A0 e00 e00 U00 11A0 8o0 e00 11A0 11A0 5A0 e00 17c0 1fA0 1a00|32e5',
+ 'Europe/Paris|CET CEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|11e6',
+ 'Africa/Johannesburg|SAST|-20|0||84e5',
+ 'Africa/Khartoum|EAT CAT|-30 -20|01|1Usl0|51e5',
+ 'Africa/Sao_Tome|GMT WAT|0 -10|01|1UQN0',
+ 'Africa/Tripoli|EET CET CEST|-20 -10 -20|0120|1IlA0 TA0 1o00|11e5',
+ 'Africa/Windhoek|CAT WAT|-20 -10|0101010101010|1GQo0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4',
+ 'America/Adak|HST HDT|a0 90|01010101010101010101010|1GIc0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|326',
+ 'America/Anchorage|AKST AKDT|90 80|01010101010101010101010|1GIb0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|30e4',
+ 'America/Santo_Domingo|AST|40|0||29e5',
+ 'America/Araguaina|-03 -02|30 20|010|1IdD0 Lz0|14e4',
+ 'America/Fortaleza|-03|30|0||34e5',
+ 'America/Asuncion|-03 -04|30 40|01010101010101010101010|1GTf0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0|28e5',
+ 'America/Panama|EST|50|0||15e5',
+ 'America/Mexico_City|CST CDT|60 50|01010101010101010101010|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|20e6',
+ 'America/Bahia|-02 -03|20 30|01|1GCq0|27e5',
+ 'America/Managua|CST|60|0||22e5',
+ 'America/La_Paz|-04|40|0||19e5',
+ 'America/Lima|-05|50|0||11e6',
+ 'America/Denver|MST MDT|70 60|01010101010101010101010|1GI90 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|26e5',
+ 'America/Campo_Grande|-03 -04|30 40|01010101010101010101010|1GCr0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0 1HB0 FX0 1HB0 IL0 1HB0 FX0 1HB0|77e4',
+ 'America/Cancun|CST CDT EST|60 50 50|01010102|1GQw0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4',
+ 'America/Caracas|-0430 -04|4u 40|01|1QMT0|29e5',
+ 'America/Chicago|CST CDT|60 50|01010101010101010101010|1GI80 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|92e5',
+ 'America/Chihuahua|MST MDT|70 60|01010101010101010101010|1GQx0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0|81e4',
+ 'America/Phoenix|MST|70|0||42e5',
+ 'America/Los_Angeles|PST PDT|80 70|01010101010101010101010|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|15e6',
+ 'America/New_York|EST EDT|50 40|01010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|21e6',
+ 'America/Rio_Branco|-04 -05|40 50|01|1KLE0|31e4',
+ 'America/Fort_Nelson|PST PDT MST|80 70 70|01010102|1GIa0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2',
+ 'America/Halifax|AST ADT|40 30|01010101010101010101010|1GI60 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|39e4',
+ 'America/Godthab|-03 -02|30 20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|17e3',
+ 'America/Grand_Turk|EST EDT AST|50 40 40|0101010121010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 5Ip0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|37e2',
+ 'America/Havana|CST CDT|50 40|01010101010101010101010|1GQt0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0|21e5',
+ 'America/Metlakatla|PST AKST AKDT|80 90 80|0121212121212121|1PAa0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|14e2',
+ 'America/Miquelon|-03 -02|30 20|01010101010101010101010|1GI50 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|61e2',
+ 'America/Montevideo|-02 -03|20 30|01010101|1GI40 1o10 11z0 1o10 11z0 1o10 11z0|17e5',
+ 'America/Noronha|-02|20|0||30e2',
+ 'America/Port-au-Prince|EST EDT|50 40|010101010101010101010|1GI70 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|23e5',
+ 'Antarctica/Palmer|-03 -04|30 40|010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40',
+ 'America/Santiago|-03 -04|30 40|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0|62e5',
+ 'America/Sao_Paulo|-02 -03|20 30|01010101010101010101010|1GCq0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0 1HB0 FX0 1HB0 IL0 1HB0 FX0 1HB0|20e6',
+ 'Atlantic/Azores|-01 +00|10 0|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e4',
+ 'America/St_Johns|NST NDT|3u 2u|01010101010101010101010|1GI5u 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0|11e4',
+ 'Antarctica/Casey|+11 +08|-b0 -80|0101|1GAF0 blz0 3m10|10',
+ 'Antarctica/Davis|+05 +07|-50 -70|01|1GAI0|70',
+ 'Pacific/Port_Moresby|+10|-a0|0||25e4',
+ 'Pacific/Guadalcanal|+11|-b0|0||11e4',
+ 'Asia/Tashkent|+05|-50|0||23e5',
+ 'Pacific/Auckland|NZDT NZST|-d0 -c0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|14e5',
+ 'Asia/Baghdad|+03|-30|0||66e5',
+ 'Antarctica/Troll|+00 +02|0 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|40',
+ 'Asia/Dhaka|+06|-60|0||16e6',
+ 'Asia/Amman|EET EEST|-20 -30|010101010101010101010|1GPy0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00|25e5',
+ 'Asia/Kamchatka|+12|-c0|0||18e4',
+ 'Asia/Baku|+04 +05|-40 -50|010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5',
+ 'Asia/Bangkok|+07|-70|0||15e6',
+ 'Asia/Barnaul|+07 +06|-70 -60|010|1N7v0 3rd0',
+ 'Asia/Beirut|EET EEST|-20 -30|01010101010101010101010|1GNy0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|22e5',
+ 'Asia/Manila|+08|-80|0||24e6',
+ 'Asia/Kolkata|IST|-5u|0||15e6',
+ 'Asia/Chita|+10 +08 +09|-a0 -80 -90|012|1N7s0 3re0|33e4',
+ 'Asia/Ulaanbaatar|+08 +09|-80 -90|01010|1O8G0 1cJ0 1cP0 1cJ0|12e5',
+ 'Asia/Shanghai|CST|-80|0||23e6',
+ 'Asia/Colombo|+0530|-5u|0||22e5',
+ 'Asia/Damascus|EET EEST|-20 -30|01010101010101010101010|1GPy0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0|26e5',
+ 'Asia/Dili|+09|-90|0||19e4',
+ 'Asia/Dubai|+04|-40|0||39e5',
+ 'Asia/Famagusta|EET EEST +03|-20 -30 -30|0101010101201010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0',
+ 'Asia/Gaza|EET EEST|-20 -30|01010101010101010101010|1GPy0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nz0 1220 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1qL0 WN0 1qL0 WN0 1qL0|18e5',
+ 'Asia/Hong_Kong|HKT|-80|0||73e5',
+ 'Asia/Hovd|+07 +08|-70 -80|01010|1O8H0 1cJ0 1cP0 1cJ0|81e3',
+ 'Asia/Irkutsk|+09 +08|-90 -80|01|1N7t0|60e4',
+ 'Europe/Istanbul|EET EEST +03|-20 -30 -30|01010101012|1GNB0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6',
+ 'Asia/Jakarta|WIB|-70|0||31e6',
+ 'Asia/Jayapura|WIT|-90|0||26e4',
+ 'Asia/Jerusalem|IST IDT|-20 -30|01010101010101010101010|1GPA0 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0|81e4',
+ 'Asia/Kabul|+0430|-4u|0||46e5',
+ 'Asia/Karachi|PKT|-50|0||24e6',
+ 'Asia/Kathmandu|+0545|-5J|0||12e5',
+ 'Asia/Yakutsk|+10 +09|-a0 -90|01|1N7s0|28e4',
+ 'Asia/Krasnoyarsk|+08 +07|-80 -70|01|1N7u0|10e5',
+ 'Asia/Magadan|+12 +10 +11|-c0 -a0 -b0|012|1N7q0 3Cq0|95e3',
+ 'Asia/Makassar|WITA|-80|0||15e5',
+ 'Europe/Athens|EET EEST|-20 -30|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|35e5',
+ 'Asia/Novosibirsk|+07 +06|-70 -60|010|1N7v0 4eN0|15e5',
+ 'Asia/Omsk|+07 +06|-70 -60|01|1N7v0|12e5',
+ 'Asia/Pyongyang|KST KST|-90 -8u|010|1P4D0 6BAu|29e5',
+ 'Asia/Rangoon|+0630|-6u|0||48e5',
+ 'Asia/Sakhalin|+11 +10|-b0 -a0|010|1N7r0 3rd0|58e4',
+ 'Asia/Seoul|KST|-90|0||23e6',
+ 'Asia/Srednekolymsk|+12 +11|-c0 -b0|01|1N7q0|35e2',
+ 'Asia/Tehran|+0330 +0430|-3u -4u|01010101010101010101010|1GLUu 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0|14e6',
+ 'Asia/Tokyo|JST|-90|0||38e6',
+ 'Asia/Tomsk|+07 +06|-70 -60|010|1N7v0 3Qp0|10e5',
+ 'Asia/Vladivostok|+11 +10|-b0 -a0|01|1N7r0|60e4',
+ 'Asia/Yekaterinburg|+06 +05|-60 -50|01|1N7w0|14e5',
+ 'Europe/Lisbon|WET WEST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|27e5',
+ 'Atlantic/Cape_Verde|-01|10|0||50e4',
+ 'Australia/Sydney|AEDT AEST|-b0 -a0|01010101010101010101010|1GQg0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|40e5',
+ 'Australia/Adelaide|ACDT ACST|-au -9u|01010101010101010101010|1GQgu 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0|11e5',
+ 'Australia/Brisbane|AEST|-a0|0||20e5',
+ 'Australia/Darwin|ACST|-9u|0||12e4',
+ 'Australia/Eucla|+0845|-8J|0||368',
+ 'Australia/Lord_Howe|+11 +1030|-b0 -au|01010101010101010101010|1GQf0 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu|347',
+ 'Australia/Perth|AWST|-80|0||18e5',
+ 'Pacific/Easter|-05 -06|50 60|010101010101010101010|1H3D0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1Nb0 Dd0 1Nb0 Ap0|30e2',
+ 'Europe/Dublin|GMT IST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|12e5',
+ 'Etc/GMT-1|+01|-10|0|',
+ 'Pacific/Fakaofo|+13|-d0|0||483',
+ 'Pacific/Kiritimati|+14|-e0|0||51e2',
+ 'Etc/GMT-2|+02|-20|0|',
+ 'Pacific/Tahiti|-10|a0|0||18e4',
+ 'Pacific/Niue|-11|b0|0||12e2',
+ 'Etc/GMT+12|-12|c0|0|',
+ 'Pacific/Galapagos|-06|60|0||25e3',
+ 'Etc/GMT+7|-07|70|0|',
+ 'Pacific/Pitcairn|-08|80|0||56',
+ 'Pacific/Gambier|-09|90|0||125',
+ 'Etc/UCT|UCT|0|0|',
+ 'Etc/UTC|UTC|0|0|',
+ 'Europe/Astrakhan|+04 +03|-40 -30|010|1N7y0 3rd0',
+ 'Europe/London|GMT BST|0 -10|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|10e6',
+ 'Europe/Chisinau|EET EEST|-20 -30|01010101010101010101010|1GNA0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|67e4',
+ 'Europe/Kaliningrad|+03 EET|-30 -20|01|1N7z0|44e4',
+ 'Europe/Volgograd|+04 +03|-40 -30|01|1N7y0|10e5',
+ 'Europe/Moscow|MSK MSK|-40 -30|01|1N7y0|16e6',
+ 'Europe/Saratov|+04 +03|-40 -30|010|1N7y0 5810',
+ 'Europe/Simferopol|EET EEST MSK MSK|-20 -30 -40 -30|0101023|1GNB0 1qM0 11A0 1o00 11z0 1nW0|33e4',
+ 'Pacific/Honolulu|HST|a0|0||37e4',
+ 'MET|MET MEST|-10 -20|01010101010101010101010|1GNB0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0',
+ 'Pacific/Chatham|+1345 +1245|-dJ -cJ|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|600',
+ 'Pacific/Apia|+14 +13|-e0 -d0|01010101010101010101010|1GQe0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00|37e3',
+ 'Pacific/Bougainville|+10 +11|-a0 -b0|01|1NwE0|18e4',
+ 'Pacific/Fiji|+13 +12|-d0 -c0|01010101010101010101010|1Goe0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 uM0 1SM0 uM0 1SM0 uM0 1VA0 s00 1VA0|88e4',
+ 'Pacific/Guam|ChST|-a0|0||17e4',
+ 'Pacific/Marquesas|-0930|9u|0||86e2',
+ 'Pacific/Pago_Pago|SST|b0|0||37e2',
+ 'Pacific/Norfolk|+1130 +11|-bu -b0|01|1PoCu|25e4',
+ 'Pacific/Tongatapu|+13 +14|-d0 -e0|010|1S4d0 s00|75e3'
+ ],
+ links: [
+ 'Africa/Abidjan|Africa/Accra',
+ 'Africa/Abidjan|Africa/Bamako',
+ 'Africa/Abidjan|Africa/Banjul',
+ 'Africa/Abidjan|Africa/Bissau',
+ 'Africa/Abidjan|Africa/Conakry',
+ 'Africa/Abidjan|Africa/Dakar',
+ 'Africa/Abidjan|Africa/Freetown',
+ 'Africa/Abidjan|Africa/Lome',
+ 'Africa/Abidjan|Africa/Monrovia',
+ 'Africa/Abidjan|Africa/Nouakchott',
+ 'Africa/Abidjan|Africa/Ouagadougou',
+ 'Africa/Abidjan|Africa/Timbuktu',
+ 'Africa/Abidjan|America/Danmarkshavn',
+ 'Africa/Abidjan|Atlantic/Reykjavik',
+ 'Africa/Abidjan|Atlantic/St_Helena',
+ 'Africa/Abidjan|Etc/GMT',
+ 'Africa/Abidjan|Etc/GMT+0',
+ 'Africa/Abidjan|Etc/GMT-0',
+ 'Africa/Abidjan|Etc/GMT0',
+ 'Africa/Abidjan|Etc/Greenwich',
+ 'Africa/Abidjan|GMT',
+ 'Africa/Abidjan|GMT+0',
+ 'Africa/Abidjan|GMT-0',
+ 'Africa/Abidjan|GMT0',
+ 'Africa/Abidjan|Greenwich',
+ 'Africa/Abidjan|Iceland',
+ 'Africa/Algiers|Africa/Tunis',
+ 'Africa/Cairo|Egypt',
+ 'Africa/Casablanca|Africa/El_Aaiun',
+ 'Africa/Johannesburg|Africa/Maseru',
+ 'Africa/Johannesburg|Africa/Mbabane',
+ 'Africa/Lagos|Africa/Bangui',
+ 'Africa/Lagos|Africa/Brazzaville',
+ 'Africa/Lagos|Africa/Douala',
+ 'Africa/Lagos|Africa/Kinshasa',
+ 'Africa/Lagos|Africa/Libreville',
+ 'Africa/Lagos|Africa/Luanda',
+ 'Africa/Lagos|Africa/Malabo',
+ 'Africa/Lagos|Africa/Ndjamena',
+ 'Africa/Lagos|Africa/Niamey',
+ 'Africa/Lagos|Africa/Porto-Novo',
+ 'Africa/Maputo|Africa/Blantyre',
+ 'Africa/Maputo|Africa/Bujumbura',
+ 'Africa/Maputo|Africa/Gaborone',
+ 'Africa/Maputo|Africa/Harare',
+ 'Africa/Maputo|Africa/Kigali',
+ 'Africa/Maputo|Africa/Lubumbashi',
+ 'Africa/Maputo|Africa/Lusaka',
+ 'Africa/Nairobi|Africa/Addis_Ababa',
+ 'Africa/Nairobi|Africa/Asmara',
+ 'Africa/Nairobi|Africa/Asmera',
+ 'Africa/Nairobi|Africa/Dar_es_Salaam',
+ 'Africa/Nairobi|Africa/Djibouti',
+ 'Africa/Nairobi|Africa/Juba',
+ 'Africa/Nairobi|Africa/Kampala',
+ 'Africa/Nairobi|Africa/Mogadishu',
+ 'Africa/Nairobi|Indian/Antananarivo',
+ 'Africa/Nairobi|Indian/Comoro',
+ 'Africa/Nairobi|Indian/Mayotte',
+ 'Africa/Tripoli|Libya',
+ 'America/Adak|America/Atka',
+ 'America/Adak|US/Aleutian',
+ 'America/Anchorage|America/Juneau',
+ 'America/Anchorage|America/Nome',
+ 'America/Anchorage|America/Sitka',
+ 'America/Anchorage|America/Yakutat',
+ 'America/Anchorage|US/Alaska',
+ 'America/Campo_Grande|America/Cuiaba',
+ 'America/Chicago|America/Indiana/Knox',
+ 'America/Chicago|America/Indiana/Tell_City',
+ 'America/Chicago|America/Knox_IN',
+ 'America/Chicago|America/Matamoros',
+ 'America/Chicago|America/Menominee',
+ 'America/Chicago|America/North_Dakota/Beulah',
+ 'America/Chicago|America/North_Dakota/Center',
+ 'America/Chicago|America/North_Dakota/New_Salem',
+ 'America/Chicago|America/Rainy_River',
+ 'America/Chicago|America/Rankin_Inlet',
+ 'America/Chicago|America/Resolute',
+ 'America/Chicago|America/Winnipeg',
+ 'America/Chicago|CST6CDT',
+ 'America/Chicago|Canada/Central',
+ 'America/Chicago|US/Central',
+ 'America/Chicago|US/Indiana-Starke',
+ 'America/Chihuahua|America/Mazatlan',
+ 'America/Chihuahua|Mexico/BajaSur',
+ 'America/Denver|America/Boise',
+ 'America/Denver|America/Cambridge_Bay',
+ 'America/Denver|America/Edmonton',
+ 'America/Denver|America/Inuvik',
+ 'America/Denver|America/Ojinaga',
+ 'America/Denver|America/Shiprock',
+ 'America/Denver|America/Yellowknife',
+ 'America/Denver|Canada/Mountain',
+ 'America/Denver|MST7MDT',
+ 'America/Denver|Navajo',
+ 'America/Denver|US/Mountain',
+ 'America/Fortaleza|America/Argentina/Buenos_Aires',
+ 'America/Fortaleza|America/Argentina/Catamarca',
+ 'America/Fortaleza|America/Argentina/ComodRivadavia',
+ 'America/Fortaleza|America/Argentina/Cordoba',
+ 'America/Fortaleza|America/Argentina/Jujuy',
+ 'America/Fortaleza|America/Argentina/La_Rioja',
+ 'America/Fortaleza|America/Argentina/Mendoza',
+ 'America/Fortaleza|America/Argentina/Rio_Gallegos',
+ 'America/Fortaleza|America/Argentina/Salta',
+ 'America/Fortaleza|America/Argentina/San_Juan',
+ 'America/Fortaleza|America/Argentina/San_Luis',
+ 'America/Fortaleza|America/Argentina/Tucuman',
+ 'America/Fortaleza|America/Argentina/Ushuaia',
+ 'America/Fortaleza|America/Belem',
+ 'America/Fortaleza|America/Buenos_Aires',
+ 'America/Fortaleza|America/Catamarca',
+ 'America/Fortaleza|America/Cayenne',
+ 'America/Fortaleza|America/Cordoba',
+ 'America/Fortaleza|America/Jujuy',
+ 'America/Fortaleza|America/Maceio',
+ 'America/Fortaleza|America/Mendoza',
+ 'America/Fortaleza|America/Paramaribo',
+ 'America/Fortaleza|America/Recife',
+ 'America/Fortaleza|America/Rosario',
+ 'America/Fortaleza|America/Santarem',
+ 'America/Fortaleza|Antarctica/Rothera',
+ 'America/Fortaleza|Atlantic/Stanley',
+ 'America/Fortaleza|Etc/GMT+3',
+ 'America/Halifax|America/Glace_Bay',
+ 'America/Halifax|America/Goose_Bay',
+ 'America/Halifax|America/Moncton',
+ 'America/Halifax|America/Thule',
+ 'America/Halifax|Atlantic/Bermuda',
+ 'America/Halifax|Canada/Atlantic',
+ 'America/Havana|Cuba',
+ 'America/La_Paz|America/Boa_Vista',
+ 'America/La_Paz|America/Guyana',
+ 'America/La_Paz|America/Manaus',
+ 'America/La_Paz|America/Porto_Velho',
+ 'America/La_Paz|Brazil/West',
+ 'America/La_Paz|Etc/GMT+4',
+ 'America/Lima|America/Bogota',
+ 'America/Lima|America/Guayaquil',
+ 'America/Lima|Etc/GMT+5',
+ 'America/Los_Angeles|America/Dawson',
+ 'America/Los_Angeles|America/Ensenada',
+ 'America/Los_Angeles|America/Santa_Isabel',
+ 'America/Los_Angeles|America/Tijuana',
+ 'America/Los_Angeles|America/Vancouver',
+ 'America/Los_Angeles|America/Whitehorse',
+ 'America/Los_Angeles|Canada/Pacific',
+ 'America/Los_Angeles|Canada/Yukon',
+ 'America/Los_Angeles|Mexico/BajaNorte',
+ 'America/Los_Angeles|PST8PDT',
+ 'America/Los_Angeles|US/Pacific',
+ 'America/Los_Angeles|US/Pacific-New',
+ 'America/Managua|America/Belize',
+ 'America/Managua|America/Costa_Rica',
+ 'America/Managua|America/El_Salvador',
+ 'America/Managua|America/Guatemala',
+ 'America/Managua|America/Regina',
+ 'America/Managua|America/Swift_Current',
+ 'America/Managua|America/Tegucigalpa',
+ 'America/Managua|Canada/Saskatchewan',
+ 'America/Mexico_City|America/Bahia_Banderas',
+ 'America/Mexico_City|America/Merida',
+ 'America/Mexico_City|America/Monterrey',
+ 'America/Mexico_City|Mexico/General',
+ 'America/New_York|America/Detroit',
+ 'America/New_York|America/Fort_Wayne',
+ 'America/New_York|America/Indiana/Indianapolis',
+ 'America/New_York|America/Indiana/Marengo',
+ 'America/New_York|America/Indiana/Petersburg',
+ 'America/New_York|America/Indiana/Vevay',
+ 'America/New_York|America/Indiana/Vincennes',
+ 'America/New_York|America/Indiana/Winamac',
+ 'America/New_York|America/Indianapolis',
+ 'America/New_York|America/Iqaluit',
+ 'America/New_York|America/Kentucky/Louisville',
+ 'America/New_York|America/Kentucky/Monticello',
+ 'America/New_York|America/Louisville',
+ 'America/New_York|America/Montreal',
+ 'America/New_York|America/Nassau',
+ 'America/New_York|America/Nipigon',
+ 'America/New_York|America/Pangnirtung',
+ 'America/New_York|America/Thunder_Bay',
+ 'America/New_York|America/Toronto',
+ 'America/New_York|Canada/Eastern',
+ 'America/New_York|EST5EDT',
+ 'America/New_York|US/East-Indiana',
+ 'America/New_York|US/Eastern',
+ 'America/New_York|US/Michigan',
+ 'America/Noronha|Atlantic/South_Georgia',
+ 'America/Noronha|Brazil/DeNoronha',
+ 'America/Noronha|Etc/GMT+2',
+ 'America/Panama|America/Atikokan',
+ 'America/Panama|America/Cayman',
+ 'America/Panama|America/Coral_Harbour',
+ 'America/Panama|America/Jamaica',
+ 'America/Panama|EST',
+ 'America/Panama|Jamaica',
+ 'America/Phoenix|America/Creston',
+ 'America/Phoenix|America/Dawson_Creek',
+ 'America/Phoenix|America/Hermosillo',
+ 'America/Phoenix|MST',
+ 'America/Phoenix|US/Arizona',
+ 'America/Rio_Branco|America/Eirunepe',
+ 'America/Rio_Branco|America/Porto_Acre',
+ 'America/Rio_Branco|Brazil/Acre',
+ 'America/Santiago|Chile/Continental',
+ 'America/Santo_Domingo|America/Anguilla',
+ 'America/Santo_Domingo|America/Antigua',
+ 'America/Santo_Domingo|America/Aruba',
+ 'America/Santo_Domingo|America/Barbados',
+ 'America/Santo_Domingo|America/Blanc-Sablon',
+ 'America/Santo_Domingo|America/Curacao',
+ 'America/Santo_Domingo|America/Dominica',
+ 'America/Santo_Domingo|America/Grenada',
+ 'America/Santo_Domingo|America/Guadeloupe',
+ 'America/Santo_Domingo|America/Kralendijk',
+ 'America/Santo_Domingo|America/Lower_Princes',
+ 'America/Santo_Domingo|America/Marigot',
+ 'America/Santo_Domingo|America/Martinique',
+ 'America/Santo_Domingo|America/Montserrat',
+ 'America/Santo_Domingo|America/Port_of_Spain',
+ 'America/Santo_Domingo|America/Puerto_Rico',
+ 'America/Santo_Domingo|America/St_Barthelemy',
+ 'America/Santo_Domingo|America/St_Kitts',
+ 'America/Santo_Domingo|America/St_Lucia',
+ 'America/Santo_Domingo|America/St_Thomas',
+ 'America/Santo_Domingo|America/St_Vincent',
+ 'America/Santo_Domingo|America/Tortola',
+ 'America/Santo_Domingo|America/Virgin',
+ 'America/Sao_Paulo|Brazil/East',
+ 'America/St_Johns|Canada/Newfoundland',
+ 'Antarctica/Palmer|America/Punta_Arenas',
+ 'Asia/Baghdad|Antarctica/Syowa',
+ 'Asia/Baghdad|Asia/Aden',
+ 'Asia/Baghdad|Asia/Bahrain',
+ 'Asia/Baghdad|Asia/Kuwait',
+ 'Asia/Baghdad|Asia/Qatar',
+ 'Asia/Baghdad|Asia/Riyadh',
+ 'Asia/Baghdad|Etc/GMT-3',
+ 'Asia/Baghdad|Europe/Minsk',
+ 'Asia/Bangkok|Asia/Ho_Chi_Minh',
+ 'Asia/Bangkok|Asia/Novokuznetsk',
+ 'Asia/Bangkok|Asia/Phnom_Penh',
+ 'Asia/Bangkok|Asia/Saigon',
+ 'Asia/Bangkok|Asia/Vientiane',
+ 'Asia/Bangkok|Etc/GMT-7',
+ 'Asia/Bangkok|Indian/Christmas',
+ 'Asia/Dhaka|Antarctica/Vostok',
+ 'Asia/Dhaka|Asia/Almaty',
+ 'Asia/Dhaka|Asia/Bishkek',
+ 'Asia/Dhaka|Asia/Dacca',
+ 'Asia/Dhaka|Asia/Kashgar',
+ 'Asia/Dhaka|Asia/Qyzylorda',
+ 'Asia/Dhaka|Asia/Thimbu',
+ 'Asia/Dhaka|Asia/Thimphu',
+ 'Asia/Dhaka|Asia/Urumqi',
+ 'Asia/Dhaka|Etc/GMT-6',
+ 'Asia/Dhaka|Indian/Chagos',
+ 'Asia/Dili|Etc/GMT-9',
+ 'Asia/Dili|Pacific/Palau',
+ 'Asia/Dubai|Asia/Muscat',
+ 'Asia/Dubai|Asia/Tbilisi',
+ 'Asia/Dubai|Asia/Yerevan',
+ 'Asia/Dubai|Etc/GMT-4',
+ 'Asia/Dubai|Europe/Samara',
+ 'Asia/Dubai|Indian/Mahe',
+ 'Asia/Dubai|Indian/Mauritius',
+ 'Asia/Dubai|Indian/Reunion',
+ 'Asia/Gaza|Asia/Hebron',
+ 'Asia/Hong_Kong|Hongkong',
+ 'Asia/Jakarta|Asia/Pontianak',
+ 'Asia/Jerusalem|Asia/Tel_Aviv',
+ 'Asia/Jerusalem|Israel',
+ 'Asia/Kamchatka|Asia/Anadyr',
+ 'Asia/Kamchatka|Etc/GMT-12',
+ 'Asia/Kamchatka|Kwajalein',
+ 'Asia/Kamchatka|Pacific/Funafuti',
+ 'Asia/Kamchatka|Pacific/Kwajalein',
+ 'Asia/Kamchatka|Pacific/Majuro',
+ 'Asia/Kamchatka|Pacific/Nauru',
+ 'Asia/Kamchatka|Pacific/Tarawa',
+ 'Asia/Kamchatka|Pacific/Wake',
+ 'Asia/Kamchatka|Pacific/Wallis',
+ 'Asia/Kathmandu|Asia/Katmandu',
+ 'Asia/Kolkata|Asia/Calcutta',
+ 'Asia/Makassar|Asia/Ujung_Pandang',
+ 'Asia/Manila|Asia/Brunei',
+ 'Asia/Manila|Asia/Kuala_Lumpur',
+ 'Asia/Manila|Asia/Kuching',
+ 'Asia/Manila|Asia/Singapore',
+ 'Asia/Manila|Etc/GMT-8',
+ 'Asia/Manila|Singapore',
+ 'Asia/Rangoon|Asia/Yangon',
+ 'Asia/Rangoon|Indian/Cocos',
+ 'Asia/Seoul|ROK',
+ 'Asia/Shanghai|Asia/Chongqing',
+ 'Asia/Shanghai|Asia/Chungking',
+ 'Asia/Shanghai|Asia/Harbin',
+ 'Asia/Shanghai|Asia/Macao',
+ 'Asia/Shanghai|Asia/Macau',
+ 'Asia/Shanghai|Asia/Taipei',
+ 'Asia/Shanghai|PRC',
+ 'Asia/Shanghai|ROC',
+ 'Asia/Tashkent|Antarctica/Mawson',
+ 'Asia/Tashkent|Asia/Aqtau',
+ 'Asia/Tashkent|Asia/Aqtobe',
+ 'Asia/Tashkent|Asia/Ashgabat',
+ 'Asia/Tashkent|Asia/Ashkhabad',
+ 'Asia/Tashkent|Asia/Atyrau',
+ 'Asia/Tashkent|Asia/Dushanbe',
+ 'Asia/Tashkent|Asia/Oral',
+ 'Asia/Tashkent|Asia/Samarkand',
+ 'Asia/Tashkent|Etc/GMT-5',
+ 'Asia/Tashkent|Indian/Kerguelen',
+ 'Asia/Tashkent|Indian/Maldives',
+ 'Asia/Tehran|Iran',
+ 'Asia/Tokyo|Japan',
+ 'Asia/Ulaanbaatar|Asia/Choibalsan',
+ 'Asia/Ulaanbaatar|Asia/Ulan_Bator',
+ 'Asia/Vladivostok|Asia/Ust-Nera',
+ 'Asia/Yakutsk|Asia/Khandyga',
+ 'Atlantic/Azores|America/Scoresbysund',
+ 'Atlantic/Cape_Verde|Etc/GMT+1',
+ 'Australia/Adelaide|Australia/Broken_Hill',
+ 'Australia/Adelaide|Australia/South',
+ 'Australia/Adelaide|Australia/Yancowinna',
+ 'Australia/Brisbane|Australia/Lindeman',
+ 'Australia/Brisbane|Australia/Queensland',
+ 'Australia/Darwin|Australia/North',
+ 'Australia/Lord_Howe|Australia/LHI',
+ 'Australia/Perth|Australia/West',
+ 'Australia/Sydney|Australia/ACT',
+ 'Australia/Sydney|Australia/Canberra',
+ 'Australia/Sydney|Australia/Currie',
+ 'Australia/Sydney|Australia/Hobart',
+ 'Australia/Sydney|Australia/Melbourne',
+ 'Australia/Sydney|Australia/NSW',
+ 'Australia/Sydney|Australia/Tasmania',
+ 'Australia/Sydney|Australia/Victoria',
+ 'Etc/UCT|UCT',
+ 'Etc/UTC|Etc/Universal',
+ 'Etc/UTC|Etc/Zulu',
+ 'Etc/UTC|UTC',
+ 'Etc/UTC|Universal',
+ 'Etc/UTC|Zulu',
+ 'Europe/Astrakhan|Europe/Ulyanovsk',
+ 'Europe/Athens|Asia/Nicosia',
+ 'Europe/Athens|EET',
+ 'Europe/Athens|Europe/Bucharest',
+ 'Europe/Athens|Europe/Helsinki',
+ 'Europe/Athens|Europe/Kiev',
+ 'Europe/Athens|Europe/Mariehamn',
+ 'Europe/Athens|Europe/Nicosia',
+ 'Europe/Athens|Europe/Riga',
+ 'Europe/Athens|Europe/Sofia',
+ 'Europe/Athens|Europe/Tallinn',
+ 'Europe/Athens|Europe/Uzhgorod',
+ 'Europe/Athens|Europe/Vilnius',
+ 'Europe/Athens|Europe/Zaporozhye',
+ 'Europe/Chisinau|Europe/Tiraspol',
+ 'Europe/Dublin|Eire',
+ 'Europe/Istanbul|Asia/Istanbul',
+ 'Europe/Istanbul|Turkey',
+ 'Europe/Lisbon|Atlantic/Canary',
+ 'Europe/Lisbon|Atlantic/Faeroe',
+ 'Europe/Lisbon|Atlantic/Faroe',
+ 'Europe/Lisbon|Atlantic/Madeira',
+ 'Europe/Lisbon|Portugal',
+ 'Europe/Lisbon|WET',
+ 'Europe/London|Europe/Belfast',
+ 'Europe/London|Europe/Guernsey',
+ 'Europe/London|Europe/Isle_of_Man',
+ 'Europe/London|Europe/Jersey',
+ 'Europe/London|GB',
+ 'Europe/London|GB-Eire',
+ 'Europe/Moscow|W-SU',
+ 'Europe/Paris|Africa/Ceuta',
+ 'Europe/Paris|Arctic/Longyearbyen',
+ 'Europe/Paris|Atlantic/Jan_Mayen',
+ 'Europe/Paris|CET',
+ 'Europe/Paris|Europe/Amsterdam',
+ 'Europe/Paris|Europe/Andorra',
+ 'Europe/Paris|Europe/Belgrade',
+ 'Europe/Paris|Europe/Berlin',
+ 'Europe/Paris|Europe/Bratislava',
+ 'Europe/Paris|Europe/Brussels',
+ 'Europe/Paris|Europe/Budapest',
+ 'Europe/Paris|Europe/Busingen',
+ 'Europe/Paris|Europe/Copenhagen',
+ 'Europe/Paris|Europe/Gibraltar',
+ 'Europe/Paris|Europe/Ljubljana',
+ 'Europe/Paris|Europe/Luxembourg',
+ 'Europe/Paris|Europe/Madrid',
+ 'Europe/Paris|Europe/Malta',
+ 'Europe/Paris|Europe/Monaco',
+ 'Europe/Paris|Europe/Oslo',
+ 'Europe/Paris|Europe/Podgorica',
+ 'Europe/Paris|Europe/Prague',
+ 'Europe/Paris|Europe/Rome',
+ 'Europe/Paris|Europe/San_Marino',
+ 'Europe/Paris|Europe/Sarajevo',
+ 'Europe/Paris|Europe/Skopje',
+ 'Europe/Paris|Europe/Stockholm',
+ 'Europe/Paris|Europe/Tirane',
+ 'Europe/Paris|Europe/Vaduz',
+ 'Europe/Paris|Europe/Vatican',
+ 'Europe/Paris|Europe/Vienna',
+ 'Europe/Paris|Europe/Warsaw',
+ 'Europe/Paris|Europe/Zagreb',
+ 'Europe/Paris|Europe/Zurich',
+ 'Europe/Paris|Poland',
+ 'Europe/Volgograd|Europe/Kirov',
+ 'Pacific/Auckland|Antarctica/McMurdo',
+ 'Pacific/Auckland|Antarctica/South_Pole',
+ 'Pacific/Auckland|NZ',
+ 'Pacific/Chatham|NZ-CHAT',
+ 'Pacific/Easter|Chile/EasterIsland',
+ 'Pacific/Fakaofo|Etc/GMT-13',
+ 'Pacific/Fakaofo|Pacific/Enderbury',
+ 'Pacific/Galapagos|Etc/GMT+6',
+ 'Pacific/Gambier|Etc/GMT+9',
+ 'Pacific/Guadalcanal|Antarctica/Macquarie',
+ 'Pacific/Guadalcanal|Etc/GMT-11',
+ 'Pacific/Guadalcanal|Pacific/Efate',
+ 'Pacific/Guadalcanal|Pacific/Kosrae',
+ 'Pacific/Guadalcanal|Pacific/Noumea',
+ 'Pacific/Guadalcanal|Pacific/Pohnpei',
+ 'Pacific/Guadalcanal|Pacific/Ponape',
+ 'Pacific/Guam|Pacific/Saipan',
+ 'Pacific/Honolulu|HST',
+ 'Pacific/Honolulu|Pacific/Johnston',
+ 'Pacific/Honolulu|US/Hawaii',
+ 'Pacific/Kiritimati|Etc/GMT-14',
+ 'Pacific/Niue|Etc/GMT+11',
+ 'Pacific/Pago_Pago|Pacific/Midway',
+ 'Pacific/Pago_Pago|Pacific/Samoa',
+ 'Pacific/Pago_Pago|US/Samoa',
+ 'Pacific/Pitcairn|Etc/GMT+8',
+ 'Pacific/Port_Moresby|Antarctica/DumontDUrville',
+ 'Pacific/Port_Moresby|Etc/GMT-10',
+ 'Pacific/Port_Moresby|Pacific/Chuuk',
+ 'Pacific/Port_Moresby|Pacific/Truk',
+ 'Pacific/Port_Moresby|Pacific/Yap',
+ 'Pacific/Tahiti|Etc/GMT+10',
+ 'Pacific/Tahiti|Pacific/Rarotonga'
+ ]
+ }),
+ moment
+ )
+ })
+ ? __WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)
+ : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })()
+ },
+ ,
+ ,
+ ,
+ function (module, exports, __webpack_require__) {
+ ;(function (global) {
+ var __WEBPACK_AMD_DEFINE_RESULT__
+ /*!
+ * Waves v0.7.4
+ * http://fian.my.id/Waves
+ *
+ * Copyright 2014 Alfiana E. Sibuea and other contributors
+ * Released under the MIT license
+ * https://github.com/fians/Waves/blob/master/LICENSE
+ */ !(function (window, factory) {
+ 'use strict'
+ void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ = function () {
+ return factory.apply(window)
+ }.apply(exports, [])) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)
+ })('object' == typeof global ? global : this, function () {
+ 'use strict'
+ var Waves = Waves || {},
+ $$ = document.querySelectorAll.bind(document),
+ toString = Object.prototype.toString,
+ isTouchAvailable = 'ontouchstart' in window
+ function isObject (value) {
+ var type = typeof value
+ return 'function' === type || ('object' === type && !!value)
+ }
+ function getWavesElements (nodes) {
+ var obj,
+ stringRepr = toString.call(nodes)
+ return '[object String]' === stringRepr
+ ? $$(nodes)
+ : isObject(nodes) &&
+ /^\[object (HTMLCollection|NodeList|Object)\]$/.test(stringRepr) &&
+ nodes.hasOwnProperty('length')
+ ? nodes
+ : isObject((obj = nodes)) && obj.nodeType > 0
+ ? [nodes]
+ : []
+ }
+ function offset (elem) {
+ var docElem,
+ win,
+ box = { top: 0, left: 0 },
+ doc = elem && elem.ownerDocument
+ return (
+ (docElem = doc.documentElement),
+ void 0 !== elem.getBoundingClientRect && (box = elem.getBoundingClientRect()),
+ (win = (function (elem) {
+ return null !== (obj = elem) && obj === obj.window ? elem : 9 === elem.nodeType && elem.defaultView
+ var obj
+ })(doc)),
+ {
+ top: box.top + win.pageYOffset - docElem.clientTop,
+ left: box.left + win.pageXOffset - docElem.clientLeft
+ }
+ )
+ }
+ function convertStyle (styleObj) {
+ var style = ''
+ for (var prop in styleObj) styleObj.hasOwnProperty(prop) && (style += prop + ':' + styleObj[prop] + ';')
+ return style
+ }
+ var Effect = {
+ duration: 750,
+ delay: 200,
+ show: function (e, element, velocity) {
+ if (2 === e.button) return !1
+ element = element || this
+ var ripple = document.createElement('div')
+ ;(ripple.className = 'waves-ripple waves-rippling'), element.appendChild(ripple)
+ var pos = offset(element),
+ relativeY = 0,
+ relativeX = 0
+ 'touches' in e && e.touches.length
+ ? ((relativeY = e.touches[0].pageY - pos.top), (relativeX = e.touches[0].pageX - pos.left))
+ : ((relativeY = e.pageY - pos.top), (relativeX = e.pageX - pos.left)),
+ (relativeX = relativeX >= 0 ? relativeX : 0),
+ (relativeY = relativeY >= 0 ? relativeY : 0)
+ var scale = 'scale(' + (element.clientWidth / 100) * 3 + ')',
+ translate = 'translate(0,0)'
+ velocity && (translate = 'translate(' + velocity.x + 'px, ' + velocity.y + 'px)'),
+ ripple.setAttribute('data-hold', Date.now()),
+ ripple.setAttribute('data-x', relativeX),
+ ripple.setAttribute('data-y', relativeY),
+ ripple.setAttribute('data-scale', scale),
+ ripple.setAttribute('data-translate', translate)
+ var rippleStyle = { top: relativeY + 'px', left: relativeX + 'px' }
+ ripple.classList.add('waves-notransition'),
+ ripple.setAttribute('style', convertStyle(rippleStyle)),
+ ripple.classList.remove('waves-notransition'),
+ (rippleStyle['-webkit-transform'] = scale + ' ' + translate),
+ (rippleStyle['-moz-transform'] = scale + ' ' + translate),
+ (rippleStyle['-ms-transform'] = scale + ' ' + translate),
+ (rippleStyle['-o-transform'] = scale + ' ' + translate),
+ (rippleStyle.transform = scale + ' ' + translate),
+ (rippleStyle.opacity = '1')
+ var duration = 'mousemove' === e.type ? 2500 : Effect.duration
+ ;(rippleStyle['-webkit-transition-duration'] = duration + 'ms'),
+ (rippleStyle['-moz-transition-duration'] = duration + 'ms'),
+ (rippleStyle['-o-transition-duration'] = duration + 'ms'),
+ (rippleStyle['transition-duration'] = duration + 'ms'),
+ ripple.setAttribute('style', convertStyle(rippleStyle))
+ },
+ hide: function (e, element) {
+ for (
+ var ripples = (element = element || this).getElementsByClassName('waves-rippling'),
+ i = 0,
+ len = ripples.length;
+ i < len;
+ i++
+ )
+ removeRipple(e, element, ripples[i])
+ }
+ },
+ TagWrapper = {
+ input: function (element) {
+ var parent = element.parentNode
+ if ('i' !== parent.tagName.toLowerCase() || !parent.classList.contains('waves-effect')) {
+ var wrapper = document.createElement('i')
+ ;(wrapper.className = element.className + ' waves-input-wrapper'),
+ (element.className = 'waves-button-input'),
+ parent.replaceChild(wrapper, element),
+ wrapper.appendChild(element)
+ var elementStyle = window.getComputedStyle(element, null),
+ color = elementStyle.color,
+ backgroundColor = elementStyle.backgroundColor
+ wrapper.setAttribute('style', 'color:' + color + ';background:' + backgroundColor),
+ element.setAttribute('style', 'background-color:rgba(0,0,0,0);')
+ }
+ },
+ img: function (element) {
+ var parent = element.parentNode
+ if ('i' !== parent.tagName.toLowerCase() || !parent.classList.contains('waves-effect')) {
+ var wrapper = document.createElement('i')
+ parent.replaceChild(wrapper, element), wrapper.appendChild(element)
+ }
+ }
+ }
+ function removeRipple (e, el, ripple) {
+ if (ripple) {
+ ripple.classList.remove('waves-rippling')
+ var relativeX = ripple.getAttribute('data-x'),
+ relativeY = ripple.getAttribute('data-y'),
+ scale = ripple.getAttribute('data-scale'),
+ translate = ripple.getAttribute('data-translate'),
+ delay = 350 - (Date.now() - Number(ripple.getAttribute('data-hold')))
+ delay < 0 && (delay = 0), 'mousemove' === e.type && (delay = 150)
+ var duration = 'mousemove' === e.type ? 2500 : Effect.duration
+ setTimeout(function () {
+ var style = {
+ top: relativeY + 'px',
+ left: relativeX + 'px',
+ opacity: '0',
+ '-webkit-transition-duration': duration + 'ms',
+ '-moz-transition-duration': duration + 'ms',
+ '-o-transition-duration': duration + 'ms',
+ 'transition-duration': duration + 'ms',
+ '-webkit-transform': scale + ' ' + translate,
+ '-moz-transform': scale + ' ' + translate,
+ '-ms-transform': scale + ' ' + translate,
+ '-o-transform': scale + ' ' + translate,
+ transform: scale + ' ' + translate
+ }
+ ripple.setAttribute('style', convertStyle(style)),
+ setTimeout(function () {
+ try {
+ el.removeChild(ripple)
+ } catch (e) {
+ return !1
+ }
+ }, duration)
+ }, delay)
+ }
+ }
+ var TouchHandler = {
+ touches: 0,
+ allowEvent: function (e) {
+ var allow = !0
+ return /^(mousedown|mousemove)$/.test(e.type) && TouchHandler.touches && (allow = !1), allow
+ },
+ registerEvent: function (e) {
+ var eType = e.type
+ 'touchstart' === eType
+ ? (TouchHandler.touches += 1)
+ : /^(touchend|touchcancel)$/.test(eType) &&
+ setTimeout(function () {
+ TouchHandler.touches && (TouchHandler.touches -= 1)
+ }, 500)
+ }
+ }
+ function showEffect (e) {
+ var element = (function (e) {
+ if (!1 === TouchHandler.allowEvent(e)) return null
+ for (var element = null, target = e.target || e.srcElement; null !== target.parentElement; ) {
+ if (target.classList.contains('waves-effect') && !(target instanceof SVGElement)) {
+ element = target
+ break
+ }
+ target = target.parentElement
+ }
+ return element
+ })(e)
+ if (null !== element) {
+ if (element.disabled || element.getAttribute('disabled') || element.classList.contains('disabled')) return
+ if ((TouchHandler.registerEvent(e), 'touchstart' === e.type && Effect.delay)) {
+ var hidden = !1,
+ timer = setTimeout(function () {
+ ;(timer = null), Effect.show(e, element)
+ }, Effect.delay),
+ hideEffect = function (hideEvent) {
+ timer && (clearTimeout(timer), (timer = null), Effect.show(e, element)),
+ hidden || ((hidden = !0), Effect.hide(hideEvent, element))
+ }
+ element.addEventListener(
+ 'touchmove',
+ function (moveEvent) {
+ timer && (clearTimeout(timer), (timer = null)), hideEffect(moveEvent)
+ },
+ !1
+ ),
+ element.addEventListener('touchend', hideEffect, !1),
+ element.addEventListener('touchcancel', hideEffect, !1)
+ } else
+ Effect.show(e, element),
+ isTouchAvailable &&
+ (element.addEventListener('touchend', Effect.hide, !1),
+ element.addEventListener('touchcancel', Effect.hide, !1)),
+ element.addEventListener('mouseup', Effect.hide, !1),
+ element.addEventListener('mouseleave', Effect.hide, !1)
+ }
+ }
+ return (
+ (Waves.init = function (options) {
+ var body = document.body
+ 'duration' in (options = options || {}) && (Effect.duration = options.duration),
+ 'delay' in options && (Effect.delay = options.delay),
+ isTouchAvailable &&
+ (body.addEventListener('touchstart', showEffect, !1),
+ body.addEventListener('touchcancel', TouchHandler.registerEvent, !1),
+ body.addEventListener('touchend', TouchHandler.registerEvent, !1)),
+ body.addEventListener('mousedown', showEffect, !1)
+ }),
+ (Waves.attach = function (elements, classes) {
+ var element, tagName
+ ;(elements = getWavesElements(elements)),
+ '[object Array]' === toString.call(classes) && (classes = classes.join(' ')),
+ (classes = classes ? ' ' + classes : '')
+ for (var i = 0, len = elements.length; i < len; i++)
+ (tagName = (element = elements[i]).tagName.toLowerCase()),
+ -1 !== ['input', 'img'].indexOf(tagName) &&
+ (TagWrapper[tagName](element), (element = element.parentElement)),
+ -1 === element.className.indexOf('waves-effect') && (element.className += ' waves-effect' + classes)
+ }),
+ (Waves.ripple = function (elements, options) {
+ var elementsLen = (elements = getWavesElements(elements)).length
+ if (
+ (((options = options || {}).wait = options.wait || 0),
+ (options.position = options.position || null),
+ elementsLen)
+ )
+ for (
+ var element,
+ pos,
+ off,
+ centre = {},
+ i = 0,
+ mousedown = { type: 'mousedown', button: 1 },
+ hideRipple = function (mouseup, element) {
+ return function () {
+ Effect.hide(mouseup, element)
+ }
+ };
+ i < elementsLen;
+ i++
+ )
+ if (
+ ((element = elements[i]),
+ (pos = options.position || { x: element.clientWidth / 2, y: element.clientHeight / 2 }),
+ (off = offset(element)),
+ (centre.x = off.left + pos.x),
+ (centre.y = off.top + pos.y),
+ (mousedown.pageX = centre.x),
+ (mousedown.pageY = centre.y),
+ Effect.show(mousedown, element),
+ options.wait >= 0 && null !== options.wait)
+ ) {
+ setTimeout(hideRipple({ type: 'mouseup', button: 1 }, element), options.wait)
+ }
+ }),
+ (Waves.calm = function (elements) {
+ for (
+ var mouseup = { type: 'mouseup', button: 1 }, i = 0, len = (elements = getWavesElements(elements)).length;
+ i < len;
+ i++
+ )
+ Effect.hide(mouseup, elements[i])
+ }),
+ (Waves.displayEffect = function (options) {
+ console.error(
+ 'Waves.displayEffect() has been deprecated and will be removed in future version. Please use Waves.init() to initialize Waves effect'
+ ),
+ Waves.init(options)
+ }),
+ Waves
+ )
+ })
+ }.call(this, __webpack_require__(6)))
+ },
+ function (module, exports, __webpack_require__) {
+ module.exports &&
+ (module.exports = {
+ admin: { id: 'admin', name: 'Administrator', description: 'Administrators', allowedAction: ['*'] },
+ mod: {
+ id: 'mod',
+ name: 'Moderator',
+ description: 'Moderators',
+ allowedAction: [
+ 'mod:*',
+ 'dashboard:*',
+ 'ticket:create edit view attachment removeAttachment',
+ 'comment:*',
+ 'notes:*',
+ 'reports:view'
+ ]
+ },
+ support: {
+ id: 'support',
+ name: 'Support',
+ description: 'Support User',
+ allowedAction: [
+ 'ticket:*',
+ 'dashboard:*',
+ 'accounts:create edit view delete',
+ 'comment:editSelf create delete',
+ 'notes:create view',
+ 'reports:view',
+ 'notices:*'
+ ]
+ },
+ user: {
+ id: 'user',
+ name: 'User',
+ description: 'User',
+ allowedAction: ['ticket:create editSelf attachment', 'comment:create editSelf']
+ }
+ })
+ },
+ function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__
+ /*!
+ * JavaScript Cookie v2.1.4
+ * https://github.com/js-cookie/js-cookie
+ *
+ * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
+ * Released under the MIT license
+ */ !(function (factory) {
+ if (
+ (void 0 ===
+ (__WEBPACK_AMD_DEFINE_RESULT__ =
+ 'function' == typeof (__WEBPACK_AMD_DEFINE_FACTORY__ = factory)
+ ? __WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)
+ : __WEBPACK_AMD_DEFINE_FACTORY__) || (module.exports = __WEBPACK_AMD_DEFINE_RESULT__),
+ !0,
+ (module.exports = factory()),
+ !!0)
+ ) {
+ var OldCookies = window.Cookies,
+ api = (window.Cookies = factory())
+ api.noConflict = function () {
+ return (window.Cookies = OldCookies), api
+ }
+ }
+ })(function () {
+ function extend () {
+ for (var i = 0, result = {}; i < arguments.length; i++) {
+ var attributes = arguments[i]
+ for (var key in attributes) result[key] = attributes[key]
+ }
+ return result
+ }
+ return (function init (converter) {
+ function api (key, value, attributes) {
+ var result
+ if ('undefined' != typeof document) {
+ if (arguments.length > 1) {
+ if ('number' == typeof (attributes = extend({ path: '/' }, api.defaults, attributes)).expires) {
+ var expires = new Date()
+ expires.setMilliseconds(expires.getMilliseconds() + 864e5 * attributes.expires),
+ (attributes.expires = expires)
+ }
+ attributes.expires = attributes.expires ? attributes.expires.toUTCString() : ''
+ try {
+ ;(result = JSON.stringify(value)), /^[\{\[]/.test(result) && (value = result)
+ } catch (e) {}
+ ;(value = converter.write
+ ? converter.write(value, key)
+ : encodeURIComponent(String(value)).replace(
+ /%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,
+ decodeURIComponent
+ )),
+ (key = (key = (key = encodeURIComponent(String(key))).replace(
+ /%(23|24|26|2B|5E|60|7C)/g,
+ decodeURIComponent
+ )).replace(/[\(\)]/g, escape))
+ var stringifiedAttributes = ''
+ for (var attributeName in attributes)
+ attributes[attributeName] &&
+ ((stringifiedAttributes += '; ' + attributeName),
+ !0 !== attributes[attributeName] && (stringifiedAttributes += '=' + attributes[attributeName]))
+ return (document.cookie = key + '=' + value + stringifiedAttributes)
+ }
+ key || (result = {})
+ for (
+ var cookies = document.cookie ? document.cookie.split('; ') : [], rdecode = /(%[0-9A-Z]{2})+/g, i = 0;
+ i < cookies.length;
+ i++
+ ) {
+ var parts = cookies[i].split('='),
+ cookie = parts.slice(1).join('=')
+ '"' === cookie.charAt(0) && (cookie = cookie.slice(1, -1))
+ try {
+ var name = parts[0].replace(rdecode, decodeURIComponent)
+ if (
+ ((cookie = converter.read
+ ? converter.read(cookie, name)
+ : converter(cookie, name) || cookie.replace(rdecode, decodeURIComponent)),
+ this.json)
+ )
+ try {
+ cookie = JSON.parse(cookie)
+ } catch (e) {}
+ if (key === name) {
+ result = cookie
+ break
+ }
+ key || (result[name] = cookie)
+ } catch (e) {}
+ }
+ return result
+ }
+ }
+ return (
+ (api.set = api),
+ (api.get = function (key) {
+ return api.call(api, key)
+ }),
+ (api.getJSON = function () {
+ return api.apply({ json: !0 }, [].slice.call(arguments))
+ }),
+ (api.defaults = {}),
+ (api.remove = function (key, attributes) {
+ api(key, '', extend(attributes, { expires: -1 }))
+ }),
+ (api.withConverter = init),
+ api
+ )
+ })(function () {})
+ })
+ },
+ function (module, exports) {
+ var cachedSetTimeout,
+ cachedClearTimeout,
+ process = (module.exports = {})
+ function defaultSetTimout () {
+ throw new Error('setTimeout has not been defined')
+ }
+ function defaultClearTimeout () {
+ throw new Error('clearTimeout has not been defined')
+ }
+ function runTimeout (fun) {
+ if (cachedSetTimeout === setTimeout) return setTimeout(fun, 0)
+ if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout)
+ return (cachedSetTimeout = setTimeout), setTimeout(fun, 0)
+ try {
+ return cachedSetTimeout(fun, 0)
+ } catch (e) {
+ try {
+ return cachedSetTimeout.call(null, fun, 0)
+ } catch (e) {
+ return cachedSetTimeout.call(this, fun, 0)
+ }
+ }
+ }
+ !(function () {
+ try {
+ cachedSetTimeout = 'function' == typeof setTimeout ? setTimeout : defaultSetTimout
+ } catch (e) {
+ cachedSetTimeout = defaultSetTimout
+ }
+ try {
+ cachedClearTimeout = 'function' == typeof clearTimeout ? clearTimeout : defaultClearTimeout
+ } catch (e) {
+ cachedClearTimeout = defaultClearTimeout
+ }
+ })()
+ var currentQueue,
+ queue = [],
+ draining = !1,
+ queueIndex = -1
+ function cleanUpNextTick () {
+ draining &&
+ currentQueue &&
+ ((draining = !1),
+ currentQueue.length ? (queue = currentQueue.concat(queue)) : (queueIndex = -1),
+ queue.length && drainQueue())
+ }
+ function drainQueue () {
+ if (!draining) {
+ var timeout = runTimeout(cleanUpNextTick)
+ draining = !0
+ for (var len = queue.length; len; ) {
+ for (currentQueue = queue, queue = []; ++queueIndex < len; ) currentQueue && currentQueue[queueIndex].run()
+ ;(queueIndex = -1), (len = queue.length)
+ }
+ ;(currentQueue = null),
+ (draining = !1),
+ (function (marker) {
+ if (cachedClearTimeout === clearTimeout) return clearTimeout(marker)
+ if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout)
+ return (cachedClearTimeout = clearTimeout), clearTimeout(marker)
+ try {
+ cachedClearTimeout(marker)
+ } catch (e) {
+ try {
+ return cachedClearTimeout.call(null, marker)
+ } catch (e) {
+ return cachedClearTimeout.call(this, marker)
+ }
+ }
+ })(timeout)
+ }
+ }
+ function Item (fun, array) {
+ ;(this.fun = fun), (this.array = array)
+ }
+ function noop () {}
+ ;(process.nextTick = function (fun) {
+ var args = new Array(arguments.length - 1)
+ if (arguments.length > 1) for (var i = 1; i < arguments.length; i++) args[i - 1] = arguments[i]
+ queue.push(new Item(fun, args)), 1 !== queue.length || draining || runTimeout(drainQueue)
+ }),
+ (Item.prototype.run = function () {
+ this.fun.apply(null, this.array)
+ }),
+ (process.title = 'browser'),
+ (process.browser = !0),
+ (process.env = {}),
+ (process.argv = []),
+ (process.version = ''),
+ (process.versions = {}),
+ (process.on = noop),
+ (process.addListener = noop),
+ (process.once = noop),
+ (process.off = noop),
+ (process.removeListener = noop),
+ (process.removeAllListeners = noop),
+ (process.emit = noop),
+ (process.prependListener = noop),
+ (process.prependOnceListener = noop),
+ (process.listeners = function (name) {
+ return []
+ }),
+ (process.binding = function (name) {
+ throw new Error('process.binding is not supported')
+ }),
+ (process.cwd = function () {
+ return '/'
+ }),
+ (process.chdir = function (dir) {
+ throw new Error('process.chdir is not supported')
+ }),
+ (process.umask = function () {
+ return 0
+ })
+ },
+ ,
+ function (module, exports, __webpack_require__) {
+ ;(function (global) {
+ module.exports = global.truRequire = __webpack_require__(36)
+ }.call(this, __webpack_require__(6)))
+ },
+ function (module, exports, __webpack_require__) {
+ var allMods = {
+ jquery: function () {
+ return __webpack_require__(0)
+ },
+ snackbar: function () {
+ return __webpack_require__(11)
+ },
+ underscore: function () {
+ return __webpack_require__(1)
+ },
+ helpers: function () {
+ return __webpack_require__(8)
+ },
+ datatables: function () {
+ return __webpack_require__(2)
+ },
+ dt_ipaddress: function () {
+ return __webpack_require__(13)
+ },
+ dt_scroller: function () {
+ return __webpack_require__(16)
+ },
+ uikit: function () {
+ return __webpack_require__(4)
+ }
+ }
+ module.exports = function (modules, cb) {
+ cb(
+ modules.map(function (x) {
+ return allMods[x]()
+ })
+ )
+ }
+ }
+])
diff --git a/public/js/trudesk.min.js b/public/js/trudesk.min.js
new file mode 100644
index 000000000..5874a0938
--- /dev/null
+++ b/public/js/trudesk.min.js
@@ -0,0 +1,210 @@
+!(function (modules) {
+ function webpackJsonpCallback (data) {
+ for (
+ var moduleId, chunkId, chunkIds = data[0], moreModules = data[1], i = 0, resolves = [];
+ i < chunkIds.length;
+ i++
+ )
+ (chunkId = chunkIds[i]),
+ installedChunks[chunkId] && resolves.push(installedChunks[chunkId][0]),
+ (installedChunks[chunkId] = 0)
+ for (moduleId in moreModules)
+ Object.prototype.hasOwnProperty.call(moreModules, moduleId) && (modules[moduleId] = moreModules[moduleId])
+ for (parentJsonpFunction && parentJsonpFunction(data); resolves.length; ) resolves.shift()()
+ }
+ var installedModules = {},
+ installedChunks = { 3: 0 }
+ function __webpack_require__ (moduleId) {
+ if (installedModules[moduleId]) return installedModules[moduleId].exports
+ var module = (installedModules[moduleId] = { i: moduleId, l: !1, exports: {} })
+ return (
+ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__),
+ (module.l = !0),
+ module.exports
+ )
+ }
+ ;(__webpack_require__.e = function (chunkId) {
+ var promises = [],
+ installedChunkData = installedChunks[chunkId]
+ if (0 !== installedChunkData)
+ if (installedChunkData) promises.push(installedChunkData[2])
+ else {
+ var promise = new Promise(function (resolve, reject) {
+ installedChunkData = installedChunks[chunkId] = [resolve, reject]
+ })
+ promises.push((installedChunkData[2] = promise))
+ var onScriptComplete,
+ script = document.createElement('script')
+ ;(script.charset = 'utf-8'),
+ (script.timeout = 120),
+ __webpack_require__.nc && script.setAttribute('nonce', __webpack_require__.nc),
+ (script.src = (function (chunkId) {
+ return __webpack_require__.p + '' + ({}[chunkId] || chunkId) + '.js'
+ })(chunkId)),
+ (onScriptComplete = function (event) {
+ ;(script.onerror = script.onload = null), clearTimeout(timeout)
+ var chunk = installedChunks[chunkId]
+ if (0 !== chunk) {
+ if (chunk) {
+ var errorType = event && ('load' === event.type ? 'missing' : event.type),
+ realSrc = event && event.target && event.target.src,
+ error = new Error('Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')')
+ ;(error.type = errorType), (error.request = realSrc), chunk[1](error)
+ }
+ installedChunks[chunkId] = void 0
+ }
+ })
+ var timeout = setTimeout(function () {
+ onScriptComplete({ type: 'timeout', target: script })
+ }, 12e4)
+ ;(script.onerror = script.onload = onScriptComplete), document.head.appendChild(script)
+ }
+ return Promise.all(promises)
+ }),
+ (__webpack_require__.m = modules),
+ (__webpack_require__.c = installedModules),
+ (__webpack_require__.d = function (exports, name, getter) {
+ __webpack_require__.o(exports, name) || Object.defineProperty(exports, name, { enumerable: !0, get: getter })
+ }),
+ (__webpack_require__.r = function (exports) {
+ 'undefined' != typeof Symbol &&
+ Symbol.toStringTag &&
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }),
+ Object.defineProperty(exports, '__esModule', { value: !0 })
+ }),
+ (__webpack_require__.t = function (value, mode) {
+ if ((1 & mode && (value = __webpack_require__(value)), 8 & mode)) return value
+ if (4 & mode && 'object' == typeof value && value && value.__esModule) return value
+ var ns = Object.create(null)
+ if (
+ (__webpack_require__.r(ns),
+ Object.defineProperty(ns, 'default', { enumerable: !0, value }),
+ 2 & mode && 'string' != typeof value)
+ )
+ for (var key in value)
+ __webpack_require__.d(
+ ns,
+ key,
+ function (key) {
+ return value[key]
+ }.bind(null, key)
+ )
+ return ns
+ }),
+ (__webpack_require__.n = function (module) {
+ var getter =
+ module && module.__esModule
+ ? function () {
+ return module.default
+ }
+ : function () {
+ return module
+ }
+ return __webpack_require__.d(getter, 'a', getter), getter
+ }),
+ (__webpack_require__.o = function (object, property) {
+ return Object.prototype.hasOwnProperty.call(object, property)
+ }),
+ (__webpack_require__.p = '/js/'),
+ (__webpack_require__.oe = function (err) {
+ throw (console.error(err), err)
+ })
+ var jsonpArray = (window.webpackJsonp = window.webpackJsonp || []),
+ oldJsonpFunction = jsonpArray.push.bind(jsonpArray)
+ ;(jsonpArray.push = webpackJsonpCallback), (jsonpArray = jsonpArray.slice())
+ for (var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i])
+ var parentJsonpFunction = oldJsonpFunction
+ __webpack_require__((__webpack_require__.s = 34))
+})({
+ 34: function (module, exports, __webpack_require__) {
+ __webpack_require__
+ .e(1)
+ .then(function () {
+ var __WEBPACK_AMD_REQUIRE_ARRAY__ = [
+ __webpack_require__(0),
+ __webpack_require__(8),
+ __webpack_require__(9),
+ __webpack_require__(7),
+ __webpack_require__(39)
+ ]
+ ;(function ($, helpers, angular, async) {
+ helpers.init(),
+ angular.element(document).ready(function () {
+ async.parallel(
+ [
+ function (done) {
+ angular
+ .injector(['ng', 'trudesk.services.session'])
+ .get('SessionService')
+ .init(done)
+ },
+ function (done) {
+ angular
+ .injector(['ng', 'trudesk.services.settings'])
+ .get('SettingsService')
+ .init(done)
+ }
+ ],
+ function (err) {
+ if (err) throw new Error(err)
+ __webpack_require__
+ .e(5)
+ .then(function () {
+ var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(41)]
+ ;(function () {
+ angular.bootstrap($('.top-bar'), ['trudesk']),
+ angular.bootstrap($('#ticketFilterModal'), ['trudesk']),
+ angular.bootstrap($('#ticketCreateModal'), ['trudesk']),
+ angular.bootstrap($('#page-content'), ['trudesk']),
+ __webpack_require__
+ .e(7)
+ .then(function () {
+ var __WEBPACK_AMD_REQUIRE_ARRAY__ = [
+ __webpack_require__(1),
+ __webpack_require__(38),
+ __webpack_require__(37),
+ __webpack_require__(4),
+ __webpack_require__(42),
+ __webpack_require__(3),
+ __webpack_require__(43),
+ __webpack_require__(44),
+ __webpack_require__(45),
+ __webpack_require__(12),
+ __webpack_require__(46)
+ ]
+ ;(function (_, nav, socket) {
+ Promise.resolve()
+ .then(function () {
+ var __WEBPACK_AMD_REQUIRE_ARRAY__ = [__webpack_require__(40)]
+ ;(function (pl) {
+ pl.init(function () {
+ nav.init(),
+ _.debounce(function () {
+ helpers.hideLoader(1e3), helpers.countUpMe(), helpers.UI.cardShow()
+ $(document).idleTimer(3e5),
+ $(document).on('idle.idleTimer', function () {
+ socket.chat.setUserIdle()
+ }),
+ $(document).on('active.idleTimer', function () {
+ socket.chat.setUserActive()
+ }),
+ $.event.trigger('$trudesk:ready', window)
+ }, 100)()
+ })
+ }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__))
+ })
+ .catch(__webpack_require__.oe)
+ }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__))
+ })
+ .catch(__webpack_require__.oe)
+ }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__))
+ })
+ .catch(__webpack_require__.oe)
+ }
+ )
+ })
+ }.apply(null, __WEBPACK_AMD_REQUIRE_ARRAY__))
+ })
+ .catch(__webpack_require__.oe)
+ }
+})
diff --git a/public/js/vendor.js b/public/js/vendor.js
new file mode 100644
index 000000000..e61716825
--- /dev/null
+++ b/public/js/vendor.js
@@ -0,0 +1,21518 @@
+;(window.webpackJsonp = window.webpackJsonp || []).push([
+ [4],
+ {
+ 0: function (module, exports, __webpack_require__) {
+ var __WEBPACK_AMD_DEFINE_RESULT__, global, factory
+ /*!
+ * jQuery JavaScript Library v2.2.4
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2016-05-20T17:23Z
+ */
+ /*!
+ * jQuery JavaScript Library v2.2.4
+ * http://jquery.com/
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2016-05-20T17:23Z
+ */
+ ;(global = 'undefined' != typeof window ? window : this),
+ (factory = function (window, noGlobal) {
+ var arr = [],
+ document = window.document,
+ slice = arr.slice,
+ concat = arr.concat,
+ push = arr.push,
+ indexOf = arr.indexOf,
+ class2type = {},
+ toString = class2type.toString,
+ hasOwn = class2type.hasOwnProperty,
+ support = {},
+ jQuery = function (selector, context) {
+ return new jQuery.fn.init(selector, context)
+ },
+ rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
+ rmsPrefix = /^-ms-/,
+ rdashAlpha = /-([\da-z])/gi,
+ fcamelCase = function (all, letter) {
+ return letter.toUpperCase()
+ }
+ function isArrayLike (obj) {
+ var length = !!obj && 'length' in obj && obj.length,
+ type = jQuery.type(obj)
+ return (
+ 'function' !== type &&
+ !jQuery.isWindow(obj) &&
+ ('array' === type || 0 === length || ('number' == typeof length && length > 0 && length - 1 in obj))
+ )
+ }
+ ;(jQuery.fn = jQuery.prototype = {
+ jquery: '2.2.4',
+ constructor: jQuery,
+ selector: '',
+ length: 0,
+ toArray: function () {
+ return slice.call(this)
+ },
+ get: function (num) {
+ return null != num ? (num < 0 ? this[num + this.length] : this[num]) : slice.call(this)
+ },
+ pushStack: function (elems) {
+ var ret = jQuery.merge(this.constructor(), elems)
+ return (ret.prevObject = this), (ret.context = this.context), ret
+ },
+ each: function (callback) {
+ return jQuery.each(this, callback)
+ },
+ map: function (callback) {
+ return this.pushStack(
+ jQuery.map(this, function (elem, i) {
+ return callback.call(elem, i, elem)
+ })
+ )
+ },
+ slice: function () {
+ return this.pushStack(slice.apply(this, arguments))
+ },
+ first: function () {
+ return this.eq(0)
+ },
+ last: function () {
+ return this.eq(-1)
+ },
+ eq: function (i) {
+ var len = this.length,
+ j = +i + (i < 0 ? len : 0)
+ return this.pushStack(j >= 0 && j < len ? [this[j]] : [])
+ },
+ end: function () {
+ return this.prevObject || this.constructor()
+ },
+ push,
+ sort: arr.sort,
+ splice: arr.splice
+ }),
+ (jQuery.extend = jQuery.fn.extend = function () {
+ var options,
+ name,
+ src,
+ copy,
+ copyIsArray,
+ clone,
+ target = arguments[0] || {},
+ i = 1,
+ length = arguments.length,
+ deep = !1
+ for (
+ 'boolean' == typeof target && ((deep = target), (target = arguments[i] || {}), i++),
+ 'object' == typeof target || jQuery.isFunction(target) || (target = {}),
+ i === length && ((target = this), i--);
+ i < length;
+ i++
+ )
+ if (null != (options = arguments[i]))
+ for (name in options)
+ (src = target[name]),
+ target !== (copy = options[name]) &&
+ (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)))
+ ? (copyIsArray
+ ? ((copyIsArray = !1), (clone = src && jQuery.isArray(src) ? src : []))
+ : (clone = src && jQuery.isPlainObject(src) ? src : {}),
+ (target[name] = jQuery.extend(deep, clone, copy)))
+ : void 0 !== copy && (target[name] = copy))
+ return target
+ }),
+ jQuery.extend({
+ expando: 'jQuery' + ('2.2.4' + Math.random()).replace(/\D/g, ''),
+ isReady: !0,
+ error: function (msg) {
+ throw new Error(msg)
+ },
+ noop: function () {},
+ isFunction: function (obj) {
+ return 'function' === jQuery.type(obj)
+ },
+ isArray: Array.isArray,
+ isWindow: function (obj) {
+ return null != obj && obj === obj.window
+ },
+ isNumeric: function (obj) {
+ var realStringObj = obj && obj.toString()
+ return !jQuery.isArray(obj) && realStringObj - parseFloat(realStringObj) + 1 >= 0
+ },
+ isPlainObject: function (obj) {
+ var key
+ if ('object' !== jQuery.type(obj) || obj.nodeType || jQuery.isWindow(obj)) return !1
+ if (
+ obj.constructor &&
+ !hasOwn.call(obj, 'constructor') &&
+ !hasOwn.call(obj.constructor.prototype || {}, 'isPrototypeOf')
+ )
+ return !1
+ for (key in obj);
+ return void 0 === key || hasOwn.call(obj, key)
+ },
+ isEmptyObject: function (obj) {
+ var name
+ for (name in obj) return !1
+ return !0
+ },
+ type: function (obj) {
+ return null == obj
+ ? obj + ''
+ : 'object' == typeof obj || 'function' == typeof obj
+ ? class2type[toString.call(obj)] || 'object'
+ : typeof obj
+ },
+ globalEval: function (code) {
+ var script,
+ indirect = eval
+ ;(code = jQuery.trim(code)) &&
+ (1 === code.indexOf('use strict')
+ ? (((script = document.createElement('script')).text = code),
+ document.head.appendChild(script).parentNode.removeChild(script))
+ : indirect(code))
+ },
+ camelCase: function (string) {
+ return string.replace(rmsPrefix, 'ms-').replace(rdashAlpha, fcamelCase)
+ },
+ nodeName: function (elem, name) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase()
+ },
+ each: function (obj, callback) {
+ var length,
+ i = 0
+ if (isArrayLike(obj))
+ for (length = obj.length; i < length && !1 !== callback.call(obj[i], i, obj[i]); i++);
+ else for (i in obj) if (!1 === callback.call(obj[i], i, obj[i])) break
+ return obj
+ },
+ trim: function (text) {
+ return null == text ? '' : (text + '').replace(rtrim, '')
+ },
+ makeArray: function (arr, results) {
+ var ret = results || []
+ return (
+ null != arr &&
+ (isArrayLike(Object(arr))
+ ? jQuery.merge(ret, 'string' == typeof arr ? [arr] : arr)
+ : push.call(ret, arr)),
+ ret
+ )
+ },
+ inArray: function (elem, arr, i) {
+ return null == arr ? -1 : indexOf.call(arr, elem, i)
+ },
+ merge: function (first, second) {
+ for (var len = +second.length, j = 0, i = first.length; j < len; j++) first[i++] = second[j]
+ return (first.length = i), first
+ },
+ grep: function (elems, callback, invert) {
+ for (var matches = [], i = 0, length = elems.length, callbackExpect = !invert; i < length; i++)
+ !callback(elems[i], i) !== callbackExpect && matches.push(elems[i])
+ return matches
+ },
+ map: function (elems, callback, arg) {
+ var length,
+ value,
+ i = 0,
+ ret = []
+ if (isArrayLike(elems))
+ for (length = elems.length; i < length; i++)
+ null != (value = callback(elems[i], i, arg)) && ret.push(value)
+ else for (i in elems) null != (value = callback(elems[i], i, arg)) && ret.push(value)
+ return concat.apply([], ret)
+ },
+ guid: 1,
+ proxy: function (fn, context) {
+ var tmp, args, proxy
+ if (
+ ('string' == typeof context && ((tmp = fn[context]), (context = fn), (fn = tmp)),
+ jQuery.isFunction(fn))
+ )
+ return (
+ (args = slice.call(arguments, 2)),
+ ((proxy = function () {
+ return fn.apply(context || this, args.concat(slice.call(arguments)))
+ }).guid = fn.guid = fn.guid || jQuery.guid++),
+ proxy
+ )
+ },
+ now: Date.now,
+ support
+ }),
+ 'function' == typeof Symbol && (jQuery.fn[Symbol.iterator] = arr[Symbol.iterator]),
+ jQuery.each('Boolean Number String Function Array Date RegExp Object Error Symbol'.split(' '), function (
+ i,
+ name
+ ) {
+ class2type['[object ' + name + ']'] = name.toLowerCase()
+ })
+ var Sizzle =
+ /*!
+ * Sizzle CSS Selector Engine v2.2.1
+ * http://sizzlejs.com/
+ *
+ * Copyright jQuery Foundation and other contributors
+ * Released under the MIT license
+ * http://jquery.org/license
+ *
+ * Date: 2015-10-17
+ */
+ (function (window) {
+ var i,
+ support,
+ Expr,
+ getText,
+ isXML,
+ tokenize,
+ compile,
+ select,
+ outermostContext,
+ sortInput,
+ hasDuplicate,
+ setDocument,
+ document,
+ docElem,
+ documentIsHTML,
+ rbuggyQSA,
+ rbuggyMatches,
+ matches,
+ contains,
+ expando = 'sizzle' + 1 * new Date(),
+ preferredDoc = window.document,
+ dirruns = 0,
+ done = 0,
+ classCache = createCache(),
+ tokenCache = createCache(),
+ compilerCache = createCache(),
+ sortOrder = function (a, b) {
+ return a === b && (hasDuplicate = !0), 0
+ },
+ MAX_NEGATIVE = 1 << 31,
+ hasOwn = {}.hasOwnProperty,
+ arr = [],
+ pop = arr.pop,
+ push_native = arr.push,
+ push = arr.push,
+ slice = arr.slice,
+ indexOf = function (list, elem) {
+ for (var i = 0, len = list.length; i < len; i++) if (list[i] === elem) return i
+ return -1
+ },
+ booleans =
+ 'checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped',
+ whitespace = '[\\x20\\t\\r\\n\\f]',
+ identifier = '(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+',
+ attributes =
+ '\\[' +
+ whitespace +
+ '*(' +
+ identifier +
+ ')(?:' +
+ whitespace +
+ '*([*^$|!~]?=)' +
+ whitespace +
+ '*(?:\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)"|(' +
+ identifier +
+ '))|)' +
+ whitespace +
+ '*\\]',
+ pseudos =
+ ':(' +
+ identifier +
+ ')(?:\\(((\'((?:\\\\.|[^\\\\\'])*)\'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|' +
+ attributes +
+ ')*)|.*)\\)|)',
+ rwhitespace = new RegExp(whitespace + '+', 'g'),
+ rtrim = new RegExp('^' + whitespace + '+|((?:^|[^\\\\])(?:\\\\.)*)' + whitespace + '+$', 'g'),
+ rcomma = new RegExp('^' + whitespace + '*,' + whitespace + '*'),
+ rcombinators = new RegExp('^' + whitespace + '*([>+~]|' + whitespace + ')' + whitespace + '*'),
+ rattributeQuotes = new RegExp('=' + whitespace + '*([^\\]\'"]*?)' + whitespace + '*\\]', 'g'),
+ rpseudo = new RegExp(pseudos),
+ ridentifier = new RegExp('^' + identifier + '$'),
+ matchExpr = {
+ ID: new RegExp('^#(' + identifier + ')'),
+ CLASS: new RegExp('^\\.(' + identifier + ')'),
+ TAG: new RegExp('^(' + identifier + '|[*])'),
+ ATTR: new RegExp('^' + attributes),
+ PSEUDO: new RegExp('^' + pseudos),
+ CHILD: new RegExp(
+ '^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(' +
+ whitespace +
+ '*(even|odd|(([+-]|)(\\d*)n|)' +
+ whitespace +
+ '*(?:([+-]|)' +
+ whitespace +
+ '*(\\d+)|))' +
+ whitespace +
+ '*\\)|)',
+ 'i'
+ ),
+ bool: new RegExp('^(?:' + booleans + ')$', 'i'),
+ needsContext: new RegExp(
+ '^' +
+ whitespace +
+ '*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(' +
+ whitespace +
+ '*((?:-\\d)?\\d*)' +
+ whitespace +
+ '*\\)|)(?=[^-]|$)',
+ 'i'
+ )
+ },
+ rinputs = /^(?:input|select|textarea|button)$/i,
+ rheader = /^h\d$/i,
+ rnative = /^[^{]+\{\s*\[native \w/,
+ rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
+ rsibling = /[+~]/,
+ rescape = /'|\\/g,
+ runescape = new RegExp('\\\\([\\da-f]{1,6}' + whitespace + '?|(' + whitespace + ')|.)', 'ig'),
+ funescape = function (_, escaped, escapedWhitespace) {
+ var high = '0x' + escaped - 65536
+ return high != high || escapedWhitespace
+ ? escaped
+ : high < 0
+ ? String.fromCharCode(high + 65536)
+ : String.fromCharCode((high >> 10) | 55296, (1023 & high) | 56320)
+ },
+ unloadHandler = function () {
+ setDocument()
+ }
+ try {
+ push.apply((arr = slice.call(preferredDoc.childNodes)), preferredDoc.childNodes),
+ arr[preferredDoc.childNodes.length].nodeType
+ } catch (e) {
+ push = {
+ apply: arr.length
+ ? function (target, els) {
+ push_native.apply(target, slice.call(els))
+ }
+ : function (target, els) {
+ for (var j = target.length, i = 0; (target[j++] = els[i++]); );
+ target.length = j - 1
+ }
+ }
+ }
+ function Sizzle (selector, context, results, seed) {
+ var m,
+ i,
+ elem,
+ nid,
+ nidselect,
+ match,
+ groups,
+ newSelector,
+ newContext = context && context.ownerDocument,
+ nodeType = context ? context.nodeType : 9
+ if (
+ ((results = results || []),
+ 'string' != typeof selector || !selector || (1 !== nodeType && 9 !== nodeType && 11 !== nodeType))
+ )
+ return results
+ if (
+ !seed &&
+ ((context ? context.ownerDocument || context : preferredDoc) !== document && setDocument(context),
+ (context = context || document),
+ documentIsHTML)
+ ) {
+ if (11 !== nodeType && (match = rquickExpr.exec(selector)))
+ if ((m = match[1])) {
+ if (9 === nodeType) {
+ if (!(elem = context.getElementById(m))) return results
+ if (elem.id === m) return results.push(elem), results
+ } else if (
+ newContext &&
+ (elem = newContext.getElementById(m)) &&
+ contains(context, elem) &&
+ elem.id === m
+ )
+ return results.push(elem), results
+ } else {
+ if (match[2]) return push.apply(results, context.getElementsByTagName(selector)), results
+ if ((m = match[3]) && support.getElementsByClassName && context.getElementsByClassName)
+ return push.apply(results, context.getElementsByClassName(m)), results
+ }
+ if (support.qsa && !compilerCache[selector + ' '] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
+ if (1 !== nodeType) (newContext = context), (newSelector = selector)
+ else if ('object' !== context.nodeName.toLowerCase()) {
+ for (
+ (nid = context.getAttribute('id'))
+ ? (nid = nid.replace(rescape, '\\$&'))
+ : context.setAttribute('id', (nid = expando)),
+ i = (groups = tokenize(selector)).length,
+ nidselect = ridentifier.test(nid) ? '#' + nid : "[id='" + nid + "']";
+ i--;
+
+ )
+ groups[i] = nidselect + ' ' + toSelector(groups[i])
+ ;(newSelector = groups.join(',')),
+ (newContext = (rsibling.test(selector) && testContext(context.parentNode)) || context)
+ }
+ if (newSelector)
+ try {
+ return push.apply(results, newContext.querySelectorAll(newSelector)), results
+ } catch (qsaError) {
+ } finally {
+ nid === expando && context.removeAttribute('id')
+ }
+ }
+ }
+ return select(selector.replace(rtrim, '$1'), context, results, seed)
+ }
+ function createCache () {
+ var keys = []
+ return function cache (key, value) {
+ return (
+ keys.push(key + ' ') > Expr.cacheLength && delete cache[keys.shift()], (cache[key + ' '] = value)
+ )
+ }
+ }
+ function markFunction (fn) {
+ return (fn[expando] = !0), fn
+ }
+ function assert (fn) {
+ var div = document.createElement('div')
+ try {
+ return !!fn(div)
+ } catch (e) {
+ return !1
+ } finally {
+ div.parentNode && div.parentNode.removeChild(div), (div = null)
+ }
+ }
+ function addHandle (attrs, handler) {
+ for (var arr = attrs.split('|'), i = arr.length; i--; ) Expr.attrHandle[arr[i]] = handler
+ }
+ function siblingCheck (a, b) {
+ var cur = b && a,
+ diff =
+ cur &&
+ 1 === a.nodeType &&
+ 1 === b.nodeType &&
+ (~b.sourceIndex || MAX_NEGATIVE) - (~a.sourceIndex || MAX_NEGATIVE)
+ if (diff) return diff
+ if (cur) for (; (cur = cur.nextSibling); ) if (cur === b) return -1
+ return a ? 1 : -1
+ }
+ function createInputPseudo (type) {
+ return function (elem) {
+ return 'input' === elem.nodeName.toLowerCase() && elem.type === type
+ }
+ }
+ function createButtonPseudo (type) {
+ return function (elem) {
+ var name = elem.nodeName.toLowerCase()
+ return ('input' === name || 'button' === name) && elem.type === type
+ }
+ }
+ function createPositionalPseudo (fn) {
+ return markFunction(function (argument) {
+ return (
+ (argument = +argument),
+ markFunction(function (seed, matches) {
+ for (var j, matchIndexes = fn([], seed.length, argument), i = matchIndexes.length; i--; )
+ seed[(j = matchIndexes[i])] && (seed[j] = !(matches[j] = seed[j]))
+ })
+ )
+ })
+ }
+ function testContext (context) {
+ return context && void 0 !== context.getElementsByTagName && context
+ }
+ for (i in ((support = Sizzle.support = {}),
+ (isXML = Sizzle.isXML = function (elem) {
+ var documentElement = elem && (elem.ownerDocument || elem).documentElement
+ return !!documentElement && 'HTML' !== documentElement.nodeName
+ }),
+ (setDocument = Sizzle.setDocument = function (node) {
+ var hasCompare,
+ parent,
+ doc = node ? node.ownerDocument || node : preferredDoc
+ return doc !== document && 9 === doc.nodeType && doc.documentElement
+ ? ((docElem = (document = doc).documentElement),
+ (documentIsHTML = !isXML(document)),
+ (parent = document.defaultView) &&
+ parent.top !== parent &&
+ (parent.addEventListener
+ ? parent.addEventListener('unload', unloadHandler, !1)
+ : parent.attachEvent && parent.attachEvent('onunload', unloadHandler)),
+ (support.attributes = assert(function (div) {
+ return (div.className = 'i'), !div.getAttribute('className')
+ })),
+ (support.getElementsByTagName = assert(function (div) {
+ return div.appendChild(document.createComment('')), !div.getElementsByTagName('*').length
+ })),
+ (support.getElementsByClassName = rnative.test(document.getElementsByClassName)),
+ (support.getById = assert(function (div) {
+ return (
+ (docElem.appendChild(div).id = expando),
+ !document.getElementsByName || !document.getElementsByName(expando).length
+ )
+ })),
+ support.getById
+ ? ((Expr.find.ID = function (id, context) {
+ if (void 0 !== context.getElementById && documentIsHTML) {
+ var m = context.getElementById(id)
+ return m ? [m] : []
+ }
+ }),
+ (Expr.filter.ID = function (id) {
+ var attrId = id.replace(runescape, funescape)
+ return function (elem) {
+ return elem.getAttribute('id') === attrId
+ }
+ }))
+ : (delete Expr.find.ID,
+ (Expr.filter.ID = function (id) {
+ var attrId = id.replace(runescape, funescape)
+ return function (elem) {
+ var node = void 0 !== elem.getAttributeNode && elem.getAttributeNode('id')
+ return node && node.value === attrId
+ }
+ })),
+ (Expr.find.TAG = support.getElementsByTagName
+ ? function (tag, context) {
+ return void 0 !== context.getElementsByTagName
+ ? context.getElementsByTagName(tag)
+ : support.qsa
+ ? context.querySelectorAll(tag)
+ : void 0
+ }
+ : function (tag, context) {
+ var elem,
+ tmp = [],
+ i = 0,
+ results = context.getElementsByTagName(tag)
+ if ('*' === tag) {
+ for (; (elem = results[i++]); ) 1 === elem.nodeType && tmp.push(elem)
+ return tmp
+ }
+ return results
+ }),
+ (Expr.find.CLASS =
+ support.getElementsByClassName &&
+ function (className, context) {
+ if (void 0 !== context.getElementsByClassName && documentIsHTML)
+ return context.getElementsByClassName(className)
+ }),
+ (rbuggyMatches = []),
+ (rbuggyQSA = []),
+ (support.qsa = rnative.test(document.querySelectorAll)) &&
+ (assert(function (div) {
+ ;(docElem.appendChild(div).innerHTML =
+ " "),
+ div.querySelectorAll("[msallowcapture^='']").length &&
+ rbuggyQSA.push('[*^$]=' + whitespace + '*(?:\'\'|"")'),
+ div.querySelectorAll('[selected]').length ||
+ rbuggyQSA.push('\\[' + whitespace + '*(?:value|' + booleans + ')'),
+ div.querySelectorAll('[id~=' + expando + '-]').length || rbuggyQSA.push('~='),
+ div.querySelectorAll(':checked').length || rbuggyQSA.push(':checked'),
+ div.querySelectorAll('a#' + expando + '+*').length || rbuggyQSA.push('.#.+[+~]')
+ }),
+ assert(function (div) {
+ var input = document.createElement('input')
+ input.setAttribute('type', 'hidden'),
+ div.appendChild(input).setAttribute('name', 'D'),
+ div.querySelectorAll('[name=d]').length &&
+ rbuggyQSA.push('name' + whitespace + '*[*^$|!~]?='),
+ div.querySelectorAll(':enabled').length || rbuggyQSA.push(':enabled', ':disabled'),
+ div.querySelectorAll('*,:x'),
+ rbuggyQSA.push(',.*:')
+ })),
+ (support.matchesSelector = rnative.test(
+ (matches =
+ docElem.matches ||
+ docElem.webkitMatchesSelector ||
+ docElem.mozMatchesSelector ||
+ docElem.oMatchesSelector ||
+ docElem.msMatchesSelector)
+ )) &&
+ assert(function (div) {
+ ;(support.disconnectedMatch = matches.call(div, 'div')),
+ matches.call(div, "[s!='']:x"),
+ rbuggyMatches.push('!=', pseudos)
+ }),
+ (rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join('|'))),
+ (rbuggyMatches = rbuggyMatches.length && new RegExp(rbuggyMatches.join('|'))),
+ (hasCompare = rnative.test(docElem.compareDocumentPosition)),
+ (contains =
+ hasCompare || rnative.test(docElem.contains)
+ ? function (a, b) {
+ var adown = 9 === a.nodeType ? a.documentElement : a,
+ bup = b && b.parentNode
+ return (
+ a === bup ||
+ !(
+ !bup ||
+ 1 !== bup.nodeType ||
+ !(adown.contains
+ ? adown.contains(bup)
+ : a.compareDocumentPosition && 16 & a.compareDocumentPosition(bup))
+ )
+ )
+ }
+ : function (a, b) {
+ if (b) for (; (b = b.parentNode); ) if (b === a) return !0
+ return !1
+ }),
+ (sortOrder = hasCompare
+ ? function (a, b) {
+ if (a === b) return (hasDuplicate = !0), 0
+ var compare = !a.compareDocumentPosition - !b.compareDocumentPosition
+ return (
+ compare ||
+ (1 &
+ (compare =
+ (a.ownerDocument || a) === (b.ownerDocument || b) ? a.compareDocumentPosition(b) : 1) ||
+ (!support.sortDetached && b.compareDocumentPosition(a) === compare)
+ ? a === document || (a.ownerDocument === preferredDoc && contains(preferredDoc, a))
+ ? -1
+ : b === document || (b.ownerDocument === preferredDoc && contains(preferredDoc, b))
+ ? 1
+ : sortInput
+ ? indexOf(sortInput, a) - indexOf(sortInput, b)
+ : 0
+ : 4 & compare
+ ? -1
+ : 1)
+ )
+ }
+ : function (a, b) {
+ if (a === b) return (hasDuplicate = !0), 0
+ var cur,
+ i = 0,
+ aup = a.parentNode,
+ bup = b.parentNode,
+ ap = [a],
+ bp = [b]
+ if (!aup || !bup)
+ return a === document
+ ? -1
+ : b === document
+ ? 1
+ : aup
+ ? -1
+ : bup
+ ? 1
+ : sortInput
+ ? indexOf(sortInput, a) - indexOf(sortInput, b)
+ : 0
+ if (aup === bup) return siblingCheck(a, b)
+ for (cur = a; (cur = cur.parentNode); ) ap.unshift(cur)
+ for (cur = b; (cur = cur.parentNode); ) bp.unshift(cur)
+ for (; ap[i] === bp[i]; ) i++
+ return i
+ ? siblingCheck(ap[i], bp[i])
+ : ap[i] === preferredDoc
+ ? -1
+ : bp[i] === preferredDoc
+ ? 1
+ : 0
+ }),
+ document)
+ : document
+ }),
+ (Sizzle.matches = function (expr, elements) {
+ return Sizzle(expr, null, null, elements)
+ }),
+ (Sizzle.matchesSelector = function (elem, expr) {
+ if (
+ ((elem.ownerDocument || elem) !== document && setDocument(elem),
+ (expr = expr.replace(rattributeQuotes, "='$1']")),
+ support.matchesSelector &&
+ documentIsHTML &&
+ !compilerCache[expr + ' '] &&
+ (!rbuggyMatches || !rbuggyMatches.test(expr)) &&
+ (!rbuggyQSA || !rbuggyQSA.test(expr)))
+ )
+ try {
+ var ret = matches.call(elem, expr)
+ if (ret || support.disconnectedMatch || (elem.document && 11 !== elem.document.nodeType)) return ret
+ } catch (e) {}
+ return Sizzle(expr, document, null, [elem]).length > 0
+ }),
+ (Sizzle.contains = function (context, elem) {
+ return (context.ownerDocument || context) !== document && setDocument(context), contains(context, elem)
+ }),
+ (Sizzle.attr = function (elem, name) {
+ ;(elem.ownerDocument || elem) !== document && setDocument(elem)
+ var fn = Expr.attrHandle[name.toLowerCase()],
+ val =
+ fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0
+ return void 0 !== val
+ ? val
+ : support.attributes || !documentIsHTML
+ ? elem.getAttribute(name)
+ : (val = elem.getAttributeNode(name)) && val.specified
+ ? val.value
+ : null
+ }),
+ (Sizzle.error = function (msg) {
+ throw new Error('Syntax error, unrecognized expression: ' + msg)
+ }),
+ (Sizzle.uniqueSort = function (results) {
+ var elem,
+ duplicates = [],
+ j = 0,
+ i = 0
+ if (
+ ((hasDuplicate = !support.detectDuplicates),
+ (sortInput = !support.sortStable && results.slice(0)),
+ results.sort(sortOrder),
+ hasDuplicate)
+ ) {
+ for (; (elem = results[i++]); ) elem === results[i] && (j = duplicates.push(i))
+ for (; j--; ) results.splice(duplicates[j], 1)
+ }
+ return (sortInput = null), results
+ }),
+ (getText = Sizzle.getText = function (elem) {
+ var node,
+ ret = '',
+ i = 0,
+ nodeType = elem.nodeType
+ if (nodeType) {
+ if (1 === nodeType || 9 === nodeType || 11 === nodeType) {
+ if ('string' == typeof elem.textContent) return elem.textContent
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) ret += getText(elem)
+ } else if (3 === nodeType || 4 === nodeType) return elem.nodeValue
+ } else for (; (node = elem[i++]); ) ret += getText(node)
+ return ret
+ }),
+ ((Expr = Sizzle.selectors = {
+ cacheLength: 50,
+ createPseudo: markFunction,
+ match: matchExpr,
+ attrHandle: {},
+ find: {},
+ relative: {
+ '>': { dir: 'parentNode', first: !0 },
+ ' ': { dir: 'parentNode' },
+ '+': { dir: 'previousSibling', first: !0 },
+ '~': { dir: 'previousSibling' }
+ },
+ preFilter: {
+ ATTR: function (match) {
+ return (
+ (match[1] = match[1].replace(runescape, funescape)),
+ (match[3] = (match[3] || match[4] || match[5] || '').replace(runescape, funescape)),
+ '~=' === match[2] && (match[3] = ' ' + match[3] + ' '),
+ match.slice(0, 4)
+ )
+ },
+ CHILD: function (match) {
+ return (
+ (match[1] = match[1].toLowerCase()),
+ 'nth' === match[1].slice(0, 3)
+ ? (match[3] || Sizzle.error(match[0]),
+ (match[4] = +(match[4]
+ ? match[5] + (match[6] || 1)
+ : 2 * ('even' === match[3] || 'odd' === match[3]))),
+ (match[5] = +(match[7] + match[8] || 'odd' === match[3])))
+ : match[3] && Sizzle.error(match[0]),
+ match
+ )
+ },
+ PSEUDO: function (match) {
+ var excess,
+ unquoted = !match[6] && match[2]
+ return matchExpr.CHILD.test(match[0])
+ ? null
+ : (match[3]
+ ? (match[2] = match[4] || match[5] || '')
+ : unquoted &&
+ rpseudo.test(unquoted) &&
+ (excess = tokenize(unquoted, !0)) &&
+ (excess = unquoted.indexOf(')', unquoted.length - excess) - unquoted.length) &&
+ ((match[0] = match[0].slice(0, excess)), (match[2] = unquoted.slice(0, excess))),
+ match.slice(0, 3))
+ }
+ },
+ filter: {
+ TAG: function (nodeNameSelector) {
+ var nodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase()
+ return '*' === nodeNameSelector
+ ? function () {
+ return !0
+ }
+ : function (elem) {
+ return elem.nodeName && elem.nodeName.toLowerCase() === nodeName
+ }
+ },
+ CLASS: function (className) {
+ var pattern = classCache[className + ' ']
+ return (
+ pattern ||
+ ((pattern = new RegExp('(^|' + whitespace + ')' + className + '(' + whitespace + '|$)')) &&
+ classCache(className, function (elem) {
+ return pattern.test(
+ ('string' == typeof elem.className && elem.className) ||
+ (void 0 !== elem.getAttribute && elem.getAttribute('class')) ||
+ ''
+ )
+ }))
+ )
+ },
+ ATTR: function (name, operator, check) {
+ return function (elem) {
+ var result = Sizzle.attr(elem, name)
+ return null == result
+ ? '!=' === operator
+ : !operator ||
+ ((result += ''),
+ '=' === operator
+ ? result === check
+ : '!=' === operator
+ ? result !== check
+ : '^=' === operator
+ ? check && 0 === result.indexOf(check)
+ : '*=' === operator
+ ? check && result.indexOf(check) > -1
+ : '$=' === operator
+ ? check && result.slice(-check.length) === check
+ : '~=' === operator
+ ? (' ' + result.replace(rwhitespace, ' ') + ' ').indexOf(check) > -1
+ : '|=' === operator &&
+ (result === check || result.slice(0, check.length + 1) === check + '-'))
+ }
+ },
+ CHILD: function (type, what, argument, first, last) {
+ var simple = 'nth' !== type.slice(0, 3),
+ forward = 'last' !== type.slice(-4),
+ ofType = 'of-type' === what
+ return 1 === first && 0 === last
+ ? function (elem) {
+ return !!elem.parentNode
+ }
+ : function (elem, context, xml) {
+ var cache,
+ uniqueCache,
+ outerCache,
+ node,
+ nodeIndex,
+ start,
+ dir = simple !== forward ? 'nextSibling' : 'previousSibling',
+ parent = elem.parentNode,
+ name = ofType && elem.nodeName.toLowerCase(),
+ useCache = !xml && !ofType,
+ diff = !1
+ if (parent) {
+ if (simple) {
+ for (; dir; ) {
+ for (node = elem; (node = node[dir]); )
+ if (ofType ? node.nodeName.toLowerCase() === name : 1 === node.nodeType) return !1
+ start = dir = 'only' === type && !start && 'nextSibling'
+ }
+ return !0
+ }
+ if (((start = [forward ? parent.firstChild : parent.lastChild]), forward && useCache)) {
+ for (
+ diff =
+ (nodeIndex =
+ (cache =
+ (uniqueCache =
+ (outerCache = (node = parent)[expando] || (node[expando] = {}))[
+ node.uniqueID
+ ] || (outerCache[node.uniqueID] = {}))[type] || [])[0] === dirruns &&
+ cache[1]) && cache[2],
+ node = nodeIndex && parent.childNodes[nodeIndex];
+ (node = (++nodeIndex && node && node[dir]) || (diff = nodeIndex = 0) || start.pop());
+
+ )
+ if (1 === node.nodeType && ++diff && node === elem) {
+ uniqueCache[type] = [dirruns, nodeIndex, diff]
+ break
+ }
+ } else if (
+ (useCache &&
+ (diff = nodeIndex =
+ (cache =
+ (uniqueCache =
+ (outerCache = (node = elem)[expando] || (node[expando] = {}))[node.uniqueID] ||
+ (outerCache[node.uniqueID] = {}))[type] || [])[0] === dirruns && cache[1]),
+ !1 === diff)
+ )
+ for (
+ ;
+ (node = (++nodeIndex && node && node[dir]) || (diff = nodeIndex = 0) || start.pop()) &&
+ ((ofType ? node.nodeName.toLowerCase() !== name : 1 !== node.nodeType) ||
+ !++diff ||
+ (useCache &&
+ ((uniqueCache =
+ (outerCache = node[expando] || (node[expando] = {}))[node.uniqueID] ||
+ (outerCache[node.uniqueID] = {}))[type] = [dirruns, diff]),
+ node !== elem));
+
+ );
+ return (diff -= last) === first || (diff % first == 0 && diff / first >= 0)
+ }
+ }
+ },
+ PSEUDO: function (pseudo, argument) {
+ var args,
+ fn =
+ Expr.pseudos[pseudo] ||
+ Expr.setFilters[pseudo.toLowerCase()] ||
+ Sizzle.error('unsupported pseudo: ' + pseudo)
+ return fn[expando]
+ ? fn(argument)
+ : fn.length > 1
+ ? ((args = [pseudo, pseudo, '', argument]),
+ Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())
+ ? markFunction(function (seed, matches) {
+ for (var idx, matched = fn(seed, argument), i = matched.length; i--; )
+ seed[(idx = indexOf(seed, matched[i]))] = !(matches[idx] = matched[i])
+ })
+ : function (elem) {
+ return fn(elem, 0, args)
+ })
+ : fn
+ }
+ },
+ pseudos: {
+ not: markFunction(function (selector) {
+ var input = [],
+ results = [],
+ matcher = compile(selector.replace(rtrim, '$1'))
+ return matcher[expando]
+ ? markFunction(function (seed, matches, context, xml) {
+ for (var elem, unmatched = matcher(seed, null, xml, []), i = seed.length; i--; )
+ (elem = unmatched[i]) && (seed[i] = !(matches[i] = elem))
+ })
+ : function (elem, context, xml) {
+ return (
+ (input[0] = elem), matcher(input, null, xml, results), (input[0] = null), !results.pop()
+ )
+ }
+ }),
+ has: markFunction(function (selector) {
+ return function (elem) {
+ return Sizzle(selector, elem).length > 0
+ }
+ }),
+ contains: markFunction(function (text) {
+ return (
+ (text = text.replace(runescape, funescape)),
+ function (elem) {
+ return (elem.textContent || elem.innerText || getText(elem)).indexOf(text) > -1
+ }
+ )
+ }),
+ lang: markFunction(function (lang) {
+ return (
+ ridentifier.test(lang || '') || Sizzle.error('unsupported lang: ' + lang),
+ (lang = lang.replace(runescape, funescape).toLowerCase()),
+ function (elem) {
+ var elemLang
+ do {
+ if (
+ (elemLang = documentIsHTML
+ ? elem.lang
+ : elem.getAttribute('xml:lang') || elem.getAttribute('lang'))
+ )
+ return (elemLang = elemLang.toLowerCase()) === lang || 0 === elemLang.indexOf(lang + '-')
+ } while ((elem = elem.parentNode) && 1 === elem.nodeType)
+ return !1
+ }
+ )
+ }),
+ target: function (elem) {
+ var hash = window.location && window.location.hash
+ return hash && hash.slice(1) === elem.id
+ },
+ root: function (elem) {
+ return elem === docElem
+ },
+ focus: function (elem) {
+ return (
+ elem === document.activeElement &&
+ (!document.hasFocus || document.hasFocus()) &&
+ !!(elem.type || elem.href || ~elem.tabIndex)
+ )
+ },
+ enabled: function (elem) {
+ return !1 === elem.disabled
+ },
+ disabled: function (elem) {
+ return !0 === elem.disabled
+ },
+ checked: function (elem) {
+ var nodeName = elem.nodeName.toLowerCase()
+ return ('input' === nodeName && !!elem.checked) || ('option' === nodeName && !!elem.selected)
+ },
+ selected: function (elem) {
+ return elem.parentNode && elem.parentNode.selectedIndex, !0 === elem.selected
+ },
+ empty: function (elem) {
+ for (elem = elem.firstChild; elem; elem = elem.nextSibling) if (elem.nodeType < 6) return !1
+ return !0
+ },
+ parent: function (elem) {
+ return !Expr.pseudos.empty(elem)
+ },
+ header: function (elem) {
+ return rheader.test(elem.nodeName)
+ },
+ input: function (elem) {
+ return rinputs.test(elem.nodeName)
+ },
+ button: function (elem) {
+ var name = elem.nodeName.toLowerCase()
+ return ('input' === name && 'button' === elem.type) || 'button' === name
+ },
+ text: function (elem) {
+ var attr
+ return (
+ 'input' === elem.nodeName.toLowerCase() &&
+ 'text' === elem.type &&
+ (null == (attr = elem.getAttribute('type')) || 'text' === attr.toLowerCase())
+ )
+ },
+ first: createPositionalPseudo(function () {
+ return [0]
+ }),
+ last: createPositionalPseudo(function (matchIndexes, length) {
+ return [length - 1]
+ }),
+ eq: createPositionalPseudo(function (matchIndexes, length, argument) {
+ return [argument < 0 ? argument + length : argument]
+ }),
+ even: createPositionalPseudo(function (matchIndexes, length) {
+ for (var i = 0; i < length; i += 2) matchIndexes.push(i)
+ return matchIndexes
+ }),
+ odd: createPositionalPseudo(function (matchIndexes, length) {
+ for (var i = 1; i < length; i += 2) matchIndexes.push(i)
+ return matchIndexes
+ }),
+ lt: createPositionalPseudo(function (matchIndexes, length, argument) {
+ for (var i = argument < 0 ? argument + length : argument; --i >= 0; ) matchIndexes.push(i)
+ return matchIndexes
+ }),
+ gt: createPositionalPseudo(function (matchIndexes, length, argument) {
+ for (var i = argument < 0 ? argument + length : argument; ++i < length; ) matchIndexes.push(i)
+ return matchIndexes
+ })
+ }
+ }).pseudos.nth = Expr.pseudos.eq),
+ { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }))
+ Expr.pseudos[i] = createInputPseudo(i)
+ for (i in { submit: !0, reset: !0 }) Expr.pseudos[i] = createButtonPseudo(i)
+ function setFilters () {}
+ function toSelector (tokens) {
+ for (var i = 0, len = tokens.length, selector = ''; i < len; i++) selector += tokens[i].value
+ return selector
+ }
+ function addCombinator (matcher, combinator, base) {
+ var dir = combinator.dir,
+ checkNonElements = base && 'parentNode' === dir,
+ doneName = done++
+ return combinator.first
+ ? function (elem, context, xml) {
+ for (; (elem = elem[dir]); )
+ if (1 === elem.nodeType || checkNonElements) return matcher(elem, context, xml)
+ }
+ : function (elem, context, xml) {
+ var oldCache,
+ uniqueCache,
+ outerCache,
+ newCache = [dirruns, doneName]
+ if (xml) {
+ for (; (elem = elem[dir]); )
+ if ((1 === elem.nodeType || checkNonElements) && matcher(elem, context, xml)) return !0
+ } else
+ for (; (elem = elem[dir]); )
+ if (1 === elem.nodeType || checkNonElements) {
+ if (
+ (oldCache = (uniqueCache =
+ (outerCache = elem[expando] || (elem[expando] = {}))[elem.uniqueID] ||
+ (outerCache[elem.uniqueID] = {}))[dir]) &&
+ oldCache[0] === dirruns &&
+ oldCache[1] === doneName
+ )
+ return (newCache[2] = oldCache[2])
+ if (((uniqueCache[dir] = newCache), (newCache[2] = matcher(elem, context, xml)))) return !0
+ }
+ }
+ }
+ function elementMatcher (matchers) {
+ return matchers.length > 1
+ ? function (elem, context, xml) {
+ for (var i = matchers.length; i--; ) if (!matchers[i](elem, context, xml)) return !1
+ return !0
+ }
+ : matchers[0]
+ }
+ function condense (unmatched, map, filter, context, xml) {
+ for (var elem, newUnmatched = [], i = 0, len = unmatched.length, mapped = null != map; i < len; i++)
+ (elem = unmatched[i]) &&
+ ((filter && !filter(elem, context, xml)) || (newUnmatched.push(elem), mapped && map.push(i)))
+ return newUnmatched
+ }
+ function setMatcher (preFilter, selector, matcher, postFilter, postFinder, postSelector) {
+ return (
+ postFilter && !postFilter[expando] && (postFilter = setMatcher(postFilter)),
+ postFinder && !postFinder[expando] && (postFinder = setMatcher(postFinder, postSelector)),
+ markFunction(function (seed, results, context, xml) {
+ var temp,
+ i,
+ elem,
+ preMap = [],
+ postMap = [],
+ preexisting = results.length,
+ elems =
+ seed ||
+ (function (selector, contexts, results) {
+ for (var i = 0, len = contexts.length; i < len; i++) Sizzle(selector, contexts[i], results)
+ return results
+ })(selector || '*', context.nodeType ? [context] : context, []),
+ matcherIn =
+ !preFilter || (!seed && selector) ? elems : condense(elems, preMap, preFilter, context, xml),
+ matcherOut = matcher
+ ? postFinder || (seed ? preFilter : preexisting || postFilter)
+ ? []
+ : results
+ : matcherIn
+ if ((matcher && matcher(matcherIn, matcherOut, context, xml), postFilter))
+ for (
+ temp = condense(matcherOut, postMap), postFilter(temp, [], context, xml), i = temp.length;
+ i--;
+
+ )
+ (elem = temp[i]) && (matcherOut[postMap[i]] = !(matcherIn[postMap[i]] = elem))
+ if (seed) {
+ if (postFinder || preFilter) {
+ if (postFinder) {
+ for (temp = [], i = matcherOut.length; i--; )
+ (elem = matcherOut[i]) && temp.push((matcherIn[i] = elem))
+ postFinder(null, (matcherOut = []), temp, xml)
+ }
+ for (i = matcherOut.length; i--; )
+ (elem = matcherOut[i]) &&
+ (temp = postFinder ? indexOf(seed, elem) : preMap[i]) > -1 &&
+ (seed[temp] = !(results[temp] = elem))
+ }
+ } else (matcherOut = condense(matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut)), postFinder ? postFinder(null, results, matcherOut, xml) : push.apply(results, matcherOut)
+ })
+ )
+ }
+ function matcherFromTokens (tokens) {
+ for (
+ var checkContext,
+ matcher,
+ j,
+ len = tokens.length,
+ leadingRelative = Expr.relative[tokens[0].type],
+ implicitRelative = leadingRelative || Expr.relative[' '],
+ i = leadingRelative ? 1 : 0,
+ matchContext = addCombinator(
+ function (elem) {
+ return elem === checkContext
+ },
+ implicitRelative,
+ !0
+ ),
+ matchAnyContext = addCombinator(
+ function (elem) {
+ return indexOf(checkContext, elem) > -1
+ },
+ implicitRelative,
+ !0
+ ),
+ matchers = [
+ function (elem, context, xml) {
+ var ret =
+ (!leadingRelative && (xml || context !== outermostContext)) ||
+ ((checkContext = context).nodeType
+ ? matchContext(elem, context, xml)
+ : matchAnyContext(elem, context, xml))
+ return (checkContext = null), ret
+ }
+ ];
+ i < len;
+ i++
+ )
+ if ((matcher = Expr.relative[tokens[i].type]))
+ matchers = [addCombinator(elementMatcher(matchers), matcher)]
+ else {
+ if ((matcher = Expr.filter[tokens[i].type].apply(null, tokens[i].matches))[expando]) {
+ for (j = ++i; j < len && !Expr.relative[tokens[j].type]; j++);
+ return setMatcher(
+ i > 1 && elementMatcher(matchers),
+ i > 1 &&
+ toSelector(
+ tokens.slice(0, i - 1).concat({ value: ' ' === tokens[i - 2].type ? '*' : '' })
+ ).replace(rtrim, '$1'),
+ matcher,
+ i < j && matcherFromTokens(tokens.slice(i, j)),
+ j < len && matcherFromTokens((tokens = tokens.slice(j))),
+ j < len && toSelector(tokens)
+ )
+ }
+ matchers.push(matcher)
+ }
+ return elementMatcher(matchers)
+ }
+ return (
+ (setFilters.prototype = Expr.filters = Expr.pseudos),
+ (Expr.setFilters = new setFilters()),
+ (tokenize = Sizzle.tokenize = function (selector, parseOnly) {
+ var matched,
+ match,
+ tokens,
+ type,
+ soFar,
+ groups,
+ preFilters,
+ cached = tokenCache[selector + ' ']
+ if (cached) return parseOnly ? 0 : cached.slice(0)
+ for (soFar = selector, groups = [], preFilters = Expr.preFilter; soFar; ) {
+ for (type in ((matched && !(match = rcomma.exec(soFar))) ||
+ (match && (soFar = soFar.slice(match[0].length) || soFar), groups.push((tokens = []))),
+ (matched = !1),
+ (match = rcombinators.exec(soFar)) &&
+ ((matched = match.shift()),
+ tokens.push({ value: matched, type: match[0].replace(rtrim, ' ') }),
+ (soFar = soFar.slice(matched.length))),
+ Expr.filter))
+ !(match = matchExpr[type].exec(soFar)) ||
+ (preFilters[type] && !(match = preFilters[type](match))) ||
+ ((matched = match.shift()),
+ tokens.push({ value: matched, type, matches: match }),
+ (soFar = soFar.slice(matched.length)))
+ if (!matched) break
+ }
+ return parseOnly
+ ? soFar.length
+ : soFar
+ ? Sizzle.error(selector)
+ : tokenCache(selector, groups).slice(0)
+ }),
+ (compile = Sizzle.compile = function (selector, match) {
+ var i,
+ setMatchers = [],
+ elementMatchers = [],
+ cached = compilerCache[selector + ' ']
+ if (!cached) {
+ for (match || (match = tokenize(selector)), i = match.length; i--; )
+ (cached = matcherFromTokens(match[i]))[expando]
+ ? setMatchers.push(cached)
+ : elementMatchers.push(cached)
+ ;(cached = compilerCache(
+ selector,
+ (function (elementMatchers, setMatchers) {
+ var bySet = setMatchers.length > 0,
+ byElement = elementMatchers.length > 0,
+ superMatcher = function (seed, context, xml, results, outermost) {
+ var elem,
+ j,
+ matcher,
+ matchedCount = 0,
+ i = '0',
+ unmatched = seed && [],
+ setMatched = [],
+ contextBackup = outermostContext,
+ elems = seed || (byElement && Expr.find.TAG('*', outermost)),
+ dirrunsUnique = (dirruns += null == contextBackup ? 1 : Math.random() || 0.1),
+ len = elems.length
+ for (
+ outermost && (outermostContext = context === document || context || outermost);
+ i !== len && null != (elem = elems[i]);
+ i++
+ ) {
+ if (byElement && elem) {
+ for (
+ j = 0,
+ context ||
+ elem.ownerDocument === document ||
+ (setDocument(elem), (xml = !documentIsHTML));
+ (matcher = elementMatchers[j++]);
+
+ )
+ if (matcher(elem, context || document, xml)) {
+ results.push(elem)
+ break
+ }
+ outermost && (dirruns = dirrunsUnique)
+ }
+ bySet && ((elem = !matcher && elem) && matchedCount--, seed && unmatched.push(elem))
+ }
+ if (((matchedCount += i), bySet && i !== matchedCount)) {
+ for (j = 0; (matcher = setMatchers[j++]); ) matcher(unmatched, setMatched, context, xml)
+ if (seed) {
+ if (matchedCount > 0)
+ for (; i--; ) unmatched[i] || setMatched[i] || (setMatched[i] = pop.call(results))
+ setMatched = condense(setMatched)
+ }
+ push.apply(results, setMatched),
+ outermost &&
+ !seed &&
+ setMatched.length > 0 &&
+ matchedCount + setMatchers.length > 1 &&
+ Sizzle.uniqueSort(results)
+ }
+ return (
+ outermost && ((dirruns = dirrunsUnique), (outermostContext = contextBackup)), unmatched
+ )
+ }
+ return bySet ? markFunction(superMatcher) : superMatcher
+ })(elementMatchers, setMatchers)
+ )).selector = selector
+ }
+ return cached
+ }),
+ (select = Sizzle.select = function (selector, context, results, seed) {
+ var i,
+ tokens,
+ token,
+ type,
+ find,
+ compiled = 'function' == typeof selector && selector,
+ match = !seed && tokenize((selector = compiled.selector || selector))
+ if (((results = results || []), 1 === match.length)) {
+ if (
+ (tokens = match[0] = match[0].slice(0)).length > 2 &&
+ 'ID' === (token = tokens[0]).type &&
+ support.getById &&
+ 9 === context.nodeType &&
+ documentIsHTML &&
+ Expr.relative[tokens[1].type]
+ ) {
+ if (!(context = (Expr.find.ID(token.matches[0].replace(runescape, funescape), context) || [])[0]))
+ return results
+ compiled && (context = context.parentNode),
+ (selector = selector.slice(tokens.shift().value.length))
+ }
+ for (
+ i = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
+ i-- && ((token = tokens[i]), !Expr.relative[(type = token.type)]);
+
+ )
+ if (
+ (find = Expr.find[type]) &&
+ (seed = find(
+ token.matches[0].replace(runescape, funescape),
+ (rsibling.test(tokens[0].type) && testContext(context.parentNode)) || context
+ ))
+ ) {
+ if ((tokens.splice(i, 1), !(selector = seed.length && toSelector(tokens))))
+ return push.apply(results, seed), results
+ break
+ }
+ }
+ return (
+ (compiled || compile(selector, match))(
+ seed,
+ context,
+ !documentIsHTML,
+ results,
+ !context || (rsibling.test(selector) && testContext(context.parentNode)) || context
+ ),
+ results
+ )
+ }),
+ (support.sortStable =
+ expando
+ .split('')
+ .sort(sortOrder)
+ .join('') === expando),
+ (support.detectDuplicates = !!hasDuplicate),
+ setDocument(),
+ (support.sortDetached = assert(function (div1) {
+ return 1 & div1.compareDocumentPosition(document.createElement('div'))
+ })),
+ assert(function (div) {
+ return (div.innerHTML = " "), '#' === div.firstChild.getAttribute('href')
+ }) ||
+ addHandle('type|href|height|width', function (elem, name, isXML) {
+ if (!isXML) return elem.getAttribute(name, 'type' === name.toLowerCase() ? 1 : 2)
+ }),
+ (support.attributes &&
+ assert(function (div) {
+ return (
+ (div.innerHTML = ' '),
+ div.firstChild.setAttribute('value', ''),
+ '' === div.firstChild.getAttribute('value')
+ )
+ })) ||
+ addHandle('value', function (elem, name, isXML) {
+ if (!isXML && 'input' === elem.nodeName.toLowerCase()) return elem.defaultValue
+ }),
+ assert(function (div) {
+ return null == div.getAttribute('disabled')
+ }) ||
+ addHandle(booleans, function (elem, name, isXML) {
+ var val
+ if (!isXML)
+ return !0 === elem[name]
+ ? name.toLowerCase()
+ : (val = elem.getAttributeNode(name)) && val.specified
+ ? val.value
+ : null
+ }),
+ Sizzle
+ )
+ })(window)
+ ;(jQuery.find = Sizzle),
+ (jQuery.expr = Sizzle.selectors),
+ (jQuery.expr[':'] = jQuery.expr.pseudos),
+ (jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort),
+ (jQuery.text = Sizzle.getText),
+ (jQuery.isXMLDoc = Sizzle.isXML),
+ (jQuery.contains = Sizzle.contains)
+ var dir = function (elem, dir, until) {
+ for (var matched = [], truncate = void 0 !== until; (elem = elem[dir]) && 9 !== elem.nodeType; )
+ if (1 === elem.nodeType) {
+ if (truncate && jQuery(elem).is(until)) break
+ matched.push(elem)
+ }
+ return matched
+ },
+ siblings = function (n, elem) {
+ for (var matched = []; n; n = n.nextSibling) 1 === n.nodeType && n !== elem && matched.push(n)
+ return matched
+ },
+ rneedsContext = jQuery.expr.match.needsContext,
+ rsingleTag = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,
+ risSimple = /^.[^:#\[\.,]*$/
+ function winnow (elements, qualifier, not) {
+ if (jQuery.isFunction(qualifier))
+ return jQuery.grep(elements, function (elem, i) {
+ return !!qualifier.call(elem, i, elem) !== not
+ })
+ if (qualifier.nodeType)
+ return jQuery.grep(elements, function (elem) {
+ return (elem === qualifier) !== not
+ })
+ if ('string' == typeof qualifier) {
+ if (risSimple.test(qualifier)) return jQuery.filter(qualifier, elements, not)
+ qualifier = jQuery.filter(qualifier, elements)
+ }
+ return jQuery.grep(elements, function (elem) {
+ return indexOf.call(qualifier, elem) > -1 !== not
+ })
+ }
+ ;(jQuery.filter = function (expr, elems, not) {
+ var elem = elems[0]
+ return (
+ not && (expr = ':not(' + expr + ')'),
+ 1 === elems.length && 1 === elem.nodeType
+ ? jQuery.find.matchesSelector(elem, expr)
+ ? [elem]
+ : []
+ : jQuery.find.matches(
+ expr,
+ jQuery.grep(elems, function (elem) {
+ return 1 === elem.nodeType
+ })
+ )
+ )
+ }),
+ jQuery.fn.extend({
+ find: function (selector) {
+ var i,
+ len = this.length,
+ ret = [],
+ self = this
+ if ('string' != typeof selector)
+ return this.pushStack(
+ jQuery(selector).filter(function () {
+ for (i = 0; i < len; i++) if (jQuery.contains(self[i], this)) return !0
+ })
+ )
+ for (i = 0; i < len; i++) jQuery.find(selector, self[i], ret)
+ return (
+ ((ret = this.pushStack(len > 1 ? jQuery.unique(ret) : ret)).selector = this.selector
+ ? this.selector + ' ' + selector
+ : selector),
+ ret
+ )
+ },
+ filter: function (selector) {
+ return this.pushStack(winnow(this, selector || [], !1))
+ },
+ not: function (selector) {
+ return this.pushStack(winnow(this, selector || [], !0))
+ },
+ is: function (selector) {
+ return !!winnow(
+ this,
+ 'string' == typeof selector && rneedsContext.test(selector) ? jQuery(selector) : selector || [],
+ !1
+ ).length
+ }
+ })
+ var rootjQuery,
+ rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/
+ ;((jQuery.fn.init = function (selector, context, root) {
+ var match, elem
+ if (!selector) return this
+ if (((root = root || rootjQuery), 'string' == typeof selector)) {
+ if (
+ !(match =
+ '<' === selector[0] && '>' === selector[selector.length - 1] && selector.length >= 3
+ ? [null, selector, null]
+ : rquickExpr.exec(selector)) ||
+ (!match[1] && context)
+ )
+ return !context || context.jquery
+ ? (context || root).find(selector)
+ : this.constructor(context).find(selector)
+ if (match[1]) {
+ if (
+ ((context = context instanceof jQuery ? context[0] : context),
+ jQuery.merge(
+ this,
+ jQuery.parseHTML(
+ match[1],
+ context && context.nodeType ? context.ownerDocument || context : document,
+ !0
+ )
+ ),
+ rsingleTag.test(match[1]) && jQuery.isPlainObject(context))
+ )
+ for (match in context)
+ jQuery.isFunction(this[match]) ? this[match](context[match]) : this.attr(match, context[match])
+ return this
+ }
+ return (
+ (elem = document.getElementById(match[2])) && elem.parentNode && ((this.length = 1), (this[0] = elem)),
+ (this.context = document),
+ (this.selector = selector),
+ this
+ )
+ }
+ return selector.nodeType
+ ? ((this.context = this[0] = selector), (this.length = 1), this)
+ : jQuery.isFunction(selector)
+ ? void 0 !== root.ready
+ ? root.ready(selector)
+ : selector(jQuery)
+ : (void 0 !== selector.selector &&
+ ((this.selector = selector.selector), (this.context = selector.context)),
+ jQuery.makeArray(selector, this))
+ }).prototype = jQuery.fn),
+ (rootjQuery = jQuery(document))
+ var rparentsprev = /^(?:parents|prev(?:Until|All))/,
+ guaranteedUnique = { children: !0, contents: !0, next: !0, prev: !0 }
+ function sibling (cur, dir) {
+ for (; (cur = cur[dir]) && 1 !== cur.nodeType; );
+ return cur
+ }
+ jQuery.fn.extend({
+ has: function (target) {
+ var targets = jQuery(target, this),
+ l = targets.length
+ return this.filter(function () {
+ for (var i = 0; i < l; i++) if (jQuery.contains(this, targets[i])) return !0
+ })
+ },
+ closest: function (selectors, context) {
+ for (
+ var cur,
+ i = 0,
+ l = this.length,
+ matched = [],
+ pos =
+ rneedsContext.test(selectors) || 'string' != typeof selectors
+ ? jQuery(selectors, context || this.context)
+ : 0;
+ i < l;
+ i++
+ )
+ for (cur = this[i]; cur && cur !== context; cur = cur.parentNode)
+ if (
+ cur.nodeType < 11 &&
+ (pos ? pos.index(cur) > -1 : 1 === cur.nodeType && jQuery.find.matchesSelector(cur, selectors))
+ ) {
+ matched.push(cur)
+ break
+ }
+ return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched)
+ },
+ index: function (elem) {
+ return elem
+ ? 'string' == typeof elem
+ ? indexOf.call(jQuery(elem), this[0])
+ : indexOf.call(this, elem.jquery ? elem[0] : elem)
+ : this[0] && this[0].parentNode
+ ? this.first().prevAll().length
+ : -1
+ },
+ add: function (selector, context) {
+ return this.pushStack(jQuery.uniqueSort(jQuery.merge(this.get(), jQuery(selector, context))))
+ },
+ addBack: function (selector) {
+ return this.add(null == selector ? this.prevObject : this.prevObject.filter(selector))
+ }
+ }),
+ jQuery.each(
+ {
+ parent: function (elem) {
+ var parent = elem.parentNode
+ return parent && 11 !== parent.nodeType ? parent : null
+ },
+ parents: function (elem) {
+ return dir(elem, 'parentNode')
+ },
+ parentsUntil: function (elem, i, until) {
+ return dir(elem, 'parentNode', until)
+ },
+ next: function (elem) {
+ return sibling(elem, 'nextSibling')
+ },
+ prev: function (elem) {
+ return sibling(elem, 'previousSibling')
+ },
+ nextAll: function (elem) {
+ return dir(elem, 'nextSibling')
+ },
+ prevAll: function (elem) {
+ return dir(elem, 'previousSibling')
+ },
+ nextUntil: function (elem, i, until) {
+ return dir(elem, 'nextSibling', until)
+ },
+ prevUntil: function (elem, i, until) {
+ return dir(elem, 'previousSibling', until)
+ },
+ siblings: function (elem) {
+ return siblings((elem.parentNode || {}).firstChild, elem)
+ },
+ children: function (elem) {
+ return siblings(elem.firstChild)
+ },
+ contents: function (elem) {
+ return elem.contentDocument || jQuery.merge([], elem.childNodes)
+ }
+ },
+ function (name, fn) {
+ jQuery.fn[name] = function (until, selector) {
+ var matched = jQuery.map(this, fn, until)
+ return (
+ 'Until' !== name.slice(-5) && (selector = until),
+ selector && 'string' == typeof selector && (matched = jQuery.filter(selector, matched)),
+ this.length > 1 &&
+ (guaranteedUnique[name] || jQuery.uniqueSort(matched),
+ rparentsprev.test(name) && matched.reverse()),
+ this.pushStack(matched)
+ )
+ }
+ }
+ )
+ var readyList,
+ rnotwhite = /\S+/g
+ function completed () {
+ document.removeEventListener('DOMContentLoaded', completed),
+ window.removeEventListener('load', completed),
+ jQuery.ready()
+ }
+ ;(jQuery.Callbacks = function (options) {
+ options =
+ 'string' == typeof options
+ ? (function (options) {
+ var object = {}
+ return (
+ jQuery.each(options.match(rnotwhite) || [], function (_, flag) {
+ object[flag] = !0
+ }),
+ object
+ )
+ })(options)
+ : jQuery.extend({}, options)
+ var firing,
+ memory,
+ fired,
+ locked,
+ list = [],
+ queue = [],
+ firingIndex = -1,
+ fire = function () {
+ for (locked = options.once, fired = firing = !0; queue.length; firingIndex = -1)
+ for (memory = queue.shift(); ++firingIndex < list.length; )
+ !1 === list[firingIndex].apply(memory[0], memory[1]) &&
+ options.stopOnFalse &&
+ ((firingIndex = list.length), (memory = !1))
+ options.memory || (memory = !1), (firing = !1), locked && (list = memory ? [] : '')
+ },
+ self = {
+ add: function () {
+ return (
+ list &&
+ (memory && !firing && ((firingIndex = list.length - 1), queue.push(memory)),
+ (function add (args) {
+ jQuery.each(args, function (_, arg) {
+ jQuery.isFunction(arg)
+ ? (options.unique && self.has(arg)) || list.push(arg)
+ : arg && arg.length && 'string' !== jQuery.type(arg) && add(arg)
+ })
+ })(arguments),
+ memory && !firing && fire()),
+ this
+ )
+ },
+ remove: function () {
+ return (
+ jQuery.each(arguments, function (_, arg) {
+ for (var index; (index = jQuery.inArray(arg, list, index)) > -1; )
+ list.splice(index, 1), index <= firingIndex && firingIndex--
+ }),
+ this
+ )
+ },
+ has: function (fn) {
+ return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0
+ },
+ empty: function () {
+ return list && (list = []), this
+ },
+ disable: function () {
+ return (locked = queue = []), (list = memory = ''), this
+ },
+ disabled: function () {
+ return !list
+ },
+ lock: function () {
+ return (locked = queue = []), memory || (list = memory = ''), this
+ },
+ locked: function () {
+ return !!locked
+ },
+ fireWith: function (context, args) {
+ return (
+ locked ||
+ ((args = [context, (args = args || []).slice ? args.slice() : args]),
+ queue.push(args),
+ firing || fire()),
+ this
+ )
+ },
+ fire: function () {
+ return self.fireWith(this, arguments), this
+ },
+ fired: function () {
+ return !!fired
+ }
+ }
+ return self
+ }),
+ jQuery.extend({
+ Deferred: function (func) {
+ var tuples = [
+ ['resolve', 'done', jQuery.Callbacks('once memory'), 'resolved'],
+ ['reject', 'fail', jQuery.Callbacks('once memory'), 'rejected'],
+ ['notify', 'progress', jQuery.Callbacks('memory')]
+ ],
+ state = 'pending',
+ promise = {
+ state: function () {
+ return state
+ },
+ always: function () {
+ return deferred.done(arguments).fail(arguments), this
+ },
+ then: function () {
+ var fns = arguments
+ return jQuery
+ .Deferred(function (newDefer) {
+ jQuery.each(tuples, function (i, tuple) {
+ var fn = jQuery.isFunction(fns[i]) && fns[i]
+ deferred[tuple[1]](function () {
+ var returned = fn && fn.apply(this, arguments)
+ returned && jQuery.isFunction(returned.promise)
+ ? returned
+ .promise()
+ .progress(newDefer.notify)
+ .done(newDefer.resolve)
+ .fail(newDefer.reject)
+ : newDefer[tuple[0] + 'With'](
+ this === promise ? newDefer.promise() : this,
+ fn ? [returned] : arguments
+ )
+ })
+ }),
+ (fns = null)
+ })
+ .promise()
+ },
+ promise: function (obj) {
+ return null != obj ? jQuery.extend(obj, promise) : promise
+ }
+ },
+ deferred = {}
+ return (
+ (promise.pipe = promise.then),
+ jQuery.each(tuples, function (i, tuple) {
+ var list = tuple[2],
+ stateString = tuple[3]
+ ;(promise[tuple[1]] = list.add),
+ stateString &&
+ list.add(
+ function () {
+ state = stateString
+ },
+ tuples[1 ^ i][2].disable,
+ tuples[2][2].lock
+ ),
+ (deferred[tuple[0]] = function () {
+ return deferred[tuple[0] + 'With'](this === deferred ? promise : this, arguments), this
+ }),
+ (deferred[tuple[0] + 'With'] = list.fireWith)
+ }),
+ promise.promise(deferred),
+ func && func.call(deferred, deferred),
+ deferred
+ )
+ },
+ when: function (subordinate) {
+ var progressValues,
+ progressContexts,
+ resolveContexts,
+ i = 0,
+ resolveValues = slice.call(arguments),
+ length = resolveValues.length,
+ remaining = 1 !== length || (subordinate && jQuery.isFunction(subordinate.promise)) ? length : 0,
+ deferred = 1 === remaining ? subordinate : jQuery.Deferred(),
+ updateFunc = function (i, contexts, values) {
+ return function (value) {
+ ;(contexts[i] = this),
+ (values[i] = arguments.length > 1 ? slice.call(arguments) : value),
+ values === progressValues
+ ? deferred.notifyWith(contexts, values)
+ : --remaining || deferred.resolveWith(contexts, values)
+ }
+ }
+ if (length > 1)
+ for (
+ progressValues = new Array(length),
+ progressContexts = new Array(length),
+ resolveContexts = new Array(length);
+ i < length;
+ i++
+ )
+ resolveValues[i] && jQuery.isFunction(resolveValues[i].promise)
+ ? resolveValues[i]
+ .promise()
+ .progress(updateFunc(i, progressContexts, progressValues))
+ .done(updateFunc(i, resolveContexts, resolveValues))
+ .fail(deferred.reject)
+ : --remaining
+ return remaining || deferred.resolveWith(resolveContexts, resolveValues), deferred.promise()
+ }
+ }),
+ (jQuery.fn.ready = function (fn) {
+ return jQuery.ready.promise().done(fn), this
+ }),
+ jQuery.extend({
+ isReady: !1,
+ readyWait: 1,
+ holdReady: function (hold) {
+ hold ? jQuery.readyWait++ : jQuery.ready(!0)
+ },
+ ready: function (wait) {
+ ;(!0 === wait ? --jQuery.readyWait : jQuery.isReady) ||
+ ((jQuery.isReady = !0),
+ (!0 !== wait && --jQuery.readyWait > 0) ||
+ (readyList.resolveWith(document, [jQuery]),
+ jQuery.fn.triggerHandler &&
+ (jQuery(document).triggerHandler('ready'), jQuery(document).off('ready'))))
+ }
+ }),
+ (jQuery.ready.promise = function (obj) {
+ return (
+ readyList ||
+ ((readyList = jQuery.Deferred()),
+ 'complete' === document.readyState ||
+ ('loading' !== document.readyState && !document.documentElement.doScroll)
+ ? window.setTimeout(jQuery.ready)
+ : (document.addEventListener('DOMContentLoaded', completed),
+ window.addEventListener('load', completed))),
+ readyList.promise(obj)
+ )
+ }),
+ jQuery.ready.promise()
+ var access = function (elems, fn, key, value, chainable, emptyGet, raw) {
+ var i = 0,
+ len = elems.length,
+ bulk = null == key
+ if ('object' === jQuery.type(key))
+ for (i in ((chainable = !0), key)) access(elems, fn, i, key[i], !0, emptyGet, raw)
+ else if (
+ void 0 !== value &&
+ ((chainable = !0),
+ jQuery.isFunction(value) || (raw = !0),
+ bulk &&
+ (raw
+ ? (fn.call(elems, value), (fn = null))
+ : ((bulk = fn),
+ (fn = function (elem, key, value) {
+ return bulk.call(jQuery(elem), value)
+ }))),
+ fn)
+ )
+ for (; i < len; i++) fn(elems[i], key, raw ? value : value.call(elems[i], i, fn(elems[i], key)))
+ return chainable ? elems : bulk ? fn.call(elems) : len ? fn(elems[0], key) : emptyGet
+ },
+ acceptData = function (owner) {
+ return 1 === owner.nodeType || 9 === owner.nodeType || !+owner.nodeType
+ }
+ function Data () {
+ this.expando = jQuery.expando + Data.uid++
+ }
+ ;(Data.uid = 1),
+ (Data.prototype = {
+ register: function (owner, initial) {
+ var value = initial || {}
+ return (
+ owner.nodeType
+ ? (owner[this.expando] = value)
+ : Object.defineProperty(owner, this.expando, { value, writable: !0, configurable: !0 }),
+ owner[this.expando]
+ )
+ },
+ cache: function (owner) {
+ if (!acceptData(owner)) return {}
+ var value = owner[this.expando]
+ return (
+ value ||
+ ((value = {}),
+ acceptData(owner) &&
+ (owner.nodeType
+ ? (owner[this.expando] = value)
+ : Object.defineProperty(owner, this.expando, { value, configurable: !0 }))),
+ value
+ )
+ },
+ set: function (owner, data, value) {
+ var prop,
+ cache = this.cache(owner)
+ if ('string' == typeof data) cache[data] = value
+ else for (prop in data) cache[prop] = data[prop]
+ return cache
+ },
+ get: function (owner, key) {
+ return void 0 === key ? this.cache(owner) : owner[this.expando] && owner[this.expando][key]
+ },
+ access: function (owner, key, value) {
+ var stored
+ return void 0 === key || (key && 'string' == typeof key && void 0 === value)
+ ? void 0 !== (stored = this.get(owner, key))
+ ? stored
+ : this.get(owner, jQuery.camelCase(key))
+ : (this.set(owner, key, value), void 0 !== value ? value : key)
+ },
+ remove: function (owner, key) {
+ var i,
+ name,
+ camel,
+ cache = owner[this.expando]
+ if (void 0 !== cache) {
+ if (void 0 === key) this.register(owner)
+ else {
+ jQuery.isArray(key)
+ ? (name = key.concat(key.map(jQuery.camelCase)))
+ : ((camel = jQuery.camelCase(key)),
+ (name =
+ key in cache
+ ? [key, camel]
+ : (name = camel) in cache
+ ? [name]
+ : name.match(rnotwhite) || [])),
+ (i = name.length)
+ for (; i--; ) delete cache[name[i]]
+ }
+ ;(void 0 === key || jQuery.isEmptyObject(cache)) &&
+ (owner.nodeType ? (owner[this.expando] = void 0) : delete owner[this.expando])
+ }
+ },
+ hasData: function (owner) {
+ var cache = owner[this.expando]
+ return void 0 !== cache && !jQuery.isEmptyObject(cache)
+ }
+ })
+ var dataPriv = new Data(),
+ dataUser = new Data(),
+ rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
+ rmultiDash = /[A-Z]/g
+ function dataAttr (elem, key, data) {
+ var name
+ if (void 0 === data && 1 === elem.nodeType)
+ if (
+ ((name = 'data-' + key.replace(rmultiDash, '-$&').toLowerCase()),
+ 'string' == typeof (data = elem.getAttribute(name)))
+ ) {
+ try {
+ data =
+ 'true' === data ||
+ ('false' !== data &&
+ ('null' === data
+ ? null
+ : +data + '' === data
+ ? +data
+ : rbrace.test(data)
+ ? jQuery.parseJSON(data)
+ : data))
+ } catch (e) {}
+ dataUser.set(elem, key, data)
+ } else data = void 0
+ return data
+ }
+ jQuery.extend({
+ hasData: function (elem) {
+ return dataUser.hasData(elem) || dataPriv.hasData(elem)
+ },
+ data: function (elem, name, data) {
+ return dataUser.access(elem, name, data)
+ },
+ removeData: function (elem, name) {
+ dataUser.remove(elem, name)
+ },
+ _data: function (elem, name, data) {
+ return dataPriv.access(elem, name, data)
+ },
+ _removeData: function (elem, name) {
+ dataPriv.remove(elem, name)
+ }
+ }),
+ jQuery.fn.extend({
+ data: function (key, value) {
+ var i,
+ name,
+ data,
+ elem = this[0],
+ attrs = elem && elem.attributes
+ if (void 0 === key) {
+ if (
+ this.length &&
+ ((data = dataUser.get(elem)), 1 === elem.nodeType && !dataPriv.get(elem, 'hasDataAttrs'))
+ ) {
+ for (i = attrs.length; i--; )
+ attrs[i] &&
+ 0 === (name = attrs[i].name).indexOf('data-') &&
+ ((name = jQuery.camelCase(name.slice(5))), dataAttr(elem, name, data[name]))
+ dataPriv.set(elem, 'hasDataAttrs', !0)
+ }
+ return data
+ }
+ return 'object' == typeof key
+ ? this.each(function () {
+ dataUser.set(this, key)
+ })
+ : access(
+ this,
+ function (value) {
+ var data, camelKey
+ if (elem && void 0 === value)
+ return void 0 !==
+ (data =
+ dataUser.get(elem, key) ||
+ dataUser.get(elem, key.replace(rmultiDash, '-$&').toLowerCase()))
+ ? data
+ : ((camelKey = jQuery.camelCase(key)),
+ void 0 !== (data = dataUser.get(elem, camelKey))
+ ? data
+ : void 0 !== (data = dataAttr(elem, camelKey, void 0))
+ ? data
+ : void 0)
+ ;(camelKey = jQuery.camelCase(key)),
+ this.each(function () {
+ var data = dataUser.get(this, camelKey)
+ dataUser.set(this, camelKey, value),
+ key.indexOf('-') > -1 && void 0 !== data && dataUser.set(this, key, value)
+ })
+ },
+ null,
+ value,
+ arguments.length > 1,
+ null,
+ !0
+ )
+ },
+ removeData: function (key) {
+ return this.each(function () {
+ dataUser.remove(this, key)
+ })
+ }
+ }),
+ jQuery.extend({
+ queue: function (elem, type, data) {
+ var queue
+ if (elem)
+ return (
+ (type = (type || 'fx') + 'queue'),
+ (queue = dataPriv.get(elem, type)),
+ data &&
+ (!queue || jQuery.isArray(data)
+ ? (queue = dataPriv.access(elem, type, jQuery.makeArray(data)))
+ : queue.push(data)),
+ queue || []
+ )
+ },
+ dequeue: function (elem, type) {
+ type = type || 'fx'
+ var queue = jQuery.queue(elem, type),
+ startLength = queue.length,
+ fn = queue.shift(),
+ hooks = jQuery._queueHooks(elem, type)
+ 'inprogress' === fn && ((fn = queue.shift()), startLength--),
+ fn &&
+ ('fx' === type && queue.unshift('inprogress'),
+ delete hooks.stop,
+ fn.call(
+ elem,
+ function () {
+ jQuery.dequeue(elem, type)
+ },
+ hooks
+ )),
+ !startLength && hooks && hooks.empty.fire()
+ },
+ _queueHooks: function (elem, type) {
+ var key = type + 'queueHooks'
+ return (
+ dataPriv.get(elem, key) ||
+ dataPriv.access(elem, key, {
+ empty: jQuery.Callbacks('once memory').add(function () {
+ dataPriv.remove(elem, [type + 'queue', key])
+ })
+ })
+ )
+ }
+ }),
+ jQuery.fn.extend({
+ queue: function (type, data) {
+ var setter = 2
+ return (
+ 'string' != typeof type && ((data = type), (type = 'fx'), setter--),
+ arguments.length < setter
+ ? jQuery.queue(this[0], type)
+ : void 0 === data
+ ? this
+ : this.each(function () {
+ var queue = jQuery.queue(this, type, data)
+ jQuery._queueHooks(this, type),
+ 'fx' === type && 'inprogress' !== queue[0] && jQuery.dequeue(this, type)
+ })
+ )
+ },
+ dequeue: function (type) {
+ return this.each(function () {
+ jQuery.dequeue(this, type)
+ })
+ },
+ clearQueue: function (type) {
+ return this.queue(type || 'fx', [])
+ },
+ promise: function (type, obj) {
+ var tmp,
+ count = 1,
+ defer = jQuery.Deferred(),
+ elements = this,
+ i = this.length,
+ resolve = function () {
+ --count || defer.resolveWith(elements, [elements])
+ }
+ for ('string' != typeof type && ((obj = type), (type = void 0)), type = type || 'fx'; i--; )
+ (tmp = dataPriv.get(elements[i], type + 'queueHooks')) &&
+ tmp.empty &&
+ (count++, tmp.empty.add(resolve))
+ return resolve(), defer.promise(obj)
+ }
+ })
+ var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
+ rcssNum = new RegExp('^(?:([+-])=|)(' + pnum + ')([a-z%]*)$', 'i'),
+ cssExpand = ['Top', 'Right', 'Bottom', 'Left'],
+ isHidden = function (elem, el) {
+ return (
+ (elem = el || elem),
+ 'none' === jQuery.css(elem, 'display') || !jQuery.contains(elem.ownerDocument, elem)
+ )
+ }
+ function adjustCSS (elem, prop, valueParts, tween) {
+ var adjusted,
+ scale = 1,
+ maxIterations = 20,
+ currentValue = tween
+ ? function () {
+ return tween.cur()
+ }
+ : function () {
+ return jQuery.css(elem, prop, '')
+ },
+ initial = currentValue(),
+ unit = (valueParts && valueParts[3]) || (jQuery.cssNumber[prop] ? '' : 'px'),
+ initialInUnit =
+ (jQuery.cssNumber[prop] || ('px' !== unit && +initial)) && rcssNum.exec(jQuery.css(elem, prop))
+ if (initialInUnit && initialInUnit[3] !== unit) {
+ ;(unit = unit || initialInUnit[3]), (valueParts = valueParts || []), (initialInUnit = +initial || 1)
+ do {
+ ;(initialInUnit /= scale = scale || '.5'), jQuery.style(elem, prop, initialInUnit + unit)
+ } while (scale !== (scale = currentValue() / initial) && 1 !== scale && --maxIterations)
+ }
+ return (
+ valueParts &&
+ ((initialInUnit = +initialInUnit || +initial || 0),
+ (adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2]),
+ tween && ((tween.unit = unit), (tween.start = initialInUnit), (tween.end = adjusted))),
+ adjusted
+ )
+ }
+ var rcheckableType = /^(?:checkbox|radio)$/i,
+ rtagName = /<([\w:-]+)/,
+ rscriptType = /^$|\/(?:java|ecma)script/i,
+ wrapMap = {
+ option: [1, "", ' '],
+ thead: [1, ''],
+ col: [2, ''],
+ tr: [2, ''],
+ td: [3, ''],
+ _default: [0, '', '']
+ }
+ function getAll (context, tag) {
+ var ret =
+ void 0 !== context.getElementsByTagName
+ ? context.getElementsByTagName(tag || '*')
+ : void 0 !== context.querySelectorAll
+ ? context.querySelectorAll(tag || '*')
+ : []
+ return void 0 === tag || (tag && jQuery.nodeName(context, tag)) ? jQuery.merge([context], ret) : ret
+ }
+ function setGlobalEval (elems, refElements) {
+ for (var i = 0, l = elems.length; i < l; i++)
+ dataPriv.set(elems[i], 'globalEval', !refElements || dataPriv.get(refElements[i], 'globalEval'))
+ }
+ ;(wrapMap.optgroup = wrapMap.option),
+ (wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead),
+ (wrapMap.th = wrapMap.td)
+ var div,
+ input,
+ rhtml = /<|?\w+;/
+ function buildFragment (elems, context, scripts, selection, ignored) {
+ for (
+ var elem,
+ tmp,
+ tag,
+ wrap,
+ contains,
+ j,
+ fragment = context.createDocumentFragment(),
+ nodes = [],
+ i = 0,
+ l = elems.length;
+ i < l;
+ i++
+ )
+ if ((elem = elems[i]) || 0 === elem)
+ if ('object' === jQuery.type(elem)) jQuery.merge(nodes, elem.nodeType ? [elem] : elem)
+ else if (rhtml.test(elem)) {
+ for (
+ tmp = tmp || fragment.appendChild(context.createElement('div')),
+ tag = (rtagName.exec(elem) || ['', ''])[1].toLowerCase(),
+ wrap = wrapMap[tag] || wrapMap._default,
+ tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2],
+ j = wrap[0];
+ j--;
+
+ )
+ tmp = tmp.lastChild
+ jQuery.merge(nodes, tmp.childNodes), ((tmp = fragment.firstChild).textContent = '')
+ } else nodes.push(context.createTextNode(elem))
+ for (fragment.textContent = '', i = 0; (elem = nodes[i++]); )
+ if (selection && jQuery.inArray(elem, selection) > -1) ignored && ignored.push(elem)
+ else if (
+ ((contains = jQuery.contains(elem.ownerDocument, elem)),
+ (tmp = getAll(fragment.appendChild(elem), 'script')),
+ contains && setGlobalEval(tmp),
+ scripts)
+ )
+ for (j = 0; (elem = tmp[j++]); ) rscriptType.test(elem.type || '') && scripts.push(elem)
+ return fragment
+ }
+ ;(div = document.createDocumentFragment().appendChild(document.createElement('div'))),
+ (input = document.createElement('input')).setAttribute('type', 'radio'),
+ input.setAttribute('checked', 'checked'),
+ input.setAttribute('name', 't'),
+ div.appendChild(input),
+ (support.checkClone = div.cloneNode(!0).cloneNode(!0).lastChild.checked),
+ (div.innerHTML = ''),
+ (support.noCloneChecked = !!div.cloneNode(!0).lastChild.defaultValue)
+ var rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
+ rtypenamespace = /^([^.]*)(?:\.(.+)|)/
+ function returnTrue () {
+ return !0
+ }
+ function returnFalse () {
+ return !1
+ }
+ function safeActiveElement () {
+ try {
+ return document.activeElement
+ } catch (err) {}
+ }
+ function on (elem, types, selector, data, fn, one) {
+ var origFn, type
+ if ('object' == typeof types) {
+ for (type in ('string' != typeof selector && ((data = data || selector), (selector = void 0)), types))
+ on(elem, type, selector, data, types[type], one)
+ return elem
+ }
+ if (
+ (null == data && null == fn
+ ? ((fn = selector), (data = selector = void 0))
+ : null == fn &&
+ ('string' == typeof selector
+ ? ((fn = data), (data = void 0))
+ : ((fn = data), (data = selector), (selector = void 0))),
+ !1 === fn)
+ )
+ fn = returnFalse
+ else if (!fn) return elem
+ return (
+ 1 === one &&
+ ((origFn = fn),
+ ((fn = function (event) {
+ return jQuery().off(event), origFn.apply(this, arguments)
+ }).guid = origFn.guid || (origFn.guid = jQuery.guid++))),
+ elem.each(function () {
+ jQuery.event.add(this, types, fn, data, selector)
+ })
+ )
+ }
+ ;(jQuery.event = {
+ global: {},
+ add: function (elem, types, handler, data, selector) {
+ var handleObjIn,
+ eventHandle,
+ tmp,
+ events,
+ t,
+ handleObj,
+ special,
+ handlers,
+ type,
+ namespaces,
+ origType,
+ elemData = dataPriv.get(elem)
+ if (elemData)
+ for (
+ handler.handler && ((handler = (handleObjIn = handler).handler), (selector = handleObjIn.selector)),
+ handler.guid || (handler.guid = jQuery.guid++),
+ (events = elemData.events) || (events = elemData.events = {}),
+ (eventHandle = elemData.handle) ||
+ (eventHandle = elemData.handle = function (e) {
+ return void 0 !== jQuery && jQuery.event.triggered !== e.type
+ ? jQuery.event.dispatch.apply(elem, arguments)
+ : void 0
+ }),
+ t = (types = (types || '').match(rnotwhite) || ['']).length;
+ t--;
+
+ )
+ (type = origType = (tmp = rtypenamespace.exec(types[t]) || [])[1]),
+ (namespaces = (tmp[2] || '').split('.').sort()),
+ type &&
+ ((special = jQuery.event.special[type] || {}),
+ (type = (selector ? special.delegateType : special.bindType) || type),
+ (special = jQuery.event.special[type] || {}),
+ (handleObj = jQuery.extend(
+ {
+ type,
+ origType,
+ data,
+ handler,
+ guid: handler.guid,
+ selector,
+ needsContext: selector && jQuery.expr.match.needsContext.test(selector),
+ namespace: namespaces.join('.')
+ },
+ handleObjIn
+ )),
+ (handlers = events[type]) ||
+ (((handlers = events[type] = []).delegateCount = 0),
+ (special.setup && !1 !== special.setup.call(elem, data, namespaces, eventHandle)) ||
+ (elem.addEventListener && elem.addEventListener(type, eventHandle))),
+ special.add &&
+ (special.add.call(elem, handleObj),
+ handleObj.handler.guid || (handleObj.handler.guid = handler.guid)),
+ selector ? handlers.splice(handlers.delegateCount++, 0, handleObj) : handlers.push(handleObj),
+ (jQuery.event.global[type] = !0))
+ },
+ remove: function (elem, types, handler, selector, mappedTypes) {
+ var j,
+ origCount,
+ tmp,
+ events,
+ t,
+ handleObj,
+ special,
+ handlers,
+ type,
+ namespaces,
+ origType,
+ elemData = dataPriv.hasData(elem) && dataPriv.get(elem)
+ if (elemData && (events = elemData.events)) {
+ for (t = (types = (types || '').match(rnotwhite) || ['']).length; t--; )
+ if (
+ ((type = origType = (tmp = rtypenamespace.exec(types[t]) || [])[1]),
+ (namespaces = (tmp[2] || '').split('.').sort()),
+ type)
+ ) {
+ for (
+ special = jQuery.event.special[type] || {},
+ handlers = events[(type = (selector ? special.delegateType : special.bindType) || type)] || [],
+ tmp = tmp[2] && new RegExp('(^|\\.)' + namespaces.join('\\.(?:.*\\.|)') + '(\\.|$)'),
+ origCount = j = handlers.length;
+ j--;
+
+ )
+ (handleObj = handlers[j]),
+ (!mappedTypes && origType !== handleObj.origType) ||
+ (handler && handler.guid !== handleObj.guid) ||
+ (tmp && !tmp.test(handleObj.namespace)) ||
+ (selector && selector !== handleObj.selector && ('**' !== selector || !handleObj.selector)) ||
+ (handlers.splice(j, 1),
+ handleObj.selector && handlers.delegateCount--,
+ special.remove && special.remove.call(elem, handleObj))
+ origCount &&
+ !handlers.length &&
+ ((special.teardown && !1 !== special.teardown.call(elem, namespaces, elemData.handle)) ||
+ jQuery.removeEvent(elem, type, elemData.handle),
+ delete events[type])
+ } else for (type in events) jQuery.event.remove(elem, type + types[t], handler, selector, !0)
+ jQuery.isEmptyObject(events) && dataPriv.remove(elem, 'handle events')
+ }
+ },
+ dispatch: function (event) {
+ event = jQuery.event.fix(event)
+ var i,
+ j,
+ ret,
+ matched,
+ handleObj,
+ handlerQueue,
+ args = slice.call(arguments),
+ handlers = (dataPriv.get(this, 'events') || {})[event.type] || [],
+ special = jQuery.event.special[event.type] || {}
+ if (
+ ((args[0] = event),
+ (event.delegateTarget = this),
+ !special.preDispatch || !1 !== special.preDispatch.call(this, event))
+ ) {
+ for (
+ handlerQueue = jQuery.event.handlers.call(this, event, handlers), i = 0;
+ (matched = handlerQueue[i++]) && !event.isPropagationStopped();
+
+ )
+ for (
+ event.currentTarget = matched.elem, j = 0;
+ (handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped();
+
+ )
+ (event.rnamespace && !event.rnamespace.test(handleObj.namespace)) ||
+ ((event.handleObj = handleObj),
+ (event.data = handleObj.data),
+ void 0 !==
+ (ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(
+ matched.elem,
+ args
+ )) &&
+ !1 === (event.result = ret) &&
+ (event.preventDefault(), event.stopPropagation()))
+ return special.postDispatch && special.postDispatch.call(this, event), event.result
+ }
+ },
+ handlers: function (event, handlers) {
+ var i,
+ matches,
+ sel,
+ handleObj,
+ handlerQueue = [],
+ delegateCount = handlers.delegateCount,
+ cur = event.target
+ if (delegateCount && cur.nodeType && ('click' !== event.type || isNaN(event.button) || event.button < 1))
+ for (; cur !== this; cur = cur.parentNode || this)
+ if (1 === cur.nodeType && (!0 !== cur.disabled || 'click' !== event.type)) {
+ for (matches = [], i = 0; i < delegateCount; i++)
+ void 0 === matches[(sel = (handleObj = handlers[i]).selector + ' ')] &&
+ (matches[sel] = handleObj.needsContext
+ ? jQuery(sel, this).index(cur) > -1
+ : jQuery.find(sel, this, null, [cur]).length),
+ matches[sel] && matches.push(handleObj)
+ matches.length && handlerQueue.push({ elem: cur, handlers: matches })
+ }
+ return (
+ delegateCount < handlers.length &&
+ handlerQueue.push({ elem: this, handlers: handlers.slice(delegateCount) }),
+ handlerQueue
+ )
+ },
+ props: 'altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which'.split(
+ ' '
+ ),
+ fixHooks: {},
+ keyHooks: {
+ props: 'char charCode key keyCode'.split(' '),
+ filter: function (event, original) {
+ return (
+ null == event.which &&
+ (event.which = null != original.charCode ? original.charCode : original.keyCode),
+ event
+ )
+ }
+ },
+ mouseHooks: {
+ props: 'button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement'.split(' '),
+ filter: function (event, original) {
+ var eventDoc,
+ doc,
+ body,
+ button = original.button
+ return (
+ null == event.pageX &&
+ null != original.clientX &&
+ ((doc = (eventDoc = event.target.ownerDocument || document).documentElement),
+ (body = eventDoc.body),
+ (event.pageX =
+ original.clientX +
+ ((doc && doc.scrollLeft) || (body && body.scrollLeft) || 0) -
+ ((doc && doc.clientLeft) || (body && body.clientLeft) || 0)),
+ (event.pageY =
+ original.clientY +
+ ((doc && doc.scrollTop) || (body && body.scrollTop) || 0) -
+ ((doc && doc.clientTop) || (body && body.clientTop) || 0))),
+ event.which ||
+ void 0 === button ||
+ (event.which = 1 & button ? 1 : 2 & button ? 3 : 4 & button ? 2 : 0),
+ event
+ )
+ }
+ },
+ fix: function (event) {
+ if (event[jQuery.expando]) return event
+ var i,
+ prop,
+ copy,
+ type = event.type,
+ originalEvent = event,
+ fixHook = this.fixHooks[type]
+ for (
+ fixHook ||
+ (this.fixHooks[type] = fixHook = rmouseEvent.test(type)
+ ? this.mouseHooks
+ : rkeyEvent.test(type)
+ ? this.keyHooks
+ : {}),
+ copy = fixHook.props ? this.props.concat(fixHook.props) : this.props,
+ event = new jQuery.Event(originalEvent),
+ i = copy.length;
+ i--;
+
+ )
+ event[(prop = copy[i])] = originalEvent[prop]
+ return (
+ event.target || (event.target = document),
+ 3 === event.target.nodeType && (event.target = event.target.parentNode),
+ fixHook.filter ? fixHook.filter(event, originalEvent) : event
+ )
+ },
+ special: {
+ load: { noBubble: !0 },
+ focus: {
+ trigger: function () {
+ if (this !== safeActiveElement() && this.focus) return this.focus(), !1
+ },
+ delegateType: 'focusin'
+ },
+ blur: {
+ trigger: function () {
+ if (this === safeActiveElement() && this.blur) return this.blur(), !1
+ },
+ delegateType: 'focusout'
+ },
+ click: {
+ trigger: function () {
+ if ('checkbox' === this.type && this.click && jQuery.nodeName(this, 'input')) return this.click(), !1
+ },
+ _default: function (event) {
+ return jQuery.nodeName(event.target, 'a')
+ }
+ },
+ beforeunload: {
+ postDispatch: function (event) {
+ void 0 !== event.result && event.originalEvent && (event.originalEvent.returnValue = event.result)
+ }
+ }
+ }
+ }),
+ (jQuery.removeEvent = function (elem, type, handle) {
+ elem.removeEventListener && elem.removeEventListener(type, handle)
+ }),
+ (jQuery.Event = function (src, props) {
+ if (!(this instanceof jQuery.Event)) return new jQuery.Event(src, props)
+ src && src.type
+ ? ((this.originalEvent = src),
+ (this.type = src.type),
+ (this.isDefaultPrevented =
+ src.defaultPrevented || (void 0 === src.defaultPrevented && !1 === src.returnValue)
+ ? returnTrue
+ : returnFalse))
+ : (this.type = src),
+ props && jQuery.extend(this, props),
+ (this.timeStamp = (src && src.timeStamp) || jQuery.now()),
+ (this[jQuery.expando] = !0)
+ }),
+ (jQuery.Event.prototype = {
+ constructor: jQuery.Event,
+ isDefaultPrevented: returnFalse,
+ isPropagationStopped: returnFalse,
+ isImmediatePropagationStopped: returnFalse,
+ isSimulated: !1,
+ preventDefault: function () {
+ var e = this.originalEvent
+ ;(this.isDefaultPrevented = returnTrue), e && !this.isSimulated && e.preventDefault()
+ },
+ stopPropagation: function () {
+ var e = this.originalEvent
+ ;(this.isPropagationStopped = returnTrue), e && !this.isSimulated && e.stopPropagation()
+ },
+ stopImmediatePropagation: function () {
+ var e = this.originalEvent
+ ;(this.isImmediatePropagationStopped = returnTrue),
+ e && !this.isSimulated && e.stopImmediatePropagation(),
+ this.stopPropagation()
+ }
+ }),
+ jQuery.each(
+ {
+ mouseenter: 'mouseover',
+ mouseleave: 'mouseout',
+ pointerenter: 'pointerover',
+ pointerleave: 'pointerout'
+ },
+ function (orig, fix) {
+ jQuery.event.special[orig] = {
+ delegateType: fix,
+ bindType: fix,
+ handle: function (event) {
+ var ret,
+ related = event.relatedTarget,
+ handleObj = event.handleObj
+ return (
+ (related && (related === this || jQuery.contains(this, related))) ||
+ ((event.type = handleObj.origType),
+ (ret = handleObj.handler.apply(this, arguments)),
+ (event.type = fix)),
+ ret
+ )
+ }
+ }
+ }
+ ),
+ jQuery.fn.extend({
+ on: function (types, selector, data, fn) {
+ return on(this, types, selector, data, fn)
+ },
+ one: function (types, selector, data, fn) {
+ return on(this, types, selector, data, fn, 1)
+ },
+ off: function (types, selector, fn) {
+ var handleObj, type
+ if (types && types.preventDefault && types.handleObj)
+ return (
+ (handleObj = types.handleObj),
+ jQuery(types.delegateTarget).off(
+ handleObj.namespace ? handleObj.origType + '.' + handleObj.namespace : handleObj.origType,
+ handleObj.selector,
+ handleObj.handler
+ ),
+ this
+ )
+ if ('object' == typeof types) {
+ for (type in types) this.off(type, selector, types[type])
+ return this
+ }
+ return (
+ (!1 !== selector && 'function' != typeof selector) || ((fn = selector), (selector = void 0)),
+ !1 === fn && (fn = returnFalse),
+ this.each(function () {
+ jQuery.event.remove(this, types, fn, selector)
+ })
+ )
+ }
+ })
+ var rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
+ rnoInnerhtml = /