!function(o,e,t,_){o.imageMapProShapeDefaults={id:"spot-0",title:"",type:"spot",x:-1,y:-1,width:44,height:44,x_image_background:-1,y_image_background:-1,width_image_background:44,height_image_background:44,connected_to:"",use_connected_shape_tooltip:0,layerID:0,text:{text:"Text",font_family:"sans-serif",font_size:16,font_weight:400,text_color:"#000000",text_opacity:1},actions:{click:"no-action",link:"#",open_link_in_new_window:1,script:""},default_style:{opacity:1,border_radius:50,background_type:"color",background_image_url:"",background_image_opacity:1,background_image_scale:1,background_image_offset_x:0,background_image_offset_y:0,background_color:"#000000",background_opacity:.4,border_width:0,border_style:"solid",border_color:"#ffffff",border_opacity:1,stroke_color:"#ffffff",stroke_opacity:.75,stroke_width:0,stroke_dasharray:"0",stroke_linecap:"round",use_icon:1,icon_type:"library",icon_svg_path:"M409.81,160.113C409.79,71.684,338.136,0,249.725,0C161.276,0,89.583,71.684,89.583,160.113 c0,76.325,119.274,280.238,151.955,334.638c1.72,2.882,4.826,4.641,8.178,4.641c3.351,0,6.468-1.759,8.168-4.631 C290.545,440.361,409.81,236.438,409.81,160.113z M249.716,283.999c-68.303,0-123.915-55.573-123.915-123.895 c0-68.313,55.592-123.895,123.915-123.895s123.876,55.582,123.876,123.895S318.029,283.999,249.716,283.999z",icon_svg_viewbox:"0 0 499.392 499.392",icon_fontawesome_id:"map-marker",icon_fill:"#000000",icon_url:"",icon_is_pin:1,icon_shadow:0},mouseover_style:{opacity:1,border_radius:50,background_image_url:"",background_image_opacity:1,background_image_scale:1,background_image_offset_x:0,background_image_offset_y:0,background_color:"#ffffff",background_opacity:.4,border_width:0,border_style:"solid",border_color:"#ffffff",border_opacity:1,stroke_color:"#ffffff",stroke_opacity:.75,stroke_width:0,stroke_dasharray:"0",stroke_linecap:"round",icon_fill:"#000000"},tooltip:{enable_tooltip:1},tooltip_style:{buffer:40,border_radius:10,padding:15,background_color:"#222222",background_opacity:1,position:"top",width:225,auto_width:0,offset_x:0,offset_y:0},tooltip_content:{squares_settings:{containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"}}]}}]}},points:[],vs:[]},o.imageMapProEditorDefaults={id:0,editor:{previewMode:0,selected_shape:-1,transform_tooltip_mode:0,tool:"spot",zoom:1,currentLayer:0,state:{dragging:!1}},runtime:{is_fullscreen:0,layerID:0,menu_search_string:"",menu_scroll:0},general:{name:"",shortcode:"",width:1280,height:776,naturalWidth:1280,naturalHeight:776,responsive:1,preserve_quality:1,center_image_map:0},image:{url:"https://imagemappro.com/uploads/editor/default-image-blank.png"},fullscreen:{enable_fullscreen_mode:0,start_in_fullscreen_mode:0,fullscreen_background:"#000000",fullscreen_button_position:1,fullscreen_button_type:"icon_and_text",fullscreen_button_color:"#ffffff",fullscreen_button_text_color:"#222222"},shapes:{pageload_animation:"none",glowing_shapes:0,glowing_shapes_color:"#ffffff",glow_opacity:.5,stop_glowing_on_mouseover:1},tooltips:{enable_tooltips:1,show_tooltips:"mouseover",show_title_on_mouseover:0,sticky_tooltips:0,constrain_tooltips:1,tooltip_animation:"none",fullscreen_tooltips:"mobile-only"},zooming:{enable_zooming:0,max_zoom:16,limit_max_zoom_to_image_size:0,enable_zoom_buttons:1,enable_navigator:1,zoom_button_text_color:"#000000",zoom_button_background_color:"#ffffff",hold_ctrl_to_zoom:1},layers:{enable_layers:0,layers_list:[]},shapes_menu:{enable_shapes_menu:0,detached_menu:0,menu_position:"left",enable_search:1,group_by_floor:0,hide_children_of_connected_shapes:1},custom_code:{custom_css:"",custom_js:""},spots:[]}}(jQuery,window,document); !function(t,e,s,o){var i=new Array;function n(t){this.settings=t,this.containers=[],this.init()}function r(t){this.settings=t,this.elements=[],this.init()}t.squaresRendererRegisterElement=function(t){i[t.name]=t},t.squaresRendererRenderObject=function(t){if("object"!=typeof t)try{t=JSON.parse(t)}catch(e){return console.log(e),console.log("Squares renderer failed to parse JSON: "),console.log(t),""}return new n(t).render()},n.prototype.init=function(){for(var t=0;t',t+=i[this.settings.name].render(this.options),t+=""},l.prototype.generateLayoutClass=function(){var t=this.options.layout;if(1==parseInt(t.use_grid,10)){var e="",s=t.column_span;return 1==parseInt(s.xs.use,10)&&(e+=s.xs.class+" ",0==parseInt(s.xs.visible,10)&&(e+="sq-hidden-xs ")),1==parseInt(s.sm.use,10)&&(e+=s.sm.class+" ",0==parseInt(s.sm.visible,10)&&(e+="sq-hidden-sm ")),1==parseInt(s.md.use,10)&&(e+=s.md.class+" ",0==parseInt(s.md.visible,10)&&(e+="sq-hidden-md ")),1==parseInt(s.lg.use,10)&&(e+=s.lg.class+" ",0==parseInt(s.lg.visible,10)&&(e+="sq-hidden-lg ")),e}return""},l.prototype.generateCSS=function(){var t="";t+="margin-top: "+(s=this.options.layout).box_model.margin.top+"px; ",t+="margin-bottom: "+s.box_model.margin.bottom+"px; ",t+="margin-left: "+s.box_model.margin.left+"px; ",t+="margin-right: "+s.box_model.margin.right+"px; ",t+="padding-top: "+s.box_model.padding.top+"px; ",t+="padding-bottom: "+s.box_model.padding.bottom+"px; ",t+="padding-left: "+s.box_model.padding.left+"px; ",t+="padding-right: "+s.box_model.padding.right+"px; ",1==parseInt(s.use_grid,10)||(1==parseInt(s.auto_width,10)?t+="width: auto; ":""===s.width||isNaN(s.width)||(t+="width: "+s.width+"px; "),1==parseInt(s.auto_height,10)?t+="height: auto; ":""===s.height||isNaN(s.height)||(t+="height: "+s.height+"px; "));var e,s=this.options.font;(this.options.fontStyles="",s&&(t+="font-family: "+s.font_family+"; ",this.options.fontStyles+="font-family: "+s.font_family+"; ",t+="font-size: "+s.font_size+"px; ",this.options.fontStyles+="font-size: "+s.font_size+"px; ",t+="font-weight: "+s.font_weight+"; ",this.options.fontStyles+="font-weight: "+s.font_weight+"; ",t+="font-style: "+s.font_style+"; ",this.options.fontStyles+="font-style: "+s.font_style+"; ",t+="line-height: "+s.line_height+"px; ",this.options.fontStyles+="line-height: "+s.line_height+"px; ",t+="color: "+s.text_color+"; ",this.options.fontStyles+="color: "+s.text_color+"; ",t+="text-align: "+s.text_align+"; ",this.options.fontStyles+="text-align: "+s.text_align+"; ",t+="text-decoration: "+s.text_decoration+"; ",this.options.fontStyles+="text-decoration: "+s.text_decoration+"; ",t+="text-transform: "+s.text_transform+"; ",this.options.fontStyles+="text-transform: "+s.text_transform+"; ",t+="text-shadow: "+s.text_shadow+"; ",this.options.fontStyles+="text-shadow: "+s.text_shadow+"; "),s=this.options.style)&&(t+="background-color: rgba("+(e=d(s.background_color)).r+", "+e.g+", "+e.b+", "+s.background_opacity+"); ",t+="opacity: "+s.opacity+"; ",t+="box-shadow: "+s.box_shadow+"; ",t+="border-width: "+s.border_width+"px; ",t+="border-style: "+s.border_style+"; ",t+="border-color: rgba("+(e=d(s.border_color)).r+", "+e.g+", "+e.b+", "+s.border_opacity+"); ",t+="border-radius: "+s.border_radius+"px; ");return t}}(jQuery,window,document); !function(e,t,a,l){var o={name:"Paragraph",iconClass:"fa fa-paragraph",controls:{text:{text:{name:"Text",type:"textarea",default:"Lorem ipsum dolor sit amet, consectetuer adipiscing elit."}}},controlGroupIcons:{text:"fa fa-ellipsis-h"},content:function(){var e=this.controls.text.text.getVal();return e=(e=e.replace(/\\(.)/gm,"$1")).replace(/\n/gm,"
"),'

'+e+"

"},render:function(e){var t=e.text.text;return t=(t=t.replace(/\\(.)/gm,"$1")).replace(/\n/gm,"
"),'

'+t+"

"}};e.squaresRegisterElement&&e.squaresRegisterElement(o),e.squaresRendererRegisterElement(o);var s={name:"Heading",iconClass:"fa fa-header",controls:{heading:{text:{name:"Text",type:"text",default:"Lorem Ipsum"},heading:{name:"Heading",type:"select",options:["h1","h2","h3"],default:"h3"}}},controlGroupIcons:{heading:"fa fa-header"},content:function(){return"<"+this.controls.heading.heading.getVal()+' id="'+this.controls.general.id.getVal()+'" style="'+this.controls.general.css.getVal()+this.fontStyles+' margin: 0; padding: 0;" class="'+this.controls.general.classes.getVal()+'">'+this.controls.heading.text.getVal()+""},render:function(e){return"<"+e.heading.heading+' id="'+e.general.id+'" style="'+e.general.css+e.fontStyles+' margin: 0; padding: 0;" class="'+e.general.classes+'">'+e.heading.text+""}};e.squaresRegisterElement&&e.squaresRegisterElement(s),e.squaresRendererRegisterElement(s);var n={name:"Image",iconClass:"fa fa-camera",controls:{image:{url:{name:"Image URL",type:"text",default:"https://webcraftplugins.com/uploads/placeholder_image.png"},image_is_a_link:{name:"Image is a Link",type:"switch",default:0},link_to:{name:"Link to",type:"text",default:"#"}}},controlGroupIcons:{image:"fa fa-camera"},useFontControls:!1,content:function(){var e="";1==parseInt(this.controls.image.image_is_a_link.getVal(),10)&&(e+=''),e+='',1==parseInt(this.controls.image.image_is_a_link.getVal(),10)&&(e+="");var t=new Image;function a(){console.log("loaded")}return t.src=this.controls.image.url.getVal(),t.complete?a():t.addEventListener("load",a),e},render:function(t){var l="";1==parseInt(t.image.image_is_a_link,10)&&(l+=''),l+='',1==parseInt(t.image.image_is_a_link,10)&&(l+="");var o=new Image;function s(){e(a).trigger("squares_image_loaded")}return o.src=t.image.url,o.complete?s():o.addEventListener("load",s),l}};e.squaresRegisterElement&&e.squaresRegisterElement(n),e.squaresRendererRegisterElement(n);var r={name:"Video",iconClass:"fa fa-video-camera",controls:{video:{mp4_url:{name:"MP4 URL",type:"text",default:"http://webcraftplugins.com/uploads/example_video.mp4"},webm_url:{name:"WEBM URL",type:"text",default:"http://webcraftplugins.com/uploads/example_video.webm"},ogv_url:{name:"OGV URL",type:"text",default:"http://webcraftplugins.com/uploads/example_video.ogv"},video_is_a_link:{name:"Video is a Link",type:"switch",default:0},link_to:{name:"Link to",type:"text",default:"#"},autoplay:{name:"Autoplay",type:"switch",default:0},loop:{name:"Loop",type:"switch",default:0},controls:{name:"Controls",type:"switch",default:0}}},useFontControls:!1,controlGroupIcons:{video:"fa fa-video-camera"},content:function(){var e="";1==parseInt(this.controls.video.video_is_a_link.getVal(),10)&&(e+='');var t="";return 1==parseInt(this.controls.video.autoplay.getVal(),10)&&(t+=" autoplay "),1==parseInt(this.controls.video.loop.getVal(),10)&&(t+=" loop "),1==parseInt(this.controls.video.controls.getVal(),10)&&(t+=" controls "),e+="',1==parseInt(this.controls.video.video_is_a_link.getVal(),10)&&(e+=""),e},render:function(e){var t="";1==parseInt(e.video.video_is_a_link,10)&&(t+='');var a="";return 1==parseInt(e.video.autoplay,10)&&(a+=" autoplay "),1==parseInt(e.video.loop,10)&&(a+=" loop "),1==parseInt(e.video.controls,10)&&(a+=" controls "),t+="',1==parseInt(e.video.video_is_a_link,10)&&(t+=""),t}};e.squaresRegisterElement&&e.squaresRegisterElement(r),e.squaresRendererRegisterElement(r);var i={name:"YouTube",iconClass:"fa fa-youtube",useStyleControls:!1,useFontControls:!1,controls:{youtube:{embed_code:{name:"Embed Code",type:"textarea",default:''},allow_fullscreen:{name:"Allow Fullscreen",type:"switch",default:1},iframe_width:{name:"iframe Width",type:"int",default:320},iframe_auto_width:{name:"iframe Auto Width",type:"switch",default:1},iframe_height:{name:"iframe Height",type:"int",default:320}}},controlGroupIcons:{youtube:"fa fa-youtube"},content:function(){var e=this.controls.youtube.embed_code.getVal(),t="";return t+='
',e=e.replace("allowfullscreen",""),1==parseInt(this.controls.youtube.allow_fullscreen.getVal(),10)&&-1==e.indexOf("allowfullscreen")&&(e=e.replace(">"," allowfullscreen>")),t+=e=(e=1==parseInt(this.controls.youtube.iframe_auto_width.getVal(),10)?e.replace(/width="\d+"/g,'width="100%"'):e.replace(/width="\d+"/g,'width="'+this.controls.youtube.iframe_width.getVal()+'px"')).replace(/height="\d+"/g,'height="'+this.controls.youtube.iframe_height.getVal()+'px"'),t+="
"},render:function(e){var t=e.youtube.embed_code,a="";return a+='
',t=t.replace("allowfullscreen",""),1==parseInt(e.youtube.allow_fullscreen,10)&&-1==t.indexOf("allowfullscreen")&&(t=t.replace(">"," allowfullscreen>")),a+=t=(t=1==parseInt(e.youtube.iframe_auto_width,10)?t.replace(/width="\d+"/g,'width="100%"'):t.replace(/width="\d+"/g,'width="'+e.youtube.iframe_width+'px"')).replace(/height="\d+"/g,'height="'+e.youtube.iframe_height+'px"'),a+="
"}};e.squaresRegisterElement&&e.squaresRegisterElement(i),e.squaresRendererRegisterElement(i);var c={name:"Button",iconClass:"fa fa-link",controls:{button:{text:{name:"Text",type:"text",default:"Button"},link_to:{name:"Link to",type:"text",default:"#"},new_tab:{name:"Open in New Tab",type:"switch",default:0},display:{name:"Display",type:"button group",options:["inline-block","block"],default:"inline-block"},height:{name:"Height",type:"int",default:44},bg_color:{name:"Background Color",type:"color",default:"#2196f3"},text_color:{name:"Text Color",type:"color",default:"#ffffff"},border_radius:{name:"Border Radius",type:"int",default:10},padding:{name:"Padding Left/Right",type:"int",default:20}}},controlGroupIcons:{button:"fa fa-link"},content:function(){var e="";e+="display: "+this.controls.button.display.getVal()+"; ",e+="height: "+this.controls.button.height.getVal()+"px; ",e+="line-height: "+this.controls.button.height.getVal()+"px; ",e+="background-color: "+this.controls.button.bg_color.getVal()+"; ",e+="color: "+this.controls.button.text_color.getVal()+"; ",e+="border-radius: "+this.controls.button.border_radius.getVal()+"px; ",e+="padding-left: "+this.controls.button.padding.getVal()+"px; ",e+="padding-right: "+this.controls.button.padding.getVal()+"px; ";var t="";return 1==parseInt(this.controls.button.new_tab.getVal(),10)&&(t='target="_blank"'),'
'+this.controls.button.text.getVal()+"
"},render:function(e){var t="";t+="display: "+e.button.display+"; ",t+="height: "+e.button.height+"px; ",t+="line-height: "+e.button.height+"px; ",t+="background-color: "+e.button.bg_color+"; ",t+="color: "+e.button.text_color+"; ",t+="border-radius: "+e.button.border_radius+"px; ",t+="padding-left: "+e.button.padding+"px; ",t+="padding-right: "+e.button.padding+"px; ";var a="";return 1==parseInt(e.button.new_tab,10)&&(a='target="_blank"'),'
'+e.button.text+"
"}};e.squaresRegisterElement&&e.squaresRegisterElement(c),e.squaresRendererRegisterElement(c)}(jQuery,window,document); !function($,window,document,undefined){"use strict";var fullscreenMap=undefined,fullscreenMapParent=undefined,touch=!1;$.imageMapProInitialized=function(t){},$.imageMapProEventHighlightedShape=function(t,i){},$.imageMapProEventUnhighlightedShape=function(t,i){},$.imageMapProEventClickedShape=function(t,i){},$.imageMapProEventOpenedTooltip=function(t,i){},$.imageMapProEventClosedTooltip=function(t,i){},$.imageMapProEventSwitchedFloor=function(t,i){},$.imageMapProHighlightShape=function(t,i){var e=findImageMapWithName(t);if(e){var s=findShapeWithTitle(e.settings.general.name,i);if(s){var a=s.shape,n=s.index;if(-1==e.apiHighlightedShapes.indexOf(n)&&e.apiHighlightedShapes.push(n),e.connectedShapes[a.id])for(var o=0;o0&&APIFunctionQueuePopAction()})}$(document).ready(function(){$(document).on("mouseover","[data-imp-highlight-shape-on-mouseover]",function(){var t=$(this).data("imp-highlight-shape-on-mouseover"),i=findImageMapWithName($(this).data("imp-image-map-name"));if(i){var e=findShapeWithTitle(i.settings.general.name,t);if(e){e.shape;var s=e.index;APIFunctionQueueAddAction(function(t){i.highlightShape(s,!0),t()})}}}),$(document).on("mouseout","[data-imp-highlight-shape-on-mouseover]",function(){var t=$(this).data("imp-highlight-shape-on-mouseover"),i=findImageMapWithName($(this).data("imp-image-map-name"));if(i){var e=findShapeWithTitle(i.settings.general.name,t);if(e){e.shape,e.index;APIFunctionQueueAddAction(function(t){i.unhighlightAllShapes(),t()})}}}),$(document).on("click","[data-imp-highlight-shape-on-click]",function(){var t=$(this).data("imp-highlight-shape-on-click"),i=findImageMapWithName($(this).data("imp-image-map-name"));if(i){var e=findShapeWithTitle(i.settings.general.name,t);if(e){var s=e.shape,a=e.index;if(s.layerID!=i.settings.runtime.layerID&&APIFunctionQueueAddAction(function(t){i.switchLayer(s.layerID,function(){t()})}),APIFunctionQueueAddAction(function(t){i.highlightShape(a,!0),t()}),-1==i.apiHighlightedShapes.indexOf(a)&&i.apiHighlightedShapes.push(a),i.connectedShapes[s.id])for(var n=0;n=e&&t<=e+a&&i>=s&&i<=s+n}function isPointInsidePolygon(t,i,e){for(var s=!1,a=0,n=e.length-1;ai!=l>i&&t<(r-o)*(i-h)/(l-h)+o&&(s=!s)}return s}function isPointInsideEllipse(t,i,e,s,a,n){return(t-e)*(t-e)/(a*a)+(i-s)*(i-s)/(n*n)<=1}function fitRectToScreen(t,i,e,s){return t<0&&(t=0),i<0&&(i=0),t>$(document).width()-e&&(t=$(document).width()-e),i>$(document).height()-s&&(i=$(document).height()-s),{x:t,y:i}}function shuffle(t){for(var i,e,s=t.length;0!==s;)e=Math.floor(Math.random()*s),i=t[s-=1],t[s]=t[e],t[e]=i;return t}function isMobile(){return!!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}function lerp(t,i,e){return t*(1-e)+i*e}function easeOutBounce(t,i,e,s,a){return(i/=a)<1/2.75?s*(7.5625*i*i)+e:i<2/2.75?s*(7.5625*(i-=1.5/2.75)*i+.75)+e:i<2.5/2.75?s*(7.5625*(i-=2.25/2.75)*i+.9375)+e:s*(7.5625*(i-=2.625/2.75)*i+.984375)+e}$.extend(Plugin.prototype,{init:function(t){this.parseSettings(),instances[this.settings.general.name]=this,this.id=100*Math.random();for(var i=0;i=0,(o=new Image).src=this.settings.image.url;var n=this;this.loadImage(o,function(){},function(){var i="";if(i+='
',i+='
',isTrue(n.settings.zooming.enable_zooming)&&isTrue(n.settings.zooming.enable_navigator)&&(i+='
',i+=' ',i+=' ',i+='
',i+=' ',i+="
"),isTrue(n.settings.zooming.enable_zooming)&&isTrue(n.settings.zooming.enable_zoom_buttons)&&(i+='
',i+='
'),isTrue(n.settings.layers.enable_layers)){i+='
',i+='
',i+='
',i+=' ",i+="
"}if(isTrue(n.settings.zooming.enable_zooming)&&isTrue(n.settings.zooming.hold_ctrl_to_zoom)){var s="CTRL";n.mac&&(s="⌘"),i+='
',i+='
',i+='
Hold
'+s+"
to Zoom
",i+="
",i+="
"}i+="
",i+='
',i+='
',i+='
',i+=' ',i+="
",i+="
",i+="
",i+="
",n.root.html(i),n.wrap=n.root.find(".imp-wrap"),n.zoomWrap=n.root.find(".imp-zoom-wrap"),n.translateWrap=n.root.find(".imp-translate-wrap"),n.ui=n.wrap.find(".imp-ui"),n.scrollMessage=n.wrap.find(".imp-ui-scroll-message-wrap"),n.root.addClass("imp-initialized"),n.root.attr("data-image-map-pro-id",n.settings.id),$('[data-imp-tooltips-container="'+n.settings.id+'"]').remove(),$("body").prepend('
'),n.tooltipsContainer=$('[data-imp-tooltips-container="'+n.settings.id+'"]'),n.events(),n.centerImageMap(),n.drawShapes(),n.addTooltips(),n.initFullscreen(),n.initZoom(),n.drawShapesMenu(),n.adjustSize(),n.initNavigator(),n.initLayers(),n.animateShapesLoop(),$.imageMapProInitialized(n.settings.general.name),t&&t()});for(i=0;i0)for(var t=0;t'),this.zoomWrap.prepend('
'),this.shapeContainer=this.wrap.find(".imp-shape-container"),this.imageBackgroundsContainer=this.wrap.find(".imp-image-backgrounds-container");var e="",s=this.settings.general.width,a=this.settings.general.height;isTrue(this.settings.general.responsive)&&(s=this.settings.general.naturalWidth,a=this.settings.general.naturalHeight);var n='';for(t=0;t',e+=' ',e+=" "}if("custom"==o.default_style.icon_type&&o.default_style.icon_url.length>0&&(e+=''),isTrue(o.default_style.icon_shadow)){var p="";p+="width: "+o.width+"px;",p+="height: "+o.height+"px;",e+='
'}if(isTrue(this.settings.shapes.glowing_shapes)){var g="";g+="width: "+o.width/3+"px;",g+="height: "+o.height/3+"px;",g+="margin-left: "+-o.width/6+"px;",g+="margin-top: "+-o.height/6+"px;",g+="border-radius: "+o.width/3+"px;",g+="background: rgba("+(u=hexToRgb(this.settings.shapes.glowing_shapes_color)||{r:0,b:0,g:0}).r+", "+u.g+", "+u.b+", "+this.settings.shapes.glow_opacity+");",e+='
'}e+=""}else{var d="";if(isTrue(this.settings.shapes.glowing_shapes)){g="";g+="box-shadow: 0 0 20px 15px rgba("+(u=hexToRgb(this.settings.shapes.glowing_shapes_color)||{r:0,b:0,g:0}).r+", "+u.g+", "+u.b+", "+this.settings.shapes.glow_opacity+");",d+='
'}e+='
'}e+='
'}e+='
'}this.shapeContainer.html(e+n),this.imageBackgroundsContainer.html(y)},drawShapesMenu:function(){if(isTrue(this.settings.shapes_menu.enable_shapes_menu)){var t="",i="imp-shapes-menu-wrap-left";"right"==this.settings.shapes_menu.menu_position&&(i="imp-shapes-menu-wrap-right");var e="";if(isTrue(this.settings.shapes_menu.enable_search)&&(e="imp-shapes-menu-wrap-with-search-box"),t+='
',isTrue(this.settings.shapes_menu.enable_search)&&(t+=' '),t+='
',isTrue(this.settings.shapes_menu.group_by_floor)&&isTrue(this.settings.layers.enable_layers))for(var s=0;s'+a.title+"
";for(var n=0;n'+o.title+"
")}}else for(n=0;n'+o.title+"")}t+=" ",t+="",isTrue(this.settings.shapes_menu.detached_menu)?($('[data-imp-detached-menu="'+this.settings.id+'"]').html(t),this.shapesMenuWrap=$('[data-imp-detached-menu="'+this.settings.id+'"]').find(".imp-shapes-menu-wrap")):isTrue(this.settings.runtime.is_fullscreen)?($("#imp-fullscreen-wrap").find(".imp-shapes-menu-wrap").remove(),$("#imp-fullscreen-wrap").append(t),0==$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").length&&this.root.wrap('
'),this.shapesMenuWrap=$("#imp-fullscreen-wrap").find(".imp-shapes-menu-wrap"),"left"==this.settings.shapes_menu.menu_position?$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").addClass("imp-shapes-menu-left"):$("#imp-fullscreen-wrap").find(".imp-fullscreen-root-wrap").addClass("imp-shapes-menu-right")):(this.wrap.wrap('
'),"left"==this.settings.shapes_menu.menu_position?this.root.find(".imp-shapes-menu-outer-wrap").prepend(t):this.root.find(".imp-shapes-menu-outer-wrap").append(t),this.shapesMenuWrap=this.root.find(".imp-shapes-menu-wrap"),isTrue(this.settings.shapes_menu.enable_search)?this.shapesMenuWrap.height(this.wrap.height()-73):this.shapesMenuWrap.height(this.wrap.height())),this.shapesMenuWrap.find('input[data-image-map-pro-search-id="'+this.settings.id+'"]').val(this.settings.runtime.menu_search_string),this.updateMenuSearch(),this.shapesMenuWrap.find(".imp-shapes-menu-scroll-wrap").scrollTop(this.settings.runtime.menu_scroll)}},addTooltips:function(){if("always"==this.settings.tooltips.fullscreen_tooltips||"mobile-only"==this.settings.tooltips.fullscreen_tooltips&&isMobile()){this.fullscreenTooltipsContainer||($('.imp-fullscreen-tooltips-container[data-image-map-id="'+this.settings.id+'"]').remove(),$("body").prepend('
'),this.fullscreenTooltipsContainer=$('.imp-fullscreen-tooltips-container[data-image-map-id="'+this.settings.id+'"]'));for(var t="",i=0;i',t+='
',"plain-text"==a.tooltip_content.content_type){e="";t+='
'+a.tooltip_content.plain_text+"
"}else a.tooltip_content.squares_json?t+=$.squaresRendererRenderObject(a.tooltip_content.squares_json):t+=$.squaresRendererRenderObject(a.tooltip_content.squares_settings);t+=""}this.fullscreenTooltipsContainer.html(t)}else{for(t="",i=0;i',"top"==a.tooltip_style.position&&(t+='
'),"bottom"==a.tooltip_style.position&&(t+='
'),"left"==a.tooltip_style.position&&(t+='
'),"right"==a.tooltip_style.position&&(t+='
');e="";e+="color: "+a.tooltip_content.plain_text_color+";";var n={containers:[{id:"sq-container-403761",settings:{elements:[{settings:{name:"Paragraph",iconClass:"fa fa-paragraph"},options:{text:{text:a.title}}}]}}]};t+='
'+$.squaresRendererRenderObject(n)+"
","plain-text"==a.tooltip_content.content_type?t+='
'+a.tooltip_content.plain_text+"
":a.tooltip_content.squares_json?t+=$.squaresRendererRenderObject(a.tooltip_content.squares_json):t+=$.squaresRendererRenderObject(a.tooltip_content.squares_settings),t+=""}this.tooltipsContainer.prepend(t)}},initFullscreen:function(){if(isTrue(this.settings.fullscreen.enable_fullscreen_mode)){var t="";t+="background: "+this.settings.fullscreen.fullscreen_button_color+"; ",t+="color: "+this.settings.fullscreen.fullscreen_button_text_color+"; ";var i='';isTrue(this.settings.runtime.is_fullscreen)&&(i='');var e="Go Fullscreen";isTrue(this.settings.runtime.is_fullscreen)&&(e="Close Fullscreen");var s="";"icon"==this.settings.fullscreen.fullscreen_button_type&&(s+=i),"text"==this.settings.fullscreen.fullscreen_button_type&&(s+=e),"icon_and_text"==this.settings.fullscreen.fullscreen_button_type&&(s+=i+" "+e);var a="";"icon"==this.settings.fullscreen.fullscreen_button_type&&(a+="imp-fullscreen-button-icon-only");var n="";n+='
',n+=s,n+="
",this.ui.append(n),isTrue(this.settings.runtime.is_fullscreen)&&($(window).scrollTop(0),fullscreenMap=this);var o=this.ui.find(".imp-fullscreen-button");1!=parseInt(this.settings.fullscreen.fullscreen_button_position,10)&&4!=parseInt(this.settings.fullscreen.fullscreen_button_position,10)||o.css({"margin-left":-o.outerWidth()/2}),isTrue(this.settings.fullscreen.start_in_fullscreen_mode)&&0==this.settings.runtime.is_fullscreen&&(this.settings.fullscreen.start_in_fullscreen_mode=0,this.toggleFullscreen())}},initNavigator:function(){isTrue(this.settings.zooming.enable_zooming)&&isTrue(this.settings.zooming.enable_navigator)&&(this.uiNavigatorRoot=this.ui.find(".imp-ui-navigator-root"),this.uiNavigatorImage=this.ui.find(".imp-ui-navigator-window-image"),this.adjustNavigatorSize())},initLayers:function(){if(isTrue(this.settings.layers.enable_layers)){for(var t=!1,i=0;i1||i.deltaY>0&&t.targetZoom0&&$(t.target).closest(".imp-ui-navigator-root").data("imp-id")==this.settings.id)return this.ix=i.x,this.iy=i.y,void(this.panningOnNavigator=!0);if(t.originalEvent.touches&&t.originalEvent.touches.length>1)return this.pinchInitial[0]={x:t.originalEvent.touches[0].pageX,y:t.originalEvent.touches[0].pageY},this.pinchInitial[1]={x:t.originalEvent.touches[1].pageX,y:t.originalEvent.touches[1].pageY},this.initialPanX=this.actualPanX,this.initialPanY=this.actualPanY,this.ix=(t.originalEvent.touches[0].pageX+t.originalEvent.touches[1].pageX)/2,this.iy=(t.originalEvent.touches[0].pageY+t.originalEvent.touches[1].pageY)/2,this.lastX=this.ix,this.lastY=this.iy,this.pinchInitialDistance=Math.sqrt(Math.pow(this.pinchInitial[1].x-this.pinchInitial[0].x,2)+Math.pow(this.pinchInitial[1].y-this.pinchInitial[0].y,2)),this.pinchInitialZoom=this.zoom,void(this.pinching=!0);this.panning||0!=$(t.target).closest(".imp-ui").length||(this.ix=i.x,this.iy=i.y,this.initialPanX=this.actualPanX,this.initialPanY=this.actualPanY,this.panning=!0)}},handleEventMove:function(t){if(Date.now()-this.lastWrapRecalc>1e3&&(this.lastWrapRecalc=Date.now(),this.wrapWidth=this.wrap.width(),this.wrapHeight=this.wrap.height(),this.wrapOffsetLeft=this.wrap.offset().left,this.wrapOffsetTop=this.wrap.offset().top),!this.fullscreenTooltipVisible&&!this.isEventOnHTMLAPIElement(t)){var i=this.getEventRelativeCoordinates(t),e=this.matchShapeToCoords(i),s=this.getEventCoordinates(t);if(isTrue(this.settings.zooming.enable_zooming)){if(this.panningOnNavigator){var a=(s.x-this.uiNavigatorRoot.offset().left)/this.navigatorRatio*this.targetZoom,n=(s.y-this.uiNavigatorRoot.offset().top)/this.navigatorRatio*this.targetZoom;return void this.panTo(a,n)}if(this.pinching)return this.pinch(t),void(this.didPan=!0);if(this.panning){s=this.getEventCoordinates(t);return this.pan(s.x,s.y),void(this.didPan=!0)}}if((!this.isPointInsideVisibleTooltip(t)||isTrue(this.settings.tooltips.sticky_tooltips))&&!$(t.target).data("imp-highlight-shape-on-mouseover")&&0==$(t.target).closest("[data-imp-highlight-shape-on-mouseover]").length&&!$(t.target).data("imp-trigger-shape-on-mouseover")&&0==$(t.target).closest("[data-imp-trigger-shape-on-mouseover]").length){if(1==$(t.target).closest(".imp-ui").length)return this.unhighlightAllShapes(),void("mouseover"==this.settings.tooltips.show_tooltips&&this.hideAllTooltips());-1!=e&&s.x>this.wrapOffsetLeft&&s.xthis.wrapOffsetTop&&s.y0&&isTrue(this.settings.tooltips.sticky_tooltips)&&"mouseover"==this.settings.tooltips.show_tooltips&&this.updateTooltipPosition(this.openedTooltips[this.openedTooltips.length-1],t),isTrue(this.settings.tooltips.show_title_on_mouseover)&&"click"==this.settings.tooltips.show_tooltips&&-1==this.openedTooltips.indexOf(e)&&this.updateTooltipPosition(e,t)))),$(t.target).is("video")||$(t.target).closest("video").length>0||(-1==e||s.xthis.wrapOffsetLeft+this.wrapWidth||s.ythis.wrapOffsetTop+this.wrapHeight)&&(this.unhighlightAllShapes(),isTrue(this.settings.tooltips.show_title_on_mouseover)&&"click"==this.settings.tooltips.show_tooltips&&this.hideAllTitles(),"mouseover"==this.settings.tooltips.show_tooltips&&this.openedTooltips.length>0&&this.hideAllTooltips())}}},handleEventEnd:function(t){if(!this.isEventOnHTMLAPIElement(t)){if(isTrue(this.settings.zooming.enable_zooming)){if(this.panning&&(this.panning=!1),this.pinching&&(this.pinching=!1),"mousewheel"==t.type)return this.hideAllTooltips(),this.unhighlightAllShapes(),t.deltaY>0&&this.zoomIn(t),void(t.deltaY<0&&this.zoomOut(t));if(this.panningOnNavigator&&$(t.target).closest(".imp-ui-navigator-root").length>0&&$(t.target).closest(".imp-ui-navigator-root").data("imp-id")==this.settings.id){this.panningOnNavigator=!1;var i=((o=this.getEventCoordinates(t)).x-this.uiNavigatorRoot.offset().left)/this.navigatorRatio*this.targetZoom,e=(o.y-this.uiNavigatorRoot.offset().top)/this.navigatorRatio*this.targetZoom;return void this.panTo(i,e)}if(this.panningOnNavigator&&(this.panningOnNavigator=!1),$(t.target).closest(".imp-ui-zoom-button").length>0&&$(t.target).closest(".imp-ui-zoom-button").data("imp-id")==this.settings.id)return void($(t.target).closest(".imp-ui-zoom-button-zoom-in").length>0?this.zoomIn():this.zoomOut())}if($(t.target).closest(".imp-fullscreen-button").length>0&&$(t.target).closest(".imp-fullscreen-button").data("imp-id")==this.settings.id&&this.toggleFullscreen(),$(t.target).closest(".imp-ui-layer-switch-up").length>0&&$(t.target).closest(".imp-ui-layer-switch-up").data("imp-id")==this.settings.id)for(var s=0;s0){var a=this.settings.layers.layers_list[s-1].id;this.switchLayer(a);break}if($(t.target).closest(".imp-ui-layer-switch-down").length>0&&$(t.target).closest(".imp-ui-layer-switch-down").data("imp-id")==this.settings.id)for(s=0;sthis.wrapOffsetLeft&&o.xthis.wrapOffsetTop&&o.y0&&isTrue(this.settings.tooltips.sticky_tooltips)&&"mouseover"==this.settings.tooltips.show_tooltips&&this.updateTooltipPosition(this.openedTooltips[this.openedTooltips.length-1],t),isTrue(this.settings.zooming.enable_zooming)&&this.focusShape(s)),this.performClickAction(s)),(-1==s||o.xthis.wrapOffsetLeft+this.wrapWidth||o.ythis.wrapOffsetTop+this.wrapHeight)&&(this.hideAllTooltips(),this.didPan||this.unhighlightAllShapes()),t.originalEvent.touches&&0==t.originalEvent.touches.length&&(this.didPan=!1),t.originalEvent.touches||(this.didPan=!1)}}},handleKeyDownEvent:function(t){t.ctrlKey&&(this.ctrlKeyDown=!0),t.metaKey&&(this.cmdKeyDown=!0)},handleKeyUpEvent:function(t){this.ctrlKeyDown=!1,this.cmdKeyDown=!1},getEventRelativeCoordinates:function(t){var i,e;if("touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var s=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];i=s.pageX,e=s.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(i=t.pageX,e=t.pageY);return i-=this.zoomWrap.offset().left,e-=this.zoomWrap.offset().top,{x:i=i/(this.wrap.width()*this.zoom)*100,y:e=e/(this.wrap.height()*this.zoom)*100}},getEventCoordinates:function(t){var i,e;if("touchstart"==t.type||"touchmove"==t.type||"touchend"==t.type||"touchcancel"==t.type){var s=t.originalEvent.touches[0]||t.originalEvent.changedTouches[0];i=s.pageX,e=s.pageY}else"mousedown"!=t.type&&"mouseup"!=t.type&&"mousemove"!=t.type&&"mouseover"!=t.type&&"mouseout"!=t.type&&"mouseenter"!=t.type&&"mouseleave"!=t.type||(i=t.pageX,e=t.pageY);return{x:i,y:e}},matchShapeToCoords:function(t){for(var i=this.settings.spots.length-1;i>=0;i--)if(!isTrue(this.settings.layers.enable_layers)||parseInt(this.settings.spots[i].layerID,10)==this.settings.runtime.layerID){var e=this.settings.spots[i];if("poly"==e.type){var s=t.x/100*this.zoomWrap.width(),a=t.y/100*this.zoomWrap.height();if(isPointInsidePolygon(s=s*this.settings.general.naturalWidth/this.zoomWrap.width(),a=a*this.settings.general.naturalHeight/this.zoomWrap.height(),e.vs))return i}if("spot"==e.type){var n=e.width<44?44:e.width,o=e.height<44?44:e.height;n/=this.zoom,o/=this.zoom;var s=t.x/100*this.wrap.width(),a=t.y/100*this.wrap.height(),h=e.x/100*this.wrap.width()-n/2,r=e.y/100*this.wrap.height()-o/2,l=n,p=o;if(isTrue(e.default_style.icon_is_pin)&&isTrue(e.default_style.use_icon)&&(r-=o/2,e.height<44&&(r+=e.height/2)),isPointInsideRect(s,a,h,r,l,p))return i}if("rect"==e.type&&isPointInsideRect(t.x,t.y,e.x,e.y,e.width,e.height))return i;if("oval"==e.type)if(isPointInsideEllipse(s=t.x,a=t.y,e.x+e.width/2,e.y+e.height/2,h=e.width/2,r=e.height/2))return i;e.type}return-1},isPointInsideVisibleTooltip:function(t){for(var i=0;i0&&s.find("path").attr("style","fill:"+t.icon_fill),"image"==e.default_style.background_type&&this.imageBackgroundsContainer.find('[data-id="'+e.id+'"]').css({"background-image":"url("+t.background_image_url+")",opacity:t.background_image_opacity})},highlightShape:function(t,i){var e=this.settings.spots[t];if(i&&""!=e.connected_to){var s=this.getIndexOfShapeWithID(e.connected_to);this.highlightShape(s,!0)}else{if(this.connectedShapes[e.id])for(var a=0;a0){var o=999,h=999,r=0,l=0;s.xr&&(r=s.x),s.y>l&&(l=s.y);for(e=0;er&&(r=i[e].x),i[e].y>l&&(l=i[e].y);a=r-o,n=l-h}else"spot"==s.type?(a/=this.wrapWidth,n/=this.wrapHeight,a<25&&(a=25),n<25&&(n=25)):(a=s.width,n=s.height);var p=0;a>=n&&(p=a),n>a&&(p=n);var g=50/p;g<1&&(g=1),g>this.maxZoomLevel&&(g=this.maxZoomLevel);var d=0,u=0;if("spot"==s.type?(d=s.x,u=s.y):(d=s.x+s.width/2,u=s.y+s.height/2),i.length>0){for(e=0;e'),$("#imp-temp-link").attr("href",s.actions.link),isTrue(s.actions.open_link_in_new_window)?$("#imp-temp-link").attr("target","_blank"):$("#imp-temp-link").removeAttr("target"),$("#imp-temp-link")[0].click()),"run-script"==s.actions.click&&eval(s.actions.script.replace("
","")),$.imageMapProEventClickedShape(this.settings.general.name,this.settings.spots[i].title)},showTooltip:function(t,i){if(-1==this.openedTooltips.indexOf(t)){if(isTrue(this.settings.tooltips.show_title_on_mouseover)&&"click"==this.settings.tooltips.show_tooltips)(n=this.tooltipsContainer.find('.imp-tooltip[data-index="'+t+'"]')).find(".imp-tooltip-title").hide(),n.find(".imp-tooltip-plain-text").show(),n.find(".squares-container").show(),n.css({left:0,top:0});var e=this.settings.spots[t];if(""!=e.connected_to&&isTrue(e.use_connected_shape_tooltip)){var s=this.getIndexOfShapeWithID(e.connected_to);this.showTooltip(s)}else{if(this.openedTooltips.length>0&&this.hideAllTooltips(),-1==this.openedTooltips.indexOf(t)&&this.openedTooltips.push(t),"mobile-only"==this.settings.tooltips.fullscreen_tooltips&&isMobile()||"always"==this.settings.tooltips.fullscreen_tooltips){this.visibleFullscreenTooltip=$('.imp-fullscreen-tooltip[data-index="'+t+'"]'),this.visibleFullscreenTooltipIndex=t,this.fullscreenTooltipsContainer.show(),this.visibleFullscreenTooltip.show();var a=this;setTimeout(function(){a.visibleFullscreenTooltip.addClass("imp-tooltip-visible")},20),this.fullscreenTooltipVisible=!0,this.bodyOverflow=$("body").css("overflow"),$("body").css({overflow:"hidden"})}else{var n;(n=this.tooltipsContainer.find('.imp-tooltip[data-index="'+t+'"]')).show(),setTimeout(function(){n.addClass("imp-tooltip-visible")},1),this.measureTooltipSize(t),this.updateTooltipPosition(t,i)}$.imageMapProEventOpenedTooltip(this.settings.general.name,this.settings.spots[t].title)}}},hideTooltip:function(t){if(-1==this.apiOpenedTooltips.indexOf(t)){var i=this.openedTooltips.indexOf(t);if(this.openedTooltips.splice(i,1),"mobile-only"==this.settings.tooltips.fullscreen_tooltips&&isMobile()||"always"==this.settings.tooltips.fullscreen_tooltips){(e=this.fullscreenTooltipsContainer.find('.imp-fullscreen-tooltip[data-index="'+t+'"]')).removeClass("imp-tooltip-visible"),this.fullscreenTooltipsContainer.hide(),e.hide(),this.fullscreenTooltipVisible=!1,$("body").css({overflow:this.bodyOverflow})}else{var e;(e=this.tooltipsContainer.find('.imp-tooltip[data-index="'+t+'"]')).removeClass("imp-tooltip-visible"),e.hasClass("imp-tooltip-visible")||e.hide(),e.find("video").trigger("pause"),e.find("iframe").each(function(){$(this).attr("src",$(this).attr("src"))})}$.imageMapProEventClosedTooltip(this.settings.general.name,this.settings.spots[t].title)}},hideAllTooltips:function(){for(var t=this.openedTooltips.slice(0),i=0;ic&&(h+=c-(n+this.wrapOffsetLeft+h)),o+this.wrapOffsetTop<0&&(r=r+o+this.wrapOffsetTop,o=-this.wrapOffsetTop),o+this.wrapOffsetTop+r>m&&(r+=m-(o+this.wrapOffsetTop+r))):(n<0&&(h+=n,n=0),n+h>this.wrapWidth&&(h=this.wrapWidth-n),o<0&&(r+=o,o=0),o+r>this.wrapHeight&&(r=this.wrapHeight-o)),"left"==g.tooltip_style.position&&(d=n-s-20,u=o+r/2-a/2),"right"==g.tooltip_style.position&&(d=n+h+20,u=o+r/2-a/2),"top"==g.tooltip_style.position&&(d=n+h/2-s/2,u=o-a-20),"bottom"==g.tooltip_style.position&&(d=n+h/2-s/2,u=o+r+20);var v={x:d,y:u};isTrue(this.settings.tooltips.constrain_tooltips)&&((v=fitRectToScreen(d+this.wrapOffsetLeft,u+this.wrapOffsetTop,s,a)).x-=this.wrapOffsetLeft,v.y-=this.wrapOffsetTop),v.x+=g.tooltip_style.offset_x/100*this.wrapWidth,v.y+=g.tooltip_style.offset_y/100*this.wrapHeight,e.css({left:v.x+this.wrapOffsetLeft-this.tooltipsContainer.offset().left,top:v.y+this.wrapOffsetTop-this.tooltipsContainer.offset().top})}},toggleFullscreen:function(){if(isTrue(this.settings.runtime.is_fullscreen))$("body").removeClass("imp-fullscreen-mode"),$("#imp-fullscreen-wrap").remove(),this.disableEvents(),fullscreenMapParent.events();else{$("body").addClass("imp-fullscreen-mode");var t=$.extend(!0,{},this.settings);t.runtime.is_fullscreen=1,t.id="999999",t.general.responsive=0,t.general.width=this.settings.general.naturalWidth,t.general.height=this.settings.general.naturalHeight,t.general.name+="-fullscreen",isTrue(this.settings.shapes_menu.enable_shapes_menu)&&isTrue(this.settings.shapes_menu.detached_menu)&&(t.shapes_menu.detached_menu=0);var i="";i+="background: "+this.settings.fullscreen.fullscreen_background,$("body").append('
'),$("#image-map-pro-"+t.id).imageMapPro(t),this.disableEvents(),fullscreenMapParent=this}},resetZoomAndPan:function(){this.zoom=1,this.targetZoom=1,this.targetPanX=0,this.targetPanY=0,this.actualPanX=0,this.actualPanY=0,this.redraw(!1)},zoomIn:function(t){if(this.targetZoom1){var i=this.zoom/this.zoomMultiplier,e=0,s=0,a=this.wrap.width(),n=this.wrap.height();t?(e=t.pageX,s=t.pageY):(e=this.wrap.offset().left+a/2,s=this.wrap.offset().top+n/2),this.applyZoom(i,e,s)}},applyZoom:function(t,i,e){this.targetZoom=this.zoom,this.targetPanX=this.actualPanX,this.targetPanY=this.actualPanY,t>this.maxZoomLevel&&(t=this.maxZoomLevel),t<1&&(t=1),this.targetZoom=t;var s=(this.wrapWidth*this.targetZoom-this.wrapWidth*this.zoom)/2,a=(this.wrapHeight*this.targetZoom-this.wrapHeight*this.zoom)/2;if(i&&e){var n=i-this.zoomWrap.offset().left,o=e-this.zoomWrap.offset().top,h=s*((this.wrapWidth*this.zoom/2-n)/(this.wrapWidth*this.zoom/2)),r=a*((this.wrapHeight*this.zoom/2-o)/(this.wrapHeight*this.zoom/2));this.targetPanX-=s,this.targetPanY-=a,this.targetPanX+=h,this.targetPanY+=r}this.targetPanX>0&&(this.targetPanX=0),this.targetPanY>0&&(this.targetPanY=0),this.targetPanX0&&(this.targetPanX=0),this.targetPanY>0&&(this.targetPanY=0),this.targetPanX0&&(this.targetPanX=0),this.targetPanY>0&&(this.targetPanY=0),this.targetPanXh?(this.actualPanX>-n&&(this.actualPanX=-n),this.actualPanXr?(this.actualPanY>-o&&(this.actualPanY=-o),this.actualPanY0&&(this.actualPanX=0),this.actualPanY>0&&(this.actualPanY=0),this.actualPanX0?(this.shapesMenuWrap.addClass("imp-searching"),$(".imp-shapes-menu-shape-title").each(function(){var i=new RegExp("("+t+")","gi"),e=$(this).data("imp-content"),s=$(this).data("imp-content").replace(i,'$&');e!=s?($(this).show(),$(this).html(s)):($(this).hide(),$(this).html(e))})):(this.shapesMenuWrap.removeClass("imp-searching"),$(".imp-shapes-menu-shape-title, .imp-shapes-menu-layer-title").each(function(){$(this).show(),$(this).html($(this).data("imp-content"))})),this.settings.runtime.menu_search_string=t},displayScrollMessage:function(){this.scrollMessage.fadeIn(),clearTimeout(this.hideScrollMessageTimeout);var t=this;this.hideScrollMessageTimeout=setTimeout(function(){t.scrollMessage.fadeOut()},1e3)}}),$.fn[pluginName]=function(t){return this.each(function(){$.data(this,"plugin_"+pluginName,new Plugin(this,t))})}}(jQuery,window,document),function(t){"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){function i(i){var o=i||window.event,h=r.call(arguments,1),l=0,g=0,d=0,u=0,c=0,m=0;if((i=t.event.fix(o)).type="mousewheel","detail"in o&&(d=-1*o.detail),"wheelDelta"in o&&(d=o.wheelDelta),"wheelDeltaY"in o&&(d=o.wheelDeltaY),"wheelDeltaX"in o&&(g=-1*o.wheelDeltaX),"axis"in o&&o.axis===o.HORIZONTAL_AXIS&&(g=-1*d,d=0),l=0===d?g:d,"deltaY"in o&&(l=d=-1*o.deltaY),"deltaX"in o&&(g=o.deltaX,0===d&&(l=-1*g)),0!==d||0!==g){if(1===o.deltaMode){var f=t.data(this,"mousewheel-line-height");l*=f,d*=f,g*=f}else if(2===o.deltaMode){var v=t.data(this,"mousewheel-page-height");l*=v,d*=v,g*=v}if(u=Math.max(Math.abs(d),Math.abs(g)),(!n||n>u)&&(n=u,s(o,u)&&(n/=40)),s(o,u)&&(l/=40,g/=40,d/=40),l=Math[l>=1?"floor":"ceil"](l/n),g=Math[g>=1?"floor":"ceil"](g/n),d=Math[d>=1?"floor":"ceil"](d/n),p.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();c=i.clientX-y.left,m=i.clientY-y.top}return i.deltaX=g,i.deltaY=d,i.deltaFactor=n,i.offsetX=c,i.offsetY=m,i.deltaMode=0,h.unshift(i,l,g,d),a&&clearTimeout(a),a=setTimeout(e,200),(t.event.dispatch||t.event.handle).apply(this,h)}}function e(){n=null}function s(t,i){return p.settings.adjustOldDeltas&&"mousewheel"===t.type&&i%120==0}var a,n,o=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],h="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(t.event.fixHooks)for(var l=o.length;l;)t.event.fixHooks[o[--l]]=t.event.mouseHooks;var p=t.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var e=h.length;e;)this.addEventListener(h[--e],i,!1);else this.onmousewheel=i;t.data(this,"mousewheel-line-height",p.getLineHeight(this)),t.data(this,"mousewheel-page-height",p.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var e=h.length;e;)this.removeEventListener(h[--e],i,!1);else this.onmousewheel=null;t.removeData(this,"mousewheel-line-height"),t.removeData(this,"mousewheel-page-height")},getLineHeight:function(i){var e=t(i),s=e["offsetParent"in t.fn?"offsetParent":"parent"]();return s.length||(s=t("body")),parseInt(s.css("fontSize"),10)||parseInt(e.css("fontSize"),10)||16},getPageHeight:function(i){return t(i).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};t.fn.extend({mousewheel:function(t){return t?this.bind("mousewheel",t):this.trigger("mousewheel")},unmousewheel:function(t){return this.unbind("mousewheel",t)}})}); !function(a){a.flexslider=function(b,c){var d=a(b);d.vars=a.extend({},a.flexslider.defaults,c);var j,e=d.vars.namespace,f=window.navigator&&window.navigator.msPointerEnabled&&window.MSGesture,g=("ontouchstart"in window||f||window.DocumentTouch&&document instanceof DocumentTouch)&&d.vars.touch,h="click touchend MSPointerUp",i="",k="vertical"===d.vars.direction,l=d.vars.reverse,m=d.vars.itemWidth>0,n="fade"===d.vars.animation,o=""!==d.vars.asNavFor,p={},q=!0;a.data(b,"flexslider",d),p={init:function(){d.animating=!1,d.currentSlide=parseInt(d.vars.startAt?d.vars.startAt:0,10),isNaN(d.currentSlide)&&(d.currentSlide=0),d.animatingTo=d.currentSlide,d.atEnd=0===d.currentSlide||d.currentSlide===d.last,d.containerSelector=d.vars.selector.substr(0,d.vars.selector.search(" ")),d.slides=a(d.vars.selector,d),d.container=a(d.containerSelector,d),d.count=d.slides.length,d.syncExists=a(d.vars.sync).length>0,"slide"===d.vars.animation&&(d.vars.animation="swing"),d.prop=k?"top":"marginLeft",d.args={},d.manualPause=!1,d.stopped=!1,d.started=!1,d.startTimeout=null,d.transitions=!d.vars.video&&!n&&d.vars.useCSS&&function(){var a=document.createElement("div"),b=["perspectiveProperty","WebkitPerspective","MozPerspective","OPerspective","msPerspective"];for(var c in b)if(void 0!==a.style[b[c]])return d.pfx=b[c].replace("Perspective","").toLowerCase(),d.prop="-"+d.pfx+"-transform",!0;return!1}(),d.ensureAnimationEnd="",""!==d.vars.controlsContainer&&(d.controlsContainer=a(d.vars.controlsContainer).length>0&&a(d.vars.controlsContainer)),""!==d.vars.manualControls&&(d.manualControls=a(d.vars.manualControls).length>0&&a(d.vars.manualControls)),d.vars.randomize&&(d.slides.sort(function(){return Math.round(Math.random())-.5}),d.container.empty().append(d.slides)),d.doMath(),d.setup("init"),d.vars.controlNav&&p.controlNav.setup(),d.vars.directionNav&&p.directionNav.setup(),d.vars.keyboard&&(1===a(d.containerSelector).length||d.vars.multipleKeyboard)&&a(document).bind("keyup",function(a){var b=a.keyCode;if(!d.animating&&(39===b||37===b)){var c=39===b?d.getTarget("next"):37===b?d.getTarget("prev"):!1;d.flexAnimate(c,d.vars.pauseOnAction)}}),d.vars.mousewheel&&d.bind("mousewheel",function(a,b){a.preventDefault();var f=0>b?d.getTarget("next"):d.getTarget("prev");d.flexAnimate(f,d.vars.pauseOnAction)}),d.vars.pausePlay&&p.pausePlay.setup(),d.vars.slideshow&&d.vars.pauseInvisible&&p.pauseInvisible.init(),d.vars.slideshow&&(d.vars.pauseOnHover&&d.hover(function(){d.manualPlay||d.manualPause||d.pause()},function(){d.manualPause||d.manualPlay||d.stopped||d.play()}),d.vars.pauseInvisible&&p.pauseInvisible.isHidden()||(d.vars.initDelay>0?d.startTimeout=setTimeout(d.play,d.vars.initDelay):d.play())),o&&p.asNav.setup(),g&&d.vars.touch&&p.touch(),(!n||n&&d.vars.smoothHeight)&&a(window).bind("resize orientationchange focus",p.resize),d.find("img").attr("draggable","false"),setTimeout(function(){d.vars.start(d)},200)},asNav:{setup:function(){d.asNav=!0,d.animatingTo=Math.floor(d.currentSlide/d.move),d.currentItem=d.currentSlide,d.slides.removeClass(e+"active-slide").eq(d.currentItem).addClass(e+"active-slide"),f?(b._slider=d,d.slides.each(function(){var b=this;b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",function(a){a.preventDefault(),a.currentTarget._gesture&&a.currentTarget._gesture.addPointer(a.pointerId)},!1),b.addEventListener("MSGestureTap",function(b){b.preventDefault();var c=a(this),e=c.index();a(d.vars.asNavFor).data("flexslider").animating||c.hasClass("active")||(d.direction=d.currentItem=g&&c.hasClass(e+"active-slide")?d.flexAnimate(d.getTarget("prev"),!0):a(d.vars.asNavFor).data("flexslider").animating||c.hasClass(e+"active-slide")||(d.direction=d.currentItem'),d.pagingCount>1)for(var j=0;j':""+c+"","thumbnails"===d.vars.controlNav&&!0===d.vars.thumbCaptions){var k=g.attr("data-thumbcaption");""!=k&&void 0!=k&&(f+=''+k+"")}d.controlNavScaffold.append("
  • "+f+"
  • "),c++}d.controlsContainer?a(d.controlsContainer).append(d.controlNavScaffold):d.append(d.controlNavScaffold),p.controlNav.set(),p.controlNav.active(),d.controlNavScaffold.delegate("a, img",h,function(b){if(b.preventDefault(),""===i||i===b.type){var c=a(this),f=d.controlNav.index(c);c.hasClass(e+"active")||(d.direction=f>d.currentSlide?"next":"prev",d.flexAnimate(f,d.vars.pauseOnAction))}""===i&&(i=b.type),p.setToClearWatchedEvent()})},setupManual:function(){d.controlNav=d.manualControls,p.controlNav.active(),d.controlNav.bind(h,function(b){if(b.preventDefault(),""===i||i===b.type){var c=a(this),f=d.controlNav.index(c);c.hasClass(e+"active")||(d.direction=f>d.currentSlide?"next":"prev",d.flexAnimate(f,d.vars.pauseOnAction))}""===i&&(i=b.type),p.setToClearWatchedEvent()})},set:function(){var b="thumbnails"===d.vars.controlNav?"img":"a";d.controlNav=a("."+e+"control-nav li "+b,d.controlsContainer?d.controlsContainer:d)},active:function(){d.controlNav.removeClass(e+"active").eq(d.animatingTo).addClass(e+"active")},update:function(b,c){d.pagingCount>1&&"add"===b?d.controlNavScaffold.append(a("
  • "+d.count+"
  • ")):1===d.pagingCount?d.controlNavScaffold.find("li").remove():d.controlNav.eq(c).closest("li").remove(),p.controlNav.set(),d.pagingCount>1&&d.pagingCount!==d.controlNav.length?d.update(c,b):p.controlNav.active()}},directionNav:{setup:function(){var b=a('");d.controlsContainer?(a(d.controlsContainer).append(b),d.directionNav=a("."+e+"direction-nav li a",d.controlsContainer)):(d.append(b),d.directionNav=a("."+e+"direction-nav li a",d)),p.directionNav.update(),d.directionNav.bind(h,function(b){b.preventDefault();var c;(""===i||i===b.type)&&(c=a(this).hasClass(e+"next")?d.getTarget("next"):d.getTarget("prev"),d.flexAnimate(c,d.vars.pauseOnAction)),""===i&&(i=b.type),p.setToClearWatchedEvent()})},update:function(){var a=e+"disabled";1===d.pagingCount?d.directionNav.addClass(a).attr("tabindex","-1"):d.vars.animationLoop?d.directionNav.removeClass(a).removeAttr("tabindex"):0===d.animatingTo?d.directionNav.removeClass(a).filter("."+e+"prev").addClass(a).attr("tabindex","-1"):d.animatingTo===d.last?d.directionNav.removeClass(a).filter("."+e+"next").addClass(a).attr("tabindex","-1"):d.directionNav.removeClass(a).removeAttr("tabindex")}},pausePlay:{setup:function(){var b=a('
    ');d.controlsContainer?(d.controlsContainer.append(b),d.pausePlay=a("."+e+"pauseplay a",d.controlsContainer)):(d.append(b),d.pausePlay=a("."+e+"pauseplay a",d)),p.pausePlay.update(d.vars.slideshow?e+"pause":e+"play"),d.pausePlay.bind(h,function(b){b.preventDefault(),(""===i||i===b.type)&&(a(this).hasClass(e+"pause")?(d.manualPause=!0,d.manualPlay=!1,d.pause()):(d.manualPause=!1,d.manualPlay=!0,d.play())),""===i&&(i=b.type),p.setToClearWatchedEvent()})},update:function(a){"play"===a?d.pausePlay.removeClass(e+"pause").addClass(e+"play").html(d.vars.playText):d.pausePlay.removeClass(e+"play").addClass(e+"pause").html(d.vars.pauseText)}},touch:function(){function r(f){d.animating?f.preventDefault():(window.navigator.msPointerEnabled||1===f.touches.length)&&(d.pause(),g=k?d.h:d.w,i=Number(new Date),o=f.touches[0].pageX,p=f.touches[0].pageY,e=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*g:(d.currentSlide+d.cloneOffset)*g,a=k?p:o,c=k?o:p,b.addEventListener("touchmove",s,!1),b.addEventListener("touchend",t,!1))}function s(b){o=b.touches[0].pageX,p=b.touches[0].pageY,h=k?a-p:a-o,j=k?Math.abs(h)f)&&(b.preventDefault(),!n&&d.transitions&&(d.vars.animationLoop||(h/=0===d.currentSlide&&0>h||d.currentSlide===d.last&&h>0?Math.abs(h)/g+2:1),d.setProps(e+h,"setTouch")))}function t(){if(b.removeEventListener("touchmove",s,!1),d.animatingTo===d.currentSlide&&!j&&null!==h){var k=l?-h:h,m=k>0?d.getTarget("next"):d.getTarget("prev");d.canAdvance(m)&&(Number(new Date)-i<550&&Math.abs(k)>50||Math.abs(k)>g/2)?d.flexAnimate(m,d.vars.pauseOnAction):n||d.flexAnimate(d.currentSlide,d.vars.pauseOnAction,!0)}b.removeEventListener("touchend",t,!1),a=null,c=null,h=null,e=null}function u(a){a.stopPropagation(),d.animating?a.preventDefault():(d.pause(),b._gesture.addPointer(a.pointerId),q=0,g=k?d.h:d.w,i=Number(new Date),e=m&&l&&d.animatingTo===d.last?0:m&&l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:m&&d.currentSlide===d.last?d.limit:m?(d.itemW+d.vars.itemMargin)*d.move*d.currentSlide:l?(d.last-d.currentSlide+d.cloneOffset)*g:(d.currentSlide+d.cloneOffset)*g)}function v(a){a.stopPropagation();var c=a.target._slider;if(c){var d=-a.translationX,f=-a.translationY;return q+=k?f:d,h=q,j=k?Math.abs(q)500)&&(a.preventDefault(),!n&&c.transitions&&(c.vars.animationLoop||(h=q/(0===c.currentSlide&&0>q||c.currentSlide===c.last&&q>0?Math.abs(q)/g+2:1)),c.setProps(e+h,"setTouch"))),void 0)}}function w(b){b.stopPropagation();var d=b.target._slider;if(d){if(d.animatingTo===d.currentSlide&&!j&&null!==h){var f=l?-h:h,k=f>0?d.getTarget("next"):d.getTarget("prev");d.canAdvance(k)&&(Number(new Date)-i<550&&Math.abs(f)>50||Math.abs(f)>g/2)?d.flexAnimate(k,d.vars.pauseOnAction):n||d.flexAnimate(d.currentSlide,d.vars.pauseOnAction,!0)}a=null,c=null,h=null,e=null,q=0}}var a,c,e,g,h,i,j=!1,o=0,p=0,q=0;f?(b.style.msTouchAction="none",b._gesture=new MSGesture,b._gesture.target=b,b.addEventListener("MSPointerDown",u,!1),b._slider=d,b.addEventListener("MSGestureChange",v,!1),b.addEventListener("MSGestureEnd",w,!1)):b.addEventListener("touchstart",r,!1)},resize:function(){!d.animating&&d.is(":visible")&&(m||d.doMath(),n?p.smoothHeight():m?(d.slides.width(d.computedW),d.update(d.pagingCount),d.setProps()):k?(d.viewport.height(d.h),d.setProps(d.h,"setTotal")):(d.vars.smoothHeight&&p.smoothHeight(),d.newSlides.width(d.computedW),d.setProps(d.computedW,"setTotal")))},smoothHeight:function(a){if(!k||n){var b=n?d:d.viewport;a?b.animate({height:d.slides.eq(d.animatingTo).height()},a):b.height(d.slides.eq(d.animatingTo).height())}},sync:function(b){var c=a(d.vars.sync).data("flexslider"),e=d.animatingTo;switch(b){case"animate":c.flexAnimate(e,d.vars.pauseOnAction,!1,!0);break;case"play":c.playing||c.asNav||c.play();break;case"pause":c.pause()}},uniqueID:function(b){return b.find("[id]").each(function(){var b=a(this);b.attr("id",b.attr("id")+"_clone")}),b},pauseInvisible:{visProp:null,init:function(){var a=["webkit","moz","ms","o"];if("hidden"in document)return"hidden";for(var b=0;b0?setTimeout(d.play,d.vars.initDelay):d.play()})}},isHidden:function(){return document[p.pauseInvisible.visProp]||!1}},setToClearWatchedEvent:function(){clearTimeout(j),j=setTimeout(function(){i=""},3e3)}},d.flexAnimate=function(b,c,f,h,i){if(d.vars.animationLoop||b===d.currentSlide||(d.direction=b>d.currentSlide?"next":"prev"),o&&1===d.pagingCount&&(d.direction=d.currentItemd.limit&&1!==d.visible?d.limit:t):s=0===d.currentSlide&&b===d.count-1&&d.vars.animationLoop&&"next"!==d.direction?l?(d.count+d.cloneOffset)*q:0:d.currentSlide===d.last&&0===b&&d.vars.animationLoop&&"prev"!==d.direction?l?0:(d.count+1)*q:l?(d.count-1-b+d.cloneOffset)*q:(b+d.cloneOffset)*q,d.setProps(s,"",d.vars.animationSpeed),d.transitions?(d.vars.animationLoop&&d.atEnd||(d.animating=!1,d.currentSlide=d.animatingTo),d.container.unbind("webkitTransitionEnd transitionend"),d.container.bind("webkitTransitionEnd transitionend",function(){clearTimeout(d.ensureAnimationEnd),d.wrapup(q)}),clearTimeout(d.ensureAnimationEnd),d.ensureAnimationEnd=setTimeout(function(){d.wrapup(q)},d.vars.animationSpeed+100)):d.container.animate(d.args,d.vars.animationSpeed,d.vars.easing,function(){d.wrapup(q)})}d.vars.smoothHeight&&p.smoothHeight(d.vars.animationSpeed)}},d.wrapup=function(a){n||m||(0===d.currentSlide&&d.animatingTo===d.last&&d.vars.animationLoop?d.setProps(a,"jumpEnd"):d.currentSlide===d.last&&0===d.animatingTo&&d.vars.animationLoop&&d.setProps(a,"jumpStart")),d.animating=!1,d.currentSlide=d.animatingTo,d.vars.after(d)},d.animateSlides=function(){!d.animating&&q&&d.flexAnimate(d.getTarget("next"))},d.pause=function(){clearInterval(d.animatedSlides),d.animatedSlides=null,d.playing=!1,d.vars.pausePlay&&p.pausePlay.update("play"),d.syncExists&&p.sync("pause")},d.play=function(){d.playing&&clearInterval(d.animatedSlides),d.animatedSlides=d.animatedSlides||setInterval(d.animateSlides,d.vars.slideshowSpeed),d.started=d.playing=!0,d.vars.pausePlay&&p.pausePlay.update("pause"),d.syncExists&&p.sync("play")},d.stop=function(){d.pause(),d.stopped=!0},d.canAdvance=function(a,b){var c=o?d.pagingCount-1:d.last;return b?!0:o&&d.currentItem===d.count-1&&0===a&&"prev"===d.direction?!0:o&&0===d.currentItem&&a===d.pagingCount-1&&"next"!==d.direction?!1:a!==d.currentSlide||o?d.vars.animationLoop?!0:d.atEnd&&0===d.currentSlide&&a===c&&"next"!==d.direction?!1:d.atEnd&&d.currentSlide===c&&0===a&&"next"===d.direction?!1:!0:!1},d.getTarget=function(a){return d.direction=a,"next"===a?d.currentSlide===d.last?0:d.currentSlide+1:0===d.currentSlide?d.last:d.currentSlide-1},d.setProps=function(a,b,c){var e=function(){var c=a?a:(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo,e=function(){if(m)return"setTouch"===b?a:l&&d.animatingTo===d.last?0:l?d.limit-(d.itemW+d.vars.itemMargin)*d.move*d.animatingTo:d.animatingTo===d.last?d.limit:c;switch(b){case"setTotal":return l?(d.count-1-d.currentSlide+d.cloneOffset)*a:(d.currentSlide+d.cloneOffset)*a;case"setTouch":return l?a:a;case"jumpEnd":return l?a:d.count*a;case"jumpStart":return l?d.count*a:a;default:return a}}();return-1*e+"px"}();d.transitions&&(e=k?"translate3d(0,"+e+",0)":"translate3d("+e+",0,0)",c=void 0!==c?c/1e3+"s":"0s",d.container.css("-"+d.pfx+"-transition-duration",c),d.container.css("transition-duration",c)),d.args[d.prop]=e,(d.transitions||void 0===c)&&d.container.css(d.args),d.container.css("transform",e)},d.setup=function(b){if(n)d.slides.css({width:"100%","float":"left",marginRight:"-100%",position:"relative"}),"init"===b&&(g?d.slides.css({opacity:0,display:"block",webkitTransition:"opacity "+d.vars.animationSpeed/1e3+"s ease",zIndex:1}).eq(d.currentSlide).css({opacity:1,zIndex:2}):d.slides.css({opacity:0,display:"block",zIndex:1}).eq(d.currentSlide).css({zIndex:2}).animate({opacity:1},d.vars.animationSpeed,d.vars.easing)),d.vars.smoothHeight&&p.smoothHeight();else{var c,f;"init"===b&&(d.viewport=a('
    ').css({overflow:"hidden",position:"relative"}).appendTo(d).append(d.container),d.cloneCount=0,d.cloneOffset=0,l&&(f=a.makeArray(d.slides).reverse(),d.slides=a(f),d.container.empty().append(d.slides))),d.vars.animationLoop&&!m&&(d.cloneCount=2,d.cloneOffset=1,"init"!==b&&d.container.find(".clone").remove(),p.uniqueID(d.slides.first().clone().addClass("clone").attr("aria-hidden","true")).appendTo(d.container),p.uniqueID(d.slides.last().clone().addClass("clone").attr("aria-hidden","true")).prependTo(d.container)),d.newSlides=a(d.vars.selector,d),c=l?d.count-1-d.currentSlide+d.cloneOffset:d.currentSlide+d.cloneOffset,k&&!m?(d.container.height(200*(d.count+d.cloneCount)+"%").css("position","absolute").width("100%"),setTimeout(function(){d.newSlides.css({display:"block"}),d.doMath(),d.viewport.height(d.h),d.setProps(c*d.h,"init")},"init"===b?100:0)):(d.container.width(200*(d.count+d.cloneCount)+"%"),d.setProps(c*d.computedW,"init"),setTimeout(function(){d.doMath(),d.newSlides.css({width:d.computedW,"float":"left",display:"block"}),d.vars.smoothHeight&&p.smoothHeight()},"init"===b?100:0))}m||d.slides.removeClass(e+"active-slide").eq(d.currentSlide).addClass(e+"active-slide"),d.vars.init(d)},d.doMath=function(){var a=d.slides.first(),b=d.vars.itemMargin,c=d.vars.minItems,e=d.vars.maxItems;d.w=void 0===d.viewport?d.width():d.viewport.width(),d.h=a.height(),d.boxPadding=a.outerWidth()-a.width(),m?(d.itemT=d.vars.itemWidth+b,d.minW=c?c*d.itemT:d.w,d.maxW=e?e*d.itemT-b:d.w,d.itemW=d.minW>d.w?(d.w-b*(c-1))/c:d.maxWd.w?d.w:d.vars.itemWidth,d.visible=Math.floor(d.w/d.itemW),d.move=d.vars.move>0&&d.vars.moved.w?d.itemW*(d.count-1)+b*(d.count-1):(d.itemW+b)*d.count-d.w-b):(d.itemW=d.w,d.pagingCount=d.count,d.last=d.count-1),d.computedW=d.itemW-d.boxPadding},d.update=function(a,b){d.doMath(),m||(ad.controlNav.length?p.controlNav.update("add"):("remove"===b&&!m||d.pagingCountd.last&&(d.currentSlide-=1,d.animatingTo-=1),p.controlNav.update("remove",d.last))),d.vars.directionNav&&p.directionNav.update()},d.addSlide=function(b,c){var e=a(b);d.count+=1,d.last=d.count-1,k&&l?void 0!==c?d.slides.eq(d.count-c).after(e):d.container.prepend(e):void 0!==c?d.slides.eq(c).before(e):d.container.append(e),d.update(c,"add"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.added(d)},d.removeSlide=function(b){var c=isNaN(b)?d.slides.index(a(b)):b;d.count-=1,d.last=d.count-1,isNaN(b)?a(b,d.slides).remove():k&&l?d.slides.eq(d.last).remove():d.slides.eq(b).remove(),d.doMath(),d.update(c,"remove"),d.slides=a(d.vars.selector+":not(.clone)",d),d.setup(),d.vars.removed(d)},p.init()},a(window).blur(function(){focused=!1}).focus(function(){focused=!0}),a.flexslider.defaults={namespace:"flex-",selector:".slides > li",animation:"fade",easing:"swing",direction:"horizontal",reverse:!1,animationLoop:!0,smoothHeight:!1,startAt:0,slideshow:!0,slideshowSpeed:7e3,animationSpeed:600,initDelay:0,randomize:!1,thumbCaptions:!1,pauseOnAction:!0,pauseOnHover:!1,pauseInvisible:!0,useCSS:!0,touch:!0,video:!1,controlNav:!0,directionNav:!0,prevText:"Previous",nextText:"Next",keyboard:!0,multipleKeyboard:!1,mousewheel:!1,pausePlay:!1,pauseText:"Pause",playText:"Play",controlsContainer:"",manualControls:"",sync:"",asNavFor:"",itemWidth:0,itemMargin:0,minItems:1,maxItems:0,move:0,allowOneSlide:!0,start:function(){},before:function(){},after:function(){},end:function(){},added:function(){},removed:function(){},init:function(){}},a.fn.flexslider=function(b){if(void 0===b&&(b={}),"object"==typeof b)return this.each(function(){var c=a(this),d=b.selector?b.selector:".slides > li",e=c.find(d);1===e.length&&b.allowOneSlide===!0||0===e.length?(e.fadeIn(400),b.start&&b.start(c)):void 0===c.data("flexslider")&&new a.flexslider(this,b)});var c=a(this).data("flexslider");switch(b){case"play":c.play();break;case"pause":c.pause();break;case"stop":c.stop();break;case"next":c.flexAnimate(c.getTarget("next"),!0);break;case"prev":case"previous":c.flexAnimate(c.getTarget("prev"),!0);break;default:"number"==typeof b&&c.flexAnimate(b,!0)}}}(jQuery); !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipe=b()}(this,function(){"use strict";var a=function(a,b,c,d){var e={features:null,bind:function(a,b,c,d){var e=(d?"remove":"add")+"EventListener";b=b.split(" ");for(var f=0;f0&&(g=parseInt(g[1],10),g>=1&&g<8&&(d.isOldIOSPhone=!0))}var h=f.match(/Android\s([0-9\.]*)/),i=h?h[1]:0;i=parseFloat(i),i>=1&&(i<4.4&&(d.isOldAndroid=!0),d.androidVersion=i),d.isMobileOpera=/opera mini|opera mobi/i.test(f)}for(var j,k,l=["transform","perspective","animationName"],m=["","webkit","Moz","ms","O"],n=0;n<4;n++){c=m[n];for(var o=0;o<3;o++)j=l[o],k=c+(c?j.charAt(0).toUpperCase()+j.slice(1):j),!d[j]&&k in b&&(d[j]=k);c&&!d.raf&&(c=c.toLowerCase(),d.raf=window[c+"RequestAnimationFrame"],d.raf&&(d.caf=window[c+"CancelAnimationFrame"]||window[c+"CancelRequestAnimationFrame"]))}if(!d.raf){var p=0;d.raf=function(a){var b=(new Date).getTime(),c=Math.max(0,16-(b-p)),d=window.setTimeout(function(){a(b+c)},c);return p=b+c,d},d.caf=function(a){clearTimeout(a)}}return d.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,e.features=d,d}};e.detectFeatures(),e.features.oldIE&&(e.bind=function(a,b,c,d){b=b.split(" ");for(var e,f=(d?"detach":"attach")+"Event",g=function(){c.handleEvent.call(c)},h=0;hb-1?a-b:a<0?b+a:a},Ba={},Ca=function(a,b){return Ba[a]||(Ba[a]=[]),Ba[a].push(b)},Da=function(a){var b=Ba[a];if(b){var c=Array.prototype.slice.call(arguments);c.shift();for(var d=0;df.currItem.fitRatio?ya||(mc(f.currItem,!1,!0),ya=!0):ya&&(mc(f.currItem),ya=!1)),Ga(ea,pa.x,pa.y,s))},Ia=function(a){a.container&&Ga(a.container.style,a.initialPosition.x,a.initialPosition.y,a.initialZoomLevel,a)},Ja=function(a,b){b[E]=u+a+"px, 0px"+v},Ka=function(a,b){if(!i.loop&&b){var c=m+(ta.x*ra-a)/ta.x,d=Math.round(a-tb.x);(c<0&&d>0||c>=ac()-1&&d<0)&&(a=tb.x+d*i.mainScrollEndFriction)}tb.x=a,Ja(a,n)},La=function(a,b){var c=ub[a]-sa[a];return oa[a]+na[a]+c-c*(b/t)},Ma=function(a,b){a.x=b.x,a.y=b.y,b.id&&(a.id=b.id)},Na=function(a){a.x=Math.round(a.x),a.y=Math.round(a.y)},Oa=null,Pa=function(){Oa&&(e.unbind(document,"mousemove",Pa),e.addClass(a,"pswp--has_mouse"),i.mouseUsed=!0,Da("mouseUsed")),Oa=setTimeout(function(){Oa=null},100)},Qa=function(){e.bind(document,"keydown",f),N.transform&&e.bind(f.scrollWrap,"click",f),i.mouseUsed||e.bind(document,"mousemove",Pa),e.bind(window,"resize scroll orientationchange",f),Da("bindEvents")},Ra=function(){e.unbind(window,"resize scroll orientationchange",f),e.unbind(window,"scroll",r.scroll),e.unbind(document,"keydown",f),e.unbind(document,"mousemove",Pa),N.transform&&e.unbind(f.scrollWrap,"click",f),V&&e.unbind(window,p,f),clearTimeout(O),Da("unbindEvents")},Sa=function(a,b){var c=ic(f.currItem,qa,a);return b&&(da=c),c},Ta=function(a){return a||(a=f.currItem),a.initialZoomLevel},Ua=function(a){return a||(a=f.currItem),a.w>0?i.maxSpreadZoom:1},Va=function(a,b,c,d){return d===f.currItem.initialZoomLevel?(c[a]=f.currItem.initialPosition[a],!0):(c[a]=La(a,d),c[a]>b.min[a]?(c[a]=b.min[a],!0):c[a]1?1:a.fitRatio,c=a.container.style,d=b*a.w,e=b*a.h;c.width=d+"px",c.height=e+"px",c.left=a.initialPosition.x+"px",c.top=a.initialPosition.y+"px"},Ha=function(){if(ea){var a=ea,b=f.currItem,c=b.fitRatio>1?1:b.fitRatio,d=c*b.w,e=c*b.h;a.width=d+"px",a.height=e+"px",a.left=pa.x+"px",a.top=pa.y+"px"}}},Xa=function(a){var b="";i.escKey&&27===a.keyCode?b="close":i.arrowKeys&&(37===a.keyCode?b="prev":39===a.keyCode&&(b="next")),b&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey||(a.preventDefault?a.preventDefault():a.returnValue=!1,f[b]()))},Ya=function(a){a&&(Y||X||fa||T)&&(a.preventDefault(),a.stopPropagation())},Za=function(){f.setScrollOffset(0,e.getScrollY())},$a={},_a=0,ab=function(a){$a[a]&&($a[a].raf&&I($a[a].raf),_a--,delete $a[a])},bb=function(a){$a[a]&&ab(a),$a[a]||(_a++,$a[a]={})},cb=function(){for(var a in $a)$a.hasOwnProperty(a)&&ab(a)},db=function(a,b,c,d,e,f,g){var h,i=Ea();bb(a);var j=function(){if($a[a]){if(h=Ea()-i,h>=d)return ab(a),f(c),void(g&&g());f((c-b)*e(h/d)+b),$a[a].raf=H(j)}};j()},eb={shout:Da,listen:Ca,viewportSize:qa,options:i,isMainScrollAnimating:function(){return fa},getZoomLevel:function(){return s},getCurrentIndex:function(){return m},isDragging:function(){return V},isZooming:function(){return aa},setScrollOffset:function(a,b){sa.x=a,M=sa.y=b,Da("updateScrollOffset",sa)},applyZoomPan:function(a,b,c,d){pa.x=b,pa.y=c,s=a,Ha(d)},init:function(){if(!j&&!k){var c;f.framework=e,f.template=a,f.bg=e.getChildByClass(a,"pswp__bg"),J=a.className,j=!0,N=e.detectFeatures(),H=N.raf,I=N.caf,E=N.transform,L=N.oldIE,f.scrollWrap=e.getChildByClass(a,"pswp__scroll-wrap"),f.container=e.getChildByClass(f.scrollWrap,"pswp__container"),n=f.container.style,f.itemHolders=y=[{el:f.container.children[0],wrap:0,index:-1},{el:f.container.children[1],wrap:0,index:-1},{el:f.container.children[2],wrap:0,index:-1}],y[0].el.style.display=y[2].el.style.display="none",Wa(),r={resize:f.updateSize,orientationchange:function(){clearTimeout(O),O=setTimeout(function(){qa.x!==f.scrollWrap.clientWidth&&f.updateSize()},500)},scroll:Za,keydown:Xa,click:Ya};var d=N.isOldIOSPhone||N.isOldAndroid||N.isMobileOpera;for(N.animationName&&N.transform&&!d||(i.showAnimationDuration=i.hideAnimationDuration=0),c=0;c=ac())&&(m=0),f.currItem=_b(m),(N.isOldIOSPhone||N.isOldAndroid)&&(va=!1),a.setAttribute("aria-hidden","false"),i.modal&&(va?a.style.position="fixed":(a.style.position="absolute",a.style.top=e.getScrollY()+"px")),void 0===M&&(Da("initialLayout"),M=K=e.getScrollY());var l="pswp--open ";for(i.mainClass&&(l+=i.mainClass+" "),i.showHideOpacity&&(l+="pswp--animate_opacity "),l+=G?"pswp--touch":"pswp--notouch",l+=N.animationName?" pswp--css_animation":"",l+=N.svg?" pswp--svg":"",e.addClass(a,l),f.updateSize(),o=-1,ua=null,c=0;cda.min.x?a=da.min.x:ada.min.y?b=da.min.y:b=h&&(o+=ua+(ua>0?-h:h),c=h);for(var d=0;d0?(b=y.shift(),y[h-1]=b,o++,Ja((o+2)*ta.x,b.el.style),f.setContent(b,m-c+d+1+1)):(b=y.pop(),y.unshift(b),o--,Ja(o*ta.x,b.el.style),f.setContent(b,m+c-d-1-1));if(ea&&1===Math.abs(ua)){var e=_b(z);e.initialZoomLevel!==s&&(ic(e,qa),mc(e),Ia(e))}ua=0,f.updateCurrZoomItem(),z=m,Da("afterChange")}}},updateSize:function(b){if(!va&&i.modal){var c=e.getScrollY();if(M!==c&&(a.style.top=c+"px",M=c),!b&&xa.x===window.innerWidth&&xa.y===window.innerHeight)return;xa.x=window.innerWidth,xa.y=window.innerHeight,a.style.height=xa.y+"px"}if(qa.x=f.scrollWrap.clientWidth,qa.y=f.scrollWrap.clientHeight,Za(),ta.x=qa.x+Math.round(qa.x*i.spacing),ta.y=qa.y,Ka(ta.x*ra),Da("beforeResize"),void 0!==o){for(var d,g,j,k=0;k2&&(j=Aa(j)),g=_b(j),g&&(x||g.needsUpdate||!g.bounds)?(f.cleanSlide(g),f.setContent(d,j),1===k&&(f.currItem=g,f.updateCurrZoomItem(!0)),g.needsUpdate=!1):d.index===-1&&j>=0&&f.setContent(d,j),g&&g.container&&(ic(g,qa),mc(g),Ia(g));x=!1}t=s=f.currItem.initialZoomLevel,da=f.currItem.bounds,da&&(pa.x=da.center.x,pa.y=da.center.y,Ha(!0)),Da("resize")},zoomTo:function(a,b,c,d,f){b&&(t=s,ub.x=Math.abs(b.x)-pa.x,ub.y=Math.abs(b.y)-pa.y,Ma(oa,pa));var g=Sa(a,!1),h={};Va("x",g,h,a),Va("y",g,h,a);var i=s,j={x:pa.x,y:pa.y};Na(h);var k=function(b){1===b?(s=a,pa.x=h.x,pa.y=h.y):(s=(a-i)*b+i,pa.x=(h.x-j.x)*b+j.x,pa.y=(h.y-j.y)*b+j.y),f&&f(b),Ha(1===b)};c?db("customZoomTo",0,1,c,d||e.easing.sine.inOut,k):k(1)}},fb=30,gb=10,hb={},ib={},jb={},kb={},lb={},mb=[],nb={},ob=[],pb={},qb=0,rb=ma(),sb=0,tb=ma(),ub=ma(),vb=ma(),wb=function(a,b){return a.x===b.x&&a.y===b.y},xb=function(a,b){return Math.abs(a.x-b.x)-1)&&(b(a)?a:Cb(a.parentNode,b)))},Db={},Eb=function(a,b){return Db.prevent=!Cb(a.target,i.isClickableElement),Da("preventDragEvent",a,b,Db),Db.prevent},Fb=function(a,b){return b.x=a.pageX,b.y=a.pageY,b.id=a.identifier,b},Gb=function(a,b,c){c.x=.5*(a.x+b.x),c.y=.5*(a.y+b.y)},Hb=function(a,b,c){if(a-Q>50){var d=ob.length>2?ob.shift():{};d.x=b,d.y=c,ob.push(d),Q=a}},Ib=function(){var a=pa.y-f.currItem.initialPosition.y;return 1-Math.abs(a/(qa.y/2))},Jb={},Kb={},Lb=[],Mb=function(a){for(;Lb.length>0;)Lb.pop();return F?(la=0,mb.forEach(function(a){0===la?Lb[0]=a:1===la&&(Lb[1]=a),la++})):a.type.indexOf("touch")>-1?a.touches&&a.touches.length>0&&(Lb[0]=Fb(a.touches[0],Jb),a.touches.length>1&&(Lb[1]=Fb(a.touches[1],Kb))):(Jb.x=a.pageX,Jb.y=a.pageY,Jb.id="",Lb[0]=Jb),Lb},Nb=function(a,b){var c,d,e,g,h=0,j=pa[a]+b[a],k=b[a]>0,l=tb.x+b.x,m=tb.x-nb.x;return c=j>da.min[a]||jda.min[a]&&(c=i.panEndFriction,h=da.min[a]-j,d=da.min[a]-oa[a]),(d<=0||m<0)&&ac()>1?(g=l,m<0&&l>nb.x&&(g=nb.x)):da.min.x!==da.max.x&&(e=j)):(j0)&&ac()>1?(g=l,m>0&&lf.currItem.fitRatio&&(pa[a]+=b[a]*c)):(void 0!==g&&(Ka(g,!0),$=g!==nb.x),da.min.x!==da.max.x&&(void 0!==e?pa.x=e:$||(pa.x+=b.x*c)),void 0!==g)},Ob=function(a){if(!("mousedown"===a.type&&a.button>0)){if($b)return void a.preventDefault();if(!U||"mousedown"!==a.type){if(Eb(a,!0)&&a.preventDefault(),Da("pointerDown"),F){var b=e.arraySearch(mb,a.pointerId,"id");b<0&&(b=mb.length),mb[b]={x:a.pageX,y:a.pageY,id:a.pointerId}}var c=Mb(a),d=c.length;_=null,cb(),V&&1!==d||(V=ha=!0,e.bind(window,p,f),S=ka=ia=T=$=Y=W=X=!1,ga=null,Da("firstTouchStart",c),Ma(oa,pa),na.x=na.y=0,Ma(kb,c[0]),Ma(lb,kb),nb.x=ta.x*ra,ob=[{x:kb.x,y:kb.y}],Q=P=Ea(),Sa(s,!0),zb(),Ab()),!aa&&d>1&&!fa&&!$&&(t=s,X=!1,aa=W=!0,na.y=na.x=0,Ma(oa,pa),Ma(hb,c[0]),Ma(ib,c[1]),Gb(hb,ib,vb),ub.x=Math.abs(vb.x)-pa.x,ub.y=Math.abs(vb.y)-pa.y,ba=ca=yb(hb,ib))}}},Pb=function(a){if(a.preventDefault(),F){var b=e.arraySearch(mb,a.pointerId,"id");if(b>-1){var c=mb[b];c.x=a.pageX,c.y=a.pageY}}if(V){var d=Mb(a);if(ga||Y||aa)_=d;else if(tb.x!==ta.x*ra)ga="h";else{var f=Math.abs(d[0].x-kb.x)-Math.abs(d[0].y-kb.y);Math.abs(f)>=gb&&(ga=f>0?"h":"v",_=d)}}},Qb=function(){if(_){var a=_.length;if(0!==a)if(Ma(hb,_[0]),jb.x=hb.x-kb.x,jb.y=hb.y-kb.y,aa&&a>1){if(kb.x=hb.x,kb.y=hb.y,!jb.x&&!jb.y&&wb(_[1],ib))return;Ma(ib,_[1]),X||(X=!0,Da("zoomGestureStarted"));var b=yb(hb,ib),c=Vb(b);c>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15&&(ka=!0);var d=1,e=Ta(),g=Ua();if(c1&&(d=1),c=e-d*(e/3);else c>g&&(d=(c-g)/(6*e),d>1&&(d=1),c=g+d*e);d<0&&(d=0),ba=b,Gb(hb,ib,rb),na.x+=rb.x-vb.x,na.y+=rb.y-vb.y,Ma(vb,rb),pa.x=La("x",c),pa.y=La("y",c),S=c>s,s=c,Ha()}else{if(!ga)return;if(ha&&(ha=!1,Math.abs(jb.x)>=gb&&(jb.x-=_[0].x-lb.x),Math.abs(jb.y)>=gb&&(jb.y-=_[0].y-lb.y)),kb.x=hb.x,kb.y=hb.y,0===jb.x&&0===jb.y)return;if("v"===ga&&i.closeOnVerticalDrag&&!Bb()){na.y+=jb.y,pa.y+=jb.y;var k=Ib();return T=!0,Da("onVerticalDrag",k),Fa(k),void Ha()}Hb(Ea(),hb.x,hb.y),Y=!0,da=f.currItem.bounds;var l=Nb("x",jb);l||(Nb("y",jb),Na(pa),Ha())}}},Rb=function(a){if(N.isOldAndroid){if(U&&"mouseup"===a.type)return;a.type.indexOf("touch")>-1&&(clearTimeout(U),U=setTimeout(function(){U=0},600))}Da("pointerUp"),Eb(a,!1)&&a.preventDefault();var b;if(F){var c=e.arraySearch(mb,a.pointerId,"id");if(c>-1)if(b=mb.splice(c,1)[0],navigator.msPointerEnabled){var d={4:"mouse",2:"touch",3:"pen"};b.type=d[a.pointerType],b.type||(b.type=a.pointerType||"mouse")}else b.type=a.pointerType||"mouse"}var g,h=Mb(a),j=h.length;if("mouseup"===a.type&&(j=0),2===j)return _=null,!0;1===j&&Ma(lb,h[0]),0!==j||ga||fa||(b||("mouseup"===a.type?b={x:a.pageX,y:a.pageY,type:"mouse"}:a.changedTouches&&a.changedTouches[0]&&(b={x:a.changedTouches[0].pageX,y:a.changedTouches[0].pageY,type:"touch"})),Da("touchRelease",a,b));var k=-1;if(0===j&&(V=!1,e.unbind(window,p,f),zb(),aa?k=0:sb!==-1&&(k=Ea()-sb)),sb=1===j?Ea():-1,g=k!==-1&&k<150?"zoom":"swipe",aa&&j<2&&(aa=!1,1===j&&(g="zoomPointerUp"),Da("zoomGestureEnded")),_=null,Y||X||fa||T)if(cb(),R||(R=Sb()),R.calculateSwipeSpeed("x"),T){var l=Ib();if(lf.currItem.fitRatio&&Tb(R))}},Sb=function(){var a,b,c={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(d){ob.length>1?(a=Ea()-Q+50,b=ob[ob.length-2][d]):(a=Ea()-P,b=lb[d]),c.lastFlickOffset[d]=kb[d]-b,c.lastFlickDist[d]=Math.abs(c.lastFlickOffset[d]),c.lastFlickDist[d]>20?c.lastFlickSpeed[d]=c.lastFlickOffset[d]/a:c.lastFlickSpeed[d]=0,Math.abs(c.lastFlickSpeed[d])<.1&&(c.lastFlickSpeed[d]=0),c.slowDownRatio[d]=.95,c.slowDownRatioReverse[d]=1-c.slowDownRatio[d],c.speedDecelerationRatio[d]=1},calculateOverBoundsAnimOffset:function(a,b){c.backAnimStarted[a]||(pa[a]>da.min[a]?c.backAnimDestination[a]=da.min[a]:pa[a]fb&&(h||b.lastFlickOffset.x>20)?d=-1:g<-fb&&(h||b.lastFlickOffset.x<-20)&&(d=1)}var j;d&&(m+=d,m<0?(m=i.loop?ac()-1:0,j=!0):m>=ac()&&(m=i.loop?0:ac()-1,j=!0),j&&!i.loop||(ua+=d,ra-=d,c=!0));var k,l=ta.x*ra,n=Math.abs(l-tb.x);return c||l>tb.x==b.lastFlickSpeed.x>0?(k=Math.abs(b.lastFlickSpeed.x)>0?n/Math.abs(b.lastFlickSpeed.x):333,k=Math.min(k,400),k=Math.max(k,250)):k=333,qb===m&&(c=!1),fa=!0,Da("mainScrollAnimStart"),db("mainScroll",tb.x,l,k,e.easing.cubic.out,Ka,function(){cb(),fa=!1,qb=-1,(c||qb!==m)&&f.updateCurrItem(),Da("mainScrollAnimComplete")}),c&&f.updateCurrItem(!0),c},Vb=function(a){return 1/ca*a*t},Wb=function(){var a=s,b=Ta(),c=Ua();sc&&(a=c);var d,g=1,h=ja;return ia&&!S&&!ka&&s1||navigator.msMaxTouchPoints>1),f.likelyTouchDevice=G,r[A]=Ob,r[B]=Pb,r[C]=Rb,D&&(r[D]=r[C]),N.touch&&(q+=" mousedown",p+=" mousemove mouseup",r.mousedown=r[A],r.mousemove=r[B],r.mouseup=r[C]),G||(i.allowPanToNext=!1)}}});var Xb,Yb,Zb,$b,_b,ac,bc,cc=function(b,c,d,g){Xb&&clearTimeout(Xb),$b=!0,Zb=!0;var h;b.initialLayout?(h=b.initialLayout,b.initialLayout=null):h=i.getThumbBoundsFn&&i.getThumbBoundsFn(m);var j=d?i.hideAnimationDuration:i.showAnimationDuration,k=function(){ab("initialZoom"),d?(f.template.removeAttribute("style"),f.bg.removeAttribute("style")):(Fa(1),c&&(c.style.display="block"),e.addClass(a,"pswp--animated-in"),Da("initialZoom"+(d?"OutEnd":"InEnd"))),g&&g(),$b=!1};if(!j||!h||void 0===h.x)return Da("initialZoom"+(d?"Out":"In")),s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),a.style.opacity=d?0:1,Fa(1),void(j?setTimeout(function(){k()},j):k());var n=function(){var c=l,g=!f.currItem.src||f.currItem.loadError||i.showHideOpacity;b.miniImg&&(b.miniImg.style.webkitBackfaceVisibility="hidden"),d||(s=h.w/b.w,pa.x=h.x,pa.y=h.y-K,f[g?"template":"bg"].style.opacity=.001,Ha()),bb("initialZoom"),d&&!c&&e.removeClass(a,"pswp--animated-in"),g&&(d?e[(c?"remove":"add")+"Class"](a,"pswp--animate_opacity"):setTimeout(function(){e.addClass(a,"pswp--animate_opacity")},30)),Xb=setTimeout(function(){if(Da("initialZoom"+(d?"Out":"In")),d){var f=h.w/b.w,i={x:pa.x,y:pa.y},l=s,m=ja,n=function(b){1===b?(s=f,pa.x=h.x,pa.y=h.y-M):(s=(f-l)*b+l,pa.x=(h.x-i.x)*b+i.x,pa.y=(h.y-M-i.y)*b+i.y),Ha(),g?a.style.opacity=1-b:Fa(m-b*m)};c?db("initialZoom",0,1,j,e.easing.cubic.out,n,k):(n(1),Xb=setTimeout(k,j+20))}else s=b.initialZoomLevel,Ma(pa,b.initialPosition),Ha(),Fa(1),g?a.style.opacity=1:Fa(1),Xb=setTimeout(k,j+20)},d?25:90)};n()},dc={},ec=[],fc={index:0,errorMsg:'
    The image could not be loaded.
    ',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Yb.length}},gc=function(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}},hc=function(a,b,c){var d=a.bounds;d.center.x=Math.round((dc.x-b)/2),d.center.y=Math.round((dc.y-c)/2)+a.vGap.top,d.max.x=b>dc.x?Math.round(dc.x-b):d.center.x,d.max.y=c>dc.y?Math.round(dc.y-c)+a.vGap.top:d.center.y,d.min.x=b>dc.x?0:d.center.x,d.min.y=c>dc.y?a.vGap.top:d.center.y},ic=function(a,b,c){if(a.src&&!a.loadError){var d=!c;if(d&&(a.vGap||(a.vGap={top:0,bottom:0}),Da("parseVerticalMargin",a)),dc.x=b.x,dc.y=b.y-a.vGap.top-a.vGap.bottom,d){var e=dc.x/a.w,f=dc.y/a.h;a.fitRatio=e1&&(c=1),a.initialZoomLevel=c,a.bounds||(a.bounds=gc())}if(!c)return;return hc(a,a.w*c,a.h*c),d&&c===a.initialZoomLevel&&(a.initialPosition=a.bounds.center),a.bounds}return a.w=a.h=0,a.initialZoomLevel=a.fitRatio=1,a.bounds=gc(),a.initialPosition=a.bounds.center,a.bounds},jc=function(a,b,c,d,e,g){b.loadError||d&&(b.imageAppended=!0,mc(b,d,b===f.currItem&&ya),c.appendChild(d),g&&setTimeout(function(){b&&b.loaded&&b.placeholder&&(b.placeholder.style.display="none",b.placeholder=null)},500))},kc=function(a){a.loading=!0,a.loaded=!1;var b=a.img=e.createEl("pswp__img","img"),c=function(){a.loading=!1,a.loaded=!0,a.loadComplete?a.loadComplete(a):a.img=null,b.onload=b.onerror=null,b=null};return b.onload=c,b.onerror=function(){a.loadError=!0,c()},b.src=a.src,b},lc=function(a,b){if(a.src&&a.loadError&&a.container)return b&&(a.container.innerHTML=""),a.container.innerHTML=i.errorMsg.replace("%url%",a.src),!0},mc=function(a,b,c){if(a.src){b||(b=a.container.lastChild);var d=c?a.w:Math.round(a.w*a.fitRatio),e=c?a.h:Math.round(a.h*a.fitRatio);a.placeholder&&!a.loaded&&(a.placeholder.style.width=d+"px",a.placeholder.style.height=e+"px"),b.style.width=d+"px",b.style.height=e+"px"}},nc=function(){if(ec.length){for(var a,b=0;b=0,e=Math.min(c[0],ac()),g=Math.min(c[1],ac());for(b=1;b<=(d?g:e);b++)f.lazyLoadItem(m+b);for(b=1;b<=(d?e:g);b++)f.lazyLoadItem(m-b)}),Ca("initialLayout",function(){f.currItem.initialLayout=i.getThumbBoundsFn&&i.getThumbBoundsFn(m)}),Ca("mainScrollAnimComplete",nc),Ca("initialZoomInEnd",nc),Ca("destroy",function(){for(var a,b=0;b=0&&(void 0!==Yb[a]&&Yb[a])},allowProgressiveImg:function(){return i.forceProgressiveLoading||!G||i.mouseUsed||screen.width>1200},setContent:function(a,b){i.loop&&(b=Aa(b));var c=f.getItemAt(a.index);c&&(c.container=null);var d,g=f.getItemAt(b);if(!g)return void(a.el.innerHTML="");Da("gettingData",b,g),a.index=b,a.item=g;var h=g.container=e.createEl("pswp__zoom-wrap");if(!g.src&&g.html&&(g.html.tagName?h.appendChild(g.html):h.innerHTML=g.html),lc(g),ic(g,qa),!g.src||g.loadError||g.loaded)g.src&&!g.loadError&&(d=e.createEl("pswp__img","img"),d.style.opacity=1,d.src=g.src,mc(g,d),jc(b,g,h,d,!0));else{if(g.loadComplete=function(c){if(j){if(a&&a.index===b){if(lc(c,!0))return c.loadComplete=c.img=null,ic(c,qa),Ia(c),void(a.index===m&&f.updateCurrZoomItem());c.imageAppended?!$b&&c.placeholder&&(c.placeholder.style.display="none",c.placeholder=null):N.transform&&(fa||$b)?ec.push({item:c,baseDiv:h,img:c.img,index:b,holder:a,clearPlaceholder:!0}):jc(b,c,h,c.img,fa||$b,!0)}c.loadComplete=null,c.img=null,Da("imageLoadComplete",b,c)}},e.features.transform){var k="pswp__img pswp__img--placeholder";k+=g.msrc?"":" pswp__img--placeholder--blank";var l=e.createEl(k,g.msrc?"img":"");g.msrc&&(l.src=g.msrc),mc(g,l),h.appendChild(l),g.placeholder=l}g.loading||kc(g),f.allowProgressiveImg()&&(!Zb&&N.transform?ec.push({item:g,baseDiv:h,img:g.img,index:b,holder:a}):jc(b,g,h,g.img,!0,!0))}Zb||b!==m?Ia(g):(ea=h.style,cc(g,d||g.img)),a.el.innerHTML="",a.el.appendChild(h)},cleanSlide:function(a){a.img&&(a.img.onload=a.img.onerror=null),a.loaded=a.loading=a.img=a.imageAppended=!1}}});var oc,pc={},qc=function(a,b,c){var d=document.createEvent("CustomEvent"),e={origEvent:a,target:a.target,releasePoint:b,pointerType:c||"touch"};d.initCustomEvent("pswpTap",!0,!0,e),a.target.dispatchEvent(d)};za("Tap",{publicMethods:{initTap:function(){Ca("firstTouchStart",f.onTapStart),Ca("touchRelease",f.onTapRelease),Ca("destroy",function(){pc={},oc=null})},onTapStart:function(a){a.length>1&&(clearTimeout(oc),oc=null)},onTapRelease:function(a,b){if(b&&!Y&&!W&&!_a){var c=b;if(oc&&(clearTimeout(oc),oc=null,xb(c,pc)))return void Da("doubleTap",c);if("mouse"===b.type)return void qc(a,b,"mouse");var d=a.target.tagName.toUpperCase();if("BUTTON"===d||e.hasClass(a.target,"pswp__single-tap"))return void qc(a,b);Ma(pc,c),oc=setTimeout(function(){qc(a,b),oc=null},300)}}}});var rc;za("DesktopZoom",{publicMethods:{initDesktopZoom:function(){L||(G?Ca("mouseUsed",function(){f.setupDesktopZoom()}):f.setupDesktopZoom(!0))},setupDesktopZoom:function(b){rc={};var c="wheel mousewheel DOMMouseScroll";Ca("bindEvents",function(){e.bind(a,c,f.handleMouseWheel)}),Ca("unbindEvents",function(){rc&&e.unbind(a,c,f.handleMouseWheel)}),f.mouseZoomedIn=!1;var d,g=function(){f.mouseZoomedIn&&(e.removeClass(a,"pswp--zoomed-in"),f.mouseZoomedIn=!1),s<1?e.addClass(a,"pswp--zoom-allowed"):e.removeClass(a,"pswp--zoom-allowed"),h()},h=function(){d&&(e.removeClass(a,"pswp--dragging"),d=!1)};Ca("resize",g),Ca("afterChange",g),Ca("pointerDown",function(){f.mouseZoomedIn&&(d=!0,e.addClass(a,"pswp--dragging"))}),Ca("pointerUp",h),b||g()},handleMouseWheel:function(a){if(s<=f.currItem.fitRatio)return i.modal&&(!i.closeOnScroll||_a||V?a.preventDefault():E&&Math.abs(a.deltaY)>2&&(l=!0,f.close())),!0;if(a.stopPropagation(),rc.x=0,"deltaX"in a)1===a.deltaMode?(rc.x=18*a.deltaX,rc.y=18*a.deltaY):(rc.x=a.deltaX,rc.y=a.deltaY);else if("wheelDelta"in a)a.wheelDeltaX&&(rc.x=-.16*a.wheelDeltaX),a.wheelDeltaY?rc.y=-.16*a.wheelDeltaY:rc.y=-.16*a.wheelDelta;else{if(!("detail"in a))return;rc.y=a.detail}Sa(s,!0);var b=pa.x-rc.x,c=pa.y-rc.y;(i.modal||b<=da.min.x&&b>=da.max.x&&c<=da.min.y&&c>=da.max.y)&&a.preventDefault(),f.panTo(b,c)},toggleDesktopZoom:function(b){b=b||{x:qa.x/2+sa.x,y:qa.y/2+sa.y};var c=i.getDoubleTapZoom(!0,f.currItem),d=s===c;f.mouseZoomedIn=!d,f.zoomTo(d?f.currItem.initialZoomLevel:c,b,333),e[(d?"remove":"add")+"Class"](a,"pswp--zoomed-in")}}});var sc,tc,uc,vc,wc,xc,yc,zc,Ac,Bc,Cc,Dc,Ec={history:!0,galleryUID:1},Fc=function(){return Cc.hash.substring(1)},Gc=function(){sc&&clearTimeout(sc),uc&&clearTimeout(uc)},Hc=function(){var a=Fc(),b={};if(a.length<5)return b;var c,d=a.split("&");for(c=0;c-1&&(yc=yc.substring(0,b),"&"===yc.slice(-1)&&(yc=yc.slice(0,-1))),setTimeout(function(){j&&e.bind(window,"hashchange",f.onHashChange)},40)}},onHashChange:function(){return Fc()===yc?(Ac=!0,void f.close()):void(vc||(wc=!0,f.goTo(Hc().pid),wc=!1))},updateURL:function(){Gc(),wc||(zc?sc=setTimeout(Ic,800):Ic())}}}),e.extend(f,eb)};return a}); !function(a,b){"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.PhotoSwipeUI_Default=b()}(this,function(){"use strict";var a=function(a,b){var c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=this,w=!1,x=!0,y=!0,z={barsSize:{top:44,bottom:"auto"},closeElClasses:["item","caption","zoom-wrap","ui","top-bar"],timeToIdle:4e3,timeToIdleOutside:1e3,loadingIndicatorDelay:1e3,addCaptionHTMLFn:function(a,b){return a.title?(b.children[0].innerHTML=a.title,!0):(b.children[0].innerHTML="",!1)},closeEl:!0,captionEl:!0,fullscreenEl:!0,zoomEl:!0,shareEl:!0,counterEl:!0,arrowEl:!0,preloaderEl:!0,tapToClose:!1,tapToToggleControls:!0,clickToCloseNonZoomable:!0,shareButtons:[{id:"facebook",label:"Share on Facebook",url:"https://www.facebook.com/sharer/sharer.php?u={{url}}"},{id:"twitter",label:"Tweet",url:"https://twitter.com/intent/tweet?text={{text}}&url={{url}}"},{id:"pinterest",label:"Pin it",url:"http://www.pinterest.com/pin/create/button/?url={{url}}&media={{image_url}}&description={{text}}"},{id:"download",label:"Download image",url:"{{raw_image_url}}",download:!0}],getImageURLForShare:function(){return a.currItem.src||""},getPageURLForShare:function(){return window.location.href},getTextForShare:function(){return a.currItem.title||""},indexIndicatorSep:" / ",fitControlsWidth:1200},A=function(a){if(r)return!0;a=a||window.event,q.timeToIdle&&q.mouseUsed&&!k&&K();for(var c,d,e=a.target||a.srcElement,f=e.getAttribute("class")||"",g=0;g-1&&(c.onTap(),d=!0);if(d){a.stopPropagation&&a.stopPropagation(),r=!0;var h=b.features.isOldAndroid?600:30;s=setTimeout(function(){r=!1},h)}},B=function(){return!a.likelyTouchDevice||q.mouseUsed||screen.width>q.fitControlsWidth},C=function(a,c,d){b[(d?"add":"remove")+"Class"](a,"pswp__"+c)},D=function(){var a=1===q.getNumItemsFn();a!==p&&(C(d,"ui--one-slide",a),p=a)},E=function(){C(i,"share-modal--hidden",y)},F=function(){return y=!y,y?(b.removeClass(i,"pswp__share-modal--fade-in"),setTimeout(function(){y&&E()},300)):(E(),setTimeout(function(){y||b.addClass(i,"pswp__share-modal--fade-in")},30)),y||H(),!1},G=function(b){b=b||window.event;var c=b.target||b.srcElement;return a.shout("shareLinkClick",b,c),!!c.href&&(!!c.hasAttribute("download")||(window.open(c.href,"pswp_share","scrollbars=yes,resizable=yes,toolbar=no,location=yes,width=550,height=420,top=100,left="+(window.screen?Math.round(screen.width/2-275):100)),y||F(),!1))},H=function(){for(var a,b,c,d,e,f="",g=0;g