1(function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.Tobi=t()})(this,function(){"use strict";var e=function(e){var t=function(e){var t={selector:".lightbox",captions:!0,captionsSelector:"img",captionAttribute:"alt",nav:"auto",navText:["‹","›"],close:!0,closeText:"×",counter:!0,keyboard:!0,zoom:!0,zoomText:"+",docClose:!1,swipeClose:!0,scroll:!1,draggable:!0,threshold:20};return e&&Object.keys(e).forEach(function(n){t[n]=e[n]}),t},n={},i=null,o=[],a=0,s=null,r=null,d=[],c=0,l={},u=!1,m=null,b=document.createElement("div");b.setAttribute("role","dialog"),b.setAttribute("aria-hidden","true"),b.classList.add("tobi-overlay"),document.getElementsByTagName("body")[0].appendChild(b);var p=document.createElement("div");p.classList.add("tobi-slider"),b.appendChild(p);var f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("aria-label","Previous"),b.appendChild(f);var v=document.createElement("button");v.setAttribute("type","button"),v.setAttribute("aria-label","Next"),b.appendChild(v);var g=document.createElement("button");g.setAttribute("type","button"),g.setAttribute("aria-label","Close"),b.appendChild(g);var h=document.createElement("div");h.classList.add("tobi-counter"),b.appendChild(h);var E=function(){var e=document.documentElement.style;return"string"==typeof e.transform?"transform":"WebkitTransform"},L=function(e,t){if("undefined"!=typeof o[e]&&"undefined"!=typeof d[e]){if(!d[e].getElementsByTagName("img")[0].hasAttribute("data-src"))return void(t&&t());var n=d[e].getElementsByTagName("figure")[0],i=n.getElementsByTagName("img")[0],a=n.getElementsByTagName("figcaption")[0];i.onload=function(){var e=n.querySelector(".tobi-loader");n.removeChild(e),i.style.opacity="1",a&&(a.style.opacity="1")},i.setAttribute("src",i.getAttribute("data-src")),i.removeAttribute("data-src"),t&&t()}},y=function(){var e=100*-c+"%";p.style[i]="translate3d("+e+", 0, 0)"},A=function(){h.innerHTML=c+1+"/"+r},T=function(e){n.nav?(f.disabled=!1,v.disabled=!1,c===r-1?v.disabled=!0:0===c&&(f.disabled=!0),"none"!==e||v.disabled?"none"===e&&v.disabled&&!f.disabled?f.focus():v.disabled||"right"!==e?v.disabled&&"right"===e&&!f.disabled?f.focus():f.disabled||"left"!==e?f.disabled&&"left"===e&&!v.disabled&&v.focus():f.focus():v.focus():v.focus()):n.close&&g.focus()},k=function(e){L(e)},C=function(){c<r-1&&(c++,y(),A(),T("right"),k(c+1))},w=function(){c>0&&(c--,y(),A(),T("left"),k(c-1))},X=function(e){var t=null,i=null,o=null,s=[],c=null,l=[],u=document.createElement("div");u.classList.add("tobi-slide"),u.id="tobi-slide-"+a,t=document.createElement("div"),t.classList.add("tobi-figure-wrapper"),t.id="tobi-figure-wrapper-"+a,i=document.createElement("figure"),i.innerHTML='<div class="tobi-loader"></div>',o=document.createElement("img"),o.style.opacity="0",e.getElementsByTagName("img")[0]&&e.getElementsByTagName("img")[0].alt?o.alt=e.getElementsByTagName("img")[0].alt:o.alt="",o.setAttribute("src",""),o.setAttribute("data-src",e.href),i.appendChild(o),n.captions&&(c=document.createElement("figcaption"),c.style.opacity="0","self"===n.captionsSelector&&e.getAttribute(n.captionAttribute)?c.innerHTML=e.getAttribute(n.captionAttribute):"img"===n.captionsSelector&&e.getElementsByTagName("img")[0].getAttribute(n.captionAttribute)&&(c.innerHTML=e.getElementsByTagName("img")[0].getAttribute(n.captionAttribute)),c.innerHTML&&(i.id="tobi-figure-"+a,c.id="tobi-figcaption-"+a,i.appendChild(c),s.push("tobi-figure-"+a),l.push("tobi-figcaption-"+a),++a)),t.appendChild(i),u.appendChild(t),p.appendChild(u),d.push(u),0!==a&&(b.setAttribute("aria-labelledby",s.join(" ")),b.setAttribute("aria-describedby",l.join(" "))),!n.nav||1===r||"auto"===n.nav&&"ontouchstart"in window?(f.classList.add("hide"),v.classList.add("hide")):(f.classList.remove("hide"),v.classList.remove("hide"),f.innerHTML=n.navText[0],v.innerHTML=n.navText[1]),n.counter&&1!==r||h.classList.add("hide"),n.close?g.innerHTML=n.closeText:g.classList.add("hide"),n.draggable&&(p.style.cursor="-webkit-grab")},x=function(e){"false"!==b.getAttribute("aria-hidden")&&(n.scroll||(document.documentElement.classList.add("tobi--is-open"),document.body.classList.add("tobi--is-open")),m=document.activeElement,c=e,B(),I(),L(c,function(){k(c+1),k(c-1)}),y(),A(),b.setAttribute("aria-hidden","false"),T("none"))},N=function(){"true"!==b.getAttribute("aria-hidden")&&(n.scroll||(document.documentElement.classList.remove("tobi--is-open"),document.body.classList.remove("tobi--is-open")),U(),b.setAttribute("aria-hidden","true"),m.focus())},B=function(){l={startX:0,endX:0,startY:0,endY:0}},M=function(){var e=l.endX-l.startX,t=l.endY-l.startY,i=Math.abs(e),o=Math.abs(t);e>0&&i>n.threshold?w():e<0&&i>n.threshold?C():t<0&&o>n.threshold&&n.swipeClose&&N()},H=function(e){this===f?w():this===v?C():(this===g||this===b&&e.target.id.indexOf("tobi-figure-wrapper")!==-1)&&N(),e.preventDefault()},Y=function(e){switch(e.keyCode){case 37:w();break;case 39:C();break;case 27:N()}},P=function(e){e.stopPropagation(),u=!0,l.startX=e.touches[0].pageX,l.startY=e.touches[0].pageY},z=function(e){e.preventDefault(),e.stopPropagation(),u&&(l.endX=e.touches[0].pageX,l.endY=e.touches[0].pageY)},D=function(e){e.stopPropagation(),u=!1,l.endX&&M(),B()},S=function(e){e.preventDefault(),e.stopPropagation(),u=!0,l.startX=e.pageX},j=function(e){e.stopPropagation(),u=!1,p.style.cursor="-webkit-grab",l.endX&&M(),B()},q=function(e){e.preventDefault(),u&&(l.endX=e.pageX,p.style.cursor="-webkit-grabbing")},O=function(e){u&&(u=!1,p.style.cursor="-webkit-grab",l.endX=e.pageX,M(),B())},_=function(e){"false"!==b.getAttribute("aria-hidden")||b.contains(e.target)||(e.stopPropagation(),T("none"))},I=function(){n.keyboard&&document.addEventListener("keydown",Y),n.docClose&&b.addEventListener("click",H),f.addEventListener("click",H),v.addEventListener("click",H),g.addEventListener("click",H),n.draggable&&(b.addEventListener("touchstart",P),b.addEventListener("touchmove",z),b.addEventListener("touchend",D),b.addEventListener("mousedown",S
1),b.addEventListener("mouseup",j),b.addEventListener("mouseleave",O),b.addEventListener("mousemove",q)),document.addEventListener("focus",_,!0)},U=function(){n.keyboard&&document.removeEventListener("keydown",Y),n.docClose&&b.removeEventListener("click",H),f.removeEventListener("click",H),v.removeEventListener("click",H),g.removeEventListener("click",H),n.draggable&&(b.removeEventListener("touchstart",P),b.removeEventListener("touchmove",z),b.removeEventListener("touchend",D),b.removeEventListener("mousedown",S),b.removeEventListener("mouseup",j),b.removeEventListener("mouseleave",O),b.removeEventListener("mousemove",q)),document.removeEventListener("focus",_)},W=function(e){if(o.indexOf(e)===-1){if(o.push(e),e.classList.add("tobi"),n.zoom&&e.getElementsByTagName("img")[0]){var t=document.createElement("div");t.classList.add("tobi__zoom-icon"),t.innerHTML=n.zoomText,e.classList.add("tobi--zoom"),e.appendChild(t)}e.addEventListener("click",function(e){e.preventDefault(),x(o.indexOf(this))}),X(e)}},F=function(e){return n=t(e),i=E(),s=document.querySelectorAll(n.selector),(r=s.length)?void[].forEach.call(s,function(e){W(e)}):void console.log("Ups, I can't find the selector "+n.selector+".")},G=function(e){W(e),r++};return F(e),{prev:w,next:C,open:x,close:N,add:G}};return e});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.