var pJS=function(tag_id, params){
var canvas_el=document.querySelector('#'+tag_id+' > .particles-js-canvas-el');
this.pJS={
canvas: {
el: canvas_el,
w: canvas_el.offsetWidth,
h: canvas_el.offsetHeight
},
particles: {
number: {
value: 400,
density: {
enable: true,
value_area: 800
}},
color: {
value: '#fff'
},
shape: {
type: 'circle',
stroke: {
width: 0,
color: '#ff0000'
},
polygon: {
nb_sides: 5
},
image: {
src: '',
width: 100,
height: 100
}},
opacity: {
value: 1,
random: false,
anim: {
enable: false,
speed: 2,
opacity_min: 0,
sync: false
}},
size: {
value: 20,
random: false,
anim: {
enable: false,
speed: 20,
size_min: 0,
sync: false
}},
line_linked: {
enable: true,
distance: 100,
color: '#fff',
opacity: 1,
width: 1
},
move: {
enable: true,
speed: 2,
direction: 'none',
random: false,
straight: false,
out_mode: 'out',
bounce: false,
attract: {
enable: false,
rotateX: 3000,
rotateY: 3000
}},
array: []
},
interactivity: {
detect_on: 'canvas',
events: {
onhover: {
enable: true,
mode: 'grab'
},
onclick: {
enable: true,
mode: 'push'
},
resize: true
},
modes: {
grab:{
distance: 100,
line_linked:{
opacity: 1
}},
bubble:{
distance: 200,
size: 80,
duration: 0.4
},
repulse:{
distance: 200,
duration: 0.4
},
push:{
particles_nb: 4
},
remove:{
particles_nb: 2
}},
mouse:{}},
retina_detect: false,
fn: {
interact: {},
modes: {},
vendors:{}},
tmp: {}};
var pJS=this.pJS;
if(params){
Object.deepExtend(pJS, params);
}
pJS.tmp.obj={
size_value: pJS.particles.size.value,
size_anim_speed: pJS.particles.size.anim.speed,
move_speed: pJS.particles.move.speed,
line_linked_distance: pJS.particles.line_linked.distance,
line_linked_width: pJS.particles.line_linked.width,
mode_grab_distance: pJS.interactivity.modes.grab.distance,
mode_bubble_distance: pJS.interactivity.modes.bubble.distance,
mode_bubble_size: pJS.interactivity.modes.bubble.size,
mode_repulse_distance: pJS.interactivity.modes.repulse.distance
};
pJS.fn.retinaInit=function(){
if(pJS.retina_detect&&window.devicePixelRatio > 1){
pJS.canvas.pxratio=window.devicePixelRatio;
pJS.tmp.retina=true;
}else{
pJS.canvas.pxratio=1;
pJS.tmp.retina=false;
}
pJS.canvas.w=pJS.canvas.el.offsetWidth * pJS.canvas.pxratio;
pJS.canvas.h=pJS.canvas.el.offsetHeight * pJS.canvas.pxratio;
pJS.particles.size.value=pJS.tmp.obj.size_value * pJS.canvas.pxratio;
pJS.particles.size.anim.speed=pJS.tmp.obj.size_anim_speed * pJS.canvas.pxratio;
pJS.particles.move.speed=pJS.tmp.obj.move_speed * pJS.canvas.pxratio;
pJS.particles.line_linked.distance=pJS.tmp.obj.line_linked_distance * pJS.canvas.pxratio;
pJS.interactivity.modes.grab.distance=pJS.tmp.obj.mode_grab_distance * pJS.canvas.pxratio;
pJS.interactivity.modes.bubble.distance=pJS.tmp.obj.mode_bubble_distance * pJS.canvas.pxratio;
pJS.particles.line_linked.width=pJS.tmp.obj.line_linked_width * pJS.canvas.pxratio;
pJS.interactivity.modes.bubble.size=pJS.tmp.obj.mode_bubble_size * pJS.canvas.pxratio;
pJS.interactivity.modes.repulse.distance=pJS.tmp.obj.mode_repulse_distance * pJS.canvas.pxratio;
};
pJS.fn.canvasInit=function(){
pJS.canvas.ctx=pJS.canvas.el.getContext('2d');
};
pJS.fn.canvasSize=function(){
pJS.canvas.el.width=pJS.canvas.w;
pJS.canvas.el.height=pJS.canvas.h;
if(pJS&&pJS.interactivity.events.resize){
window.addEventListener('resize', function(){
pJS.canvas.w=pJS.canvas.el.offsetWidth;
pJS.canvas.h=pJS.canvas.el.offsetHeight;
if(pJS.tmp.retina){
pJS.canvas.w *=pJS.canvas.pxratio;
pJS.canvas.h *=pJS.canvas.pxratio;
}
pJS.canvas.el.width=pJS.canvas.w;
pJS.canvas.el.height=pJS.canvas.h;
if(!pJS.particles.move.enable){
pJS.fn.particlesEmpty();
pJS.fn.particlesCreate();
pJS.fn.particlesDraw();
pJS.fn.vendors.densityAutoParticles();
}
pJS.fn.vendors.densityAutoParticles();
});
}};
pJS.fn.canvasPaint=function(){
pJS.canvas.ctx.fillRect(0, 0, pJS.canvas.w, pJS.canvas.h);
};
pJS.fn.canvasClear=function(){
pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h);
};
pJS.fn.particle=function(color, opacity, position){
this.radius=(pJS.particles.size.random ? Math.random():1) * pJS.particles.size.value;
if(pJS.particles.size.anim.enable){
this.size_status=false;
this.vs=pJS.particles.size.anim.speed / 100;
if(!pJS.particles.size.anim.sync){
this.vs=this.vs * Math.random();
}}
this.x=position ? position.x:Math.random() * pJS.canvas.w;
this.y=position ? position.y:Math.random() * pJS.canvas.h;
if(this.x > pJS.canvas.w - this.radius*2) this.x=this.x - this.radius;
else if(this.x < this.radius*2) this.x=this.x + this.radius;
if(this.y > pJS.canvas.h - this.radius*2) this.y=this.y - this.radius;
else if(this.y < this.radius*2) this.y=this.y + this.radius;
if(pJS.particles.move.bounce){
pJS.fn.vendors.checkOverlap(this, position);
}
this.color={};
if(typeof(color.value)=='object'){
if(color.value instanceof Array){
var color_selected=color.value[Math.floor(Math.random() * pJS.particles.color.value.length)];
this.color.rgb=hexToRgb(color_selected);
}else{
if(color.value.r!=undefined&&color.value.g!=undefined&&color.value.b!=undefined){
this.color.rgb={
r: color.value.r,
g: color.value.g,
b: color.value.b
}}
if(color.value.h!=undefined&&color.value.s!=undefined&&color.value.l!=undefined){
this.color.hsl={
h: color.value.h,
s: color.value.s,
l: color.value.l
}}
}}
else if(color.value=='random'){
this.color.rgb={
r: (Math.floor(Math.random() * (255 - 0 + 1)) + 0),
g: (Math.floor(Math.random() * (255 - 0 + 1)) + 0),
b: (Math.floor(Math.random() * (255 - 0 + 1)) + 0)
}}
else if(typeof(color.value)=='string'){
this.color=color;
this.color.rgb=hexToRgb(this.color.value);
}
this.opacity=(pJS.particles.opacity.random ? Math.random():1) * pJS.particles.opacity.value;
if(pJS.particles.opacity.anim.enable){
this.opacity_status=false;
this.vo=pJS.particles.opacity.anim.speed / 100;
if(!pJS.particles.opacity.anim.sync){
this.vo=this.vo * Math.random();
}}
var velbase={}
switch(pJS.particles.move.direction){
case 'top':
velbase={ x:0, y:-1 };
break;
case 'top-right':
velbase={ x:0.5, y:-0.5 };
break;
case 'right':
velbase={ x:1, y:-0 };
break;
case 'bottom-right':
velbase={ x:0.5, y:0.5 };
break;
case 'bottom':
velbase={ x:0, y:1 };
break;
case 'bottom-left':
velbase={ x:-0.5, y:1 };
break;
case 'left':
velbase={ x:-1, y:0 };
break;
case 'top-left':
velbase={ x:-0.5, y:-0.5 };
break;
default:
velbase={ x:0, y:0 };
break;
}
if(pJS.particles.move.straight){
this.vx=velbase.x;
this.vy=velbase.y;
if(pJS.particles.move.random){
this.vx=this.vx * (Math.random());
this.vy=this.vy * (Math.random());
}}else{
this.vx=velbase.x + Math.random()-0.5;
this.vy=velbase.y + Math.random()-0.5;
}
this.vx_i=this.vx;
this.vy_i=this.vy;
var shape_type=pJS.particles.shape.type;
if(typeof(shape_type)=='object'){
if(shape_type instanceof Array){
var shape_selected=shape_type[Math.floor(Math.random() * shape_type.length)];
this.shape=shape_selected;
}}else{
this.shape=shape_type;
}
if(this.shape=='image'){
var sh=pJS.particles.shape;
this.img={
src: sh.image.src,
ratio: sh.image.width / sh.image.height
}
if(!this.img.ratio) this.img.ratio=1;
if(pJS.tmp.img_type=='svg'&&pJS.tmp.source_svg!=undefined){
pJS.fn.vendors.createSvgImg(this);
if(pJS.tmp.pushing){
this.img.loaded=false;
}}
}};
pJS.fn.particle.prototype.draw=function(){
var p=this;
if(p.radius_bubble!=undefined){
var radius=p.radius_bubble;
}else{
var radius=p.radius;
}
if(p.opacity_bubble!=undefined){
var opacity=p.opacity_bubble;
}else{
var opacity=p.opacity;
}
if(p.color.rgb){
var color_value='rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+opacity+')';
}else{
var color_value='hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+opacity+')';
}
pJS.canvas.ctx.fillStyle=color_value;
pJS.canvas.ctx.beginPath();
switch(p.shape){
case 'circle':
pJS.canvas.ctx.arc(p.x, p.y, radius, 0, Math.PI * 2, false);
break;
case 'edge':
pJS.canvas.ctx.rect(p.x-radius, p.y-radius, radius*2, radius*2);
break;
case 'triangle':
pJS.fn.vendors.drawShape(pJS.canvas.ctx, p.x-radius, p.y+radius / 1.66, radius*2, 3, 2);
break;
case 'polygon':
pJS.fn.vendors.drawShape(pJS.canvas.ctx,
p.x - radius / (pJS.particles.shape.polygon.nb_sides/3.5),
p.y - radius / (2.66/3.5),
radius*2.66 / (pJS.particles.shape.polygon.nb_sides/3),
pJS.particles.shape.polygon.nb_sides,
1 
);
break;
case 'star':
pJS.fn.vendors.drawShape(pJS.canvas.ctx,
p.x - radius*2 / (pJS.particles.shape.polygon.nb_sides/4),
p.y - radius / (2*2.66/3.5),
radius*2*2.66 / (pJS.particles.shape.polygon.nb_sides/3),
pJS.particles.shape.polygon.nb_sides,
2 
);
break;
case 'image':
function draw(){
pJS.canvas.ctx.drawImage(img_obj,
p.x-radius,
p.y-radius,
radius*2,
radius*2 / p.img.ratio
);
}
if(pJS.tmp.img_type=='svg'){
var img_obj=p.img.obj;
}else{
var img_obj=pJS.tmp.img_obj;
}
if(img_obj){
draw();
}
break;
}
pJS.canvas.ctx.closePath();
if(pJS.particles.shape.stroke.width > 0){
pJS.canvas.ctx.strokeStyle=pJS.particles.shape.stroke.color;
pJS.canvas.ctx.lineWidth=pJS.particles.shape.stroke.width;
pJS.canvas.ctx.stroke();
}
pJS.canvas.ctx.fill();
};
pJS.fn.particlesCreate=function(){
for(var i=0; i < pJS.particles.number.value; i++){
pJS.particles.array.push(new pJS.fn.particle(pJS.particles.color, pJS.particles.opacity.value));
}};
pJS.fn.particlesUpdate=function(){
for(var i=0; i < pJS.particles.array.length; i++){
var p=pJS.particles.array[i];
if(pJS.particles.move.enable){
var ms=pJS.particles.move.speed/2;
p.x +=p.vx * ms;
p.y +=p.vy * ms;
}
if(pJS.particles.opacity.anim.enable){
if(p.opacity_status==true){
if(p.opacity >=pJS.particles.opacity.value) p.opacity_status=false;
p.opacity +=p.vo;
}else{
if(p.opacity <=pJS.particles.opacity.anim.opacity_min) p.opacity_status=true;
p.opacity -=p.vo;
}
if(p.opacity < 0) p.opacity=0;
}
if(pJS.particles.size.anim.enable){
if(p.size_status==true){
if(p.radius >=pJS.particles.size.value) p.size_status=false;
p.radius +=p.vs;
}else{
if(p.radius <=pJS.particles.size.anim.size_min) p.size_status=true;
p.radius -=p.vs;
}
if(p.radius < 0) p.radius=0;
}
if(pJS.particles.move.out_mode=='bounce'){
var new_pos={
x_left: p.radius,
x_right:  pJS.canvas.w,
y_top: p.radius,
y_bottom: pJS.canvas.h
}}else{
var new_pos={
x_left: -p.radius,
x_right: pJS.canvas.w + p.radius,
y_top: -p.radius,
y_bottom: pJS.canvas.h + p.radius
}}
if(p.x - p.radius > pJS.canvas.w){
p.x=new_pos.x_left;
p.y=Math.random() * pJS.canvas.h;
}
else if(p.x + p.radius < 0){
p.x=new_pos.x_right;
p.y=Math.random() * pJS.canvas.h;
}
if(p.y - p.radius > pJS.canvas.h){
p.y=new_pos.y_top;
p.x=Math.random() * pJS.canvas.w;
}
else if(p.y + p.radius < 0){
p.y=new_pos.y_bottom;
p.x=Math.random() * pJS.canvas.w;
}
switch(pJS.particles.move.out_mode){
case 'bounce':
if(p.x + p.radius > pJS.canvas.w) p.vx=-p.vx;
else if(p.x - p.radius < 0) p.vx=-p.vx;
if(p.y + p.radius > pJS.canvas.h) p.vy=-p.vy;
else if(p.y - p.radius < 0) p.vy=-p.vy;
break;
}
if(isInArray('grab', pJS.interactivity.events.onhover.mode)){
pJS.fn.modes.grabParticle(p);
}
if(isInArray('bubble', pJS.interactivity.events.onhover.mode)||isInArray('bubble', pJS.interactivity.events.onclick.mode)){
pJS.fn.modes.bubbleParticle(p);
}
if(isInArray('repulse', pJS.interactivity.events.onhover.mode)||isInArray('repulse', pJS.interactivity.events.onclick.mode)){
pJS.fn.modes.repulseParticle(p);
}
if(pJS.particles.line_linked.enable||pJS.particles.move.attract.enable){
for(var j=i + 1; j < pJS.particles.array.length; j++){
var p2=pJS.particles.array[j];
if(pJS.particles.line_linked.enable){
pJS.fn.interact.linkParticles(p,p2);
}
if(pJS.particles.move.attract.enable){
pJS.fn.interact.attractParticles(p,p2);
}
if(pJS.particles.move.bounce){
pJS.fn.interact.bounceParticles(p,p2);
}}
}}
};
pJS.fn.particlesDraw=function(){
pJS.canvas.ctx.clearRect(0, 0, pJS.canvas.w, pJS.canvas.h);
pJS.fn.particlesUpdate();
for(var i=0; i < pJS.particles.array.length; i++){
var p=pJS.particles.array[i];
p.draw();
}};
pJS.fn.particlesEmpty=function(){
pJS.particles.array=[];
};
pJS.fn.particlesRefresh=function(){
cancelRequestAnimFrame(pJS.fn.checkAnimFrame);
cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
pJS.tmp.source_svg=undefined;
pJS.tmp.img_obj=undefined;
pJS.tmp.count_svg=0;
pJS.fn.particlesEmpty();
pJS.fn.canvasClear();
pJS.fn.vendors.start();
};
pJS.fn.interact.linkParticles=function(p1, p2){
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy);
if(dist <=pJS.particles.line_linked.distance){
var opacity_line=pJS.particles.line_linked.opacity - (dist / (1/pJS.particles.line_linked.opacity)) / pJS.particles.line_linked.distance;
if(opacity_line > 0){
var color_line=pJS.particles.line_linked.color_rgb_line;
pJS.canvas.ctx.strokeStyle='rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')';
pJS.canvas.ctx.lineWidth=pJS.particles.line_linked.width;
pJS.canvas.ctx.beginPath();
pJS.canvas.ctx.moveTo(p1.x, p1.y);
pJS.canvas.ctx.lineTo(p2.x, p2.y);
pJS.canvas.ctx.stroke();
pJS.canvas.ctx.closePath();
}}
};
pJS.fn.interact.attractParticles=function(p1, p2){
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy);
if(dist <=pJS.particles.line_linked.distance){
var ax=dx/(pJS.particles.move.attract.rotateX*1000),
ay=dy/(pJS.particles.move.attract.rotateY*1000);
p1.vx -=ax;
p1.vy -=ay;
p2.vx +=ax;
p2.vy +=ay;
}}
pJS.fn.interact.bounceParticles=function(p1, p2){
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy),
dist_p=p1.radius+p2.radius;
if(dist <=dist_p){
p1.vx=-p1.vx;
p1.vy=-p1.vy;
p2.vx=-p2.vx;
p2.vy=-p2.vy;
}}
pJS.fn.modes.pushParticles=function(nb, pos){
pJS.tmp.pushing=true;
for(var i=0; i < nb; i++){
pJS.particles.array.push(new pJS.fn.particle(pJS.particles.color,
pJS.particles.opacity.value,
{
'x': pos ? pos.pos_x:Math.random() * pJS.canvas.w,
'y': pos ? pos.pos_y:Math.random() * pJS.canvas.h
}
)
)
if(i==nb-1){
if(!pJS.particles.move.enable){
pJS.fn.particlesDraw();
}
pJS.tmp.pushing=false;
}}
};
pJS.fn.modes.removeParticles=function(nb){
pJS.particles.array.splice(0, nb);
if(!pJS.particles.move.enable){
pJS.fn.particlesDraw();
}};
pJS.fn.modes.bubbleParticle=function(p){
if(pJS.interactivity.events.onhover.enable&&isInArray('bubble', pJS.interactivity.events.onhover.mode)){
var dx_mouse=p.x - pJS.interactivity.mouse.pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse),
ratio=1 - dist_mouse / pJS.interactivity.modes.bubble.distance;
function init(){
p.opacity_bubble=p.opacity;
p.radius_bubble=p.radius;
}
if(dist_mouse <=pJS.interactivity.modes.bubble.distance){
if(ratio >=0&&pJS.interactivity.status=='mousemove'){
if(pJS.interactivity.modes.bubble.size!=pJS.particles.size.value){
if(pJS.interactivity.modes.bubble.size > pJS.particles.size.value){
var size=p.radius + (pJS.interactivity.modes.bubble.size*ratio);
if(size >=0){
p.radius_bubble=size;
}}else{
var dif=p.radius - pJS.interactivity.modes.bubble.size,
size=p.radius - (dif*ratio);
if(size > 0){
p.radius_bubble=size;
}else{
p.radius_bubble=0;
}}
}
if(pJS.interactivity.modes.bubble.opacity!=pJS.particles.opacity.value){
if(pJS.interactivity.modes.bubble.opacity > pJS.particles.opacity.value){
var opacity=pJS.interactivity.modes.bubble.opacity*ratio;
if(opacity > p.opacity&&opacity <=pJS.interactivity.modes.bubble.opacity){
p.opacity_bubble=opacity;
}}else{
var opacity=p.opacity - (pJS.particles.opacity.value-pJS.interactivity.modes.bubble.opacity)*ratio;
if(opacity < p.opacity&&opacity >=pJS.interactivity.modes.bubble.opacity){
p.opacity_bubble=opacity;
}}
}}
}else{
init();
}
if(pJS.interactivity.status=='mouseleave'){
init();
}}
else if(pJS.interactivity.events.onclick.enable&&isInArray('bubble', pJS.interactivity.events.onclick.mode)){
if(pJS.tmp.bubble_clicking){
var dx_mouse=p.x - pJS.interactivity.mouse.click_pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.click_pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse),
time_spent=(new Date().getTime() - pJS.interactivity.mouse.click_time)/1000;
if(time_spent > pJS.interactivity.modes.bubble.duration){
pJS.tmp.bubble_duration_end=true;
}
if(time_spent > pJS.interactivity.modes.bubble.duration*2){
pJS.tmp.bubble_clicking=false;
pJS.tmp.bubble_duration_end=false;
}}
function process(bubble_param, particles_param, p_obj_bubble, p_obj, id){
if(bubble_param!=particles_param){
if(!pJS.tmp.bubble_duration_end){
if(dist_mouse <=pJS.interactivity.modes.bubble.distance){
if(p_obj_bubble!=undefined) var obj=p_obj_bubble;
else var obj=p_obj;
if(obj!=bubble_param){
var value=p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration);
if(id=='size') p.radius_bubble=value;
if(id=='opacity') p.opacity_bubble=value;
}}else{
if(id=='size') p.radius_bubble=undefined;
if(id=='opacity') p.opacity_bubble=undefined;
}}else{
if(p_obj_bubble!=undefined){
var value_tmp=p_obj - (time_spent * (p_obj - bubble_param) / pJS.interactivity.modes.bubble.duration),
dif=bubble_param - value_tmp;
value=bubble_param + dif;
if(id=='size') p.radius_bubble=value;
if(id=='opacity') p.opacity_bubble=value;
}}
}}
if(pJS.tmp.bubble_clicking){
process(pJS.interactivity.modes.bubble.size, pJS.particles.size.value, p.radius_bubble, p.radius, 'size');
process(pJS.interactivity.modes.bubble.opacity, pJS.particles.opacity.value, p.opacity_bubble, p.opacity, 'opacity');
}}
};
pJS.fn.modes.repulseParticle=function(p){
if(pJS.interactivity.events.onhover.enable&&isInArray('repulse', pJS.interactivity.events.onhover.mode)&&pJS.interactivity.status=='mousemove'){
var dx_mouse=p.x - pJS.interactivity.mouse.pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse);
var normVec={x: dx_mouse/dist_mouse, y: dy_mouse/dist_mouse},
repulseRadius=pJS.interactivity.modes.repulse.distance,
velocity=100,
repulseFactor=clamp((1/repulseRadius)*(-1*Math.pow(dist_mouse/repulseRadius,2)+1)*repulseRadius*velocity, 0, 50);
var pos={
x: p.x + normVec.x * repulseFactor,
y: p.y + normVec.y * repulseFactor
}
if(pJS.particles.move.out_mode=='bounce'){
if(pos.x - p.radius > 0&&pos.x + p.radius < pJS.canvas.w) p.x=pos.x;
if(pos.y - p.radius > 0&&pos.y + p.radius < pJS.canvas.h) p.y=pos.y;
}else{
p.x=pos.x;
p.y=pos.y;
}}
else if(pJS.interactivity.events.onclick.enable&&isInArray('repulse', pJS.interactivity.events.onclick.mode)){
if(!pJS.tmp.repulse_finish){
pJS.tmp.repulse_count++;
if(pJS.tmp.repulse_count==pJS.particles.array.length){
pJS.tmp.repulse_finish=true;
}}
if(pJS.tmp.repulse_clicking){
var repulseRadius=Math.pow(pJS.interactivity.modes.repulse.distance/6, 3);
var dx=pJS.interactivity.mouse.click_pos_x - p.x,
dy=pJS.interactivity.mouse.click_pos_y - p.y,
d=dx*dx + dy*dy;
var force=-repulseRadius / d * 1;
function process(){
var f=Math.atan2(dy,dx);
p.vx=force * Math.cos(f);
p.vy=force * Math.sin(f);
if(pJS.particles.move.out_mode=='bounce'){
var pos={
x: p.x + p.vx,
y: p.y + p.vy
}
if(pos.x + p.radius > pJS.canvas.w) p.vx=-p.vx;
else if(pos.x - p.radius < 0) p.vx=-p.vx;
if(pos.y + p.radius > pJS.canvas.h) p.vy=-p.vy;
else if(pos.y - p.radius < 0) p.vy=-p.vy;
}}
if(d <=repulseRadius){
process();
}}else{
if(pJS.tmp.repulse_clicking==false){
p.vx=p.vx_i;
p.vy=p.vy_i;
}}
}}
pJS.fn.modes.grabParticle=function(p){
if(pJS.interactivity.events.onhover.enable&&pJS.interactivity.status=='mousemove'){
var dx_mouse=p.x - pJS.interactivity.mouse.pos_x,
dy_mouse=p.y - pJS.interactivity.mouse.pos_y,
dist_mouse=Math.sqrt(dx_mouse*dx_mouse + dy_mouse*dy_mouse);
if(dist_mouse <=pJS.interactivity.modes.grab.distance){
var opacity_line=pJS.interactivity.modes.grab.line_linked.opacity - (dist_mouse / (1/pJS.interactivity.modes.grab.line_linked.opacity)) / pJS.interactivity.modes.grab.distance;
if(opacity_line > 0){
var color_line=pJS.particles.line_linked.color_rgb_line;
pJS.canvas.ctx.strokeStyle='rgba('+color_line.r+','+color_line.g+','+color_line.b+','+opacity_line+')';
pJS.canvas.ctx.lineWidth=pJS.particles.line_linked.width;
pJS.canvas.ctx.beginPath();
pJS.canvas.ctx.moveTo(p.x, p.y);
pJS.canvas.ctx.lineTo(pJS.interactivity.mouse.pos_x, pJS.interactivity.mouse.pos_y);
pJS.canvas.ctx.stroke();
pJS.canvas.ctx.closePath();
}}
}};
pJS.fn.vendors.eventsListeners=function(){
if(pJS.interactivity.detect_on=='window'){
pJS.interactivity.el=window;
}else{
pJS.interactivity.el=pJS.canvas.el;
}
if(pJS.interactivity.events.onhover.enable||pJS.interactivity.events.onclick.enable){
pJS.interactivity.el.addEventListener('mousemove', function(e){
if(pJS.interactivity.el==window){
var pos_x=e.clientX,
pos_y=e.clientY;
}else{
var pos_x=e.offsetX||e.clientX,
pos_y=e.offsetY||e.clientY;
}
pJS.interactivity.mouse.pos_x=pos_x;
pJS.interactivity.mouse.pos_y=pos_y;
if(pJS.tmp.retina){
pJS.interactivity.mouse.pos_x *=pJS.canvas.pxratio;
pJS.interactivity.mouse.pos_y *=pJS.canvas.pxratio;
}
pJS.interactivity.status='mousemove';
});
pJS.interactivity.el.addEventListener('mouseleave', function(e){
pJS.interactivity.mouse.pos_x=null;
pJS.interactivity.mouse.pos_y=null;
pJS.interactivity.status='mouseleave';
});
}
if(pJS.interactivity.events.onclick.enable){
pJS.interactivity.el.addEventListener('click', function(){
pJS.interactivity.mouse.click_pos_x=pJS.interactivity.mouse.pos_x;
pJS.interactivity.mouse.click_pos_y=pJS.interactivity.mouse.pos_y;
pJS.interactivity.mouse.click_time=new Date().getTime();
if(pJS.interactivity.events.onclick.enable){
switch(pJS.interactivity.events.onclick.mode){
case 'push':
if(pJS.particles.move.enable){
pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse);
}else{
if(pJS.interactivity.modes.push.particles_nb==1){
pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb, pJS.interactivity.mouse);
}
else if(pJS.interactivity.modes.push.particles_nb > 1){
pJS.fn.modes.pushParticles(pJS.interactivity.modes.push.particles_nb);
}}
break;
case 'remove':
pJS.fn.modes.removeParticles(pJS.interactivity.modes.remove.particles_nb);
break;
case 'bubble':
pJS.tmp.bubble_clicking=true;
break;
case 'repulse':
pJS.tmp.repulse_clicking=true;
pJS.tmp.repulse_count=0;
pJS.tmp.repulse_finish=false;
setTimeout(function(){
pJS.tmp.repulse_clicking=false;
}, pJS.interactivity.modes.repulse.duration*1000)
break;
}}
});
}};
pJS.fn.vendors.densityAutoParticles=function(){
if(pJS.particles.number.density.enable){
var area=pJS.canvas.el.width * pJS.canvas.el.height / 1000;
if(pJS.tmp.retina){
area=area/(pJS.canvas.pxratio*2);
}
var nb_particles=area * pJS.particles.number.value / pJS.particles.number.density.value_area;
var missing_particles=pJS.particles.array.length - nb_particles;
if(missing_particles < 0) pJS.fn.modes.pushParticles(Math.abs(missing_particles));
else pJS.fn.modes.removeParticles(missing_particles);
}};
pJS.fn.vendors.checkOverlap=function(p1, position){
for(var i=0; i < pJS.particles.array.length; i++){
var p2=pJS.particles.array[i];
var dx=p1.x - p2.x,
dy=p1.y - p2.y,
dist=Math.sqrt(dx*dx + dy*dy);
if(dist <=p1.radius + p2.radius){
p1.x=position ? position.x:Math.random() * pJS.canvas.w;
p1.y=position ? position.y:Math.random() * pJS.canvas.h;
pJS.fn.vendors.checkOverlap(p1);
}}
};
pJS.fn.vendors.createSvgImg=function(p){
var svgXml=pJS.tmp.source_svg,
rgbHex=/#([0-9A-F]{3,6})/gi,
coloredSvgXml=svgXml.replace(rgbHex, function (m, r, g, b){
if(p.color.rgb){
var color_value='rgba('+p.color.rgb.r+','+p.color.rgb.g+','+p.color.rgb.b+','+p.opacity+')';
}else{
var color_value='hsla('+p.color.hsl.h+','+p.color.hsl.s+'%,'+p.color.hsl.l+'%,'+p.opacity+')';
}
return color_value;
});
var svg=new Blob([coloredSvgXml], {type: 'image/svg+xml;charset=utf-8'}),
DOMURL=window.URL||window.webkitURL||window,
url=DOMURL.createObjectURL(svg);
var img=new Image();
img.addEventListener('load', function(){
p.img.obj=img;
p.img.loaded=true;
DOMURL.revokeObjectURL(url);
pJS.tmp.count_svg++;
});
img.src=url;
};
pJS.fn.vendors.destroypJS=function(){
cancelAnimationFrame(pJS.fn.drawAnimFrame);
canvas_el.remove();
pJSDom=null;
};
pJS.fn.vendors.drawShape=function(c, startX, startY, sideLength, sideCountNumerator, sideCountDenominator){
var sideCount=sideCountNumerator * sideCountDenominator;
var decimalSides=sideCountNumerator / sideCountDenominator;
var interiorAngleDegrees=(180 * (decimalSides - 2)) / decimalSides;
var interiorAngle=Math.PI - Math.PI * interiorAngleDegrees / 180;
c.save();
c.beginPath();
c.translate(startX, startY);
c.moveTo(0,0);
for (var i=0; i < sideCount; i++){
c.lineTo(sideLength,0);
c.translate(sideLength,0);
c.rotate(interiorAngle);
}
c.fill();
c.restore();
};
pJS.fn.vendors.exportImg=function(){
window.open(pJS.canvas.el.toDataURL('image/png'), '_blank');
};
pJS.fn.vendors.loadImg=function(type){
pJS.tmp.img_error=undefined;
if(pJS.particles.shape.image.src!=''){
if(type=='svg'){
var xhr=new XMLHttpRequest();
xhr.open('GET', pJS.particles.shape.image.src);
xhr.onreadystatechange=function (data){
if(xhr.readyState==4){
if(xhr.status==200){
pJS.tmp.source_svg=data.currentTarget.response;
pJS.fn.vendors.checkBeforeDraw();
}else{
console.log('Error pJS - Image not found');
pJS.tmp.img_error=true;
}}
}
xhr.send();
}else{
var img=new Image();
img.addEventListener('load', function(){
pJS.tmp.img_obj=img;
pJS.fn.vendors.checkBeforeDraw();
});
img.src=pJS.particles.shape.image.src;
}}else{
console.log('Error pJS - No image.src');
pJS.tmp.img_error=true;
}};
pJS.fn.vendors.draw=function(){
if(pJS.particles.shape.type=='image'){
if(pJS.tmp.img_type=='svg'){
if(pJS.tmp.count_svg >=pJS.particles.number.value){
pJS.fn.particlesDraw();
if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}else{
if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}}else{
if(pJS.tmp.img_obj!=undefined){
pJS.fn.particlesDraw();
if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}else{
if(!pJS.tmp.img_error) pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}}
}else{
pJS.fn.particlesDraw();
if(!pJS.particles.move.enable) cancelRequestAnimFrame(pJS.fn.drawAnimFrame);
else pJS.fn.drawAnimFrame=requestAnimFrame(pJS.fn.vendors.draw);
}};
pJS.fn.vendors.checkBeforeDraw=function(){
if(pJS.particles.shape.type=='image'){
if(pJS.tmp.img_type=='svg'&&pJS.tmp.source_svg==undefined){
pJS.tmp.checkAnimFrame=requestAnimFrame(check);
}else{
cancelRequestAnimFrame(pJS.tmp.checkAnimFrame);
if(!pJS.tmp.img_error){
pJS.fn.vendors.init();
pJS.fn.vendors.draw();
}}
}else{
pJS.fn.vendors.init();
pJS.fn.vendors.draw();
}};
pJS.fn.vendors.init=function(){
pJS.fn.retinaInit();
pJS.fn.canvasInit();
pJS.fn.canvasSize();
pJS.fn.canvasPaint();
pJS.fn.particlesCreate();
pJS.fn.vendors.densityAutoParticles();
pJS.particles.line_linked.color_rgb_line=hexToRgb(pJS.particles.line_linked.color);
};
pJS.fn.vendors.start=function(){
if(isInArray('image', pJS.particles.shape.type)){
pJS.tmp.img_type=pJS.particles.shape.image.src.substr(pJS.particles.shape.image.src.length - 3);
pJS.fn.vendors.loadImg(pJS.tmp.img_type);
}else{
pJS.fn.vendors.checkBeforeDraw();
}};
pJS.fn.vendors.eventsListeners();
pJS.fn.vendors.start();
};
Object.deepExtend=function(destination, source){
for (var property in source){
if(source[property]&&source[property].constructor &&
source[property].constructor===Object){
destination[property]=destination[property]||{};
arguments.callee(destination[property], source[property]);
}else{
destination[property]=source[property];
}}
return destination;
};
window.requestAnimFrame=(function(){
return  window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame    ||
window.oRequestAnimationFrame      ||
window.msRequestAnimationFrame     ||
function(callback){
window.setTimeout(callback, 1000 / 60);
};})();
window.cancelRequestAnimFrame=(function(){
return window.cancelAnimationFrame         ||
window.webkitCancelRequestAnimationFrame ||
window.mozCancelRequestAnimationFrame    ||
window.oCancelRequestAnimationFrame      ||
window.msCancelRequestAnimationFrame     ||
clearTimeout
})();
function hexToRgb(hex){
var shorthandRegex=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;
hex=hex.replace(shorthandRegex, function(m, r, g, b){
return r + r + g + g + b + b;
});
var result=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
}:null;
};
function clamp(number, min, max){
return Math.min(Math.max(number, min), max);
};
function isInArray(value, array){
return array.indexOf(value) > -1;
}
window.pJSDom=[];
window.particlesJS=function(tag_id, params){
if(typeof(tag_id)!='string'){
params=tag_id;
tag_id='particles-js';
}
if(!tag_id){
tag_id='particles-js';
}
var pJS_tag=document.getElementById(tag_id),
pJS_canvas_class='particles-js-canvas-el',
exist_canvas=pJS_tag.getElementsByClassName(pJS_canvas_class);
if(exist_canvas.length){
while(exist_canvas.length > 0){
pJS_tag.removeChild(exist_canvas[0]);
}}
var canvas_el=document.createElement('canvas');
canvas_el.className=pJS_canvas_class;
canvas_el.style.width="100%";
canvas_el.style.height="100%";
var canvas=document.getElementById(tag_id).appendChild(canvas_el);
if(canvas!=null){
pJSDom.push(new pJS(tag_id, params));
}};
window.particlesJS.load=function(tag_id, path_config_json, callback){
var xhr=new XMLHttpRequest();
xhr.open('GET', path_config_json);
xhr.onreadystatechange=function (data){
if(xhr.readyState==4){
if(xhr.status==200){
var params=JSON.parse(data.currentTarget.response);
window.particlesJS(tag_id, params);
if(callback) callback();
}else{
console.log('Error pJS - XMLHttpRequest status: '+xhr.status);
console.log('Error pJS - File config not found');
}}
};
xhr.send();
};
!function(n){var o={};function i(e){if(o[e])return o[e].exports;var t=o[e]={i:e,l:!1,exports:{}};return n[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.m=n,i.c=o,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=10)}([,,function(e,t){e.exports=function(e){"complete"===document.readyState||"interactive"===document.readyState?e.call():document.attachEvent?document.attachEvent("onreadystatechange",function(){"interactive"===document.readyState&&e.call()}):document.addEventListener&&document.addEventListener("DOMContentLoaded",e)}},function(t,e,n){!function(e){e="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};t.exports=e}.call(this,n(4))},function(e,t){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=function(){return this}();try{o=o||new Function("return this")()}catch(e){"object"===("undefined"==typeof window?"undefined":n(window))&&(o=window)}e.exports=o},,,,,,function(e,t,n){e.exports=n(11)},function(e,t,n){"use strict";n.r(t);var t=n(2),t=n.n(t),i=n(3),a=n(12);function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o,l=i.window.jarallax;i.window.jarallax=a.default,i.window.jarallax.noConflict=function(){return i.window.jarallax=l,this},void 0!==i.jQuery&&((n=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Array.prototype.unshift.call(t,this);var o=a.default.apply(i.window,t);return"object"!==r(o)?o:this}).constructor=a.default.constructor,o=i.jQuery.fn.jarallax,i.jQuery.fn.jarallax=n,i.jQuery.fn.jarallax.noConflict=function(){return i.jQuery.fn.jarallax=o,this}),t()(function(){Object(a.default)(document.querySelectorAll("[data-jarallax]"))})},function(e,t,n){"use strict";n.r(t);var o=n(2),o=n.n(o),f=n(3);function s(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=e&&("undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"]);if(null!=n){var o,i,a=[],r=!0,l=!1;try{for(n=n.call(e);!(r=(o=n.next()).done)&&(a.push(o.value),!t||a.length!==t);r=!0);}catch(e){l=!0,i=e}finally{try{r||null==n.return||n.return()}finally{if(l)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(n="Object"===n&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r,g,u=f.window.navigator,p=-1<u.userAgent.indexOf("MSIE ")||-1<u.userAgent.indexOf("Trident/")||-1<u.userAgent.indexOf("Edge/"),l=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(u.userAgent),d=function(){for(var e="transform WebkitTransform MozTransform".split(" "),t=document.createElement("div"),n=0;n<e.length;n+=1)if(t&&void 0!==t.style[e[n]])return e[n];return!1}();function m(){g=l?(!r&&document.body&&((r=document.createElement("div")).style.cssText="position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;",document.body.appendChild(r)),(r?r.clientHeight:0)||f.window.innerHeight||document.documentElement.clientHeight):f.window.innerHeight||document.documentElement.clientHeight}m(),f.window.addEventListener("resize",m),f.window.addEventListener("orientationchange",m),f.window.addEventListener("load",m),o()(function(){m()});var y=[];function b(){y.length&&(y.forEach(function(e,t){var n=e.instance,o=e.oldData,i=n.$item.getBoundingClientRect(),e={width:i.width,height:i.height,top:i.top,bottom:i.bottom,wndW:f.window.innerWidth,wndH:g},i=!o||o.wndW!==e.wndW||o.wndH!==e.wndH||o.width!==e.width||o.height!==e.height,o=i||!o||o.top!==e.top||o.bottom!==e.bottom;y[t].oldData=e,i&&n.onResize(),o&&n.onScroll()}),f.window.requestAnimationFrame(b))}var h=0,v=function(){function l(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l);var n=this;n.instanceID=h,h+=1,n.$item=e,n.defaults={type:"scroll",speed:.5,imgSrc:null,imgElement:".jarallax-img",imgSize:"cover",imgPosition:"50% 50%",imgRepeat:"no-repeat",keepImg:!1,elementInViewport:null,zIndex:-100,disableParallax:!1,disableVideo:!1,videoSrc:null,videoStartTime:0,videoEndTime:0,videoVolume:0,videoLoop:!0,videoPlayOnlyVisible:!0,videoLazyLoading:!0,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null};var o,i,a=n.$item.dataset||{},r={};Object.keys(a).forEach(function(e){var t=e.substr(0,1).toLowerCase()+e.substr(1);t&&void 0!==n.defaults[t]&&(r[t]=a[e])}),n.options=n.extend({},n.defaults,r,t),n.pureOptions=n.extend({},n.options),Object.keys(n.options).forEach(function(e){"true"===n.options[e]?n.options[e]=!0:"false"===n.options[e]&&(n.options[e]=!1)}),n.options.speed=Math.min(2,Math.max(-1,parseFloat(n.options.speed))),"string"==typeof n.options.disableParallax&&(n.options.disableParallax=new RegExp(n.options.disableParallax)),n.options.disableParallax instanceof RegExp&&(o=n.options.disableParallax,n.options.disableParallax=function(){return o.test(u.userAgent)}),"function"!=typeof n.options.disableParallax&&(n.options.disableParallax=function(){return!1}),"string"==typeof n.options.disableVideo&&(n.options.disableVideo=new RegExp(n.options.disableVideo)),n.options.disableVideo instanceof RegExp&&(i=n.options.disableVideo,n.options.disableVideo=function(){return i.test(u.userAgent)}),"function"!=typeof n.options.disableVideo&&(n.options.disableVideo=function(){return!1});t=n.options.elementInViewport;(t=t&&"object"===c(t)&&void 0!==t.length?s(t,1)[0]:t)instanceof Element||(t=null),n.options.elementInViewport=t,n.image={src:n.options.imgSrc||null,$container:null,useImgTag:!1,position:/iPad|iPhone|iPod|Android/.test(u.userAgent)?"absolute":"fixed"},n.initImg()&&n.canInitParallax()&&n.init()}var e,t,n;return e=l,(t=[{key:"css",value:function(t,n){return"string"==typeof n?f.window.getComputedStyle(t).getPropertyValue(n):(n.transform&&d&&(n[d]=n.transform),Object.keys(n).forEach(function(e){t.style[e]=n[e]}),t)}},{key:"extend",value:function(n){for(var e=arguments.length,o=new Array(1<e?e-1:0),t=1;t<e;t++)o[t-1]=arguments[t];return n=n||{},Object.keys(o).forEach(function(t){o[t]&&Object.keys(o[t]).forEach(function(e){n[e]=o[t][e]})}),n}},{key:"getWindowData",value:function(){return{width:f.window.innerWidth||document.documentElement.clientWidth,height:g,y:document.documentElement.scrollTop}}},{key:"initImg",value:function(){var e=this,t=e.options.imgElement;return(t=t&&"string"==typeof t?e.$item.querySelector(t):t)instanceof Element||(e.options.imgSrc?(t=new Image).src=e.options.imgSrc:t=null),t&&(e.options.keepImg?e.image.$item=t.cloneNode(!0):(e.image.$item=t,e.image.$itemParent=t.parentNode),e.image.useImgTag=!0),!!e.image.$item||(null===e.image.src&&(e.image.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",e.image.bgImage=e.css(e.$item,"background-image")),!(!e.image.bgImage||"none"===e.image.bgImage))}},{key:"canInitParallax",value:function(){return d&&!this.options.disableParallax()}},{key:"init",value:function(){var e,t=this,n={position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden"},o={pointerEvents:"none",transformStyle:"preserve-3d",backfaceVisibility:"hidden",willChange:"transform,opacity"};t.options.keepImg||((e=t.$item.getAttribute("style"))&&t.$item.setAttribute("data-jarallax-original-styles",e),!t.image.useImgTag||(e=t.image.$item.getAttribute("style"))&&t.image.$item.setAttribute("data-jarallax-original-styles",e)),"static"===t.css(t.$item,"position")&&t.css(t.$item,{position:"relative"}),"auto"===t.css(t.$item,"z-index")&&t.css(t.$item,{zIndex:0}),t.image.$container=document.createElement("div"),t.css(t.image.$container,n),t.css(t.image.$container,{"z-index":t.options.zIndex}),p&&t.css(t.image.$container,{opacity:.9999}),t.image.$container.setAttribute("id","jarallax-container-".concat(t.instanceID)),t.$item.appendChild(t.image.$container),t.image.useImgTag?o=t.extend({"object-fit":t.options.imgSize,"object-position":t.options.imgPosition,"font-family":"object-fit: ".concat(t.options.imgSize,"; object-position: ").concat(t.options.imgPosition,";"),"max-width":"none"},n,o):(t.image.$item=document.createElement("div"),t.image.src&&(o=t.extend({"background-position":t.options.imgPosition,"background-size":t.options.imgSize,"background-repeat":t.options.imgRepeat,"background-image":t.image.bgImage||'url("'.concat(t.image.src,'")')},n,o))),"opacity"!==t.options.type&&"scale"!==t.options.type&&"scale-opacity"!==t.options.type&&1!==t.options.speed||(t.image.position="absolute"),"fixed"===t.image.position&&(n=function(e){for(var t=[];null!==e.parentElement;)1===(e=e.parentElement).nodeType&&t.push(e);return t}(t.$item).filter(function(e){var t=f.window.getComputedStyle(e),e=t["-webkit-transform"]||t["-moz-transform"]||t.transform;return e&&"none"!==e||/(auto|scroll)/.test(t.overflow+t["overflow-y"]+t["overflow-x"])}),t.image.position=n.length?"absolute":"fixed"),o.position=t.image.position,t.css(t.image.$item,o),t.image.$container.appendChild(t.image.$item),t.onResize(),t.onScroll(!0),t.options.onInit&&t.options.onInit.call(t),"none"!==t.css(t.$item,"background-image")&&t.css(t.$item,{"background-image":"none"}),t.addToParallaxList()}},{key:"addToParallaxList",value:function(){y.push({instance:this}),1===y.length&&f.window.requestAnimationFrame(b)}},{key:"removeFromParallaxList",value:function(){var n=this;y.forEach(function(e,t){e.instance.instanceID===n.instanceID&&y.splice(t,1)})}},{key:"destroy",value:function(){var e=this;e.removeFromParallaxList();var t,n=e.$item.getAttribute("data-jarallax-original-styles");e.$item.removeAttribute("data-jarallax-original-styles"),n?e.$item.setAttribute("style",n):e.$item.removeAttribute("style"),e.image.useImgTag&&(t=e.image.$item.getAttribute("data-jarallax-original-styles"),e.image.$item.removeAttribute("data-jarallax-original-styles"),t?e.image.$item.setAttribute("style",n):e.image.$item.removeAttribute("style"),e.image.$itemParent&&e.image.$itemParent.appendChild(e.image.$item)),e.$clipStyles&&e.$clipStyles.parentNode.removeChild(e.$clipStyles),e.image.$container&&e.image.$container.parentNode.removeChild(e.image.$container),e.options.onDestroy&&e.options.onDestroy.call(e),delete e.$item.jarallax}},{key:"clipContainer",value:function(){var e,t,n;"fixed"===this.image.position&&(t=(n=(e=this).image.$container.getBoundingClientRect()).width,n=n.height,e.$clipStyles||(e.$clipStyles=document.createElement("style"),e.$clipStyles.setAttribute("type","text/css"),e.$clipStyles.setAttribute("id","jarallax-clip-".concat(e.instanceID)),(document.head||document.getElementsByTagName("head")[0]).appendChild(e.$clipStyles)),n="#jarallax-container-".concat(e.instanceID," {\n            clip: rect(0 ").concat(t,"px ").concat(n,"px 0);\n            clip: rect(0, ").concat(t,"px, ").concat(n,"px, 0);\n            -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n            clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);\n        }"),e.$clipStyles.styleSheet?e.$clipStyles.styleSheet.cssText=n:e.$clipStyles.innerHTML=n)}},{key:"coverImage",value:function(){var e=this,t=e.image.$container.getBoundingClientRect(),n=t.height,o=e.options.speed,i="scroll"===e.options.type||"scroll-opacity"===e.options.type,a=0,r=n,l=0;return i&&(o<0?(a=o*Math.max(n,g),g<n&&(a-=o*(n-g))):a=o*(n+g),1<o?r=Math.abs(a-g):o<0?r=a/o+Math.abs(a):r+=(g-n)*(1-o),a/=2),e.parallaxScrollDistance=a,l=i?(g-r)/2:(n-r)/2,e.css(e.image.$item,{height:"".concat(r,"px"),marginTop:"".concat(l,"px"),left:"fixed"===e.image.position?"".concat(t.left,"px"):"0",width:"".concat(t.width,"px")}),e.options.onCoverImage&&e.options.onCoverImage.call(e),{image:{height:r,marginTop:l},container:t}}},{key:"isVisible",value:function(){return this.isElementInViewport||!1}},{key:"onScroll",value:function(e){var t,n,o,i,a,r,l,s=this,c=s.$item.getBoundingClientRect(),u=c.top,p=c.height,d={},m=c;s.options.elementInViewport&&(m=s.options.elementInViewport.getBoundingClientRect()),s.isElementInViewport=0<=m.bottom&&0<=m.right&&m.top<=g&&m.left<=f.window.innerWidth,(e||s.isElementInViewport)&&(t=Math.max(0,u),n=Math.max(0,p+u),o=Math.max(0,-u),i=Math.max(0,u+p-g),a=Math.max(0,p-(u+p-g)),r=Math.max(0,-u+g-p),m=1-(g-u)/(g+p)*2,e=1,p<g?e=1-(o||i)/p:n<=g?e=n/g:a<=g&&(e=a/g),"opacity"!==s.options.type&&"scale-opacity"!==s.options.type&&"scroll-opacity"!==s.options.type||(d.transform="translate3d(0,0,0)",d.opacity=e),"scale"!==s.options.type&&"scale-opacity"!==s.options.type||(l=1,s.options.speed<0?l-=s.options.speed*e:l+=s.options.speed*(1-e),d.transform="scale(".concat(l,") translate3d(0,0,0)")),"scroll"!==s.options.type&&"scroll-opacity"!==s.options.type||(l=s.parallaxScrollDistance*m,"absolute"===s.image.position&&(l-=u),d.transform="translate3d(0,".concat(l,"px,0)")),s.css(s.image.$item,d),s.options.onScroll&&s.options.onScroll.call(s,{section:c,beforeTop:t,beforeTopEnd:n,afterTop:o,beforeBottom:i,beforeBottomEnd:a,afterBottom:r,visiblePercent:e,fromViewportCenter:m}))}},{key:"onResize",value:function(){this.coverImage(),this.clipContainer()}}])&&a(e.prototype,t),n&&a(e,n),l}(),o=function(e,t){for(var n,o=(e=("object"===("undefined"==typeof HTMLElement?"undefined":c(HTMLElement))?e instanceof HTMLElement:e&&"object"===c(e)&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName)?[e]:e).length,i=0,a=arguments.length,r=new Array(2<a?a-2:0),l=2;l<a;l++)r[l-2]=arguments[l];for(;i<o;i+=1)if("object"===c(t)||void 0===t?e[i].jarallax||(e[i].jarallax=new v(e[i],t)):e[i].jarallax&&(n=e[i].jarallax[t].apply(e[i].jarallax,r)),void 0!==n)return n;return e};o.constructor=v,t.default=o}]);
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Parallax=t()}}(function(){return function t(e,i,n){function o(r,a){if(!i[r]){if(!e[r]){var l="function"==typeof require&&require;if(!a&&l)return l(r,!0);if(s)return s(r,!0);var h=new Error("Cannot find module '"+r+"'");throw h.code="MODULE_NOT_FOUND",h}var u=i[r]={exports:{}};e[r][0].call(u.exports,function(t){var i=e[r][1][t];return o(i||t)},u,u.exports,t,e,i,n)}return i[r].exports}for(var s="function"==typeof require&&require,r=0;r<n.length;r++)o(n[r]);return o}({1:[function(t,e,i){"use strict";function n(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var o=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},i=0;i<10;i++)e["_"+String.fromCharCode(i)]=i;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var i,a,l=n(t),h=1;h<arguments.length;h++){i=Object(arguments[h]);for(var u in i)s.call(i,u)&&(l[u]=i[u]);if(o){a=o(i);for(var c=0;c<a.length;c++)r.call(i,a[c])&&(l[a[c]]=i[a[c]])}}return l}},{}],2:[function(t,e,i){(function(t){(function(){var i,n,o,s,r,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(i()-r)/1e6},n=t.hrtime,s=(i=function(){var t;return 1e9*(t=n())[0]+t[1]})(),a=1e9*t.uptime(),r=s-a):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(this,t("_process"))},{_process:3}],3:[function(t,e,i){function n(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(c===setTimeout)return setTimeout(t,0);if((c===n||!c)&&setTimeout)return c=setTimeout,setTimeout(t,0);try{return c(t,0)}catch(e){try{return c.call(null,t,0)}catch(e){return c.call(this,t,0)}}}function r(t){if(d===clearTimeout)return clearTimeout(t);if((d===o||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){v&&p&&(v=!1,p.length?f=p.concat(f):y=-1,f.length&&l())}function l(){if(!v){var t=s(a);v=!0;for(var e=f.length;e;){for(p=f,f=[];++y<e;)p&&p[y].run();y=-1,e=f.length}p=null,v=!1,r(t)}}function h(t,e){this.fun=t,this.array=e}function u(){}var c,d,m=e.exports={};!function(){try{c="function"==typeof setTimeout?setTimeout:n}catch(t){c=n}try{d="function"==typeof clearTimeout?clearTimeout:o}catch(t){d=o}}();var p,f=[],v=!1,y=-1;m.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)e[i-1]=arguments[i];f.push(new h(t,e)),1!==f.length||v||s(l)},h.prototype.run=function(){this.fun.apply(null,this.array)},m.title="browser",m.browser=!0,m.env={},m.argv=[],m.version="",m.versions={},m.on=u,m.addListener=u,m.once=u,m.off=u,m.removeListener=u,m.removeAllListeners=u,m.emit=u,m.prependListener=u,m.prependOnceListener=u,m.listeners=function(t){return[]},m.binding=function(t){throw new Error("process.binding is not supported")},m.cwd=function(){return"/"},m.chdir=function(t){throw new Error("process.chdir is not supported")},m.umask=function(){return 0}},{}],4:[function(t,e,i){(function(i){for(var n=t("performance-now"),o="undefined"==typeof window?i:window,s=["moz","webkit"],r="AnimationFrame",a=o["request"+r],l=o["cancel"+r]||o["cancelRequest"+r],h=0;!a&&h<s.length;h++)a=o[s[h]+"Request"+r],l=o[s[h]+"Cancel"+r]||o[s[h]+"CancelRequest"+r];if(!a||!l){var u=0,c=0,d=[];a=function(t){if(0===d.length){var e=n(),i=Math.max(0,1e3/60-(e-u));u=i+e,setTimeout(function(){var t=d.slice(0);d.length=0;for(var e=0;e<t.length;e++)if(!t[e].cancelled)try{t[e].callback(u)}catch(t){setTimeout(function(){throw t},0)}},Math.round(i))}return d.push({handle:++c,callback:t,cancelled:!1}),c},l=function(t){for(var e=0;e<d.length;e++)d[e].handle===t&&(d[e].cancelled=!0)}}e.exports=function(t){return a.call(o,t)},e.exports.cancel=function(){l.apply(o,arguments)},e.exports.polyfill=function(){o.requestAnimationFrame=a,o.cancelAnimationFrame=l}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"performance-now":2}],5:[function(t,e,i){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var o=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),s=t("raf"),r=t("object-assign"),a={propertyCache:{},vendors:[null,["-webkit-","webkit"],["-moz-","Moz"],["-o-","O"],["-ms-","ms"]],clamp:function(t,e,i){return e<i?t<e?e:t>i?i:t:t<i?i:t>e?e:t},data:function(t,e){return a.deserialize(t.getAttribute("data-"+e))},deserialize:function(t){return"true"===t||"false"!==t&&("null"===t?null:!isNaN(parseFloat(t))&&isFinite(t)?parseFloat(t):t)},camelCase:function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},accelerate:function(t){a.css(t,"transform","translate3d(0,0,0) rotate(0.0001deg)"),a.css(t,"transform-style","preserve-3d"),a.css(t,"backface-visibility","hidden")},transformSupport:function(t){for(var e=document.createElement("div"),i=!1,n=null,o=!1,s=null,r=null,l=0,h=a.vendors.length;l<h;l++)if(null!==a.vendors[l]?(s=a.vendors[l][0]+"transform",r=a.vendors[l][1]+"Transform"):(s="transform",r="transform"),void 0!==e.style[r]){i=!0;break}switch(t){case"2D":o=i;break;case"3D":if(i){var u=document.body||document.createElement("body"),c=document.documentElement,d=c.style.overflow,m=!1;document.body||(m=!0,c.style.overflow="hidden",c.appendChild(u),u.style.overflow="hidden",u.style.background=""),u.appendChild(e),e.style[r]="translate3d(1px,1px,1px)",o=void 0!==(n=window.getComputedStyle(e).getPropertyValue(s))&&n.length>0&&"none"!==n,c.style.overflow=d,u.removeChild(e),m&&(u.removeAttribute("style"),u.parentNode.removeChild(u))}}return o},css:function(t,e,i){var n=a.propertyCache[e];if(!n)for(var o=0,s=a.vendors.length;o<s;o++)if(n=null!==a.vendors[o]?a.camelCase(a.vendors[o][1]+"-"+e):e,void 0!==t.style[n]){a.propertyCache[e]=n;break}t.style[n]=i}},l={relativeInput:!1,clipRelativeInput:!1,inputElement:null,hoverOnly:!1,calibrationThreshold:100,calibrationDelay:500,supportDelay:500,calibrateX:!1,calibrateY:!0,invertX:!0,invertY:!0,limitX:!1,limitY:!1,scalarX:10,scalarY:10,frictionX:.1,frictionY:.1,originX:.5,originY:.5,pointerEvents:!1,precision:1,onReady:null,selector:null},h=function(){function t(e,i){n(this,t),this.element=e;var o={calibrateX:a.data(this.element,"calibrate-x"),calibrateY:a.data(this.element,"calibrate-y"),invertX:a.data(this.element,"invert-x"),invertY:a.data(this.element,"invert-y"),limitX:a.data(this.element,"limit-x"),limitY:a.data(this.element,"limit-y"),scalarX:a.data(this.element,"scalar-x"),scalarY:a.data(this.element,"scalar-y"),frictionX:a.data(this.element,"friction-x"),frictionY:a.data(this.element,"friction-y"),originX:a.data(this.element,"origin-x"),originY:a.data(this.element,"origin-y"),pointerEvents:a.data(this.element,"pointer-events"),precision:a.data(this.element,"precision"),relativeInput:a.data(this.element,"relative-input"),clipRelativeInput:a.data(this.element,"clip-relative-input"),hoverOnly:a.data(this.element,"hover-only"),inputElement:document.querySelector(a.data(this.element,"input-element")),selector:a.data(this.element,"selector")};for(var s in o)null===o[s]&&delete o[s];r(this,l,o,i),this.inputElement||(this.inputElement=this.element),this.calibrationTimer=null,this.calibrationFlag=!0,this.enabled=!1,this.depthsX=[],this.depthsY=[],this.raf=null,this.bounds=null,this.elementPositionX=0,this.elementPositionY=0,this.elementWidth=0,this.elementHeight=0,this.elementCenterX=0,this.elementCenterY=0,this.elementRangeX=0,this.elementRangeY=0,this.calibrationX=0,this.calibrationY=0,this.inputX=0,this.inputY=0,this.motionX=0,this.motionY=0,this.velocityX=0,this.velocityY=0,this.onMouseMove=this.onMouseMove.bind(this),this.onDeviceOrientation=this.onDeviceOrientation.bind(this),this.onDeviceMotion=this.onDeviceMotion.bind(this),this.onOrientationTimer=this.onOrientationTimer.bind(this),this.onMotionTimer=this.onMotionTimer.bind(this),this.onCalibrationTimer=this.onCalibrationTimer.bind(this),this.onAnimationFrame=this.onAnimationFrame.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.windowWidth=null,this.windowHeight=null,this.windowCenterX=null,this.windowCenterY=null,this.windowRadiusX=null,this.windowRadiusY=null,this.portrait=!1,this.desktop=!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|BB10|mobi|tablet|opera mini|nexus 7)/i),this.motionSupport=!!window.DeviceMotionEvent&&!this.desktop,this.orientationSupport=!!window.DeviceOrientationEvent&&!this.desktop,this.orientationStatus=0,this.motionStatus=0,this.initialise()}return o(t,[{key:"initialise",value:function(){void 0===this.transform2DSupport&&(this.transform2DSupport=a.transformSupport("2D"),this.transform3DSupport=a.transformSupport("3D")),this.transform3DSupport&&a.accelerate(this.element),"static"===window.getComputedStyle(this.element).getPropertyValue("position")&&(this.element.style.position="relative"),this.pointerEvents||(this.element.style.pointerEvents="none"),this.updateLayers(),this.updateDimensions(),this.enable(),this.queueCalibration(this.calibrationDelay)}},{key:"doReadyCallback",value:function(){this.onReady&&this.onReady()}},{key:"updateLayers",value:function(){this.selector?this.layers=this.element.querySelectorAll(this.selector):this.layers=this.element.children,this.layers.length||console.warn("ParallaxJS: Your scene does not have any layers."),this.depthsX=[],this.depthsY=[];for(var t=0;t<this.layers.length;t++){var e=this.layers[t];this.transform3DSupport&&a.accelerate(e),e.style.position=t?"absolute":"relative",e.style.display="block",e.style.left=0,e.style.top=0;var i=a.data(e,"depth")||0;this.depthsX.push(a.data(e,"depth-x")||i),this.depthsY.push(a.data(e,"depth-y")||i)}}},{key:"updateDimensions",value:function(){this.windowWidth=window.innerWidth,this.windowHeight=window.innerHeight,this.windowCenterX=this.windowWidth*this.originX,this.windowCenterY=this.windowHeight*this.originY,this.windowRadiusX=Math.max(this.windowCenterX,this.windowWidth-this.windowCenterX),this.windowRadiusY=Math.max(this.windowCenterY,this.windowHeight-this.windowCenterY)}},{key:"updateBounds",value:function(){this.bounds=this.inputElement.getBoundingClientRect(),this.elementPositionX=this.bounds.left,this.elementPositionY=this.bounds.top,this.elementWidth=this.bounds.width,this.elementHeight=this.bounds.height,this.elementCenterX=this.elementWidth*this.originX,this.elementCenterY=this.elementHeight*this.originY,this.elementRangeX=Math.max(this.elementCenterX,this.elementWidth-this.elementCenterX),this.elementRangeY=Math.max(this.elementCenterY,this.elementHeight-this.elementCenterY)}},{key:"queueCalibration",value:function(t){clearTimeout(this.calibrationTimer),this.calibrationTimer=setTimeout(this.onCalibrationTimer,t)}},{key:"enable",value:function(){this.enabled||(this.enabled=!0,this.orientationSupport?(this.portrait=!1,window.addEventListener("deviceorientation",this.onDeviceOrientation),this.detectionTimer=setTimeout(this.onOrientationTimer,this.supportDelay)):this.motionSupport?(this.portrait=!1,window.addEventListener("devicemotion",this.onDeviceMotion),this.detectionTimer=setTimeout(this.onMotionTimer,this.supportDelay)):(this.calibrationX=0,this.calibrationY=0,this.portrait=!1,window.addEventListener("mousemove",this.onMouseMove),this.doReadyCallback()),window.addEventListener("resize",this.onWindowResize),this.raf=s(this.onAnimationFrame))}},{key:"disable",value:function(){this.enabled&&(this.enabled=!1,this.orientationSupport?window.removeEventListener("deviceorientation",this.onDeviceOrientation):this.motionSupport?window.removeEventListener("devicemotion",this.onDeviceMotion):window.removeEventListener("mousemove",this.onMouseMove),window.removeEventListener("resize",this.onWindowResize),s.cancel(this.raf))}},{key:"calibrate",value:function(t,e){this.calibrateX=void 0===t?this.calibrateX:t,this.calibrateY=void 0===e?this.calibrateY:e}},{key:"invert",value:function(t,e){this.invertX=void 0===t?this.invertX:t,this.invertY=void 0===e?this.invertY:e}},{key:"friction",value:function(t,e){this.frictionX=void 0===t?this.frictionX:t,this.frictionY=void 0===e?this.frictionY:e}},{key:"scalar",value:function(t,e){this.scalarX=void 0===t?this.scalarX:t,this.scalarY=void 0===e?this.scalarY:e}},{key:"limit",value:function(t,e){this.limitX=void 0===t?this.limitX:t,this.limitY=void 0===e?this.limitY:e}},{key:"origin",value:function(t,e){this.originX=void 0===t?this.originX:t,this.originY=void 0===e?this.originY:e}},{key:"setInputElement",value:function(t){this.inputElement=t,this.updateDimensions()}},{key:"setPosition",value:function(t,e,i){e=e.toFixed(this.precision)+"px",i=i.toFixed(this.precision)+"px",this.transform3DSupport?a.css(t,"transform","translate3d("+e+","+i+",0)"):this.transform2DSupport?a.css(t,"transform","translate("+e+","+i+")"):(t.style.left=e,t.style.top=i)}},{key:"onOrientationTimer",value:function(){this.orientationSupport&&0===this.orientationStatus?(this.disable(),this.orientationSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onMotionTimer",value:function(){this.motionSupport&&0===this.motionStatus?(this.disable(),this.motionSupport=!1,this.enable()):this.doReadyCallback()}},{key:"onCalibrationTimer",value:function(){this.calibrationFlag=!0}},{key:"onWindowResize",value:function(){this.updateDimensions()}},{key:"onAnimationFrame",value:function(){this.updateBounds();var t=this.inputX-this.calibrationX,e=this.inputY-this.calibrationY;(Math.abs(t)>this.calibrationThreshold||Math.abs(e)>this.calibrationThreshold)&&this.queueCalibration(0),this.portrait?(this.motionX=this.calibrateX?e:this.inputY,this.motionY=this.calibrateY?t:this.inputX):(this.motionX=this.calibrateX?t:this.inputX,this.motionY=this.calibrateY?e:this.inputY),this.motionX*=this.elementWidth*(this.scalarX/100),this.motionY*=this.elementHeight*(this.scalarY/100),isNaN(parseFloat(this.limitX))||(this.motionX=a.clamp(this.motionX,-this.limitX,this.limitX)),isNaN(parseFloat(this.limitY))||(this.motionY=a.clamp(this.motionY,-this.limitY,this.limitY)),this.velocityX+=(this.motionX-this.velocityX)*this.frictionX,this.velocityY+=(this.motionY-this.velocityY)*this.frictionY;for(var i=0;i<this.layers.length;i++){var n=this.layers[i],o=this.depthsX[i],r=this.depthsY[i],l=this.velocityX*(o*(this.invertX?-1:1)),h=this.velocityY*(r*(this.invertY?-1:1));this.setPosition(n,l,h)}this.raf=s(this.onAnimationFrame)}},{key:"rotate",value:function(t,e){var i=(t||0)/30,n=(e||0)/30,o=this.windowHeight>this.windowWidth;this.portrait!==o&&(this.portrait=o,this.calibrationFlag=!0),this.calibrationFlag&&(this.calibrationFlag=!1,this.calibrationX=i,this.calibrationY=n),this.inputX=i,this.inputY=n}},{key:"onDeviceOrientation",value:function(t){var e=t.beta,i=t.gamma;null!==e&&null!==i&&(this.orientationStatus=1,this.rotate(e,i))}},{key:"onDeviceMotion",value:function(t){var e=t.rotationRate.beta,i=t.rotationRate.gamma;null!==e&&null!==i&&(this.motionStatus=1,this.rotate(e,i))}},{key:"onMouseMove",value:function(t){var e=t.clientX,i=t.clientY;if(this.hoverOnly&&(e<this.elementPositionX||e>this.elementPositionX+this.elementWidth||i<this.elementPositionY||i>this.elementPositionY+this.elementHeight))return this.inputX=0,void(this.inputY=0);this.relativeInput?(this.clipRelativeInput&&(e=Math.max(e,this.elementPositionX),e=Math.min(e,this.elementPositionX+this.elementWidth),i=Math.max(i,this.elementPositionY),i=Math.min(i,this.elementPositionY+this.elementHeight)),this.elementRangeX&&this.elementRangeY&&(this.inputX=(e-this.elementPositionX-this.elementCenterX)/this.elementRangeX,this.inputY=(i-this.elementPositionY-this.elementCenterY)/this.elementRangeY)):this.windowRadiusX&&this.windowRadiusY&&(this.inputX=(e-this.windowCenterX)/this.windowRadiusX,this.inputY=(i-this.windowCenterY)/this.windowRadiusY)}},{key:"destroy",value:function(){this.disable(),clearTimeout(this.calibrationTimer),clearTimeout(this.detectionTimer),this.element.removeAttribute("style");for(var t=0;t<this.layers.length;t++)this.layers[t].removeAttribute("style");delete this.element,delete this.layers}},{key:"version",value:function(){return"3.1.0"}}]),t}();e.exports=h},{"object-assign":1,raf:4}]},{},[5])(5)});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("jquery"),require("popper.js")):"function"==typeof define&&define.amd?define(["exports","jquery","popper.js"],e):e(t.bootstrap={},t.jQuery,t.Popper)}(this,function(t,e,n){"use strict";function i(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function s(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(this,arguments)}e=e&&e.hasOwnProperty("default")?e.default:e,n=n&&n.hasOwnProperty("default")?n.default:n;var o,a,l,h,c,u,f,d,_,g,p,m,v,E,T,y,C,I,A,b,D,S,w,N,O,k,P=function(t){var e=!1;function n(e){var n=this,s=!1;return t(this).one(i.TRANSITION_END,function(){s=!0}),setTimeout(function(){s||i.triggerTransitionEnd(n)},e),this}var i={TRANSITION_END:"bsTransitionEnd",getUID:function(t){do{t+=~~(1e6*Math.random())}while(document.getElementById(t));return t},getSelectorFromElement:function(e){var n,i=e.getAttribute("data-target");i&&"#"!==i||(i=e.getAttribute("href")||""),"#"===i.charAt(0)&&(n=i,i=n="function"==typeof t.escapeSelector?t.escapeSelector(n).substr(1):n.replace(/(:|\.|\[|\]|,|=|@)/g,"\\$1"));try{return t(document).find(i).length>0?i:null}catch(t){return null}},reflow:function(t){return t.offsetHeight},triggerTransitionEnd:function(n){t(n).trigger(e.end)},supportsTransitionEnd:function(){return Boolean(e)},isElement:function(t){return(t[0]||t).nodeType},typeCheckConfig:function(t,e,n){for(var s in n)if(Object.prototype.hasOwnProperty.call(n,s)){var r=n[s],o=e[s],a=o&&i.isElement(o)?"element":(l=o,{}.toString.call(l).match(/\s([a-zA-Z]+)/)[1].toLowerCase());if(!new RegExp(r).test(a))throw new Error(t.toUpperCase()+': Option "'+s+'" provided type "'+a+'" but expected type "'+r+'".')}var l}};return e=("undefined"==typeof window||!window.QUnit)&&{end:"transitionend"},t.fn.emulateTransitionEnd=n,i.supportsTransitionEnd()&&(t.event.special[i.TRANSITION_END]={bindType:e.end,delegateType:e.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}}),i}(e),L=(a="alert",h="."+(l="bs.alert"),c=(o=e).fn[a],u={CLOSE:"close"+h,CLOSED:"closed"+h,CLICK_DATA_API:"click"+h+".data-api"},f="alert",d="fade",_="show",g=function(){function t(t){this._element=t}var e=t.prototype;return e.close=function(t){t=t||this._element;var e=this._getRootElement(t);this._triggerCloseEvent(e).isDefaultPrevented()||this._removeElement(e)},e.dispose=function(){o.removeData(this._element,l),this._element=null},e._getRootElement=function(t){var e=P.getSelectorFromElement(t),n=!1;return e&&(n=o(e)[0]),n||(n=o(t).closest("."+f)[0]),n},e._triggerCloseEvent=function(t){var e=o.Event(u.CLOSE);return o(t).trigger(e),e},e._removeElement=function(t){var e=this;o(t).removeClass(_),P.supportsTransitionEnd()&&o(t).hasClass(d)?o(t).one(P.TRANSITION_END,function(n){return e._destroyElement(t,n)}).emulateTransitionEnd(150):this._destroyElement(t)},e._destroyElement=function(t){o(t).detach().trigger(u.CLOSED).remove()},t._jQueryInterface=function(e){return this.each(function(){var n=o(this),i=n.data(l);i||(i=new t(this),n.data(l,i)),"close"===e&&i[e](this)})},t._handleDismiss=function(t){return function(e){e&&e.preventDefault(),t.close(this)}},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),o(document).on(u.CLICK_DATA_API,'[data-dismiss="alert"]',g._handleDismiss(new g)),o.fn[a]=g._jQueryInterface,o.fn[a].Constructor=g,o.fn[a].noConflict=function(){return o.fn[a]=c,g._jQueryInterface},g),R=(m="button",E="."+(v="bs.button"),T=".data-api",y=(p=e).fn[m],C="active",I="btn",A="focus",b='[data-toggle^="button"]',D='[data-toggle="buttons"]',S="input",w=".active",N=".btn",O={CLICK_DATA_API:"click"+E+T,FOCUS_BLUR_DATA_API:"focus"+E+T+" blur"+E+T},k=function(){function t(t){this._element=t}var e=t.prototype;return e.toggle=function(){var t=!0,e=!0,n=p(this._element).closest(D)[0];if(n){var i=p(this._element).find(S)[0];if(i){if("radio"===i.type)if(i.checked&&p(this._element).hasClass(C))t=!1;else{var s=p(n).find(w)[0];s&&p(s).removeClass(C)}if(t){if(i.hasAttribute("disabled")||n.hasAttribute("disabled")||i.classList.contains("disabled")||n.classList.contains("disabled"))return;i.checked=!p(this._element).hasClass(C),p(i).trigger("change")}i.focus(),e=!1}}e&&this._element.setAttribute("aria-pressed",!p(this._element).hasClass(C)),t&&p(this._element).toggleClass(C)},e.dispose=function(){p.removeData(this._element,v),this._element=null},t._jQueryInterface=function(e){return this.each(function(){var n=p(this).data(v);n||(n=new t(this),p(this).data(v,n)),"toggle"===e&&n[e]()})},s(t,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),t}(),p(document).on(O.CLICK_DATA_API,b,function(t){t.preventDefault();var e=t.target;p(e).hasClass(I)||(e=p(e).closest(N)),k._jQueryInterface.call(p(e),"toggle")}).on(O.FOCUS_BLUR_DATA_API,b,function(t){var e=p(t.target).closest(N)[0];p(e).toggleClass(A,/^focus(in)?$/.test(t.type))}),p.fn[m]=k._jQueryInterface,p.fn[m].Constructor=k,p.fn[m].noConflict=function(){return p.fn[m]=y,k._jQueryInterface},k),j=function(t){var e="carousel",n="bs.carousel",i="."+n,o=t.fn[e],a={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0},l={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean"},h="next",c="prev",u="left",f="right",d={SLIDE:"slide"+i,SLID:"slid"+i,KEYDOWN:"keydown"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i,TOUCHEND:"touchend"+i,LOAD_DATA_API:"load"+i+".data-api",CLICK_DATA_API:"click"+i+".data-api"},_="carousel",g="active",p="slide",m="carousel-item-right",v="carousel-item-left",E="carousel-item-next",T="carousel-item-prev",y={ACTIVE:".active",ACTIVE_ITEM:".active.carousel-item",ITEM:".carousel-item",NEXT_PREV:".carousel-item-next, .carousel-item-prev",INDICATORS:".carousel-indicators",DATA_SLIDE:"[data-slide], [data-slide-to]",DATA_RIDE:'[data-ride="carousel"]'},C=function(){function o(e,n){this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this._config=this._getConfig(n),this._element=t(e)[0],this._indicatorsElement=t(this._element).find(y.INDICATORS)[0],this._addEventListeners()}var C=o.prototype;return C.next=function(){this._isSliding||this._slide(h)},C.nextWhenVisible=function(){!document.hidden&&t(this._element).is(":visible")&&"hidden"!==t(this._element).css("visibility")&&this.next()},C.prev=function(){this._isSliding||this._slide(c)},C.pause=function(e){e||(this._isPaused=!0),t(this._element).find(y.NEXT_PREV)[0]&&P.supportsTransitionEnd()&&(P.triggerTransitionEnd(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null},C.cycle=function(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config.interval&&!this._isPaused&&(this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))},C.to=function(e){var n=this;this._activeElement=t(this._element).find(y.ACTIVE_ITEM)[0];var i=this._getItemIndex(this._activeElement);if(!(e>this._items.length-1||e<0))if(this._isSliding)t(this._element).one(d.SLID,function(){return n.to(e)});else{if(i===e)return this.pause(),void this.cycle();var s=e>i?h:c;this._slide(s,this._items[e])}},C.dispose=function(){t(this._element).off(i),t.removeData(this._element,n),this._items=null,this._config=null,this._element=null,this._interval=null,this._isPaused=null,this._isSliding=null,this._activeElement=null,this._indicatorsElement=null},C._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},C._addEventListeners=function(){var e=this;this._config.keyboard&&t(this._element).on(d.KEYDOWN,function(t){return e._keydown(t)}),"hover"===this._config.pause&&(t(this._element).on(d.MOUSEENTER,function(t){return e.pause(t)}).on(d.MOUSELEAVE,function(t){return e.cycle(t)}),"ontouchstart"in document.documentElement&&t(this._element).on(d.TOUCHEND,function(){e.pause(),e.touchTimeout&&clearTimeout(e.touchTimeout),e.touchTimeout=setTimeout(function(t){return e.cycle(t)},500+e._config.interval)}))},C._keydown=function(t){if(!/input|textarea/i.test(t.target.tagName))switch(t.which){case 37:t.preventDefault(),this.prev();break;case 39:t.preventDefault(),this.next()}},C._getItemIndex=function(e){return this._items=t.makeArray(t(e).parent().find(y.ITEM)),this._items.indexOf(e)},C._getItemByDirection=function(t,e){var n=t===h,i=t===c,s=this._getItemIndex(e),r=this._items.length-1;if((i&&0===s||n&&s===r)&&!this._config.wrap)return e;var o=(s+(t===c?-1:1))%this._items.length;return-1===o?this._items[this._items.length-1]:this._items[o]},C._triggerSlideEvent=function(e,n){var i=this._getItemIndex(e),s=this._getItemIndex(t(this._element).find(y.ACTIVE_ITEM)[0]),r=t.Event(d.SLIDE,{relatedTarget:e,direction:n,from:s,to:i});return t(this._element).trigger(r),r},C._setActiveIndicatorElement=function(e){if(this._indicatorsElement){t(this._indicatorsElement).find(y.ACTIVE).removeClass(g);var n=this._indicatorsElement.children[this._getItemIndex(e)];n&&t(n).addClass(g)}},C._slide=function(e,n){var i,s,r,o=this,a=t(this._element).find(y.ACTIVE_ITEM)[0],l=this._getItemIndex(a),c=n||a&&this._getItemByDirection(e,a),_=this._getItemIndex(c),C=Boolean(this._interval);if(e===h?(i=v,s=E,r=u):(i=m,s=T,r=f),c&&t(c).hasClass(g))this._isSliding=!1;else if(!this._triggerSlideEvent(c,r).isDefaultPrevented()&&a&&c){this._isSliding=!0,C&&this.pause(),this._setActiveIndicatorElement(c);var I=t.Event(d.SLID,{relatedTarget:c,direction:r,from:l,to:_});P.supportsTransitionEnd()&&t(this._element).hasClass(p)?(t(c).addClass(s),P.reflow(c),t(a).addClass(i),t(c).addClass(i),t(a).one(P.TRANSITION_END,function(){t(c).removeClass(i+" "+s).addClass(g),t(a).removeClass(g+" "+s+" "+i),o._isSliding=!1,setTimeout(function(){return t(o._element).trigger(I)},0)}).emulateTransitionEnd(600)):(t(a).removeClass(g),t(c).addClass(g),this._isSliding=!1,t(this._element).trigger(I)),C&&this.cycle()}},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s=r({},a,t(this).data());"object"==typeof e&&(s=r({},s,e));var l="string"==typeof e?e:s.slide;if(i||(i=new o(this,s),t(this).data(n,i)),"number"==typeof e)i.to(e);else if("string"==typeof l){if("undefined"==typeof i[l])throw new TypeError('No method named "'+l+'"');i[l]()}else s.interval&&(i.pause(),i.cycle())})},o._dataApiClickHandler=function(e){var i=P.getSelectorFromElement(this);if(i){var s=t(i)[0];if(s&&t(s).hasClass(_)){var a=r({},t(s).data(),t(this).data()),l=this.getAttribute("data-slide-to");l&&(a.interval=!1),o._jQueryInterface.call(t(s),a),l&&t(s).data(n).to(l),e.preventDefault()}}},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(d.CLICK_DATA_API,y.DATA_SLIDE,C._dataApiClickHandler),t(window).on(d.LOAD_DATA_API,function(){t(y.DATA_RIDE).each(function(){var e=t(this);C._jQueryInterface.call(e,e.data())})}),t.fn[e]=C._jQueryInterface,t.fn[e].Constructor=C,t.fn[e].noConflict=function(){return t.fn[e]=o,C._jQueryInterface},C}(e),H=function(t){var e="collapse",n="bs.collapse",i="."+n,o=t.fn[e],a={toggle:!0,parent:""},l={toggle:"boolean",parent:"(string|element)"},h={SHOW:"show"+i,SHOWN:"shown"+i,HIDE:"hide"+i,HIDDEN:"hidden"+i,CLICK_DATA_API:"click"+i+".data-api"},c="show",u="collapse",f="collapsing",d="collapsed",_="width",g="height",p={ACTIVES:".show, .collapsing",DATA_TOGGLE:'[data-toggle="collapse"]'},m=function(){function i(e,n){this._isTransitioning=!1,this._element=e,this._config=this._getConfig(n),this._triggerArray=t.makeArray(t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'));for(var i=t(p.DATA_TOGGLE),s=0;s<i.length;s++){var r=i[s],o=P.getSelectorFromElement(r);null!==o&&t(o).filter(e).length>0&&(this._selector=o,this._triggerArray.push(r))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}var o=i.prototype;return o.toggle=function(){t(this._element).hasClass(c)?this.hide():this.show()},o.show=function(){var e,s,r=this;if(!this._isTransitioning&&!t(this._element).hasClass(c)&&(this._parent&&0===(e=t.makeArray(t(this._parent).find(p.ACTIVES).filter('[data-parent="'+this._config.parent+'"]'))).length&&(e=null),!(e&&(s=t(e).not(this._selector).data(n))&&s._isTransitioning))){var o=t.Event(h.SHOW);if(t(this._element).trigger(o),!o.isDefaultPrevented()){e&&(i._jQueryInterface.call(t(e).not(this._selector),"hide"),s||t(e).data(n,null));var a=this._getDimension();t(this._element).removeClass(u).addClass(f),this._element.style[a]=0,this._triggerArray.length>0&&t(this._triggerArray).removeClass(d).attr("aria-expanded",!0),this.setTransitioning(!0);var l=function(){t(r._element).removeClass(f).addClass(u).addClass(c),r._element.style[a]="",r.setTransitioning(!1),t(r._element).trigger(h.SHOWN)};if(P.supportsTransitionEnd()){var _="scroll"+(a[0].toUpperCase()+a.slice(1));t(this._element).one(P.TRANSITION_END,l).emulateTransitionEnd(600),this._element.style[a]=this._element[_]+"px"}else l()}}},o.hide=function(){var e=this;if(!this._isTransitioning&&t(this._element).hasClass(c)){var n=t.Event(h.HIDE);if(t(this._element).trigger(n),!n.isDefaultPrevented()){var i=this._getDimension();if(this._element.style[i]=this._element.getBoundingClientRect()[i]+"px",P.reflow(this._element),t(this._element).addClass(f).removeClass(u).removeClass(c),this._triggerArray.length>0)for(var s=0;s<this._triggerArray.length;s++){var r=this._triggerArray[s],o=P.getSelectorFromElement(r);if(null!==o)t(o).hasClass(c)||t(r).addClass(d).attr("aria-expanded",!1)}this.setTransitioning(!0);var a=function(){e.setTransitioning(!1),t(e._element).removeClass(f).addClass(u).trigger(h.HIDDEN)};this._element.style[i]="",P.supportsTransitionEnd()?t(this._element).one(P.TRANSITION_END,a).emulateTransitionEnd(600):a()}}},o.setTransitioning=function(t){this._isTransitioning=t},o.dispose=function(){t.removeData(this._element,n),this._config=null,this._parent=null,this._element=null,this._triggerArray=null,this._isTransitioning=null},o._getConfig=function(t){return(t=r({},a,t)).toggle=Boolean(t.toggle),P.typeCheckConfig(e,t,l),t},o._getDimension=function(){return t(this._element).hasClass(_)?_:g},o._getParent=function(){var e=this,n=null;P.isElement(this._config.parent)?(n=this._config.parent,"undefined"!=typeof this._config.parent.jquery&&(n=this._config.parent[0])):n=t(this._config.parent)[0];var s='[data-toggle="collapse"][data-parent="'+this._config.parent+'"]';return t(n).find(s).each(function(t,n){e._addAriaAndCollapsedClass(i._getTargetFromElement(n),[n])}),n},o._addAriaAndCollapsedClass=function(e,n){if(e){var i=t(e).hasClass(c);n.length>0&&t(n).toggleClass(d,!i).attr("aria-expanded",i)}},i._getTargetFromElement=function(e){var n=P.getSelectorFromElement(e);return n?t(n)[0]:null},i._jQueryInterface=function(e){return this.each(function(){var s=t(this),o=s.data(n),l=r({},a,s.data(),"object"==typeof e&&e);if(!o&&l.toggle&&/show|hide/.test(e)&&(l.toggle=!1),o||(o=new i(this,l),s.data(n,o)),"string"==typeof e){if("undefined"==typeof o[e])throw new TypeError('No method named "'+e+'"');o[e]()}})},s(i,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),i}();return t(document).on(h.CLICK_DATA_API,p.DATA_TOGGLE,function(e){"A"===e.currentTarget.tagName&&e.preventDefault();var i=t(this),s=P.getSelectorFromElement(this);t(s).each(function(){var e=t(this),s=e.data(n)?"toggle":i.data();m._jQueryInterface.call(e,s)})}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=o,m._jQueryInterface},m}(e),W=function(t){var e="dropdown",i="bs.dropdown",o="."+i,a=".data-api",l=t.fn[e],h=new RegExp("38|40|27"),c={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,CLICK:"click"+o,CLICK_DATA_API:"click"+o+a,KEYDOWN_DATA_API:"keydown"+o+a,KEYUP_DATA_API:"keyup"+o+a},u="disabled",f="show",d="dropup",_="dropright",g="dropleft",p="dropdown-menu-right",m="dropdown-menu-left",v="position-static",E='[data-toggle="dropdown"]',T=".dropdown form",y=".dropdown-menu",C=".navbar-nav",I=".dropdown-menu .dropdown-item:not(.disabled)",A="top-start",b="top-end",D="bottom-start",S="bottom-end",w="right-start",N="left-start",O={offset:0,flip:!0,boundary:"scrollParent"},k={offset:"(number|string|function)",flip:"boolean",boundary:"(string|element)"},L=function(){function a(t,e){this._element=t,this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}var l=a.prototype;return l.toggle=function(){if(!this._element.disabled&&!t(this._element).hasClass(u)){var e=a._getParentFromElement(this._element),i=t(this._menu).hasClass(f);if(a._clearMenus(),!i){var s={relatedTarget:this._element},r=t.Event(c.SHOW,s);if(t(e).trigger(r),!r.isDefaultPrevented()){if(!this._inNavbar){if("undefined"==typeof n)throw new TypeError("Bootstrap dropdown require Popper.js (//popper.js.org)");var o=this._element;t(e).hasClass(d)&&(t(this._menu).hasClass(m)||t(this._menu).hasClass(p))&&(o=e),"scrollParent"!==this._config.boundary&&t(e).addClass(v),this._popper=new n(o,this._menu,this._getPopperConfig())}"ontouchstart"in document.documentElement&&0===t(e).closest(C).length&&t("body").children().on("mouseover",null,t.noop),this._element.focus(),this._element.setAttribute("aria-expanded",!0),t(this._menu).toggleClass(f),t(e).toggleClass(f).trigger(t.Event(c.SHOWN,s))}}}},l.dispose=function(){t.removeData(this._element,i),t(this._element).off(o),this._element=null,this._menu=null,null!==this._popper&&(this._popper.destroy(),this._popper=null)},l.update=function(){this._inNavbar=this._detectNavbar(),null!==this._popper&&this._popper.scheduleUpdate()},l._addEventListeners=function(){var e=this;t(this._element).on(c.CLICK,function(t){t.preventDefault(),t.stopPropagation(),e.toggle()})},l._getConfig=function(n){return n=r({},this.constructor.Default,t(this._element).data(),n),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},l._getMenuElement=function(){if(!this._menu){var e=a._getParentFromElement(this._element);this._menu=t(e).find(y)[0]}return this._menu},l._getPlacement=function(){var e=t(this._element).parent(),n=D;return e.hasClass(d)?(n=A,t(this._menu).hasClass(p)&&(n=b)):e.hasClass(_)?n=w:e.hasClass(g)?n=N:t(this._menu).hasClass(p)&&(n=S),n},l._detectNavbar=function(){return t(this._element).closest(".navbar").length>0},l._getPopperConfig=function(){var t=this,e={};return"function"==typeof this._config.offset?e.fn=function(e){return e.offsets=r({},e.offsets,t._config.offset(e.offsets)||{}),e}:e.offset=this._config.offset,{placement:this._getPlacement(),modifiers:{offset:e,flip:{enabled:this._config.flip},preventOverflow:{boundariesElement:this._config.boundary}}}},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i);if(n||(n=new a(this,"object"==typeof e?e:null),t(this).data(i,n)),"string"==typeof e){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},a._clearMenus=function(e){if(!e||3!==e.which&&("keyup"!==e.type||9===e.which))for(var n=t.makeArray(t(E)),s=0;s<n.length;s++){var r=a._getParentFromElement(n[s]),o=t(n[s]).data(i),l={relatedTarget:n[s]};if(o){var h=o._menu;if(t(r).hasClass(f)&&!(e&&("click"===e.type&&/input|textarea/i.test(e.target.tagName)||"keyup"===e.type&&9===e.which)&&t.contains(r,e.target))){var u=t.Event(c.HIDE,l);t(r).trigger(u),u.isDefaultPrevented()||("ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),n[s].setAttribute("aria-expanded","false"),t(h).removeClass(f),t(r).removeClass(f).trigger(t.Event(c.HIDDEN,l)))}}}},a._getParentFromElement=function(e){var n,i=P.getSelectorFromElement(e);return i&&(n=t(i)[0]),n||e.parentNode},a._dataApiKeydownHandler=function(e){if((/input|textarea/i.test(e.target.tagName)?!(32===e.which||27!==e.which&&(40!==e.which&&38!==e.which||t(e.target).closest(y).length)):h.test(e.which))&&(e.preventDefault(),e.stopPropagation(),!this.disabled&&!t(this).hasClass(u))){var n=a._getParentFromElement(this),i=t(n).hasClass(f);if((i||27===e.which&&32===e.which)&&(!i||27!==e.which&&32!==e.which)){var s=t(n).find(I).get();if(0!==s.length){var r=s.indexOf(e.target);38===e.which&&r>0&&r--,40===e.which&&r<s.length-1&&r++,r<0&&(r=0),s[r].focus()}}else{if(27===e.which){var o=t(n).find(E)[0];t(o).trigger("focus")}t(this).trigger("click")}}},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return O}},{key:"DefaultType",get:function(){return k}}]),a}();return t(document).on(c.KEYDOWN_DATA_API,E,L._dataApiKeydownHandler).on(c.KEYDOWN_DATA_API,y,L._dataApiKeydownHandler).on(c.CLICK_DATA_API+" "+c.KEYUP_DATA_API,L._clearMenus).on(c.CLICK_DATA_API,E,function(e){e.preventDefault(),e.stopPropagation(),L._jQueryInterface.call(t(this),"toggle")}).on(c.CLICK_DATA_API,T,function(t){t.stopPropagation()}),t.fn[e]=L._jQueryInterface,t.fn[e].Constructor=L,t.fn[e].noConflict=function(){return t.fn[e]=l,L._jQueryInterface},L}(e),M=function(t){var e="modal",n="bs.modal",i="."+n,o=t.fn.modal,a={backdrop:!0,keyboard:!0,focus:!0,show:!0},l={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean",show:"boolean"},h={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,FOCUSIN:"focusin"+i,RESIZE:"resize"+i,CLICK_DISMISS:"click.dismiss"+i,KEYDOWN_DISMISS:"keydown.dismiss"+i,MOUSEUP_DISMISS:"mouseup.dismiss"+i,MOUSEDOWN_DISMISS:"mousedown.dismiss"+i,CLICK_DATA_API:"click"+i+".data-api"},c="modal-scrollbar-measure",u="modal-backdrop",f="modal-open",d="fade",_="show",g={DIALOG:".modal-dialog",DATA_TOGGLE:'[data-toggle="modal"]',DATA_DISMISS:'[data-dismiss="modal"]',FIXED_CONTENT:".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",STICKY_CONTENT:".sticky-top",NAVBAR_TOGGLER:".navbar-toggler"},p=function(){function o(e,n){this._config=this._getConfig(n),this._element=e,this._dialog=t(e).find(g.DIALOG)[0],this._backdrop=null,this._isShown=!1,this._isBodyOverflowing=!1,this._ignoreBackdropClick=!1,this._originalBodyPadding=0,this._scrollbarWidth=0}var p=o.prototype;return p.toggle=function(t){return this._isShown?this.hide():this.show(t)},p.show=function(e){var n=this;if(!this._isTransitioning&&!this._isShown){P.supportsTransitionEnd()&&t(this._element).hasClass(d)&&(this._isTransitioning=!0);var i=t.Event(h.SHOW,{relatedTarget:e});t(this._element).trigger(i),this._isShown||i.isDefaultPrevented()||(this._isShown=!0,this._checkScrollbar(),this._setScrollbar(),this._adjustDialog(),t(document.body).addClass(f),this._setEscapeEvent(),this._setResizeEvent(),t(this._element).on(h.CLICK_DISMISS,g.DATA_DISMISS,function(t){return n.hide(t)}),t(this._dialog).on(h.MOUSEDOWN_DISMISS,function(){t(n._element).one(h.MOUSEUP_DISMISS,function(e){t(e.target).is(n._element)&&(n._ignoreBackdropClick=!0)})}),this._showBackdrop(function(){return n._showElement(e)}))}},p.hide=function(e){var n=this;if(e&&e.preventDefault(),!this._isTransitioning&&this._isShown){var i=t.Event(h.HIDE);if(t(this._element).trigger(i),this._isShown&&!i.isDefaultPrevented()){this._isShown=!1;var s=P.supportsTransitionEnd()&&t(this._element).hasClass(d);s&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),t(document).off(h.FOCUSIN),t(this._element).removeClass(_),t(this._element).off(h.CLICK_DISMISS),t(this._dialog).off(h.MOUSEDOWN_DISMISS),s?t(this._element).one(P.TRANSITION_END,function(t){return n._hideModal(t)}).emulateTransitionEnd(300):this._hideModal()}}},p.dispose=function(){t.removeData(this._element,n),t(window,document,this._element,this._backdrop).off(i),this._config=null,this._element=null,this._dialog=null,this._backdrop=null,this._isShown=null,this._isBodyOverflowing=null,this._ignoreBackdropClick=null,this._scrollbarWidth=null},p.handleUpdate=function(){this._adjustDialog()},p._getConfig=function(t){return t=r({},a,t),P.typeCheckConfig(e,t,l),t},p._showElement=function(e){var n=this,i=P.supportsTransitionEnd()&&t(this._element).hasClass(d);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.scrollTop=0,i&&P.reflow(this._element),t(this._element).addClass(_),this._config.focus&&this._enforceFocus();var s=t.Event(h.SHOWN,{relatedTarget:e}),r=function(){n._config.focus&&n._element.focus(),n._isTransitioning=!1,t(n._element).trigger(s)};i?t(this._dialog).one(P.TRANSITION_END,r).emulateTransitionEnd(300):r()},p._enforceFocus=function(){var e=this;t(document).off(h.FOCUSIN).on(h.FOCUSIN,function(n){document!==n.target&&e._element!==n.target&&0===t(e._element).has(n.target).length&&e._element.focus()})},p._setEscapeEvent=function(){var e=this;this._isShown&&this._config.keyboard?t(this._element).on(h.KEYDOWN_DISMISS,function(t){27===t.which&&(t.preventDefault(),e.hide())}):this._isShown||t(this._element).off(h.KEYDOWN_DISMISS)},p._setResizeEvent=function(){var e=this;this._isShown?t(window).on(h.RESIZE,function(t){return e.handleUpdate(t)}):t(window).off(h.RESIZE)},p._hideModal=function(){var e=this;this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._isTransitioning=!1,this._showBackdrop(function(){t(document.body).removeClass(f),e._resetAdjustments(),e._resetScrollbar(),t(e._element).trigger(h.HIDDEN)})},p._removeBackdrop=function(){this._backdrop&&(t(this._backdrop).remove(),this._backdrop=null)},p._showBackdrop=function(e){var n=this,i=t(this._element).hasClass(d)?d:"";if(this._isShown&&this._config.backdrop){var s=P.supportsTransitionEnd()&&i;if(this._backdrop=document.createElement("div"),this._backdrop.className=u,i&&t(this._backdrop).addClass(i),t(this._backdrop).appendTo(document.body),t(this._element).on(h.CLICK_DISMISS,function(t){n._ignoreBackdropClick?n._ignoreBackdropClick=!1:t.target===t.currentTarget&&("static"===n._config.backdrop?n._element.focus():n.hide())}),s&&P.reflow(this._backdrop),t(this._backdrop).addClass(_),!e)return;if(!s)return void e();t(this._backdrop).one(P.TRANSITION_END,e).emulateTransitionEnd(150)}else if(!this._isShown&&this._backdrop){t(this._backdrop).removeClass(_);var r=function(){n._removeBackdrop(),e&&e()};P.supportsTransitionEnd()&&t(this._element).hasClass(d)?t(this._backdrop).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r()}else e&&e()},p._adjustDialog=function(){var t=this._element.scrollHeight>document.documentElement.clientHeight;!this._isBodyOverflowing&&t&&(this._element.style.paddingLeft=this._scrollbarWidth+"px"),this._isBodyOverflowing&&!t&&(this._element.style.paddingRight=this._scrollbarWidth+"px")},p._resetAdjustments=function(){this._element.style.paddingLeft="",this._element.style.paddingRight=""},p._checkScrollbar=function(){var t=document.body.getBoundingClientRect();this._isBodyOverflowing=t.left+t.right<window.innerWidth,this._scrollbarWidth=this._getScrollbarWidth()},p._setScrollbar=function(){var e=this;if(this._isBodyOverflowing){t(g.FIXED_CONTENT).each(function(n,i){var s=t(i)[0].style.paddingRight,r=t(i).css("padding-right");t(i).data("padding-right",s).css("padding-right",parseFloat(r)+e._scrollbarWidth+"px")}),t(g.STICKY_CONTENT).each(function(n,i){var s=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",s).css("margin-right",parseFloat(r)-e._scrollbarWidth+"px")}),t(g.NAVBAR_TOGGLER).each(function(n,i){var s=t(i)[0].style.marginRight,r=t(i).css("margin-right");t(i).data("margin-right",s).css("margin-right",parseFloat(r)+e._scrollbarWidth+"px")});var n=document.body.style.paddingRight,i=t("body").css("padding-right");t("body").data("padding-right",n).css("padding-right",parseFloat(i)+this._scrollbarWidth+"px")}},p._resetScrollbar=function(){t(g.FIXED_CONTENT).each(function(e,n){var i=t(n).data("padding-right");"undefined"!=typeof i&&t(n).css("padding-right",i).removeData("padding-right")}),t(g.STICKY_CONTENT+", "+g.NAVBAR_TOGGLER).each(function(e,n){var i=t(n).data("margin-right");"undefined"!=typeof i&&t(n).css("margin-right",i).removeData("margin-right")});var e=t("body").data("padding-right");"undefined"!=typeof e&&t("body").css("padding-right",e).removeData("padding-right")},p._getScrollbarWidth=function(){var t=document.createElement("div");t.className=c,document.body.appendChild(t);var e=t.getBoundingClientRect().width-t.clientWidth;return document.body.removeChild(t),e},o._jQueryInterface=function(e,i){return this.each(function(){var s=t(this).data(n),a=r({},o.Default,t(this).data(),"object"==typeof e&&e);if(s||(s=new o(this,a),t(this).data(n,s)),"string"==typeof e){if("undefined"==typeof s[e])throw new TypeError('No method named "'+e+'"');s[e](i)}else a.show&&s.show(i)})},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(document).on(h.CLICK_DATA_API,g.DATA_TOGGLE,function(e){var i,s=this,o=P.getSelectorFromElement(this);o&&(i=t(o)[0]);var a=t(i).data(n)?"toggle":r({},t(i).data(),t(this).data());"A"!==this.tagName&&"AREA"!==this.tagName||e.preventDefault();var l=t(i).one(h.SHOW,function(e){e.isDefaultPrevented()||l.one(h.HIDDEN,function(){t(s).is(":visible")&&s.focus()})});p._jQueryInterface.call(t(i),a,this)}),t.fn.modal=p._jQueryInterface,t.fn.modal.Constructor=p,t.fn.modal.noConflict=function(){return t.fn.modal=o,p._jQueryInterface},p}(e),U=function(t){var e="tooltip",i="bs.tooltip",o="."+i,a=t.fn[e],l=new RegExp("(^|\\s)bs-tooltip\\S+","g"),h={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(number|string)",container:"(string|element|boolean)",fallbackPlacement:"(string|array)",boundary:"(string|element)"},c={AUTO:"auto",TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},u={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:0,container:!1,fallbackPlacement:"flip",boundary:"scrollParent"},f="show",d="out",_={HIDE:"hide"+o,HIDDEN:"hidden"+o,SHOW:"show"+o,SHOWN:"shown"+o,INSERTED:"inserted"+o,CLICK:"click"+o,FOCUSIN:"focusin"+o,FOCUSOUT:"focusout"+o,MOUSEENTER:"mouseenter"+o,MOUSELEAVE:"mouseleave"+o},g="fade",p="show",m=".tooltip-inner",v=".arrow",E="hover",T="focus",y="click",C="manual",I=function(){function a(t,e){if("undefined"==typeof n)throw new TypeError("Bootstrap tooltips require Popper.js (//popper.js.org)");this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this.element=t,this.config=this._getConfig(e),this.tip=null,this._setListeners()}var I=a.prototype;return I.enable=function(){this._isEnabled=!0},I.disable=function(){this._isEnabled=!1},I.toggleEnabled=function(){this._isEnabled=!this._isEnabled},I.toggle=function(e){if(this._isEnabled)if(e){var n=this.constructor.DATA_KEY,i=t(e.currentTarget).data(n);i||(i=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(n,i)),i._activeTrigger.click=!i._activeTrigger.click,i._isWithActiveTrigger()?i._enter(null,i):i._leave(null,i)}else{if(t(this.getTipElement()).hasClass(p))return void this._leave(null,this);this._enter(null,this)}},I.dispose=function(){clearTimeout(this._timeout),t.removeData(this.element,this.constructor.DATA_KEY),t(this.element).off(this.constructor.EVENT_KEY),t(this.element).closest(".modal").off("hide.bs.modal"),this.tip&&t(this.tip).remove(),this._isEnabled=null,this._timeout=null,this._hoverState=null,this._activeTrigger=null,null!==this._popper&&this._popper.destroy(),this._popper=null,this.element=null,this.config=null,this.tip=null},I.show=function(){var e=this;if("none"===t(this.element).css("display"))throw new Error("Please use show on visible elements");var i=t.Event(this.constructor.Event.SHOW);if(this.isWithContent()&&this._isEnabled){t(this.element).trigger(i);var s=t.contains(this.element.ownerDocument.documentElement,this.element);if(i.isDefaultPrevented()||!s)return;var r=this.getTipElement(),o=P.getUID(this.constructor.NAME);r.setAttribute("id",o),this.element.setAttribute("aria-describedby",o),this.setContent(),this.config.animation&&t(r).addClass(g);var l="function"==typeof this.config.placement?this.config.placement.call(this,r,this.element):this.config.placement,h=this._getAttachment(l);this.addAttachmentClass(h);var c=!1===this.config.container?document.body:t(this.config.container);t(r).data(this.constructor.DATA_KEY,this),t.contains(this.element.ownerDocument.documentElement,this.tip)||t(r).appendTo(c),t(this.element).trigger(this.constructor.Event.INSERTED),this._popper=new n(this.element,r,{placement:h,modifiers:{offset:{offset:this.config.offset},flip:{behavior:this.config.fallbackPlacement},arrow:{element:v},preventOverflow:{boundariesElement:this.config.boundary}},onCreate:function(t){t.originalPlacement!==t.placement&&e._handlePopperPlacementChange(t)},onUpdate:function(t){e._handlePopperPlacementChange(t)}}),t(r).addClass(p),"ontouchstart"in document.documentElement&&t("body").children().on("mouseover",null,t.noop);var u=function(){e.config.animation&&e._fixTransition();var n=e._hoverState;e._hoverState=null,t(e.element).trigger(e.constructor.Event.SHOWN),n===d&&e._leave(null,e)};P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(this.tip).one(P.TRANSITION_END,u).emulateTransitionEnd(a._TRANSITION_DURATION):u()}},I.hide=function(e){var n=this,i=this.getTipElement(),s=t.Event(this.constructor.Event.HIDE),r=function(){n._hoverState!==f&&i.parentNode&&i.parentNode.removeChild(i),n._cleanTipClass(),n.element.removeAttribute("aria-describedby"),t(n.element).trigger(n.constructor.Event.HIDDEN),null!==n._popper&&n._popper.destroy(),e&&e()};t(this.element).trigger(s),s.isDefaultPrevented()||(t(i).removeClass(p),"ontouchstart"in document.documentElement&&t("body").children().off("mouseover",null,t.noop),this._activeTrigger[y]=!1,this._activeTrigger[T]=!1,this._activeTrigger[E]=!1,P.supportsTransitionEnd()&&t(this.tip).hasClass(g)?t(i).one(P.TRANSITION_END,r).emulateTransitionEnd(150):r(),this._hoverState="")},I.update=function(){null!==this._popper&&this._popper.scheduleUpdate()},I.isWithContent=function(){return Boolean(this.getTitle())},I.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-tooltip-"+e)},I.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},I.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(m),this.getTitle()),e.removeClass(g+" "+p)},I.setElementContent=function(e,n){var i=this.config.html;"object"==typeof n&&(n.nodeType||n.jquery)?i?t(n).parent().is(e)||e.empty().append(n):e.text(t(n).text()):e[i?"html":"text"](n)},I.getTitle=function(){var t=this.element.getAttribute("data-original-title");return t||(t="function"==typeof this.config.title?this.config.title.call(this.element):this.config.title),t},I._getAttachment=function(t){return c[t.toUpperCase()]},I._setListeners=function(){var e=this;this.config.trigger.split(" ").forEach(function(n){if("click"===n)t(e.element).on(e.constructor.Event.CLICK,e.config.selector,function(t){return e.toggle(t)});else if(n!==C){var i=n===E?e.constructor.Event.MOUSEENTER:e.constructor.Event.FOCUSIN,s=n===E?e.constructor.Event.MOUSELEAVE:e.constructor.Event.FOCUSOUT;t(e.element).on(i,e.config.selector,function(t){return e._enter(t)}).on(s,e.config.selector,function(t){return e._leave(t)})}t(e.element).closest(".modal").on("hide.bs.modal",function(){return e.hide()})}),this.config.selector?this.config=r({},this.config,{trigger:"manual",selector:""}):this._fixTitle()},I._fixTitle=function(){var t=typeof this.element.getAttribute("data-original-title");(this.element.getAttribute("title")||"string"!==t)&&(this.element.setAttribute("data-original-title",this.element.getAttribute("title")||""),this.element.setAttribute("title",""))},I._enter=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusin"===e.type?T:E]=!0),t(n.getTipElement()).hasClass(p)||n._hoverState===f?n._hoverState=f:(clearTimeout(n._timeout),n._hoverState=f,n.config.delay&&n.config.delay.show?n._timeout=setTimeout(function(){n._hoverState===f&&n.show()},n.config.delay.show):n.show())},I._leave=function(e,n){var i=this.constructor.DATA_KEY;(n=n||t(e.currentTarget).data(i))||(n=new this.constructor(e.currentTarget,this._getDelegateConfig()),t(e.currentTarget).data(i,n)),e&&(n._activeTrigger["focusout"===e.type?T:E]=!1),n._isWithActiveTrigger()||(clearTimeout(n._timeout),n._hoverState=d,n.config.delay&&n.config.delay.hide?n._timeout=setTimeout(function(){n._hoverState===d&&n.hide()},n.config.delay.hide):n.hide())},I._isWithActiveTrigger=function(){for(var t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1},I._getConfig=function(n){return"number"==typeof(n=r({},this.constructor.Default,t(this.element).data(),n)).delay&&(n.delay={show:n.delay,hide:n.delay}),"number"==typeof n.title&&(n.title=n.title.toString()),"number"==typeof n.content&&(n.content=n.content.toString()),P.typeCheckConfig(e,n,this.constructor.DefaultType),n},I._getDelegateConfig=function(){var t={};if(this.config)for(var e in this.config)this.constructor.Default[e]!==this.config[e]&&(t[e]=this.config[e]);return t},I._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(l);null!==n&&n.length>0&&e.removeClass(n.join(""))},I._handlePopperPlacementChange=function(t){this._cleanTipClass(),this.addAttachmentClass(this._getAttachment(t.placement))},I._fixTransition=function(){var e=this.getTipElement(),n=this.config.animation;null===e.getAttribute("x-placement")&&(t(e).removeClass(g),this.config.animation=!1,this.hide(),this.show(),this.config.animation=n)},a._jQueryInterface=function(e){return this.each(function(){var n=t(this).data(i),s="object"==typeof e&&e;if((n||!/dispose|hide/.test(e))&&(n||(n=new a(this,s),t(this).data(i,n)),"string"==typeof e)){if("undefined"==typeof n[e])throw new TypeError('No method named "'+e+'"');n[e]()}})},s(a,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return u}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return i}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return o}},{key:"DefaultType",get:function(){return h}}]),a}();return t.fn[e]=I._jQueryInterface,t.fn[e].Constructor=I,t.fn[e].noConflict=function(){return t.fn[e]=a,I._jQueryInterface},I}(e),x=function(t){var e="popover",n="bs.popover",i="."+n,o=t.fn[e],a=new RegExp("(^|\\s)bs-popover\\S+","g"),l=r({},U.Default,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'}),h=r({},U.DefaultType,{content:"(string|element|function)"}),c="fade",u="show",f=".popover-header",d=".popover-body",_={HIDE:"hide"+i,HIDDEN:"hidden"+i,SHOW:"show"+i,SHOWN:"shown"+i,INSERTED:"inserted"+i,CLICK:"click"+i,FOCUSIN:"focusin"+i,FOCUSOUT:"focusout"+i,MOUSEENTER:"mouseenter"+i,MOUSELEAVE:"mouseleave"+i},g=function(r){var o,g;function p(){return r.apply(this,arguments)||this}g=r,(o=p).prototype=Object.create(g.prototype),o.prototype.constructor=o,o.__proto__=g;var m=p.prototype;return m.isWithContent=function(){return this.getTitle()||this._getContent()},m.addAttachmentClass=function(e){t(this.getTipElement()).addClass("bs-popover-"+e)},m.getTipElement=function(){return this.tip=this.tip||t(this.config.template)[0],this.tip},m.setContent=function(){var e=t(this.getTipElement());this.setElementContent(e.find(f),this.getTitle());var n=this._getContent();"function"==typeof n&&(n=n.call(this.element)),this.setElementContent(e.find(d),n),e.removeClass(c+" "+u)},m._getContent=function(){return this.element.getAttribute("data-content")||this.config.content},m._cleanTipClass=function(){var e=t(this.getTipElement()),n=e.attr("class").match(a);null!==n&&n.length>0&&e.removeClass(n.join(""))},p._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n),s="object"==typeof e?e:null;if((i||!/destroy|hide/.test(e))&&(i||(i=new p(this,s),t(this).data(n,i)),"string"==typeof e)){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(p,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return l}},{key:"NAME",get:function(){return e}},{key:"DATA_KEY",get:function(){return n}},{key:"Event",get:function(){return _}},{key:"EVENT_KEY",get:function(){return i}},{key:"DefaultType",get:function(){return h}}]),p}(U);return t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),K=function(t){var e="scrollspy",n="bs.scrollspy",i="."+n,o=t.fn[e],a={offset:10,method:"auto",target:""},l={offset:"number",method:"string",target:"(string|element)"},h={ACTIVATE:"activate"+i,SCROLL:"scroll"+i,LOAD_DATA_API:"load"+i+".data-api"},c="dropdown-item",u="active",f={DATA_SPY:'[data-spy="scroll"]',ACTIVE:".active",NAV_LIST_GROUP:".nav, .list-group",NAV_LINKS:".nav-link",NAV_ITEMS:".nav-item",LIST_ITEMS:".list-group-item",DROPDOWN:".dropdown",DROPDOWN_ITEMS:".dropdown-item",DROPDOWN_TOGGLE:".dropdown-toggle"},d="offset",_="position",g=function(){function o(e,n){var i=this;this._element=e,this._scrollElement="BODY"===e.tagName?window:e,this._config=this._getConfig(n),this._selector=this._config.target+" "+f.NAV_LINKS+","+this._config.target+" "+f.LIST_ITEMS+","+this._config.target+" "+f.DROPDOWN_ITEMS,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,t(this._scrollElement).on(h.SCROLL,function(t){return i._process(t)}),this.refresh(),this._process()}var g=o.prototype;return g.refresh=function(){var e=this,n=this._scrollElement===this._scrollElement.window?d:_,i="auto"===this._config.method?n:this._config.method,s=i===_?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),t.makeArray(t(this._selector)).map(function(e){var n,r=P.getSelectorFromElement(e);if(r&&(n=t(r)[0]),n){var o=n.getBoundingClientRect();if(o.width||o.height)return[t(n)[i]().top+s,r]}return null}).filter(function(t){return t}).sort(function(t,e){return t[0]-e[0]}).forEach(function(t){e._offsets.push(t[0]),e._targets.push(t[1])})},g.dispose=function(){t.removeData(this._element,n),t(this._scrollElement).off(i),this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null},g._getConfig=function(n){if("string"!=typeof(n=r({},a,n)).target){var i=t(n.target).attr("id");i||(i=P.getUID(e),t(n.target).attr("id",i)),n.target="#"+i}return P.typeCheckConfig(e,n,l),n},g._getScrollTop=function(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop},g._getScrollHeight=function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)},g._getOffsetHeight=function(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height},g._process=function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),n=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=n){var i=this._targets[this._targets.length-1];this._activeTarget!==i&&this._activate(i)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&("undefined"==typeof this._offsets[s+1]||t<this._offsets[s+1])&&this._activate(this._targets[s])}}},g._activate=function(e){this._activeTarget=e,this._clear();var n=this._selector.split(",");n=n.map(function(t){return t+'[data-target="'+e+'"],'+t+'[href="'+e+'"]'});var i=t(n.join(","));i.hasClass(c)?(i.closest(f.DROPDOWN).find(f.DROPDOWN_TOGGLE).addClass(u),i.addClass(u)):(i.addClass(u),i.parents(f.NAV_LIST_GROUP).prev(f.NAV_LINKS+", "+f.LIST_ITEMS).addClass(u),i.parents(f.NAV_LIST_GROUP).prev(f.NAV_ITEMS).children(f.NAV_LINKS).addClass(u)),t(this._scrollElement).trigger(h.ACTIVATE,{relatedTarget:e})},g._clear=function(){t(this._selector).filter(f.ACTIVE).removeClass(u)},o._jQueryInterface=function(e){return this.each(function(){var i=t(this).data(n);if(i||(i=new o(this,"object"==typeof e&&e),t(this).data(n,i)),"string"==typeof e){if("undefined"==typeof i[e])throw new TypeError('No method named "'+e+'"');i[e]()}})},s(o,null,[{key:"VERSION",get:function(){return"4.0.0"}},{key:"Default",get:function(){return a}}]),o}();return t(window).on(h.LOAD_DATA_API,function(){for(var e=t.makeArray(t(f.DATA_SPY)),n=e.length;n--;){var i=t(e[n]);g._jQueryInterface.call(i,i.data())}}),t.fn[e]=g._jQueryInterface,t.fn[e].Constructor=g,t.fn[e].noConflict=function(){return t.fn[e]=o,g._jQueryInterface},g}(e),V=function(t){var e="bs.tab",n="."+e,i=t.fn.tab,r={HIDE:"hide"+n,HIDDEN:"hidden"+n,SHOW:"show"+n,SHOWN:"shown"+n,CLICK_DATA_API:"click.bs.tab.data-api"},o="dropdown-menu",a="active",l="disabled",h="fade",c="show",u=".dropdown",f=".nav, .list-group",d=".active",_="> li > .active",g='[data-toggle="tab"], [data-toggle="pill"], [data-toggle="list"]',p=".dropdown-toggle",m="> .dropdown-menu .active",v=function(){function n(t){this._element=t}var i=n.prototype;return i.show=function(){var e=this;if(!(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&t(this._element).hasClass(a)||t(this._element).hasClass(l))){var n,i,s=t(this._element).closest(f)[0],o=P.getSelectorFromElement(this._element);if(s){var h="UL"===s.nodeName?_:d;i=(i=t.makeArray(t(s).find(h)))[i.length-1]}var c=t.Event(r.HIDE,{relatedTarget:this._element}),u=t.Event(r.SHOW,{relatedTarget:i});if(i&&t(i).trigger(c),t(this._element).trigger(u),!u.isDefaultPrevented()&&!c.isDefaultPrevented()){o&&(n=t(o)[0]),this._activate(this._element,s);var g=function(){var n=t.Event(r.HIDDEN,{relatedTarget:e._element}),s=t.Event(r.SHOWN,{relatedTarget:i});t(i).trigger(n),t(e._element).trigger(s)};n?this._activate(n,n.parentNode,g):g()}}},i.dispose=function(){t.removeData(this._element,e),this._element=null},i._activate=function(e,n,i){var s=this,r=("UL"===n.nodeName?t(n).find(_):t(n).children(d))[0],o=i&&P.supportsTransitionEnd()&&r&&t(r).hasClass(h),a=function(){return s._transitionComplete(e,r,i)};r&&o?t(r).one(P.TRANSITION_END,a).emulateTransitionEnd(150):a()},i._transitionComplete=function(e,n,i){if(n){t(n).removeClass(c+" "+a);var s=t(n.parentNode).find(m)[0];s&&t(s).removeClass(a),"tab"===n.getAttribute("role")&&n.setAttribute("aria-selected",!1)}if(t(e).addClass(a),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!0),P.reflow(e),t(e).addClass(c),e.parentNode&&t(e.parentNode).hasClass(o)){var r=t(e).closest(u)[0];r&&t(r).find(p).addClass(a),e.setAttribute("aria-expanded",!0)}i&&i()},n._jQueryInterface=function(i){return this.each(function(){var s=t(this),r=s.data(e);if(r||(r=new n(this),s.data(e,r)),"string"==typeof i){if("undefined"==typeof r[i])throw new TypeError('No method named "'+i+'"');r[i]()}})},s(n,null,[{key:"VERSION",get:function(){return"4.0.0"}}]),n}();return t(document).on(r.CLICK_DATA_API,g,function(e){e.preventDefault(),v._jQueryInterface.call(t(this),"show")}),t.fn.tab=v._jQueryInterface,t.fn.tab.Constructor=v,t.fn.tab.noConflict=function(){return t.fn.tab=i,v._jQueryInterface},v}(e);!function(t){if("undefined"==typeof t)throw new TypeError("Bootstrap's JavaScript requires jQuery. jQuery must be included before Bootstrap's JavaScript.");var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1===e[0]&&9===e[1]&&e[2]<1||e[0]>=4)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v4.0.0")}(e),t.Util=P,t.Alert=L,t.Button=R,t.Carousel=j,t.Collapse=H,t.Dropdown=W,t.Modal=M,t.Popover=x,t.Scrollspy=K,t.Tab=V,t.Tooltip=U,Object.defineProperty(t,"__esModule",{value:!0})});
!function(e){e.fn.niceSelect=function(t){function s(t){t.after(e("<div></div>").addClass("nice-select").addClass(t.attr("class")||"").addClass(t.attr("disabled")?"disabled":"").attr("tabindex",t.attr("disabled")?null:"0").html('<span class="current"></span><ul class="list"></ul>'));var s=t.next(),n=t.find("option"),i=t.find("option:selected");s.find(".current").html(i.data("display")||i.text()),n.each(function(t){var n=e(this),i=n.data("display");s.find("ul").append(e("<li></li>").attr("data-value",n.val()).attr("data-display",i||null).addClass("option"+(n.is(":selected")?" selected":"")+(n.is(":disabled")?" disabled":"")).html(n.text()))})}if("string"==typeof t)return"update"==t?this.each(function(){var t=e(this),n=e(this).next(".nice-select"),i=n.hasClass("open");n.length&&(n.remove(),s(t),i&&t.next().trigger("click"))}):"destroy"==t?(this.each(function(){var t=e(this),s=e(this).next(".nice-select");s.length&&(s.remove(),t.css("display",""))}),0==e(".nice-select").length&&e(document).off(".nice_select")):console.log('Method "'+t+'" does not exist.'),this;this.hide(),this.each(function(){var t=e(this);t.next().hasClass("nice-select")||s(t)}),e(document).off(".nice_select"),e(document).on("click.nice_select",".nice-select",function(t){var s=e(this);e(".nice-select").not(s).removeClass("open"),s.toggleClass("open"),s.hasClass("open")?(s.find(".option"),s.find(".focus").removeClass("focus"),s.find(".selected").addClass("focus")):s.focus()}),e(document).on("click.nice_select",function(t){0===e(t.target).closest(".nice-select").length&&e(".nice-select").removeClass("open").find(".option")}),e(document).on("click.nice_select",".nice-select .option:not(.disabled)",function(t){var s=e(this),n=s.closest(".nice-select");n.find(".selected").removeClass("selected"),s.addClass("selected");var i=s.data("display")||s.text();n.find(".current").text(i),n.prev("select").val(s.data("value")).trigger("change")}),e(document).on("keydown.nice_select",".nice-select",function(t){var s=e(this),n=e(s.find(".focus")||s.find(".list .option.selected"));if(32==t.keyCode||13==t.keyCode)return s.hasClass("open")?n.trigger("click"):s.trigger("click"),!1;if(40==t.keyCode){if(s.hasClass("open")){var i=n.nextAll(".option:not(.disabled)").first();i.length>0&&(s.find(".focus").removeClass("focus"),i.addClass("focus"))}else s.trigger("click");return!1}if(38==t.keyCode){if(s.hasClass("open")){var l=n.prevAll(".option:not(.disabled)").first();l.length>0&&(s.find(".focus").removeClass("focus"),l.addClass("focus"))}else s.trigger("click");return!1}if(27==t.keyCode)s.hasClass("open")&&s.trigger("click");else if(9==t.keyCode&&s.hasClass("open"))return!1});var n=document.createElement("a").style;return n.cssText="pointer-events:auto","auto"!==n.pointerEvents&&e("html").addClass("no-csspointerevents"),this}}(jQuery);
(function(c){var n=-1,f=-1,g=function(a){return parseFloat(a)||0},r=function(a){var b=null,d=[];c(a).each(function(){var a=c(this),k=a.offset().top-g(a.css("margin-top")),l=0<d.length?d[d.length-1]:null;null===l?d.push(a):1>=Math.floor(Math.abs(b-k))?d[d.length-1]=l.add(a):d.push(a);b=k});return d},p=function(a){var b={byRow:!0,property:"height",target:null,remove:!1};if("object"===typeof a)return c.extend(b,a);"boolean"===typeof a?b.byRow=a:"remove"===a&&(b.remove=!0);return b},b=c.fn.matchHeight=
function(a){a=p(a);if(a.remove){var e=this;this.css(a.property,"");c.each(b._groups,function(a,b){b.elements=b.elements.not(e)});return this}if(1>=this.length&&!a.target)return this;b._groups.push({elements:this,options:a});b._apply(this,a);return this};b._groups=[];b._throttle=80;b._maintainScroll=!1;b._beforeUpdate=null;b._afterUpdate=null;b._apply=function(a,e){var d=p(e),h=c(a),k=[h],l=c(window).scrollTop(),f=c("html").outerHeight(!0),m=h.parents().filter(":hidden");m.each(function(){var a=c(this);
a.data("style-cache",a.attr("style"))});m.css("display","block");d.byRow&&!d.target&&(h.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");a.data("style-cache",a.attr("style"));a.css({display:b,"padding-top":"0","padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px"})}),k=r(h),h.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||"")}));c.each(k,function(a,b){var e=c(b),
f=0;if(d.target)f=d.target.outerHeight(!1);else{if(d.byRow&&1>=e.length){e.css(d.property,"");return}e.each(function(){var a=c(this),b=a.css("display");"inline-block"!==b&&"inline-flex"!==b&&(b="block");b={display:b};b[d.property]="";a.css(b);a.outerHeight(!1)>f&&(f=a.outerHeight(!1));a.css("display","")})}e.each(function(){var a=c(this),b=0;d.target&&a.is(d.target)||("border-box"!==a.css("box-sizing")&&(b+=g(a.css("border-top-width"))+g(a.css("border-bottom-width")),b+=g(a.css("padding-top"))+g(a.css("padding-bottom"))),
a.css(d.property,f-b+"px"))})});m.each(function(){var a=c(this);a.attr("style",a.data("style-cache")||null)});b._maintainScroll&&c(window).scrollTop(l/f*c("html").outerHeight(!0));return this};b._applyDataApi=function(){var a={};c("[data-match-height], [data-mh]").each(function(){var b=c(this),d=b.attr("data-mh")||b.attr("data-match-height");a[d]=d in a?a[d].add(b):b});c.each(a,function(){this.matchHeight(!0)})};var q=function(a){b._beforeUpdate&&b._beforeUpdate(a,b._groups);c.each(b._groups,function(){b._apply(this.elements,
this.options)});b._afterUpdate&&b._afterUpdate(a,b._groups)};b._update=function(a,e){if(e&&"resize"===e.type){var d=c(window).width();if(d===n)return;n=d}a?-1===f&&(f=setTimeout(function(){q(e);f=-1},b._throttle)):q(e)};c(b._applyDataApi);c(window).bind("load",function(a){b._update(!1,a)});c(window).bind("resize orientationchange",function(a){b._update(!0,a)})})(jQuery);
;(function (factory){
if(typeof define==='function'&&define.amd){
define(['jquery'], factory);
}else if(typeof exports==='object'){
factory(require('jquery'));
}else{
factory(window.jQuery||window.Zepto);
}}(function($){
var CLOSE_EVENT='Close',
BEFORE_CLOSE_EVENT='BeforeClose',
AFTER_CLOSE_EVENT='AfterClose',
BEFORE_APPEND_EVENT='BeforeAppend',
MARKUP_PARSE_EVENT='MarkupParse',
OPEN_EVENT='Open',
CHANGE_EVENT='Change',
NS='mfp',
EVENT_NS='.' + NS,
READY_CLASS='mfp-ready',
REMOVING_CLASS='mfp-removing',
PREVENT_CLOSE_CLASS='mfp-prevent-close';
var mfp,
MagnificPopup=function(){},
_isJQ = !!(window.jQuery),
_prevStatus,
_window=$(window),
_document,
_prevContentType,
_wrapClasses,
_currPopupType;
var _mfpOn=function(name, f){
mfp.ev.on(NS + name + EVENT_NS, f);
},
_getEl=function(className, appendTo, html, raw){
var el=document.createElement('div');
el.className='mfp-'+className;
if(html){
el.innerHTML=html;
}
if(!raw){
el=$(el);
if(appendTo){
el.appendTo(appendTo);
}}else if(appendTo){
appendTo.appendChild(el);
}
return el;
},
_mfpTrigger=function(e, data){
mfp.ev.triggerHandler(NS + e, data);
if(mfp.st.callbacks){
e=e.charAt(0).toLowerCase() + e.slice(1);
if(mfp.st.callbacks[e]){
mfp.st.callbacks[e].apply(mfp, $.isArray(data) ? data:[data]);
}}
},
_getCloseBtn=function(type){
if(type!==_currPopupType||!mfp.currTemplate.closeBtn){
mfp.currTemplate.closeBtn=$(mfp.st.closeMarkup.replace('%title%', mfp.st.tClose));
_currPopupType=type;
}
return mfp.currTemplate.closeBtn;
},
_checkInstance=function(){
if(!$.magnificPopup.instance){
mfp=new MagnificPopup();
mfp.init();
$.magnificPopup.instance=mfp;
}},
supportsTransitions=function(){
var s=document.createElement('p').style, // 's' for style. better to create an element if body yet to exist
v=['ms','O','Moz','Webkit']; // 'v' for vendor
if(s['transition']!==undefined){
return true;
}
while(v.length){
if(v.pop() + 'Transition' in s){
return true;
}}
return false;
};
MagnificPopup.prototype={
constructor: MagnificPopup,
init: function(){
var appVersion=navigator.appVersion;
mfp.isIE7=appVersion.indexOf("MSIE 7.")!==-1;
mfp.isIE8=appVersion.indexOf("MSIE 8.")!==-1;
mfp.isLowIE=mfp.isIE7||mfp.isIE8;
mfp.isAndroid=(/android/gi).test(appVersion);
mfp.isIOS=(/iphone|ipad|ipod/gi).test(appVersion);
mfp.supportsTransition=supportsTransitions();
mfp.probablyMobile=(mfp.isAndroid||mfp.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent));
_document=$(document);
mfp.popupsCache={};},
open: function(data){
var i;
if(data.isObj===false){
mfp.items=data.items.toArray();
mfp.index=0;
var items=data.items,
item;
for(i=0; i < items.length; i++){
item=items[i];
if(item.parsed){
item=item.el[0];
}
if(item===data.el[0]){
mfp.index=i;
break;
}}
}else{
mfp.items=$.isArray(data.items) ? data.items:[data.items];
mfp.index=data.index||0;
}
if(mfp.isOpen){
mfp.updateItemHTML();
return;
}
mfp.types=[];
_wrapClasses='';
if(data.mainEl&&data.mainEl.length){
mfp.ev=data.mainEl.eq(0);
}else{
mfp.ev=_document;
}
if(data.key){
if(!mfp.popupsCache[data.key]){
mfp.popupsCache[data.key]={};}
mfp.currTemplate=mfp.popupsCache[data.key];
}else{
mfp.currTemplate={};}
mfp.st=$.extend(true, {}, $.magnificPopup.defaults, data);
mfp.fixedContentPos=mfp.st.fixedContentPos==='auto' ? !mfp.probablyMobile:mfp.st.fixedContentPos;
if(mfp.st.modal){
mfp.st.closeOnContentClick=false;
mfp.st.closeOnBgClick=false;
mfp.st.showCloseBtn=false;
mfp.st.enableEscapeKey=false;
}
if(!mfp.bgOverlay){
mfp.bgOverlay=_getEl('bg').on('click'+EVENT_NS, function(){
mfp.close();
});
mfp.wrap=_getEl('wrap').attr('tabindex', -1).on('click'+EVENT_NS, function(e){
if(mfp._checkIfClose(e.target)){
mfp.close();
}});
mfp.container=_getEl('container', mfp.wrap);
}
mfp.contentContainer=_getEl('content');
if(mfp.st.preloader){
mfp.preloader=_getEl('preloader', mfp.container, mfp.st.tLoading);
}
var modules=$.magnificPopup.modules;
for(i=0; i < modules.length; i++){
var n=modules[i];
n=n.charAt(0).toUpperCase() + n.slice(1);
mfp['init'+n].call(mfp);
}
_mfpTrigger('BeforeOpen');
if(mfp.st.showCloseBtn){
if(!mfp.st.closeBtnInside){
mfp.wrap.append(_getCloseBtn());
}else{
_mfpOn(MARKUP_PARSE_EVENT, function(e, template, values, item){
values.close_replaceWith=_getCloseBtn(item.type);
});
_wrapClasses +=' mfp-close-btn-in';
}}
if(mfp.st.alignTop){
_wrapClasses +=' mfp-align-top';
}
if(mfp.fixedContentPos){
mfp.wrap.css({
overflow: mfp.st.overflowY,
overflowX: 'hidden',
overflowY: mfp.st.overflowY
});
}else{
mfp.wrap.css({
top: _window.scrollTop(),
position: 'absolute'
});
}
if(mfp.st.fixedBgPos===false||(mfp.st.fixedBgPos==='auto'&&!mfp.fixedContentPos)){
mfp.bgOverlay.css({
height: _document.height(),
position: 'absolute'
});
}
if(mfp.st.enableEscapeKey){
_document.on('keyup' + EVENT_NS, function(e){
if(e.keyCode===27){
mfp.close();
}});
}
_window.on('resize' + EVENT_NS, function(){
mfp.updateSize();
});
if(!mfp.st.closeOnContentClick){
_wrapClasses +=' mfp-auto-cursor';
}
if(_wrapClasses)
mfp.wrap.addClass(_wrapClasses);
var windowHeight=mfp.wH=_window.height();
var windowStyles={};
if(mfp.fixedContentPos){
if(mfp._hasScrollBar(windowHeight)){
var s=mfp._getScrollbarSize();
if(s){
windowStyles.marginRight=s;
}}
}
if(mfp.fixedContentPos){
if(!mfp.isIE7){
windowStyles.overflow='hidden';
}else{
$('body, html').css('overflow', 'hidden');
}}
var classesToadd=mfp.st.mainClass;
if(mfp.isIE7){
classesToadd +=' mfp-ie7';
}
if(classesToadd){
mfp._addClassToMFP(classesToadd);
}
mfp.updateItemHTML();
_mfpTrigger('BuildControls');
$('html').css(windowStyles);
mfp.bgOverlay.add(mfp.wrap).prependTo(mfp.st.prependTo||$(document.body));
mfp._lastFocusedEl=document.activeElement;
setTimeout(function(){
if(mfp.content){
mfp._addClassToMFP(READY_CLASS);
mfp._setFocus();
}else{
mfp.bgOverlay.addClass(READY_CLASS);
}
_document.on('focusin' + EVENT_NS, mfp._onFocusIn);
}, 16);
mfp.isOpen=true;
mfp.updateSize(windowHeight);
_mfpTrigger(OPEN_EVENT);
return data;
},
close: function(){
if(!mfp.isOpen) return;
_mfpTrigger(BEFORE_CLOSE_EVENT);
mfp.isOpen=false;
if(mfp.st.removalDelay&&!mfp.isLowIE&&mfp.supportsTransition){
mfp._addClassToMFP(REMOVING_CLASS);
setTimeout(function(){
mfp._close();
}, mfp.st.removalDelay);
}else{
mfp._close();
}},
_close: function(){
_mfpTrigger(CLOSE_EVENT);
var classesToRemove=REMOVING_CLASS + ' ' + READY_CLASS + ' ';
mfp.bgOverlay.detach();
mfp.wrap.detach();
mfp.container.empty();
if(mfp.st.mainClass){
classesToRemove +=mfp.st.mainClass + ' ';
}
mfp._removeClassFromMFP(classesToRemove);
if(mfp.fixedContentPos){
var windowStyles={marginRight: ''};
if(mfp.isIE7){
$('body, html').css('overflow', '');
}else{
windowStyles.overflow='';
}
$('html').css(windowStyles);
}
_document.off('keyup' + EVENT_NS + ' focusin' + EVENT_NS);
mfp.ev.off(EVENT_NS);
mfp.wrap.attr('class', 'mfp-wrap').removeAttr('style');
mfp.bgOverlay.attr('class', 'mfp-bg');
mfp.container.attr('class', 'mfp-container');
if(mfp.st.showCloseBtn &&
(!mfp.st.closeBtnInside||mfp.currTemplate[mfp.currItem.type]===true)){
if(mfp.currTemplate.closeBtn)
mfp.currTemplate.closeBtn.detach();
}
if(mfp._lastFocusedEl){
$(mfp._lastFocusedEl).focus();
}
mfp.currItem=null;
mfp.content=null;
mfp.currTemplate=null;
mfp.prevHeight=0;
_mfpTrigger(AFTER_CLOSE_EVENT);
},
updateSize: function(winHeight){
if(mfp.isIOS){
var zoomLevel=document.documentElement.clientWidth / window.innerWidth;
var height=window.innerHeight * zoomLevel;
mfp.wrap.css('height', height);
mfp.wH=height;
}else{
mfp.wH=winHeight||_window.height();
}
if(!mfp.fixedContentPos){
mfp.wrap.css('height', mfp.wH);
}
_mfpTrigger('Resize');
},
updateItemHTML: function(){
var item=mfp.items[mfp.index];
mfp.contentContainer.detach();
if(mfp.content)
mfp.content.detach();
if(!item.parsed){
item=mfp.parseEl(mfp.index);
}
var type=item.type;
_mfpTrigger('BeforeChange', [mfp.currItem ? mfp.currItem.type:'', type]);
mfp.currItem=item;
if(!mfp.currTemplate[type]){
var markup=mfp.st[type] ? mfp.st[type].markup:false;
_mfpTrigger('FirstMarkupParse', markup);
if(markup){
mfp.currTemplate[type]=$(markup);
}else{
mfp.currTemplate[type]=true;
}}
if(_prevContentType&&_prevContentType!==item.type){
mfp.container.removeClass('mfp-'+_prevContentType+'-holder');
}
var newContent=mfp['get' + type.charAt(0).toUpperCase() + type.slice(1)](item, mfp.currTemplate[type]);
mfp.appendContent(newContent, type);
item.preloaded=true;
_mfpTrigger(CHANGE_EVENT, item);
_prevContentType=item.type;
mfp.container.prepend(mfp.contentContainer);
_mfpTrigger('AfterChange');
},
appendContent: function(newContent, type){
mfp.content=newContent;
if(newContent){
if(mfp.st.showCloseBtn&&mfp.st.closeBtnInside &&
mfp.currTemplate[type]===true){
if(!mfp.content.find('.mfp-close').length){
mfp.content.append(_getCloseBtn());
}}else{
mfp.content=newContent;
}}else{
mfp.content='';
}
_mfpTrigger(BEFORE_APPEND_EVENT);
mfp.container.addClass('mfp-'+type+'-holder');
mfp.contentContainer.append(mfp.content);
},
parseEl: function(index){
var item=mfp.items[index],
type;
if(item.tagName){
item={ el: $(item) };}else{
type=item.type;
item={ data: item, src: item.src };}
if(item.el){
var types=mfp.types;
for(var i=0; i < types.length; i++){
if(item.el.hasClass('mfp-'+types[i])){
type=types[i];
break;
}}
item.src=item.el.attr('data-mfp-src');
if(!item.src){
item.src=item.el.attr('href');
}}
item.type=type||mfp.st.type||'inline';
item.index=index;
item.parsed=true;
mfp.items[index]=item;
_mfpTrigger('ElementParse', item);
return mfp.items[index];
},
addGroup: function(el, options){
var eHandler=function(e){
e.mfpEl=this;
mfp._openClick(e, el, options);
};
if(!options){
options={};}
var eName='click.magnificPopup';
options.mainEl=el;
if(options.items){
options.isObj=true;
el.off(eName).on(eName, eHandler);
}else{
options.isObj=false;
if(options.delegate){
el.off(eName).on(eName, options.delegate , eHandler);
}else{
options.items=el;
el.off(eName).on(eName, eHandler);
}}
},
_openClick: function(e, el, options){
var midClick=options.midClick!==undefined ? options.midClick:$.magnificPopup.defaults.midClick;
if(!midClick&&(e.which===2||e.ctrlKey||e.metaKey)){
return;
}
var disableOn=options.disableOn!==undefined ? options.disableOn:$.magnificPopup.defaults.disableOn;
if(disableOn){
if($.isFunction(disableOn)){
if(!disableOn.call(mfp)){
return true;
}}else{
if(_window.width() < disableOn){
return true;
}}
}
if(e.type){
e.preventDefault();
if(mfp.isOpen){
e.stopPropagation();
}}
options.el=$(e.mfpEl);
if(options.delegate){
options.items=el.find(options.delegate);
}
mfp.open(options);
},
updateStatus: function(status, text){
if(mfp.preloader){
if(_prevStatus!==status){
mfp.container.removeClass('mfp-s-'+_prevStatus);
}
if(!text&&status==='loading'){
text=mfp.st.tLoading;
}
var data={
status: status,
text: text
};
_mfpTrigger('UpdateStatus', data);
status=data.status;
text=data.text;
mfp.preloader.html(text);
mfp.preloader.find('a').on('click', function(e){
e.stopImmediatePropagation();
});
mfp.container.addClass('mfp-s-'+status);
_prevStatus=status;
}},
_checkIfClose: function(target){
if($(target).hasClass(PREVENT_CLOSE_CLASS)){
return;
}
var closeOnContent=mfp.st.closeOnContentClick;
var closeOnBg=mfp.st.closeOnBgClick;
if(closeOnContent&&closeOnBg){
return true;
}else{
if(!mfp.content||$(target).hasClass('mfp-close')||(mfp.preloader&&target===mfp.preloader[0])){
return true;
}
if((target!==mfp.content[0]&&!$.contains(mfp.content[0], target))){
if(closeOnBg){
if($.contains(document, target)){
return true;
}}
}else if(closeOnContent){
return true;
}}
return false;
},
_addClassToMFP: function(cName){
mfp.bgOverlay.addClass(cName);
mfp.wrap.addClass(cName);
},
_removeClassFromMFP: function(cName){
this.bgOverlay.removeClass(cName);
mfp.wrap.removeClass(cName);
},
_hasScrollBar: function(winHeight){
return((mfp.isIE7 ? _document.height():document.body.scrollHeight) > (winHeight||_window.height()));
},
_setFocus: function(){
(mfp.st.focus ? mfp.content.find(mfp.st.focus).eq(0):mfp.wrap).focus();
},
_onFocusIn: function(e){
if(e.target!==mfp.wrap[0]&&!$.contains(mfp.wrap[0], e.target)){
mfp._setFocus();
return false;
}},
_parseMarkup: function(template, values, item){
var arr;
if(item.data){
values=$.extend(item.data, values);
}
_mfpTrigger(MARKUP_PARSE_EVENT, [template, values, item]);
$.each(values, function(key, value){
if(value===undefined||value===false){
return true;
}
arr=key.split('_');
if(arr.length > 1){
var el=template.find(EVENT_NS + '-'+arr[0]);
if(el.length > 0){
var attr=arr[1];
if(attr==='replaceWith'){
if(el[0]!==value[0]){
el.replaceWith(value);
}}else if(attr==='img'){
if(el.is('img')){
el.attr('src', value);
}else{
el.replaceWith('<img src="'+value+'" class="' + el.attr('class') + '" />');
}}else{
el.attr(arr[1], value);
}}
}else{
template.find(EVENT_NS + '-'+key).html(value);
}});
},
_getScrollbarSize: function(){
if(mfp.scrollbarSize===undefined){
var scrollDiv=document.createElement("div");
scrollDiv.style.cssText='width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;';
document.body.appendChild(scrollDiv);
mfp.scrollbarSize=scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
}
return mfp.scrollbarSize;
}}; 
$.magnificPopup={
instance: null,
proto: MagnificPopup.prototype,
modules: [],
open: function(options, index){
_checkInstance();
if(!options){
options={};}else{
options=$.extend(true, {}, options);
}
options.isObj=true;
options.index=index||0;
return this.instance.open(options);
},
close: function(){
return $.magnificPopup.instance&&$.magnificPopup.instance.close();
},
registerModule: function(name, module){
if(module.options){
$.magnificPopup.defaults[name]=module.options;
}
$.extend(this.proto, module.proto);
this.modules.push(name);
},
defaults: {
disableOn: 0,
key: null,
midClick: false,
mainClass: '',
preloader: true,
focus: '',
closeOnContentClick: false,
closeOnBgClick: true,
closeBtnInside: true,
showCloseBtn: true,
enableEscapeKey: true,
modal: false,
alignTop: false,
removalDelay: 0,
prependTo: null,
fixedContentPos: 'auto',
fixedBgPos: 'auto',
overflowY: 'auto',
closeMarkup: '<button title="%title%" type="button" class="mfp-close">&times;</button>',
tClose: 'Close (Esc)',
tLoading: 'Loading...'
}};
$.fn.magnificPopup=function(options){
_checkInstance();
var jqEl=$(this);
if(typeof options==="string"){
if(options==='open'){
var items,
itemOpts=_isJQ ? jqEl.data('magnificPopup'):jqEl[0].magnificPopup,
index=parseInt(arguments[1], 10)||0;
if(itemOpts.items){
items=itemOpts.items[index];
}else{
items=jqEl;
if(itemOpts.delegate){
items=items.find(itemOpts.delegate);
}
items=items.eq(index);
}
mfp._openClick({mfpEl:items}, jqEl, itemOpts);
}else{
if(mfp.isOpen)
mfp[options].apply(mfp, Array.prototype.slice.call(arguments, 1));
}}else{
options=$.extend(true, {}, options);
if(_isJQ){
jqEl.data('magnificPopup', options);
}else{
jqEl[0].magnificPopup=options;
}
mfp.addGroup(jqEl, options);
}
return jqEl;
};
var INLINE_NS='inline',
_hiddenClass,
_inlinePlaceholder,
_lastInlineElement,
_putInlineElementsBack=function(){
if(_lastInlineElement){
_inlinePlaceholder.after(_lastInlineElement.addClass(_hiddenClass)).detach();
_lastInlineElement=null;
}};
$.magnificPopup.registerModule(INLINE_NS, {
options: {
hiddenClass: 'hide',
markup: '',
tNotFound: 'Content not found'
},
proto: {
initInline: function(){
mfp.types.push(INLINE_NS);
_mfpOn(CLOSE_EVENT+'.'+INLINE_NS, function(){
_putInlineElementsBack();
});
},
getInline: function(item, template){
_putInlineElementsBack();
if(item.src){
var inlineSt=mfp.st.inline,
el=$(item.src);
if(el.length){
var parent=el[0].parentNode;
if(parent&&parent.tagName){
if(!_inlinePlaceholder){
_hiddenClass=inlineSt.hiddenClass;
_inlinePlaceholder=_getEl(_hiddenClass);
_hiddenClass='mfp-'+_hiddenClass;
}
_lastInlineElement=el.after(_inlinePlaceholder).detach().removeClass(_hiddenClass);
}
mfp.updateStatus('ready');
}else{
mfp.updateStatus('error', inlineSt.tNotFound);
el=$('<div>');
}
item.inlineElement=el;
return el;
}
mfp.updateStatus('ready');
mfp._parseMarkup(template, {}, item);
return template;
}}
});
var AJAX_NS='ajax',
_ajaxCur,
_removeAjaxCursor=function(){
if(_ajaxCur){
$(document.body).removeClass(_ajaxCur);
}},
_destroyAjaxRequest=function(){
_removeAjaxCursor();
if(mfp.req){
mfp.req.abort();
}};
$.magnificPopup.registerModule(AJAX_NS, {
options: {
settings: null,
cursor: 'mfp-ajax-cur',
tError: '<a href="%url%">The content</a> could not be loaded.'
},
proto: {
initAjax: function(){
mfp.types.push(AJAX_NS);
_ajaxCur=mfp.st.ajax.cursor;
_mfpOn(CLOSE_EVENT+'.'+AJAX_NS, _destroyAjaxRequest);
_mfpOn('BeforeChange.' + AJAX_NS, _destroyAjaxRequest);
},
getAjax: function(item){
if(_ajaxCur){
$(document.body).addClass(_ajaxCur);
}
mfp.updateStatus('loading');
var opts=$.extend({
url: item.src,
success: function(data, textStatus, jqXHR){
var temp={
data:data,
xhr:jqXHR
};
_mfpTrigger('ParseAjax', temp);
mfp.appendContent($(temp.data), AJAX_NS);
item.finished=true;
_removeAjaxCursor();
mfp._setFocus();
setTimeout(function(){
mfp.wrap.addClass(READY_CLASS);
}, 16);
mfp.updateStatus('ready');
_mfpTrigger('AjaxContentAdded');
},
error: function(){
_removeAjaxCursor();
item.finished=item.loadError=true;
mfp.updateStatus('error', mfp.st.ajax.tError.replace('%url%', item.src));
}}, mfp.st.ajax.settings);
mfp.req=$.ajax(opts);
return '';
}}
});
var _imgInterval,
_getTitle=function(item){
if(item.data&&item.data.title!==undefined)
return item.data.title;
var src=mfp.st.image.titleSrc;
if(src){
if($.isFunction(src)){
return src.call(mfp, item);
}else if(item.el){
return item.el.attr(src)||'';
}}
return '';
};
$.magnificPopup.registerModule('image', {
options: {
markup: '<div class="mfp-figure">'+
'<div class="mfp-close"></div>'+
'<figure>'+
'<div class="mfp-img"></div>'+
'<figcaption>'+
'<div class="mfp-bottom-bar">'+
'<div class="mfp-title"></div>'+
'<div class="mfp-counter"></div>'+
'</div>'+
'</figcaption>'+
'</figure>'+
'</div>',
cursor: 'mfp-zoom-out-cur',
titleSrc: 'title',
verticalFit: true,
tError: '<a href="%url%">The image</a> could not be loaded.'
},
proto: {
initImage: function(){
var imgSt=mfp.st.image,
ns='.image';
mfp.types.push('image');
_mfpOn(OPEN_EVENT+ns, function(){
if(mfp.currItem.type==='image'&&imgSt.cursor){
$(document.body).addClass(imgSt.cursor);
}});
_mfpOn(CLOSE_EVENT+ns, function(){
if(imgSt.cursor){
$(document.body).removeClass(imgSt.cursor);
}
_window.off('resize' + EVENT_NS);
});
_mfpOn('Resize'+ns, mfp.resizeImage);
if(mfp.isLowIE){
_mfpOn('AfterChange', mfp.resizeImage);
}},
resizeImage: function(){
var item=mfp.currItem;
if(!item||!item.img) return;
if(mfp.st.image.verticalFit){
var decr=0;
if(mfp.isLowIE){
decr=parseInt(item.img.css('padding-top'), 10) + parseInt(item.img.css('padding-bottom'),10);
}
item.img.css('max-height', mfp.wH-decr);
}},
_onImageHasSize: function(item){
if(item.img){
item.hasSize=true;
if(_imgInterval){
clearInterval(_imgInterval);
}
item.isCheckingImgSize=false;
_mfpTrigger('ImageHasSize', item);
if(item.imgHidden){
if(mfp.content)
mfp.content.removeClass('mfp-loading');
item.imgHidden=false;
}}
},
findImageSize: function(item){
var counter=0,
img=item.img[0],
mfpSetInterval=function(delay){
if(_imgInterval){
clearInterval(_imgInterval);
}
_imgInterval=setInterval(function(){
if(img.naturalWidth > 0){
mfp._onImageHasSize(item);
return;
}
if(counter > 200){
clearInterval(_imgInterval);
}
counter++;
if(counter===3){
mfpSetInterval(10);
}else if(counter===40){
mfpSetInterval(50);
}else if(counter===100){
mfpSetInterval(500);
}}, delay);
};
mfpSetInterval(1);
},
getImage: function(item, template){
var guard=0,
onLoadComplete=function(){
if(item){
if(item.img[0].complete){
item.img.off('.mfploader');
if(item===mfp.currItem){
mfp._onImageHasSize(item);
mfp.updateStatus('ready');
}
item.hasSize=true;
item.loaded=true;
_mfpTrigger('ImageLoadComplete');
}else{
guard++;
if(guard < 200){
setTimeout(onLoadComplete,100);
}else{
onLoadError();
}}
}},
onLoadError=function(){
if(item){
item.img.off('.mfploader');
if(item===mfp.currItem){
mfp._onImageHasSize(item);
mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src));
}
item.hasSize=true;
item.loaded=true;
item.loadError=true;
}},
imgSt=mfp.st.image;
var el=template.find('.mfp-img');
if(el.length){
var img=document.createElement('img');
img.className='mfp-img';
if(item.el&&item.el.find('img').length){
img.alt=item.el.find('img').attr('alt');
}
item.img=$(img).on('load.mfploader', onLoadComplete).on('error.mfploader', onLoadError);
img.src=item.src;
if(el.is('img')){
item.img=item.img.clone();
}
img=item.img[0];
if(img.naturalWidth > 0){
item.hasSize=true;
}else if(!img.width){
item.hasSize=false;
}}
mfp._parseMarkup(template, {
title: _getTitle(item),
img_replaceWith: item.img
}, item);
mfp.resizeImage();
if(item.hasSize){
if(_imgInterval) clearInterval(_imgInterval);
if(item.loadError){
template.addClass('mfp-loading');
mfp.updateStatus('error', imgSt.tError.replace('%url%', item.src));
}else{
template.removeClass('mfp-loading');
mfp.updateStatus('ready');
}
return template;
}
mfp.updateStatus('loading');
item.loading=true;
if(!item.hasSize){
item.imgHidden=true;
template.addClass('mfp-loading');
mfp.findImageSize(item);
}
return template;
}}
});
var hasMozTransform,
getHasMozTransform=function(){
if(hasMozTransform===undefined){
hasMozTransform=document.createElement('p').style.MozTransform!==undefined;
}
return hasMozTransform;
};
$.magnificPopup.registerModule('zoom', {
options: {
enabled: false,
easing: 'ease-in-out',
duration: 300,
opener: function(element){
return element.is('img') ? element:element.find('img');
}},
proto: {
initZoom: function(){
var zoomSt=mfp.st.zoom,
ns='.zoom',
image;
if(!zoomSt.enabled||!mfp.supportsTransition){
return;
}
var duration=zoomSt.duration,
getElToAnimate=function(image){
var newImg=image.clone().removeAttr('style').removeAttr('class').addClass('mfp-animated-image'),
transition='all '+(zoomSt.duration/1000)+'s ' + zoomSt.easing,
cssObj={
position: 'fixed',
zIndex: 9999,
left: 0,
top: 0,
'-webkit-backface-visibility': 'hidden'
},
t='transition';
cssObj['-webkit-'+t]=cssObj['-moz-'+t]=cssObj['-o-'+t]=cssObj[t]=transition;
newImg.css(cssObj);
return newImg;
},
showMainContent=function(){
mfp.content.css('visibility', 'visible');
},
openTimeout,
animatedImg;
_mfpOn('BuildControls'+ns, function(){
if(mfp._allowZoom()){
clearTimeout(openTimeout);
mfp.content.css('visibility', 'hidden');
image=mfp._getItemToZoom();
if(!image){
showMainContent();
return;
}
animatedImg=getElToAnimate(image);
animatedImg.css(mfp._getOffset());
mfp.wrap.append(animatedImg);
openTimeout=setTimeout(function(){
animatedImg.css(mfp._getOffset(true));
openTimeout=setTimeout(function(){
showMainContent();
setTimeout(function(){
animatedImg.remove();
image=animatedImg=null;
_mfpTrigger('ZoomAnimationEnded');
}, 16);
}, duration);
}, 16);
}});
_mfpOn(BEFORE_CLOSE_EVENT+ns, function(){
if(mfp._allowZoom()){
clearTimeout(openTimeout);
mfp.st.removalDelay=duration;
if(!image){
image=mfp._getItemToZoom();
if(!image){
return;
}
animatedImg=getElToAnimate(image);
}
animatedImg.css(mfp._getOffset(true));
mfp.wrap.append(animatedImg);
mfp.content.css('visibility', 'hidden');
setTimeout(function(){
animatedImg.css(mfp._getOffset());
}, 16);
}});
_mfpOn(CLOSE_EVENT+ns, function(){
if(mfp._allowZoom()){
showMainContent();
if(animatedImg){
animatedImg.remove();
}
image=null;
}});
},
_allowZoom: function(){
return mfp.currItem.type==='image';
},
_getItemToZoom: function(){
if(mfp.currItem.hasSize){
return mfp.currItem.img;
}else{
return false;
}},
_getOffset: function(isLarge){
var el;
if(isLarge){
el=mfp.currItem.img;
}else{
el=mfp.st.zoom.opener(mfp.currItem.el||mfp.currItem);
}
var offset=el.offset();
var paddingTop=parseInt(el.css('padding-top'),10);
var paddingBottom=parseInt(el.css('padding-bottom'),10);
offset.top -=($(window).scrollTop() - paddingTop);
var obj={
width: el.width(),
height: (_isJQ ? el.innerHeight():el[0].offsetHeight) - paddingBottom - paddingTop
};
if(getHasMozTransform()){
obj['-moz-transform']=obj['transform']='translate(' + offset.left + 'px,' + offset.top + 'px)';
}else{
obj.left=offset.left;
obj.top=offset.top;
}
return obj;
}}
});
var IFRAME_NS='iframe',
_emptyPage='//about:blank',
_fixIframeBugs=function(isShowing){
if(mfp.currTemplate[IFRAME_NS]){
var el=mfp.currTemplate[IFRAME_NS].find('iframe');
if(el.length){
if(!isShowing){
el[0].src=_emptyPage;
}
if(mfp.isIE8){
el.css('display', isShowing ? 'block':'none');
}}
}};
$.magnificPopup.registerModule(IFRAME_NS, {
options: {
markup: '<div class="mfp-iframe-scaler">'+
'<div class="mfp-close"></div>'+
'<iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe>'+
'</div>',
srcAction: 'iframe_src',
patterns: {
youtube: {
index: 'youtube.com',
id: 'v=',
src: '//www.youtube.com/embed/%id%?autoplay=1'
},
vimeo: {
index: 'vimeo.com/',
id: '/',
src: '//player.vimeo.com/video/%id%?autoplay=1'
},
gmaps: {
index: '//maps.google.',
src: '%id%&output=embed'
}}
},
proto: {
initIframe: function(){
mfp.types.push(IFRAME_NS);
_mfpOn('BeforeChange', function(e, prevType, newType){
if(prevType!==newType){
if(prevType===IFRAME_NS){
_fixIframeBugs();
}else if(newType===IFRAME_NS){
_fixIframeBugs(true);
}}
});
_mfpOn(CLOSE_EVENT + '.' + IFRAME_NS, function(){
_fixIframeBugs();
});
},
getIframe: function(item, template){
var embedSrc=item.src;
var iframeSt=mfp.st.iframe;
$.each(iframeSt.patterns, function(){
if(embedSrc.indexOf(this.index) > -1){
if(this.id){
if(typeof this.id==='string'){
embedSrc=embedSrc.substr(embedSrc.lastIndexOf(this.id)+this.id.length, embedSrc.length);
}else{
embedSrc=this.id.call(this, embedSrc);
}}
embedSrc=this.src.replace('%id%', embedSrc);
return false;
}});
var dataObj={};
if(iframeSt.srcAction){
dataObj[iframeSt.srcAction]=embedSrc;
}
mfp._parseMarkup(template, dataObj, item);
mfp.updateStatus('ready');
return template;
}}
});
var _getLoopedId=function(index){
var numSlides=mfp.items.length;
if(index > numSlides - 1){
return index - numSlides;
}else if(index < 0){
return numSlides + index;
}
return index;
},
_replaceCurrTotal=function(text, curr, total){
return text.replace(/%curr%/gi, curr + 1).replace(/%total%/gi, total);
};
$.magnificPopup.registerModule('gallery', {
options: {
enabled: false,
arrowMarkup: '<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',
preload: [0,2],
navigateByImgClick: true,
arrows: true,
tPrev: 'Previous (Left arrow key)',
tNext: 'Next (Right arrow key)',
tCounter: '%curr% of %total%'
},
proto: {
initGallery: function(){
var gSt=mfp.st.gallery,
ns='.mfp-gallery',
supportsFastClick=Boolean($.fn.mfpFastClick);
mfp.direction=true;
if(!gSt||!gSt.enabled) return false;
_wrapClasses +=' mfp-gallery';
_mfpOn(OPEN_EVENT+ns, function(){
if(gSt.navigateByImgClick){
mfp.wrap.on('click'+ns, '.mfp-img', function(){
if(mfp.items.length > 1){
mfp.next();
return false;
}});
}
_document.on('keydown'+ns, function(e){
if(e.keyCode===37){
mfp.prev();
}else if(e.keyCode===39){
mfp.next();
}});
});
_mfpOn('UpdateStatus'+ns, function(e, data){
if(data.text){
data.text=_replaceCurrTotal(data.text, mfp.currItem.index, mfp.items.length);
}});
_mfpOn(MARKUP_PARSE_EVENT+ns, function(e, element, values, item){
var l=mfp.items.length;
values.counter=l > 1 ? _replaceCurrTotal(gSt.tCounter, item.index, l):'';
});
_mfpOn('BuildControls' + ns, function(){
if(mfp.items.length > 1&&gSt.arrows&&!mfp.arrowLeft){
var markup=gSt.arrowMarkup,
arrowLeft=mfp.arrowLeft=$(markup.replace(/%title%/gi, gSt.tPrev).replace(/%dir%/gi, 'left')).addClass(PREVENT_CLOSE_CLASS),
arrowRight=mfp.arrowRight=$(markup.replace(/%title%/gi, gSt.tNext).replace(/%dir%/gi, 'right')).addClass(PREVENT_CLOSE_CLASS);
var eName=supportsFastClick ? 'mfpFastClick':'click';
arrowLeft[eName](function(){
mfp.prev();
});
arrowRight[eName](function(){
mfp.next();
});
if(mfp.isIE7){
_getEl('b', arrowLeft[0], false, true);
_getEl('a', arrowLeft[0], false, true);
_getEl('b', arrowRight[0], false, true);
_getEl('a', arrowRight[0], false, true);
}
mfp.container.append(arrowLeft.add(arrowRight));
}});
_mfpOn(CHANGE_EVENT+ns, function(){
if(mfp._preloadTimeout) clearTimeout(mfp._preloadTimeout);
mfp._preloadTimeout=setTimeout(function(){
mfp.preloadNearbyImages();
mfp._preloadTimeout=null;
}, 16);
});
_mfpOn(CLOSE_EVENT+ns, function(){
_document.off(ns);
mfp.wrap.off('click'+ns);
if(mfp.arrowLeft&&supportsFastClick){
mfp.arrowLeft.add(mfp.arrowRight).destroyMfpFastClick();
}
mfp.arrowRight=mfp.arrowLeft=null;
});
},
next: function(){
mfp.direction=true;
mfp.index=_getLoopedId(mfp.index + 1);
mfp.updateItemHTML();
},
prev: function(){
mfp.direction=false;
mfp.index=_getLoopedId(mfp.index - 1);
mfp.updateItemHTML();
},
goTo: function(newIndex){
mfp.direction=(newIndex >=mfp.index);
mfp.index=newIndex;
mfp.updateItemHTML();
},
preloadNearbyImages: function(){
var p=mfp.st.gallery.preload,
preloadBefore=Math.min(p[0], mfp.items.length),
preloadAfter=Math.min(p[1], mfp.items.length),
i;
for(i=1; i <=(mfp.direction ? preloadAfter:preloadBefore); i++){
mfp._preloadItem(mfp.index+i);
}
for(i=1; i <=(mfp.direction ? preloadBefore:preloadAfter); i++){
mfp._preloadItem(mfp.index-i);
}},
_preloadItem: function(index){
index=_getLoopedId(index);
if(mfp.items[index].preloaded){
return;
}
var item=mfp.items[index];
if(!item.parsed){
item=mfp.parseEl(index);
}
_mfpTrigger('LazyLoad', item);
if(item.type==='image'){
item.img=$('<img class="mfp-img" />').on('load.mfploader', function(){
item.hasSize=true;
}).on('error.mfploader', function(){
item.hasSize=true;
item.loadError=true;
_mfpTrigger('LazyLoadError', item);
}).attr('src', item.src);
}
item.preloaded=true;
}}
});
/*
Touch Support that might be implemented some day
addSwipeGesture: function(){
var startX,
moved,
multipleTouches;
return;
var namespace='.mfp',
addEventNames=function(pref, down, move, up, cancel){
mfp._tStart=pref + down + namespace;
mfp._tMove=pref + move + namespace;
mfp._tEnd=pref + up + namespace;
mfp._tCancel=pref + cancel + namespace;
};
if(window.navigator.msPointerEnabled){
addEventNames('MSPointer', 'Down', 'Move', 'Up', 'Cancel');
}else if('ontouchstart' in window){
addEventNames('touch', 'start', 'move', 'end', 'cancel');
}else{
return;
}
_window.on(mfp._tStart, function(e){
var oE=e.originalEvent;
multipleTouches=moved=false;
startX=oE.pageX||oE.changedTouches[0].pageX;
}).on(mfp._tMove, function(e){
if(e.originalEvent.touches.length > 1){
multipleTouches=e.originalEvent.touches.length;
}else{
moved=true;
}}).on(mfp._tEnd + ' ' + mfp._tCancel, function(e){
if(moved&&!multipleTouches){
var oE=e.originalEvent,
diff=startX - (oE.pageX||oE.changedTouches[0].pageX);
if(diff > 20){
mfp.next();
}else if(diff < -20){
mfp.prev();
}}
});
},
*/
var RETINA_NS='retina';
$.magnificPopup.registerModule(RETINA_NS, {
options: {
replaceSrc: function(item){
return item.src.replace(/\.\w+$/, function(m){ return '@2x' + m; });
},
ratio: 1 
},
proto: {
initRetina: function(){
if(window.devicePixelRatio > 1){
var st=mfp.st.retina,
ratio=st.ratio;
ratio = !isNaN(ratio) ? ratio:ratio();
if(ratio > 1){
_mfpOn('ImageHasSize' + '.' + RETINA_NS, function(e, item){
item.img.css({
'max-width': item.img[0].naturalWidth / ratio,
'width': '100%'
});
});
_mfpOn('ElementParse' + '.' + RETINA_NS, function(e, item){
item.src=st.replaceSrc(item, ratio);
});
}}
}}
});
/**
* FastClick event implementation. (removes 300ms delay on touch devices)
* Based on //developers.google.com/mobile/articles/fast_buttons
*
* You may use it outside the Magnific Popup by calling just:
*
* $('.your-el').mfpFastClick(function(){
*     console.log('Clicked!');
* });
*
* To unbind:
* $('.your-el').destroyMfpFastClick();
*
*
* Note that it's a very basic and simple implementation, it blocks ghost click on the same element where it was bound.
* If you need something more advanced, use plugin by FT Labs //github.com/ftlabs/fastclick
*
*/
(function(){
var ghostClickDelay=1000,
supportsTouch='ontouchstart' in window,
unbindTouchMove=function(){
_window.off('touchmove'+ns+' touchend'+ns);
},
eName='mfpFastClick',
ns='.'+eName;
$.fn.mfpFastClick=function(callback){
return $(this).each(function(){
var elem=$(this),
lock;
if(supportsTouch){
var timeout,
startX,
startY,
pointerMoved,
point,
numPointers;
elem.on('touchstart' + ns, function(e){
pointerMoved=false;
numPointers=1;
point=e.originalEvent ? e.originalEvent.touches[0]:e.touches[0];
startX=point.clientX;
startY=point.clientY;
_window.on('touchmove'+ns, function(e){
point=e.originalEvent ? e.originalEvent.touches:e.touches;
numPointers=point.length;
point=point[0];
if(Math.abs(point.clientX - startX) > 10 ||
Math.abs(point.clientY - startY) > 10){
pointerMoved=true;
unbindTouchMove();
}}).on('touchend'+ns, function(e){
unbindTouchMove();
if(pointerMoved||numPointers > 1){
return;
}
lock=true;
e.preventDefault();
clearTimeout(timeout);
timeout=setTimeout(function(){
lock=false;
}, ghostClickDelay);
callback();
});
});
}
elem.on('click' + ns, function(){
if(!lock){
callback();
}});
});
};
$.fn.destroyMfpFastClick=function(){
$(this).off('touchstart' + ns + ' click' + ns);
if(supportsTouch) _window.off('touchmove'+ns+' touchend'+ns);
};})();
_checkInstance(); }));
!function(t){"use strict";var e=function(n,a){this.$element=t(n),this.options=t.extend({},e.defaults,a)};e.defaults={transition_delay:300,refresh_speed:50,display_text:"none",use_percentage:!0,percent_format:function(t){return t+"%"},amount_format:function(t,e){return t+" / "+e},update:t.noop,done:t.noop,fail:t.noop},e.prototype.transition=function(){var n=this.$element,a=n.parent(),s=this.$back_text,i=this.$front_text,r=this.options,o=n.attr("data-valuetransitiongoal"),h=n.attr("data-valuemin")||0,d=n.attr("data-valuemax")||100,f=a.hasClass("vertical"),u=r.update&&"function"==typeof r.update?r.update:e.defaults.update,c=r.done&&"function"==typeof r.done?r.done:e.defaults.done,p=r.fail&&"function"==typeof r.fail?r.fail:e.defaults.fail;if(!o)return void p("aria-valuetransitiongoal not set");var l=Math.round(100*(o-h)/(d-h));if("center"===r.display_text&&!s&&!i){this.$back_text=s=t("<span>").addClass("progressbar-back-text").prependTo(a),this.$front_text=i=t("<span>").addClass("progressbar-front-text").prependTo(n);var g;f?(g=a.css("height"),s.css({height:g,"line-height":g}),i.css({height:g,"line-height":g}),t(window).resize(function(){g=a.css("height"),s.css({height:g,"line-height":g}),i.css({height:g,"line-height":g})})):(g=a.css("width"),i.css({width:g}),t(window).resize(function(){g=a.css("width"),i.css({width:g})}))}setTimeout(function(){var t,e,p,g,_;f?n.css("height",l+"%"):n.css("width",l+"%");var v=setInterval(function(){f?(p=n.height(),g=a.height()):(p=n.width(),g=a.width()),t=Math.round(100*p/g),e=Math.round(p/g*(d-h)),t>=l&&(t=l,e=o,c(),clearInterval(v)),"none"!==r.display_text&&(_=r.use_percentage?r.percent_format(t):r.amount_format(e,d),"fill"===r.display_text?n.text(_):"center"===r.display_text&&(s.text(_),i.text(_))),n.attr("data-valuenow",e),u(t)},r.refresh_speed)},r.transition_delay)};var n=t.fn.progressbar;t.fn.progressbar=function(n){return this.each(function(){var a=t(this),s=a.data("bs.progressbar"),i="object"==typeof n&&n;s||a.data("bs.progressbar",s=new e(this,i)),s.transition()})},t.fn.progressbar.Constructor=e,t.fn.progressbar.noConflict=function(){return t.fn.progressbar=n,this}}(window.jQuery);
!function(a,b){if("function"==typeof define&&define.amd)define(["module","exports"],b);else if("undefined"!=typeof exports)b(module,exports);else{var c={exports:{}};b(c,c.exports),a.WOW=c.exports}}(this,function(a,b){"use strict";function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function d(a,b){return b.indexOf(a)>=0}function e(a,b){for(var c in b)if(null==a[c]){var d=b[c];a[c]=d}return a}function f(a){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(a)}function g(a){var b=arguments.length<=1||void 0===arguments[1]?!1:arguments[1],c=arguments.length<=2||void 0===arguments[2]?!1:arguments[2],d=arguments.length<=3||void 0===arguments[3]?null:arguments[3],e=void 0;return null!=document.createEvent?(e=document.createEvent("CustomEvent"),e.initCustomEvent(a,b,c,d)):null!=document.createEventObject?(e=document.createEventObject(),e.eventType=a):e.eventName=a,e}function h(a,b){null!=a.dispatchEvent?a.dispatchEvent(b):b in(null!=a)?a[b]():"on"+b in(null!=a)&&a["on"+b]()}function i(a,b,c){null!=a.addEventListener?a.addEventListener(b,c,!1):null!=a.attachEvent?a.attachEvent("on"+b,c):a[b]=c}function j(a,b,c){null!=a.removeEventListener?a.removeEventListener(b,c,!1):null!=a.detachEvent?a.detachEvent("on"+b,c):delete a[b]}function k(){return"innerHeight"in window?window.innerHeight:document.documentElement.clientHeight}Object.defineProperty(b,"__esModule",{value:!0});var l,m,n=function(){function a(a,b){for(var c=0;c<b.length;c++){var d=b[c];d.enumerable=d.enumerable||!1,d.configurable=!0,"value"in d&&(d.writable=!0),Object.defineProperty(a,d.key,d)}}return function(b,c,d){return c&&a(b.prototype,c),d&&a(b,d),b}}(),o=window.WeakMap||window.MozWeakMap||function(){function a(){c(this,a),this.keys=[],this.values=[]}return n(a,[{key:"get",value:function(a){for(var b=0;b<this.keys.length;b++){var c=this.keys[b];if(c===a)return this.values[b]}}},{key:"set",value:function(a,b){for(var c=0;c<this.keys.length;c++){var d=this.keys[c];if(d===a)return this.values[c]=b,this}return this.keys.push(a),this.values.push(b),this}}]),a}(),p=window.MutationObserver||window.WebkitMutationObserver||window.MozMutationObserver||(m=l=function(){function a(){c(this,a),"undefined"!=typeof console&&null!==console&&(console.warn("MutationObserver is not supported by your browser."),console.warn("WOW.js cannot detect dom mutations, please call .sync() after loading new content."))}return n(a,[{key:"observe",value:function(){}}]),a}(),l.notSupported=!0,m),q=window.getComputedStyle||function(a){var b=/(\-([a-z]){1})/g;return{getPropertyValue:function(c){"float"===c&&(c="styleFloat"),b.test(c)&&c.replace(b,function(a,b){return b.toUpperCase()});var d=a.currentStyle;return(null!=d?d[c]:void 0)||null}}},r=function(){function a(){var b=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];c(this,a),this.defaults={boxClass:"wow",animateClass:"animated",offset:0,mobile:!0,live:!0,callback:null,scrollContainer:null,resetAnimation:!0},this.animate=function(){return"requestAnimationFrame"in window?function(a){return window.requestAnimationFrame(a)}:function(a){return a()}}(),this.vendors=["moz","webkit"],this.start=this.start.bind(this),this.resetAnimation=this.resetAnimation.bind(this),this.scrollHandler=this.scrollHandler.bind(this),this.scrollCallback=this.scrollCallback.bind(this),this.scrolled=!0,this.config=e(b,this.defaults),null!=b.scrollContainer&&(this.config.scrollContainer=document.querySelector(b.scrollContainer)),this.animationNameCache=new o,this.wowEvent=g(this.config.boxClass)}return n(a,[{key:"init",value:function(){this.element=window.document.documentElement,d(document.readyState,["interactive","complete"])?this.start():i(document,"DOMContentLoaded",this.start),this.finished=[]}},{key:"start",value:function(){var a=this;if(this.stopped=!1,this.boxes=[].slice.call(this.element.querySelectorAll("."+this.config.boxClass)),this.all=this.boxes.slice(0),this.boxes.length)if(this.disabled())this.resetStyle();else for(var b=0;b<this.boxes.length;b++){var c=this.boxes[b];this.applyStyle(c,!0)}if(this.disabled()||(i(this.config.scrollContainer||window,"scroll",this.scrollHandler),i(window,"resize",this.scrollHandler),this.interval=setInterval(this.scrollCallback,50)),this.config.live){var d=new p(function(b){for(var c=0;c<b.length;c++)for(var d=b[c],e=0;e<d.addedNodes.length;e++){var f=d.addedNodes[e];a.doSync(f)}});d.observe(document.body,{childList:!0,subtree:!0})}}},{key:"stop",value:function(){this.stopped=!0,j(this.config.scrollContainer||window,"scroll",this.scrollHandler),j(window,"resize",this.scrollHandler),null!=this.interval&&clearInterval(this.interval)}},{key:"sync",value:function(){p.notSupported&&this.doSync(this.element)}},{key:"doSync",value:function(a){if("undefined"!=typeof a&&null!==a||(a=this.element),1===a.nodeType){a=a.parentNode||a;for(var b=a.querySelectorAll("."+this.config.boxClass),c=0;c<b.length;c++){var e=b[c];d(e,this.all)||(this.boxes.push(e),this.all.push(e),this.stopped||this.disabled()?this.resetStyle():this.applyStyle(e,!0),this.scrolled=!0)}}}},{key:"show",value:function(a){return this.applyStyle(a),a.className=a.className+" "+this.config.animateClass,null!=this.config.callback&&this.config.callback(a),h(a,this.wowEvent),this.config.resetAnimation&&(i(a,"animationend",this.resetAnimation),i(a,"oanimationend",this.resetAnimation),i(a,"webkitAnimationEnd",this.resetAnimation),i(a,"MSAnimationEnd",this.resetAnimation)),a}},{key:"applyStyle",value:function(a,b){var c=this,d=a.getAttribute("data-wow-duration"),e=a.getAttribute("data-wow-delay"),f=a.getAttribute("data-wow-iteration");return this.animate(function(){return c.customStyle(a,b,d,e,f)})}},{key:"resetStyle",value:function(){for(var a=0;a<this.boxes.length;a++){var b=this.boxes[a];b.style.visibility="visible"}}},{key:"resetAnimation",value:function(a){if(a.type.toLowerCase().indexOf("animationend")>=0){var b=a.target||a.srcElement;b.className=b.className.replace(this.config.animateClass,"").trim()}}},{key:"customStyle",value:function(a,b,c,d,e){return b&&this.cacheAnimationName(a),a.style.visibility=b?"hidden":"visible",c&&this.vendorSet(a.style,{animationDuration:c}),d&&this.vendorSet(a.style,{animationDelay:d}),e&&this.vendorSet(a.style,{animationIterationCount:e}),this.vendorSet(a.style,{animationName:b?"none":this.cachedAnimationName(a)}),a}},{key:"vendorSet",value:function(a,b){for(var c in b)if(b.hasOwnProperty(c)){var d=b[c];a[""+c]=d;for(var e=0;e<this.vendors.length;e++){var f=this.vendors[e];a[""+f+c.charAt(0).toUpperCase()+c.substr(1)]=d}}}},{key:"vendorCSS",value:function(a,b){for(var c=q(a),d=c.getPropertyCSSValue(b),e=0;e<this.vendors.length;e++){var f=this.vendors[e];d=d||c.getPropertyCSSValue("-"+f+"-"+b)}return d}},{key:"animationName",value:function(a){var b=void 0;try{b=this.vendorCSS(a,"animation-name").cssText}catch(c){b=q(a).getPropertyValue("animation-name")}return"none"===b?"":b}},{key:"cacheAnimationName",value:function(a){return this.animationNameCache.set(a,this.animationName(a))}},{key:"cachedAnimationName",value:function(a){return this.animationNameCache.get(a)}},{key:"scrollHandler",value:function(){this.scrolled=!0}},{key:"scrollCallback",value:function(){if(this.scrolled){this.scrolled=!1;for(var a=[],b=0;b<this.boxes.length;b++){var c=this.boxes[b];if(c){if(this.isVisible(c)){this.show(c);continue}a.push(c)}}this.boxes=a,this.boxes.length||this.config.live||this.stop()}}},{key:"offsetTop",value:function(a){for(;void 0===a.offsetTop;)a=a.parentNode;for(var b=a.offsetTop;a.offsetParent;)a=a.offsetParent,b+=a.offsetTop;return b}},{key:"isVisible",value:function(a){var b=a.getAttribute("data-wow-offset")||this.config.offset,c=this.config.scrollContainer&&this.config.scrollContainer.scrollTop||window.pageYOffset,d=c+Math.min(this.element.clientHeight,k())-b,e=this.offsetTop(a),f=e+a.clientHeight;return d>=e&&f>=c}},{key:"disabled",value:function(){return!this.config.mobile&&f(navigator.userAgent)}}]),a}();b["default"]=r,a.exports=b["default"]});
var wow=new WOW(
{
boxClass:     'wow',
animateClass: 'animated',
offset:       0,
mobile:       true,
live:         true,
callback:     function(box){
},
scrollContainer: null,
resetAnimation: true,
}
);
wow.init();
;(function ($){
"use strict";
var scroll_top;
var window_height;
var window_width;
var scroll_status='';
var lastScrollTop=0;
$(window).on('load', function (){
$(".ct-loader").fadeOut("slow");
window_width=$(window).width();
contio_header_sticky();
contio_scroll_to_top();
contio_quantity_icon();
$('body:not(.elementor-editor-active) .ct-slick-slider').css('display', 'block');
});
$(window).on('resize', function (){
window_width=$(window).width();
});
$(window).on('scroll', function (){
scroll_top=$(window).scrollTop();
window_height=$(window).height();
window_width=$(window).width();
if(scroll_top < lastScrollTop){
scroll_status='up';
}else{
scroll_status='down';
}
lastScrollTop=scroll_top;
contio_header_sticky();
contio_scroll_to_top();
});
$(document).on('click', '.h-btn-search', function (){
$('.ct-modal-search').addClass('open');
$('.ct-widget-cart-sidebar').removeClass('open');
$('body').addClass('ov-hidden');
setTimeout(function(){
$('.ct-modal-search .search-field').focus();
},1000);
});
$(document).ready(function (){
var $menu=$('.ct-main-navigation');
$menu.find('.ct-main-menu li').each(function (){
var $submenu=$(this).find('> ul.sub-menu');
if($submenu.length==1){
$(this).hover(function (){
if($submenu.offset().left + $submenu.width() > $(window).width()){
$submenu.addClass('back');
}else if($submenu.offset().left < 0){
$submenu.addClass('back');
}}, function (){
$submenu.removeClass('back');
});
}});
$('.ct-main-navigation li.menu-item-has-children').append('<span class="ct-menu-toggle far fac-angle-down"></span>');
$('.ct-menu-toggle').on('click', function (){
$(this).toggleClass('toggle-open');
$(this).parent().find('> .sub-menu').toggleClass('submenu-open');
$(this).parent().find('> .sub-menu').slideToggle();
});
$("#ct-menu-mobile .open-menu").on('click', function (){
$(this).toggleClass('opened');
$('.ct-header-navigation').toggleClass('navigation-open');
});
$(".ct-menu-close").on('click', function (){
$(this).parents('.header-navigation').removeClass('navigation-open');
$('.ct-menu-overlay').removeClass('active');
$('#ct-menu-mobile .open-menu').removeClass('opened');
$('body').removeClass('ovhidden');
});
$(".ct-menu-overlay").on('click', function (){
$(this).parents('#header-main').find('.header-navigation').removeClass('navigation-open');
$(this).removeClass('active');
$('#ct-menu-mobile .open-menu').removeClass('opened');
$('.header-navigation').removeClass('navigation-open');
$('body').removeClass('ovhidden');
});
$('.h-btn-form').click(function (e){
e.preventDefault();
$('.ct-modal-contact-form').removeClass('remove').toggleClass('open');
});
$('.ct-close').click(function (e){
e.preventDefault();
$(this).parent().addClass('remove').removeClass('open');
$(this).parents('.ct-modal').addClass('remove').removeClass('open');
$(this).parents('#page').find('.site-overlay').removeClass('open');
});
$('.ct-hidden-sidebar-overlay').click(function (e){
e.preventDefault();
$(this).parent().toggleClass('open');
$(this).parents('body').removeClass('ov-hidden');
});
$('.entry-video iframe').each(function (){
var v_width=$(this).width();
v_width=v_width / (16 / 9);
$(this).attr('height', v_width + 35);
});
$('.images-light-box').each(function (){
$(this).magnificPopup({
delegate: 'a.light-box',
type: 'image',
gallery: {
enabled: true
},
mainClass: 'mfp-fade',
});
});
$('.image-light-box').each(function (){
$(this).magnificPopup({
delegate: 'a.light-box',
type: 'image',
gallery: {
enabled: false
},
mainClass: 'mfp-fade',
});
});
$('.ct-video-button, .btn-video').magnificPopup({
type: 'iframe',
mainClass: 'mfp-fade',
removalDelay: 160,
preloader: false,
fixedContentPos: false
});
$('.scroll-top').click(function (){
$('html, body').animate({scrollTop: 0}, 800);
return false;
});
$('.wpcf7-select').parent().addClass('wpcf7-menu');
var $owl_item=$('.owl-active-click');
$owl_item.children().each(function (index){
$(this).attr('data-position', index);
});
$(document).on('click', '.owl-active-click .owl-item > div', function (){
$owl_item.trigger('to.owl.carousel', $(this).data('position'));
});
$('select').each(function (){
$(this).niceSelect();
});
$('.widget_newsletterwidget, form.newsletter, form.tnp-subscription').each(function (){
var email_text=$(this).find('.tnp-field-email label').text();
$(this).find('.tnp-field-email label').remove();
$(this).find(".tnp-email").each(function (ev){
if(!$(this).val()){
$(this).attr("placeholder", email_text);
}});
var firstname_text=$(this).find('.tnp-field-firstname label').text();
$(this).find('.tnp-field-firstname label').remove();
$(this).find(".tnp-firstname").each(function (ev){
if(!$(this).val()){
$(this).attr("placeholder", firstname_text);
}});
var lastname_text=$(this).find('.tnp-field-lastname label').text();
$(this).find('.tnp-field-lastname label').remove();
$(this).find(".tnp-lastname").each(function (ev){
if(!$(this).val()){
$(this).attr("placeholder", lastname_text);
}});
});
$('.ct-modal-close').on('click', function (){
$(this).parent().removeClass('open');
$(this).parents('body').removeClass('ov-hidden');
});
$(document).on('click', function (e){
if(e.target.className=='ct-modal ct-modal-search open')
$('.ct-modal-search').removeClass('open');
if(e.target.className=='ct-hidden-sidebar open')
$('.ct-hidden-sidebar').removeClass('open');
});
$(".h-btn-sidebar").on('click', function (e){
e.preventDefault();
$('.ct-hidden-sidebar-wrap').toggleClass('open');
$('.ct-widget-cart-sidebar').removeClass('open');
$(this).parents('body').addClass('ov-hidden');
});
$(".ct-hidden-close").on('click', function (e){
e.preventDefault();
$(this).parents('.ct-hidden-sidebar-wrap').removeClass('open');
$(this).parents('body').removeClass('ov-hidden');
});
$(".h-btn-cart, .btn-nav-cart").on('click', function (e){
e.preventDefault();
$('.ct-widget-cart-sidebar').toggleClass('open');
$('.ct-header-navigation').removeClass('navigation-open');
$('#ct-menu-mobile .open-menu').removeClass('opened');
});
var _year_footer=$(".ct-footer-year"),
_year_clone=_year_footer.parents(".site").find('.ct-year');
_year_clone.after(_year_footer.clone());
_year_footer.remove();
$('.comment-reply a').append('<i class="fa fa-angle-right"></i>');
$('.ct-navigation-menu1.default a').append('<i class="fac fac-angle-right"></i>');
setTimeout(function (){
$('.revslider-initialised').each(function (){
$(this).find('.ct-slider-nav .slider-nav-right').on('click', function (){
$(this).parents('.revslider-initialised').find('.tp-rightarrow').trigger('click');
});
$(this).find('.ct-slider-nav .slider-nav-left').on('click', function (){
$(this).parents('.revslider-initialised').find('.tp-leftarrow').trigger('click');
});
});
$('.ct-slider-nav').parents('.revslider-initialised').find('.tparrows').addClass('arrow-hidden');
}, 300);
setTimeout(function (){
$('.input-filled').each(function (){
var icon_input=$(this).find(".input-icon"),
control_wrap=$(this).find('.wpcf7-form-control');
control_wrap.before(icon_input.clone());
icon_input.remove();
});
}, 200);
$('.ct-pointer-item').each(function (){
$(this).find('.ct-pointer-btn').on('click', function (){
$(this).toggleClass('open');
$(this).parents('.elementor-widget-wrap').find('.ct-pointer-item .ct-pointer-btn').removeClass('open');
$(this).addClass('open');
});
});
$(".ct-team-carousel2 .item--inner").hover(function(){
$(this).find('.item--description').slideToggle(300);
}, function(){
$(this).find('.item--description').slideToggle(300);
}
);
$(".choose-demo").on('click', function (){
$(this).parents('.ct-demo-bar').toggleClass('active');
});
$('.animate-time').each(function (){
var eltime=100;
var elt_inner=$(this).children().length;
var _elt=elt_inner - 1;
$(this).find('> .grid-item > .wow').each(function (index, obj){
$(this).css('animation-delay', eltime + 'ms');
if(_elt===index){
eltime=100;
_elt=_elt + elt_inner;
}else{
eltime=eltime + 80;
}});
});
$('.ct-showcase-link a').each(function (){
$(this).hover(function (){
$(this).parents('.ct-showcase-image').find('.ct-showcase-link a').removeClass('is-active');
$(this).addClass('is-active');
});
});
});
function contio_header_sticky(){
var offsetTop=$('#ct-header-wrap').outerHeight();
var h_header=$('.fixed-height').outerHeight();
var offsetTopAnimation=offsetTop + 200;
if($('#ct-header-wrap').hasClass('is-sticky')){
if(scroll_top > offsetTopAnimation){
$('#ct-header').addClass('h-fixed');
}else{
$('#ct-header').removeClass('h-fixed');
}}
if(window_width > 992){
$('.fixed-height').css({
'height': h_header
});
}}
function contio_scroll_to_top(){
if(scroll_top < window_height){
$('.scroll-top').addClass('off').removeClass('on');
}
if(scroll_top > window_height){
$('.scroll-top').addClass('on').removeClass('off');
}}
function contio_quantity_icon(){
$('#content .quantity').append('<span class="quantity-icon"><i class="quantity-down fa fa-sort-desc"></i><i class="quantity-up fa fa-sort-asc"></i></span>');
$('.quantity-up').on('click', function (){
$(this).parents('.quantity').find('input[type="number"]').get(0).stepUp();
});
$('.quantity-down').on('click', function (){
$(this).parents('.quantity').find('input[type="number"]').get(0).stepDown();
});
$('.woocommerce-cart-form .actions .button').removeAttr('disabled');
}
$(document).ajaxComplete(function(){
contio_quantity_icon();
});
})(jQuery);
;(function ($){
"use strict";
$(document).ready(function (){
$('.widget_product_search .search-field').find("input[type='text']").each(function (ev){
if(!$(this).val()){
$(this).attr("placeholder", "Search and Press Enter");
}});
$('.product-layout-list').parents('ul.products').addClass('products-list');
$('.single_variation_wrap').addClass('clearfix');
$('.woocommerce-variation-add-to-cart').addClass('clearfix');
$('.cart-total-wrap').on('click', function (){
$('.widget-cart-sidebar').toggleClass('open');
$(this).toggleClass('cart-open');
$('.site-overlay').toggleClass('open');
});
$('.site-overlay').on('click', function (){
$(this).removeClass('open');
$(this).parents('#page').find('.widget-cart-sidebar').removeClass('open');
});
$('.woocommerce-tab-heading').on('click', function (){
$(this).toggleClass('open');
$(this).parent().find('.woocommerce-tab-content').slideToggle('');
});
$('.site-menu-right .h-btn-cart, .mobile-menu-cart .h-btn-cart').on('click', function (e){
e.preventDefault();
$(this).parents('#ct-header-wrap').find('.widget_shopping_cart').toggleClass('open');
$('.ct-hidden-sidebar').removeClass('open');
$('.ct-search-popup').removeClass('open');
});
});
})(jQuery);
(function($){
var WidgetCMSTabsHandler=function($scope, $){
$scope.find(".ct-tabs .ct-tabs-title .ct-tab-title").on("click", function(e){
e.preventDefault();
var target=$(this).data("target");
var parent=$(this).parents(".ct-tabs");
parent.find(".ct-tabs-content .ct-tab-content").hide();
parent.find(".ct-tabs-title .ct-tab-title").removeClass('active');
$(this).addClass("active");
$(target).show();
});
};
$(window).on('elementor/frontend/init', function(){
elementorFrontend.hooks.addAction('frontend/element_ready/ct_tabs.default', WidgetCMSTabsHandler);
elementorFrontend.hooks.addAction('frontend/element_ready/ct_tab_template.default', WidgetCMSTabsHandler);
});
})(jQuery);