PageSourceSearch

https://www.emoryhealthcare.org/-/media/Base-Themes/Juxtapose-Them…/optimized-min.js?t=20230210T064106Z

js emoryhealthcare.org collected 2026-10-01 11:30:16 UTC 12,779 bytes, 1 lines download raw bytes

1(function(n,t){function c(n,t){var i=this;this.image=new Image;this.loaded=!1;this.image.onload=function(){i.loaded=!0;t._onLoaded()};this.image.src=n.src;this.image.alt=n.alt||"";this.label=n.label||!1;this.credit=n.credit||!1}function f(n,t){var i=this;this.image=new Image;this.loaded=!1;this.image.onload=function(){i.loaded=!0;t._onLoaded()};this.flickrID=this.getFlickrID(n.src);this.callFlickrAPI(this.flickrID,i);this.label=n.label||!1;this.credit=n.credit||!1}function e(n){if(n.naturalWidth&&n.naturalHeight)return{width:n.naturalWidth,height:n.naturalHeight};var t=new Image;return t.src=n.src,{width:t.width,height:t.height}}function o(n){return{width:e(n).width,height:e(n).height,aspect:function(){return this.width/this.height}}}function r(n,t){n.classList?n.classList.add(t):n.className+=" "+t}function s(n,t){n.className=n.className.replace(/(\S+)\s*/g,function(n,i){return i===t?"":n}).replace(/^\s+/,"")}function l(t,i){n.body.textContent?t.textContent=i:t.innerText=i}function a(n){return t.getComputedStyle?{width:parseInt(getComputedStyle(n).width,10),height:parseInt(getComputedStyle(n).height,10)}:(w=n.getBoundingClientRect().right-n.getBoundingClientRect().left,h=n.getBoundingClientRect().bottom-n.getBoundingClientRect().top,{width:parseInt(w,10)||0,height:parseInt(h,10)||0})}function k(t){return t.pageX?t.pageX:t.touches?t.touches[0].pageX:t.clientX+n.body.scrollLeft+n.documentElement.scrollLeft}function d(t){return t.pageY?t.pageY:t.touches?t.touches[0].pageY:t.clientY+n.body.scrollTop+n.documentElement.scrollTop}function v(n){if(n.match(/flic.kr\/.+/i))return!0;var t=n.indexOf("flickr.com/photos/");return t==-1?!1:!0}function g(n){var t="123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ",f=t.length,i,r,u;if(typeof n!="string")throw'"base58Decode" only accepts strings.';for(i=0;n;){if(r=t.indexOf(n[0]),r<0)throw'"base58Decode" can\'t find "'+n[0]+'" in the alphabet: "'+t+'"';u=n.length-1;i+=r*Math.pow(f,u);n=n.substring(1)}return i.toString()}function nt(t,i){if(typeof i=="string"||typeof i=="number")leftPercent=parseInt(i,10);else{var r=t.getBoundingClientRect(),u={top:r.top+n.body.scrollTop+n.documentElement.scrollTop,left:r.left+n.body.scrollLeft+n.documentElement.scrollLeft},f=t.offsetWidth,e=k(i),o=e-u.left;leftPercent=o/f*100}return leftPercent}function tt(t,i){if(typeof i=="string"||typeof i=="number")topPercent=parseInt(i,10);else{var r=t.getBoundingClientRect(),u={top:r.top+n.body.scrollTop+n.documentElement.scrollTop,left:r.left+n.body.scrollLeft+n.documentElement.scrollLeft},f=t.offsetHeight,e=d(i),o=e-u.top;topPercent=o/f*100}return topPercent}function it(n){return typeof n!="string"?Boolean(n):!(n==="false"||n==="")}function p(n,t,i){this.selector=n;var r;this.options={animate:!0,showLabels:!0,showCredits:!0,makeResponsive:!0,startingPosition:"50%",mode:"horizontal",callback:null};for(r in this.options)r in i&&(this.options[r]=r in y?it(i[r]):i[r]);t.length==2?(this.imgBefore=v(t[0].src)?new f(t[0],this):new c(t[0],this),this.imgAfter=v(t[1].src)?new f(t[1],this):new c(t[1],this)):console.warn("The images parameter takes two Image objects.");this.options.showCredits=this.imgBefore.credit||this.imgAfter.credit?!0:!1}var i={sliders:[],OPTIMIZATION_ACCEPTED:1,OPTIMIZATION_WAS_CONSTRAINED:2},b="d90fc2d1f4acc584e08b8eaea5bf4d6c",u=["Large","Medium"],y;f.prototype={getFlickrID:function(n){var i;if(n.match(/flic.kr\/.+/i))return i=n.split("/").slice(-1)[0],g(i);var r=n.indexOf("flickr.com/photos/"),u=r+18,t=n.substr(u);return t.indexOf("/")==-1?null:(t.indexOf("/")===0&&(t=t.substr(1)),id=t.split("/")[1])},callFlickrAPI:function(n,t){var r="https://api.flickr.com/services/rest/?method=flickr.photos.getSizes&api_key="+b+"&photo_id="+n+"&format=json&nojsoncallback=1",i=new XMLHttpRequest;i.open("GET",r,!0);i.onload=function(){if(i.status>=200&&i.status<400){data=JSON.parse(i.responseText);var n=t.bestFlickrUrl(data.sizes.size);t.setFlickrImage(n)}else console.error("There was an error getting the picture from Flickr")};i.onerror=function(){console.error("There was an error getting the picture from Flickr")};i.send()},setFlickrImage:function(n){this.image.src=n},bestFlickrUrl:function(n){for(var t,r={},i=0;i<n.length;i++)r[n[i].label]=n[i].source;for(t=0;t<u.length;t++)if(u[t]in r)return r[u[t]];return n[0].source}};y={animate:!0,showLabels:!0,showCredits:!0,makeResponsive:!0};p.prototype={updateSlider:function(n,t){var i,u;i=this.options.mode==="vertical"?tt(this.slider,n):nt(this.slider,n);i=i.toFixed(2)+"%";leftPercentNum=parseFloat(i);u=100-leftPercentNum+"%";leftPercentNum>0&&leftPercentNum<100&&(s(this.handle,"transition"),s(this.rightImage,"transition"),s(this.leftImage,"transition"),this.options.animate&&t&&(r(this.handle,"transition"),r(this.leftImage,"transition"),r(this.rightImage,"transition")),this.options.mode==="vertical"?(this.handle.style.top=i,this.leftImage.style.height=i,this.rightImage.style.height=u):(this.handle.style.left=i,this.leftImage.style.width=i,this.rightImage.style.width=u),this.sliderPosition=i)},getPosition:function(){return this.sliderPosition},displayLabel:function(t,i){label=n.createElement("div");label.className="jx-label";label.setAttribute("tabindex",0);l(label,i);t.appendChild(label)},displayCredits:function(){credit=n.createElement("div");credit.className="jx-credit";text="<em>Photo Credits:<\/em>";this.imgBefore.credit&&(text+=" <em>Before<\/em> "+this.imgBefore.credit);this.imgAfter.credit&&(text+=" <em>After<\/em> "+this.imgAfter.credit);credit.innerHTML=text;this.wrapper.appendChild(credit)},setStartingPosition:function(n){this.options.startingPosition=n},checkImages:function(){return o(this.imgBefore.image).aspect()==o(this.imgAfter.image).aspect()?!0:!1},calculateDims:function(n,t){var i=o(this.imgBefore.image).aspect();return n?t=n/i:t&&(n=t*i),{width:n,height:t,ratio:i}}
1,responsivizeIframe:function(n){return n.height<t.innerHeight?n.ratio>=1&&(this.wrapper.style.paddingTop=parseInt((t.innerHeight-n.height)/2)+"px"):n.height>t.innerHeight&&(n=this.calculateDims(0,t.innerHeight),this.wrapper.style.paddingLeft=parseInt((t.innerWidth-n.width)/2)+"px"),this.options.showCredits&&(n.height-=13),n},setWrapperDimensions:function(){var i=a(this.wrapper).width,r=a(this.wrapper).height,n=this.calculateDims(i,r);t.location===t.parent.location||this.options.makeResponsive||(n=this.responsivizeIframe(n));this.wrapper.style.height=parseInt(n.height)+"px";this.wrapper.style.width=parseInt(n.width)+"px"},optimizeWrapper:function(n){var t=i.OPTIMIZATION_ACCEPTED;return this.imgBefore.image.naturalWidth>=n&&this.imgAfter.image.naturalWidth>=n?(this.wrapper.style.width=n+"px",t=i.OPTIMIZATION_WAS_CONSTRAINED):this.wrapper.style.width=this.imgAfter.image.naturalWidth<n?this.imgAfter.image.naturalWidth+"px":this.imgBefore.image.naturalWidth+"px",this.setWrapperDimensions(),t},_onLoaded:function(){this.imgBefore&&this.imgBefore.loaded===!0&&this.imgAfter&&this.imgAfter.loaded===!0&&(this.wrapper=n.querySelector(this.selector),r(this.wrapper,"juxtapose"),this.wrapper.style.width=e(this.imgBefore.image).width,this.setWrapperDimensions(),this.slider=n.createElement("div"),this.slider.className="jx-slider",this.wrapper.appendChild(this.slider),this.options.mode!="horizontal"&&r(this.slider,this.options.mode),this.handle=n.createElement("div"),this.handle.className="jx-handle",this.rightImage=n.createElement("div"),this.rightImage.className="jx-image jx-right",this.rightImage.appendChild(this.imgAfter.image),this.leftImage=n.createElement("div"),this.leftImage.className="jx-image jx-left",this.leftImage.appendChild(this.imgBefore.image),this.labCredit=n.createElement("a"),this.labCredit.setAttribute("href","https://juxtapose.knightlab.com"),this.labCredit.setAttribute("target","_blank"),this.labCredit.setAttribute("rel","noopener"),this.labCredit.className="jx-knightlab",this.labLogo=n.createElement("div"),this.labLogo.className="knightlab-logo",this.labCredit.appendChild(this.labLogo),this.projectName=n.createElement("span"),this.projectName.className="juxtapose-name",l(this.projectName,"JuxtaposeJS"),this.labCredit.appendChild(this.projectName),this.slider.appendChild(this.handle),this.slider.appendChild(this.leftImage),this.slider.appendChild(this.rightImage),this.slider.appendChild(this.labCredit),this.leftArrow=n.createElement("div"),this.rightArrow=n.createElement("div"),this.control=n.createElement("div"),this.controller=n.createElement("div"),this.leftArrow.className="jx-arrow jx-left",this.rightArrow.className="jx-arrow jx-right",this.control.className="jx-control",this.controller.className="jx-controller",this.controller.setAttribute("tabindex",0),this.controller.setAttribute("role","slider"),this.controller.setAttribute("aria-valuenow",50),this.controller.setAttribute("aria-valuemin",0),this.controller.setAttribute("aria-valuemax",100),this.handle.appendChild(this.leftArrow),this.handle.appendChild(this.control),this.handle.appendChild(this.rightArrow),this.control.appendChild(this.controller),this._init())},_init:function(){this.checkImages()===!1&&console.warn(this,"Check that the two images have the same aspect ratio for the slider to work correctly.");this.updateSlider(this.options.startingPosition,!1);this.options.showLabels===!0&&(this.imgBefore.label&&this.displayLabel(this.leftImage,this.imgBefore.label),this.imgAfter.label&&this.displayLabel(this.rightImage,this.imgAfter.label));this.options.showCredits===!0&&this.displayCredits();var n=this;t.addEventListener("resize",function(){n.setWrapperDimensions()});this.slider.addEventListener("mousedown",function(i){i=i||t.event;i.preventDefault();n.updateSlider(i,!0);animate=!0;this.addEventListener("mousemove",function(i){i=i||t.event;i.preventDefault();animate&&n.updateSlider(i,!1)});this.addEventListener("mouseup",function(n){n=n||t.event;n.preventDefault();n.stopPropagation();this.removeEventListener("mouseup",arguments.callee);animate=!1})});this.slider.addEventListener("touchstart",function(i){i=i||t.event;i.preventDefault();i.stopPropagation();n.updateSlider(i,!0);this.addEventListener("touchmove",function(i){i=i||t.event;i.preventDefault();i.stopPropagation();n.updateSlider(event,!1)})});this.handle.addEventListener("keydown",function(i){var u,r,f,e;i=i||t.event;u=i.which||i.keyCode;r=parseFloat(this.style.left);u==37&&(r=r-1,f=parseFloat(this.style.left)-1,n.updateSlider(f,!1),n.controller.setAttribute("aria-valuenow",r));u==39&&(r=r+1,e=parseFloat(this.style.left)+1,n.updateSlider(e,!1),n.controller.setAttribute("aria-valuenow",r))});this.leftImage.addEventListener("keydown",function(t){var i=t.which||t.keyCode;(i==13||i==32)&&(n.updateSlider("90%",!0),n.controller.setAttribute("aria-valuenow",90))});this.rightImage.addEventListener("keydown",function(t){var i=t.which||t.keyCode;(i==13||i==32)&&(n.updateSlider("10%",!0),n.controller.setAttribute("aria-valuenow",10))});i.sliders.push(this);this.options.callback&&typeof this.options.callback=="function"&&this.options.callback(this)}};i.makeSlider=function(n,t){typeof t=="undefined"&&(t=i.sliders.length);var u=n,f=u.querySelectorAll("img"),e={};u.getAttribute("data-animate")&&(e.animate=u.getAttribute("data-animate"));u.getAttribute("data-showlabels")&&(e.showLabels=u.getAttribute("data-showlabels"));u.getAttribute("data-showcredits")&&(e.showCredits=u.getAttribute("data-showcredits"));u.getAttribute("data-startingposition")&&(e.startingPosition=u.getAttribute("data-startingposition"));u.getAttribute("data-mode")&&(e.mode=u.getAttribute("data-mode"));u.getAttribute("data-makeresponsive")&&(e.mode=u.getAttribute("data-makeresponsive"));specificClass="juxtapose-"+t;r(n,specificClass);selector="."+specificClass;u.innerHTML?u.innerHTML="":u.innerText="";slider=new i.JXSlider(selector,[{src:f[0].src,label:f[0].getAttribute("data-label"),credit:f[0].getAttribute("data-credit"),alt:f[0].alt},{src:f[1].src,label:f[1].getAttribute("data-label"),credit:f[1].getAttribute("data-credit"),alt:f[1].alt}],e)};i.scanPage=function(){for(var r=n.querySelectorAll(".juxtapose"),t=0;t<r.length;t++)i.makeSlider(r[t],t)};i.JXSlider=p;t.juxtapose=i;i.scanPage()})(document,window);window.addEventListener||function(n,t,i,r,u,f,e){n[r]=t[r]=i[r]=function(n,t){var i=this;e.unshift([i,n,t,function(n){n.currentTarget=i;n.preventDefault=function(){n.returnValue=!1};n.stopPropagation=function(){n.cancelBubble=!0};n.target=n.srcElement||i;t.call(i,n)}]);this.attachEvent("on"+n,e[0][3])};n[u]=t[u]=i[u]=function(n,t){for(var r=0,i;i=e[r];++r)if(i[0]==this&&i[1]==n&&i[2]==t)return this.detachEvent("on"+n,e.splice(r,1)[0][3])};n[f]=t[f]=i[f]=function(n){return this.fireEvent("on"+n.type,n)}}(Window.prototype,HTMLDocument.prototype,Element.prototype,"addEventListener","removeEventListener","dispatchEvent",[])

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.