File: /home/seoprovi/countrywidepackers.in/rough/New folder/assets/js/plugin/owl.carousel.js
;(function($,window,document,undefined){var drag,state,e;drag={start:0,startX:0,startY:0,current:0,currentX:0,currentY:0,offsetX:0,offsetY:0,distance:null,startTime:0,endTime:0,updatedX:0,targetEl:null};state={isTouch:false,isScrolling:false,isSwiping:false,direction:false,inMotion:false};e={_onDragStart:null,_onDragMove:null,_onDragEnd:null,_transitionEnd:null,_resizer:null,_responsiveCall:null,_goToLoop:null,_checkVisibile:null};function Owl(element,options){this.settings=null;this.options=$.extend({},Owl.Defaults,options);this.$element=$(element);this.drag=$.extend({},drag);this.state=$.extend({},state);this.e=$.extend({},e);this._plugins={};this._supress={};this._current=null;this._speed=null;this._coordinates=[];this._breakpoint=null;this._width=null;this._items=[];this._clones=[];this._mergers=[];this._invalidated={};this._pipe=[];$.each(Owl.Plugins,$.proxy(function(key,plugin){this._plugins[key[0].toLowerCase()+key.slice(1)]=new plugin(this);},this));$.each(Owl.Pipe,$.proxy(function(priority,worker){this._pipe.push({'filter':worker.filter,'run':$.proxy(worker.run,this)});},this));this.setup();this.initialize();}
Owl.Defaults={items:3,loop:false,center:false,mouseDrag:true,touchDrag:true,pullDrag:true,freeDrag:false,margin:0,stagePadding:0,merge:false,mergeFit:true,autoWidth:false,startPosition:0,rtl:false,smartSpeed:250,fluidSpeed:false,dragEndSpeed:false,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:window,responsiveClass:false,fallbackEasing:'swing',info:false,nestedItemSelector:false,itemElement:'div',stageElement:'div',themeClass:'owl-theme',baseClass:'owl-carousel',itemClass:'owl-item',centerClass:'center',activeClass:'active'};Owl.Width={Default:'default',Inner:'inner',Outer:'outer'};Owl.Plugins={};Owl.Pipe=[{filter:['width','items','settings'],run:function(cache){cache.current=this._items&&this._items[this.relative(this._current)];}},{filter:['items','settings'],run:function(){var cached=this._clones,clones=this.$stage.children('.cloned');if(clones.length!==cached.length||(!this.settings.loop&&cached.length>0)){this.$stage.children('.cloned').remove();this._clones=[];}}},{filter:['items','settings'],run:function(){var i,n,clones=this._clones,items=this._items,delta=this.settings.loop?clones.length-Math.max(this.settings.items*2,4):0;for(i=0,n=Math.abs(delta/2);i<n;i++){if(delta>0){this.$stage.children().eq(items.length+clones.length-1).remove();clones.pop();this.$stage.children().eq(0).remove();clones.pop();}else{clones.push(clones.length/2);this.$stage.append(items[clones[clones.length-1]].clone().addClass('cloned'));clones.push(items.length-1-(clones.length-1)/2);this.$stage.prepend(items[clones[clones.length-1]].clone().addClass('cloned'));}}}},{filter:['width','items','settings'],run:function(){var rtl=(this.settings.rtl?1:-1),width=(this.width()/this.settings.items).toFixed(3),coordinate=0,merge,i,n;this._coordinates=[];for(i=0,n=this._clones.length+this._items.length;i<n;i++){merge=this._mergers[this.relative(i)];merge=(this.settings.mergeFit&&Math.min(merge,this.settings.items))||merge;coordinate+=(this.settings.autoWidth?this._items[this.relative(i)].width()+this.settings.margin:width*merge)*rtl;this._coordinates.push(coordinate);}}},{filter:['width','items','settings'],run:function(){var i,n,width=(this.width()/this.settings.items).toFixed(3),css={'width':Math.abs(this._coordinates[this._coordinates.length-1])+this.settings.stagePadding*2,'padding-left':this.settings.stagePadding||'','padding-right':this.settings.stagePadding||''};this.$stage.css(css);css={'width':this.settings.autoWidth?'auto':width-this.settings.margin};css[this.settings.rtl?'margin-left':'margin-right']=this.settings.margin;if(!this.settings.autoWidth&&$.grep(this._mergers,function(v){return v>1}).length>0){for(i=0,n=this._coordinates.length;i<n;i++){css.width=Math.abs(this._coordinates[i])-Math.abs(this._coordinates[i-1]||0)-this.settings.margin;this.$stage.children().eq(i).css(css);}}else{this.$stage.children().css(css);}}},{filter:['width','items','settings'],run:function(cache){cache.current&&this.reset(this.$stage.children().index(cache.current));}},{filter:['position'],run:function(){this.animate(this.coordinates(this._current));}},{filter:['width','position','items','settings'],run:function(){var rtl=this.settings.rtl?1:-1,padding=this.settings.stagePadding*2,begin=this.coordinates(this.current())+padding,end=begin+this.width()*rtl,inner,outer,matches=[],i,n;for(i=0,n=this._coordinates.length;i<n;i++){inner=this._coordinates[i-1]||0;outer=Math.abs(this._coordinates[i])+padding*rtl;if((this.op(inner,'<=',begin)&&(this.op(inner,'>',end)))||(this.op(outer,'<',begin)&&this.op(outer,'>',end))){matches.push(i);}}
this.$stage.children('.'+this.settings.activeClass).removeClass(this.settings.activeClass);this.$stage.children(':eq('+matches.join('), :eq(')+')').addClass(this.settings.activeClass);if(this.settings.center){this.$stage.children('.'+this.settings.centerClass).removeClass(this.settings.centerClass);this.$stage.children().eq(this.current()).addClass(this.settings.centerClass);}}}];Owl.prototype.initialize=function(){this.trigger('initialize');this.$element.addClass(this.settings.baseClass).addClass(this.settings.themeClass).toggleClass('owl-rtl',this.settings.rtl);this.browserSupport();if(this.settings.autoWidth&&this.state.imagesLoaded!==true){var imgs,nestedSelector,width;imgs=this.$element.find('img');nestedSelector=this.settings.nestedItemSelector?'.'+this.settings.nestedItemSelector:undefined;width=this.$element.children(nestedSelector).width();if(imgs.length&&width<=0){this.preloadAutoWidthImages(imgs);return false;}}
this.$element.addClass('owl-loading');this.$stage=$('<'+this.settings.stageElement+' class="owl-stage"/>').wrap('<div class="owl-stage-outer">');this.$element.append(this.$stage.parent());this.replace(this.$element.children().not(this.$stage.parent()));this._width=this.$element.width();this.refresh();this.$element.removeClass('owl-loading').addClass('owl-loaded');this.eventsCall();this.internalEvents();this.addTriggerableEvents();this.trigger('initialized');};Owl.prototype.setup=function(){var viewport=this.viewport(),overwrites=this.options.responsive,match=-1,settings=null;if(!overwrites){settings=$.extend({},this.options);}else{$.each(overwrites,function(breakpoint){if(breakpoint<=viewport&&breakpoint>match){match=Number(breakpoint);}});settings=$.extend({},this.options,overwrites[match]);delete settings.responsive;if(settings.responsiveClass){this.$element.attr('class',function(i,c){return c.replace(/\b owl-responsive-\S+/g,'');}).addClass('owl-responsive-'+match);}}
if(this.settings===null||this._breakpoint!==match){this.trigger('change',{property:{name:'settings',value:settings}});this._breakpoint=match;this.settings=settings;this.invalidate('settings');this.trigger('changed',{property:{name:'settings',value:this.settings}});}};Owl.prototype.optionsLogic=function(){this.$element.toggleClass('owl-center',this.settings.center);if(this.settings.loop&&this._items.length<this.settings.items){this.settings.loop=false;}
if(this.settings.autoWidth){this.settings.stagePadding=false;this.settings.merge=false;}};Owl.prototype.prepare=function(item){var event=this.trigger('prepare',{content:item});if(!event.data){event.data=$('<'+this.settings.itemElement+'/>').addClass(this.settings.itemClass).append(item)}
this.trigger('prepared',{content:event.data});return event.data;};Owl.prototype.update=function(){var i=0,n=this._pipe.length,filter=$.proxy(function(p){return this[p]},this._invalidated),cache={};while(i<n){if(this._invalidated.all||$.grep(this._pipe[i].filter,filter).length>0){this._pipe[i].run(cache);}
i++;}
this._invalidated={};};Owl.prototype.width=function(dimension){dimension=dimension||Owl.Width.Default;switch(dimension){case Owl.Width.Inner:case Owl.Width.Outer:return this._width;default:return this._width-this.settings.stagePadding*2+this.settings.margin;}};Owl.prototype.refresh=function(){if(this._items.length===0){return false;}
var start=new Date().getTime();this.trigger('refresh');this.setup();this.optionsLogic();this.$stage.addClass('owl-refresh');this.update();this.$stage.removeClass('owl-refresh');this.state.orientation=window.orientation;this.watchVisibility();this.trigger('refreshed');};Owl.prototype.eventsCall=function(){this.e._onDragStart=$.proxy(function(e){this.onDragStart(e);},this);this.e._onDragMove=$.proxy(function(e){this.onDragMove(e);},this);this.e._onDragEnd=$.proxy(function(e){this.onDragEnd(e);},this);this.e._onResize=$.proxy(function(e){this.onResize(e);},this);this.e._transitionEnd=$.proxy(function(e){this.transitionEnd(e);},this);this.e._preventClick=$.proxy(function(e){this.preventClick(e);},this);};Owl.prototype.onThrottledResize=function(){window.clearTimeout(this.resizeTimer);this.resizeTimer=window.setTimeout(this.e._onResize,this.settings.responsiveRefreshRate);};Owl.prototype.onResize=function(){if(!this._items.length){return false;}
if(this._width===this.$element.width()){return false;}
if(this.trigger('resize').isDefaultPrevented()){return false;}
this._width=this.$element.width();this.invalidate('width');this.refresh();this.trigger('resized');};Owl.prototype.eventsRouter=function(event){var type=event.type;if(type==="mousedown"||type==="touchstart"){this.onDragStart(event);}else if(type==="mousemove"||type==="touchmove"){this.onDragMove(event);}else if(type==="mouseup"||type==="touchend"){this.onDragEnd(event);}else if(type==="touchcancel"){this.onDragEnd(event);}};Owl.prototype.internalEvents=function(){var isTouch=isTouchSupport(),isTouchIE=isTouchSupportIE();if(this.settings.mouseDrag){this.$stage.on('mousedown',$.proxy(function(event){this.eventsRouter(event)},this));this.$stage.on('dragstart',function(){return false});this.$stage.get(0).onselectstart=function(){return false};}else{this.$element.addClass('owl-text-select-on');}
if(this.settings.touchDrag&&!isTouchIE){this.$stage.on('touchstart touchcancel',$.proxy(function(event){this.eventsRouter(event)},this));}
if(this.transitionEndVendor){this.on(this.$stage.get(0),this.transitionEndVendor,this.e._transitionEnd,false);}
if(this.settings.responsive!==false){this.on(window,'resize',$.proxy(this.onThrottledResize,this));}};Owl.prototype.onDragStart=function(event){var ev,isTouchEvent,pageX,pageY,animatedPos;ev=event.originalEvent||event||window.event;if(ev.which===3||this.state.isTouch){return false;}
if(ev.type==='mousedown'){this.$stage.addClass('owl-grab');}
this.trigger('drag');this.drag.startTime=new Date().getTime();this.speed(0);this.state.isTouch=true;this.state.isScrolling=false;this.state.isSwiping=false;this.drag.distance=0;pageX=getTouches(ev).x;pageY=getTouches(ev).y;this.drag.offsetX=this.$stage.position().left;this.drag.offsetY=this.$stage.position().top;if(this.settings.rtl){this.drag.offsetX=this.$stage.position().left+this.$stage.width()-this.width()
+this.settings.margin;}
if(this.state.inMotion&&this.support3d){animatedPos=this.getTransformProperty();this.drag.offsetX=animatedPos;this.animate(animatedPos);this.state.inMotion=true;}else if(this.state.inMotion&&!this.support3d){this.state.inMotion=false;return false;}
this.drag.startX=pageX-this.drag.offsetX;this.drag.startY=pageY-this.drag.offsetY;this.drag.start=pageX-this.drag.startX;this.drag.targetEl=ev.target||ev.srcElement;this.drag.updatedX=this.drag.start;if(this.drag.targetEl.tagName==="IMG"||this.drag.targetEl.tagName==="A"){this.drag.targetEl.draggable=false;}
$(document).on('mousemove.owl.dragEvents mouseup.owl.dragEvents touchmove.owl.dragEvents touchend.owl.dragEvents',$.proxy(function(event){this.eventsRouter(event)},this));};Owl.prototype.onDragMove=function(event){var ev,isTouchEvent,pageX,pageY,minValue,maxValue,pull;if(!this.state.isTouch){return;}
if(this.state.isScrolling){return;}
ev=event.originalEvent||event||window.event;pageX=getTouches(ev).x;pageY=getTouches(ev).y;this.drag.currentX=pageX-this.drag.startX;this.drag.currentY=pageY-this.drag.startY;this.drag.distance=this.drag.currentX-this.drag.offsetX;if(this.drag.distance<0){this.state.direction=this.settings.rtl?'right':'left';}else if(this.drag.distance>0){this.state.direction=this.settings.rtl?'left':'right';}
if(this.settings.loop){if(this.op(this.drag.currentX,'>',this.coordinates(this.minimum()))&&this.state.direction==='right'){this.drag.currentX-=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length);}else if(this.op(this.drag.currentX,'<',this.coordinates(this.maximum()))&&this.state.direction==='left'){this.drag.currentX+=(this.settings.center&&this.coordinates(0))-this.coordinates(this._items.length);}}else{minValue=this.settings.rtl?this.coordinates(this.maximum()):this.coordinates(this.minimum());maxValue=this.settings.rtl?this.coordinates(this.minimum()):this.coordinates(this.maximum());pull=this.settings.pullDrag?this.drag.distance/5:0;this.drag.currentX=Math.max(Math.min(this.drag.currentX,minValue+pull),maxValue+pull);}
if((this.drag.distance>8||this.drag.distance<-8)){if(ev.preventDefault!==undefined){ev.preventDefault();}else{ev.returnValue=false;}
this.state.isSwiping=true;}
this.drag.updatedX=this.drag.currentX;if((this.drag.currentY>16||this.drag.currentY<-16)&&this.state.isSwiping===false){this.state.isScrolling=true;this.drag.updatedX=this.drag.start;}
this.animate(this.drag.updatedX);};Owl.prototype.onDragEnd=function(event){var compareTimes,distanceAbs,closest;if(!this.state.isTouch){return;}
if(event.type==='mouseup'){this.$stage.removeClass('owl-grab');}
this.trigger('dragged');this.drag.targetEl.removeAttribute("draggable");this.state.isTouch=false;this.state.isScrolling=false;this.state.isSwiping=false;if(this.drag.distance===0&&this.state.inMotion!==true){this.state.inMotion=false;return false;}
this.drag.endTime=new Date().getTime();compareTimes=this.drag.endTime-this.drag.startTime;distanceAbs=Math.abs(this.drag.distance);if(distanceAbs>3||compareTimes>300){this.removeClick(this.drag.targetEl);}
closest=this.closest(this.drag.updatedX);this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed);this.current(closest);this.invalidate('position');this.update();if(!this.settings.pullDrag&&this.drag.updatedX===this.coordinates(closest)){this.transitionEnd();}
this.drag.distance=0;$(document).off('.owl.dragEvents');};Owl.prototype.removeClick=function(target){this.drag.targetEl=target;$(target).on('click.preventClick',this.e._preventClick);window.setTimeout(function(){$(target).off('click.preventClick');},300);};Owl.prototype.preventClick=function(ev){if(ev.preventDefault){ev.preventDefault();}else{ev.returnValue=false;}
if(ev.stopPropagation){ev.stopPropagation();}
$(ev.target).off('click.preventClick');};Owl.prototype.getTransformProperty=function(){var transform,matrix3d;transform=window.getComputedStyle(this.$stage.get(0),null).getPropertyValue(this.vendorName+'transform');transform=transform.replace(/matrix(3d)?\(|\)/g,'').split(',');matrix3d=transform.length===16;return matrix3d!==true?transform[4]:transform[12];};Owl.prototype.closest=function(coordinate){var position=-1,pull=30,width=this.width(),coordinates=this.coordinates();if(!this.settings.freeDrag){$.each(coordinates,$.proxy(function(index,value){if(coordinate>value-pull&&coordinate<value+pull){position=index;}else if(this.op(coordinate,'<',value)&&this.op(coordinate,'>',coordinates[index+1]||value-width)){position=this.state.direction==='left'?index+1:index;}
return position===-1;},this));}
if(!this.settings.loop){if(this.op(coordinate,'>',coordinates[this.minimum()])){position=coordinate=this.minimum();}else if(this.op(coordinate,'<',coordinates[this.maximum()])){position=coordinate=this.maximum();}}
return position;};Owl.prototype.animate=function(coordinate){this.trigger('translate');this.state.inMotion=this.speed()>0;if(this.support3d){this.$stage.css({transform:'translate3d('+coordinate+'px'+',0px, 0px)',transition:(this.speed()/1000)+'s'});}else if(this.state.isTouch){this.$stage.css({left:coordinate+'px'});}else{this.$stage.animate({left:coordinate},this.speed()/1000,this.settings.fallbackEasing,$.proxy(function(){if(this.state.inMotion){this.transitionEnd();}},this));}};Owl.prototype.current=function(position){if(position===undefined){return this._current;}
if(this._items.length===0){return undefined;}
position=this.normalize(position);if(this._current!==po