define(["photoswipe","photoswipeui"],function(t,e){"use strict";var i='<div id="gallery"class="pswp"tabindex="-1"role="dialog"aria-hidden="true"style="z-index:999999999999;"><div class="pswp__bg"></div><div class="pswp__scroll-wrap"><div class="pswp__container"><div class="pswp__item"></div><div class="pswp__item"></div><div class="pswp__item"></div></div><div class="pswp__ui pswp__ui--hidden"><div class="pswp__top-bar"><div class="pswp__counter"></div><button class="pswp__button pswp__button--close"title="Close (Esc)"></button><button class="pswp__button pswp__button--fs"title="Toggle fullscreen"></button><button class="pswp__button pswp__button--zoom"title="Zoom in/out"></button><div class="pswp__preloader"><div class="pswp__preloader__icn"><div class="pswp__preloader__cut"><div class="pswp__preloader__donut"></div></div></div></div></div><!--<div class="pswp__loading-indicator"><div class="pswp__loading-indicator__line"></div></div>--><div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap"><div class="pswp__share-tooltip"><!--<a href="#"class="pswp__share--facebook"></a><a href="#"class="pswp__share--twitter"></a><a href="#"class="pswp__share--pinterest"></a><a href="#"download class="pswp__share--download"></a>--></div></div><button class="pswp__button pswp__button--arrow--left"title="Previous (arrow left)"></button><button class="pswp__button pswp__button--arrow--right"title="Next (arrow right)"></button><div class="pswp__caption"><div class="pswp__caption__center"></div></div></div></div></div>';$(i).appendTo("body");var s=function(i){for(var s=function(t){for(var t,e,i,s,a=t.childNodes,n=a.length,r=[],o=0;o<n;o++)if(t=a[o],1===t.nodeType){e=t.children,i=t.getAttribute("data-size").split("x"),s={src:t.getAttribute("href"),w:parseInt(i[0],10),h:parseInt(i[1],10),author:t.getAttribute("data-author")},s.el=t,e.length>0&&(s.msrc=e[0].getAttribute("src"),e.length>1&&(s.title=e[1].innerHTML));var l=t.getAttribute("data-med");l&&(i=t.getAttribute("data-med-size").split("x"),s.m={src:l,w:parseInt(i[0],10),h:parseInt(i[1],10)}),s.o={src:s.src,w:s.w,h:s.h},r.push(s)}return r},a=function t(e,i){return e&&(i(e)?e:t(e.parentNode,i))},n=function(t){t=t||window.event,t.preventDefault?t.preventDefault():t.returnValue=!1;var e=t.target||t.srcElement,i=a(e,function(t){return"A"===t.tagName});if(i){for(var s,n=i.parentNode,r=i.parentNode.childNodes,l=r.length,p=0,d=0;d<l;d++)if(1===r[d].nodeType){if(r[d]===i){s=p;break}p++}return s>=0&&o(s,n),!1}},r=function(){var t=window.location.hash.substring(1),e={};if(t.length<5)return e;for(var i=t.split("&"),s=0;s<i.length;s++)if(i[s]){var a=i[s].split("=");a.length<2||(e[a[0]]=a[1])}return e.gid&&(e.gid=parseInt(e.gid,10)),e},o=function(i,a,n,r){var o,l,p,d=document.querySelectorAll(".pswp")[0];if(p=s(a),l={galleryUID:a.getAttribute("data-pswp-uid"),getThumbBoundsFn:function(t){var e=p[t].el.children[0],i=window.pageYOffset||document.documentElement.scrollTop,s=e.getBoundingClientRect();return{x:s.left,y:s.top+i,w:s.width}},addCaptionHTMLFn:function(t,e,i){return t.title?(e.children[0].innerHTML=t.title+"<br/><small>Photo: "+t.author+"</small>",!0):(e.children[0].innerText="",!1)}},r)if(l.galleryPIDs){for(var c=0;c<p.length;c++)if(p[c].pid==i){l.index=c;break}}else l.index=parseInt(i,10)-1;else l.index=parseInt(i,10);if(!isNaN(l.index)){for(var u=document.getElementsByName("gallery-style"),_=0,w=u.length;_<w;_++)if(u[_].checked){"radio-all-controls"==u[_].id||"radio-minimal-black"==u[_].id&&(l.mainClass="pswp--minimal--dark",l.barsSize={top:0,bottom:0},l.captionEl=!1,l.fullscreenEl=!1,l.shareEl=!1,l.bgOpacity=.85,l.tapToClose=!0,l.tapToToggleControls=!1);break}n&&(l.showAnimationDuration=0),o=new t(d,e,p,l);var v,h,g=!1,f=!0;o.listen("beforeResize",function(){var t=window.devicePixelRatio?window.devicePixelRatio:1;t=Math.min(t,2.5),v=o.viewportSize.x*t,v>=1200||!o.likelyTouchDevice&&v>800||screen.width>1200?g||(g=!0,h=!0):g&&(g=!1,h=!0),h&&!f&&o.invalidateCurrItems(),f&&(f=!1),h=!1}),o.listen("gettingData",function(t,e){g?(e.src=e.o.src,e.w=e.o.w,e.h=e.o.h):(e.src=e.m.src,e.w=e.m.w,e.h=e.m.h)}),o.init()}},l=document.querySelectorAll(i),p=0,d=l.length;p<d;p++)l[p].setAttribute("data-pswp-uid",p+1),l[p].onclick=n;var c=r();c.pid&&c.gid&&o(c.pid,l[c.gid-1],!0,!0)};return s});