UNPKG

@aurigma/ui-framework

Version:

A platform which allows building print product personalization editors based on Aurigma's Customer's Canvas.

1 lines 68.5 kB
(window.multistep_editor_jsonpFunction=window.multistep_editor_jsonpFunction||[]).push([[3],{821:function(e,n,t){var i=t(0),o=t(846),r=t.n(o),o=t(2),a=t(20);class s{constructor(e,n,t,i,o,r,a,s,l){this.src=e,this.w=n,this.h=t,this.loadError=i,this.vGap=o,this.fitRatio=r,this.initialZoomLevel=a,this.bounds=s,this.initialPosition=l}}var l=t(847),p=t(848),t=class extends a.a{constructor(){super(),this.styles={},this.options={history:!1,focus:!1,showAnimationDuration:0,hideAnimationDuration:0,maxSpreadZoom:4,getDoubleTapZoom:function(e,n){return e||n.initialZoomLevel<.7?1:1.5},clickToCloseNonZoomable:!0,clickToImageZoom:!0,fullscreenEl:!1,arrowEl:!1,zoomEl:!1,shareEl:!1},this.closeLightBox=this.closeLightBox.bind(this)}openFunction(e){e&&(this.__fillLightBox(this.pswpElement,this.images),this.openLightBox())}connectedCallback(){super.connectedCallback();var e=document.createElement("div");e.setAttribute("style","position: absolute;z-index: 2147483650;"),e.innerHTML=r.a,document.body.appendChild(e),this.pswpElement=e.lastChild}disconnectedCallback(){super.disconnectedCallback(),this.pswpElement.parentElement.remove()}__fillLightBox(e,n){let t=n.map(e=>(e.width=e.width||0,e.height=e.height||0,new s(e.urlHD||"",e.width,e.height))),i=(t=this.currentImageId?t.slice(this.currentImageId).concat(t.slice(0,this.currentImageId)):t,this.__lightbox&&this.__lightbox.close(),new l(e,p,t,this.options));if(i.listen("imageLoadComplete",function(e,n){if(n.h<1||n.w<1){let e=new Image;e.onload=()=>{n.w=e.width,n.h=e.height,i.invalidateCurrItems(),i.updateSize(!0)},e.src=n.src}}),this.__lightbox=i,this.__lightbox.listen("open",this.openLightBox),this.__lightbox.listen("close",this.closeLightBox),i.init(),this.styles)for(var[o,r]of Object.entries(this.styles))this.__lightbox.container.style.setProperty(o,r)}openLightBox(){document.body.classList.toggle("photoswipe-lightbox"),this.open=!0}closeLightBox(){document.body.classList.toggle("photoswipe-lightbox"),this.open=!1}};Object(i.a)([Object(o.c)({notify:!0}),Object(i.b)("design:type",Boolean)],t.prototype,"open",void 0),Object(i.a)([Object(o.b)("open"),Object(i.b)("design:type",Function),Object(i.b)("design:paramtypes",[Object]),Object(i.b)("design:returntype",void 0)],t.prototype,"openFunction",null),Object(i.a)([Object(o.c)({notify:!0}),Object(i.b)("design:type",Array)],t.prototype,"images",void 0),Object(i.a)([Object(o.c)(),Object(i.b)("design:type",Number)],t.prototype,"currentImageId",void 0),Object(i.a)([Object(o.c)(),Object(i.b)("design:type",Object)],t.prototype,"styles",void 0),Object(i.a)([Object(o.a)("au-lightbox"),Object(i.b)("design:paramtypes",[])],t)},846:function(e,n){e.exports='<style>\n /*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */\n /*\n\tStyles for basic PhotoSwipe functionality (sliding area, open/close transitions)\n*/\n .photoswipe-lightbox {\n overflow: hidden;\n }\n\n /* pswp = photoswipe */\n .pswp {\n display: none;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n overflow: hidden;\n -ms-touch-action: none;\n touch-action: none;\n z-index: 1500;\n -webkit-text-size-adjust: 100%;\n /* create separate layer, to avoid paint on window.onscroll in webkit/blink */\n -webkit-backface-visibility: hidden;\n outline: none;\n }\n\n .pswp * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .pswp img {\n max-width: none;\n }\n\n /* style is added when JS option showHideOpacity is set to true */\n .pswp--animate_opacity {\n /* 0.001, because opacity:0 doesn\'t trigger Paint action, which causes lag at start of transition */\n opacity: 0.001;\n will-change: opacity;\n /* for open/close transition */\n -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);\n }\n\n .pswp--open {\n display: block;\n }\n\n .pswp--zoom-allowed .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-zoom-in;\n cursor: -moz-zoom-in;\n cursor: zoom-in;\n }\n\n .pswp--zoomed-in .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab;\n }\n\n .pswp--dragging .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing;\n }\n\n /*\n\tBackground is added as a separate element.\n\tAs animating opacity is much faster than animating rgba() background-color.\n*/\n .pswp__bg {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: var(--carousel-lightbox-background);\n opacity: 0;\n -webkit-transform: translateZ(0);\n transform: translateZ(0);\n -webkit-backface-visibility: hidden;\n will-change: opacity;\n }\n\n .pswp__scroll-wrap {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n }\n\n .pswp__container,\n .pswp__zoom-wrap {\n -ms-touch-action: none;\n touch-action: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n }\n\n /* Prevent selection and tap highlights */\n .pswp__container,\n .pswp__img {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none;\n }\n\n .pswp__zoom-wrap {\n position: absolute;\n width: 100%;\n -webkit-transform-origin: left top;\n -ms-transform-origin: left top;\n transform-origin: left top;\n /* for open/close transition */\n -webkit-transition: -webkit-transform 333ms cubic-bezier(0.4, 0, 0.22, 1);\n transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1);\n }\n\n .pswp__bg {\n will-change: opacity;\n /* for open/close transition */\n -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);\n }\n\n .pswp--animated-in .pswp__bg,\n .pswp--animated-in .pswp__zoom-wrap {\n -webkit-transition: none;\n transition: none;\n }\n\n .pswp__container,\n .pswp__zoom-wrap {\n -webkit-backface-visibility: hidden;\n }\n\n .pswp__item {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: hidden;\n }\n\n .pswp__img {\n position: absolute;\n width: auto;\n height: auto;\n top: 0;\n left: 0;\n cursor: zoom-in;\n box-shadow: var(--carousel-lightbox-shadow, 0 2px 8px rgba(0, 0, 0, .2));\n }\n\n /*\n\tstretched thumbnail or div placeholder element (see below)\n\tstyle is added to avoid flickering in webkit/blink when layers overlap\n*/\n .pswp__img--placeholder {\n -webkit-backface-visibility: hidden;\n }\n\n /*\n\tdiv element that matches size of large image\n\tlarge image loads on top of it\n*/\n .pswp__img--placeholder--blank {\n background: #222;\n }\n\n .pswp--ie .pswp__img {\n width: 100% !important;\n height: auto !important;\n left: 0;\n top: 0;\n }\n\n /*\n\tError message appears when image is not loaded\n\t(JS option errorMsg controls markup)\n*/\n .pswp__error-msg {\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n text-align: center;\n font-size: 14px;\n line-height: 16px;\n margin-top: -8px;\n color: #CCC;\n }\n\n .pswp__error-msg a {\n color: #CCC;\n text-decoration: underline;\n }\n\n button.pswp__button iron-icon {\n color: var(--carousel-lightbox-color);\n z-index: -1;\n }\n</style>\n<style>\n /*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */\n\n /*\n\n\tContents:\n\n\t1. Buttons\n\t2. Share modal and links\n\t3. Index indicator ("1 of X" counter)\n\t4. Caption\n\t5. Loading indicator\n\t6. Additional styles (root element, top bar, idle state, hidden state, etc.)\n\n*/\n\n /*\n\t\n\t1. Buttons\n\n */\n\n /* <button> css reset */\n\n .pswp__button {\n width: 44px;\n height: 44px;\n position: relative;\n background: none;\n cursor: pointer;\n overflow: visible;\n -webkit-appearance: none;\n display: block;\n border: 0;\n padding: 0;\n margin: 0;\n float: right;\n opacity: 0.75;\n -webkit-transition: opacity 0.2s;\n transition: opacity 0.2s;\n -webkit-box-shadow: none;\n box-shadow: none;\n }\n\n .pswp__button:focus,\n .pswp__button:hover {\n opacity: 1;\n }\n\n .pswp__button:active {\n outline: none;\n opacity: 0.9;\n }\n\n .pswp__button::-moz-focus-inner {\n padding: 0;\n border: 0;\n }\n\n /* pswp__ui--over-close class it added when mouse is over element that should close gallery */\n\n .pswp__ui--over-close .pswp__button--close {\n opacity: 1;\n }\n\n .pswp__button,\n .pswp__button--arrow--left:before,\n .pswp__button--arrow--right:before {\n background-size: 264px 88px;\n width: 48px;\n height: 48px;\n border-radius: 50%;\n }\n\n @media (-webkit-min-device-pixel-ratio: 1.1),\n (-webkit-min-device-pixel-ratio: 1.09375),\n (min-resolution: 105dpi),\n (min-resolution: 1.1dppx) {\n\n /* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */\n .pswp--svg .pswp__button,\n .pswp--svg .pswp__button--arrow--left:before,\n .pswp--svg .pswp__button--arrow--right:before {\n }\n\n .pswp--svg .pswp__button--arrow--left,\n .pswp--svg .pswp__button--arrow--right {\n background: none;\n }\n }\n\n .pswp__button--close {\n background-position: 0 -44px;\n }\n\n .pswp__button--share {\n background-position: -44px -44px;\n }\n\n .pswp__button--fs {\n display: none;\n }\n\n .pswp--supports-fs .pswp__button--fs {\n display: block;\n }\n\n .pswp--fs .pswp__button--fs {\n background-position: -44px 0;\n }\n\n .pswp__button--zoom {\n /* display: none; */\n background-position: -88px 0;\n }\n\n .pswp--zoom-allowed .pswp__button--zoom {\n display: block;\n }\n\n .pswp--zoomed-in .pswp__button--zoom {\n background-position: -132px 0;\n }\n\n /* no arrows on touch screens */\n\n .pswp--touch .pswp__button--arrow--left,\n .pswp--touch .pswp__button--arrow--right {\n visibility: hidden;\n }\n\n /*\n\tArrow buttons hit area\n\t(icon is added to :before pseudo-element)\n*/\n\n .pswp__button--arrow--left,\n .pswp__button--arrow--right {\n background: none;\n top: 50%;\n margin-top: -50px;\n width: 70px;\n height: 100px;\n position: absolute;\n }\n\n .pswp__button--arrow--left {\n left: 0;\n }\n\n .pswp__button--arrow--right {\n right: 0;\n }\n\n .pswp__button--arrow--left:before,\n .pswp__button--arrow--right:before {\n content: \'\';\n top: 26px;\n background-color: rgba(255, 255, 255, 0.8);\n height: 48px;\n width: 48px;\n border-radius: 50%;\n position: absolute;\n margin: 0 7px;\n }\n\n .pswp__button--arrow--left:before {\n left: 6px;\n background-position: -138px -44px;\n }\n\n .pswp__button--arrow--right:before {\n right: 6px;\n background-position: -94px -44px;\n }\n\n /*\n\n\t2. Share modal/popup and links\n\n */\n\n .pswp__counter,\n .pswp__share-modal {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .pswp__share-modal {\n display: block;\n background: rgba(0, 0, 0, 0.5);\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n padding: 10px;\n position: absolute;\n z-index: 1600;\n opacity: 0;\n -webkit-transition: opacity 0.25s ease-out;\n transition: opacity 0.25s ease-out;\n -webkit-backface-visibility: hidden;\n will-change: opacity;\n }\n\n .pswp__share-modal--hidden {\n display: none;\n }\n\n .pswp__share-tooltip {\n z-index: 1620;\n position: absolute;\n background: #FFF;\n top: 56px;\n border-radius: 2px;\n display: block;\n width: auto;\n right: 44px;\n -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);\n -webkit-transform: translateY(6px);\n -ms-transform: translateY(6px);\n transform: translateY(6px);\n -webkit-transition: -webkit-transform 0.25s;\n transition: transform 0.25s;\n -webkit-backface-visibility: hidden;\n will-change: transform;\n }\n\n .pswp__share-tooltip a {\n display: block;\n padding: 8px 12px;\n color: #000;\n text-decoration: none;\n font-size: 14px;\n line-height: 18px;\n }\n\n .pswp__share-tooltip a:hover {\n text-decoration: none;\n color: #000;\n }\n\n .pswp__share-tooltip a:first-child {\n /* round corners on the first/last list item */\n border-radius: 2px 2px 0 0;\n }\n\n .pswp__share-tooltip a:last-child {\n border-radius: 0 0 2px 2px;\n }\n\n .pswp__share-modal--fade-in {\n opacity: 1;\n }\n\n .pswp__share-modal--fade-in .pswp__share-tooltip {\n -webkit-transform: translateY(0);\n -ms-transform: translateY(0);\n transform: translateY(0);\n }\n\n /* increase size of share links on touch devices */\n\n .pswp--touch .pswp__share-tooltip a {\n padding: 16px 12px;\n }\n\n a.pswp__share--facebook:before {\n content: \'\';\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n top: -12px;\n right: 15px;\n border: 6px solid transparent;\n border-bottom-color: #FFF;\n -webkit-pointer-events: none;\n -moz-pointer-events: none;\n pointer-events: none;\n }\n\n a.pswp__share--facebook:hover {\n background: #3E5C9A;\n color: #FFF;\n }\n\n a.pswp__share--facebook:hover:before {\n border-bottom-color: #3E5C9A;\n }\n\n a.pswp__share--twitter:hover {\n background: #55ACEE;\n color: #FFF;\n }\n\n a.pswp__share--pinterest:hover {\n background: #CCC;\n color: #CE272D;\n }\n\n a.pswp__share--download:hover {\n background: #DDD;\n }\n\n /*\n\n\t3. Index indicator ("1 of X" counter)\n\n */\n\n .pswp__counter {\n position: absolute;\n left: 0;\n top: 0;\n height: 44px;\n font-size: 13px;\n line-height: 44px;\n color: var(--carousel-lightbox-color);\n opacity: 0.75;\n padding: 0 10px;\n }\n\n /*\n\t\n\t4. Caption\n\n */\n\n .pswp__caption {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n min-height: 44px;\n }\n\n .pswp__caption small {\n font-size: 11px;\n color: #BBB;\n }\n\n .pswp__caption__center {\n text-align: left;\n max-width: 420px;\n margin: 0 auto;\n font-size: 13px;\n padding: 10px;\n line-height: 20px;\n color: #CCC;\n }\n\n .pswp__caption--empty {\n display: none;\n }\n\n /* Fake caption element, used to calculate height of next/prev image */\n\n .pswp__caption--fake {\n visibility: hidden;\n }\n\n /*\n\n\t5. Loading indicator (preloader)\n\n\tYou can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR\n\n */\n\n .pswp__preloader {\n width: 44px;\n height: 44px;\n position: absolute;\n top: 0;\n left: 50%;\n margin-left: -22px;\n opacity: 0;\n -webkit-transition: opacity 0.25s ease-out;\n transition: opacity 0.25s ease-out;\n will-change: opacity;\n direction: ltr;\n }\n\n .pswp__preloader__icn {\n width: 20px;\n height: 20px;\n margin: 12px;\n }\n\n .pswp__preloader--active {\n opacity: 1;\n }\n\n .pswp__preloader--active .pswp__preloader__icn {\n /* We use .gif in browsers that don\'t support CSS animation */\n background: url(preloader.gif) 0 0 no-repeat;\n }\n\n .pswp--css_animation .pswp__preloader--active {\n opacity: 1;\n }\n\n .pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {\n -webkit-animation: clockwise 500ms linear infinite;\n animation: clockwise 500ms linear infinite;\n }\n\n .pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {\n -webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;\n animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;\n }\n\n .pswp--css_animation .pswp__preloader__icn {\n background: none;\n opacity: 0.75;\n width: 14px;\n height: 14px;\n position: absolute;\n left: 15px;\n top: 15px;\n margin: 0;\n }\n\n .pswp--css_animation .pswp__preloader__cut {\n /* \n\t\t\tThe idea of animating inner circle is based on Polymer ("material") loading indicator \n\t\t\t by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html\n\t\t*/\n position: relative;\n width: 7px;\n height: 14px;\n overflow: hidden;\n }\n\n .pswp--css_animation .pswp__preloader__donut {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n width: 14px;\n height: 14px;\n border: 2px solid #FFF;\n border-radius: 50%;\n border-left-color: transparent;\n border-bottom-color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n background: none;\n margin: 0;\n }\n\n @media screen and (max-width: 1024px) {\n .pswp__preloader {\n position: relative;\n left: auto;\n top: auto;\n margin: 0;\n float: right;\n }\n }\n\n @-webkit-keyframes clockwise {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @keyframes clockwise {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n }\n\n @-webkit-keyframes donut-rotate {\n 0% {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n }\n\n 50% {\n -webkit-transform: rotate(-140deg);\n transform: rotate(-140deg);\n }\n\n 100% {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n }\n }\n\n @keyframes donut-rotate {\n 0% {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n }\n\n 50% {\n -webkit-transform: rotate(-140deg);\n transform: rotate(-140deg);\n }\n\n 100% {\n -webkit-transform: rotate(0);\n transform: rotate(0);\n }\n }\n\n /*\n\t\n\t6. Additional styles\n\n */\n\n /* root element of UI */\n\n .pswp__ui {\n -webkit-font-smoothing: auto;\n visibility: visible;\n opacity: 1;\n z-index: 1550;\n }\n\n /* top black bar with buttons and "1 of X" indicator */\n\n .pswp__top-bar {\n position: absolute;\n left: 0;\n top: 0;\n height: 44px;\n width: 100%;\n }\n\n .pswp__caption,\n .pswp__top-bar,\n .pswp--has_mouse .pswp__button--arrow--left,\n .pswp--has_mouse .pswp__button--arrow--right {\n -webkit-backface-visibility: hidden;\n will-change: opacity;\n -webkit-transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1);\n }\n\n /* pswp--has_mouse class is added only when two subsequent mousemove events occur */\n\n .pswp--has_mouse .pswp__button--arrow--left,\n .pswp--has_mouse .pswp__button--arrow--right {\n visibility: visible;\n }\n\n .pswp__top-bar,\n .pswp__caption {\n background-color: rgba(var(--carousel-lightbox-background), 0.5);\n }\n\n /* pswp__ui--fit class is added when main image "fits" between top bar and bottom bar (caption) */\n\n .pswp__ui--fit .pswp__top-bar,\n .pswp__ui--fit .pswp__caption {\n background-color: rgba(var(--carousel-lightbox-background), 0.3);\n }\n\n /* pswp__ui--idle class is added when mouse isn\'t moving for several seconds (JS option timeToIdle) */\n\n .pswp__ui--idle .pswp__top-bar {\n opacity: 0;\n }\n\n .pswp__ui--idle .pswp__button--arrow--left,\n .pswp__ui--idle .pswp__button--arrow--right {\n opacity: 0;\n }\n\n /*\n\tpswp__ui--hidden class is added when controls are hidden\n\te.g. when user taps to toggle visibility of controls\n*/\n\n .pswp__ui--hidden .pswp__top-bar,\n .pswp__ui--hidden .pswp__caption,\n .pswp__ui--hidden .pswp__button--arrow--left,\n .pswp__ui--hidden .pswp__button--arrow--right {\n /* Force paint & create composition layer for controls. */\n opacity: 0.001;\n }\n\n /* pswp__ui--one-slide class is added when there is just one item in gallery */\n\n .pswp__ui--one-slide .pswp__button--arrow--left,\n .pswp__ui--one-slide .pswp__button--arrow--right,\n .pswp__ui--one-slide .pswp__counter {\n display: none;\n }\n\n .pswp__element--disabled {\n display: none !important;\n }\n\n .pswp--minimal--dark .pswp__top-bar {\n background: none;\n }\n</style>\n\x3c!-- Root element of PhotoSwipe. Must have class pswp. --\x3e\n<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true" id="pswp">\n\n \x3c!-- Background of PhotoSwipe. \n It\'s a separate element as animating opacity is faster than rgba(). --\x3e\n <div class="pswp__bg"></div>\n\n \x3c!-- Slides wrapper with overflow:hidden. --\x3e\n <div class="pswp__scroll-wrap">\n\n \x3c!-- Container that holds slides. \n PhotoSwipe keeps only 3 of them in the DOM to save memory.\n Don\'t modify these 3 pswp__item elements, data is added later on. --\x3e\n <div class="pswp__container">\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n <div class="pswp__item"></div>\n </div>\n\n \x3c!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. --\x3e\n <div class="pswp__ui pswp__ui--hidden">\n\n <div class="pswp__top-bar">\n\n \x3c!-- Controls are self-explanatory. Order can be changed. --\x3e\n\n <div class="pswp__counter"></div>\n\n <button class="pswp__button pswp__button--close" title="Close (Esc)">\n <iron-icon icon="au-icons:close"></iron-icon>\n <au-icon-fixer></au-icon-fixer>\n </button>\n\n <button class="pswp__button pswp__button--share" title="Share">\n <iron-icon icon="au-icons:shape"></iron-icon>\n <au-icon-fixer></au-icon-fixer>\n </button>\n\n <button class="pswp__button pswp__button--fs" title="Toggle fullscreen">\n <iron-icon icon="au-icons:full_screen"></iron-icon>\n <au-icon-fixer></au-icon-fixer>\n </button>\n\n <button class="pswp__button pswp__button--zoom" title="Zoom in/out">\n <iron-icon icon="au-icons:zoom"></iron-icon>\n <au-icon-fixer></au-icon-fixer>\n </button>\n\n \x3c!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR --\x3e\n \x3c!-- element will get class pswp__preloader--active when preloader is running --\x3e\n <div class="pswp__preloader">\n <div class="pswp__preloader__icn">\n <div class="pswp__preloader__cut">\n <div class="pswp__preloader__donut"></div>\n </div>\n </div>\n </div>\n </div>\n\n <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">\n <div class="pswp__share-tooltip"></div>\n </div>\n\n <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">\n <iron-icon icon="au-icons:chevron_left"></iron-icon>\n <au-icon-fixer></au-icon-fixer>\n </button>\n\n <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">\n <iron-icon icon="au-icons:chevron_right"></iron-icon>\n <au-icon-fixer></au-icon-fixer>\n </button>\n\n <div class="pswp__caption">\n <div class="pswp__caption__center"></div>\n </div>\n\n </div>\n\n </div>\n\n</div>'},847:function(e,n,t){var i;void 0!==(t="function"==typeof(i=function(){"use strict";var e;return function(d,N,e,n){var h={features:null,bind:function(e,n,t,i){var o=(i?"remove":"add")+"EventListener";n=n.split(" ");for(var r=0;r<n.length;r++)if(n[r])e[o](n[r],t,false)},isArray:function(e){return e instanceof Array},createEl:function(e,n){var t=document.createElement(n||"div");if(e)t.className=e;return t},getScrollY:function(){var e=window.pageYOffset;return e!==undefined?e:document.documentElement.scrollTop},unbind:function(e,n,t){h.bind(e,n,t,true)},removeClass:function(e,n){var t=new RegExp("(\\s|^)"+n+"(\\s|$)");e.className=e.className.replace(t," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,n){if(!h.hasClass(e,n))e.className+=(e.className?" ":"")+n},hasClass:function(e,n){return e.className&&new RegExp("(^|\\s)"+n+"(\\s|$)").test(e.className)},getChildByClass:function(e,n){var t=e.firstChild;while(t){if(h.hasClass(t,n))return t;t=t.nextSibling}},arraySearch:function(e,n,t){var i=e.length;while(i--)if(e[i][t]===n)return i;return-1},extend:function(e,n,t){for(var i in n)if(n.hasOwnProperty(i)){if(t&&e.hasOwnProperty(i))continue;e[i]=n[i]}},easing:{sine:{out:function(e){return Math.sin(e*(Math.PI/2))},inOut:function(e){return-(Math.cos(Math.PI*e)-1)/2}},cubic:{out:function(e){return--e*e*e+1}}},detectFeatures:function(){if(h.features)return h.features;var e=h.createEl(),n=e.style,t="",i={};i.oldIE=document.all&&!document.addEventListener;i.touch="ontouchstart"in window;if(window.requestAnimationFrame){i.raf=window.requestAnimationFrame;i.caf=window.cancelAnimationFrame}i.pointerEvent=navigator.pointerEnabled||navigator.msPointerEnabled;if(!i.pointerEvent){var o=navigator.userAgent;if(/iP(hone|od)/.test(navigator.platform)){var r=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/);if(r&&r.length>0){r=parseInt(r[1],10);if(r>=1&&r<8)i.isOldIOSPhone=true}}var a=o.match(/Android\s([0-9\.]*)/);var s=a?a[1]:0;s=parseFloat(s);if(s>=1){if(s<4.4)i.isOldAndroid=true;i.androidVersion=s}i.isMobileOpera=/opera mini|opera mobi/i.test(o)}var l=["transform","perspective","animationName"],p=["","webkit","Moz","ms","O"],u,c;for(var d=0;d<4;d++){t=p[d];for(var f=0;f<3;f++){u=l[f];c=t+(t?u.charAt(0).toUpperCase()+u.slice(1):u);if(!i[u]&&c in n)i[u]=c}if(t&&!i.raf){t=t.toLowerCase();i.raf=window[t+"RequestAnimationFrame"];if(i.raf)i.caf=window[t+"CancelAnimationFrame"]||window[t+"CancelRequestAnimationFrame"]}}if(!i.raf){var m=0;i.raf=function(e){var n=(new Date).getTime();var t=Math.max(0,16-(n-m));var i=window.setTimeout(function(){e(n+t)},t);m=n+t;return i};i.caf=function(e){clearTimeout(e)}}i.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect;h.features=i;return i}};h.detectFeatures();if(h.features.oldIE)h.bind=function(e,n,t,i){n=n.split(" ");var o=(i?"detach":"attach")+"Event",r,a=function(){t.handleEvent.call(t)};for(var s=0;s<n.length;s++){r=n[s];if(r)if(typeof t==="object"&&t.handleEvent){if(!i)t["oldIE"+r]=a;else if(!t["oldIE"+r])return false;e[o]("on"+r,t["oldIE"+r])}else e[o]("on"+r,t)}};var f=this;var t=25,U=3;var m={allowPanToNext:true,spacing:.12,bgOpacity:1,mouseUsed:false,loop:true,pinchToClose:true,closeOnScroll:false,closeOnVerticalDrag:true,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:false,focus:true,escKey:true,arrowKeys:true,mainScrollEndFriction:.35,panEndFriction:.35,isClickableElement:function(e){return e.tagName==="A"},getDoubleTapZoom:function(e,n){if(e)return 1;else return n.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:true,scaleMode:"fit"};h.extend(m,n);var i=function(){return{x:0,y:0}};var K,H,j,w,W,a,Y=i(),G=i(),b=i(),q,V,o,l={},g,X,J,$,Q,ee,ne=0,te={},u=i(),s,ie,c=0,oe,re,ae,se,le,pe,ue=true,r,ce=[],de,fe,me,he,we,be,_,ge={},_e=false,ve,xe=function(e,n){h.extend(f,n.publicMethods);ce.push(e)},ye=function(e){var n=R();if(e>n-1)return e-n;else if(e<0)return n+e;return e},ke={},p=function(e,n){if(!ke[e])ke[e]=[];return ke[e].push(n)},v=function(e){var n=ke[e];if(n){var t=Array.prototype.slice.call(arguments);t.shift();for(var i=0;i<n.length;i++)n[i].apply(f,t)}},x=function(){return(new Date).getTime()},y=function(e){In=e;f.bg.style.opacity=e*m.bgOpacity},Ce=function(e,n,t,i,o){if(!_e||o&&o!==f.currItem)i=i/(o?o.fitRatio:f.currItem.fitRatio);e[le]=J+n+"px, "+t+"px"+$+" scale("+i+")"},k=function(e){if(M){if(e)if(g>f.currItem.fitRatio){if(!_e){wt(f.currItem,false,true);_e=true}}else if(_e){wt(f.currItem);_e=false}Ce(M,b.x,b.y,g)}},Ie=function(e){if(e.container)Ce(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},Te=function(e,n){n[le]=J+e+"px, 0px"+$},Ee=function(e,n){if(!m.loop&&n){var t=w+(u.x*ne-e)/u.x,i=Math.round(e-_n.x);if(t<0&&i>0||t>=R()-1&&i<0)e=_n.x+i*m.mainScrollEndFriction}_n.x=e;Te(e,W)},Se=function(e,n){var t=vn[e]-te[e];return G[e]+Y[e]+t-t*(n/X)},C=function(e,n){e.x=n.x;e.y=n.y;if(n.id)e.id=n.id},De=function(e){e.x=Math.round(e.x);e.y=Math.round(e.y)},Oe=null,Fe=function(){if(Oe){h.unbind(document,"mousemove",Fe);h.addClass(d,"pswp--has_mouse");m.mouseUsed=true;v("mouseUsed")}Oe=setTimeout(function(){Oe=null},100)},ze=function(){h.bind(document,"keydown",f);if(_.transform)h.bind(f.scrollWrap,"click",f);if(!m.mouseUsed)h.bind(document,"mousemove",Fe);h.bind(window,"resize scroll orientationchange",f);v("bindEvents")},Me=function(){h.unbind(window,"resize scroll orientationchange",f);h.unbind(window,"scroll",o.scroll);h.unbind(document,"keydown",f);h.unbind(document,"mousemove",Fe);if(_.transform)h.unbind(f.scrollWrap,"click",f);if(D)h.unbind(window,q,f);clearTimeout(ve);v("unbindEvents")},Ae=function(e,n){var t=dt(f.currItem,l,e);if(n)z=t;return t},Le=function(e){if(!e)e=f.currItem;return e.initialZoomLevel},Re=function(e){if(!e)e=f.currItem;return e.w>0?m.maxSpreadZoom:1},Pe=function(e,n,t,i){if(i===f.currItem.initialZoomLevel){t[e]=f.currItem.initialPosition[e];return true}else{t[e]=Se(e,i);if(t[e]>n.min[e]){t[e]=n.min[e];return true}else if(t[e]<n.max[e]){t[e]=n.max[e];return true}}return false},Ze=function(){if(le){var e=_.perspective&&!r;J="translate"+(e?"3d(":"(");$=_.perspective?", 0px)":")";return}le="left";h.addClass(d,"pswp--ie");Te=function(e,n){n.left=e+"px"};Ie=function(e){var n=e.fitRatio>1?1:e.fitRatio,t=e.container.style,i=n*e.w,o=n*e.h;t.width=i+"px";t.height=o+"px";t.left=e.initialPosition.x+"px";t.top=e.initialPosition.y+"px"};k=function(){if(M){var e=M,n=f.currItem,t=n.fitRatio>1?1:n.fitRatio,i=t*n.w,o=t*n.h;e.width=i+"px";e.height=o+"px";e.left=b.x+"px";e.top=b.y+"px"}}},Be=function(e){var n="";if(m.escKey&&e.keyCode===27)n="close";else if(m.arrowKeys)if(e.keyCode===37)n="prev";else if(e.keyCode===39)n="next";if(n)if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey){if(e.preventDefault)e.preventDefault();else e.returnValue=false;f[n]()}},Ne=function(e){if(!e)return;if(mn||fn||A||sn){e.preventDefault();e.stopPropagation()}},Ue=function(){f.setScrollOffset(0,h.getScrollY())};var I={},Ke=0,He=function(e){if(I[e]){if(I[e].raf)fe(I[e].raf);Ke--;delete I[e]}},je=function(e){if(I[e])He(e);if(!I[e]){Ke++;I[e]={}}},We=function(){for(var e in I)if(I.hasOwnProperty(e))He(e)},Ye=function(e,n,t,i,o,r,a){var s=x(),l;je(e);var p=function(){if(I[e]){l=x()-s;if(l>=i){He(e);r(t);if(a)a();return}r((t-n)*o(l/i)+n);I[e].raf=de(p)}};p()};var Ge={shout:v,listen:p,viewportSize:l,options:m,isMainScrollAnimating:function(){return A},getZoomLevel:function(){return g},getCurrentIndex:function(){return w},isDragging:function(){return D},isZooming:function(){return F},setScrollOffset:function(e,n){te.x=e;be=te.y=n;v("updateScrollOffset",te)},applyZoomPan:function(e,n,t,i){b.x=n;b.y=t;g=e;k(i)},init:function(){if(K||H)return;var e;f.framework=h;f.template=d;f.bg=h.getChildByClass(d,"pswp__bg");me=d.className;K=true;_=h.detectFeatures();de=_.raf;fe=_.caf;le=_.transform;we=_.oldIE;f.scrollWrap=h.getChildByClass(d,"pswp__scroll-wrap");f.container=h.getChildByClass(f.scrollWrap,"pswp__container");W=f.container.style;f.itemHolders=s=[{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}];s[0].el.style.display=s[2].el.style.display="none";Ze();o={resize:f.updateSize,orientationchange:function(){clearTimeout(ve);ve=setTimeout(function(){if(l.x!==f.scrollWrap.clientWidth)f.updateSize()},500)},scroll:Ue,keydown:Be,click:Ne};var n=_.isOldIOSPhone||_.isOldAndroid||_.isMobileOpera;if(!_.animationName||!_.transform||n)m.showAnimationDuration=m.hideAnimationDuration=0;for(e=0;e<ce.length;e++)f["init"+ce[e]]();if(N){var t=f.ui=new N(f,h);t.init()}v("firstUpdate");w=w||m.index||0;if(isNaN(w)||w<0||w>=R())w=0;f.currItem=lt(w);if(_.isOldIOSPhone||_.isOldAndroid)ue=false;d.setAttribute("aria-hidden","false");if(m.modal)if(!ue){d.style.position="absolute";d.style.top=h.getScrollY()+"px"}else d.style.position="fixed";if(be===undefined){v("initialLayout");be=he=h.getScrollY()}var i="pswp--open ";if(m.mainClass)i+=m.mainClass+" ";if(m.showHideOpacity)i+="pswp--animate_opacity ";i+=r?"pswp--touch":"pswp--notouch";i+=_.animationName?" pswp--css_animation":"";i+=_.svg?" pswp--svg":"";h.addClass(d,i);f.updateSize();a=-1;c=null;for(e=0;e<U;e++)Te((e+a)*u.x,s[e].el.style);if(!we)h.bind(f.scrollWrap,V,f);p("initialZoomInEnd",function(){f.setContent(s[0],w-1);f.setContent(s[2],w+1);s[0].el.style.display=s[2].el.style.display="block";if(m.focus)d.focus();ze()});f.setContent(s[1],w);f.updateCurrItem();v("afterInit");if(!ue)Q=setInterval(function(){if(!Ke&&!D&&!F&&g===f.currItem.initialZoomLevel)f.updateSize()},1e3);h.addClass(d,"pswp--visible")},close:function(){if(!K)return;K=false;H=true;v("close");Me();tt(f.currItem,null,true,f.destroy)},destroy:function(){v("destroy");if(nt)clearTimeout(nt);d.setAttribute("aria-hidden","true");d.className=me;if(Q)clearInterval(Q);h.unbind(f.scrollWrap,V,f);h.unbind(window,"scroll",f);On();We();ke=null},panTo:function(e,n,t){if(!t){if(e>z.min.x)e=z.min.x;else if(e<z.max.x)e=z.max.x;if(n>z.min.y)n=z.min.y;else if(n<z.max.y)n=z.max.y}b.x=e;b.y=n;k()},handleEvent:function(e){e=e||window.event;if(o[e.type])o[e.type](e)},goTo:function(e){e=ye(e);var n=e-w;c=n;w=e;f.currItem=lt(w);ne-=n;Ee(u.x*ne);We();A=false;f.updateCurrItem()},next:function(){f.goTo(w+1)},prev:function(){f.goTo(w-1)},updateCurrZoomItem:function(e){if(e)v("beforeChange",0);if(s[1].el.children.length){var n=s[1].el.children[0];if(h.hasClass(n,"pswp__zoom-wrap"))M=n.style;else M=null}else M=null;z=f.currItem.bounds;X=g=f.currItem.initialZoomLevel;b.x=z.center.x;b.y=z.center.y;if(e)v("afterChange")},invalidateCurrItems:function(){ee=true;for(var e=0;e<U;e++)if(s[e].item)s[e].item.needsUpdate=true},updateCurrItem:function(e){if(c===0)return;var n=Math.abs(c),t;if(e&&n<2)return;f.currItem=lt(w);_e=false;v("beforeChange",c);if(n>=U){a+=c+(c>0?-U:U);n=U}for(var i=0;i<n;i++)if(c>0){t=s.shift();s[U-1]=t;a++;Te((a+2)*u.x,t.el.style);f.setContent(t,w-n+i+1+1)}else{t=s.pop();s.unshift(t);a--;Te(a*u.x,t.el.style);f.setContent(t,w+n-i-1-1)}if(M&&Math.abs(c)===1){var o=lt(ie);if(o.initialZoomLevel!==g){dt(o,l);wt(o);Ie(o)}}c=0;f.updateCurrZoomItem();ie=w;v("afterChange")},updateSize:function(e){if(!ue&&m.modal){var n=h.getScrollY();if(be!==n){d.style.top=n+"px";be=n}if(!e&&ge.x===window.innerWidth&&ge.y===window.innerHeight)return;ge.x=window.innerWidth;ge.y=window.innerHeight;d.style.height=ge.y+"px"}l.x=f.scrollWrap.clientWidth;l.y=f.scrollWrap.clientHeight;Ue();u.x=l.x+Math.round(l.x*m.spacing);u.y=l.y;Ee(u.x*ne);v("beforeResize");if(a!==undefined){var t,i,o;for(var r=0;r<U;r++){t=s[r];Te((r+a)*u.x,t.el.style);o=w+r-1;if(m.loop&&R()>2)o=ye(o);i=lt(o);if(i&&(ee||i.needsUpdate||!i.bounds)){f.cleanSlide(i);f.setContent(t,o);if(r===1){f.currItem=i;f.updateCurrZoomItem(true)}i.needsUpdate=false}else if(t.index===-1&&o>=0)f.setContent(t,o);if(i&&i.container){dt(i,l);wt(i);Ie(i)}}ee=false}X=g=f.currItem.initialZoomLevel;z=f.currItem.bounds;if(z){b.x=z.center.x;b.y=z.center.y;k(true)}v("resize")},zoomTo:function(n,e,t,i,o){if(e){X=g;vn.x=Math.abs(e.x)-b.x;vn.y=Math.abs(e.y)-b.y;C(G,b)}var r=Ae(n,false),a={};Pe("x",r,a,n);Pe("y",r,a,n);var s=g;var l={x:b.x,y:b.y};De(a);var p=function(e){if(e===1){g=n;b.x=a.x;b.y=a.y}else{g=(n-s)*e+s;b.x=(a.x-l.x)*e+l.x;b.y=(a.y-l.y)*e+l.y}if(o)o(e);k(e===1)};if(t)Ye("customZoomTo",0,1,t,i||h.easing.sine.inOut,p);else p(1)}};var qe=30,Ve=10;var Xe,Je,T={},$e={},E={},S={},Qe={},en=[],nn={},tn,on=[],rn={},an,sn,ln,pn=0,un=i(),cn=0,D,dn,fn,mn,hn,wn,O,F,bn,gn,z,_n=i(),M,A,vn=i(),xn=i(),yn,kn,Cn,In,Tn,En=function(e,n){return e.x===n.x&&e.y===n.y},Sn=function(e,n){return Math.abs(e.x-n.x)<t&&Math.abs(e.y-n.y)<t},Dn=function(e,n){rn.x=Math.abs(e.x-n.x);rn.y=Math.abs(e.y-n.y);return Math.sqrt(rn.x*rn.x+rn.y*rn.y)},On=function(){if(hn){fe(hn);hn=null}},Fn=function(){if(D){hn=de(Fn);qn()}},zn=function(){return!(m.scaleMode==="fit"&&g===f.currItem.initialZoomLevel)},Mn=function(e,n){if(!e||e===document)return false;if(e.getAttribute("class")&&e.getAttribute("class").indexOf("pswp__scroll-wrap")>-1)return false;if(n(e))return e;return Mn(e.parentNode,n)},An={},Ln=function(e,n){An.prevent=!Mn(e.target,m.isClickableElement);v("preventDragEvent",e,n,An);return An.prevent},Rn=function(e,n){n.x=e.pageX;n.y=e.pageY;n.id=e.identifier;return n},Pn=function(e,n,t){t.x=(e.x+n.x)*.5;t.y=(e.y+n.y)*.5},Zn=function(e,n,t){if(e-Je>50){var i=on.length>2?on.shift():{};i.x=n;i.y=t;on.push(i);Je=e}},Bn=function(){var e=b.y-f.currItem.initialPosition.y;return 1-Math.abs(e/(l.y/2))},Nn={},Un={},Kn=[],Hn,jn=function(e){while(Kn.length>0)Kn.pop();if(!pe)if(e.type.indexOf("touch")>-1){if(e.touches&&e.touches.length>0){Kn[0]=Rn(e.touches[0],Nn);if(e.touches.length>1)Kn[1]=Rn(e.touches[1],Un)}}else{Nn.x=e.pageX;Nn.y=e.pageY;Nn.id="";Kn[0]=Nn}else{Hn=0;en.forEach(function(e){if(Hn===0)Kn[0]=e;else if(Hn===1)Kn[1]=e;Hn++})}return Kn},Wn=function(e,n){var t,i=0,o=b[e]+n[e],r,a=n[e]>0,s=_n.x+n.x,l=_n.x-nn.x,p,u;if(o>z.min[e]||o<z.max[e])t=m.panEndFriction;else t=1;o=b[e]+n[e]*t;if(m.allowPanToNext||g===f.currItem.initialZoomLevel){if(!M)u=s;else if(yn==="h"&&e==="x"&&!fn)if(a){if(o>z.min[e]){t=m.panEndFriction;i=z.min[e]-o;r=z.min[e]-G[e]}if((r<=0||l<0)&&R()>1){u=s;if(l<0&&s>nn.x)u=nn.x}else if(z.min.x!==z.max.x)p=o}else{if(o<z.max[e]){t=m.panEndFriction;i=o-z.max[e];r=G[e]-z.max[e]}if((r<=0||l>0)&&R()>1){u=s;if(l>0&&s<nn.x)u=nn.x}else if(z.min.x!==z.max.x)p=o}if(e==="x"){if(u!==undefined){Ee(u,true);if(u===nn.x)wn=false;else wn=true}if(z.min.x!==z.max.x)if(p!==undefined)b.x=p;else if(!wn)b.x+=n.x*t;return u!==undefined}}if(!A)if(!wn)if(g>f.currItem.fitRatio)b[e]+=n[e]*t},Yn=function(e){if(e.type==="mousedown"&&e.button>0)return;if(at){e.preventDefault();return}if(ln&&e.type==="mousedown")return;if(Ln(e,true))e.preventDefault();v("pointerDown");if(pe){var n=h.arraySearch(en,e.pointerId,"id");if(n<0)n=en.length;en[n]={x:e.pageX,y:e.pageY,id:e.pointerId}}var t=jn(e),i=t.length;O=null;We();if(!D||i===1){D=kn=true;h.bind(window,q,f);an=Tn=Cn=sn=wn=mn=dn=fn=false;yn=null;v("firstTouchStart",t);C(G,b);Y.x=Y.y=0;C(S,t[0]);C(Qe,S);nn.x=u.x*ne;on=[{x:S.x,y:S.y}];Je=Xe=x();Ae(g,true);On();Fn()}if(!F&&i>1&&!A&&!wn){X=g;fn=false;F=dn=true;Y.y=Y.x=0;C(G,b);C(T,t[0]);C($e,t[1]);Pn(T,$e,xn);vn.x=Math.abs(xn.x)-b.x;vn.y=Math.abs(xn.y)-b.y;bn=gn=Dn(T,$e)}},Gn=function(e){e.preventDefault();if(pe){var n=h.arraySearch(en,e.pointerId,"id");if(n>-1){var t=en[n];t.x=e.pageX;t.y=e.pageY}}if(D){var i=jn(e);if(!yn&&!mn&&!F)if(_n.x!==u.x*ne)yn="h";else{var o=Math.abs(i[0].x-S.x)-Math.abs(i[0].y-S.y);if(Math.abs(o)>=Ve){yn=o>0?"h":"v";O=i}}else O=i}},qn=function(){if(!O)return;var e=O.length;if(e===0)return;C(T,O[0]);E.x=T.x-S.x;E.y=T.y-S.y;if(F&&e>1){S.x=T.x;S.y=T.y;if(!E.x&&!E.y&&En(O[1],$e))return;C($e,O[1]);if(!fn){fn=true;v("zoomGestureStarted")}var n=Dn(T,$e);var t=Qn(n);if(t>f.currItem.initialZoomLevel+f.currItem.initialZoomLevel/15)Tn=true;var i=1,o=Le(),r=Re();if(t<o)if(m.pinchToClose&&!Tn&&X<=f.currItem.initialZoomLevel){var a=o-t;var s=1-a/(o/1.2);y(s);v("onPinchClose",s);Cn=true}else{i=(o-t)/o;if(i>1)i=1;t=o-i*(o/3)}else if(t>r){i=(t-r)/(o*6);if(i>1)i=1;t=r+i*o}if(i<0)i=0;bn=n;Pn(T,$e,un);Y.x+=un.x-xn.x;Y.y+=un.y-xn.y;C(xn,un);b.x=Se("x",t);b.y=Se("y",t);an=t>g;g=t;k()}else{if(!yn)return;if(kn){kn=false;if(Math.abs(E.x)>=Ve)E.x-=O[0].x-Qe.x;if(Math.abs(E.y)>=Ve)E.y-=O[0].y-Qe.y}S.x=T.x;S.y=T.y;if(E.x===0&&E.y===0)return;if(yn==="v"&&m.closeOnVerticalDrag)if(!zn()){Y.y+=E.y;b.y+=E.y;var l=Bn();sn=true;v("onVerticalDrag",l);y(l);k();return}Zn(x(),T.x,T.y);mn=true;z=f.currItem.bounds;var p=Wn("x",E);if(!p){Wn("y",E);De(b);k()}}},Vn=function(e){if(_.isOldAndroid){if(ln&&e.type==="mouseup")return;if(e.type.indexOf("touch")>-1){clearTimeout(ln);ln=setTimeout(function(){ln=0},600)}}v("pointerUp");if(Ln(e,false))e.preventDefault();var n;if(pe){var t=h.arraySearch(en,e.pointerId,"id");if(t>-1){n=en.splice(t,1)[0];if(navigator.pointerEnabled)n.type=e.pointerType||"mouse";else{var i={4:"mouse",2:"touch",3:"pen"};n.type=i[e.pointerType];if(!n.type)n.type=e.pointerType||"mouse"}}}var o=jn(e),r,a=o.length;if(e.type==="mouseup")a=0;if(a===2){O=null;return true}if(a===1)C(Qe,o[0]);if(a===0&&!yn&&!A){if(!n)if(e.type==="mouseup")n={x:e.pageX,y:e.pageY,type:"mouse"};else if(e.changedTouches&&e.changedTouches[0])n={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"};v("touchRelease",e,n)}var s=-1;if(a===0){D=false;h.unbind(window,q,f);On();if(F)s=0;else if(cn!==-1)s=x()-cn}cn=a===1?x():-1;if(s!==-1&&s<150)r="zoom";else r="swipe";if(F&&a<2){F=false;if(a===1)r="zoomPointerUp";v("zoomGestureEnded")}O=null;if(!mn&&!fn&&!A&&!sn)return;We();if(!tn)tn=Xn();tn.calculateSwipeSpeed("x");if(sn){var l=Bn();if(l<m.verticalDragRange)f.close();else{var p=b.y,u=In;Ye("verticalDrag",0,1,300,h.easing.cubic.out,function(e){b.y=(f.currItem.initialPosition.y-p)*e+p;y((1-u)*e+u);k()});v("onVerticalDrag",1)}return}if((wn||A)&&a===0){var c=$n(r,tn);if(c)return;r="zoomPointerUp"}if(A)return;if(r!=="swipe"){et();return}if(!wn&&g>f.currItem.fitRatio)Jn(tn)},Xn=function(){var n,t;var i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){if(on.length>1){n=x()-Je+50;t=on[on.length-2][e]}else{n=x()-Xe;t=Qe[e]}i.lastFlickOffset[e]=S[e]-t;i.lastFlickDist[e]=Math.abs(i.lastFlickOffset[e]);if(i.lastFlickDist[e]>20)i.lastFlickSpeed[e]=i.lastFlickOffset[e]/n;else i.lastFlickSpeed[e]=0;if(Math.abs(i.lastFlickSpeed[e])<.1)i.lastFlickSpeed[e]=0;i.slowDownRatio[e]=.95;i.slowDownRatioReverse[e]=1-i.slowDownRatio[e];i.speedDecelerationRatio[e]=1},calculateOverBoundsAnimOffset:function(n,e){if(!i.backAnimStarted[n]){if(b[n]>z.min[n])i.backAnimDestination[n]=z.min[n];else if(b[n]<z.max[n])i.backAnimDestination[n]=z.max[n];if(i.backAnimDestination[n]!==undefined){i.slowDownRatio[n]=.7;i.slowDownRatioReverse[n]=1-i.slowDownRatio[n];if(i.speedDecelerationRatioAbs[n]<.05){i.lastFlickSpeed[n]=0;i.backAnimStarted[n]=true;Ye("bounceZoomPan"+n,b[n],i.backAnimDestination[n],e||300,h.easing.sine.out,function(e){b[n]=e;k()})}}}},calculateAnimOffset:function(e){if(!i.backAnimStarted[e]){i.speedDecelerationRatio[e]=i.speedDecelerationRatio[e]*(i.slowDownRatio[e]+i.slowDownRatioReverse[e]-i.slowDownRatioReverse[e]*i.timeDiff/10);i.speedDecelerationRatioAbs[e]=Math.abs(i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]);i.distanceOffset[e]=i.lastFlickSpeed[e]*i.speedDecelerationRatio[e]*i.timeDiff;b[e]+=i.distanceOffset[e]}},panAnimLoop:function(){if(I.zoomPan){I.zoomPan.raf=de(i.panAnimLoop);i.now=x();i.timeDiff=i.now-i.lastNow;i.lastNow=i.now;i.calculateAnimOffset("x");i.calculateAnimOffset("y");k();i.calculateOverBoundsAnimOffset("x");i.calculateOverBoundsAnimOffset("y");if(i.speedDecelerationRatioAbs.x<.05&&i.speedDecelerationRatioAbs.y<.05){b.x=Math.round(b.x);b.y=Math.round(b.y);k();He("zoomPan");return}}}};return i},Jn=function(e){e.calculateSwipeSpeed("y");z=f.currItem.bounds;e.backAnimDestination={};e.backAnimStarted={};if(Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05){e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0;e.calculateOverBoundsAnimOffset("x");e.calculateOverBoundsAnimOffset("y");return true}je("zoomPan");e.lastNow=x();e.panAnimLoop()},$n=function(e,n){var t;if(!A)pn=w;var i;if(e==="swipe"){var o=S.x-Qe.x,r=n.lastFlickDist.x<10;if(o>qe&&(r||n.lastFlickOffset.x>20))i=-1;else if(o<-qe&&(r||n.lastFlickOffset.x<-20))i=1}var a;if(i){w+=i;if(w<0){w=m.loop?R()-1:0;a=true}else if(w>=R()){w=m.loop?0:R()-1;a=true}if(!a||m.loop){c+=i;ne-=i;t=true}}var s=u.x*ne;var l=Math.abs(s-_n.x);var p;if(!t&&s>_n.x!==n.lastFlickSpeed.x>0)p=333;else{p=Math.abs(n.lastFlickSpeed.x)>0?l/Math.abs(n.lastFlickSpeed.x):333;p=Math.min(p,400);p=Math.max(p,250)}if(pn===w)t=false;A=true;v("mainScrollAnimStart");Ye("mainScroll",_n.x,s,p,h.easing.cubic.out,Ee,function(){We();A=false;pn=-1;if(t||pn!==w)f.updateCurrItem();v("mainScrollAnimComplete")});if(t)f.updateCurrItem(true);return t},Qn=function(e){return 1/gn*e*X},et=function(){var e=g,n=Le(),t=Re();if(g<n)e=n;else if(g>t)e=t;var i=1,o,r=In;if(Cn&&!an&&!Tn&&g<n){f.close();return true}if(Cn)o=function(e){y((i-r)*e+r)};f.zoomTo(e,0,200,h.easing.cubic.out,o);return true};xe("Gestures",{publicMethods:{initGestures:function(){var e=function(e,n,t,i,o){oe=e+n;re=e+t;ae=e+i;if(o)se=e+o;else se=""};pe=_.pointerEvent;if(pe&&_.touch)_.touch=false;if(pe)if(navigator.pointerEnabled)e("pointer","down","move","up","cancel");else e("MSPointer","Down","Move","Up","Cancel");else if(_.touch){e("touch","start","move","end","cancel");r=true}else e("mouse","down","move","up");q=re+" "+ae+" "+se;V=oe;if(pe&&!r)r=navigator.maxTouchPoints>1||navigator.msMaxTouchPoints>1;f.likelyTouchDevice=r;o[oe]=Yn;o[re]=Gn;o[ae]=Vn;if(se)o[se]=o[ae];if(_.touch){V+=" mousedown";q+=" mousemove mouseup";o.mousedown=o[oe];o.mousemove=o[re];o.mouseup=o[ae]}if(!r)m.allowPanToNext=false}}});var nt,tt=function(s,e,l,n){if(nt)clearTimeout(nt);at=true;rt=true;var p;if(s.initialLayout){p=s.initialLayout;s.initialLayout=null}else p=m.getThumbBoundsFn&&m.getThumbBoundsFn(w);var u=l?m.hideAnimationDuration:m.showAnimationDuration;var c=function(){He("initialZoom");if(!l){y(1);if(e)e.style.display="block";h.addClass(d,"pswp--animated-in");v("initialZoom"+(l?"OutEnd":"InEnd"))}else{f.template.removeAttribute("style");f.bg.removeAttribute("style")}if(n)n();at=false};if(!u||!p||p.x===undefined){v("initialZoom"+(l?"Out":"In"));g=s.initialZoomLevel;C(b,s.initialPosition);k();d.style.opacity=l?0:1;y(1);if(u)setTimeout(function(){c()},u);else c();return}var t=function(){var r=j,a=!f.currItem.src||f.currItem.loadError||m.showHideOpacity;if(s.miniImg)s.miniImg.style.webkitBackfaceVisibility="hidden";if(!l){g=p.w/s.w;b.x=p.x;b.y=p.y-he;f[a?"template":"bg"].style.opacity=.001;k()}je("initialZoom");if(l&&!r)h.removeClass(d,"pswp--animated-in");if(a)if(l)h[(r?"remove":"add")+"Class"](d,"pswp--animate_opacity");else setTimeout(function(){h.addClass(d,"pswp--animate_opacity")},30);nt=setTimeout(function(){v("initialZoom"+(l?"Out":"In"));if(!l){g=s.initialZoomLevel;C(b,s.initialPosition);k();y(1);if(a)d.style.opacity=1;else y(1);nt=setTimeout(c,u+20)}else{var n=p.w/s.w,t={x:b.x,y:b.y},i=g,o=In,e=function(e){if(e===1){g=n;b.x=p.x;b.y=p.y-be}else{g=(n-i)*e+i;b.x=(p.x-t.x)*e+t.x;b.y=(p.y-be-t.y)*e+t.y}k();if(a)d.style.opacity=1-e;else y(o-e*o)};if(r)Ye("initialZoom",0,1,u,h.easing.cubic.out,e,c);else{e(1);nt=setTimeout(c,u+20)}}},l?25:90)};t()};var it,L={},ot=[],rt,at,st={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',for