UNPKG

clappr

Version:

An extensible media player for the web

2 lines 386 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.Clappr=t():e.Clappr=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="<%=baseUrl%>/",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(96),o=r(i),a=n(2),s=r(a),l=n(1),u=r(l),c=n(7),f=r(c),d=n(18),h=r(d),p=n(19),y=r(p),g=n(23),v=r(g),m=n(20),b=r(m),E=n(13),_=r(E),A=n(15),T=r(A),S=n(11),w=r(S),L=n(35),k=r(L),R=n(36),O=r(R),C=n(37),P=r(C),I=n(16),D=r(I),x=n(38),N=r(x),M=n(21),F=r(M),B=n(24),j=r(B),U=n(39),G=r(U),Y=n(40),$=r(Y),V=n(41),K=r(V),H=n(42),z=r(H),W=n(22),q=r(W),X=n(43),Z=r(X),J=n(44),Q=r(J),ee=n(45),te=r(ee),ne=n(25),re=r(ne),ie=n(8),oe=r(ie),ae=n(9),se=r(ae),le=n(3),ue=r(le),ce="0.2.49";t["default"]={Player:o["default"],Mediator:D["default"],Events:u["default"],Browser:w["default"],PlayerInfo:F["default"],MediaControl:N["default"],ContainerPlugin:h["default"],UIContainerPlugin:b["default"],CorePlugin:y["default"],UICorePlugin:v["default"],Playback:f["default"],Container:k["default"],Core:O["default"],Loader:P["default"],BaseObject:_["default"],UIObject:T["default"],Utils:s["default"],BaseFlashPlayback:j["default"],Flash:G["default"],FlasHLS:$["default"],HLS:K["default"],HTML5Audio:z["default"],HTML5Video:q["default"],HTMLImg:Z["default"],NoOp:Q["default"],Poster:te["default"],Log:re["default"],Styler:oe["default"],version:ce,template:se["default"],$:ue["default"]},e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=n(25),s=r(a),l=n(2),u=n(84),c=r(u),f=Array.prototype.slice,d=/\s+/,h=function(e,t,n,r){if(!n)return!0;if("object"===("undefined"==typeof n?"undefined":o(n))){for(var i in n)e[t].apply(e,[i,n[i]].concat(r));return!1}if(d.test(n)){for(var a=n.split(d),s=0,l=a.length;l>s;s++)e[t].apply(e,[a[s]].concat(r));return!1}return!0},p=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}},y=function(){function e(){i(this,e)}return e.prototype.on=function(e,t,n){if(!h(this,"on",e,[t,n])||!t)return this;this._events||(this._events={});var r=this._events[e]||(this._events[e]=[]);return r.push({callback:t,context:n,ctx:n||this}),this},e.prototype.once=function t(e,n,r){if(!h(this,"once",e,[n,r])||!n)return this;var i=this,t=(0,c["default"])(function(){i.off(e,t),n.apply(this,arguments)});return t._callback=n,this.on(e,t,r)},e.prototype.off=function(e,t,n){var r,i,o,a,s,l,u,c;if(!this._events||!h(this,"off",e,[t,n]))return this;if(!e&&!t&&!n)return this._events=void 0,this;for(a=e?[e]:Object.keys(this._events),s=0,l=a.length;l>s;s++)if(e=a[s],o=this._events[e]){if(this._events[e]=r=[],t||n)for(u=0,c=o.length;c>u;u++)i=o[u],(t&&t!==i.callback&&t!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[e]}return this},e.prototype.trigger=function(e){var t=this.name||this.constructor.name;try{if(s["default"].debug.apply(s["default"],[t].concat(Array.prototype.slice.call(arguments))),!this._events)return this;var n=f.call(arguments,1);if(!h(this,"trigger",e,n))return this;var r=this._events[e],i=this._events.all;r&&p(r,n),i&&p(i,arguments)}catch(o){s["default"].error.apply(s["default"],[t,"error on event",e,"trigger","-",o])}return this},e.prototype.stopListening=function(e,t,n){var r=this._listeningTo;if(!r)return this;var i=!t&&!n;n||"object"!==("undefined"==typeof t?"undefined":o(t))||(n=this),e&&((r={})[e._listenId]=e);for(var a in r)e=r[a],e.off(t,n,this),(i||0===Object.keys(e._events).length)&&delete this._listeningTo[a];return this},e}();t["default"]=y;var g={listenTo:"on",listenToOnce:"once"};Object.keys(g).forEach(function(e){y.prototype[e]=function(t,n,r){var i=this._listeningTo||(this._listeningTo={}),a=t._listenId||(t._listenId=(0,l.uniqueId)("l"));return i[a]=t,r||"object"!==("undefined"==typeof n?"undefined":o(n))||(r=this),t[g[e]](n,r,this),this}}),y.PLAYER_READY="ready",y.PLAYER_RESIZE="resize",y.PLAYER_FULLSCREEN="fullscreen",y.PLAYER_PLAY="play",y.PLAYER_PAUSE="pause",y.PLAYER_STOP="stop",y.PLAYER_ENDED="ended",y.PLAYER_SEEK="seek",y.PLAYER_ERROR="error",y.PLAYER_TIMEUPDATE="timeupdate",y.PLAYER_VOLUMEUPDATE="volumeupdate",y.PLAYBACK_PROGRESS="playback:progress",y.PLAYBACK_TIMEUPDATE="playback:timeupdate",y.PLAYBACK_READY="playback:ready",y.PLAYBACK_BUFFERING="playback:buffering",y.PLAYBACK_BUFFERFULL="playback:bufferfull",y.PLAYBACK_SETTINGSUPDATE="playback:settingsupdate",y.PLAYBACK_LOADEDMETADATA="playback:loadedmetadata",y.PLAYBACK_HIGHDEFINITIONUPDATE="playback:highdefinitionupdate",y.PLAYBACK_BITRATE="playback:bitrate",y.PLAYBACK_LEVELS_AVAILABLE="playback:levels:available",y.PLAYBACK_LEVEL_SWITCH_START="playback:levels:switch:start",y.PLAYBACK_LEVEL_SWITCH_END="playback:levels:switch:end",y.PLAYBACK_PLAYBACKSTATE="playback:playbackstate",y.PLAYBACK_DVR="playback:dvr",y.PLAYBACK_MEDIACONTROL_DISABLE="playback:mediacontrol:disable",y.PLAYBACK_MEDIACONTROL_ENABLE="playback:mediacontrol:enable",y.PLAYBACK_ENDED="playback:ended",y.PLAYBACK_PLAY="playback:play",y.PLAYBACK_PAUSE="playback:pause",y.PLAYBACK_STOP="playback:stop",y.PLAYBACK_ERROR="playback:error",y.PLAYBACK_STATS_ADD="playback:stats:add",y.PLAYBACK_FRAGMENT_LOADED="playback:fragment:loaded",y.PLAYBACK_LEVEL_SWITCH="playback:level:switch",y.CORE_OPTIONS_CHANGE="core:options:change",y.CORE_READY="core:ready",y.CORE_FULLSCREEN="core:fullscreen",y.CONTAINER_PLAYBACKSTATE="container:playbackstate",y.CONTAINER_PLAYBACKDVRSTATECHANGED="container:dvr",y.CONTAINER_BITRATE="container:bitrate",y.CONTAINER_STATS_REPORT="container:stats:report",y.CONTAINER_DESTROYED="container:destroyed",y.CONTAINER_READY="container:ready",y.CONTAINER_ERROR="container:error",y.CONTAINER_LOADEDMETADATA="container:loadedmetadata",y.CONTAINER_TIMEUPDATE="container:timeupdate",y.CONTAINER_PROGRESS="container:progress",y.CONTAINER_PLAY="container:play",y.CONTAINER_STOP="container:stop",y.CONTAINER_PAUSE="container:pause",y.CONTAINER_ENDED="container:ended",y.CONTAINER_CLICK="container:click",y.CONTAINER_DBLCLICK="container:dblclick",y.CONTAINER_CONTEXTMENU="container:contextmenu",y.CONTAINER_MOUSE_ENTER="container:mouseenter",y.CONTAINER_MOUSE_LEAVE="container:mouseleave",y.CONTAINER_SEEK="container:seek",y.CONTAINER_VOLUME="container:volume",y.CONTAINER_FULLSCREEN="container:fullscreen",y.CONTAINER_STATE_BUFFERING="container:state:buffering",y.CONTAINER_STATE_BUFFERFULL="container:state:bufferfull",y.CONTAINER_SETTINGSUPDATE="container:settingsupdate",y.CONTAINER_HIGHDEFINITIONUPDATE="container:highdefinitionupdate",y.CONTAINER_MEDIACONTROL_SHOW="container:mediacontrol:show",y.CONTAINER_MEDIACONTROL_HIDE="container:mediacontrol:hide",y.CONTAINER_MEDIACONTROL_DISABLE="container:mediacontrol:disable",y.CONTAINER_MEDIACONTROL_ENABLE="container:mediacontrol:enable",y.CONTAINER_STATS_ADD="container:stats:add",y.CONTAINER_OPTIONS_CHANGE="container:options:change",y.MEDIACONTROL_RENDERED="mediacontrol:rendered",y.MEDIACONTROL_FULLSCREEN="mediacontrol:fullscreen",y.MEDIACONTROL_SHOW="mediacontrol:show",y.MEDIACONTROL_HIDE="mediacontrol:hide",y.MEDIACONTROL_MOUSEMOVE_SEEKBAR="mediacontrol:mousemove:seekbar",y.MEDIACONTROL_MOUSELEAVE_SEEKBAR="mediacontrol:mouseleave:seekbar",y.MEDIACONTROL_PLAYING="mediacontrol:playing",y.MEDIACONTROL_NOTPLAYING="mediacontrol:notplaying",y.MEDIACONTROL_CONTAINERCHANGED="mediacontrol:containerchanged",y.CORE_CONTAINERS_CREATED="core:containers:created",e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function s(e,t){if(t)for(var n in t){var r=Object.getOwnPropertyDescriptor(t,n);r?Object.defineProperty(e,n,r):e[n]=t[n]}return e}function l(e,t){var n=function(e){function n(){i(this,n);for(var r=arguments.length,a=Array(r),s=0;r>s;s++)a[s]=arguments[s];var l=o(this,e.call.apply(e,[this].concat(a)));return t.initialize&&t.initialize.apply(l,a),l}return a(n,e),n}(e);return s(n.prototype,t),n}function u(e,t){if(!isFinite(e))return"--:--";e=1e3*e,e=parseInt(e/1e3);var n=e%60;e=parseInt(e/60);var r=e%60;e=parseInt(e/60);var i=e%24,o=parseInt(e/24),a="";return o&&o>0&&(a+=o+":",1>i&&(a+="00:")),(i&&i>0||t)&&(a+=("0"+i).slice(-2)+":"),a+=("0"+r).slice(-2)+":",a+=("0"+n).slice(-2),a.trim()}function c(){var e=arguments.length<=0||void 0===arguments[0]?"t":arguments[0],t=0,n=_.params[e]||_.hashParams[e]||"",r=n.match(/[0-9]+[hms]+/g)||[];if(r.length>0){var i={h:3600,m:60,s:1};r.forEach(function(e){if(e){var n=e[e.length-1],r=parseInt(e.slice(0,e.length-1),10);t+=r*i[n]}})}else n&&(t=parseInt(n,10));return t}function f(e){A[e]||(A[e]=0);var t=++A[e];return e+t}function d(e){return e-parseFloat(e)+1>=0}function h(){var e=document.getElementsByTagName("script");return e[e.length-1].src}function p(){return window.navigator&&window.navigator.language?window.navigator.language.toLowerCase():null}Object.defineProperty(t,"__esModule",{value:!0}),t.cancelAnimationFrame=t.requestAnimationFrame=t.QueryString=t.Config=t.Fullscreen=void 0;var y=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.extend=l,t.formatTime=u,t.seekStringToSeconds=c,t.uniqueId=f,t.isNumber=d,t.currentScriptUrl=h,t.getBrowserLanguage=p;var g=n(11),v=r(g),m=n(3),b=(r(m),t.Fullscreen={isFullscreen:function(){return!!(document.webkitFullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement)},requestFullscreen:function(e){e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.msRequestFullscreen?e.msRequestFullscreen():e.querySelector&&e.querySelector("video")&&e.querySelector("video").webkitEnterFullScreen&&e.querySelector("video").webkitEnterFullScreen()},cancelFullscreen:function(){document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen?document.webkitCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen()}}),E=t.Config=function(){function e(){i(this,e)}return e._defaultConfig=function(){return{volume:{value:100,parse:parseInt}}},e._defaultValueFor=function(e){try{return this._defaultConfig()[e].parse(this._defaultConfig()[e].value)}catch(t){return}},e._createKeyspace=function(e){return"clappr."+document.domain+"."+e},e.restore=function(e){return v["default"].hasLocalstorage&&localStorage[this._createKeyspace(e)]?this._defaultConfig()[e].parse(localStorage[this._createKeyspace(e)]):this._defaultValueFor(e)},e.persist=function(e,t){if(v["default"].hasLocalstorage)try{return localStorage[this._createKeyspace(e)]=t,!0}catch(n){return!1}},e}(),_=t.QueryString=function(){function e(){i(this,e)}return e.parse=function(e){for(var t,n=/\+/g,r=/([^&=]+)=?([^&]*)/g,i=function(e){return decodeURIComponent(e.replace(n," "))},o={};t=r.exec(e);)o[i(t[1]).toLowerCase()]=i(t[2]);return o},y(e,null,[{key:"params",get:function(){var e=window.location.search.substring(1);return e!==this.query&&(this._urlParams=this.parse(e),this.query=e),this._urlParams}},{key:"hashParams",get:function(){var e=window.location.hash.substring(1);return e!==this.hash&&(this._hashParams=this.parse(e),this.hash=e),this._hashParams}}]),e}(),A={},T=t.requestAnimationFrame=(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}).bind(window),S=t.cancelAnimationFrame=(window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout).bind(window);t["default"]={Config:E,Fullscreen:b,QueryString:_,extend:l,formatTime:u,seekStringToSeconds:c,uniqueId:f,currentScriptUrl:h,isNumber:d,requestAnimationFrame:T,cancelAnimationFrame:S,getBrowserLanguage:p}},function(e,t){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},r=function(){function e(e){return null==e?String(e):q[X.call(e)]||"object"}function t(t){return"function"==e(t)}function r(e){return null!=e&&e==e.window}function i(e){return null!=e&&e.nodeType==e.DOCUMENT_NODE}function o(t){return"object"==e(t)}function a(e){return o(e)&&!r(e)&&Object.getPrototypeOf(e)==Object.prototype}function s(e){return"number"==typeof e.length}function l(e){return P.call(e,function(e){return null!=e})}function u(e){return e.length>0?w.fn.concat.apply([],e):e}function c(e){return e.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 f(e){return e in N?N[e]:N[e]=new RegExp("(^|\\s)"+e+"(\\s|$)")}function d(e,t){return"number"!=typeof t||M[c(e)]?t:t+"px"}function h(e){var t,n;return x[e]||(t=D.createElement(e),D.body.appendChild(t),n=getComputedStyle(t,"").getPropertyValue("display"),t.parentNode.removeChild(t),"none"==n&&(n="block"),x[e]=n),x[e]}function p(e){return"children"in e?I.call(e.children):w.map(e.childNodes,function(e){return 1==e.nodeType?e:void 0})}function y(e,t){var n,r=e?e.length:0;for(n=0;r>n;n++)this[n]=e[n];this.length=r,this.selector=t||""}function g(e,t,n){for(S in t)n&&(a(t[S])||ee(t[S]))?(a(t[S])&&!a(e[S])&&(e[S]={}),ee(t[S])&&!ee(e[S])&&(e[S]=[]),g(e[S],t[S],n)):t[S]!==T&&(e[S]=t[S])}function v(e,t){return null==t?w(e):w(e).filter(t)}function m(e,n,r,i){return t(n)?n.call(e,r,i):n}function b(e,t,n){null==n?e.removeAttribute(t):e.setAttribute(t,n)}function E(e,t){var n=e.className||"",r=n&&n.baseVal!==T;return t===T?r?n.baseVal:n:void(r?n.baseVal=t:e.className=t)}function _(e){try{return e?"true"==e||("false"==e?!1:"null"==e?null:+e+""==e?+e:/^[\[\{]/.test(e)?w.parseJSON(e):e):e}catch(t){return e}}function A(e,t){t(e);for(var n=0,r=e.childNodes.length;r>n;n++)A(e.childNodes[n],t)}var T,S,w,L,k,R,O=[],C=O.concat,P=O.filter,I=O.slice,D=window.document,x={},N={},M={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},F=/^\s*<(\w+|!)[^>]*>/,B=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,j=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,U=/^(?:body|html)$/i,G=/([A-Z])/g,Y=["val","css","html","text","data","width","height","offset"],$=["after","prepend","before","append"],V=D.createElement("table"),K=D.createElement("tr"),H={tr:D.createElement("tbody"),tbody:V,thead:V,tfoot:V,td:K,th:K,"*":D.createElement("div")},z=/complete|loaded|interactive/,W=/^[\w-]*$/,q={},X=q.toString,Z={},J=D.createElement("div"),Q={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},ee=Array.isArray||function(e){return e instanceof Array};return Z.matches=function(e,t){if(!t||!e||1!==e.nodeType)return!1;var n=e.webkitMatchesSelector||e.mozMatchesSelector||e.oMatchesSelector||e.matchesSelector;if(n)return n.call(e,t);var r,i=e.parentNode,o=!i;return o&&(i=J).appendChild(e),r=~Z.qsa(i,t).indexOf(e),o&&J.removeChild(e),r},k=function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},R=function(e){return P.call(e,function(t,n){return e.indexOf(t)==n})},Z.fragment=function(e,t,n){var r,i,o;return B.test(e)&&(r=w(D.createElement(RegExp.$1))),r||(e.replace&&(e=e.replace(j,"<$1></$2>")),t===T&&(t=F.test(e)&&RegExp.$1),t in H||(t="*"),o=H[t],o.innerHTML=""+e,r=w.each(I.call(o.childNodes),function(){o.removeChild(this)})),a(n)&&(i=w(r),w.each(n,function(e,t){Y.indexOf(e)>-1?i[e](t):i.attr(e,t)})),r},Z.Z=function(e,t){return new y(e,t)},Z.isZ=function(e){return e instanceof Z.Z},Z.init=function(e,n){var r;if(!e)return Z.Z();if("string"==typeof e)if(e=e.trim(),"<"==e[0]&&F.test(e))r=Z.fragment(e,RegExp.$1,n),e=null;else{if(n!==T)return w(n).find(e);r=Z.qsa(D,e)}else{if(t(e))return w(D).ready(e);if(Z.isZ(e))return e;if(ee(e))r=l(e);else if(o(e))r=[e],e=null;else if(F.test(e))r=Z.fragment(e.trim(),RegExp.$1,n),e=null;else{if(n!==T)return w(n).find(e);r=Z.qsa(D,e)}}return Z.Z(r,e)},w=function(e,t){return Z.init(e,t)},w.extend=function(e){var t,n=I.call(arguments,1);return"boolean"==typeof e&&(t=e,e=n.shift()),n.forEach(function(n){g(e,n,t)}),e},Z.qsa=function(e,t){var n,r="#"==t[0],i=!r&&"."==t[0],o=r||i?t.slice(1):t,a=W.test(o);return e.getElementById&&a&&r?(n=e.getElementById(o))?[n]:[]:1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType?[]:I.call(a&&!r&&e.getElementsByClassName?i?e.getElementsByClassName(o):e.getElementsByTagName(t):e.querySelectorAll(t))},w.contains=D.documentElement.contains?function(e,t){return e!==t&&e.contains(t)}:function(e,t){for(;t&&(t=t.parentNode);)if(t===e)return!0;return!1},w.type=e,w.isFunction=t,w.isWindow=r,w.isArray=ee,w.isPlainObject=a,w.isEmptyObject=function(e){var t;for(t in e)return!1;return!0},w.inArray=function(e,t,n){return O.indexOf.call(t,e,n)},w.camelCase=k,w.trim=function(e){return null==e?"":String.prototype.trim.call(e)},w.uuid=0,w.support={},w.expr={},w.noop=function(){},w.map=function(e,t){var n,r,i,o=[];if(s(e))for(r=0;r<e.length;r++)n=t(e[r],r),null!=n&&o.push(n);else for(i in e)n=t(e[i],i),null!=n&&o.push(n);return u(o)},w.each=function(e,t){var n,r;if(s(e)){for(n=0;n<e.length;n++)if(t.call(e[n],n,e[n])===!1)return e}else for(r in e)if(t.call(e[r],r,e[r])===!1)return e;return e},w.grep=function(e,t){return P.call(e,t)},window.JSON&&(w.parseJSON=JSON.parse),w.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){q["[object "+t+"]"]=t.toLowerCase()}),w.fn={constructor:Z.Z,length:0,forEach:O.forEach,reduce:O.reduce,push:O.push,sort:O.sort,splice:O.splice,indexOf:O.indexOf,concat:function(){var e,t,n=[];for(e=0;e<arguments.length;e++)t=arguments[e],n[e]=Z.isZ(t)?t.toArray():t;return C.apply(Z.isZ(this)?this.toArray():this,n)},map:function(e){return w(w.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return w(I.apply(this,arguments))},ready:function(e){return z.test(D.readyState)&&D.body?e(w):D.addEventListener("DOMContentLoaded",function(){e(w)},!1),this},get:function(e){return e===T?I.call(this):this[e>=0?e:e+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(e){return O.every.call(this,function(t,n){return e.call(t,n,t)!==!1}),this},filter:function(e){return t(e)?this.not(this.not(e)):w(P.call(this,function(t){return Z.matches(t,e)}))},add:function(e,t){return w(R(this.concat(w(e,t))))},is:function(e){return this.length>0&&Z.matches(this[0],e)},not:function(e){var n=[];if(t(e)&&e.call!==T)this.each(function(t){e.call(this,t)||n.push(this)});else{var r="string"==typeof e?this.filter(e):s(e)&&t(e.item)?I.call(e):w(e);this.forEach(function(e){r.indexOf(e)<0&&n.push(e)})}return w(n)},has:function(e){return this.filter(function(){return o(e)?w.contains(this,e):w(this).find(e).size()})},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},first:function(){var e=this[0];return e&&!o(e)?e:w(e)},last:function(){var e=this[this.length-1];return e&&!o(e)?e:w(e)},find:function(e){var t,r=this;return t=e?"object"==("undefined"==typeof e?"undefined":n(e))?w(e).filter(function(){var e=this;return O.some.call(r,function(t){return w.contains(t,e)})}):1==this.length?w(Z.qsa(this[0],e)):this.map(function(){return Z.qsa(this,e)}):w()},closest:function(e,t){var r=this[0],o=!1;for("object"==("undefined"==typeof e?"undefined":n(e))&&(o=w(e));r&&!(o?o.indexOf(r)>=0:Z.matches(r,e));)r=r!==t&&!i(r)&&r.parentNode;return w(r)},parents:function(e){for(var t=[],n=this;n.length>0;)n=w.map(n,function(e){return(e=e.parentNode)&&!i(e)&&t.indexOf(e)<0?(t.push(e),e):void 0});return v(t,e)},parent:function(e){return v(R(this.pluck("parentNode")),e)},children:function(e){return v(this.map(function(){return p(this)}),e)},contents:function(){return this.map(function(){return this.contentDocument||I.call(this.childNodes)})},siblings:function(e){return v(this.map(function(e,t){return P.call(p(t.parentNode),function(e){return e!==t})}),e)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(e){return w.map(this,function(t){return t[e]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(e){return this.before(e).remove()},wrap:function(e){var n=t(e);if(this[0]&&!n)var r=w(e).get(0),i=r.parentNode||this.length>1;return this.each(function(t){w(this).wrapAll(n?e.call(this,t):i?r.cloneNode(!0):r)})},wrapAll:function(e){if(this[0]){w(this[0]).before(e=w(e));for(var t;(t=e.children()).length;)e=t.first();w(e).append(this)}return this},wrapInner:function(e){var n=t(e);return this.each(function(t){var r=w(this),i=r.contents(),o=n?e.call(this,t):e;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){w(this).replaceWith(w(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(e){return this.each(function(){var t=w(this);(e===T?"none"==t.css("display"):e)?t.show():t.hide()})},prev:function(e){return w(this.pluck("previousElementSibling")).filter(e||"*")},next:function(e){return w(this.pluck("nextElementSibling")).filter(e||"*")},html:function(e){return 0 in arguments?this.each(function(t){var n=this.innerHTML;w(this).empty().append(m(this,e,t,n))}):0 in this?this[0].innerHTML:null},text:function(e){return 0 in arguments?this.each(function(t){var n=m(this,e,t,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(e,t){var n;return"string"!=typeof e||1 in arguments?this.each(function(n){if(1===this.nodeType)if(o(e))for(S in e)b(this,S,e[S]);else b(this,e,m(this,t,n,this.getAttribute(e)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(e))&&e in this[0]?this[0][e]:n:T},removeAttr:function(e){return this.each(function(){1===this.nodeType&&e.split(" ").forEach(function(e){b(this,e)},this)})},prop:function(e,t){return e=Q[e]||e,1 in arguments?this.each(function(n){this[e]=m(this,t,n,this[e])}):this[0]&&this[0][e]},data:function(e,t){var n="data-"+e.replace(G,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,t):this.attr(n);return null!==r?_(r):T},val:function(e){return 0 in arguments?this.each(function(t){this.value=m(this,e,t,this.value)}):this[0]&&(this[0].multiple?w(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(e){if(e)return this.each(function(t){var n=w(this),r=m(this,e,t,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;if(!w.contains(D.documentElement,this[0]))return{top:0,left:0};var t=this[0].getBoundingClientRect();return{left:t.left+window.pageXOffset,top:t.top+window.pageYOffset,width:Math.round(t.width),height:Math.round(t.height)}},css:function(t,n){if(arguments.length<2){var r,i=this[0];if(!i)return;if(r=getComputedStyle(i,""),"string"==typeof t)return i.style[k(t)]||r.getPropertyValue(t);if(ee(t)){var o={};return w.each(t,function(e,t){o[t]=i.style[k(t)]||r.getPropertyValue(t)}),o}}var a="";if("string"==e(t))n||0===n?a=c(t)+":"+d(t,n):this.each(function(){this.style.removeProperty(c(t))});else for(S in t)t[S]||0===t[S]?a+=c(S)+":"+d(S,t[S])+";":this.each(function(){this.style.removeProperty(c(S))});return this.each(function(){this.style.cssText+=";"+a})},index:function(e){return e?this.indexOf(w(e)[0]):this.parent().children().indexOf(this[0])},hasClass:function(e){return e?O.some.call(this,function(e){return this.test(E(e))},f(e)):!1},addClass:function(e){return e?this.each(function(t){if("className"in this){L=[];var n=E(this),r=m(this,e,t,n);r.split(/\s+/g).forEach(function(e){w(this).hasClass(e)||L.push(e)},this),L.length&&E(this,n+(n?" ":"")+L.join(" "))}}):this},removeClass:function(e){return this.each(function(t){if("className"in this){if(e===T)return E(this,"");L=E(this),m(this,e,t,L).split(/\s+/g).forEach(function(e){L=L.replace(f(e)," ")}),E(this,L.trim())}})},toggleClass:function(e,t){return e?this.each(function(n){var r=w(this),i=m(this,e,n,E(this));i.split(/\s+/g).forEach(function(e){(t===T?!r.hasClass(e):t)?r.addClass(e):r.removeClass(e)})}):this},scrollTop:function(e){if(this.length){var t="scrollTop"in this[0];return e===T?t?this[0].scrollTop:this[0].pageYOffset:this.each(t?function(){this.scrollTop=e}:function(){this.scrollTo(this.scrollX,e)})}},scrollLeft:function(e){if(this.length){var t="scrollLeft"in this[0];return e===T?t?this[0].scrollLeft:this[0].pageXOffset:this.each(t?function(){this.scrollLeft=e}:function(){this.scrollTo(e,this.scrollY)})}},position:function(){if(this.length){var e=this[0],t=this.offsetParent(),n=this.offset(),r=U.test(t[0].nodeName)?{top:0,left:0}:t.offset();return n.top-=parseFloat(w(e).css("margin-top"))||0,n.left-=parseFloat(w(e).css("margin-left"))||0,r.top+=parseFloat(w(t[0]).css("border-top-width"))||0,r.left+=parseFloat(w(t[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||D.body;e&&!U.test(e.nodeName)&&"static"==w(e).css("position");)e=e.offsetParent;return e})}},w.fn.detach=w.fn.remove,["width","height"].forEach(function(e){var t=e.replace(/./,function(e){return e[0].toUpperCase()});w.fn[e]=function(n){var o,a=this[0];return n===T?r(a)?a["inner"+t]:i(a)?a.documentElement["scroll"+t]:(o=this.offset())&&o[e]:this.each(function(t){a=w(this),a.css(e,m(this,n,t,a[e]()))})}}),$.forEach(function(t,n){var r=n%2;w.fn[t]=function(){var t,i,o=w.map(arguments,function(n){return t=e(n),"object"==t||"array"==t||null==n?n:Z.fragment(n)}),a=this.length>1;return o.length<1?this:this.each(function(e,t){i=r?t:t.parentNode,t=0==n?t.nextSibling:1==n?t.firstChild:2==n?t:null;var s=w.contains(D.documentElement,i);o.forEach(function(e){if(a)e=e.cloneNode(!0);else if(!i)return w(e).remove();i.insertBefore(e,t),s&&A(e,function(e){null==e.nodeName||"SCRIPT"!==e.nodeName.toUpperCase()||e.type&&"text/javascript"!==e.type||e.src||window.eval.call(window,e.innerHTML)})})})},w.fn[r?t+"To":"insert"+(n?"Before":"After")]=function(e){return w(e)[t](this),this}}),Z.Z.prototype=y.prototype=w.fn,Z.uniq=R,Z.deserializeValue=_,w.zepto=Z,w}();window.Zepto=r,void 0===window.$&&(window.$=r),function(e){function t(e){return e._zid||(e._zid=d++)}function n(e,n,o,a){if(n=r(n),n.ns)var s=i(n.ns);return(g[t(e)]||[]).filter(function(e){return!(!e||n.e&&e.e!=n.e||n.ns&&!s.test(e.ns)||o&&t(e.fn)!==t(o)||a&&e.sel!=a)})}function r(e){var t=(""+e).split(".");return{e:t[0],ns:t.slice(1).sort().join(" ")}}function i(e){return new RegExp("(?:^| )"+e.replace(" "," .* ?")+"(?: |$)")}function o(e,t){return e.del&&!m&&e.e in b||!!t}function a(e){return E[e]||m&&b[e]||e}function s(n,i,s,l,c,d,h){var p=t(n),y=g[p]||(g[p]=[]);i.split(/\s/).forEach(function(t){if("ready"==t)return e(document).ready(s);var i=r(t);i.fn=s,i.sel=c,i.e in E&&(s=function(t){var n=t.relatedTarget;return!n||n!==this&&!e.contains(this,n)?i.fn.apply(this,arguments):void 0}),i.del=d;var p=d||s;i.proxy=function(e){if(e=u(e),!e.isImmediatePropagationStopped()){e.data=l;var t=p.apply(n,e._args==f?[e]:[e].concat(e._args));return t===!1&&(e.preventDefault(),e.stopPropagation()),t}},i.i=y.length,y.push(i),"addEventListener"in n&&n.addEventListener(a(i.e),i.proxy,o(i,h))})}function l(e,r,i,s,l){var u=t(e);(r||"").split(/\s/).forEach(function(t){n(e,t,i,s).forEach(function(t){delete g[u][t.i],"removeEventListener"in e&&e.removeEventListener(a(t.e),t.proxy,o(t,l))})})}function u(t,n){return(n||!t.isDefaultPrevented)&&(n||(n=t),e.each(S,function(e,r){var i=n[e];t[e]=function(){return this[r]=_,i&&i.apply(n,arguments)},t[r]=A}),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(t.isDefaultPrevented=_)),t}function c(e){var t,n={originalEvent:e};for(t in e)T.test(t)||e[t]===f||(n[t]=e[t]);return u(n,e)}var f,d=1,h=Array.prototype.slice,p=e.isFunction,y=function(e){return"string"==typeof e},g={},v={},m="onfocusin"in window,b={focus:"focusin",blur:"focusout"},E={mouseenter:"mouseover",mouseleave:"mouseout"};v.click=v.mousedown=v.mouseup=v.mousemove="MouseEvents",e.event={add:s,remove:l},e.proxy=function(n,r){var i=2 in arguments&&h.call(arguments,2);if(p(n)){var o=function(){return n.apply(r,i?i.concat(h.call(arguments)):arguments)};return o._zid=t(n),o}if(y(r))return i?(i.unshift(n[r],n),e.proxy.apply(null,i)):e.proxy(n[r],n);throw new TypeError("expected function")},e.fn.bind=function(e,t,n){return this.on(e,t,n)},e.fn.unbind=function(e,t){return this.off(e,t)},e.fn.one=function(e,t,n,r){return this.on(e,t,n,r,1)};var _=function(){return!0},A=function(){return!1},T=/^([A-Z]|returnValue$|layer[XY]$)/,S={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};e.fn.delegate=function(e,t,n){return this.on(t,e,n)},e.fn.undelegate=function(e,t,n){return this.off(t,e,n)},e.fn.live=function(t,n){return e(document.body).delegate(this.selector,t,n),this},e.fn.die=function(t,n){return e(document.body).undelegate(this.selector,t,n),this},e.fn.on=function(t,n,r,i,o){var a,u,d=this;return t&&!y(t)?(e.each(t,function(e,t){d.on(e,n,r,t,o)}),d):(y(n)||p(i)||i===!1||(i=r,r=n,n=f),(i===f||r===!1)&&(i=r,r=f),i===!1&&(i=A),d.each(function(f,d){o&&(a=function(e){return l(d,e.type,i),i.apply(this,arguments)}),n&&(u=function(t){var r,o=e(t.target).closest(n,d).get(0);return o&&o!==d?(r=e.extend(c(t),{currentTarget:o,liveFired:d}),(a||i).apply(o,[r].concat(h.call(arguments,1)))):void 0}),s(d,t,i,r,n,u||a)}))},e.fn.off=function(t,n,r){var i=this;return t&&!y(t)?(e.each(t,function(e,t){i.off(e,n,t)}),i):(y(n)||p(r)||r===!1||(r=n,n=f),r===!1&&(r=A),i.each(function(){l(this,t,r,n)}))},e.fn.trigger=function(t,n){return t=y(t)||e.isPlainObject(t)?e.Event(t):u(t),t._args=n,this.each(function(){t.type in b&&"function"==typeof this[t.type]?this[t.type]():"dispatchEvent"in this?this.dispatchEvent(t):e(this).triggerHandler(t,n); })},e.fn.triggerHandler=function(t,r){var i,o;return this.each(function(a,s){i=c(y(t)?e.Event(t):t),i._args=r,i.target=s,e.each(n(s,t.type||t),function(e,t){return o=t.proxy(i),i.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(t){e.fn[t]=function(e){return 0 in arguments?this.bind(t,e):this.trigger(t)}}),e.Event=function(e,t){y(e)||(t=e,e=t.type);var n=document.createEvent(v[e]||"Events"),r=!0;if(t)for(var i in t)"bubbles"==i?r=!!t[i]:n[i]=t[i];return n.initEvent(e,r,!0),u(n)}}(r),function(e){function t(t,n,r){var i=e.Event(n);return e(t).trigger(i,r),!i.isDefaultPrevented()}function n(e,n,r,i){return e.global?t(n||m,r,i):void 0}function r(t){t.global&&0===e.active++&&n(t,null,"ajaxStart")}function i(t){t.global&&!--e.active&&n(t,null,"ajaxStop")}function o(e,t){var r=t.context;return t.beforeSend.call(r,e,t)===!1||n(t,r,"ajaxBeforeSend",[e,t])===!1?!1:void n(t,r,"ajaxSend",[e,t])}function a(e,t,r,i){var o=r.context,a="success";r.success.call(o,e,a,t),i&&i.resolveWith(o,[e,a,t]),n(r,o,"ajaxSuccess",[t,r,e]),l(a,t,r)}function s(e,t,r,i,o){var a=i.context;i.error.call(a,r,t,e),o&&o.rejectWith(a,[r,t,e]),n(i,a,"ajaxError",[r,i,e||t]),l(t,r,i)}function l(e,t,r){var o=r.context;r.complete.call(o,t,e),n(r,o,"ajaxComplete",[t,r]),i(r)}function u(){}function c(e){return e&&(e=e.split(";",2)[0]),e&&(e==T?"html":e==A?"json":E.test(e)?"script":_.test(e)&&"xml")||"text"}function f(e,t){return""==t?e:(e+"&"+t).replace(/[&?]{1,2}/,"?")}function d(t){t.processData&&t.data&&"string"!=e.type(t.data)&&(t.data=e.param(t.data,t.traditional)),!t.data||t.type&&"GET"!=t.type.toUpperCase()||(t.url=f(t.url,t.data),t.data=void 0)}function h(t,n,r,i){return e.isFunction(n)&&(i=r,r=n,n=void 0),e.isFunction(r)||(i=r,r=void 0),{url:t,data:n,success:r,dataType:i}}function p(t,n,r,i){var o,a=e.isArray(n),s=e.isPlainObject(n);e.each(n,function(n,l){o=e.type(l),i&&(n=r?i:i+"["+(s||"object"==o||"array"==o?n:"")+"]"),!i&&a?t.add(l.name,l.value):"array"==o||!r&&"object"==o?p(t,l,r,n):t.add(n,l)})}var y,g,v=0,m=window.document,b=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,E=/^(?:text|application)\/javascript/i,_=/^(?:text|application)\/xml/i,A="application/json",T="text/html",S=/^\s*$/,w=m.createElement("a");w.href=window.location.href,e.active=0,e.ajaxJSONP=function(t,n){if(!("type"in t))return e.ajax(t);var r,i,l=t.jsonpCallback,u=(e.isFunction(l)?l():l)||"jsonp"+ ++v,c=m.createElement("script"),f=window[u],d=function(t){e(c).triggerHandler("error",t||"abort")},h={abort:d};return n&&n.promise(h),e(c).on("load error",function(o,l){clearTimeout(i),e(c).off().remove(),"error"!=o.type&&r?a(r[0],h,t,n):s(null,l||"error",h,t,n),window[u]=f,r&&e.isFunction(f)&&f(r[0]),f=r=void 0}),o(h,t)===!1?(d("abort"),h):(window[u]=function(){r=arguments},c.src=t.url.replace(/\?(.+)=\?/,"?$1="+u),m.head.appendChild(c),t.timeout>0&&(i=setTimeout(function(){d("timeout")},t.timeout)),h)},e.ajaxSettings={type:"GET",beforeSend:u,success:u,error:u,complete:u,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:A,xml:"application/xml, text/xml",html:T,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},e.ajax=function(t){var n,i,l=e.extend({},t||{}),h=e.Deferred&&e.Deferred();for(y in e.ajaxSettings)void 0===l[y]&&(l[y]=e.ajaxSettings[y]);r(l),l.crossDomain||(n=m.createElement("a"),n.href=l.url,n.href=n.href,l.crossDomain=w.protocol+"//"+w.host!=n.protocol+"//"+n.host),l.url||(l.url=window.location.toString()),(i=l.url.indexOf("#"))>-1&&(l.url=l.url.slice(0,i)),d(l);var p=l.dataType,v=/\?.+=\?/.test(l.url);if(v&&(p="jsonp"),l.cache!==!1&&(t&&t.cache===!0||"script"!=p&&"jsonp"!=p)||(l.url=f(l.url,"_="+Date.now())),"jsonp"==p)return v||(l.url=f(l.url,l.jsonp?l.jsonp+"=?":l.jsonp===!1?"":"callback=?")),e.ajaxJSONP(l,h);var b,E=l.accepts[p],_={},A=function(e,t){_[e.toLowerCase()]=[e,t]},T=/^([\w-]+:)\/\//.test(l.url)?RegExp.$1:window.location.protocol,L=l.xhr(),k=L.setRequestHeader;if(h&&h.promise(L),l.crossDomain||A("X-Requested-With","XMLHttpRequest"),A("Accept",E||"*/*"),(E=l.mimeType||E)&&(E.indexOf(",")>-1&&(E=E.split(",",2)[0]),L.overrideMimeType&&L.overrideMimeType(E)),(l.contentType||l.contentType!==!1&&l.data&&"GET"!=l.type.toUpperCase())&&A("Content-Type",l.contentType||"application/x-www-form-urlencoded"),l.headers)for(g in l.headers)A(g,l.headers[g]);if(L.setRequestHeader=A,L.onreadystatechange=function(){if(4==L.readyState){L.onreadystatechange=u,clearTimeout(b);var t,n=!1;if(L.status>=200&&L.status<300||304==L.status||0==L.status&&"file:"==T){p=p||c(l.mimeType||L.getResponseHeader("content-type")),t=L.responseText;try{"script"==p?(0,eval)(t):"xml"==p?t=L.responseXML:"json"==p&&(t=S.test(t)?null:e.parseJSON(t))}catch(r){n=r}n?s(n,"parsererror",L,l,h):a(t,L,l,h)}else s(L.statusText||null,L.status?"error":"abort",L,l,h)}},o(L,l)===!1)return L.abort(),s(null,"abort",L,l,h),L;if(l.xhrFields)for(g in l.xhrFields)L[g]=l.xhrFields[g];var R="async"in l?l.async:!0;L.open(l.type,l.url,R,l.username,l.password);for(g in _)k.apply(L,_[g]);return l.timeout>0&&(b=setTimeout(function(){L.onreadystatechange=u,L.abort(),s(null,"timeout",L,l,h)},l.timeout)),L.send(l.data?l.data:null),L},e.get=function(){return e.ajax(h.apply(null,arguments))},e.post=function(){var t=h.apply(null,arguments);return t.type="POST",e.ajax(t)},e.getJSON=function(){var t=h.apply(null,arguments);return t.dataType="json",e.ajax(t)},e.fn.load=function(t,n,r){if(!this.length)return this;var i,o=this,a=t.split(/\s/),s=h(t,n,r),l=s.success;return a.length>1&&(s.url=a[0],i=a[1]),s.success=function(t){o.html(i?e("<div>").html(t.replace(b,"")).find(i):t),l&&l.apply(o,arguments)},e.ajax(s),this};var L=encodeURIComponent;e.param=function(t,n){var r=[];return r.add=function(t,n){e.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(L(t)+"="+L(n))},p(r,t,n),r.join("&").replace(/%20/g,"+")}}(r),function(e){e.Callbacks=function(t){t=e.extend({},t);var n,r,i,o,a,s,l=[],u=!t.once&&[],c=function d(e){for(n=t.memory&&e,r=!0,s=o||0,o=0,a=l.length,i=!0;l&&a>s;++s)if(l[s].apply(e[0],e[1])===!1&&t.stopOnFalse){n=!1;break}i=!1,l&&(u?u.length&&d(u.shift()):n?l.length=0:f.disable())},f={add:function(){if(l){var r=l.length,s=function u(n){e.each(n,function(e,n){"function"==typeof n?t.unique&&f.has(n)||l.push(n):n&&n.length&&"string"!=typeof n&&u(n)})};s(arguments),i?a=l.length:n&&(o=r,c(n))}return this},remove:function(){return l&&e.each(arguments,function(t,n){for(var r;(r=e.inArray(n,l,r))>-1;)l.splice(r,1),i&&(a>=r&&--a,s>=r&&--s)}),this},has:function(t){return!(!l||!(t?e.inArray(t,l)>-1:l.length))},empty:function(){return a=l.length=0,this},disable:function(){return l=u=n=void 0,this},disabled:function(){return!l},lock:function(){return u=void 0,n||f.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||r&&!u||(t=t||[],t=[e,t.slice?t.slice():t],i?u.push(t):c(t)),this},fire:function(){return f.fireWith(this,arguments)},fired:function(){return!!r}};return f}}(r),function(e){function t(n){var r=[["resolve","done",e.Callbacks({once:1,memory:1}),"resolved"],["reject","fail",e.Callbacks({once:1,memory:1}),"rejected"],["notify","progress",e.Callbacks({memory:1})]],i="pending",o={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var n=arguments;return t(function(t){e.each(r,function(r,i){var s=e.isFunction(n[r])&&n[r];a[i[1]](function(){var n=s&&s.apply(this,arguments);if(n&&e.isFunction(n.promise))n.promise().done(t.resolve).fail(t.reject).progress(t.notify);else{var r=this===o?t.promise():this,a=s?[n]:arguments;t[i[0]+"With"](r,a)}})}),n=null}).promise()},promise:function(t){return null!=t?e.extend(t,o):o}},a={};return e.each(r,function(e,t){var n=t[2],s=t[3];o[t[1]]=n.add,s&&n.add(function(){i=s},r[1^e][2].disable,r[2][2].lock),a[t[0]]=function(){return a[t[0]+"With"](this===a?o:this,arguments),this},a[t[0]+"With"]=n.fireWith}),o.promise(a),n&&n.call(a,a),a}var n=Array.prototype.slice;e.when=function(r){var i,o,a,s=n.call(arguments),l=s.length,u=0,c=1!==l||r&&e.isFunction(r.promise)?l:0,f=1===c?r:t(),d=function(e,t,r){return function(o){t[e]=this,r[e]=arguments.length>1?n.call(arguments):o,r===i?f.notifyWith(t,r):--c||f.resolveWith(t,r)}};if(l>1)for(i=new Array(l),o=new Array(l),a=new Array(l);l>u;++u)s[u]&&e.isFunction(s[u].promise)?s[u].promise().done(d(u,a,s)).fail(f.reject).progress(d(u,o,i)):--c;return c||f.resolveWith(a,s),f.promise()},e.Deferred=t}(r),function(e){function t(e,t,n,r){return Math.abs(e-t)>=Math.abs(n-r)?e-t>0?"Left":"Right":n-r>0?"Up":"Down"}function n(){c=null,d.last&&(d.el.trigger("longTap"),d={})}function r(){c&&clearTimeout(c),c=null}function i(){s&&clearTimeout(s),l&&clearTimeout(l),u&&clearTimeout(u),c&&clearTimeout(c),s=l=u=c=null,d={}}function o(e){return("touch"==e.pointerType||e.pointerType==e.MSPOINTER_TYPE_TOUCH)&&e.isPrimary}function a(e,t){return e.type=="pointer"+t||e.type.toLowerCase()=="mspointer"+t}var s,l,u,c,f,d={},h=750;e(document).ready(function(){var p,y,g,v,m=0,b=0;"MSGesture"in window&&(f=new MSGesture,f.target=document.body),e(document).bind("MSGestureEnd",function(e){var t=e.velocityX>1?"Right":e.velocityX<-1?"Left":e.velocityY>1?"Down":e.velocityY<-1?"Up":null;t&&(d.el.trigger("swipe"),d.el.trigger("swipe"+t))}).on("touchstart MSPointerDown pointerdown",function(t){(!(v=a(t,"down"))||o(t))&&(g=v?t:t.touches[0],t.touches&&1===t.touches.length&&d.x2&&(d.x2=void 0,d.y2=void 0),p=Date.now(),y=p-(d.last||p),d.el=e("tagName"in g.target?g.target:g.target.parentNode),s&&clearTimeout(s),d.x1=g.pageX,d.y1=g.pageY,y>0&&250>=y&&(d.isDoubleTap=!0),d.last=p,c=setTimeout(n,h),f&&v&&f.addPointer(t.pointerId))}).on("touchmove MSPointerMove pointermove",function(e){(!(v=a(e,"move"))||o(e))&&(g=v?e:e.touches[0],r(),d.x2=g.pageX,d.y2=g.pageY,m+=Math.abs(d.x1-d.x2),b+=Math.abs(d.y1-d.y2))}).on("touchend MSPointerUp pointerup",function(n){(!(v=a(n,"up"))||o(n))&&(r(),d.x2&&Math.abs(d.x1-d.x2)>30||d.y2&&Math.abs(d.y1-d.y2)>30?u=setTimeout(function(){d.el.trigger("swipe"),d.el.trigger("swipe"+t(d.x1,d.x2,d.y1,d.y2)),d={}},0):"last"in d&&(30>m&&30>b?l=setTimeout(function(){var t=e.Event("tap");t.cancelTouch=i,d.el.trigger(t),d.isDoubleTap?(d.el&&d.el.trigger("doubleTap"),d={}):s=setTimeout(function(){s=null,d.el&&d.el.trigger("singleTap"),d={}},250)},0):d={}),m=b=0)}).on("touchcancel MSPointerCancel pointercancel",i),e(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(t){e.fn[t]=function(e){return this.on(t,e)}})}(r),function(e){function t(t){return t=e(t),!(!t.width()&&!t.height())&&"none"!==t.css("display")}function n(e,t){e=e.replace(/=#\]/g,'="#"]');var n,r,i=s.exec(e);if(i&&i[2]in a&&(n=a[i[2]],r=i[3],e=i[1],r)){var o=Number(r);r=isNaN(o)?r.replace(/^["']|["']$/g,""):o}return t(e,n,r)}var r=e.zepto,i=r.qsa,o=r.matches,a=e.expr[":"]={visible:function(){return t(this)?this:void 0},hidden:function(){return t(this)?void 0:this},selected:function(){return this.selected?this:void 0},checked:function(){return this.checked?this:void 0},parent:function(){return this.parentNode},first:function(e){return 0===e?this:void 0},last:function(e,t){return e===t.length-1?this:void 0},eq:function(e,t,n){return e===n?this:void 0},contains:function(t,n,r){return e(this).text().indexOf(r)>-1?this:void 0},has:function(e,t,n){return r.qsa(this,n).length?this:void 0}},s=new RegExp("(.*):(\\w+)(?:\\(([^)]+)\\))?$\\s*"),l=/^\s*>/,u="Zepto"+ +new Date;r.qsa=function(t,o){return n(o,function(n,a,s){try{var c;!n&&a?n="*":l.test(n)&&(c=e(t).addClass(u),n="."+u+" "+n);var f=i(t,n)}catch(d){throw console.error("error performing selector: %o",o),d}finally{c&&c.removeClass(u)}return a?r.uniq(e.map(f,function(e,t){return a.call(e,t,f,s)})):f})},r.matches=function(e,t){return n(t,function(t,n,r){return!(t&&!o(e,t)||n&&n.call(e,null,r)!==e)})}}(r),function(){try{getComputedStyle(void 0)}catch(e){var t=getComputedStyle;window.getComputedStyle=function(e){try{return t(e)}catch(n){return null}}}}(),e.exports=r},function(e,t){"use strict";e.exports={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVEL_SWITCH:"hlsLevelSwitch",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded"}},function(e,t){"use strict";function n(){}function r(e,t){return t="["+e+"] > "+t}function i(e){var t=window.console[e];return t?function(){for(var n=arguments.length,i=Array(n),o=0;n>o;o++)i[o]=arguments[o];i[0]&&(i[0]=r(e,i[0])),t.apply(window.console,i)}:n}function o(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];n.forEach(function(t){u[t]=e[t]?e[t].bind(e):i(t)})}var a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e};Object.defineProperty(t,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"===a(Symbol.iterator)?function(e){return"undefined"==typeof e?"undefined":a(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":"undefined"==typeof e?"undefined":a(e)},l={trace:n,debug:n,log:n,warn:n,info:n,error:n},u=l;t.enableLogs=function(e){if(e===!0||"object"===("undefined"==typeof e?"undefined":s(e))){o(e,"debug","log","info","warn","error");try{u.log()}catch(t){u=l}}else u=l},t.logger=u},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ErrorTypes={NETWORK_ERROR:"networkError",MEDIA_ERROR:"mediaError",OTHER_ERROR:"otherError"},t.ErrorDetails={MANIFEST_LOAD_ERROR:"manifestLoadError",MANIFEST_LOAD_TIMEOUT:"manifestLoadTimeOut",MANIFEST_PARSING_ERROR:"manifestParsingError",MANIFEST_INCOMPATIBLE_CODECS_ERROR:"manifestIncompatibleCodecsError",LEVEL_LOAD_ERROR:"levelLoadError",LEVEL_LOAD_TIMEOUT:"levelLoadTimeOut",LEVEL_SWITCH_ERROR:"levelSwitchError",FRAG_LOAD_ERROR:"fragLoadError",FRAG_LOOP_LOADING_ERROR:"fragLoopLoadingError",FRAG_LOAD_TIMEOUT:"fragLoadTimeOut",FRAG_DECRYPT_ERROR:"fragDecryptError",FRAG_PARSING_ERROR:"fragParsingError",KEY_LOAD_ERROR:"keyLoadError",KEY_LOAD_TIMEOUT:"keyLoadTimeOut",BUFFER_APPEND_ERROR:"bufferAppendError",BUFFER_APPENDING_ERROR:"bufferAppendingError",BUFFER_STALLED_ERROR:"bufferStalledError",BUFFER_FULL_ERROR:"bufferFullError",BUFFER_SEEK_OVER_HOLE:"bufferSeekOverHole",INTERNAL_EXCEPTION:"internalException"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(2),u=n(15),c=r(u),f=function(e){function t(n){i(this,t);var r=o(this,e.call(this,n));return r.settings={},r}return a(t,e),s(t,[{key:"ended",get:function(){return!1}},{key:"buffering",get:function(){return!1}}]),t.prototype.play=function(){},t.prototype.pause=function(){},t.prototype.stop=function(){},t.prototype.seek=function(e){},t.prototype.seekPercentage=function(e){},t.prototype.getStartTimeOffset=function(){return 0},t.prototype.getDuration=function(){return 0},t.prototype.isPlaying=function(){return!1},t.prototype.getPlaybackType=function(){return t.NO_OP},t.prototype.isHighDefinitionInUse=function(){return!1},t.prototype.volume=function(e){},t.prototype.destroy=function(){this.$el.remove()},s(t,[{key:"isReady",get:function(){return!1}}]),t}(c["default"]);t["default"]=f,f.extend=function(e){return(0,l.extend)(f,e)},f.canPlay=function(e,t){return!1},f.VOD="vod",f.AOD="aod",f.LIVE="live",f.NO_OP="no_op",f.type="playback",e.exports=t["default"]},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=r(i),a=n(9),s=r(a),l={getStyleFor:function(e){var t=arguments.length<=1||void 0===arguments[1]?{baseUrl:""}:arguments[1];return(0,o["default"])('<style class="clappr-style"></style>').html((0,s["