This repository has been archived on 2020-05-08. You can view files and clone it, but cannot push or open issues or pull requests.
understrap/js/theme.min.js

4 lines
109 KiB
JavaScript
Raw Normal View History

2016-05-15 18:42:42 +00:00
if(!function(t,e,i,n){function s(e,i){this.settings=null,this.options=t.extend({},s.Defaults,i),this.$element=t(e),this._handlers={},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._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},t.each(["onResize","onThrottledResize"],t.proxy(function(e,i){this._handlers[i]=t.proxy(this[i],this)},this)),t.each(s.Plugins,t.proxy(function(t,e){this._plugins[t.charAt(0).toLowerCase()+t.slice(1)]=new e(this)},this)),t.each(s.Workers,t.proxy(function(e,i){this._pipe.push({filter:i.filter,run:t.proxy(i.run,this)})},this)),this.setup(),this.initialize()}s.Defaults={items:3,loop:!1,center:!1,rewind:!1,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:e,fallbackEasing:"swing",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},s.Width={Default:"default",Inner:"inner",Outer:"outer"},s.Type={Event:"event",State:"state"},s.Plugins={},s.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(t){t.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(t){var e=this.settings.margin||"",i=!this.settings.autoWidth,n=this.settings.rtl,s={width:"auto","margin-left":n?e:"","margin-right":n?"":e};!i&&this.$stage.children().css(s),t.css=s}},{filter:["width","items","settings"],run:function(t){var e=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,i=null,n=this._items.length,s=!this.settings.autoWidth,o=[];for(t.items={merge:!1,width:e};n--;)i=this._mergers[n],i=this.settings.mergeFit&&Math.min(i,this.settings.items)||i,t.items.merge=i>1||t.items.merge,o[n]=s?e*i:this._items[n].width();this._widths=o}},{filter:["items","settings"],run:function(){var e=[],i=this._items,n=this.settings,s=Math.max(2*n.items,4),o=2*Math.ceil(i.length/2),r=n.loop&&i.length?n.rewind?s:Math.max(s,o):0,a="",l="";for(r/=2;r--;)e.push(this.normalize(e.length/2,!0)),a+=i[e[e.length-1]][0].outerHTML,e.push(this.normalize(i.length-1-(e.length-1)/2,!0)),l=i[e[e.length-1]][0].outerHTML+l;this._clones=e,t(a).addClass("cloned").appendTo(this.$stage),t(l).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var t=this.settings.rtl?1:-1,e=this._clones.length+this._items.length,i=-1,n=0,s=0,o=[];++i<e;)n=o[i-1]||0,s=this._widths[this.relative(i)]+this.settings.margin,o.push(n+s*t);this._coordinates=o}},{filter:["width","items","settings"],run:function(){var t=this.settings.stagePadding,e=this._coordinates,i={width:Math.ceil(Math.abs(e[e.length-1]))+2*t,"padding-left":t||"","padding-right":t||""};this.$stage.css(i)}},{filter:["width","items","settings"],run:function(t){var e=this._coordinates.length,i=!this.settings.autoWidth,n=this.$stage.children();if(i&&t.items.merge)for(;e--;)t.css.width=this._widths[this.relative(e)],n.eq(e).css(t.css);else i&&(t.css.width=t.items.width,n.css(t.css))}},{filter:["items"],run:function(){this._coordinates.length<1&&this.$stage.removeAttr("style")}},{filter:["width","items","settings"],run:function(t){t.current=t.current?this.$stage.children().index(t.current):0,t.current=Math.max(this.minimum(),Math.min(this.maximum(),t.current)),this.reset(t.current)}},{
}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){var s=function(e){this._core=e,this._timeout=null,this._paused=!1,this._handlers={"changed.owl.carousel":t.proxy(function(t){t.namespace&&"settings"===t.property.name?this._core.settings.autoplay?this.play():this.stop():t.namespace&&"position"===t.property.name&&this._core.settings.autoplay&&this._setAutoPlayInterval()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":t.proxy(function(t,e,i){t.namespace&&this.play(e,i)},this),"stop.owl.autoplay":t.proxy(function(t){t.namespace&&this.stop()},this),"mouseover.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":t.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=t.extend({},s.Defaults,this._core.options)};s.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},s.prototype.play=function(t,e){this._paused=!1,this._core.is("rotating")||(this._core.enter("rotating"),this._setAutoPlayInterval())},s.prototype._getNextTimeout=function(n,s){return this._timeout&&e.clearTimeout(this._timeout),e.setTimeout(t.proxy(function(){this._paused||this._core.is("busy")||this._core.is("interacting")||i.hidden||this._core.next(s||this._core.settings.autoplaySpeed)},this),n||this._core.settings.autoplayTimeout)},s.prototype._setAutoPlayInterval=function(){this._timeout=this._getNextTimeout()},s.prototype.stop=function(){this._core.is("rotating")&&(e.clearTimeout(this._timeout),this._core.leave("rotating"))},s.prototype.pause=function(){this._core.is("rotating")&&(this._paused=!0)},s.prototype.destroy=function(){var t,e;this.stop();for(t in this._handlers)this._core.$element.off(t,this._handlers[t]);for(e in Object.getOwnPropertyNames(this))"function"!=typeof this[e]&&(this[e]=null)},t.fn.owlCarousel.Constructor.Plugins.autoplay=s}(window.Zepto||window.jQuery,window,document),function(t,e,i,n){"use strict";var s=function(e){this._core=e,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":t.proxy(function(e){e.namespace&&this._core.settings.dotsData&&this._templates.push('<div class="'+this._core.settings.dotClass+'">'+t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"</div>")},this),"added.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,0,this._templates.pop())},this),"remove.owl.carousel":t.proxy(function(t){t.namespace&&this._core.settings.dotsData&&this._templates.splice(t.position,1)},this),"changed.owl.carousel":t.proxy(function(t){t.namespace&&"position"==t.property.name&&this.draw()},this),"initialized.owl.carousel":t.proxy(function(t){t.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":t.proxy(function(t){t.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=t.extend({},s.Defaults,this._core.options),this.$element.on(this._handlers)};s.Defaults={nav:!1,navText:["prev","next"],navSpeed:!1,navElement:"div",navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},s.prototype.initialize=function(){var
_.left="right"))),"string"==typeof h?h=h.split(",").map(function(t){return t.trim()}):h===!0&&(h=["top","left","right","bottom"]),h=h||[];var E=[],C=[];i<y[1]&&(h.indexOf("top")>=0?(i=y[1],E.push("top")):C.push("top")),i+a>y[3]&&(h.indexOf("bottom")>=0?(i=y[3]-a,E.push("bottom")):C.push("bottom")),n<y[0]&&(h.indexOf("left")>=0?(n=y[0],E.push("left")):C.push("left")),n+l>y[2]&&(h.indexOf("right")>=0?(n=y[2]-l,E.push("right")):C.push("right")),E.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.pinnedClass?e.options.pinnedClass:e.getClass("pinned"),m.push(t),E.forEach(function(e){m.push(t+"-"+e)})}(),C.length&&!function(){var t=void 0;t="undefined"!=typeof e.options.outOfBoundsClass?e.options.outOfBoundsClass:e.getClass("out-of-bounds"),m.push(t),C.forEach(function(e){m.push(t+"-"+e)})}(),(E.indexOf("left")>=0||E.indexOf("right")>=0)&&(_.left=v.left=!1),(E.indexOf("top")>=0||E.indexOf("bottom")>=0)&&(_.top=v.top=!1),v.top===s.top&&v.left===s.left&&_.top===e.attachment.top&&_.left===e.attachment.left||(e.updateAttachClasses(_,v),e.trigger("update",{attachment:_,targetAttachment:v}))}),S(function(){e.options.addTargetClasses!==!1&&g(e.target,m,p),g(e.element,m,p)}),{top:i,left:n}}});var P=T.Utils,r=P.getBounds,g=P.updateClasses,S=P.defer;T.modules.push({position:function(t){var e=this,i=t.top,n=t.left,s=this.cache("element-bounds",function(){return r(e.element)}),o=s.height,a=s.width,l=this.getTargetBounds(),h=i+o,c=n+a,u=[];i<=l.bottom&&h>=l.top&&["left","right"].forEach(function(t){var e=l[t];e!==n&&e!==c||u.push(t)}),n<=l.right&&c>=l.left&&["top","bottom"].forEach(function(t){var e=l[t];e!==i&&e!==h||u.push(t)});var d=[],f=[],p=["left","top","right","bottom"];return d.push(this.getClass("abutted")),p.forEach(function(t){d.push(e.getClass("abutted")+"-"+t)}),u.length&&f.push(this.getClass("abutted")),u.forEach(function(t){f.push(e.getClass("abutted")+"-"+t)}),S(function(){e.options.addTargetClasses!==!1&&g(e.target,f,d),g(e.element,f,d)}),!0}});var k=function(){function t(t,e){var i=[],n=!0,s=!1,o=void 0;try{for(var r,a=t[Symbol.iterator]();!(n=(r=a.next()).done)&&(i.push(r.value),!e||i.length!==e);n=!0);}catch(l){s=!0,o=l}finally{try{!n&&a["return"]&&a["return"]()}finally{if(s)throw o}}return i}return function(e,i){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,i);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();return T.modules.push({position:function(t){var e=t.top,i=t.left;if(this.options.shift){var n=this.options.shift;"function"==typeof this.options.shift&&(n=this.options.shift.call(this,{top:e,left:i}));var s=void 0,o=void 0;if("string"==typeof n){n=n.split(" "),n[1]=n[1]||n[0];var r=n,a=k(r,2);s=a[0],o=a[1],s=parseFloat(s,10),o=parseFloat(o,10)}else s=n.top,o=n.left;return e+=s,i+=o,{top:e,left:i}}}}),Q}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(t){var e=t.fn.jquery.split(" ")[0].split(".");if(e[0]<2&&e[1]<9||1==e[0]&&9==e[1]&&e[2]<1||e[0]>=3)throw new Error("Bootstrap's JavaScript requires at least jQuery v1.9.1 but less than v3.0.0")}(jQuery),+function(t){"use strict";function e(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var n=function(t,e,i){for(var n=!0;n;){var s=t,o=e,r=i;n=!1,null===s&&(s=Function.prototype);var a=Object.getOwnPropertyDescriptor(s,o);if(void 0!==a){if("value"in a)return a.value;var l=a.get;if(void 0===l)return;return l.call(r)}var h=Object.getPrototypeOf(s);if(null===h)return;t=h,e=o,i=r,n=!0,a=h=void 0}},s=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.pro
this._element=null,this._scrollElement=null,this._config=null,this._selector=null,this._offsets=null,this._targets=null,this._activeTarget=null,this._scrollHeight=null}},{key:"_getConfig",value:function(i){if(i=t.extend({},c,i),"string"!=typeof i.target){var n=t(i.target).attr("id");n||(n=o.getUID(e),t(i.target).attr("id",n)),i.target="#"+n}return o.typeCheckConfig(e,i,u),i}},{key:"_getScrollTop",value:function(){return this._scrollElement===window?this._scrollElement.scrollY:this._scrollElement.scrollTop}},{key:"_getScrollHeight",value:function(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}},{key:"_process",value:function(){var t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._scrollElement.offsetHeight;if(this._scrollHeight!==e&&this.refresh(),t>=i){var n=this._targets[this._targets.length-1];this._activeTarget!==n&&this._activate(n)}if(this._activeTarget&&t<this._offsets[0])return this._activeTarget=null,void this._clear();for(var s=this._offsets.length;s--;){var o=this._activeTarget!==this._targets[s]&&t>=this._offsets[s]&&(void 0===this._offsets[s+1]||t<this._offsets[s+1]);o&&this._activate(this._targets[s])}}},{key:"_activate",value:function(e){this._activeTarget=e,this._clear();var i=this._selector.split(",");i=i.map(function(t){return t+'[data-target="'+e+'"],'+(t+'[href="'+e+'"]')});var n=t(i.join(","));n.hasClass(f.DROPDOWN_ITEM)?(n.closest(p.DROPDOWN).find(p.DROPDOWN_TOGGLE).addClass(f.ACTIVE),n.addClass(f.ACTIVE)):n.parents(p.LI).find(p.NAV_LINKS).addClass(f.ACTIVE),t(this._scrollElement).trigger(d.ACTIVATE,{relatedTarget:e})}},{key:"_clear",value:function(){t(this._selector).filter(p.ACTIVE).removeClass(f.ACTIVE)}}],[{key:"_jQueryInterface",value:function(e){return this.each(function(){var i=t(this).data(r),n="object"==typeof e&&e||null;if(i||(i=new l(this,n),t(this).data(r,i)),"string"==typeof e){if(void 0===i[e])throw new Error('No method named "'+e+'"');i[e]()}})}},{key:"VERSION",get:function(){return n}},{key:"Default",get:function(){return c}}]),l}();return t(window).on(d.LOAD_DATA_API,function(){for(var e=t.makeArray(t(p.DATA_SPY)),i=e.length;i--;){var n=t(e[i]);m._jQueryInterface.call(n,n.data())}}),t.fn[e]=m._jQueryInterface,t.fn[e].Constructor=m,t.fn[e].noConflict=function(){return t.fn[e]=h,m._jQueryInterface},m}(jQuery),function(t){var e="tab",n="4.0.0-alpha",r="bs.tab",a="."+r,l=".data-api",h=t.fn[e],c=150,u={HIDE:"hide"+a,HIDDEN:"hidden"+a,SHOW:"show"+a,SHOWN:"shown"+a,CLICK_DATA_API:"click"+a+l},d={DROPDOWN_MENU:"dropdown-menu",ACTIVE:"active",FADE:"fade",IN:"in"},f={A:"a",LI:"li",DROPDOWN:".dropdown",UL:"ul:not(.dropdown-menu)",FADE_CHILD:"> .nav-item .fade, > .fade",ACTIVE:".active",ACTIVE_CHILD:"> .nav-item > .active, > .active",DATA_TOGGLE:'[data-toggle="tab"], [data-toggle="pill"]',DROPDOWN_TOGGLE:".dropdown-toggle",DROPDOWN_ACTIVE_CHILD:"> .dropdown-menu .active"},p=function(){function e(t){i(this,e),this._element=t}return s(e,[{key:"show",value:function(){var e=this;if(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE||!t(this._element).hasClass(d.ACTIVE)){var i=void 0,n=void 0,s=t(this._element).closest(f.UL)[0],r=o.getSelectorFromElement(this._element);s&&(n=t.makeArray(t(s).find(f.ACTIVE)),n=n[n.length-1]);var a=t.Event(u.HIDE,{relatedTarget:this._element}),l=t.Event(u.SHOW,{relatedTarget:n});if(n&&t(n).trigger(a),t(this._element).trigger(l),!l.isDefaultPrevented()&&!a.isDefaultPrevented()){r&&(i=t(r)[0]),this._activate(this._element,s);var h=function(){var i=t.Event(u.HIDDEN,{relatedTarget:e._element}),s=t.Event(u.SHOWN,{relatedTarget:n});t(n).trigger(i),t(e._element).trigger(s)};i?this._activate(i,i.parentNode,h):h()}}}},{key:"dispose",value:function(){t.removeClass(this._element,r),this._element=null}},{key:"_activate",value:function(e,i,n){var s=t(i).find(f.ACTIVE_CHILD)[0],r=n&&o.supportsTransitionEnd()&&(s&&t(s).hasClass(d.FADE)||Boolean(t(i).find(f.FADE_CHILD)[0])),a=t.proxy(this._transitionComplete,this,e,s,r,n);s&&r?t(s).one(