PageSourceSearch

https://www.bluematador.com/hubfs/hub_generated/template_assets/1/…/1743237162781/template_chocolat.min.js

js bluematador.com collected 2026-10-02 04:58:00 UTC 11,887 bytes, 1 lines download raw bytes

1!function(a){"object"==typeof module&&"object"==typeof module.exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(d,g,c,f){function j(l,a){var k=this;return this.settings=a,this.elems={},this.element=l,this._cssClasses=["chocolat-open","chocolat-in-container","chocolat-cover","chocolat-zoomable","chocolat-zoomed"],!this.settings.setTitle&&l.data("chocolat-title")&&(this.settings.setTitle=l.data("chocolat-title")),this.element.find(this.settings.imageSelector).each(function(){k.settings.images.push({title:d(this).attr("title"),src:d(this).attr(k.settings.imageSource),height:!1,width:!1})}),this.element.find(this.settings.imageSelector).each(function(i){d(this).off("click.chocolat").on("click.chocolat",function(e){k.init(i),e.preventDefault()})}),this}var h=0;d.extend(j.prototype,{init:function(a){return this.settings.initialized||(this.setDomContainer(),this.markup(),this.events(),this.settings.lastImage=this.settings.images.length-1,this.settings.initialized=!0),this.settings.afterInitialize.call(this),this.load(a)},preload:function(l){var a=d.Deferred();if("undefined"!=typeof this.settings.images[l]){var k=new Image;return k.onload=function(){a.resolve(k)},k.src=this.settings.images[l].src,a}},load:function(l){var a=this;if(this.settings.fullScreen&&this.openFullScreen(),this.settings.currentImage!==l){this.elems.overlay.fadeIn(this.settings.duration),this.elems.wrapper.fadeIn(this.settings.duration),this.elems.domContainer.addClass("chocolat-open"),this.settings.timer=setTimeout(function(){"undefined"!=typeof a.elems&&d.proxy(a.elems.loader.fadeIn(),a)},this.settings.duration);var k=this.preload(l).then(function(e){return a.place(l,e)}).then(function(e){return a.appear(l)}).then(function(e){a.zoomable(),a.settings.afterImageLoad.call(a)}),m=l+1;return"undefined"!=typeof this.settings.images[m]&&this.preload(m),k}},place:function(k,m){var a,l=this;return this.settings.currentImage=k,this.description(),this.pagination(),this.arrows(),this.storeImgSize(m,k),a=this.fit(k,l.elems.wrapper),this.center(a.width,a.height,a.left,a.top,0)},center:function(k,m,a,l,o){return this.elems.content.css("overflow","visible").animate({width:k,height:m,left:a,top:l},o).promise()},appear:function(a){var i=this;clearTimeout(this.settings.timer),this.elems.loader.stop().fadeOut(300,function(){i.elems.img.attr("src",i.settings.images[a].src)})},fit:function(B,y){var G,v,t=this.settings.images[B].height,E=this.settings.images[B].width,x=d(y).height(),k=d(y).width(),D=this.getOutMarginH(),z=this.getOutMarginW(),w=k-z,A=x-D,F=A/w,C=x/k,q=t/E;return"cover"==this.settings.imageSize?q<C?(G=x,v=G/q):(v=k,G=v*q):"native"==this.settings.imageSize?(G=t,v=E):(q>F?(G=A,v=G/q):(v=w,G=v*q),"default"===this.settings.imageSize&&(v>=E||G>=t)&&(v=E,G=t)),{height:G,width:v,top:(x-G)/2,left:(k-v)/2}},change:function(a){this.zoomOut(0),this.zoomable();var i=this.settings.currentImage+parseInt(a);if(i>this.settings.lastImage){if(this.settings.loop){return this.load(0)}}else{if(!(i<0)){return this.load(i)}if(this.settings.loop){return this.load(this.settings.lastImage)}}},arrows:function(){this.settings.loop?d([this.elems.left[0],this.elems.right[0]]).addClass("active"):this.settings.linkImages?(this.settings.currentImage==this.settings.lastImage?this.elems.right.removeClass("active"):this.elems.right.addClass("active"),0===this.settings.currentImage?this.elems.left.removeClass("active"):this.elems.left.addClass("active")):d([this.elems.left[0],this.elems.right[0]]).removeClass("active")},description:function(){var a=this;this.elems.description.html(a.settings.images[a.settings.currentImage].title)},pagination:function(){var k=this,l=this.settings.lastImage+1,a=this.settings.currentImage+1;this.elems.pagination.html(a+" "+k.settings.separator2+l)},storeImgSize:function(a,i){"undefined"!=typeof a&&(this.settings.images[i].height&&this.settings.images[i].width||(this.settings.images[i].height=a.height,this.settings.images[i].width=a.width))},close:function(){if(this.settings.fullscreenOpen){return void this.exitFullScreen()}var l=[this.elems.overlay[0],this.elems.loader[0],this.elems.wrapper[0]],a=this,k=d.when(d(l).fadeOut(200)).done(function(){a.elems.domContainer.removeClass("chocolat-open")});return this.settings.currentImage=!1,k},destroy:function(){this.element.removeData(),this.element.find(this.settings.imageSelector).off("
1click.chocolat"),this.settings.initialized&&(this.settings.fullscreenOpen&&this.exitFullScreen(),this.settings.currentImage=!1,this.settings.initialized=!1,this.elems.domContainer.removeClass(this._cssClasses.join(" ")),this.elems.wrapper.remove())},getOutMarginW:function(){var a=this.elems.left.outerWidth(!0),i=this.elems.right.outerWidth(!0);return a+i},getOutMarginH:function(){return this.elems.top.outerHeight(!0)+this.elems.bottom.outerHeight(!0)},markup:function(){this.elems.domContainer.addClass("chocolat-open "+this.settings.className),"cover"==this.settings.imageSize&&this.elems.domContainer.addClass("chocolat-cover"),this.settings.container!==g&&this.elems.domContainer.addClass("chocolat-in-container"),this.elems.wrapper=d("<div/>",{"class":"chocolat-wrapper",id:"chocolat-content-"+this.settings.setIndex}).appendTo(this.elems.domContainer),this.elems.overlay=d("<div/>",{"class":"chocolat-overlay"}).appendTo(this.elems.wrapper),this.elems.loader=d("<div/>",{"class":"chocolat-loader"}).appendTo(this.elems.wrapper),this.elems.content=d("<div/>",{"class":"chocolat-content"}).appendTo(this.elems.wrapper),this.elems.img=d("<img/>",{"class":"chocolat-img",src:""}).appendTo(this.elems.content),this.elems.top=d("<div/>",{"class":"chocolat-top"}).appendTo(this.elems.wrapper),this.elems.left=d("<div/>",{"class":"chocolat-left"}).appendTo(this.elems.wrapper),this.elems.right=d("<div/>",{"class":"chocolat-right"}).appendTo(this.elems.wrapper),this.elems.bottom=d("<div/>",{"class":"chocolat-bottom"}).appendTo(this.elems.wrapper),this.elems.close=d("<span/>",{"class":"chocolat-close"}).appendTo(this.elems.top),this.elems.fullscreen=d("<span/>",{"class":"chocolat-fullscreen"}).appendTo(this.elems.bottom),this.elems.description=d("<span/>",{"class":"chocolat-description"}).appendTo(this.elems.bottom),this.elems.pagination=d("<span/>",{"class":"chocolat-pagination"}).appendTo(this.elems.bottom),this.elems.setTitle=d("<span/>",{"class":"chocolat-set-title",html:this.settings.setTitle}).appendTo(this.elems.bottom),this.settings.afterMarkup.call(this)},openFullScreen:function(){var a=this.elems.wrapper[0];a.requestFullscreen?(this.settings.fullscreenOpen=!0,a.requestFullscreen()):a.mozRequestFullScreen?(this.settings.fullscreenOpen=!0,a.mozRequestFullScreen()):a.webkitRequestFullscreen?(this.settings.fullscreenOpen=!0,a.webkitRequestFullscreen()):a.msRequestFullscreen?(a.msRequestFullscreen(),this.settings.fullscreenOpen=!0):this.settings.fullscreenOpen=!1},exitFullScreen:function(){c.exitFullscreen?(c.exitFullscreen(),this.settings.fullscreenOpen=!1):c.mozCancelFullScreen?(c.mozCancelFullScreen(),this.settings.fullscreenOpen=!1):c.webkitExitFullscreen?(c.webkitExitFullscreen(),this.settings.fullscreenOpen=!1):c.msExitFullscreen?(c.msExitFullscreen(),this.settings.fullscreenOpen=!1):this.settings.fullscreenOpen=!0},events:function(){var a=this;d(c).off("keydown.chocolat").on("keydown.chocolat",function(e){a.settings.initialized&&(37==e.keyCode?a.change(-1):39==e.keyCode?a.change(1):27==e.keyCode&&a.close())}),this.elems.wrapper.find(".chocolat-right").off("click.chocolat").on("click.chocolat",function(){a.change(1)}),this.elems.wrapper.find(".chocolat-left").off("click.chocolat").on("click.chocolat",function(){return a.change(-1)}),d([this.elems.overlay[0],this.elems.close[0]]).off("click.chocolat").on("click.chocolat",function(){return a.close()}),this.elems.fullscreen.off("click.chocolat").on("click.chocolat",function(){return a.settings.fullscreenOpen?void a.exitFullScreen():void a.openFullScreen()}),a.settings.backgroundClose&&this.elems.overlay.off("click.chocolat").on("click.chocolat",function(){return a.close()}),this.elems.wrapper.off("click.chocolat").on("click.chocolat",function(e){return a.zoomOut(e)}),this.elems.wrapper.find(".chocolat-img").off("click.chocolat").on("click.chocolat",function(e){if(null===a.settings.initialZoomState&&a.elems.domContainer.hasClass("chocolat-zoomable")){return e.stopPropagation(),a.zoomIn(e)}}),this.elems.wrapper.mousemove(function(y){if(null!==a.settings.initialZoomState&&!a.elems.img.is(":animated")){var v=d(this).offset(),q=d(this).height(),p=d(this).width(),B=a.settings.images[a.settings.currentImage],t=B.width,k=B.height,A=[y.pageX-p/2-v.left,y.pageY-q/2-v.top],w=0;if(t>p){var s=a.settings.zoomedPaddingX(t,p);w=A[0]/(p/2),w=((t-p)/2+s)*w}var x=0;if(k>
1q){var C=a.settings.zoomedPaddingY(k,q);x=A[1]/(q/2),x=((k-q)/2+C)*x}var z={"margin-left":-w+"px","margin-top":-x+"px"};"undefined"!=typeof y.duration?d(a.elems.img).stop(!1,!0).animate(z,y.duration):d(a.elems.img).stop(!1,!0).css(z)}}),d(g).on("resize",function(){a.settings.initialized&&a.settings.currentImage!==!1&&a.debounce(50,function(){var e=a.fit(a.settings.currentImage,a.elems.wrapper);a.center(e.width,e.height,e.left,e.top,0),a.zoomable()})})},zoomable:function(){var k=this.settings.images[this.settings.currentImage],m=this.elems.wrapper.width(),a=this.elems.wrapper.height(),l=!(!this.settings.enableZoom||!(k.width>m||k.height>a)),o=this.elems.img.width()>k.width||this.elems.img.height()>k.height;l&&!o?this.elems.domContainer.addClass("chocolat-zoomable"):this.elems.domContainer.removeClass("chocolat-zoomable")},zoomIn:function(l){this.settings.initialZoomState=this.settings.imageSize,this.settings.imageSize="native";var a=d.Event("mousemove");a.pageX=l.pageX,a.pageY=l.pageY,a.duration=this.settings.duration,this.elems.wrapper.trigger(a),this.elems.domContainer.addClass("chocolat-zoomed");var k=this.fit(this.settings.currentImage,this.elems.wrapper);return this.center(k.width,k.height,k.left,k.top,this.settings.duration)},zoomOut:function(k,l){if(null!==this.settings.initialZoomState&&this.settings.currentImage!==!1){l=l||this.settings.duration,this.settings.imageSize=this.settings.initialZoomState,this.settings.initialZoomState=null,this.elems.img.animate({margin:0},l),this.elems.domContainer.removeClass("chocolat-zoomed");var a=this.fit(this.settings.currentImage,this.elems.wrapper);return this.center(a.width,a.height,a.left,a.top,l)}},setDomContainer:function(){this.settings.container===g?this.elems.domContainer=d("body"):this.elems.domContainer=d(this.settings.container)},debounce:function(a,i){clearTimeout(this.settings.timerDebounce),this.settings.timerDebounce=setTimeout(function(){i()},a)},api:function(){var a=this;return{open:function(i){return i=parseInt(i)||0,a.init(i)},close:function(){return a.close()},next:function(){return a.change(1)},prev:function(){return a.change(-1)},"goto":function(i){return a.open(i)},current:function(){return a.settings.currentImage},place:function(){return a.place(a.settings.currentImage,a.settings.duration)},destroy:function(){return a.destroy()},set:function(l,k){return a.settings[l]=k,k},get:function(i){return a.settings[i]},getElem:function(i){return a.elems[i]}}}});var b={container:g,imageSelector:".chocolat-image",className:"",imageSize:"default",initialZoomState:null,fullScreen:!1,loop:!1,linkImages:!0,duration:300,setTitle:"",separator2:"/",setIndex:0,firstImage:0,lastImage:!1,currentImage:!1,initialized:!1,timer:!1,timerDebounce:!1,images:[],enableZoom:!0,imageSource:"href",afterInitialize:function(){},afterMarkup:function(){},afterImageLoad:function(){},zoomedPaddingX:function(a,i){return 0},zoomedPaddingY:function(a,i){return 0}};d.fn.Chocolat=function(a){return this.each(function(){h++;var e=d.extend(!0,{},b,a,{setIndex:h});d.data(this,"chocolat")||d.data(this,"chocolat",new j(d(this),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.