From b87fb8cb5162806b2bd578c150876d70cd61325f Mon Sep 17 00:00:00 2001 From: Tom Jenkinson Date: Sun, 10 Apr 2016 21:19:35 +0100 Subject: [PATCH] Update dist --- dist/clappr-thumbnails-plugin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/clappr-thumbnails-plugin.js b/dist/clappr-thumbnails-plugin.js index 34df38d..3ddf36e 100644 --- a/dist/clappr-thumbnails-plugin.js +++ b/dist/clappr-thumbnails-plugin.js @@ -1,2 +1,2 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("Clappr")):"function"==typeof define&&define.amd?define(["Clappr"],e):"object"==typeof exports?exports.ClapprThumbnailsPlugin=e(require("Clappr")):t.ClapprThumbnailsPlugin=e(t.Clappr)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var r=n[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(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)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;nu;u++)a.push({url:t,time:s+u*o,w:n,h:i,x:u%r*n,y:Math.floor(u/r)*i});return a}}]),a(e,[{key:"bindEvents",value:function(){this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this._onMouseMove),this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this._onMouseLeave),this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_RENDERED,this._onMediaControlRendered)}},{key:"_init",value:function(){this._loaded=!1,this._show=!1,this._hoverPosition=0,this._thumbs=[],this._$backdropCarouselImgs=[],this._loadThumbs()}},{key:"_loadThumbs",value:function(){var t=this;this._loadThumbnails(function(){t._loadBackdrop(),t._loaded=!0,t._renderPlugin()})}},{key:"_getOptions",value:function(){if(!("scrubThumbnails"in this.core.options))throw"'scrubThumbnails property missing from options object.";return this.core.options.scrubThumbnails}},{key:"_appendElToMediaControl",value:function(){this.core.mediaControl.$el.find(".media-control-background").first().after(this.el)}},{key:"_onMediaControlRendered",value:function(){this._createElements(),this._init()}},{key:"_onMouseMove",value:function(t){this._calculateHoverPosition(t),this._show=!0,this._renderPlugin()}},{key:"_onMouseLeave",value:function(){this._show=!1,this._renderPlugin()}},{key:"_calculateHoverPosition",value:function(t){var e=t.pageX-this.core.mediaControl.$seekBarContainer.offset().left;this._hoverPosition=Math.min(1,Math.max(e/this.core.mediaControl.$seekBarContainer.width(),0))}},{key:"_loadThumbnails",value:function(t){var e=this,n=this._getOptions().thumbs,i=n.length;if(0===i)return void t();for(var r=function(r){var o=n[r];e._thumbs.push(null);var s=r").addClass("thumbnail-img").attr("src",t.url),r=(0,l["default"])("
").addClass("thumbnail-container");return r.width(t.w*n),r.height(e),i.css({height:t.imageH*n,left:-1*t.x*n,top:-1*t.y*n}),r.append(i),r}},{key:"_loadBackdrop",value:function(){if(this._getOptions().backdropHeight)for(var t=this._$carousel,e=0;ey&&(y=Math.min(0,y+a));var b=Math.max(.6-Math.abs(y)/(2*a),.08);this._$backdropCarouselImgs[v].css("opacity",b)}}}},{key:"_updateSpotlightThumb",value:function(){if(this._getOptions().spotlightHeight){var t=this._hoverPosition,e=this.core.mediaControl.container.getDuration(),n=e*t,i=this._getThumbIndexForTime(n),r=this._thumbs[i],o=this._$spotlight;o.empty(),o.append(this._buildImg(r,this._getOptions().spotlightHeight));var s=this.$el.width(),a=o.width(),u=s*t-a/2;u=Math.max(Math.min(u,s-a),0),o.css("left",u)}}},{key:"_getThumbIndexForTime",value:function(t){for(var e=this._thumbs,n=e.length-1;n>=0;n--){var i=e[n];if(i.time<=t)return n}return 0}},{key:"_renderPlugin",value:function(){this._loaded&&(this._show&&this._getOptions().thumbs.length>0?(this.$el.removeClass("hidden"),this._updateCarousel(),this._updateSpotlightThumb()):this.$el.addClass("hidden"))}},{key:"_createElements",value:function(){return this.$el.html(this.template({backdropHeight:this._getOptions().backdropHeight,spotlightHeight:this._getOptions().spotlightHeight})),this.$el.append(u.Styler.getStyleFor(d["default"])),this._$spotlight=this.$el.find(".spotlight"),this._$backdrop=this.$el.find(".backdrop"),this._$carousel=this._$backdrop.find(".carousel"),this.$el.addClass("hidden"),this._appendElToMediaControl(),this}}]),e}(u.UICorePlugin);e["default"]=m,t.exports=e["default"]},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=function(){function t(t){return null==t?String(t):X[J.call(t)]||"object"}function e(e){return"function"==t(e)}function i(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function o(e){return"object"==t(e)}function s(t){return o(t)&&!i(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){return"number"==typeof t.length}function u(t){return P.call(t,function(t){return null!=t})}function c(t){return t.length>0?C.fn.concat.apply([],t):t}function l(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function h(t){return t in $?$[t]:$[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||A[l(t)]?e:e+"px"}function p(t){var e,n;return M[t]||(e=N.createElement(t),N.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),M[t]=n),M[t]}function d(t){return"children"in t?S.call(t.children):C.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function m(t,e,n){for(E in e)n&&(s(e[E])||K(e[E]))?(s(e[E])&&!s(t[E])&&(t[E]={}),K(e[E])&&!K(t[E])&&(t[E]=[]),m(t[E],e[E],n)):e[E]!==w&&(t[E]=e[E])}function v(t,e){return null==e?C(t):C(t).filter(e)}function g(t,n,i,r){return e(n)?n.call(t,i,r):n}function y(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function b(t,e){var n=t.className||"",i=n&&n.baseVal!==w;return e===w?i?n.baseVal:n:void(i?n.baseVal=e:t.className=e)}function x(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?C.parseJSON(t):t):t}catch(e){return t}}function _(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)_(t.childNodes[n],e)}var w,E,C,T,j,k,O=[],S=O.slice,P=O.filter,N=window.document,M={},$={},A={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},H=/^\s*<(\w+|!)[^>]*>/,L=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,D=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,R=/^(?:body|html)$/i,I=/([A-Z])/g,F=["val","css","html","text","data","width","height","offset"],q=["after","prepend","before","append"],z=N.createElement("table"),Z=N.createElement("tr"),B={tr:N.createElement("tbody"),tbody:z,thead:z,tfoot:z,td:Z,th:Z,"*":N.createElement("div")},V=/complete|loaded|interactive/,U=/^[\w-]*$/,X={},J=X.toString,W={},Y=N.createElement("div"),G={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},K=Array.isArray||function(t){return t instanceof Array};return W.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=Y).appendChild(t),i=~W.qsa(r,e).indexOf(t),o&&Y.removeChild(t),i},j=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},k=function(t){return P.call(t,function(e,n){return t.indexOf(e)==n})},W.fragment=function(t,e,n){var i,r,o;return L.test(t)&&(i=C(N.createElement(RegExp.$1))),i||(t.replace&&(t=t.replace(D,"<$1>")),e===w&&(e=H.test(t)&&RegExp.$1),e in B||(e="*"),o=B[e],o.innerHTML=""+t,i=C.each(S.call(o.childNodes),function(){o.removeChild(this)})),s(n)&&(r=C(i),C.each(n,function(t,e){F.indexOf(t)>-1?r[t](e):r.attr(t,e)})),i},W.Z=function(t,e){return t=t||[],t.__proto__=C.fn,t.selector=e||"",t},W.isZ=function(t){return t instanceof W.Z},W.init=function(t,n){var i;if(!t)return W.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&H.test(t))i=W.fragment(t,RegExp.$1,n),t=null;else{if(n!==w)return C(n).find(t);i=W.qsa(N,t)}else{if(e(t))return C(N).ready(t);if(W.isZ(t))return t;if(K(t))i=u(t);else if(o(t))i=[t],t=null;else if(H.test(t))i=W.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==w)return C(n).find(t);i=W.qsa(N,t)}}return W.Z(i,t)},C=function(t,e){return W.init(t,e)},C.extend=function(t){var e,n=S.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},W.qsa=function(t,e){var n,i="#"==e[0],o=!i&&"."==e[0],s=i||o?e.slice(1):e,a=U.test(s);return r(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:S.call(a&&!i?o?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},C.contains=N.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},C.type=t,C.isFunction=e,C.isWindow=i,C.isArray=K,C.isPlainObject=s,C.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},C.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},C.camelCase=j,C.trim=function(t){return null==t?"":String.prototype.trim.call(t)},C.uuid=0,C.support={},C.expr={},C.map=function(t,e){var n,i,r,o=[];if(a(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):C(P.call(this,function(e){return W.matches(e,t)}))},add:function(t,e){return C(k(this.concat(C(t,e))))},is:function(t){return this.length>0&&W.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==w)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):a(t)&&e(t.item)?S.call(t):C(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return C(n)},has:function(t){return this.filter(function(){return o(t)?C.contains(this,t):C(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!o(t)?t:C(t)},last:function(){var t=this[this.length-1];return t&&!o(t)?t:C(t)},find:function(t){var e,i=this;return e=t?"object"==("undefined"==typeof t?"undefined":n(t))?C(t).filter(function(){var t=this;return O.some.call(i,function(e){return C.contains(e,t)})}):1==this.length?C(W.qsa(this[0],t)):this.map(function(){return W.qsa(this,t)}):C()},closest:function(t,e){var i=this[0],o=!1;for("object"==("undefined"==typeof t?"undefined":n(t))&&(o=C(t));i&&!(o?o.indexOf(i)>=0:W.matches(i,t));)i=i!==e&&!r(i)&&i.parentNode;return C(i)},parents:function(t){for(var e=[],n=this;n.length>0;)n=C.map(n,function(t){return(t=t.parentNode)&&!r(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return v(e,t)},parent:function(t){return v(k(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return d(this)}),t)},contents:function(){return this.map(function(){return S.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return P.call(d(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return C.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=p(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var i=C(t).get(0),r=i.parentNode||this.length>1;return this.each(function(e){C(this).wrapAll(n?t.call(this,e):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){C(this[0]).before(t=C(t));for(var e;(e=t.children()).length;)t=e.first();C(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var i=C(this),r=i.contents(),o=n?t.call(this,e):t;r.length?r.wrapAll(o):i.append(o)})},unwrap:function(){return this.parent().each(function(){C(this).replaceWith(C(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=C(this);(t===w?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return C(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return C(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;C(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(o(t))for(E in t)y(this,E,t[E]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:w},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=G[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},data:function Q(t,e){var n="data-"+t.replace(I,"-$1").toLowerCase(),Q=1 in arguments?this.attr(n,e):this.attr(n);return null!==Q?x(Q):w},val:function(t){return 0 in arguments?this.each(function(e){this.value=g(this,t,e,this.value)}):this[0]&&(this[0].multiple?C(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=C(this),i=g(this,t,e,n.offset()),r=n.offsetParent().offset(),o={top:i.top-r.top,left:i.left-r.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function tt(e,n){if(arguments.length<2){var i,r=this[0];if(!r)return;if(i=getComputedStyle(r,""),"string"==typeof e)return r.style[j(e)]||i.getPropertyValue(e);if(K(e)){var o={};return C.each(e,function(t,e){o[e]=r.style[j(e)]||i.getPropertyValue(e)}),o}}var tt="";if("string"==t(e))n||0===n?tt=l(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(l(e))});else for(E in e)e[E]||0===e[E]?tt+=l(E)+":"+f(E,e[E])+";":this.each(function(){this.style.removeProperty(l(E))});return this.each(function(){this.style.cssText+=";"+tt})},index:function(t){return t?this.indexOf(C(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?O.some.call(this,function(t){return this.test(b(t))},h(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){T=[];var n=b(this),i=g(this,t,e,n);i.split(/\s+/g).forEach(function(t){C(this).hasClass(t)||T.push(t)},this),T.length&&b(this,n+(n?" ":"")+T.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===w)return b(this,"");T=b(this),g(this,t,e,T).split(/\s+/g).forEach(function(t){T=T.replace(h(t)," ")}),b(this,T.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var i=C(this),r=g(this,t,n,b(this));r.split(/\s+/g).forEach(function(t){(e===w?!i.hasClass(t):e)?i.addClass(t):i.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===w?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===w?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=R.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(C(t).css("margin-top"))||0,n.left-=parseFloat(C(t).css("margin-left"))||0,i.top+=parseFloat(C(e[0]).css("border-top-width"))||0,i.left+=parseFloat(C(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||N.body;t&&!R.test(t.nodeName)&&"static"==C(t).css("position");)t=t.offsetParent;return t})}},C.fn.detach=C.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});C.fn[t]=function(n){var o,s=this[0];return n===w?i(s)?s["inner"+e]:r(s)?s.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){s=C(this),s.css(t,g(this,n,e,s[t]()))})}}),q.forEach(function(e,n){var i=n%2;C.fn[e]=function(){var e,r,o=C.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:W.fragment(n)}),s=this.length>1;return o.length<1?this:this.each(function(t,e){r=i?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var a=C.contains(N.documentElement,r);o.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!r)return C(t).remove();r.insertBefore(t,e),a&&_(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},C.fn[i?e+"To":"insert"+(n?"Before":"After")]=function(t){return C(t)[e](this),this}}),W.Z.prototype=C.fn,W.uniq=k,W.deserializeValue=x,C.zepto=W,C}();!function(t){function e(t){return t._zid||(t._zid=f++)}function n(t,n,o,s){if(n=i(n),n.ns)var a=r(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||a.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!s||t.sel==s)})}function i(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function r(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in b||!!e}function s(t){return x[t]||y&&b[t]||t}function a(n,r,a,u,l,f,p){var d=e(n),m=v[d]||(v[d]=[]);r.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(a);var r=i(e);r.fn=a,r.sel=l,r.e in x&&(a=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?r.fn.apply(this,arguments):void 0}),r.del=f;var d=f||a;r.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==h?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},r.i=m.length,m.push(r),"addEventListener"in n&&n.addEventListener(s(r.e),r.proxy,o(r,p))})}function u(t,i,r,a,u){var c=e(t);(i||"").split(/\s/).forEach(function(e){n(t,e,r,a).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(s(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(C,function(t,i){var r=n[t];e[t]=function(){return this[i]=_,r&&r.apply(n,arguments)},e[i]=w}),(n.defaultPrevented!==h?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=_)),e}function l(t){var e,n={originalEvent:t};for(e in t)E.test(e)||t[e]===h||(n[e]=t[e]);return c(n,t)}var h,f=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,b={focus:"focusin",blur:"focusout"},x={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:a,remove:u},t.proxy=function(n,i){var r=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(i,r?r.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(i))return r?(r.unshift(n[i],n),t.proxy.apply(null,r)):t.proxy(n[i],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var _=function(){return!0},w=function(){return!1},E=/^([A-Z]|returnValue$|layer[XY]$)/,C={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,i,r,o){var s,c,f=this;return e&&!m(e)?(t.each(e,function(t,e){f.on(t,n,i,e,o)}),f):(m(n)||d(r)||r===!1||(r=i,i=n,n=h),(d(i)||i===!1)&&(r=i,i=h),r===!1&&(r=w),f.each(function(h,f){o&&(s=function(t){return u(f,t.type,r),r.apply(this,arguments)}),n&&(c=function(e){var i,o=t(e.target).closest(n,f).get(0);return o&&o!==f?(i=t.extend(l(e),{currentTarget:o,liveFired:f}),(s||r).apply(o,[i].concat(p.call(arguments,1)))):void 0}),a(f,e,r,i,n,c||s)}))},t.fn.off=function(e,n,i){var r=this;return e&&!m(e)?(t.each(e,function(t,e){r.off(t,n,e)}),r):(m(n)||d(i)||i===!1||(i=n,n=h),i===!1&&(i=w),r.each(function(){u(this,e,i,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,i){var r,o;return this.each(function(s,a){r=l(m(e)?t.Event(e):e),r._args=i,r.target=a,t.each(n(a,e.type||e),function(t,e){return o=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),c(n)}}(i),function(t){function e(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function n(t,n,i,r){return t.global?e(n||y,i,r):void 0}function i(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function r(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var i=e.context;return e.beforeSend.call(i,t,e)===!1||n(e,i,"ajaxBeforeSend",[t,e])===!1?!1:void n(e,i,"ajaxSend",[t,e])}function s(t,e,i,r){var o=i.context,s="success";i.success.call(o,t,s,e),r&&r.resolveWith(o,[t,s,e]),n(i,o,"ajaxSuccess",[e,i,t]),u(s,e,i)}function a(t,e,i,r,o){var s=r.context;r.error.call(s,i,e,t),o&&o.rejectWith(s,[i,e,t]),n(r,s,"ajaxError",[i,r,t||e]),u(e,i,r)}function u(t,e,i){var o=i.context;i.complete.call(o,e,t),n(i,o,"ajaxComplete",[e,i]),r(i)}function c(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==E?"html":t==w?"json":x.test(t)?"script":_.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function f(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=h(e.url,e.data),e.data=void 0)}function p(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function d(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+"["+(a||"object"==o||"array"==o?n:"")+"]"),!r&&s?e.add(u.name,u.value):"array"==o||!i&&"object"==o?d(e,u,i,n):e.add(n,u)})}var m,v,g=0,y=window.document,b=/)<[^<]*)*<\/script>/gi,x=/^(?:text|application)\/javascript/i,_=/^(?:text|application)\/xml/i,w="application/json",E="text/html",C=/^\s*$/,T=y.createElement("a");T.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var i,r,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"jsonp"+ ++g,l=y.createElement("script"),h=window[c],f=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:f};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(r),t(l).off().remove(),"error"!=o.type&&i?s(i[0],p,e,n):a(null,u||"error",p,e,n),window[c]=h,i&&t.isFunction(h)&&h(i[0]),h=i=void 0}),o(p,e)===!1?(f("abort"),p):(window[c]=function(){i=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),y.head.appendChild(l),e.timeout>0&&(r=setTimeout(function(){f("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:c,success:c,error:c,complete:c,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:w,xml:"application/xml, text/xml",html:E,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,r=t.extend({},e||{}),u=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===r[m]&&(r[m]=t.ajaxSettings[m]);i(r),r.crossDomain||(n=y.createElement("a"),n.href=r.url,n.href=n.href,r.crossDomain=T.protocol+"//"+T.host!=n.protocol+"//"+n.host),r.url||(r.url=window.location.toString()),f(r);var p=r.dataType,d=/\?.+=\?/.test(r.url);if(d&&(p="jsonp"),r.cache!==!1&&(e&&e.cache===!0||"script"!=p&&"jsonp"!=p)||(r.url=h(r.url,"_="+Date.now())),"jsonp"==p)return d||(r.url=h(r.url,r.jsonp?r.jsonp+"=?":r.jsonp===!1?"":"callback=?")),t.ajaxJSONP(r,u);var g,b=r.accepts[p],x={},_=function(t,e){x[t.toLowerCase()]=[t,e]},w=/^([\w-]+:)\/\//.test(r.url)?RegExp.$1:window.location.protocol,E=r.xhr(),j=E.setRequestHeader;if(u&&u.promise(E),r.crossDomain||_("X-Requested-With","XMLHttpRequest"),_("Accept",b||"*/*"),(b=r.mimeType||b)&&(b.indexOf(",")>-1&&(b=b.split(",",2)[0]),E.overrideMimeType&&E.overrideMimeType(b)),(r.contentType||r.contentType!==!1&&r.data&&"GET"!=r.type.toUpperCase())&&_("Content-Type",r.contentType||"application/x-www-form-urlencoded"),r.headers)for(v in r.headers)_(v,r.headers[v]);if(E.setRequestHeader=_,E.onreadystatechange=function(){if(4==E.readyState){E.onreadystatechange=c,clearTimeout(g);var e,n=!1;if(E.status>=200&&E.status<300||304==E.status||0==E.status&&"file:"==w){p=p||l(r.mimeType||E.getResponseHeader("content-type")),e=E.responseText;try{"script"==p?(0,eval)(e):"xml"==p?e=E.responseXML:"json"==p&&(e=C.test(e)?null:t.parseJSON(e))}catch(i){n=i}n?a(n,"parsererror",E,r,u):s(e,E,r,u)}else a(E.statusText||null,E.status?"error":"abort",E,r,u)}},o(E,r)===!1)return E.abort(),a(null,"abort",E,r,u),E;if(r.xhrFields)for(v in r.xhrFields)E[v]=r.xhrFields[v];var k="async"in r?r.async:!0;E.open(r.type,r.url,k,r.username,r.password);for(v in x)j.apply(E,x[v]);return r.timeout>0&&(g=setTimeout(function(){E.onreadystatechange=c,E.abort(),a(null,"timeout",E,r,u)},r.timeout)),E.send(r.data?r.data:null),E},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var r,o=this,s=e.split(/\s/),a=p(e,n,i),u=a.success;return s.length>1&&(a.url=s[0],r=s[1]),a.success=function(e){o.html(r?t("
").html(e.replace(b,"")).find(r):e),u&&u.apply(o,arguments)},t.ajax(a),this};var j=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(j(e)+"="+j(n))},d(i,e,n),i.join("&").replace(/%20/g,"+")}}(i),function(t){t.fn.serializeArray=function(){var e,n,i=[],r=function o(t){return t.forEach?t.forEach(o):void i.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(i,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&r(t(o).val())}),i},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(i),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(i),t.exports=i},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;eu;u++)a.push({url:t,time:s+u*o,w:n,h:i,x:u%r*n,y:Math.floor(u/r)*i});return a}}]),a(e,[{key:"bindEvents",value:function(){this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_MOUSEMOVE_SEEKBAR,this._onMouseMove),this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_MOUSELEAVE_SEEKBAR,this._onMouseLeave),this.listenTo(this.core.mediaControl,u.Events.MEDIACONTROL_RENDERED,this._onMediaControlRendered)}},{key:"_init",value:function(){this._loaded=!1,this._show=!1,this._hoverPosition=0,this._thumbs=[],this._$backdropCarouselImgs=[],this._loadThumbs()}},{key:"_loadThumbs",value:function(){var t=this;this._loadThumbnails(function(){t._loadBackdrop(),t._loaded=!0,t._renderPlugin()})}},{key:"_getOptions",value:function(){if(!("scrubThumbnails"in this.core.options))throw"'scrubThumbnails property missing from options object.";return this.core.options.scrubThumbnails}},{key:"_appendElToMediaControl",value:function(){this.core.mediaControl.$el.find(".media-control-background").first().after(this.el)}},{key:"_onMediaControlRendered",value:function(){this._createElements(),this._init()}},{key:"_onMouseMove",value:function(t){this._calculateHoverPosition(t),this._show=!0,this._renderPlugin()}},{key:"_onMouseLeave",value:function(){this._show=!1,this._renderPlugin()}},{key:"_calculateHoverPosition",value:function(t){var e=t.pageX-this.core.mediaControl.$seekBarContainer.offset().left;this._hoverPosition=Math.min(1,Math.max(e/this.core.mediaControl.$seekBarContainer.width(),0))}},{key:"_loadThumbnails",value:function(t){var e=this,n=this._getOptions().thumbs,i=n.length;if(0===i)return void t();for(var r=function(r){var o=n[r];e._thumbs.push(null);var s=r").addClass("thumbnail-img").attr("src",t.url),r=(0,l["default"])("
").addClass("thumbnail-container");return r.css("width",t.w*n),r.css("height",e),i.css({height:t.imageH*n,left:-1*t.x*n,top:-1*t.y*n}),r.append(i),r}},{key:"_loadBackdrop",value:function(){if(this._getOptions().backdropHeight)for(var t=this._$carousel,e=0;ey&&(y=Math.min(0,y+a));var b=Math.max(.6-Math.abs(y)/(2*a),.08);this._$backdropCarouselImgs[v].css("opacity",b)}}}},{key:"_updateSpotlightThumb",value:function(){if(this._getOptions().spotlightHeight){var t=this._hoverPosition,e=this.core.mediaControl.container.getDuration(),n=e*t,i=this._getThumbIndexForTime(n),r=this._thumbs[i],o=this._$spotlight;o.empty(),o.append(this._buildImg(r,this._getOptions().spotlightHeight));var s=this.$el.width(),a=o.width(),u=s*t-a/2;u=Math.max(Math.min(u,s-a),0),o.css("left",u)}}},{key:"_getThumbIndexForTime",value:function(t){for(var e=this._thumbs,n=e.length-1;n>=0;n--){var i=e[n];if(i.time<=t)return n}return 0}},{key:"_renderPlugin",value:function(){this._loaded&&(this._show&&this._getOptions().thumbs.length>0?(this.$el.removeClass("hidden"),this._updateCarousel(),this._updateSpotlightThumb()):this.$el.addClass("hidden"))}},{key:"_createElements",value:function(){this.$el.html(this.template({backdropHeight:this._getOptions().backdropHeight,spotlightHeight:this._getOptions().spotlightHeight})),this.$el.append(u.Styler.getStyleFor(d["default"])),this._$spotlight=this.$el.find(".spotlight"),this._$backdrop=this.$el.find(".backdrop"),this._$carousel=this._$backdrop.find(".carousel"),this.$el.addClass("hidden"),this._appendElToMediaControl()}}]),e}(u.UICorePlugin);e["default"]=m,t.exports=e["default"]},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=function(){function t(t){return null==t?String(t):X[J.call(t)]||"object"}function e(e){return"function"==t(e)}function i(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function o(e){return"object"==t(e)}function s(t){return o(t)&&!i(t)&&Object.getPrototypeOf(t)==Object.prototype}function a(t){return"number"==typeof t.length}function u(t){return P.call(t,function(t){return null!=t})}function c(t){return t.length>0?C.fn.concat.apply([],t):t}function l(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function h(t){return t in $?$[t]:$[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||A[l(t)]?e:e+"px"}function p(t){var e,n;return M[t]||(e=N.createElement(t),N.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),M[t]=n),M[t]}function d(t){return"children"in t?S.call(t.children):C.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function m(t,e,n){for(E in e)n&&(s(e[E])||K(e[E]))?(s(e[E])&&!s(t[E])&&(t[E]={}),K(e[E])&&!K(t[E])&&(t[E]=[]),m(t[E],e[E],n)):e[E]!==w&&(t[E]=e[E])}function v(t,e){return null==e?C(t):C(t).filter(e)}function g(t,n,i,r){return e(n)?n.call(t,i,r):n}function y(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function b(t,e){var n=t.className||"",i=n&&n.baseVal!==w;return e===w?i?n.baseVal:n:void(i?n.baseVal=e:t.className=e)}function x(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?C.parseJSON(t):t):t}catch(e){return t}}function _(t,e){e(t);for(var n=0,i=t.childNodes.length;i>n;n++)_(t.childNodes[n],e)}var w,E,C,T,j,k,O=[],S=O.slice,P=O.filter,N=window.document,M={},$={},A={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},H=/^\s*<(\w+|!)[^>]*>/,L=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,D=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,R=/^(?:body|html)$/i,I=/([A-Z])/g,F=["val","css","html","text","data","width","height","offset"],q=["after","prepend","before","append"],z=N.createElement("table"),Z=N.createElement("tr"),B={tr:N.createElement("tbody"),tbody:z,thead:z,tfoot:z,td:Z,th:Z,"*":N.createElement("div")},V=/complete|loaded|interactive/,U=/^[\w-]*$/,X={},J=X.toString,W={},Y=N.createElement("div"),G={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},K=Array.isArray||function(t){return t instanceof Array};return W.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var i,r=t.parentNode,o=!r;return o&&(r=Y).appendChild(t),i=~W.qsa(r,e).indexOf(t),o&&Y.removeChild(t),i},j=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},k=function(t){return P.call(t,function(e,n){return t.indexOf(e)==n})},W.fragment=function(t,e,n){var i,r,o;return L.test(t)&&(i=C(N.createElement(RegExp.$1))),i||(t.replace&&(t=t.replace(D,"<$1>")),e===w&&(e=H.test(t)&&RegExp.$1),e in B||(e="*"),o=B[e],o.innerHTML=""+t,i=C.each(S.call(o.childNodes),function(){o.removeChild(this)})),s(n)&&(r=C(i),C.each(n,function(t,e){F.indexOf(t)>-1?r[t](e):r.attr(t,e)})),i},W.Z=function(t,e){return t=t||[],t.__proto__=C.fn,t.selector=e||"",t},W.isZ=function(t){return t instanceof W.Z},W.init=function(t,n){var i;if(!t)return W.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&H.test(t))i=W.fragment(t,RegExp.$1,n),t=null;else{if(n!==w)return C(n).find(t);i=W.qsa(N,t)}else{if(e(t))return C(N).ready(t);if(W.isZ(t))return t;if(K(t))i=u(t);else if(o(t))i=[t],t=null;else if(H.test(t))i=W.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==w)return C(n).find(t);i=W.qsa(N,t)}}return W.Z(i,t)},C=function(t,e){return W.init(t,e)},C.extend=function(t){var e,n=S.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){m(t,n,e)}),t},W.qsa=function(t,e){var n,i="#"==e[0],o=!i&&"."==e[0],s=i||o?e.slice(1):e,a=U.test(s);return r(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:S.call(a&&!i?o?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},C.contains=N.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},C.type=t,C.isFunction=e,C.isWindow=i,C.isArray=K,C.isPlainObject=s,C.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},C.inArray=function(t,e,n){return O.indexOf.call(e,t,n)},C.camelCase=j,C.trim=function(t){return null==t?"":String.prototype.trim.call(t)},C.uuid=0,C.support={},C.expr={},C.map=function(t,e){var n,i,r,o=[];if(a(t))for(i=0;i=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return O.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):C(P.call(this,function(e){return W.matches(e,t)}))},add:function(t,e){return C(k(this.concat(C(t,e))))},is:function(t){return this.length>0&&W.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==w)this.each(function(e){t.call(this,e)||n.push(this)});else{var i="string"==typeof t?this.filter(t):a(t)&&e(t.item)?S.call(t):C(t);this.forEach(function(t){i.indexOf(t)<0&&n.push(t)})}return C(n)},has:function(t){return this.filter(function(){return o(t)?C.contains(this,t):C(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!o(t)?t:C(t)},last:function(){var t=this[this.length-1];return t&&!o(t)?t:C(t)},find:function(t){var e,i=this;return e=t?"object"==("undefined"==typeof t?"undefined":n(t))?C(t).filter(function(){var t=this;return O.some.call(i,function(e){return C.contains(e,t)})}):1==this.length?C(W.qsa(this[0],t)):this.map(function(){return W.qsa(this,t)}):C()},closest:function(t,e){var i=this[0],o=!1;for("object"==("undefined"==typeof t?"undefined":n(t))&&(o=C(t));i&&!(o?o.indexOf(i)>=0:W.matches(i,t));)i=i!==e&&!r(i)&&i.parentNode;return C(i)},parents:function(t){for(var e=[],n=this;n.length>0;)n=C.map(n,function(t){return(t=t.parentNode)&&!r(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return v(e,t)},parent:function(t){return v(k(this.pluck("parentNode")),t)},children:function(t){return v(this.map(function(){return d(this)}),t)},contents:function(){return this.map(function(){return S.call(this.childNodes)})},siblings:function(t){return v(this.map(function(t,e){return P.call(d(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return C.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=p(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var i=C(t).get(0),r=i.parentNode||this.length>1;return this.each(function(e){C(this).wrapAll(n?t.call(this,e):r?i.cloneNode(!0):i)})},wrapAll:function(t){if(this[0]){C(this[0]).before(t=C(t));for(var e;(e=t.children()).length;)t=e.first();C(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var i=C(this),r=i.contents(),o=n?t.call(this,e):t;r.length?r.wrapAll(o):i.append(o)})},unwrap:function(){return this.parent().each(function(){C(this).replaceWith(C(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=C(this);(t===w?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return C(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return C(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;C(this).empty().append(g(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=g(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(o(t))for(E in t)y(this,E,t[E]);else y(this,t,g(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:w},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){y(this,t)},this)})},prop:function(t,e){return t=G[t]||t,1 in arguments?this.each(function(n){this[t]=g(this,e,n,this[t])}):this[0]&&this[0][t]},data:function Q(t,e){var n="data-"+t.replace(I,"-$1").toLowerCase(),Q=1 in arguments?this.attr(n,e):this.attr(n);return null!==Q?x(Q):w},val:function(t){return 0 in arguments?this.each(function(e){this.value=g(this,t,e,this.value)}):this[0]&&(this[0].multiple?C(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=C(this),i=g(this,t,e,n.offset()),r=n.offsetParent().offset(),o={top:i.top-r.top,left:i.left-r.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function tt(e,n){if(arguments.length<2){var i,r=this[0];if(!r)return;if(i=getComputedStyle(r,""),"string"==typeof e)return r.style[j(e)]||i.getPropertyValue(e);if(K(e)){var o={};return C.each(e,function(t,e){o[e]=r.style[j(e)]||i.getPropertyValue(e)}),o}}var tt="";if("string"==t(e))n||0===n?tt=l(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(l(e))});else for(E in e)e[E]||0===e[E]?tt+=l(E)+":"+f(E,e[E])+";":this.each(function(){this.style.removeProperty(l(E))});return this.each(function(){this.style.cssText+=";"+tt})},index:function(t){return t?this.indexOf(C(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?O.some.call(this,function(t){return this.test(b(t))},h(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){T=[];var n=b(this),i=g(this,t,e,n);i.split(/\s+/g).forEach(function(t){C(this).hasClass(t)||T.push(t)},this),T.length&&b(this,n+(n?" ":"")+T.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===w)return b(this,"");T=b(this),g(this,t,e,T).split(/\s+/g).forEach(function(t){T=T.replace(h(t)," ")}),b(this,T.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var i=C(this),r=g(this,t,n,b(this));r.split(/\s+/g).forEach(function(t){(e===w?!i.hasClass(t):e)?i.addClass(t):i.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===w?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===w?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),i=R.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(C(t).css("margin-top"))||0,n.left-=parseFloat(C(t).css("margin-left"))||0,i.top+=parseFloat(C(e[0]).css("border-top-width"))||0,i.left+=parseFloat(C(e[0]).css("border-left-width"))||0,{top:n.top-i.top,left:n.left-i.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||N.body;t&&!R.test(t.nodeName)&&"static"==C(t).css("position");)t=t.offsetParent;return t})}},C.fn.detach=C.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});C.fn[t]=function(n){var o,s=this[0];return n===w?i(s)?s["inner"+e]:r(s)?s.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){s=C(this),s.css(t,g(this,n,e,s[t]()))})}}),q.forEach(function(e,n){var i=n%2;C.fn[e]=function(){var e,r,o=C.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:W.fragment(n)}),s=this.length>1;return o.length<1?this:this.each(function(t,e){r=i?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var a=C.contains(N.documentElement,r);o.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!r)return C(t).remove();r.insertBefore(t,e),a&&_(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},C.fn[i?e+"To":"insert"+(n?"Before":"After")]=function(t){return C(t)[e](this),this}}),W.Z.prototype=C.fn,W.uniq=k,W.deserializeValue=x,C.zepto=W,C}();!function(t){function e(t){return t._zid||(t._zid=f++)}function n(t,n,o,s){if(n=i(n),n.ns)var a=r(n.ns);return(v[e(t)]||[]).filter(function(t){return t&&(!n.e||t.e==n.e)&&(!n.ns||a.test(t.ns))&&(!o||e(t.fn)===e(o))&&(!s||t.sel==s)})}function i(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function r(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in b||!!e}function s(t){return x[t]||y&&b[t]||t}function a(n,r,a,u,l,f,p){var d=e(n),m=v[d]||(v[d]=[]);r.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(a);var r=i(e);r.fn=a,r.sel=l,r.e in x&&(a=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?r.fn.apply(this,arguments):void 0}),r.del=f;var d=f||a;r.proxy=function(t){if(t=c(t),!t.isImmediatePropagationStopped()){t.data=u;var e=d.apply(n,t._args==h?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},r.i=m.length,m.push(r),"addEventListener"in n&&n.addEventListener(s(r.e),r.proxy,o(r,p))})}function u(t,i,r,a,u){var c=e(t);(i||"").split(/\s/).forEach(function(e){n(t,e,r,a).forEach(function(e){delete v[c][e.i],"removeEventListener"in t&&t.removeEventListener(s(e.e),e.proxy,o(e,u))})})}function c(e,n){return!n&&e.isDefaultPrevented||(n||(n=e),t.each(C,function(t,i){var r=n[t];e[t]=function(){return this[i]=_,r&&r.apply(n,arguments)},e[i]=w}),(n.defaultPrevented!==h?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=_)),e}function l(t){var e,n={originalEvent:t};for(e in t)E.test(e)||t[e]===h||(n[e]=t[e]);return c(n,t)}var h,f=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,b={focus:"focusin",blur:"focusout"},x={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:a,remove:u},t.proxy=function(n,i){var r=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(i,r?r.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(i))return r?(r.unshift(n[i],n),t.proxy.apply(null,r)):t.proxy(n[i],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var _=function(){return!0},w=function(){return!1},E=/^([A-Z]|returnValue$|layer[XY]$)/,C={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,i,r,o){var s,c,f=this;return e&&!m(e)?(t.each(e,function(t,e){f.on(t,n,i,e,o)}),f):(m(n)||d(r)||r===!1||(r=i,i=n,n=h),(d(i)||i===!1)&&(r=i,i=h),r===!1&&(r=w),f.each(function(h,f){o&&(s=function(t){return u(f,t.type,r),r.apply(this,arguments)}),n&&(c=function(e){var i,o=t(e.target).closest(n,f).get(0);return o&&o!==f?(i=t.extend(l(e),{currentTarget:o,liveFired:f}),(s||r).apply(o,[i].concat(p.call(arguments,1)))):void 0}),a(f,e,r,i,n,c||s)}))},t.fn.off=function(e,n,i){var r=this;return e&&!m(e)?(t.each(e,function(t,e){r.off(t,n,e)}),r):(m(n)||d(i)||i===!1||(i=n,n=h),i===!1&&(i=w),r.each(function(){u(this,e,i,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):c(e),e._args=n,this.each(function(){e.type in b&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,i){var r,o;return this.each(function(s,a){r=l(m(e)?t.Event(e):e),r._args=i,r.target=a,t.each(n(a,e.type||e),function(t,e){return o=e.proxy(r),r.isImmediatePropagationStopped()?!1:void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),c(n)}}(i),function(t){function e(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}function n(t,n,i,r){return t.global?e(n||y,i,r):void 0}function i(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function r(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var i=e.context;return e.beforeSend.call(i,t,e)===!1||n(e,i,"ajaxBeforeSend",[t,e])===!1?!1:void n(e,i,"ajaxSend",[t,e])}function s(t,e,i,r){var o=i.context,s="success";i.success.call(o,t,s,e),r&&r.resolveWith(o,[t,s,e]),n(i,o,"ajaxSuccess",[e,i,t]),u(s,e,i)}function a(t,e,i,r,o){var s=r.context;r.error.call(s,i,e,t),o&&o.rejectWith(s,[i,e,t]),n(r,s,"ajaxError",[i,r,t||e]),u(e,i,r)}function u(t,e,i){var o=i.context;i.complete.call(o,e,t),n(i,o,"ajaxComplete",[e,i]),r(i)}function c(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==E?"html":t==w?"json":x.test(t)?"script":_.test(t)&&"xml")||"text"}function h(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function f(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=h(e.url,e.data),e.data=void 0)}function p(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}function d(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,u){o=t.type(u),r&&(n=i?r:r+"["+(a||"object"==o||"array"==o?n:"")+"]"),!r&&s?e.add(u.name,u.value):"array"==o||!i&&"object"==o?d(e,u,i,n):e.add(n,u)})}var m,v,g=0,y=window.document,b=/)<[^<]*)*<\/script>/gi,x=/^(?:text|application)\/javascript/i,_=/^(?:text|application)\/xml/i,w="application/json",E="text/html",C=/^\s*$/,T=y.createElement("a");T.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var i,r,u=e.jsonpCallback,c=(t.isFunction(u)?u():u)||"jsonp"+ ++g,l=y.createElement("script"),h=window[c],f=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:f};return n&&n.promise(p),t(l).on("load error",function(o,u){clearTimeout(r),t(l).off().remove(),"error"!=o.type&&i?s(i[0],p,e,n):a(null,u||"error",p,e,n),window[c]=h,i&&t.isFunction(h)&&h(i[0]),h=i=void 0}),o(p,e)===!1?(f("abort"),p):(window[c]=function(){i=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),y.head.appendChild(l),e.timeout>0&&(r=setTimeout(function(){f("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:c,success:c,error:c,complete:c,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:w,xml:"application/xml, text/xml",html:E,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,r=t.extend({},e||{}),u=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===r[m]&&(r[m]=t.ajaxSettings[m]);i(r),r.crossDomain||(n=y.createElement("a"),n.href=r.url,n.href=n.href,r.crossDomain=T.protocol+"//"+T.host!=n.protocol+"//"+n.host),r.url||(r.url=window.location.toString()),f(r);var p=r.dataType,d=/\?.+=\?/.test(r.url);if(d&&(p="jsonp"),r.cache!==!1&&(e&&e.cache===!0||"script"!=p&&"jsonp"!=p)||(r.url=h(r.url,"_="+Date.now())),"jsonp"==p)return d||(r.url=h(r.url,r.jsonp?r.jsonp+"=?":r.jsonp===!1?"":"callback=?")),t.ajaxJSONP(r,u);var g,b=r.accepts[p],x={},_=function(t,e){x[t.toLowerCase()]=[t,e]},w=/^([\w-]+:)\/\//.test(r.url)?RegExp.$1:window.location.protocol,E=r.xhr(),j=E.setRequestHeader;if(u&&u.promise(E),r.crossDomain||_("X-Requested-With","XMLHttpRequest"),_("Accept",b||"*/*"),(b=r.mimeType||b)&&(b.indexOf(",")>-1&&(b=b.split(",",2)[0]),E.overrideMimeType&&E.overrideMimeType(b)),(r.contentType||r.contentType!==!1&&r.data&&"GET"!=r.type.toUpperCase())&&_("Content-Type",r.contentType||"application/x-www-form-urlencoded"),r.headers)for(v in r.headers)_(v,r.headers[v]);if(E.setRequestHeader=_,E.onreadystatechange=function(){if(4==E.readyState){E.onreadystatechange=c,clearTimeout(g);var e,n=!1;if(E.status>=200&&E.status<300||304==E.status||0==E.status&&"file:"==w){p=p||l(r.mimeType||E.getResponseHeader("content-type")),e=E.responseText;try{"script"==p?(0,eval)(e):"xml"==p?e=E.responseXML:"json"==p&&(e=C.test(e)?null:t.parseJSON(e))}catch(i){n=i}n?a(n,"parsererror",E,r,u):s(e,E,r,u)}else a(E.statusText||null,E.status?"error":"abort",E,r,u)}},o(E,r)===!1)return E.abort(),a(null,"abort",E,r,u),E;if(r.xhrFields)for(v in r.xhrFields)E[v]=r.xhrFields[v];var k="async"in r?r.async:!0;E.open(r.type,r.url,k,r.username,r.password);for(v in x)j.apply(E,x[v]);return r.timeout>0&&(g=setTimeout(function(){E.onreadystatechange=c,E.abort(),a(null,"timeout",E,r,u)},r.timeout)),E.send(r.data?r.data:null),E},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var r,o=this,s=e.split(/\s/),a=p(e,n,i),u=a.success;return s.length>1&&(a.url=s[0],r=s[1]),a.success=function(e){o.html(r?t("
").html(e.replace(b,"")).find(r):e),u&&u.apply(o,arguments)},t.ajax(a),this};var j=encodeURIComponent;t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(j(e)+"="+j(n))},d(i,e,n),i.join("&").replace(/%20/g,"+")}}(i),function(t){t.fn.serializeArray=function(){var e,n,i=[],r=function o(t){return t.forEach?t.forEach(o):void i.push({name:e,value:t})};return this[0]&&t.each(this[0].elements,function(i,o){n=o.type,e=o.name,e&&"fieldset"!=o.nodeName.toLowerCase()&&!o.disabled&&"submit"!=n&&"reset"!=n&&"button"!=n&&"file"!=n&&("radio"!=n&&"checkbox"!=n||o.checked)&&r(t(o).val())}),i},t.fn.serialize=function(){var t=[];return this.serializeArray().forEach(function(e){t.push(encodeURIComponent(e.name)+"="+encodeURIComponent(e.value))}),t.join("&")},t.fn.submit=function(e){if(0 in arguments)this.bind("submit",e);else if(this.length){var n=t.Event("submit");this.eq(0).trigger(n),n.isDefaultPrevented()||this.get(0).submit()}return this}}(i),function(t){"__proto__"in{}||t.extend(t.zepto,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(i),t.exports=i},function(t,e){"use strict";t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e