');
addClass(this.panel.parentNode, this.clsMode);
}
css(document.documentElement, 'overflowY', this.overlay ? 'hidden' : '');
addClass(document.body, this.clsContainer, this.clsFlip);
height(document.body); // force reflow
addClass(document.body, this.clsContainerAnimation);
addClass(this.panel, this.clsSidebarAnimation, this.mode !== 'reveal' ? this.clsMode : '');
addClass(this.$el, this.clsOverlay);
css(this.$el, 'display', 'block');
height(this.$el); // force reflow
this.clsContainerAnimation && suppressUserScale();
}
},
{
name: 'hide',
self: true,
handler: function() {
removeClass(document.body, this.clsContainerAnimation);
var active = this.getActive();
if (this.mode === 'none' || active && active !== this && active !== this.prev) {
trigger(this.panel, 'transitionend');
}
}
},
{
name: 'hidden',
self: true,
handler: function() {
this.clsContainerAnimation && resumeUserScale();
if (this.mode === 'reveal') {
unwrap(this.panel);
}
removeClass(this.panel, this.clsSidebarAnimation, this.clsMode);
removeClass(this.$el, this.clsOverlay);
css(this.$el, 'display', '');
removeClass(document.body, this.clsContainer, this.clsFlip);
css(document.documentElement, 'overflowY', '');
}
},
{
name: 'swipeLeft swipeRight',
handler: function(e) {
if (this.isToggled() && isTouch(e) && e.type === 'swipeLeft' ^ this.flip) {
this.hide();
}
}
}
]
};
// Chrome in responsive mode zooms page upon opening offcanvas
function suppressUserScale() {
getViewport().content += ',user-scalable=0';
}
function resumeUserScale() {
var viewport = getViewport();
viewport.content = viewport.content.replace(/,user-scalable=0$/, '');
}
function getViewport() {
return $('meta[name="viewport"]', document.head) || append(document.head, '
');
}
var OverflowAuto = {
mixins: [Class],
props: {
selContainer: String,
selContent: String,
},
data: {
selContainer: '.uk-modal',
selContent: '.uk-modal-dialog',
},
computed: {
container: function(ref, $el) {
var selContainer = ref.selContainer;
return closest($el, selContainer);
},
content: function(ref, $el) {
var selContent = ref.selContent;
return closest($el, selContent);
}
},
connected: function() {
css(this.$el, 'minHeight', 150);
},
update: {
read: function() {
if (!this.content || !this.container) {
return false;
}
return {
current: toFloat(css(this.$el, 'maxHeight')),
max: Math.max(150, height(this.container) - (offset(this.content).height - height(this.$el)))
};
},
write: function(ref) {
var current = ref.current;
var max = ref.max;
css(this.$el, 'maxHeight', max);
if (Math.round(current) !== Math.round(max)) {
trigger(this.$el, 'resize');
}
},
events: ['load', 'resize']
}
};
var Responsive = {
props: ['width', 'height'],
connected: function() {
addClass(this.$el, 'uk-responsive-width');
},
update: {
read: function() {
return isVisible(this.$el) && this.width && this.height
? {width: width(this.$el.parentNode), height: this.height}
: false;
},
write: function(dim) {
height(this.$el, Dimensions.contain({
height: this.height,
width: this.width
}, dim).height);
},
events: ['load', 'resize']
}
};
var Scroll = {
props: {
duration: Number,
offset: Number
},
data: {
duration: 1000,
offset: 0
},
methods: {
scrollTo: function(el) {
var this$1 = this;
el = el && $(el) || document.body;
var docHeight = height(document);
var winHeight = height(window);
var target = offset(el).top - this.offset;
if (target + winHeight > docHeight) {
target = docHeight - winHeight;
}
if (!trigger(this.$el, 'beforescroll', [this, el])) {
return;
}
var start = Date.now();
var startY = window.pageYOffset;
var step = function () {
var currentY = startY + (target - startY) * ease(clamp((Date.now() - start) / this$1.duration));
scrollTop(window, currentY);
// scroll more if we have not reached our destination
if (currentY !== target) {
requestAnimationFrame(step);
} else {
trigger(this$1.$el, 'scrolled', [this$1, el]);
}
};
step();
}
},
events: {
click: function(e) {
if (e.defaultPrevented) {
return;
}
e.preventDefault();
this.scrollTo(escape(decodeURIComponent(this.$el.hash)).substr(1));
}
}
};
function ease(k) {
return 0.5 * (1 - Math.cos(Math.PI * k));
}
var Scrollspy = {
args: 'cls',
props: {
cls: 'list',
target: String,
hidden: Boolean,
offsetTop: Number,
offsetLeft: Number,
repeat: Boolean,
delay: Number
},
data: function () { return ({
cls: [],
target: false,
hidden: true,
offsetTop: 0,
offsetLeft: 0,
repeat: false,
delay: 0,
inViewClass: 'uk-scrollspy-inview'
}); },
computed: {
elements: function(ref, $el) {
var target = ref.target;
return target ? $$(target, $el) : [$el];
}
},
update: [
{
write: function() {
if (this.hidden) {
css(filter(this.elements, (":not(." + (this.inViewClass) + ")")), 'visibility', 'hidden');
}
}
},
{
read: function(els) {
var this$1 = this;
if (!els.update) {
return;
}
this.elements.forEach(function (el, i) {
var elData = els[i];
if (!elData || elData.el !== el) {
var cls = data(el, 'uk-scrollspy-class');
elData = {el: el, toggles: cls && cls.split(',') || this$1.cls};
}
elData.show = isInView(el, this$1.offsetTop, this$1.offsetLeft);
els[i] = elData;
});
},
write: function(els) {
var this$1 = this;
// Let child components be applied at least once first
if (!els.update) {
this.$emit();
return els.update = true;
}
this.elements.forEach(function (el, i) {
var elData = els[i];
var cls = elData.toggles[i] || elData.toggles[0];
if (elData.show && !elData.inview && !elData.queued) {
var show = function () {
css(el, 'visibility', '');
addClass(el, this$1.inViewClass);
toggleClass(el, cls);
trigger(el, 'inview');
this$1.$update(el);
elData.inview = true;
elData.abort && elData.abort();
};
if (this$1.delay) {
elData.queued = true;
els.promise = (els.promise || Promise.resolve()).then(function () {
return !elData.inview && new Promise(function (resolve) {
var timer = setTimeout(function () {
show();
resolve();
}, els.promise || this$1.elements.length === 1 ? this$1.delay : 0);
elData.abort = function () {
clearTimeout(timer);
resolve();
elData.queued = false;
};
});
});
} else {
show();
}
} else if (!elData.show && (elData.inview || elData.queued) && this$1.repeat) {
elData.abort && elData.abort();
if (!elData.inview) {
return;
}
css(el, 'visibility', this$1.hidden ? 'hidden' : '');
removeClass(el, this$1.inViewClass);
toggleClass(el, cls);
trigger(el, 'outview');
this$1.$update(el);
elData.inview = false;
}
});
},
events: ['scroll', 'load', 'resize']
}
]
};
var ScrollspyNav = {
props: {
cls: String,
closest: String,
scroll: Boolean,
overflow: Boolean,
offset: Number
},
data: {
cls: 'uk-active',
closest: false,
scroll: false,
overflow: true,
offset: 0
},
computed: {
links: function(_, $el) {
return $$('a[href^="#"]', $el).filter(function (el) { return el.hash; });
},
elements: function() {
return this.closest ? closest(this.links, this.closest) : this.links;
},
targets: function() {
return $$(this.links.map(function (el) { return el.hash; }).join(','));
}
},
update: [
{
read: function() {
if (this.scroll) {
this.$create('scroll', this.links, {offset: this.offset || 0});
}
}
},
{
read: function(data$$1) {
var this$1 = this;
var scroll = window.pageYOffset + this.offset + 1;
var max = height(document) - height(window) + this.offset;
data$$1.active = false;
this.targets.every(function (el, i) {
var ref = offset(el);
var top = ref.top;
var last = i + 1 === this$1.targets.length;
if (!this$1.overflow && (i === 0 && top > scroll || last && top + el.offsetTop < scroll)) {
return false;
}
if (!last && offset(this$1.targets[i + 1]).top <= scroll) {
return true;
}
if (scroll >= max) {
for (var j = this$1.targets.length - 1; j > i; j--) {
if (isInView(this$1.targets[j])) {
el = this$1.targets[j];
break;
}
}
}
return !(data$$1.active = $(filter(this$1.links, ("[href=\"#" + (el.id) + "\"]"))));
});
},
write: function(ref) {
var active = ref.active;
this.links.forEach(function (el) { return el.blur(); });
removeClass(this.elements, this.cls);
if (active) {
trigger(this.$el, 'active', [active, addClass(this.closest ? closest(active, this.closest) : active, this.cls)]);
}
},
events: ['scroll', 'load', 'resize']
}
]
};
var Sticky = {
mixins: [Class, Media],
props: {
top: null,
bottom: Boolean,
offset: Number,
animation: String,
clsActive: String,
clsInactive: String,
clsFixed: String,
clsBelow: String,
selTarget: String,
widthElement: Boolean,
showOnUp: Boolean,
targetOffset: Number
},
data: {
top: 0,
bottom: false,
offset: 0,
animation: '',
clsActive: 'uk-active',
clsInactive: '',
clsFixed: 'uk-sticky-fixed',
clsBelow: 'uk-sticky-below',
selTarget: '',
widthElement: false,
showOnUp: false,
targetOffset: false
},
computed: {
selTarget: function(ref, $el) {
var selTarget = ref.selTarget;
return selTarget && $(selTarget, $el) || $el;
},
widthElement: function(ref, $el) {
var widthElement = ref.widthElement;
return query(widthElement, $el) || this.placeholder;
},
isActive: {
get: function() {
return hasClass(this.selTarget, this.clsActive);
},
set: function(value) {
if (value && !this.isActive) {
replaceClass(this.selTarget, this.clsInactive, this.clsActive);
trigger(this.$el, 'active');
} else if (!value && !hasClass(this.selTarget, this.clsInactive)) {
replaceClass(this.selTarget, this.clsActive, this.clsInactive);
trigger(this.$el, 'inactive');
}
}
},
},
connected: function() {
this.placeholder = $('+ .uk-sticky-placeholder', this.$el) || $('
');
this.isFixed = false;
this.isActive = false;
},
disconnected: function() {
if (this.isFixed) {
this.hide();
removeClass(this.selTarget, this.clsInactive);
}
remove(this.placeholder);
this.placeholder = null;
this.widthElement = null;
},
events: [
{
name: 'load hashchange popstate',
el: window,
handler: function() {
var this$1 = this;
if (!(this.targetOffset !== false && location.hash && window.pageYOffset > 0)) {
return;
}
var target = $(location.hash);
if (target) {
fastdom.read(function () {
var ref = offset(target);
var top = ref.top;
var elTop = offset(this$1.$el).top;
var elHeight = this$1.$el.offsetHeight;
if (this$1.isFixed && elTop + elHeight >= top && elTop <= top + target.offsetHeight) {
scrollTop(window, top - elHeight - (isNumeric(this$1.targetOffset) ? this$1.targetOffset : 0) - this$1.offset);
}
});
}
}
}
],
update: [
{
read: function(ref, ref$1) {
var height$$1 = ref.height;
var type = ref$1.type;
if (this.isActive && type !== 'update') {
this.hide();
height$$1 = this.$el.offsetHeight;
this.show();
}
height$$1 = !this.isActive ? this.$el.offsetHeight : height$$1;
this.topOffset = offset(this.isFixed ? this.placeholder : this.$el).top;
this.bottomOffset = this.topOffset + height$$1;
var bottom = parseProp('bottom', this);
this.top = Math.max(toFloat(parseProp('top', this)), this.topOffset) - this.offset;
this.bottom = bottom && bottom - height$$1;
this.inactive = !this.matchMedia;
return {
lastScroll: false,
height: height$$1,
margins: css(this.$el, ['marginTop', 'marginBottom', 'marginLeft', 'marginRight'])
};
},
write: function(ref) {
var height$$1 = ref.height;
var margins = ref.margins;
var ref$1 = this;
var placeholder = ref$1.placeholder;
css(placeholder, assign({height: height$$1}, margins));
if (!within(placeholder, document)) {
after(this.$el, placeholder);
attr(placeholder, 'hidden', '');
}
// ensure active/inactive classes are applied
this.isActive = this.isActive;
},
events: ['load', 'resize']
},
{
read: function(_, ref) {
var scrollY = ref.scrollY; if ( scrollY === void 0 ) scrollY = window.pageYOffset;
this.width = (isVisible(this.widthElement) ? this.widthElement : this.$el).offsetWidth;
return {
scroll: this.scroll = scrollY,
visible: isVisible(this.$el),
top: offsetPosition(this.placeholder)[0]
};
},
write: function(data$$1, ref) {
var this$1 = this;
if ( ref === void 0 ) ref = {};
var dir = ref.dir;
var initTimestamp = data$$1.initTimestamp; if ( initTimestamp === void 0 ) initTimestamp = 0;
var lastDir = data$$1.lastDir;
var lastScroll = data$$1.lastScroll;
var scroll = data$$1.scroll;
var top = data$$1.top;
var visible = data$$1.visible;
var now = performance.now();
data$$1.lastScroll = scroll;
if (scroll < 0 || scroll === lastScroll || !visible || this.disabled || this.showOnUp && !dir) {
return;
}
if (now - initTimestamp > 300 || dir !== lastDir) {
data$$1.initScroll = scroll;
data$$1.initTimestamp = now;
}
data$$1.lastDir = dir;
if (this.showOnUp && Math.abs(data$$1.initScroll - scroll) <= 30 && Math.abs(lastScroll - scroll) <= 10) {
return;
}
if (this.inactive
|| scroll < this.top
|| this.showOnUp && (scroll <= this.top || dir === 'down' || dir === 'up' && !this.isFixed && scroll <= this.bottomOffset)
) {
if (!this.isFixed) {
if (Animation.inProgress(this.$el) && top > scroll) {
Animation.cancel(this.$el);
this.hide();
}
return;
}
this.isFixed = false;
if (this.animation && scroll > this.topOffset) {
Animation.cancel(this.$el);
Animation.out(this.$el, this.animation).then(function () { return this$1.hide(); }, noop);
} else {
this.hide();
}
} else if (this.isFixed) {
this.update();
} else if (this.animation) {
Animation.cancel(this.$el);
this.show();
Animation.in(this.$el, this.animation).catch(noop);
} else {
this.show();
}
},
events: ['load', 'resize', 'scroll']
} ],
methods: {
show: function() {
this.isFixed = true;
this.update();
attr(this.placeholder, 'hidden', null);
},
hide: function() {
this.isActive = false;
removeClass(this.$el, this.clsFixed, this.clsBelow);
css(this.$el, {position: '', top: '', width: ''});
attr(this.placeholder, 'hidden', '');
},
update: function() {
var active = this.top !== 0 || this.scroll > this.top;
var top = Math.max(0, this.offset);
if (this.bottom && this.scroll > this.bottom - this.offset) {
top = this.bottom - this.scroll;
}
css(this.$el, {
position: 'fixed',
top: (top + "px"),
width: this.width
});
this.isActive = active;
toggleClass(this.$el, this.clsBelow, this.scroll > this.bottomOffset);
addClass(this.$el, this.clsFixed);
}
}
};
function parseProp(prop, ref) {
var $props = ref.$props;
var $el = ref.$el;
var propOffset = ref[(prop + "Offset")];
var value = $props[prop];
if (!value) {
return;
}
if (isNumeric(value)) {
return propOffset + toFloat(value);
} else if (isString(value) && value.match(/^-?\d+vh$/)) {
return height(window) * toFloat(value) / 100;
} else {
var el = value === true ? $el.parentNode : query(value, $el);
if (el) {
return offset(el).top + el.offsetHeight;
}
}
}
var Switcher = {
mixins: [Togglable],
args: 'connect',
props: {
connect: String,
toggle: String,
active: Number,
swiping: Boolean
},
data: {
connect: '~.uk-switcher',
toggle: '> *',
active: 0,
swiping: true,
cls: 'uk-active',
clsContainer: 'uk-switcher',
attrItem: 'uk-switcher-item',
queued: true
},
computed: {
connects: function(ref, $el) {
var connect = ref.connect;
return queryAll(connect, $el);
},
toggles: function(ref, $el) {
var toggle = ref.toggle;
return $$(toggle, $el);
}
},
events: [
{
name: 'click',
delegate: function() {
return ((this.toggle) + ":not(.uk-disabled)");
},
handler: function(e) {
e.preventDefault();
this.show(e.current);
}
},
{
name: 'click',
el: function() {
return this.connects;
},
delegate: function() {
return ("[" + (this.attrItem) + "],[data-" + (this.attrItem) + "]");
},
handler: function(e) {
e.preventDefault();
this.show(data(e.current, this.attrItem));
}
},
{
name: 'swipeRight swipeLeft',
filter: function() {
return this.swiping;
},
el: function() {
return this.connects;
},
handler: function(e) {
if (!isTouch(e)) {
return;
}
e.preventDefault();
if (!window.getSelection().toString()) {
this.show(e.type === 'swipeLeft' ? 'next' : 'previous');
}
}
}
],
update: function() {
var this$1 = this;
this.connects.forEach(function (list) { return this$1.updateAria(list.children); });
this.show(filter(this.toggles, ("." + (this.cls)))[0] || this.toggles[this.active] || this.toggles[0]);
},
methods: {
index: function() {
return !!this.connects.length && index(filter(this.connects[0].children, ("." + (this.cls)))[0]);
},
show: function(item) {
var this$1 = this;
var ref = this.toggles;
var length = ref.length;
var prev = this.index();
var hasPrev = prev >= 0;
var dir = item === 'previous' ? -1 : 1;
var toggle, next = getIndex(item, this.toggles, prev);
for (var i = 0; i < length; i++, next = (next + dir + length) % length) {
if (!matches(this.toggles[next], '.uk-disabled, [disabled]')) {
toggle = this.toggles[next];
break;
}
}
if (!toggle || prev >= 0 && hasClass(toggle, this.cls) || prev === next) {
return;
}
removeClass(this.toggles, this.cls);
attr(this.toggles, 'aria-expanded', false);
addClass(toggle, this.cls);
attr(toggle, 'aria-expanded', true);
this.connects.forEach(function (list) {
if (!hasPrev) {
this$1.toggleNow(list.children[next]);
} else {
this$1.toggleElement([list.children[prev], list.children[next]]);
}
});
}
}
};
var Tab = {
mixins: [Class],
extends: Switcher,
props: {
media: Boolean
},
data: {
media: 960,
attrItem: 'uk-tab-item'
},
connected: function() {
var cls = hasClass(this.$el, 'uk-tab-left')
? 'uk-tab-left'
: hasClass(this.$el, 'uk-tab-right')
? 'uk-tab-right'
: false;
if (cls) {
this.$create('toggle', this.$el, {cls: cls, mode: 'media', media: this.media});
}
}
};
var Toggle = {
mixins: [Media, Togglable],
args: 'target',
props: {
href: String,
target: null,
mode: 'list',
},
data: {
href: false,
target: false,
mode: 'click',
queued: true,
},
computed: {
target: function(ref, $el) {
var href = ref.href;
var target = ref.target;
target = queryAll(target || href, $el);
return target.length && target || [$el];
}
},
events: [
{
name: (pointerEnter + " " + pointerLeave),
filter: function() {
return includes(this.mode, 'hover');
},
handler: function(e) {
if (!isTouch(e)) {
this.toggle(("toggle" + (e.type === pointerEnter ? 'show' : 'hide')));
}
}
},
{
name: 'click',
filter: function() {
return includes(this.mode, 'click') || hasTouch && includes(this.mode, 'hover');
},
handler: function(e) {
if (!isTouch(e) && !includes(this.mode, 'click')) {
return;
}
// TODO better isToggled handling
var link;
if (closest(e.target, 'a[href="#"], button')
|| (link = closest(e.target, 'a[href]')) && (
this.cls
|| !isVisible(this.target)
|| link.hash && matches(this.target, link.hash)
)
) {
once(document, 'click', function (e) { return e.preventDefault(); });
}
this.toggle();
}
}
],
update: {
write: function() {
if (!includes(this.mode, 'media') || !this.media) {
return;
}
var toggled = this.isToggled(this.target);
if (this.matchMedia ? !toggled : toggled) {
this.toggle();
}
},
events: ['load', 'resize']
},
methods: {
toggle: function(type) {
if (trigger(this.target, type || 'toggle', [this])) {
this.toggleElement(this.target);
}
}
}
};
function core (UIkit) {
// core components
UIkit.component('accordion', Accordion);
UIkit.component('alert', Alert);
UIkit.component('cover', Cover);
UIkit.component('drop', Drop);
UIkit.component('dropdown', Dropdown);
UIkit.component('formCustom', FormCustom);
UIkit.component('gif', Gif);
UIkit.component('grid', Grid);
UIkit.component('heightMatch', HeightMatch);
UIkit.component('heightViewport', HeightViewport);
UIkit.component('icon', Icon);
UIkit.component('img', Img);
UIkit.component('leader', Leader);
UIkit.component('margin', Margin);
UIkit.component('modal', Modal$1);
UIkit.component('nav', Nav);
UIkit.component('navbar', Navbar);
UIkit.component('offcanvas', Offcanvas);
UIkit.component('overflowAuto', OverflowAuto);
UIkit.component('responsive', Responsive);
UIkit.component('scroll', Scroll);
UIkit.component('scrollspy', Scrollspy);
UIkit.component('scrollspyNav', ScrollspyNav);
UIkit.component('sticky', Sticky);
UIkit.component('svg', SVG);
UIkit.component('switcher', Switcher);
UIkit.component('tab', Tab);
UIkit.component('toggle', Toggle);
UIkit.component('video', Video);
// Icon components
UIkit.component('close', Close);
UIkit.component('marker', IconComponent);
UIkit.component('navbarToggleIcon', IconComponent);
UIkit.component('overlayIcon', IconComponent);
UIkit.component('paginationNext', IconComponent);
UIkit.component('paginationPrevious', IconComponent);
UIkit.component('searchIcon', Search);
UIkit.component('slidenavNext', Slidenav);
UIkit.component('slidenavPrevious', Slidenav);
UIkit.component('spinner', Spinner);
UIkit.component('totop', IconComponent);
// core functionality
UIkit.use(Core);
}
UIkit.version = '1.0.0';
core(UIkit);
var Countdown = {
mixins: [Class],
props: {
date: String,
clsWrapper: String
},
data: {
date: '',
clsWrapper: '.uk-countdown-%unit%'
},
computed: {
date: function(ref) {
var date = ref.date;
return Date.parse(date);
},
days: function(ref, $el) {
var clsWrapper = ref.clsWrapper;
return $(clsWrapper.replace('%unit%', 'days'), $el);
},
hours: function(ref, $el) {
var clsWrapper = ref.clsWrapper;
return $(clsWrapper.replace('%unit%', 'hours'), $el);
},
minutes: function(ref, $el) {
var clsWrapper = ref.clsWrapper;
return $(clsWrapper.replace('%unit%', 'minutes'), $el);
},
seconds: function(ref, $el) {
var clsWrapper = ref.clsWrapper;
return $(clsWrapper.replace('%unit%', 'seconds'), $el);
},
units: function() {
var this$1 = this;
return ['days', 'hours', 'minutes', 'seconds'].filter(function (unit) { return this$1[unit]; });
}
},
connected: function() {
this.start();
},
disconnected: function() {
var this$1 = this;
this.stop();
this.units.forEach(function (unit) { return empty(this$1[unit]); });
},
events: [
{
name: 'visibilitychange',
el: document,
handler: function() {
if (document.hidden) {
this.stop();
} else {
this.start();
}
}
}
],
update: {
write: function() {
var this$1 = this;
var timespan = getTimeSpan(this.date);
if (timespan.total <= 0) {
this.stop();
timespan.days
= timespan.hours
= timespan.minutes
= timespan.seconds
= 0;
}
this.units.forEach(function (unit) {
var digits = String(Math.floor(timespan[unit]));
digits = digits.length < 2 ? ("0" + digits) : digits;
var el = this$1[unit];
if (el.textContent !== digits) {
digits = digits.split('');
if (digits.length !== el.children.length) {
html(el, digits.map(function () { return '
'; }).join(''));
}
digits.forEach(function (digit, i) { return el.children[i].textContent = digit; });
}
});
}
},
methods: {
start: function() {
var this$1 = this;
this.stop();
if (this.date && this.units.length) {
this.$emit();
this.timer = setInterval(function () { return this$1.$emit(); }, 1000);
}
},
stop: function() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
}
}
};
function getTimeSpan(date) {
var total = date - Date.now();
return {
total: total,
seconds: total / 1000 % 60,
minutes: total / 1000 / 60 % 60,
hours: total / 1000 / 60 / 60 % 24,
days: total / 1000 / 60 / 60 / 24
};
}
var targetClass = 'uk-animation-target';
var Animate = {
props: {
animation: Number
},
data: {
animation: 150
},
computed: {
target: function() {
return this.$el;
}
},
methods: {
animate: function(action) {
var this$1 = this;
addStyle();
var children = toNodes(this.target.children);
var propsFrom = children.map(function (el) { return getProps(el, true); });
var oldHeight = height(this.target);
var oldScrollY = window.pageYOffset;
action();
Transition.cancel(this.target);
children.forEach(Transition.cancel);
reset(this.target);
this.$update(this.target);
fastdom.flush();
var newHeight = height(this.target);
children = children.concat(toNodes(this.target.children).filter(function (el) { return !includes(children, el); }));
var propsTo = children.map(function (el, i) { return el.parentNode && i in propsFrom
? propsFrom[i]
? isVisible(el)
? getPositionWithMargin(el)
: {opacity: 0}
: {opacity: isVisible(el) ? 1 : 0}
: false; }
);
propsFrom = propsTo.map(function (props, i) {
var from = children[i].parentNode === this$1.target
? propsFrom[i] || getProps(children[i])
: false;
if (from) {
if (!props) {
delete from.opacity;
} else if (!('opacity' in props)) {
var opacity = from.opacity;
if (opacity % 1) {
props.opacity = 1;
} else {
delete from.opacity;
}
}
}
return from;
});
addClass(this.target, targetClass);
children.forEach(function (el, i) { return propsFrom[i] && css(el, propsFrom[i]); });
css(this.target, 'height', oldHeight);
scrollTop(window, oldScrollY);
return Promise.all(children.map(function (el, i) { return propsFrom[i] && propsTo[i]
? Transition.start(el, propsTo[i], this$1.animation, 'ease')
: Promise.resolve(); }
).concat(Transition.start(this.target, {height: newHeight}, this.animation, 'ease'))).then(function () {
children.forEach(function (el, i) { return css(el, {display: propsTo[i].opacity === 0 ? 'none' : '', zIndex: ''}); });
reset(this$1.target);
this$1.$update(this$1.target);
fastdom.flush(); // needed for IE11
}, noop);
}
}
};
function getProps(el, opacity) {
var zIndex = css(el, 'zIndex');
return isVisible(el)
? assign({
display: '',
opacity: opacity ? css(el, 'opacity') : '0',
pointerEvents: 'none',
position: 'absolute',
zIndex: zIndex === 'auto' ? index(el) : zIndex
}, getPositionWithMargin(el))
: false;
}
function reset(el) {
css(el.children, {
height: '',
left: '',
opacity: '',
pointerEvents: '',
position: '',
top: '',
width: ''
});
removeClass(el, targetClass);
css(el, 'height', '');
}
function getPositionWithMargin(el) {
var ref = el.getBoundingClientRect();
var height$$1 = ref.height;
var width$$1 = ref.width;
var ref$1 = position(el);
var top = ref$1.top;
var left = ref$1.left;
top += toFloat(css(el, 'marginTop'));
return {top: top, left: left, height: height$$1, width: width$$1};
}
var style$1;
function addStyle() {
if (!style$1) {
style$1 = append(document.head, '",r.appendChild(d.childNodes[1])}return e&&t.extend(i,e),this.each(function(){var e=['iframe[src*="player.vimeo.com"]','iframe[src*="youtube.com"]','iframe[src*="youtube-nocookie.com"]','iframe[src*="kickstarter.com"][src*="video.html"]',"object","embed"];i.customSelector&&e.push(i.customSelector);var r=".fitvidsignore";i.ignore&&(r=r+", "+i.ignore);var a=t(this).find(e.join(","));a=a.not("object object"),a=a.not(r),a.each(function(){var e=t(this);if(!(e.parents(r).length>0||"embed"===this.tagName.toLowerCase()&&e.parent("object").length||e.parent(".fluid-width-video-wrapper").length)){e.css("height")||e.css("width")||!isNaN(e.attr("height"))&&!isNaN(e.attr("width"))||(e.attr("height",9),e.attr("width",16));var i="object"===this.tagName.toLowerCase()||e.attr("height")&&!isNaN(parseInt(e.attr("height"),10))?parseInt(e.attr("height"),10):e.height(),a=isNaN(parseInt(e.attr("width"),10))?e.width():parseInt(e.attr("width"),10),d=i/a;if(!e.attr("name")){var o="fitvid"+t.fn.fitVids._count;e.attr("name",o),t.fn.fitVids._count++}e.wrap('
').parent(".fluid-width-video-wrapper").css("padding-top",100*d+"%"),e.removeAttr("height").removeAttr("width")}})})},t.fn.fitVids._count=0}(window.jQuery||window.Zepto);
;
!function(e){FLTheme={init:function(){this._bind()},_bind:function(){var a=this;e(".navbar-toggle").on("click",this.navbarToggleClick),0!=e(".fl-page-bar-nav ul.sub-menu").length&&(this._setupDropDowns(),this._enableTopNavDropDowns()),0!=e(".fl-page-nav ul.sub-menu").length&&(e(window).on("resize.fl-page-nav-sub-menu",e.throttle(500,this._enablePageNavDropDowns)),this._setupDropDowns(),this._enablePageNavDropDowns()),0!=e(".fl-page-nav ul.menu").length&&(e(".fl-page-nav ul.menu").find(".menu-item").on("click",'> a[href*="#"]:not([href="#"])',this._setupCurrentNavItem),this._setupCurrentNavItem()),0!=e(".fl-page-nav-search").length&&e(".fl-page-nav-search a.fa-search").on("click",this._toggleNavSearch),0!=e(".fl-nav-vertical").length&&(e(window).on("resize",e.throttle(500,this._navVertical)),this._navVertical()),0!=e(".fl-fixed-width.fl-nav-vertical-right").length&&(e(window).on("resize",e.throttle(500,this._updateVerticalRightPos)),this._updateVerticalRightPos()),0!=e(".fl-page-nav-centered-inline-logo").length&&(e(window).on("resize",e.throttle(500,this._centeredInlineLogo)),this._centeredInlineLogo()),0!=e("body.fl-nav-left").length&&(e(window).on("resize",e.throttle(500,this._navLeft)),this._navLeft()),0!=e("body.fl-shrink").length&&0==e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._shrinkHeaderEnable)),this._shrinkHeaderInit(),this._shrinkHeaderEnable()),0!=e(".fl-page-header-fixed").length&&(e(window).on("resize.fl-page-header-fixed",e.throttle(500,this._enableFixedHeader)),this._enableFixedHeader()),0!=e("body.fl-fixed-header").length&&0==e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._fixedHeader)),this._fixedHeader()),0!=e("body.fl-scroll-header").length&&0==e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._scrollHeader)),this._scrollHeader()),0!=e(".fl-page-header-primary").find("li.mega-menu").length&&(e(window).on("resize",e.throttle(500,this._megaMenu)),this._megaMenu()),0!=e(".fl-page-header-fixed").length&&(e(window).on("scroll.fl-mega-menu-on-scroll",e.throttle(500,this._megaMenuOnScroll)),e(window).on("resize.fl-mega-menu-on-scroll",e.throttle(500,this._megaMenuOnScroll))),0!=e("html.fl-builder-edit").length&&this._fixedHeadersWhenBuilderActive(),0!=e("body.fl-nav-mobile-offcanvas").length&&0!=!e("html.fl-builder-edit").length&&(e(window).on("resize",e.throttle(500,this._setupMobileNavLayout)),this._setupMobileNavLayout(),this._toggleMobileNavLayout()),e("body").on("click",this.closeMenu),e(".fl-theme-menu > li:last-child").on("focusout",function(l){void 0!==e(l.relatedTarget)[0]&&"nav-link"===e(l.relatedTarget)[0].className||a.closeMenu(l)}),0!=e(".fl-full-width.fl-footer-effect").length&&(e(window).on("resize",e.throttle(500,this._footerEffect)),this._footerEffect()),0!=e("body.fl-scroll-to-top").length&&this._toTop(),"undefined"!=typeof e("body").magnificPopup&&this._enableLightbox(),"undefined"==typeof e.fn.fitVids||e("body").hasClass("fl-builder")||this._enableFitVids(),FLTheme._navBackiosFix(),this._initSmoothScroll()},_isMobile:function(){return/Mobile|Android|Silk\/|Kindle|BlackBerry|Opera Mini|Opera Mobi|webOS/i.test(navigator.userAgent)},_initRetinaImages:function(){var a=window.devicePixelRatio?window.devicePixelRatio:1;a>1&&e("img[data-retina]").each(FLTheme._convertImageToRetina)},_convertImageToRetina:function(){var a=e(this),l=new Image,n=a.attr("src"),t=a.data("retina");if("undefined"==typeof n&&(n=a.data("cfsrc")),"undefined"==typeof n)return!1;var o=n.split(".").pop();""!=t&&(l.onload=function(){var e=l.width,n=l.height;"svg"==o&&(e=a.width(),n=a.height()),a.width(e),a.attr("src",t)},l.src=n)},_initMobileHeaderLogo:function(){this._enableMobileLogo(),e(window).on("resize",e.proxy(this._enableMobileLogo,this))},_enableMobileLogo:function(){var a=e(window),l=e(".fl-page-header-logo"),n=l.find("img[data-mobile]"),t=null,o=null,i=null;0!==n.length&&e(n).each(function(){i=new Image,t=e(this),src=t.attr("src"),o=t.data("mobile"),t.attr("src",""),t.attr("data-src",src),a.width()
li"),n=a.find("> li").has("> ul.sub-menu").find(".fl-submenu-toggle-icon");FLTheme._isMobile()?!1!==/iPhone|iPad/i.test(navigator.userAgent)?l.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout):(l.hover(function(){},FLTheme._navItemMouseout),n.on("click",FLTheme._navSubMenuToggleClick)):l.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout)},_navBackiosFix:function(){ipad=null!==navigator.userAgent.match("iPhone|iPad")&&e(".menu-item-has-children").length>0,!1!==ipad&&(window.onpageshow=function(e){e.persisted&&window.location.reload()})},_initSmoothScroll:function(){"undefined"!=typeof FLBuilderLayout&&("undefined"!=typeof window.themeopts.smooth&&"disabled"===window.themeopts.smooth||location.hash&&e(location.hash).length&&setTimeout(function(){window.scrollTo(0,0),FLBuilderLayout._scrollToElement(e(location.hash))},1))},_enablePageNavDropDowns:function(){var a=e(".fl-page-header");a.each(FLTheme._enablePageNavDropDown)},_enablePageNavDropDown:function(){var a=e(this),l=a.find(".fl-page-nav .fl-page-nav-collapse"),n=l.find("ul li"),t=l.find("li").has("> ul.sub-menu").find("> a"),o=(l.find("li").has("> ul.sub-menu").find(".fl-submenu-toggle-icon"),l.find("> ul > li").has("ul.sub-menu"));e(".fl-page-nav .navbar-toggle").is(":visible")?(n.off("mouseenter mouseleave"),e("body").hasClass("fl-submenu-toggle")&&(o=l.find("> ul li").has("ul.sub-menu")),o.find("> a").off().on("click",FLTheme._navItemClickMobile),o.find(".fl-submenu-toggle-icon").off().on("click",FLTheme._navItemClickMobile),l.find(".menu").on("click",'.menu-item > a[href*="#"]',FLTheme._toggleForMobile),t.off("click",FLTheme._navSubMenuToggleClick)):(l.find("a").off("click",FLTheme._navItemClickMobile),l.find("a").off("click",FLTheme._toggleForMobile),l.find(".fl-submenu-toggle-icon").off("click",FLTheme._navItemClickMobile),l.removeClass("in").addClass("collapse"),n.removeClass("fl-mobile-sub-menu-open"),n.find("a").width(0).width("auto"),FLTheme._isMobile()?(n.hover(function(){},FLTheme._navItemMouseout),t.on("click",FLTheme._navSubMenuToggleClick)):(n.keydown(function(a){9===a.keyCode&&(el=e(this),focused=el.find(":focus"),focused.parent().is(":last-child")&&(sub=focused.parent().find("ul.sub-menu").first(),mega=focused.parent().parent().parent().parent().parent().hasClass("mega-menu"),mega_last=focused.parent().parent().parent().is(":last-child"),sub.length>0?sub.trigger("mouseenter"):mega&&!mega_last||el.trigger("mouseleave")),parent=focused.closest("ul.sub-menu").parent(),parent.hasClass("fl-sub-menu-open")||focused.trigger("mouseenter"))}),n.hover(FLTheme._navItemMouseover,FLTheme._navItemMouseout)))},_navItemClickMobile:function(a){var l=e(this).closest(".fl-page-nav-collapse"),n=e(this).closest("li"),t=e(this).attr("href"),o=n.find("ul.sub-menu"),i=e(a.target).hasClass("fl-submenu-toggle-icon"),s=null;if(t&&"#"!==t){var r=t.split("#")[1];e("body").find("#"+r).length>0&&n.hasClass("fl-mobile-sub-menu-open")&&(el=e(this).parent().closest("nav").find(".navbar-toggle"),el.trigger("click"),"undefined"!=typeof FLBuilderLayout&&"undefined"==typeof window.themeopts.smooth&&"disabled"!==window.themeopts.smooth&&setTimeout(function(){window.scrollTo(0,0),FLBuilderLayout._scrollToElement(e("#"+r))},1))}("#"==t||i)&&n.hasClass("fl-mobile-sub-menu-open")?(a.preventDefault(),n.removeClass("fl-mobile-sub-menu-open"),o.hide()):n.hasClass("fl-mobile-sub-menu-open")||(a.preventDefault(),n.addClass("fl-mobile-sub-menu-open"),i&&0===e(".fl-submenu-toggle").length&&(s=o.find("li.menu-item-has-children"),s.addClass("fl-mobile-sub-menu-open")),o.fadeIn(200)),0!=e(".fl-nav-collapse-menu").length&&l.find("li.fl-mobile-sub-menu-open").not(e(this).parents(".fl-mobile-sub-menu-open")).not(s).removeClass("fl-mobile-sub-menu-open").find("ul.sub-menu").hide(),a.stopPropagation()},_setupCurrentNavItem:function(a){var l=e(".fl-page-nav .navbar-nav"),n="undefined"!=typeof a?e(a.target).prop("hash"):window.location.hash,n=n.replace(/(:|\.|\[|\]|,|=|@|\/)/g,"\\$1"),t=n.length?l.find("a[href*=\\"+n+"]:not([href=\\#])"):null,o=l.closest(".fl-page-nav").find(".fl-offcanvas-close");null!=t&&e("body").find(n).length>0&&(e(".current-menu-item").removeClass("current-menu-item"),t.parent().addClass("current-menu-item"),o&&o.trigger("click"))},_navItemMouseover:function(){if(0!==e(this).find("ul.sub-menu").length){var a=e(this),l=a.parent(),n=a.find("ul.sub-menu"),t=n.width(),o=0,i=e(window).width(),s=0,r=0;if(0!==a.closest(".fl-sub-menu-right").length?a.addClass("fl-sub-menu-right"):e("body").hasClass("rtl")?(o=l.is("ul.sub-menu")?l.offset().left-t:a.offset().left-t,o<=0&&a.addClass("fl-sub-menu-right")):(o=l.is("ul.sub-menu")?l.offset().left+2*t:a.offset().left+t,o>i&&a.addClass("fl-sub-menu-right")),a.addClass("fl-sub-menu-open"),a.hasClass("hide-heading")||(n.hide(),n.stop().fadeIn(200)),FLTheme._hideNavSearch(),0!==a.closest(".fl-page-nav-collapse").length&&a.hasClass("mega-menu")){if(a.find(".mega-menu-spacer").length>0)return;n.first().before(''),s=a.find(".mega-menu-spacer").offset().top,r=n.first().offset().top,a.find(".mega-menu-spacer").css("padding-top",Math.floor(parseInt(r-s))+"px")}}},_navItemMouseout:function(){var a=e(this),l=a.find("ul.sub-menu");a.hasClass("hide-heading")?FLTheme._navItemMouseoutComplete():l.stop().fadeOut({duration:200,done:FLTheme._navItemMouseoutComplete})},_navItemMouseoutComplete:function(){var a=e(this).parent();a.removeClass("fl-sub-menu-open"),a.removeClass("fl-sub-menu-right"),a.find(".mega-menu-spacer").length>0&&a.find(".mega-menu-spacer").remove(),e(this).show()},_navSubMenuToggleClick:function(a){var l=e(this).closest("li").eq(0);l.hasClass("fl-sub-menu-open")||(FLTheme._navItemMouseover.apply(l[0]),a.preventDefault())},_toggleForMobile:function(a){var l=e(".fl-page-nav .fl-page-nav-collapse"),n=e(this).attr("href"),t=e(this).closest("li").hasClass("menu-item-has-children");if("#"!==n){var o=n.split("#")[1];e("body").find("#"+o).length>0&&!t&&(e.isFunction(l.collapse)?l.collapse("hide"):(el=e(this).parent().closest("nav").find(".navbar-toggle"),el.trigger("click")))}},_toggleNavSearch:function(a){var l=e(".fl-page-nav-search form");a.preventDefault(),l.is(":visible")?l.stop().fadeOut(200):(l.stop().fadeIn(200),e("body").on("click.fl-page-nav-search",FLTheme._hideNavSearch),e(".fl-page-nav-search .fl-search-input").focus())},_hideNavSearch:function(a){var l=e(".fl-page-nav-search form");void 0!==a&&e(a.target).closest(".fl-page-nav-search").length>0||(l.stop().fadeOut(200),e("body").off("click.fl-page-nav-search"))},_navVertical:function(){var a=e(window);a.width()>=window.themeopts.medium_breakpoint&&e(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&(e("body").toggleClass("fl-nav-vertical"),e("body").hasClass("fl-nav-vertical-left")&&e("body").toggleClass("fl-nav-vertical-left"),e("body").hasClass("fl-nav-vertical-right")&&e("body").toggleClass("fl-nav-vertical-right"))},_updateVerticalRightPos:function(){var a=e(window).width(),l=e(".fl-page").width(),n=(a-l)/2;e(".fl-page-header-vertical").css("right",n)},_navLeft:function(){var a=e(window);(a.width()=window.themeopts.medium_breakpoint&&!e(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&e(".fl-page-header-primary .fl-page-nav-col").insertBefore(".fl-page-header-primary .fl-page-logo-wrap"),0==e(".fl-page-header-fixed").length||e(".fl-page-header-fixed").hasClass("fl-page-nav-toggle-visible-always")||e(".fl-page-header-fixed .fl-page-fixed-nav-wrap").insertBefore(".fl-page-header-fixed .fl-page-logo-wrap")},_shrinkHeaderInit:function(){var a=e(window).scrollTop(),l=250,n=e(".fl-page-header");e("body").addClass("fl-shrink-header-enabled"),"scrollRestoration"in history&&(history.scrollRestoration="manual"),e(".fl-page-header-logo").imagesLoaded(function(){var t=e(".fl-logo-img"),o=t.height();"undefined"!=typeof t.data("origHeight")&&(o=parseInt(t.data("origHeight"))),t.css("max-height",o),setTimeout(function(){e(".fl-page-header").addClass("fl-shrink-header-transition"),a>l?n.addClass("fl-shrink-header"):n.removeClass("fl-shrink-header")},100)})},_shrinkHeaderEnable:function(){var a=e(window);if(a.width()>=window.themeopts.medium_breakpoint){var l=e(".fl-page-header"),n=l.outerHeight(),t=e(".fl-page-bar"),o=0,i=0;0!=t.length?(o+=t.outerHeight(),i=o+n,0!=e("body.admin-bar").length&&(o+=32),l.css("top",o)):i=n,l.prevAll(".fl-builder-content").length>0&&(FLTheme._initThemerLayoutFix(),i=t.outerHeight()),0===e(".fl-header-padding-top-custom").length&&e(".fl-page").css("padding-top",i),e(a).on("scroll.fl-shrink-header",FLTheme._shrinkHeader)}else e(".fl-page-header").css("top",0),e(".fl-page").css("padding-top",0),e(a).off("scroll.fl-shrink-header")},_shrinkHeader:function(){var a=e(this).scrollTop(),l=250,n=e(".fl-page-header"),t=null;e(".fl-page-header-logo").imagesLoaded(function(){t=e(".fl-logo-img"),"undefined"==typeof t.data("origHeight")&&t.data("origHeight",t.height()),a>l?n.addClass("fl-shrink-header"):n.removeClass("fl-shrink-header"),"undefined"!=typeof n.data("original-top")&&FLTheme._fixThemerLayoutOnScroll()})},_fixedHeader:function(){var a=e(window),l=e(".fl-page-header"),n=0,t=0,o=e(".fl-page-bar"),i=0;if(a.width()>=window.themeopts.medium_breakpoint){if(n=l.outerHeight(),0!=o.length){if(i=o.outerHeight(),t=i+n,0!=e("body.admin-bar").length&&(i+=32),0!=e("html.fl-builder-edit").length);l.css("top",i)}else t=n;l.prevAll(".fl-builder-content").length>0&&(FLTheme._initThemerLayoutFix(),t=o.outerHeight(),e(a).on("scroll.fl-fixed-header",FLTheme._fixThemerLayoutOnScroll)),0===e("body.fl-scroll-header").length&&0===e(".fl-header-padding-top-custom").length&&e(".fl-page").css("padding-top",t),e(a).trigger("scroll")}else e(".fl-page-header").css("top",0),e(".fl-page").css("padding-top",0),e(a).off("scroll.fl-fixed-header")},_enableFixedHeader:function(){var a=e(window);a.width()=n?l.css("position","fixed"):l.css("position","initial"),"undefined"!=typeof Waypoint&&Waypoint.refreshAll())},_toggleFixedHeader:function(){var a=e(window),l=e(".fl-page-header-fixed"),n=l.is(":visible"),t=e(".fl-page-header-primary"),o=!1;o=0===t.length?a.scrollTop()>200:a.scrollTop()>t.height()+t.offset().top,o&&!n?l.stop().fadeIn(200):!o&&n&&l.stop().hide()},_centeredInlineLogo:function(){var a=e(window),l=e(".fl-page-nav-centered-inline-logo .fl-page-header-logo"),n=e(".fl-logo-centered-inline > .fl-page-header-logo"),t=e(".fl-page-nav-centered-inline-logo .fl-page-nav .navbar-nav"),o=t.children("li").length,i=Math.round(o/2)-1;a.width()>=window.themeopts.medium_breakpoint&&n.length<1&&!e(".fl-page-header-primary").hasClass("fl-page-nav-toggle-visible-always")&&(l.hasClass("fl-inline-logo-left")&&o%2!=0?t.children("li:nth( "+i+" )").before(''):t.children("li:nth( "+i+" )").after(''),t.children(".fl-logo-centered-inline").append(l)),a.width()=window.themeopts.medium_breakpoint?a.on("scroll.fl-show-header-on-scroll",function(){e(this).scrollTop()>n?l.addClass("fl-show"):(l.removeClass("fl-show"),e(".fl-responsive-nav-enabled").length&&(t=2*e(".fl-page-header-primary").height(),0!=e(".fl-page-bar").length&&(t+=e(".fl-page-bar").height()),"undefined"!=typeof e(".fl-nav-offcanvas-collapse").css("top")&&(t+=parseInt(e(".fl-nav-offcanvas-collapse").css("top")))),e(".fl-nav-offcanvas-active").length&&t>0&&e(".fl-nav-offcanvas-collapse").css({transform:"translateY("+t+"px)","-ms-transform":"translateY("+t+"px)","-webkit-transform":"translateY("+t+"px)"}))}):(a.off("scroll.fl-show-header-on-scroll"),e(".fl-nav-offcanvas-collapse").css("transform",""))},_megaMenu:function(){var a=(e(window),e(".fl-page-header")),l=a.find(".fl-page-header-container"),n=l.outerWidth(),t=null,o=0;a.find("li.mega-menu, li.mega-menu-disabled").each(function(){t=e(this),o=t.find("> ul.sub-menu").outerWidth(),"undefined"!=typeof t.data("megamenu-width")&&(o=t.data("megamenu-width")),t.hasClass("mega-menu")&&n ul.sub-menu").css("display","block"),t.removeClass("mega-menu"),t.hasClass("mega-menu-disabled")||t.addClass("mega-menu-disabled")):t.hasClass("mega-menu-disabled")&&n>=o&&(t.find("> ul.sub-menu").css("display",""),t.removeClass("mega-menu-disabled"),t.hasClass("mega-menu")||t.addClass("mega-menu"),t.addClass("mega-menu-items-"+t.children("ul").children("li").length))})},_megaMenuOnScroll:function(){var a=e(window),l=e(".fl-page-header-fixed"),n=l.find(".fl-page-header-container"),t=l.is(":visible"),o=null,i=null;t&&(l.find("li.mega-menu").each(function(){o=e(this),i=o.find("> ul.sub-menu"),n.outerWidth() '),r&&0===e(".fl-offcanvas-opacity").length&&o.append('