PageSourceSearch

https://www.tauranga.govt.nz/DesktopModules/EasyDNNRotator/control…/js/eds2_2.multicarousel.min.js?cdv=879

js tauranga.govt.nz collected 2026-10-02 04:33:26 UTC 14,193 bytes, 31 lines download raw bytes

1(function(m){var A={debug:!1,resizeable_container:!0,orientation:"horizontal",viewport_crop:{top:0,bottom:0,left:0,right:0},navigation:{show:!0,autohide:!0,css_class:"",previous:{position:{horizontal:"left",vertical:"top",h_offset:0,v_offset:.5,h_as_ratio:!1,v_as_ratio:!0}},next:{position:{horizontal:"right",vertical:"top",h_offset:0,v_offset:.5,h_as_ratio:!1,v_as_ratio:!0}}},slide:{duration:500,step:"page",infinite:!1,easing:"swing",interval:0,pause_on_hover:!0,effect:"slide"},pagination:{enabled:!1,
2page_template:"",position:{horizontal:"left",vertical:"bottom",h_offset:.5,v_offset:0,h_as_ratio:!0,v_as_ratio:!1}},draggable:{enable:!1},unique_id:0},B=function(p){var g=m(this),r,h,n,k,v=!1,b={},a,e={},t={restore:function(){var c=g.data("edr_carousel");return c?(r=c.$wrapper,h=c.$slider,n=c.$pages,k=c.$items,e=c.$navigation,a=c.rendering,b=c.settings,!0):!1},save:function(){g.data("edr_carousel",{$wrapper:r,$slider:h,$pages:n,$items:k,$navigation:e,rendering:a,settings:b})}},y={next:function(){l.next()},
3prev:function(){l.prev()}},l={init:function(c){var d,f="mousedown",u="mousemove",z="mouseup";m.extend(!0,b,A,c);g.addClass(b.orientation);r=g.find("> .wrapper");h=r.find("> .slider");n=h.find("> ul");k=n.find("> li");k.each(function(a){m(this).addClass("item_"+a)});a={root:{width:g.width(),height:g.height()},item:{full_width:k.eq(0).outerWidth(!0),full_height:k.eq(0).outerHeight(!0),h_space:k.eq(0).outerWidth(!0)-k.eq(0).outerWidth(),v_space:k.eq(0).outerHeight(!0)-k.eq(0).outerHeight()},page:{},
4wrapper:{},num_of_items:k.length,num_of_pages:0,items_in_last_page:0,current_position:0,pagination:{},interval:{timeout:!1,pause:!1},draggable:{start_position:{mouse:!1,slider:!1},disable_clicking:!1,disable_clicking_interval:""}};b.pagination.enabled&&(b.pagination.enabled instanceof m?(a.pagination.container=b.pagination.enabled,a.pagination.outside=!0):"string"===typeof b.pagination.enabled?(a.pagination.container=m(b.pagination.enabled),a.pagination.outside=!0):(a.pagination.container=m('<ul class="pagination" />'),
5g.append(a.pagination.container),a.pagination.outside=!1),a.pagination.container.delegate("li.carousel_page","click",function(){l.move_to(m(this).index())}));b.navigation.show&&(e.prev=m('<div class="navigation '+b.navigation.css_class+' previous">Previous</div>').appendTo(g),e.next=m('<div class="navigation '+b.navigation.css_class+' next">Next</div>').appendTo(g),w(e.prev,b.navigation.previous.position),w(e.next,b.navigation.next.position),b.navigation.autohide&&(e.prev.fadeTo(0,0).css("display",
6"none"),e.next.fadeTo(0,0).css("display","none"),g.hover(function(){2>a.num_of_pages||(e.prev.css("display","").stop().fadeTo(300,1),e.next.css("display","").stop().fadeTo(300,1))},function(){e.prev.stop().fadeTo(300,0,function(){e.prev.css("display","none")});e.next.stop().fadeTo(300,0,function(){e.next.css("display","none")})})),g.append(e.prev,e.next),e.prev.click(function(){clearTimeout(a.interval.timeout);l.prev()}),e.next.click(function(){clearTimeout(a.interval.timeout);l.next()}));l.resize();
7b.resizeable_container&&m(window).resize(function(){clearTimeout(g.data("carousel_resize_interval"));r.css({height:a.page.height-a.item.v_space+(g.height()-a.root.height),width:a.page.width-a.item.h_space+(g.width()-a.root.width)});g.data("carousel_resize_interval",setTimeout(l.resize,200))});0<b.slide.interval&&(g.bind("carousel_slide_finished",function(){clearTimeout(a.interval.timeout);a.interval.pause||(a.interval.timeout=setTimeout(function(){l.next()},b.slide.interval))}),a.interval.timeout=
8setTimeout(function(){l.next()},b.slide.interval),b.slide.pause_on_hover&&g.hover(function(){clearTimeout(a.interval.timeout);a.interval.pause=!0},function(){a.interval.pause=!1;a.interval.timeout=setTimeout(function(){l.next()},b.slide.interval)}));if(b.draggable.enable){if(d="ontouchstart"in window)f="touchstart",u="touchmove",z="touchend";g.delegate("a","click",function(b){a.draggable.disable_clicking&&b.preventDefault()});m("a",g).each(function(){this.ondragstart=function(){return!1}});g.bind(f+
9".carousel_"+b.unique_id,function(b){var c=b;d&&(b.originalEvent.touches&&b.originalEvent.touches.length?b=b.originalEvent.touches[0]:b.originalEvent.changedTouches&&b.originalEvent.changedTouches.length&&(b=b.originalEvent.changedTouches[0]));a.draggable.start_position.mouse={x:b.pageX,y:b.pageY};a.draggable.start_position.slider=!1;c.stopPropagation()}).bind(u+".carousel_"+b.unique_id,function(c){var q=c;if(!1!==a.draggable.start_position.mouse&&(a.draggable.start_position.mouse.x!==c.pageX||a.draggable.start_position.mouse.y!==
10c.pageY)){clearTimeout(a.draggable.disable_clicking_interval);a.draggable.disable_clicking=!0;0<b.slide.interval&&clearTimeout(a.interval.timeout);d&&(c.originalEvent.touches&&c.originalEvent.touches.length?c=c.originalEvent.touches[0]:c.originalEvent.changedTouches&&c.originalEvent.changedTouches.length&&(c=c.originalEvent.changedTouches[0]));var g=a.draggable.start_position.mouse.x-c.pageX;var k=a.draggable.start_position.mouse.y-c.pageY;if("horizontal"==b.orientation){var e="x";var f=c.pageX;g=
110==k?g:g/k}else e="y",f=c.pageY,g=0==g?k:k/g;g=Math.abs(g);1>g||(q.preventDefault(),q.stopPropagation(),x()?(f=a.draggable.start_position.mouse[e]-f,50<Math.abs(f)&&(a.draggable.start_position.mouse=!1,0>f?l.prev():l.next())):(h.stop(!0),"horizontal"==b.orientation?(f=c.pageX,c="left",q=a.page.width,"item"==b.slide.step&&a.items_in_last_page<a.page.cols&&(q+=a.page.width-a.items_in_last_page*a.item.full_width),q-=h.width()):(f=c.pageY,c="top",q=a.page.height,"item"==b.slide.step&&Math.ceil(a.items_in_last_page/
12a.page.cols)<a.page.rows&&(q+=a.page.height-Math.ceil(a.items_in_last_page/a.page.cols)*a.item.full_height),q-=h.height()),!1===a.draggable.start_position.slider&&(a.draggable.start_position.slider=parseInt(h.css(c))),f=a.draggable.start_position.slider+(f-a.draggable.start_position.mouse[e]),1<f?f=Math.floor(Math.log(f)/2.3*15):f<q&&(f=q-Math.floor(Math.log(Math.abs(f)+q)/2.3*15)),h.css(c,f),b.pagination.enabled&&(e="page"==b.slide.step?"horizontal"==b.orientation?a.page.width:a.page.height:"horizontal"==
13b.orientation?a.item.full_width:a.item.full_height,a.pagination.container.find("> li").removeClass("active").eq(Math.round(Math.abs(f)/e)).addClass("active"))))}}).bind(z+".carousel_"+b.unique_id,function(c){c=100;a.draggable.start_position.mouse=!1;a.draggable.disable_clicking_interval=setTimeout(function(){a.draggable.disable_clicking=!1},10);if(!1!==a.draggable.start_position.slider){a.draggable.start_position.slider=!1;if("horizontal"==b.orientation){var d=parseInt(h.css("left"));var f=a.page.width;
14"item"==b.slide.step&&a.items_in_last_page<a.page.cols&&(f+=a.page.width-a.items_in_last_page*a.item.full_width);var g=f-h.width()}else d=parseInt(h.css("top")),f=a.page.height,"item"==b.slide.step&&Math.ceil(a.items_in_last_page/a.page.cols)<a.page.rows&&(f+=a.page.height-Math.ceil(a.items_in_last_page/a.page.cols)*a.item.full_height),g=f-h.height();0<d?d=0:d<g?d="page"==b.slide.step?a.num_of_pages-1:"horizontal"==b.orientation?a.page.cols*(a.num_of_pages-1)+(a.items_in_last_page>a.page.cols?a.page.cols:
15a.items_in_last_page)-a.page.cols:Math.ceil(a.num_of_items/a.page.cols)-a.page.rows:(d="page"==b.slide.step?Math.round(d/f):"horizontal"==b.orientation?Math.round(d/a.item.full_width):Math.round(d/a.item.full_height),d=Math.abs(d),c=400);l.move_to({position:d,page_change_check:!1,duration:c})}})}},resize:function(){var c,d=0,f;
15if(v=t.restore()){a.root={width:g.width(),height:g.height()};for(c=m('<ul class="new_page"'+("page"==b.slide.step&&"fade"==b.slide.effect?' style="opacity: .001; position: absolute; z-index: -1;"':
16"")+" />").appendTo(h);d<a.num_of_items;d++)k.filter(".item_"+d).appendTo(c);k.removeClass("first");c.removeClass("new_page").siblings().remove();a.current_position=0;h.css({top:0,left:0});n=h.find("> ul")}a.page.width=a.root.width+a.item.h_space-b.viewport_crop.left-b.viewport_crop.right;a.page.height=a.root.height+a.item.v_space-b.viewport_crop.top-b.viewport_crop.bottom;a.page.cols=a.page.width<a.item.full_width?1:Math.floor(a.page.width/a.item.full_width);a.page.rows=a.page.height<a.item.full_height?
171:Math.floor(a.page.height/a.item.full_height);a.page.items_count=a.page.cols*a.page.rows;d=a.num_of_items%a.page.items_count;a.num_of_pages=Math.ceil(a.num_of_items/a.page.items_count);a.items_in_last_page=1<a.page.items_count?0==d?a.page.items_count:d:1;a.page.width>a.item.full_width&&(a.page.width=a.item.full_width*a.page.cols);a.page.height>a.item.full_height&&(a.page.height=a.item.full_height*a.page.rows);a.wrapper.top=Math.floor((a.root.height-(a.page.height-a.item.v_space+b.viewport_crop.top+
18b.viewport_crop.bottom))/2);a.wrapper.left=Math.floor((a.root.width-(a.page.width-a.item.h_space+b.viewport_crop.left+b.viewport_crop.right))/2);r.width(a.page.width-a.item.h_space).height(a.page.height-a.item.v_space).css({top:a.wrapper.top+b.viewport_crop.top,left:a.wrapper.left+b.viewport_crop.left});h.css({marginTop:-a.item.v_space,marginLeft:-a.item.h_space});"horizontal"==b.orientation?h.css({height:a.page.height,width:0}):h.css({height:0,width:a.page.width});if(x())n.css({height:a.page.height,
19width:a.page.width}),"horizontal"==b.orientation?(h.width(a.page.width*a.num_of_pages),n.width(h.width())):(h.height(a.page.height*a.num_of_pages),n.height(h.height())),k.eq(0).addClass("first"),b.pagination.enabled&&a.pagination.container.css("display","none");else if(k.each(function(c){var d=m(this);var g=a.page.width<a.item.full_width?a.page.width:a.item.full_width;var e=a.page.height<a.item.full_height?a.page.height:a.item.full_height;d.width(g-a.item.h_space);d.height(e-a.item.v_space);0==c%
20a.page.items_count&&(0==c?n.css({height:a.page.height,width:a.page.width}):f=m("<ul"+("page"==b.slide.step&&"fade"==b.slide.effect?' style="opacity: .001; position: absolute; z-index: -1;"':"")+" />").css({height:a.page.height,width:a.page.width}).appendTo(h),"horizontal"==b.orientation?h.width(h.width()+a.page.width):h.height(h.height()+a.page.height));c<a.page.items_count||d.appendTo(f)}),n=h.find("> ul"),b.pagination.enabled){d=0;c="";var u="page"==b.slide.step?a.num_of_pages:"horizontal"==b.orientation?
21a.page.cols*(a.num_of_pages-1)+(a.items_in_last_page>a.page.cols?a.page.cols:a.items_in_last_page)-a.page.cols+1:Math.ceil(a.num_of_items/a.page.cols)-a.page.rows+1;a.pagination.container.css("display","").empty();if(1<u){for(;d<u;d++)c+='<li class="carousel_page'+(d==a.current_position?" active":"")+'">'+b.pagination.page_template.replace("{{page}}",d+1)+"</li>";a.pagination.container.append(c);w(a.pagination.container,b.pagination.position)}else a.pagination.container.css("display","none")}b.navigation.show&&
22!b.navigation.autohide&&(1<a.num_of_pages?(e.prev.css("display","").stop().fadeTo(300,1),e.next.css("display","").stop().fadeTo(300,1)):(e.prev.stop().fadeTo(300,0,function(){e.prev.css("display","none")}),e.next.stop().fadeTo(300,0,function(){e.next.css("display","none")})));t.save()},move_to:function(c){var d;var f=0;var e={duration:b.slide.duration,easing:b.slide.easing,page_change_check:!0};v=t.restore();"object"==typeof c&&(m.extend(e,c),c=e.position);if(x()){var l=k.filter(".first").index();
23k.removeClass("first");h.stop();if("page"==b.slide.step){c>a.current_position?d="horizontal"==b.orientation?-a.page.width:-a.page.height:"horizontal"==b.orientation?h.css("left",-a.page.width):h.css("top",-a.page.height);var p=a.page.items_count}else c>a.current_position?d="horizontal"==b.orientation?-a.item.full_width:-a.item.full_height:"horizontal"==b.orientation?h.css("left",-a.item.full_width):h.css("top",-a.item.full_height),p=1;if(c>a.current_position){for("horizontal"==b.orientation?h.css("left",
240):h.css("top",0);f<l;)k.eq(f++).appendTo(n);k=n.find("> li");k.eq(p).addClass("first")}else{if(l<p){d=a.num_of_items-(p-l);for(f=a.num_of_items-1;f>=d;)k.eq(f--).prependTo(n);k=n.find("> li");k.eq(0).addClass("first")}else k.eq(l-p).addClass("first");d=0}}else"page"==b.slide.step?(f=a.num_of_pages-1,d="horizontal"==b.orientation?a.page.width:a.page.height):"horizontal"==b.orientation?(f=a.page.cols*(a.num_of_pages-1)+(a.items_in_last_page>a.page.cols?a.page.cols:a.items_in_last_page)-a.page.cols,
25d=a.item.full_width):(f=Math.ceil(a.num_of_items/a.page.cols)-a.page.rows,d=a.item.full_height),0>c?c=f:c>f&&(c=0),d*=-c,b.pagination.enabled&&a.pagination.container.find("li").removeClass("active").eq(c).addClass("active");e.page_change_check&&c==a.current_position||("page"==b.slide.step&&"fade"==b.slide.effect?(n.eq(a.current_position).stop().css({zIndex:-1}).animate({opacity:.001},e.duration,e.easing),n.eq(c).stop().css({zIndex:0}).animate({opacity:1},e.duration,e.easing,function(){g.trigger("carousel_slide_finished")})):
26(f="horizontal"==b.orientation?{left:d}:{top:d},h.stop().animate(f,e.duration,e.easing,function(){g.trigger("carousel_slide_finished")})),a.current_position=c,t.save())},next:function(){l.move_to(a.current_position+1)},prev:function(){l.move_to(a.current_position-1)}},x=function(){return b.slide.infinite&&("horizontal"==b.orientation&&1==a.page.rows||"vertical"==b.orientation&&1==a.page.cols)},w=function(b,d){var c=d.v_as_ratio?Math.floor(d.v_offset*a.root.height):d.v_offset,e=d.h_as_ratio?Math.floor(d.h_offset*
27a.root.width):d.h_offset;"top"==d.vertical?(d.v_as_ratio&&b.css("margin-top",-Math.floor(b.outerHeight()/2)),b.css("top",c)):(d.v_as_ratio&&b.css("margin-bottom",-Math.floor(b.outerHeight()/2)),b.css({top:"auto",bottom:c}));"left"==d.horizontal?(d.h_as_ratio&&b.css("margin-left",-Math.floor(b.outerWidth()/2)),b.css("left",e)):(d.h_as_ratio&&b.css("margin-right",-Math.floor(b.outerWidth()/2)),b.css({left:"auto",right:e}))};
27v=t.restore();try{v?"object"!==typeof p&&p?y[p]?y[p].apply(this,Array.prototype.slice.call(arguments,
28			1)) : m.error("jQuery.carousel: Method " + p + " does not exist") : m.error("jQuery.carousel: Already initialized on given element") : l.init(p)
29		} catch (c) { b.debug && "object" === typeof console && console.error(c) } t.save()
30	}; m.fn.multicarousel_1_4 = function () { var m = arguments; return this.each(function () { B.apply(this, m) }) }
31})(eds3_5_jq);

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.