sigal 2.3__py3-none-any.whl → 2.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. sigal/__init__.py +2 -285
  2. sigal/__main__.py +312 -0
  3. sigal/gallery.py +188 -158
  4. sigal/image.py +113 -115
  5. sigal/log.py +11 -11
  6. sigal/plugins/adjust.py +4 -4
  7. sigal/plugins/compress_assets.py +26 -25
  8. sigal/plugins/copyright.py +8 -8
  9. sigal/plugins/encrypt/encrypt.py +7 -7
  10. sigal/plugins/encrypt/endec.py +2 -2
  11. sigal/plugins/extended_caching.py +26 -22
  12. sigal/plugins/feeds.py +19 -21
  13. sigal/plugins/media_page.py +1 -1
  14. sigal/plugins/nomedia.py +1 -1
  15. sigal/plugins/nonmedia_files.py +59 -93
  16. sigal/plugins/titleregexp.py +98 -0
  17. sigal/plugins/watermark.py +13 -13
  18. sigal/plugins/zip_gallery.py +17 -8
  19. sigal/settings.py +92 -78
  20. sigal/signals.py +10 -10
  21. sigal/templates/sigal.conf.py +18 -14
  22. sigal/themes/default/templates/decrypt.html +1 -0
  23. sigal/themes/default/templates/description.html +29 -0
  24. sigal/themes/default/templates/footer.html +3 -0
  25. sigal/themes/galleria/templates/album_items.html +4 -23
  26. sigal/themes/photoswipe/static/photoswipe-dynamic-caption-plugin.esm.js +414 -0
  27. sigal/themes/photoswipe/static/photoswipe-dynamic-caption-plugin.esm.min.js +5 -0
  28. sigal/themes/photoswipe/static/photoswipe-fullscreen.esm.js +129 -0
  29. sigal/themes/photoswipe/static/photoswipe-fullscreen.esm.min.js +8 -0
  30. sigal/themes/photoswipe/static/photoswipe-lightbox.esm.js +1960 -0
  31. sigal/themes/photoswipe/static/photoswipe-lightbox.esm.js.map +1 -0
  32. sigal/themes/photoswipe/static/photoswipe-lightbox.esm.min.js +5 -0
  33. sigal/themes/photoswipe/static/photoswipe-video-plugin.esm.js +257 -0
  34. sigal/themes/photoswipe/static/photoswipe-video-plugin.esm.min.js +1 -0
  35. sigal/themes/photoswipe/static/photoswipe.css +385 -140
  36. sigal/themes/photoswipe/static/photoswipe.esm.js +7081 -0
  37. sigal/themes/photoswipe/static/photoswipe.esm.js.map +1 -0
  38. sigal/themes/photoswipe/static/photoswipe.esm.min.js +5 -0
  39. sigal/themes/photoswipe/static/styles.css +53 -0
  40. sigal/themes/photoswipe/templates/album.html +69 -74
  41. sigal/utils.py +80 -12
  42. sigal/version.py +20 -4
  43. sigal/video.py +43 -24
  44. sigal/writer.py +26 -8
  45. {sigal-2.3.dist-info → sigal-2.5.dist-info}/LICENSE +1 -1
  46. {sigal-2.3.dist-info → sigal-2.5.dist-info}/METADATA +23 -30
  47. {sigal-2.3.dist-info → sigal-2.5.dist-info}/RECORD +50 -50
  48. {sigal-2.3.dist-info → sigal-2.5.dist-info}/WHEEL +1 -1
  49. sigal-2.5.dist-info/entry_points.txt +2 -0
  50. sigal/plugins/upload_s3.py +0 -106
  51. sigal/themes/photoswipe/static/app.js +0 -214
  52. sigal/themes/photoswipe/static/default-skin/default-skin.css +0 -485
  53. sigal/themes/photoswipe/static/default-skin/default-skin.css.map +0 -10
  54. sigal/themes/photoswipe/static/default-skin/default-skin.png +0 -0
  55. sigal/themes/photoswipe/static/default-skin/default-skin.svg +0 -36
  56. sigal/themes/photoswipe/static/default-skin/preloader.gif +0 -0
  57. sigal/themes/photoswipe/static/echo/blank.gif +0 -0
  58. sigal/themes/photoswipe/static/echo/echo.js +0 -135
  59. sigal/themes/photoswipe/static/echo/echo.min.js +0 -2
  60. sigal/themes/photoswipe/static/photoswipe-ui-default.js +0 -871
  61. sigal/themes/photoswipe/static/photoswipe-ui-default.min.js +0 -1
  62. sigal/themes/photoswipe/static/photoswipe.css.map +0 -10
  63. sigal/themes/photoswipe/static/photoswipe.js +0 -3592
  64. sigal/themes/photoswipe/static/photoswipe.min.js +0 -1
  65. sigal-2.3.dist-info/entry_points.txt +0 -2
  66. {sigal-2.3.dist-info → sigal-2.5.dist-info}/top_level.txt +0 -0
@@ -1 +0,0 @@
1
- !function(e,t){void 0===e&&void 0!==window&&(e=window),"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipe=t()}(this,function(){"use strict";return function(m,i,e,t){var f={features:null,bind:function(e,t,n,i){var o=(i?"remove":"add")+"EventListener";t=t.split(" ");for(var a=0;a<t.length;a++)t[a]&&e[o](t[a],n,!1)},isArray:function(e){return e instanceof Array},createEl:function(e,t){var n=document.createElement(t||"div");return e&&(n.className=e),n},resetEl:function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},getScrollY:function(){var e=window.pageYOffset;return void 0!==e?e:document.documentElement.scrollTop},unbind:function(e,t,n){f.bind(e,t,n,!0)},removeClass:function(e,t){var n=new RegExp("(\\s|^)"+t+"(\\s|$)");e.className=e.className.replace(n," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")},addClass:function(e,t){f.hasClass(e,t)||(e.className+=(e.className?" ":"")+t)},hasClass:function(e,t){return e.className&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(e.className)},getChildByClass:function(e,t){for(var n=e.firstChild;n;){if(f.hasClass(n,t))return n;n=n.nextSibling}},arraySearch:function(e,t,n){for(var i=e.length;i--;)if(e[i][n]===t)return i;return-1},extend:function(e,t,n){for(var i in t)if(t.hasOwnProperty(i)){if(n&&e.hasOwnProperty(i))continue;e[i]=t[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(f.features)return f.features;var e,t,n,i,o=f.createEl().style,a="",r={};r.oldIE=document.all&&!document.addEventListener,r.touch="ontouchstart"in window,window.requestAnimationFrame&&(r.raf=window.requestAnimationFrame,r.caf=window.cancelAnimationFrame),r.pointerEvent=!!window.PointerEvent||navigator.msPointerEnabled,r.pointerEvent||(e=navigator.userAgent,!/iP(hone|od)/.test(navigator.platform)||(t=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/))&&0<t.length&&1<=(t=parseInt(t[1],10))&&t<8&&(r.isOldIOSPhone=!0),i=(n=e.match(/Android\s([0-9\.]*)/))?n[1]:0,1<=(i=parseFloat(i))&&(i<4.4&&(r.isOldAndroid=!0),r.androidVersion=i),r.isMobileOpera=/opera mini|opera mobi/i.test(e));for(var l,s,u,c=["transform","perspective","animationName"],d=["","webkit","Moz","ms","O"],p=0;p<4;p++){a=d[p];for(var m=0;m<3;m++)l=c[m],s=a+(a?l.charAt(0).toUpperCase()+l.slice(1):l),!r[l]&&s in o&&(r[l]=s);a&&!r.raf&&(a=a.toLowerCase(),r.raf=window[a+"RequestAnimationFrame"],r.raf&&(r.caf=window[a+"CancelAnimationFrame"]||window[a+"CancelRequestAnimationFrame"]))}return r.raf||(u=0,r.raf=function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-u)),i=window.setTimeout(function(){e(t+n)},n);return u=t+n,i},r.caf=function(e){clearTimeout(e)}),r.svg=!!document.createElementNS&&!!document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,f.features=r}};f.detectFeatures(),f.features.oldIE&&(f.bind=function(e,t,n,i){t=t.split(" ");for(var o,a=(i?"detach":"attach")+"Event",r=function(){n.handleEvent.call(n)},l=0;l<t.length;l++)if(o=t[l])if("object"==typeof n&&n.handleEvent){if(i){if(!n["oldIE"+o])return!1}else n["oldIE"+o]=r;e[a]("on"+o,n["oldIE"+o])}else e[a]("on"+o,n)});var h=this,y={allowPanToNext:!0,preventSwiping:!1,spacing:.12,bgOpacity:1,mouseUsed:!1,loop:!0,pinchToClose:!0,closeOnScroll:!0,closeOnVerticalDrag:!0,verticalDragRange:.75,hideAnimationDuration:333,showAnimationDuration:333,showHideOpacity:!1,focus:!0,escKey:!0,arrowKeys:!0,mainScrollEndFriction:.35,panEndFriction:.35,animateTransitions:!1,isClickableElement:function(e){return"A"===e.tagName},getDoubleTapZoom:function(e,t){return e||t.initialZoomLevel<.7?1:1.33},maxSpreadZoom:1.33,modal:!0,scaleMode:"fit"};f.extend(y,t);function n(){return{x:0,y:0}}function o(e,t){f.extend(h,t.publicMethods),je.push(e)}function s(e){var t=Vt();return t-1<e?e-t:e<0?t+e:e}function a(e,t){return et[e]||(et[e]=[]),et[e].push(t)}function x(e){var t=et[e];if(t){var n=Array.prototype.slice.call(arguments);n.shift();for(var i=0;i<t.length;i++)t[i].apply(h,n)}}function g(){return(new Date).getTime()}function v(e){Ne=e,h.bg.style.opacity=e*y.bgOpacity}function r(e,t,n,i,o){(!Qe||o&&o!==h.currItem)&&(i/=o?o.fitRatio:h.currItem.fitRatio),e[le]=j+t+"px, "+n+"px"+J+" scale("+i+")"}function c(e,t){var n,i;!y.loop&&t&&(n=Y+(Ke.x*Xe-e)/Ke.x,i=Math.round(e-bt.x),(n<0&&0<i||n>=Vt()-1&&i<0)&&(e=bt.x+i*y.mainScrollEndFriction)),bt.x=e,it(e,B)}function w(e,t){var n=It[e]-Ve[e];return Ye[e]+He[e]+n-t/$*n}function b(e,t){e.x=t.x,e.y=t.y,t.id&&(e.id=t.id)}function I(e){e.x=Math.round(e.x),e.y=Math.round(e.y)}function d(e,t){var n=Jt(h.currItem,Ge,e);return t&&(Pe=n),n}function C(e){return(e=e||h.currItem).initialZoomLevel}function D(e){return 0<(e=e||h.currItem).w?y.maxSpreadZoom:1}function p(e,t,n,i){return i===h.currItem.initialZoomLevel?(n[e]=h.currItem.initialPosition[e],!0):(n[e]=w(e,i),n[e]>t.min[e]?(n[e]=t.min[e],!0):n[e]<t.max[e]&&(n[e]=t.max[e],!0))}function l(e){var t="";y.escKey&&27===e.keyCode?t="close":y.arrowKeys&&(37===e.keyCode?t="prev":39===e.keyCode&&(t="next")),t&&(e.ctrlKey||e.altKey||e.shiftKey||e.metaKey||(e.preventDefault?e.preventDefault():e.returnValue=!1,h[t]()))}function u(e){e&&(Me||Te||Fe||Ie)&&(e.preventDefault(),e.stopPropagation())}function S(){h.setScrollOffset(0,f.getScrollY())}function T(e){rt[e]&&(rt[e].raf&&de(rt[e].raf),lt--,delete rt[e])}function M(e){rt[e]&&T(e),rt[e]||(lt++,rt[e]={})}function E(){for(var e in rt)rt.hasOwnProperty(e)&&T(e)}function A(e,t,n,i,o,a,r){var l,s=g();M(e);var u=function(){if(rt[e]){if(l=g()-s,i<=l)return T(e),a(n),void(r&&r());a((n-t)*o(l/i)+t),rt[e].raf=ce(u)}};u()}function O(e,t){return xt.x=Math.abs(e.x-t.x),xt.y=Math.abs(e.y-t.y),Math.sqrt(xt.x*xt.x+xt.y*xt.y)}function k(e,t){return Mt.prevent=!Tt(e.target,y.isClickableElement),x("preventDragEvent",e,t,Mt),Mt.prevent}function R(e,t){return t.x=e.pageX,t.y=e.pageY,t.id=e.identifier,t}function P(e,t,n){n.x=.5*(e.x+t.x),n.y=.5*(e.y+t.y)}function Z(){var e=Be.y-h.currItem.initialPosition.y;return 1-Math.abs(e/(Ge.y/2))}function F(e){for(;0<Ot.length;)Ot.pop();return se?(We=0,ft.forEach(function(e){0===We?Ot[0]=e:1===We&&(Ot[1]=e),We++})):-1<e.type.indexOf("touch")?e.touches&&0<e.touches.length&&(Ot[0]=R(e.touches[0],Et),1<e.touches.length&&(Ot[1]=R(e.touches[1],At))):(Et.x=e.pageX,Et.y=e.pageY,Et.id="",Ot[0]=Et),Ot}function L(e,t){var n,i,o,a=Be[e]+t[e],r=0<t[e],l=bt.x+t.x,s=bt.x-ht.x,u=a>Pe.min[e]||a<Pe.max[e]?y.panEndFriction:1,a=Be[e]+t[e]*u;if((y.allowPanToNext||q===h.currItem.initialZoomLevel)&&(Ze?"h"!==Le||"x"!==e||Te||(r?(a>Pe.min[e]&&(u=y.panEndFriction,Pe.min[e],n=Pe.min[e]-Ye[e]),(n<=0||s<0)&&1<Vt()?(o=l,s<0&&l>ht.x&&(o=ht.x)):Pe.min.x!==Pe.max.x&&(i=a)):(a<Pe.max[e]&&(u=y.panEndFriction,Pe.max[e],n=Ye[e]-Pe.max[e]),(n<=0||0<s)&&1<Vt()?(o=l,0<s&&l<ht.x&&(o=ht.x)):Pe.min.x!==Pe.max.x&&(i=a))):o=l,"x"===e))return void 0!==o&&(c(o,!0),Ae=o!==ht.x),Pe.min.x!==Pe.max.x&&(void 0!==i?Be.x=i:Ae||(Be.x+=t.x*u)),void 0!==o;Fe||Ae||q>h.currItem.fitRatio&&(Be[e]+=t[e]*u)}function z(e){var t,n,i;"mousedown"===e.type&&(0<e.button||0===e.buttons)||y.preventSwiping||(Gt?e.preventDefault():Ce&&"mousedown"===e.type||(k(e,!0)&&e.preventDefault(),x("pointerDown"),se&&((t=f.arraySearch(ft,e.pointerId,"id"))<0&&(t=ft.length),ft[t]={x:e.pageX,y:e.pageY,id:e.pointerId}),i=(n=F(e)).length,Oe=null,E(),De&&1!==i||(De=ze=!0,f.bind(window,X,h),be=Ue=_e=Ie=Ae=Me=Se=Te=!1,Le=null,x("firstTouchStart",n),b(Ye,Be),He.x=He.y=0,b(pt,n[0]),b(mt,pt),ht.x=Ke.x*Xe,yt=[{x:pt.x,y:pt.y}],ve=ge=g(),d(q,!0),Dt(),St()),!ke&&1<i&&!Fe&&!Ae&&($=q,ke=Se=!(Te=!1),He.y=He.x=0,b(Ye,Be),b(ut,n[0]),b(ct,n[1]),P(ut,ct,Ct),It.x=Math.abs(Ct.x)-Be.x,It.y=Math.abs(Ct.y)-Be.y,Re=O(ut,ct))))}function _(e){var t,n,i,o;y.preventSwiping||(e.preventDefault(),!se||-1<(t=f.arraySearch(ft,e.pointerId,"id"))&&((n=ft[t]).x=e.pageX,n.y=e.pageY),De&&(i=F(e),Le||Me||ke?Oe=i:bt.x!==Ke.x*Xe?Le="h":(o=Math.abs(i[0].x-pt.x)-Math.abs(i[0].y-pt.y),10<=Math.abs(o)&&(Le=0<o?"h":"v",Oe=i))))}function N(e){if(ye.isOldAndroid){if(Ce&&"mouseup"===e.type)return;-1<e.type.indexOf("touch")&&(clearTimeout(Ce),Ce=setTimeout(function(){Ce=0},600))}var t,n;x("pointerUp"),k(e,!1)&&e.preventDefault(),!se||-1<(t=f.arraySearch(ft,e.pointerId,"id"))&&(n=ft.splice(t,1)[0],navigator.msPointerEnabled?(n.type={4:"mouse",2:"touch",3:"pen"}[e.pointerType],n.type||(n.type=e.pointerType||"mouse")):n.type=e.pointerType||"mouse");var i,o=F(e),a=o.length;if("mouseup"===e.type&&(a=0),2===a)return!(Oe=null);1===a&&b(mt,o[0]),0!==a||Le||Fe||(n||("mouseup"===e.type?n={x:e.pageX,y:e.pageY,type:"mouse"}:e.changedTouches&&e.changedTouches[0]&&(n={x:e.changedTouches[0].pageX,y:e.changedTouches[0].pageY,type:"touch"})),x("touchRelease",e,n));var r,l,s=-1;if(0===a&&(De=!1,f.unbind(window,X,h),Dt(),ke?s=0:-1!==wt&&(s=g()-wt)),wt=1===a?g():-1,i=-1!==s&&s<150?"zoom":"swipe",ke&&a<2&&(ke=!1,1===a&&(i="zoomPointerUp"),x("zoomGestureEnded")),Oe=null,Me||Te||Fe||Ie)if(E(),(we=we||Rt()).calculateSwipeSpeed("x"),Ie){Z()<y.verticalDragRange?h.close():(r=Be.y,l=Ne,A("verticalDrag",0,1,300,f.easing.cubic.out,function(e){Be.y=(h.currItem.initialPosition.y-r)*e+r,v((1-l)*e+l),tt()}),x("onVerticalDrag",1))}else{if((Ae||Fe)&&0===a){var u=pt.x-mt.x;if(Zt(i,u,we))return;i="zoomPointerUp"}Fe||("swipe"===i?!Ae&&q>h.currItem.fitRatio&&Pt(we):Lt())}}var U,W,H,Y,B,G,X,V,K,q,$,j,J,Q,ee,te,ne,ie,oe,ae,re,le,se,ue,ce,de,pe,me,fe,he,ye,xe,ge,ve,we,be,Ie,Ce,De,Se,Te,Me,Ee,Ae,Oe,ke,Re,Pe,Ze,Fe,Le,ze,_e,Ne,Ue,We,He=n(),Ye=n(),Be=n(),Ge={},Xe=0,Ve={},Ke=n(),qe=0,$e=!0,je=[],Je={},Qe=!1,et={},tt=function(e){Ze&&!h.currItem.loadError&&(e&&(q>h.currItem.fitRatio?Qe||(Qt(h.currItem,!1,!0),Qe=!0):Qe&&(Qt(h.currItem),Qe=!1)),r(Ze,Be.x,Be.y,q))},nt=function(e){e.container&&r(e.container.style,e.initialPosition.x,e.initialPosition.y,e.initialZoomLevel,e)},it=function(e,t){t[le]=j+e+"px, 0px"+J},ot=null,at=function(){ot&&(f.unbind(document,"mousemove",at),f.addClass(m,"pswp--has_mouse"),y.mouseUsed=!0,x("mouseUsed")),ot=setTimeout(function(){ot=null},100)},rt={},lt=0,st={shout:x,listen:a,viewportSize:Ge,options:y,isMainScrollAnimating:function(){return Fe},getZoomLevel:function(){return q},getCurrentIndex:function(){return Y},isDragging:function(){return De},isZooming:function(){return ke},setScrollOffset:function(e,t){Ve.x=e,he=Ve.y=t,x("updateScrollOffset",Ve)},applyZoomPan:function(e,t,n,i){Be.x=t,Be.y=n,q=e,tt(i)},init:function(){if(!U&&!W){var e;h.framework=f,h.template=m,h.bg=f.getChildByClass(m,"pswp__bg"),pe=m.className,U=!0,ye=f.detectFeatures(),ce=ye.raf,de=ye.caf,le=ye.transform,fe=ye.oldIE,h.scrollWrap=f.getChildByClass(m,"pswp__scroll-wrap"),h.container=f.getChildByClass(h.scrollWrap,"pswp__container"),B=h.container.style,h.itemHolders=te=[{el:h.container.children[0],wrap:0,index:-1},{el:h.container.children[1],wrap:0,index:-1},{el:h.container.children[2],wrap:0,index:-1}],te[0].el.style.display=te[2].el.style.display="none",function(){if(le){var e=ye.perspective&&!ue;return j="translate"+(e?"3d(":"("),J=ye.perspective?", 0px)":")"}le="left",f.addClass(m,"pswp--ie"),it=function(e,t){t.left=e+"px"},nt=function(e){var t=1<e.fitRatio?1:e.fitRatio,n=e.container.style,i=t*e.w,o=t*e.h;n.width=i+"px",n.height=o+"px",n.left=e.initialPosition.x+"px",n.top=e.initialPosition.y+"px"},tt=function(){var e,t,n,i,o;Ze&&(e=Ze,i=(n=1<(t=h.currItem).fitRatio?1:t.fitRatio)*t.w,o=n*t.h,e.width=i+"px",e.height=o+"px",e.left=Be.x+"px",e.top=Be.y+"px")}}(),K={resize:h.updateSize,orientationchange:function(){clearTimeout(xe),xe=setTimeout(function(){Ge.x!==h.scrollWrap.clientWidth&&h.updateSize()},500)},scroll:S,keydown:l,click:u};var t=ye.isOldIOSPhone||ye.isOldAndroid||ye.isMobileOpera;for(ye.animationName&&ye.transform&&!t||(y.showAnimationDuration=y.hideAnimationDuration=0),e=0;e<je.length;e++)h["init"+je[e]]();i&&(h.ui=new i(h,f)).init(),x("firstUpdate"),Y=Y||y.index||0,(isNaN(Y)||Y<0||Y>=Vt())&&(Y=0),h.currItem=Xt(Y),(ye.isOldIOSPhone||ye.isOldAndroid)&&($e=!1),m.setAttribute("aria-hidden","false"),y.modal&&($e?m.style.position="fixed":(m.style.position="absolute",m.style.top=f.getScrollY()+"px")),void 0===he&&(x("initialLayout"),he=me=f.getScrollY());var n="pswp--open ";for(y.mainClass&&(n+=y.mainClass+" "),y.showHideOpacity&&(n+="pswp--animate_opacity "),n+=ue?"pswp--touch":"pswp--notouch",n+=y.preventSwiping?" pswp--preventswipe":"",n+=ye.animationName?" pswp--css_animation":"",n+=ye.svg?" pswp--svg":"",f.addClass(m,n),h.updateSize(),G=-1,qe=null,e=0;e<3;e++)it((e+G)*Ke.x,te[e].el.style);fe||f.bind(h.scrollWrap,V,h),a("initialZoomInEnd",function(){h.setContent(te[0],Y-1),h.setContent(te[2],Y+1),te[0].el.style.display=te[2].el.style.display="block",y.focus&&m.focus(),f.bind(document,"keydown",h),ye.transform&&f.bind(h.scrollWrap,"click",h),y.mouseUsed||f.bind(document,"mousemove",at),f.bind(window,"resize scroll orientationchange",h),x("bindEvents")}),h.setContent(te[1],Y),h.updateCurrItem(),x("afterInit"),$e||(Q=setInterval(function(){lt||De||ke||q!==h.currItem.initialZoomLevel||h.updateSize()},1e3)),f.addClass(m,"pswp--visible")}},close:function(){U&&(W=!(U=!1),x("close"),setTimeout(function(){f.unbind(window,"resize scroll orientationchange",h)},400),f.unbind(window,"scroll",K.scroll),f.unbind(document,"keydown",h),f.unbind(document,"mousemove",at),ye.transform&&f.unbind(h.scrollWrap,"click",h),De&&f.unbind(window,X,h),clearTimeout(xe),x("unbindEvents"),Kt(h.currItem,null,!0,h.destroy))},destroy:function(){x("destroy"),Ht&&clearTimeout(Ht),m.setAttribute("aria-hidden","true"),m.className=pe,Q&&clearInterval(Q),f.unbind(h.scrollWrap,V,h),f.unbind(window,"scroll",h),Dt(),E(),et={}},panTo:function(e,t,n){n||(e>Pe.min.x?e=Pe.min.x:e<Pe.max.x&&(e=Pe.max.x),t>Pe.min.y?t=Pe.min.y:t<Pe.max.y&&(t=Pe.max.y)),Be.x=e,Be.y=t,tt()},handleEvent:function(e){e=e||window.event,K[e.type]&&K[e.type](e)},goTo:function(e){var t;y.animateTransitions?Zt("swipe",80*e,{lastFlickDist:{x:80,y:0},lastFlickOffset:{x:80*e,y:0},lastFlickSpeed:{x:2*e,y:0}}):(t=(e=s(e))-Y,qe=t,Y=e,h.currItem=Xt(Y),Xe-=t,c(Ke.x*Xe),E(),Fe=!1,h.updateCurrItem())},next:function(){!y.loop&&Y===Vt()-1||(y.animateTransitions?h.goTo(-1):h.goTo(parseInt(Y)+1))},prev:function(){!y.loop&&0===Y||(y.animateTransitions?h.goTo(1):h.goTo(parseInt(Y)-1))},setItems:function(e){var t,n=e.length-1,i=h.currItem,o=h.items[ne];h.items.splice(0,h.items.length);for(var a=0;a<e.length;a++)h.items.push(e[a]),e[a]===i&&(t=a);t?Y=t:n<=Y&&(Y=n),ne=h.items[Y-1]===o?Y-1:Y,h.invalidateCurrItems(),h.updateSize(!0)},updateCurrZoomItem:function(e){var t;e&&x("beforeChange",0),Ze=te[1].el.children.length?(t=te[1].el.children[0],f.hasClass(t,"pswp__zoom-wrap")?t.style:null):null,Pe=h.currItem.bounds,$=q=h.currItem.initialZoomLevel,Be.x=Pe.center.x,Be.y=Pe.center.y,e&&x("afterChange")},invalidateCurrItems:function(){ee=!0;for(var e=0;e<3;e++)te[e].item&&(te[e].item.needsUpdate=!0)},updateCurrItem:function(e){if(0!==qe){var t,n=Math.abs(qe);if(!(e&&n<2)){h.currItem=Xt(Y),Qe=!1,x("beforeChange",qe),3<=n&&(G+=qe+(0<qe?-3:3),n=3);for(var i,o=0;o<n;o++)0<qe?(t=te.shift(),te[2]=t,it((++G+2)*Ke.x,t.el.style),h.setContent(t,Y-n+o+1+1)):(t=te.pop(),te.unshift(t),it(--G*Ke.x,t.el.style),h.setContent(t,Y+n-o-1-1));!Ze||1!==Math.abs(qe)||(i=Xt(ne)).initialZoomLevel!==q&&(Jt(i,Ge),Qt(i),nt(i)),qe=0,h.updateCurrZoomItem(),ne=Y,x("afterChange")}}},updateSize:function(e){if(!$e&&y.modal){var t=f.getScrollY();if(he!==t&&(m.style.top=t+"px",he=t),!e&&Je.x===window.innerWidth&&Je.y===window.innerHeight)return;Je.x=window.innerWidth,Je.y=window.innerHeight,m.style.height=Je.y+"px"}if(Ge.x=h.scrollWrap.clientWidth,Ge.y=h.scrollWrap.clientHeight,S(),Ke.x=Ge.x+Math.round(Ge.x*y.spacing),Ke.y=Ge.y,c(Ke.x*Xe),x("beforeResize"),void 0!==G){for(var n,i,o,a=0;a<3;a++)n=te[a],it((a+G)*Ke.x,n.el.style),o=Y+a-1,y.loop&&2<Vt()&&(o=s(o)),(i=Xt(o))&&(ee||i.needsUpdate||!i.bounds)?(h.cleanSlide(i),h.setContent(n,o),1===a&&(h.currItem=i,h.updateCurrZoomItem(!0)),i.needsUpdate=!1):-1===n.index&&0<=o&&h.setContent(n,o),i&&i.container&&(Jt(i,Ge),Qt(i),nt(i));ee=!1}$=q=h.currItem.initialZoomLevel,(Pe=h.currItem.bounds)&&(Be.x=Pe.center.x,Be.y=Pe.center.y,tt(!0)),x("resize")},zoomTo:function(t,e,n,i,o){e&&($=q,It.x=Math.abs(e.x)-Be.x,It.y=Math.abs(e.y)-Be.y,b(Ye,Be));var a=d(t,!1),r={};p("x",a,r,t),p("y",a,r,t);var l=q,s=Be.x,u=Be.y;I(r);function c(e){1===e?(q=t,Be.x=r.x,Be.y=r.y):(q=(t-l)*e+l,Be.x=(r.x-s)*e+s,Be.y=(r.y-u)*e+u),o&&o(e),tt(1===e)}n?A("customZoomTo",0,1,n,i||f.easing.sine.inOut,c):c(1)}},ut={},ct={},dt={},pt={},mt={},ft=[],ht={},yt=[],xt={},gt=0,vt=n(),wt=0,bt=n(),It=n(),Ct=n(),Dt=function(){Ee&&(de(Ee),Ee=null)},St=function(){De&&(Ee=ce(St),kt())},Tt=function(e,t){return!(!e||e===document)&&(!(e.getAttribute("class")&&-1<e.getAttribute("class").indexOf("pswp__scroll-wrap"))&&(t(e)?e:Tt(e.parentNode,t)))},Mt={},Et={},At={},Ot=[],kt=function(){if(Oe){var e,t,n,i,o,a,r=Oe.length;if(0!==r)if(b(ut,Oe[0]),dt.x=ut.x-pt.x,dt.y=ut.y-pt.y,ke&&1<r){if(pt.x=ut.x,pt.y=ut.y,!dt.x&&!dt.y&&(o=Oe[1],a=ct,o.x===a.x&&o.y===a.y))return;b(ct,Oe[1]),Te||(Te=!0,x("zoomGestureStarted"));var l=O(ut,ct),s=Ft(l);s>h.currItem.initialZoomLevel+h.currItem.initialZoomLevel/15&&(Ue=!0);var u,c=1,d=C(),p=D();s<d?y.pinchToClose&&!Ue&&$<=h.currItem.initialZoomLevel?(v(u=1-(d-s)/(d/1.2)),x("onPinchClose",u),_e=!0):(1<(c=(d-s)/d)&&(c=1),s=d-c*(d/3)):p<s&&(1<(c=(s-p)/(6*d))&&(c=1),s=p+c*d),c<0&&(c=0),P(ut,ct,vt),He.x+=vt.x-Ct.x,He.y+=vt.y-Ct.y,b(Ct,vt),Be.x=w("x",s),Be.y=w("y",s),be=q<s,q=s,tt()}else{if(!Le)return;if(ze&&(ze=!1,10<=Math.abs(dt.x)&&(dt.x-=Oe[0].x-mt.x),10<=Math.abs(dt.y)&&(dt.y-=Oe[0].y-mt.y)),pt.x=ut.x,pt.y=ut.y,0===dt.x&&0===dt.y)return;if("v"===Le&&y.closeOnVerticalDrag&&"fit"===y.scaleMode&&q===h.currItem.initialZoomLevel){He.y+=dt.y,Be.y+=dt.y;var m=Z();return Ie=!0,x("onVerticalDrag",m),v(m),void tt()}e=g(),t=ut.x,n=ut.y,50<e-ve&&((i=2<yt.length?yt.shift():{}).x=t,i.y=n,yt.push(i),ve=e),Me=!0,Pe=h.currItem.bounds,L("x",dt)||(L("y",dt),I(Be),tt())}}},Rt=function(){var t,n,i={lastFlickOffset:{},lastFlickDist:{},lastFlickSpeed:{},slowDownRatio:{},slowDownRatioReverse:{},speedDecelerationRatio:{},speedDecelerationRatioAbs:{},distanceOffset:{},backAnimDestination:{},backAnimStarted:{},calculateSwipeSpeed:function(e){n=1<yt.length?(t=g()-ve+50,yt[yt.length-2][e]):(t=g()-ge,mt[e]),i.lastFlickOffset[e]=pt[e]-n,i.lastFlickDist[e]=Math.abs(i.lastFlickOffset[e]),20<i.lastFlickDist[e]?i.lastFlickSpeed[e]=i.lastFlickOffset[e]/t:i.lastFlickSpeed[e]=0,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(t,e){i.backAnimStarted[t]||(Be[t]>Pe.min[t]?i.backAnimDestination[t]=Pe.min[t]:Be[t]<Pe.max[t]&&(i.backAnimDestination[t]=Pe.max[t]),void 0!==i.backAnimDestination[t]&&(i.slowDownRatio[t]=.7,i.slowDownRatioReverse[t]=1-i.slowDownRatio[t],i.speedDecelerationRatioAbs[t]<.05&&(i.lastFlickSpeed[t]=0,i.backAnimStarted[t]=!0,A("bounceZoomPan"+t,Be[t],i.backAnimDestination[t],e||300,f.easing.sine.out,function(e){Be[t]=e,tt()}))))},calculateAnimOffset:function(e){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,Be[e]+=i.distanceOffset[e])},panAnimLoop:function(){if(rt.zoomPan&&(rt.zoomPan.raf=ce(i.panAnimLoop),i.now=g(),i.timeDiff=i.now-i.lastNow,i.lastNow=i.now,i.calculateAnimOffset("x"),i.calculateAnimOffset("y"),tt(),i.calculateOverBoundsAnimOffset("x"),i.calculateOverBoundsAnimOffset("y"),i.speedDecelerationRatioAbs.x<.05&&i.speedDecelerationRatioAbs.y<.05))return Be.x=Math.round(Be.x),Be.y=Math.round(Be.y),tt(),void T("zoomPan")}};return i},Pt=function(e){if(e.calculateSwipeSpeed("y"),Pe=h.currItem.bounds,e.backAnimDestination={},e.backAnimStarted={},Math.abs(e.lastFlickSpeed.x)<=.05&&Math.abs(e.lastFlickSpeed.y)<=.05)return e.speedDecelerationRatioAbs.x=e.speedDecelerationRatioAbs.y=0,e.calculateOverBoundsAnimOffset("x"),e.calculateOverBoundsAnimOffset("y"),!0;M("zoomPan"),e.lastNow=g(),e.panAnimLoop()},Zt=function(e,t,n){var i,o,a,r;Fe||(gt=Y),"swipe"===e&&(a=n.lastFlickDist.x<10,30<t&&(a||20<n.lastFlickOffset.x)?o=-1:t<-30&&(a||n.lastFlickOffset.x<-20)&&(o=1)),o&&((Y+=o)<0?(Y=y.loop?Vt()-1:0,r=!0):Y>=Vt()&&(Y=y.loop?0:Vt()-1,r=!0),r&&!y.loop||(qe+=o,Xe-=o,i=!0));var l=Ke.x*Xe,s=Math.abs(l-bt.x),u=i||l>bt.x==0<n.lastFlickSpeed.x?(u=0<Math.abs(n.lastFlickSpeed.x)?s/Math.abs(n.lastFlickSpeed.x):333,u=Math.min(u,400),Math.max(u,250)):333;return gt===Y&&(i=!1),Fe=!0,x("mainScrollAnimStart"),A("mainScroll",bt.x,l,u,f.easing.cubic.out,c,function(){E(),Fe=!1,gt=-1,!i&&gt===Y||h.updateCurrItem(),x("mainScrollAnimComplete")}),i&&h.updateCurrItem(!0),i},Ft=function(e){return 1/Re*e*$},Lt=function(){var e=q,t=C(),n=D();q<t?e=t:n<q&&(e=n);var i,o=Ne;return _e&&!be&&!Ue&&q<t?h.close():(_e&&(i=function(e){v((1-o)*e+o)}),h.zoomTo(e,0,200,f.easing.cubic.out,i)),!0};o("Gestures",{publicMethods:{initGestures:function(){function e(e,t,n,i,o){ie=e+t,oe=e+n,ae=e+i,re=o?e+o:""}(se=ye.pointerEvent)&&ye.touch&&(ye.touch=!1),se?navigator.msPointerEnabled?e("MSPointer","Down","Move","Up","Cancel"):e("pointer","down","move","up","cancel"):ye.touch?(e("touch","start","move","end","cancel"),ue=!0):e("mouse","down","move","up"),X=oe+" "+ae+" "+re,V=ie,se&&!ue&&(ue=1<navigator.maxTouchPoints||1<navigator.msMaxTouchPoints),h.likelyTouchDevice=ue,K[ie]=z,K[oe]=_,K[ae]=N,re&&(K[re]=K[ae]),ye.touch&&(V+=" mousedown",X+=" mousemove mouseup",K.mousedown=K[ie],K.mousemove=K[oe],K.mouseup=K[ae]),ue||(y.allowPanToNext=!1)}}});function zt(){return{center:{x:0,y:0},max:{x:0,y:0},min:{x:0,y:0}}}function _t(e,t,n,i,o,a){t.loadError||i&&(t.imageAppended=!0,Qt(t,i,t===h.currItem&&Qe),n.appendChild(i),a&&setTimeout(function(){t&&t.loaded&&t.placeholder&&(t.placeholder.style.display="none",t.placeholder=null)},500))}function Nt(e){function t(){e.loading=!1,e.loaded=!0,e.autoSize&&(e.w=n.naturalWidth,e.h=n.naturalHeight,e.autoSize=!1,h.updateSize()),e.loadComplete?e.loadComplete(e):e.img=null,n.onload=n.onerror=null,n=null}e.loading=!0,e.loaded=!1;var n=e.img=f.createEl("pswp__img","img");return n.onload=t,n.onerror=function(){e.loadError=!0,t()},n.src=e.src,n}function Ut(e,t){return e.src&&e.loadError&&e.container&&(t&&f.resetEl(e.container),e.container.innerHTML=y.errorMsg.replace("%url%",e.src),1)}function Wt(){if($t.length){for(var e,t=0;t<$t.length;t++)(e=$t[t]).holder.index===e.index&&_t(e.index,e.item,e.baseDiv,e.img,0,e.clearPlaceholder);$t=[]}}var Ht,Yt,Bt,Gt,Xt,Vt,Kt=function(r,e,l,t){var s;Ht&&clearTimeout(Ht),Bt=Gt=!0,r.initialLayout?(s=r.initialLayout,r.initialLayout=null):s=y.getThumbBoundsFn&&y.getThumbBoundsFn(Y);function u(){T("initialZoom"),l?(h.template.removeAttribute("style"),h.bg.removeAttribute("style")):(v(1),e&&(e.style.display="block"),f.addClass(m,"pswp--animated-in")),x("initialZoom"+(l?"OutEnd":"InEnd")),t&&t(),Gt=!1}var c=l?y.hideAnimationDuration:y.showAnimationDuration;if(!c||!s||void 0===s.x)return x("initialZoom"+(l?"Out":"In")),l?m.style.opacity=0:(q=r.initialZoomLevel,b(Be,r.initialPosition),tt(),m.style.opacity=1,v(1)),void(c?setTimeout(function(){u()},c):u());var d,p;d=H,p=!h.currItem.src||h.currItem.loadError||y.showHideOpacity,r.miniImg&&(r.miniImg.style.webkitBackfaceVisibility="hidden"),l||(q=s.w/r.w,Be.x=s.x,Be.y=s.y-me,h[p?"template":"bg"].style.opacity=.001,tt()),M("initialZoom"),l&&!d&&f.removeClass(m,"pswp--animated-in"),p&&(l?f[(d?"remove":"add")+"Class"](m,"pswp--animate_opacity"):setTimeout(function(){f.addClass(m,"pswp--animate_opacity")},30)),Ht=setTimeout(function(){var t,n,i,o,a,e;x("initialZoom"+(l?"Out":"In")),l?(t=s.w/r.w,n=Be.x,i=Be.y,o=q,a=Ne,e=function(e){1===e?(q=t,Be.x=s.x,Be.y=s.y-he):(q=(t-o)*e+o,Be.x=(s.x-n)*e+n,Be.y=(s.y-he-i)*e+i),tt(),p?m.style.opacity=1-e:v(a-e*a)},d?A("initialZoom",0,1,c,f.easing.cubic.out,e,u):(e(1),Ht=setTimeout(u,c+20))):(q=r.initialZoomLevel,b(Be,r.initialPosition),tt(),v(1),p?m.style.opacity=1:v(1),Ht=setTimeout(u,c+20))},l?25:90)},qt={},$t=[],jt={index:0,errorMsg:'<div class="pswp__error-msg"><a href="%url%" target="_blank">The image</a> could not be loaded.</div>',forceProgressiveLoading:!1,preload:[1,1],getNumItemsFn:function(){return Yt.length}},Jt=function(e,t,n){if(!e.src||e.loadError)return e.w=e.h=0,e.initialZoomLevel=e.fitRatio=1,e.bounds=zt(),e.initialPosition=e.bounds.center,e.bounds;var i,o,a,r,l,s,u,c=!n;return c&&(e.vGap||(e.vGap={top:0,bottom:0}),x("parseVerticalMargin",e)),qt.x=t.x,qt.y=t.y-e.vGap.top-e.vGap.bottom,c&&(i=qt.x/e.w,o=qt.y/e.h,e.fitRatio=i<o?i:o,"orig"===(a=y.scaleMode)?n=1:"fit"===a&&(n=e.fitRatio),1<n&&(n=1),e.initialZoomLevel=n,e.bounds||(e.bounds=zt())),n?(l=(r=e).w*n,s=e.h*n,(u=r.bounds).center.x=Math.round((qt.x-l)/2),u.center.y=Math.round((qt.y-s)/2)+r.vGap.top,u.max.x=l>qt.x?Math.round(qt.x-l):u.center.x,u.max.y=s>qt.y?Math.round(qt.y-s)+r.vGap.top:u.center.y,u.min.x=l>qt.x?0:u.center.x,u.min.y=s>qt.y?r.vGap.top:u.center.y,c&&n===e.initialZoomLevel&&(e.initialPosition=e.bounds.center),e.bounds):void 0},Qt=function(e,t,n){var i,o,a,r;e.src&&(t=t||e.container.lastChild,i=n?e.w:Math.round(e.w*e.fitRatio),o=n?e.h:Math.round(e.h*e.fitRatio),t.naturalHeight&&t.naturalWidth&&(o<(a=i*(t.naturalHeight/t.naturalWidth))?(r=o*(t.naturalWidth/t.naturalHeight),t.style.marginLeft=(i-r)/2+"px",i=r):(t.style.marginTop=(o-a)/2+"px",o=a)),e.placeholder&&!e.loaded&&(e.placeholder.style.width=i+"px",e.placeholder.style.height=o+"px"),t.style.width=i+"px",t.style.height=o+"px")};o("Controller",{publicMethods:{lazyLoadItem:function(e){e=s(e);var t=Xt(e);t&&(!t.loaded&&!t.loading||ee)&&(x("gettingData",e,t),t.src&&Nt(t))},initController:function(){f.extend(y,jt,!0),h.items=Yt=e,Xt=h.getItemAt,Vt=y.getNumItemsFn,y.loop,Vt()<3&&(y.loop=!1),a("beforeChange",function(e){for(var t=y.preload,n=null===e||0<=e,i=Math.min(t[0],Vt()),o=Math.min(t[1],Vt()),a=1;a<=(n?o:i);a++)h.lazyLoadItem(Y+a);for(a=1;a<=(n?i:o);a++)h.lazyLoadItem(Y-a)}),a("initialLayout",function(){h.currItem.initialLayout=y.getThumbBoundsFn&&y.getThumbBoundsFn(Y)}),a("mainScrollAnimComplete",Wt),a("initialZoomInEnd",Wt),a("destroy",function(){for(var e,t=0;t<Yt.length;t++)(e=Yt[t]).container&&(e.container=null),e.placeholder&&(e.placeholder=null),e.img&&(e.img=null),e.preloader&&(e.preloader=null),e.loadError&&(e.loaded=e.loadError=!1);$t=null})},getItemAt:function(e){if(0<=e){var t=void 0!==Yt[e]&&Yt[e];return t&&t.autoSize&&(null==t.w&&(t.w=0),null==t.h&&(t.h=0)),t}return!1},allowProgressiveImg:function(){return y.forceProgressiveLoading||!ue||y.mouseUsed||1200<screen.width},setContent:function(t,n){y.loop&&(n=s(n));var e=h.getItemAt(t.index);e&&(e.container=null);var i,o,a,r,l=h.getItemAt(n);l?(x("gettingData",n,l),t.index=n,o=(t.item=l).container=f.createEl("pswp__zoom-wrap"),!l.src&&l.html&&(l.html.tagName?o.appendChild(l.html):o.innerHTML=l.html),Ut(l),Jt(l,Ge),!l.src||l.loadError||l.loaded?l.src&&!l.loadError&&((i=f.createEl("pswp__img","img")).style.opacity=1,i.src=l.src,Qt(l,i),_t(0,l,o,i)):(l.loadComplete=function(e){if(U){if(t&&t.index===n){if(Ut(e,!0))return e.loadComplete=e.img=null,Jt(e,Ge),nt(e),void(t.index===Y&&h.updateCurrZoomItem());e.imageAppended?!Gt&&e.placeholder&&(e.placeholder.style.display="none",e.placeholder=null):ye.transform&&(Fe||Gt)?$t.push({item:e,baseDiv:o,img:e.img,index:n,holder:t,clearPlaceholder:!0}):_t(0,e,o,e.img,0,!0)}e.loadComplete=null,e.img=null,x("imageLoadComplete",n,e)}},f.features.transform&&(a="pswp__img pswp__img--placeholder",a+=l.msrc?"":" pswp__img--placeholder--blank",r=f.createEl(a,l.msrc?"img":""),l.msrc&&(r.src=l.msrc),Qt(l,r),o.appendChild(r),l.placeholder=r),l.loading||Nt(l),h.allowProgressiveImg()&&(!Bt&&ye.transform?$t.push({item:l,baseDiv:o,img:l.img,index:n,holder:t}):_t(0,l,o,l.img,0,!0))),Bt||n!==Y?nt(l):(Ze=o.style,Kt(l,i||l.img)),f.resetEl(t.el),t.el.appendChild(o)):f.resetEl(t.el)},cleanSlide:function(e){e.img&&(e.img.onload=e.img.onerror=null),e.loaded=e.loading=e.img=e.imageAppended=!1}}});function en(e,t,n){var i=document.createEvent("CustomEvent"),o={origEvent:e,pointerType:n||"touch",releasePoint:t,target:e.target,rightClick:"mouse"===n&&3===e.which};i.initCustomEvent("pswpTap",!0,!0,o),e.target.dispatchEvent(i)}var tn,nn,on={};o("Tap",{publicMethods:{initTap:function(){a("firstTouchStart",h.onTapStart),a("touchRelease",h.onTapRelease),a("destroy",function(){on={},tn=null})},onTapStart:function(e){1<e.length&&(clearTimeout(tn),tn=null)},onTapRelease:function(e,t){var n,i;if(t&&(!Me&&!Se&&!lt&&h.container.contains(e.target))){var o=t;if(tn&&(clearTimeout(tn),tn=null,n=o,i=on,Math.abs(n.x-i.x)<25&&Math.abs(n.y-i.y)<25))return void x("doubleTap",o);if("mouse"===t.type)return void en(e,t,"mouse");var a=e.target.tagName.toUpperCase();if("A"===a)return;if("BUTTON"===a||f.hasClass(e.target,"pswp__single-tap"))return void en(e,t);b(on,o),tn=setTimeout(function(){en(e,t),tn=null},300)}}}}),o("DesktopZoom",{publicMethods:{initDesktopZoom:function(){fe||(ue?a("mouseUsed",function(){h.setupDesktopZoom()}):h.setupDesktopZoom(!0))},setupDesktopZoom:function(e){nn={};var t="wheel mousewheel DOMMouseScroll";a("bindEvents",function(){f.bind(m,t,h.handleMouseWheel)}),a("unbindEvents",function(){nn&&f.unbind(m,t,h.handleMouseWheel)}),h.mouseZoomedIn=!1;function n(){h.mouseZoomedIn&&(f.removeClass(m,"pswp--zoomed-in"),h.mouseZoomedIn=!1),q<1?f.addClass(m,"pswp--zoom-allowed"):f.removeClass(m,"pswp--zoom-allowed"),o()}var i,o=function(){i&&(f.removeClass(m,"pswp--dragging"),i=!1)};a("resize",n),a("afterChange",n),a("pointerDown",function(){h.mouseZoomedIn&&(i=!0,f.addClass(m,"pswp--dragging"))}),a("pointerUp",o),e||n()},handleMouseWheel:function(e){if(q<=h.currItem.fitRatio)return y.modal&&(!y.closeOnScroll||lt||De?e.preventDefault():le&&2<Math.abs(e.deltaY)&&(H=!0,h.close())),!0;if(e.stopPropagation(),nn.x=0,"deltaX"in e)1===e.deltaMode?(nn.x=18*e.deltaX,nn.y=18*e.deltaY):(nn.x=e.deltaX,nn.y=e.deltaY);else if("wheelDelta"in e)e.wheelDeltaX&&(nn.x=-.16*e.wheelDeltaX),e.wheelDeltaY?nn.y=-.16*e.wheelDeltaY:nn.y=-.16*e.wheelDelta;else{if(!("detail"in e))return;nn.y=e.detail}d(q,!0);var t=Be.x-nn.x,n=Be.y-nn.y;(y.modal||t<=Pe.min.x&&t>=Pe.max.x&&n<=Pe.min.y&&n>=Pe.max.y)&&e.preventDefault(),h.panTo(t,n)},toggleDesktopZoom:function(e){e=e||{x:Ge.x/2+Ve.x,y:Ge.y/2+Ve.y};var t=y.getDoubleTapZoom(!0,h.currItem),n=q===t;h.mouseZoomedIn=!n,h.zoomTo(n?h.currItem.initialZoomLevel:t,e,333),f[(n?"remove":"add")+"Class"](m,"pswp--zoomed-in")}}});function an(){return gn.hash.substring(1)}function rn(){sn&&clearTimeout(sn),cn&&clearTimeout(cn)}function ln(){var e=an(),t={};if(e.length<5)return t;var n,i=e.split("&");for(a=0;a<i.length;a++){i[a]&&((n=i[a].split("=")).length<2||(t[n[0]]=n[1]))}if(y.galleryPIDs){for(var o=t.pid,a=t.pid=0;a<Yt.length;a++)if(Yt[a].pid===o){t.pid=a;break}}else t.pid=parseInt(t.pid,10)-1;return t.pid<0&&(t.pid=0),t}var sn,un,cn,dn,pn,mn,fn,hn,yn,xn,gn,vn,wn={history:!0,galleryUID:1},bn=function(){var e,t,n,i;cn&&clearTimeout(cn),lt||De?cn=setTimeout(bn,500):(dn?clearTimeout(un):dn=!0,e=Y+1,(t=Xt(Y)).hasOwnProperty("pid")&&(e=t.pid),n=fn+"&gid="+y.galleryUID+"&pid="+e,hn||-1===gn.hash.indexOf(n)&&(xn=!0),i=gn.href.split("#")[0]+"#"+n,vn?"#"+n!==window.location.hash&&history[hn?"replaceState":"pushState"]("",document.title,i):hn?gn.replace(i):gn.hash=n,hn=!0,un=setTimeout(function(){dn=!1},60))};o("History",{publicMethods:{initHistory:function(){var e,t;f.extend(y,wn,!0),y.history&&(gn=window.location,hn=yn=xn=!1,fn=an(),vn="pushState"in history,-1<fn.indexOf("gid=")&&(fn=(fn=fn.split("&gid=")[0]).split("?gid=")[0]),a("afterChange",h.updateURL),a("unbindEvents",function(){f.unbind(window,"hashchange",h.onHashChange)}),e=function(){mn=!0,yn||(xn?history.back():fn?gn.hash=fn:vn?history.pushState("",document.title,gn.pathname+gn.search):gn.hash=""),rn()},a("unbindEvents",function(){H&&e()}),a("destroy",function(){mn||e()}),a("firstUpdate",function(){Y=ln().pid}),-1<(t=fn.indexOf("pid="))&&"&"===(fn=fn.substring(0,t)).slice(-1)&&(fn=fn.slice(0,-1)),setTimeout(function(){U&&f.bind(window,"hashchange",h.onHashChange)},40))},onHashChange:function(){if(an()===fn)return yn=!0,void h.close();dn||(pn=!0,h.goTo(ln().pid),pn=!1)},updateURL:function(){rn(),pn||(hn?sn=setTimeout(bn,800):bn())}}}),f.extend(h,st)}});
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- sigal = sigal:main